-
Notifications
You must be signed in to change notification settings - Fork 8
1_Installation
Before we compile (and run) Coral, we need:
- a Fortran compiler (gfortran, ifort, ...)
- a MPI implementation (openmpi, mpich, ...) Use openmpi if you can
- the FFTW3 library. Installation is well documented on FFTW3's website. It may be as simple as: un-tar the archive, run the configure script,
make
andmake install
. Sequential orMPI
routines are used depending on the version of coral that's being build: slabs or pencils. Be sure to use fftw3, and not Intel MKL's wrappers - the MKL library, obtained from Intel's website after a free registration. Installation is reasonably straightforward using the script they provide e.g., there
- on clusters, all the above is accessible via modules.
- when building the pencils version of coral, an additional requirement is the patched
2decomp&fft
library. This is the only dependency which needs manual installation on clusters. Fortunately, the installation is relatively straighforward and detailled there, - the helpers routines---not necessary for compiling, nor running, yet useful for output processing and plotting---are written in
python3
(and often compatible withpython2
). Some require a recentscipy
installation (>1.4.0)
Clone the git repository where suitable and define this folder as ${CORAL_ROOT}
:
cd /path/to/my/codes
git clone https://github.com/BenMql/coral.git $PWD
cd coral
export CORAL_ROOT=${PWD}/
Alternatively you may want to download a tarball of a given version.
Use a brief shell scripts for defining environment variables, examples of which are located in ${CORAL_ROOT}/etc/set_env_examples/
. In particular, set_env_template.sh
provides guidance for writing a script for your own machine.
cd ${CORAL_ROOT}
cp ./etc/set_env_examples/set_env_template.sh ./set_env_myMachine.sh
vi set_env_myMachine.sh
chmod +x set_env_myMachine.sh
Optionally, feel free to mail me clusters environment files, so that to build a database of examples for future users.
After creating the environment variables script, source it and compile:
cd ${CORAL_ROOT}
source ./set_env_myMachine.sh
make clean pencils
This will create the executable S{CORAL_ROOT}/build/coral_LP.exe
Forgetting to source set_env_myMachine.sh
before compilation or execution is a frequent source of errors
Alternatively (or additionally), you may compile the version of the code that relies on a 1D domain decomposition:
cd ${CORAL_ROOT}
source ./set_env_myMachine.sh
make clean slabs
This will create the executable S{CORAL_ROOT}/build/coral_SL.exe