mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
46 lines
No EOL
1.7 KiB
Markdown
46 lines
No EOL
1.7 KiB
Markdown
# monofonIC
|
|
|
|
High order LPT/QPT tool for single resolution simulations
|
|
|
|
## Build Instructions
|
|
Clone code including submodules (currently only CLASS is used as a submodule):
|
|
|
|
git clone --recurse-submodules https://<username>@bitbucket.org/ohahn/monofonic.git
|
|
|
|
|
|
Create build directory, configure, and build:
|
|
|
|
mkdir monofonic/build; cd monofonic/build
|
|
|
|
ccmake ..
|
|
|
|
make
|
|
|
|
this should create an executable in the build directory.
|
|
|
|
If you run into problems with CMake not being able to find your local FFTW3 or HDF5 installation, it is best to give the path directly as
|
|
|
|
FFTW3_ROOT=<path> HDF5_ROOT=<path> ccmake ..
|
|
|
|
make sure to delete previous files generated by CMake before reconfiguring like this.
|
|
|
|
If you want to build on macOS, then it is strongly recommended to use GNU (or Intel) compilers instead of Apple's Clang. Install them e.g.
|
|
via homebrew and then configure cmake to use them instead of the macOS default compiler via
|
|
|
|
CC=gcc-9 CXX=g++-9 ccmake ..
|
|
|
|
This is necessary since Apple's compilers haven't supported OpenMP for years.
|
|
|
|
## Running
|
|
|
|
There is an example parameter file 'example.conf' in the main directory. Possible options are explained in it, it can be run
|
|
as a simple argument, e.g. from within the build directory:
|
|
|
|
./monofonic ../example.conf
|
|
|
|
If you want to run with MPI, you need to enable MPI support via ccmake. Then you can launch in hybrid MPI+threads mode by
|
|
specifying the desired number of threads per task in the config file, and the number of tasks to be launched via
|
|
|
|
mpirun -np 16 ./monofonic <path to config file>
|
|
|
|
It will then run with 16 tasks times the number of threads per task specified in the config file. |