COGENT is a continuum (Eulerian) plasma simulation code. It is primarily focused on tokamak edge plasma geometries, but includes options for, and is extensible to, other configurations. This repository contains the COGENT code (COGENT/) as well as Chombo (Chombo/), the adaptive mesh refinement application framework from Lawrence Berkeley National Laboratory upon which COGENT is built.
On the following machines, just run the provided install script:
NERSC-Edison
./install.sh
One can look inside this script to figure out the steps necessary for compiling COGENT. Or read on ...
It is assumed the C++ and FORTRAN compilers and their MPI wrappers are already available in the environment. The following environment variables must be defined and set to the correct compilers:
Step 1: Set environment variables pointing to the HDF5 installation that is compiled with the same compilers that COGENT will be compiled with.
On LC-Quartz, the following environment variables are needed
In bash, this can be done by:
export HDF5_DIR_SERIAL=/path/to/hdf5-serial export HDF5_DIR_PARALLEL=/path/to/hdf5-parallel
For example, when using GNU compilers v4.9.3 and MVAPICH2 v2.2:
export HDF5_DIR_SERIAL=/usr/tce/packages/hdf5/hdf5-serial-1.8.18-gcc-4.9.3 export HDF5_DIR_PARALLEL=/usr/tce/packages/hdf5/hdf5-parallel-1.8.18-gcc-4.9.3-mvapich2-2.2
should work.
On NERSC machines, the following environment variable is needed:
For example:
export HDF5_DIR=/opt/cray/pe/hdf5-parallel/1.10.2.0/gnu/8.2/
should work.
Step 2: Copy the file appropriate "Make.defs.
cp Chombo_Makefile/Make.defs.
For example, on LC-Quartz,
cp Chombo_Makefile/Make.defs.quartz Chombo/lib/mk/Make.defs.local
and on NERSC machines (Cori/Edison),
cp Chombo_Makefile/Make.defs.nersc Chombo/lib/mk/Make.defs.local
Step 3: Compile hypre - go to COGENT/hypre-2.9.0b/ and run the following commands
./doconfig-opt ./doinstall
Step 4: Compile COGENT - go to COGENT/exec/ and run
make -j all OPT=TRUE DEBUG=FALSE