-
Notifications
You must be signed in to change notification settings - Fork 3
Compiling MALI
MALI has a number of dependencies that must be compiled before the MALI executable can be compiled. The preferred way to manage MALI dependencies is through the Configuration Of Model for Prediction Across Scales Setups (compass) python package, which provides a conda environment with required dependencies. compass
conda environments with all necessary MALI dependencies are maintained on most DOE machines on which E3SM is run: Cori, Perlmutter, Anvil, Chrysalis, Compy, and Chicoma. See the compass
Quick Start for Users for details on how to load the compass
environments on these machines and build MALI.
It is possible to set up compass
on other machines, but it is necessary to configure spack
to build the Albany
dependency first. Please get in touch with a MALI developer if this is something you want to try.
Whether compass
was used to provide MALI dependencies or those were generated in some other way, the final step of compiling the MALI executable is the same.
MALI code is located within the E3SM repository at components/mpas-albany-landice
. MALI is compiled using make
through a Makefile
in that directory. The make
command requires a build target depending on the compiler and machine you are using. The available options can be found by viewing the Makefile
. The supported build target for each supported DOE machine are listed in the COMPASS developer guide.
There are a number of build options that can be listed by running make without any arguments. The most important are:
-
ALBANY=true
: Include the Albany velocity solver in the build. This should be included for all science runs. -
DEBUG=true
: Compile MALI in debug mode. This provides debugging information in the case of model termination and also generates log files for all processors instead of just the head processor. Typically, this argument will be left off for production runs and enabled for model development.
Basic instructions for compiling MALI:
cd components/mpas-albany-landice
git submodule update --init --recursive
make [ALBANY=true] [DEBUG=true] <mpas_make_target>
Example using gcc in DEBUG mode and including Albany: make gfortran ALBANY=true DEBUG=true
MALI dependencies are handled by the compass
package as described above, but are listed here for reference.
MALI has the following dependencies:
- Albany: Albany is a multiphysics code that includes a thermomechanically-coupled 3d first-order ice-flow velocity solver. Generally speaking, MALI requires Albany velocity solver. (It is possible to run with MALI without Albany with a shallow-ice approximation velocity solver, but this is primarily used for testing and is not scientifically supported.)
- SCORPIO: SCORPIO is a parallel I/O interface library required for
- NetCDF/Parallel-NetCDF: low-level I/O libraries used by SCORPIO. One or both are required; Patallel-NetCDF is required for parallel I/O.