Home · Overview · Users Guide · Reference Guide |
Sartre can be downloaded from the project web site (sartre-mc) as a compressed tar archive. The tar ball contains all necessary source code, lookup tables, and the full documenation (html).
Although Sartre is written in ISO C++ and we made sure to adhere to strict standards in our code we can only guarantee that it runs on the two platforms we tested it on, namely Mac OS and Linux (Red Hat) systems.
tar -xzvf sartre-<version>.tgz
This will create a directory sartre
with several
subdirectories containing source code, include files, tables, as well as
directories
for (provided) external programs such as Cuba and Gemini++ that are required
to build Sartre.
Sartre requires two additional packages to be installed: ROOT and the GNU Scientific Library (GSL). If not already on your system please install them before you continue. Note that ROOT must contain the Unuran and MathMore components. The binary distributions available on the ROOT web site contain them already. If you install ROOT yourself make sure you select them during configuration. In case you want to generate tables for specific models and nuclei not already contained in the latest Sartre distribution and you want to do so in multithreaded mode (see below) you will need the Boost library. For most users this is in general not needed nor recommended.
Sartre is using Cmake for building and installation. If this package is not present please install it before continuing.
Cmake will lookup the locations of the required libraries. If ROOT and GSL are not installed in standard locations it is recommended to ensure that the following environment variables are defined. This helps cmake to locate the required libraries and include files:
# example using bash export ROOTSYS=/usr/local/root # must contain lib/ include/ bin/ export GSL_DIR=/usr/local/bin # must contain gsl-config # use only when creating tables in multithreaded mode: export Boost_Dir=...
Now building and installing Sartre is easy:
cd sartre-<version> cmake . # note the dot "." make make install
By default Sartre is installed in /usr/local. Make sure you have the appropriate privileges for installation. To chose a different directory use:
cmake -DCMAKE_INSTALL_PREFIX=<mydir> .
This
will create a Makefile that is setup to install
Sartre
in mydir/sartre
.
If (and only if) you intend to create your own tables, a tremendously CPU intensive task, you might want to run Sartre in multithreaded mode. To do so you need to pass an additional flag to cmake:
cmake -DMULTITHREADED=ON .
To get started with Sartre it is strongly recommended to copy the sartre/example
directory
and build upon the examples (especially sartreMain.cpp
) in this
directory. The
folder also contains the required CMakeLists.txt
file for cmake
that you can adapt for you own program.
Note that in order to run Sartre you need to set the environment
variable
SARTRE_DIR
to point to the installation directory. For example:
# example using bash export SARTRE_DIR=/usr/local/sartre
Then within the example directory:
cmake . make
Will make all examples. You can also make them individually, for example make
sartreMain
. In case you create you own Sartre project it is recommended
to use the CMakeLists.txt
file and the cmake/
directory
plus content contained
in the examples/
directory and modify it to your needs. Otherwise
you have to write you own Makefile from scratch.
With that you should be set to get started. We recommend to have also a look at the Users Guide and for more details we refer to the Reference Guide.
Last Update: October 29, 2013 |