Configuration & Installation

Dependencies & Prerequisities:

  • Needed: Fosite relies heavily on the Fortran 2003 standard and uses some features from the 2008 standard. Thus if you run into any problems compiling fosite you should first ensure that your Fortran compiler has the required capabilities. Have a look at the compiler status Fortran-Wiki in order to get an overview. We encourage you to use the most recent compilers in order to benefit from vectorization features on new architectures. The following compilers were tested and should work:
    • gfortran (>=6.2): GNU fortran compiler
    • ifort (>=16.0.4): Intel fortran compiler
    • nfort (>=1.6.0): NEC compiler for SX-Tsubasa system
  • Needed: cmake (>=2.8.10) - Necessary to configure fosite.
  • Optional: MPI is needed for the parallel build. See, e.g., Open MPI or MPICH. We recommend using MPICH, because of known problems with OpenMPI (version 3.1.3), causing segfaults for certain partitioning.
  • Optional: FFTW (>=3.3.6) for all spectral methods (especially self-gravitation). Please be aware that you need an MPI implementation of FFTW, which is necessary, if you want to run in parallel.
  • Optional: Doxygen (>=1.8.12) - If you want to build the html documentation on your own. During the build bash, sed and awk are also used.

Compiling the Serial Version

To prepare the code for compilation, you can either run

cmake

from within the root of the source tree or create a new build directory somewhere else and run cmake from this new directory

cmake <path_to_fosite>

where <path_to_fosite> contains the path to the fosite source code. We strongly recommend this so-called out of place build. In order to get information about additional options for setting up the code type

cmake -L <path_to_fosite>

If you want to use a particular Fortran compiler, e. g., the Intel Fortran compiler ifort, which is not the default on your system, run

FC=ifort cmake <path_to_fosite>

If the configuration succeeded run

make

from within the build folder to compile fosite. If the build finishes without errors you find some binary files in the subfolders <builddir>/tests and <builddir>/examples. If you type

ctest

all test simulations from the <builddir>/tests subfolder are run.

Compiling the Parallel Version

In order to build the parallel version type

cmake -DPARALLEL=ON <path_to_fosite>

from within the build folder. Again compilation is done typing

make

To run a simulation in parallel type

mpirun -n X programname

where X is the number of cores that should be used. In the standard output the partitioning can be checked at "MESH-----> MPI partitioning: X1:X2:X3" where X1*X2*X3 should be equal to X.

Compile on NEC-SX Aurora

On NEC-SX Aurora vector machines there is a toolchain provided. Run

cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-SX-Aurora.cmake <path_to_fosite>

(from a build folder).

Build the Documentation

Also run cmake and make sure doxygen was found. Afterwards run

make doc

in the build directory. The documentation can then be found under <builddir>/doc/html.

Problems During Installation

If you run into any problems during installation do not hesitate to contact us.