Prerequisites - cmyoo/cosmos GitHub Wiki
Prerequisites for COSMOS
-
COSMOS is assumed to run in a linux-like environment including the Windows Subsystem for Linux (WSL). COSMOS requires the following software for compiling and running.
-
GNU Make (
make
): This may be installed in most unix-like systems. -
B shell (
bash
): Any shell can run the code, but it differs how to set an environment variable like OMP_NUM_THREADS. In our document, bash is assumed to set such environment variables. -
C++ compiler (
g++
): COSMOS is well-tested with the GCC, but Intel Compiler or PGI Compiler may also be used. -
OpenMP (Optional): It saves the simulation time when your PC has more CPU cores.
-
-
About C++ compiler with an OpenMP package
-
Depending on the environment, one may have to edit the makefile appropriately.
-
For a Linux PC, the default makefile can be used with g++ compiler.
-
For a Mac PC, one may have to install an OpenMP package in addition to a C++ compiler when the OpenMP is used for parallelization. The std compiler option would have to be altered to an appropriate one (e.g.
-std=c++14
).
-
-
NOTE: When performing test calculations on a low-spec PC, such as a laptop PC, the calculation speed (especially for the apparent horizon finder) may drop significantly unless the number of threads for OpenMP is kept small. For such test calculations, a user may have to limit the number of cores to one or at most a few with
export OMP_NUM_THREADS=x
(x: number of threads).