Skip to content

Commit

Permalink
First rough draft complete.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwcarlsen committed Jan 31, 2012
1 parent 4789ae1 commit c8cdd1d
Show file tree
Hide file tree
Showing 68 changed files with 3,916 additions and 239 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 2c24b65e67ccd3c4ebc881facc088f93
config: 92437fd7eaa6b9ccb2c30a864c924913
tags: fbb0d17656682115ca4d033fb2f83ba1
76 changes: 76 additions & 0 deletions _sources/basics/dependencies_unix.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

.. summary Information on how to install some of the Cyclus dependencies

Installing Dependencies on Unix
-------------------------------

*Note that `unix` includes linux and darwin (mac) based systems*

This page will provide a short walk-through of some of the non-standard
installation requirements for *Cyclus* dependencies. *Cyclus* strives to be a
modularly designed code that allows dynamic loading of modules at run time;
therefore, dependencies must be built as shared object libraries instead of
static libraries. This is done through the use of the -fPIC (position
independent code) flag when building the required dependencies. For your
edification, `this website <http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html>`_
has a good review of shared libraries in general.

Some Quick Notes of Great Import
--------------------------------

#. The following procedures will NOT work correctly if you have already
acquired Lapack, BLAS, or Trilinos via Ubuntu's Synaptic Package Manager.

* It is highly reccommended that you remove these libraries via Synaptic
before reinstalling them in the following manner.

#. It is highly reccommended (specifically for novice users) that you install
these libraries in /usr/local

#. Be very careful when using Teuchos. They have made the design decision to
include definitions in their header files (due to heavy use of templates).
Such header files can only be included in one location in the *Cyclus* source
code.

Lapack
------

Lapack can be installed on your Unix machine using the following steps:

#. Download Lapack from its `website <http://www.netlib.org/lapack/>`_ and untar it in a preferred location
#. Make a build directory (e.g. one can place the source code in ../lapack/lapack-xx.yy.zz-Source and make the directory .../lapack/build)
#. Copy the configure_lapack script located in the *Cyclus* repository located in /trunk/dependencies/lapack and place it in your build folder
#. Change the configure script so that the last line points to your lapack source (e.g. ../lapack/lapack-xx.yy.zz-Source)

* Note, by default the script will install the library at /usr/local.

#. Run the script (by typing ./configure_lapack.sh). Note that you may need to alter the script's permissions. To do so you can type "chmod 775 configure_lapack.sh".
#. From the build directory, type "make" (or "make -jN" where N is the number of threads you want to use [this speeds up the process])
#. From the build directory, type "make install"

Note that the making process can take some time. It is suggested that you make
with the `-j` flag.

Teuchos
-------

*Cyclus* uses the Teuchos_ package of Trilinos_. Teuchos can be installed on your Unix machine using the following steps:

#. Download Trilinos from its website__ and untar it in a preferred location
#. Make a build directory (e.g. one can place the source code in .../trilinos/trilinos-xx.yy.zz-Source and make the directory .../trilinos/build)
#. Copy the configure_trilinos script located in the *Cyclus* repository located in /svn/dependencies/trilinos and place it in your build folder
#. Change the configure script so that the last line points to your trilinos source (e.g. .../trilinos/trilinos-xx.yy.zz-Source)

* Note, by default the script will install the library at /usr/local.

#. Run the script (by typing ./configure_trilinos.sh). Note that you may need to alter the script's permissions. To do so you can type "chmod 775 configure_trilinos.sh".
#. From the build directory, type "make" (or "make -jN" where N is the number of threads you want to use [this speeds up the process])
#. From the build directory, type "make install"

.. _Teuchos: http://trilinos.sandia.gov/packages/teuchos/

.. _Trilinos: http://trilinos.sandia.gov/

__ Trilinos_


123 changes: 123 additions & 0 deletions _sources/basics/dependencies_windows.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@

.. summary Information on how to install some of the Cyclus dependencies

Installing Dependencies on Windows
==================================

This page will provide a short walk-through of some of the installation
requirements for *Cyclus* dependencies on a Windows platform. *Cyclus* strives
to be a modularly designed code that allows dynamic loading of modules at run
time; therefore, most dependencies must be built as shared object libraries
instead of static libraries.

Cygwin
------

Cygwin is a terminal program that simulates a linux-like environment on Windows
platforms. To install Cygwin_ you will need to download a setup file and run it
according to the instructions at the `Cygwin Install Page`_.

.. _Cygwin: http://cygwin.com

.. _`Cygwin Install Page`: http://cygwin.com/install.html

Specifically, the Cygwin installation manager will walk through the
installation process:

#. Select Install From Internet.
#. Choose a directory to install cygwin.
#. Choose a download mirror near you.
#. Choose packages to install

* If you have two free gigabytes on your computer, the package
configuration process can be simplified by choosing to download all
packages. This will require clicking INSTALL the icon next to ALL.

* If space is restricted, you may be more selective about packages. When
selecting packages, choose the default action for ALL packages. Then,
search for and select install for specific packages that cyclus and its
dependencies rely on : svn, gcc, g++, g77, cmake, make, lapack, libxml2,
libidn.

#. This will take some time to install
#. When installed, check that these were installed correctly by using the 'which' command. A path will be returned if the package is found. If not, rerun Cygwin's setup.exe and install just the packages that are not found.

* To check for svn, open a Cygwin terminal and type 'which svn'.
* To check for gcc, open a Cygwin terminal and type 'which gcc'
* etc.

Boost
-----

Cyclus depends on boost. You may install boost following instructions at the
`Boost website`_. It is recommenced that Windows users use the boost installer
executable rather than unpacking the binaries manually or building from source.
So, download the installer.

.. _`Boost website`: http://www.boost.org

#. When the installer asks what packages to install, be certain to include

* the program_options library
* the IOStream libraries
* and the date_time library
* in addition to the default header libraries.

#. If you have surplus space on your computer, don't hesitate to install all of the libraries available, but be prepared for the installation to take up to an hour for all packages.
#. The installer will ask what variants of the boost libraries to install. Be certain to install a dynamic and a static library. Threading is up to you.

HDF5
----

HDF5 is a hierarchical database library that Cyclus uses for record keeping. To
install HDF5 on Windows :

#. Go to the hdf5 website.
#. Download the appropriate precompiled Windows binaries.
#. Extract the full directory structure somewhere temporary.
#. Move the contents of the resulting /bin directory to /usr/local/bin , or another preferred bin directory in your $PATH .
#. Move the contents of the /lib directory to /usr/local/lib (or elsewhere in your $PATH).
#. So too with the contents of the include directory, move them to /usr/local/include (or elsewhere).
#. This can optionally be repeated with the share directory as well.

Make sure the location you placed the binary files is in your $PATH environment
variable. Finally, add an environment variable that states $HDF5_ROOT =
/usr/local/lib (or your favorite other location).

Teuchos
-------

Download the Trilinos source code to some location such as ~/trilinos_source .

If CMake fails to find your c, cxx, or fortran compilers, double check that
these are in your path. You may also inform CMake of your default compilers
with environment variables that CMake pays attention to. To set the C compiler,
for example, you would set the $CC environmet variable to /usr/bin/gcc-3 .

Running cmake::

cd ~/trilinos_source
cd ../
mkdir trilinos_build
cd trilinos_bild
cmake-gui ../trilinos_source

From the gui (or via commandline flags, if you prefer), set the following
advanced configuration flags for the Trilinos build:

* BUILD_SHARED_LIBS=ON
* CMAKE_INSTALL_PREFIX=/usr/local/ (or elsewhere)
* Trilinos_ENABLE_TEUCHOS=ON
* BLAS_LIBRARY_DIRS=/usr/lib
* LAPACK_LIBRARY_DIRS=/usr/lib
* BLAS_LIBRARY_NAMES="blas"
* LAPACK_LIBRARY_NAMES="lapack"

Finally, configure and generate the make file (in the gui, these are buttons).
In the terminal type make, then type make install.

Now What?
---------

You're now ready to build cyclus. Onward to GettingAndBuildingCyclus.

9 changes: 7 additions & 2 deletions _sources/basics/get_and_build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ Package Minimum Version
==================== ==================

An overview of some more complicated package builds and installations (e.g.
lapack, teuchos, etc.) can be found on the InstallingDependenciesOnUnix or
InstallingDependenciesOnWindows wiki pages.
lapack, teuchos, etc.) can be found on the following pages:

.. toctree::
:maxdepth: 2

dependencies_unix
dependencies_windows

Project Repository
------------------
Expand Down
1 change: 0 additions & 1 deletion _sources/basics/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Cyclus Fundamentals

introduction
get_and_build
style_guide
decay

.. stuff not converted yet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.. summary Style Guidelines for cyclus development

Cyclus Style Guidelines
=======================
.. summary Style Guidelines for cyclus developers

Style Guidelines for Developers
===============================

The purpose of this page is to introduce some general style guidelines to help
with readability, maintainability and extensibility of the cyclus code base.
Expand All @@ -10,39 +11,32 @@ with readability, maintainability and extensibility of the cyclus code base.
Class File Organization
-----------------------


Class header files should be organized in the following order:

* private

* methods

* virtual

* static

* non-static

* data members

* static

* non-static

* protected (in same order as above)

* public (in same order as above)

Within each section, methods should be grouped and ordered in logical
categories in the following order:

* "life-cycle" methods first (e.g. constructors, destructors, initializers)

* operators (e.g. equivalence, assignment)

* data access methods

* other base-class-specific categories

* other class-specific categories

The order of method definition in the implementation file should be consistent
Expand All @@ -56,8 +50,6 @@ style standard as much as possible. This requires that all tabs be replaced by
spaces, and that an indentation is equal to two spaces. Further information on
this style standard can be found in the `Google Style Guide`_.

.. _`Google Style Guide`: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

Notable items:

* no tabs - expand all tabs to 2 spaces.
Expand All @@ -66,9 +58,9 @@ Notable items:

* trailing underscores must be used with all class member variables

* opening braces should be placed on the same line as function args:
`ReturnType functionName(Arg1Type arg_name) {`

* loop and branching statements should generally use the opening and closing
braces (i.e. not like this: `if (true) long_statement;`)
* opening braces should be placed on the same line as function args: `ReturnType functionName(Arg1Type arg_name) {`

* loop and branching statements should use the opening and closing braces (i.e. not like this: `if (true) long_statement;`)

.. _`Google Style Guide`: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

Loading

0 comments on commit c8cdd1d

Please sign in to comment.