-
Notifications
You must be signed in to change notification settings - Fork 1
Example Compilation
Dale edited this page Mar 4, 2022
·
1 revision
The general process for compiling is given below. With the exception of step 1, this is independent of the system you are compiling on. You may also wish to change the number of processors used to compile using the -j flag in steps 5/6 depending on your system.
-
Load Modules. These include the compiler, netcdf and hdf modules.
-
Define install directories of FABM (>= FABMv1.0) and XIOS (>= XIOSv2.5):
export FABM_HOME=<path/to/fabm> export XIOS_HOME=<path/to/xios> NEMO_HOME=<path/to/nemo>
-
Declare configuration options:
ARCH="name of system architecture" CFG="name of configuration to be created" REF="name of reference configuration"
-
Initialise compile directory with a dry-run compile. This step allows you to check that you are creating what you expect, and to make changes to the cpp file and MY_SRC directory if different from the reference configuration
cd $NEMO_HOME printf 'y\nn\nn\ny\nn\nn\nn\nn\n' |./makenemo -n $CFG -r $REF -m $ARCH -j 0
-
Perform a clean compile to remove any old build files:
./makenemo -n $CFG -r $REF -m $ARCH -j 4 clean
-
Full compilation:
./makenemo -n $CFG -r $REF -m $ARCH -j 4