Installing E3SM with MALI

These build instructions are for compiling Albany Land Ice (ALI) as a preinstalled library for E3SM+MALI. These instructions assume you have already ported E3SM to your machine (you have it defined in config_machines.xml and can build and run cases.) Currently supported machines are:

Clone repos and load environment

First, create a dedicated directory and download the appropriate versions of Kokkos, Trilinos and Albany:

export E3SM_MALI=${HOME}/e3sm_mali mkdir ${HOME}/e3sm_mali cd ${E3SM_MALI} git clone https://github.com/E3SM-Project/kokkos -b e3sm-kokkos-4.2.00 git clone https://github.com/E3SM-Project/Trilinos -b e3sm-trilinos-15.1.1 git clone https://github.com/sandialabs/Albany.git -b e3sm-albany-2024-03-26

Then, ensure your shell environment matches what is used for E3SM by using CIME. Here, we assume E3SM is located in the same directory:

python ${E3SM_MALI}/E3SM/cime/CIME/Tools/get_case_env >& env.sh source env.sh

Alternatively, you can use the file generated in any case directory:

source .env_mach_specific.sh

Example: https://github.com/sandialabs/Albany/blob/e3sm-albany-2024-03-26/pmcpu_gnu_modules.sh

Building Kokkos

Normally, Kokkos is installed while building E3SM using CIME case.build. Here, we need to install Kokkos as a tpl outside case.build in order for E3SM, Trilinos and Albany to use the same Kokkos. Kokkos options for the internal build are specified in https://github.com/E3SM-Project/E3SM/tree/master/cime_config/machines/cmake_macros and can be used to ensure E3SM is configured properly.

Make a build directory for Kokkos and copy over an example configuration file:

Modify the following if needed:

Then, configure, build and install:

Building Boost for Trilinos

Trilinos requires many tpls that are also needed in E3SM. The one exception is boost. A script is provided as an example for installing boost.

Modify the following:

Then run:

Building Trilinos

Make a build directory for Trilinos and copy over an example configuration file:

Modify the following if needed:

Then, configure, build and install:

Building Albany

Make a build directory for Albany and copy over an example configuration file:

Modify the following if needed:

Then, configure, build and install:

Build/Run E3SM+MALI

Modify ${E3SM_MALI}/E3SM/cime_config/machines/config_machines.xml to point to your Albany/Trilinos installations:

Note: $E3SM_MALI should be replaced with the full path to ensure it finds the installation with E3SM_MALI defined. Alternatively, the Albany and Trilinos environment variables can be specified explicitly before the E3SM build phase:

Next, build/run a simple test to ensure everything is properly configured:

Support

For support, contact the team via the E3SM slack in the #land-ice channel or post an issue here: https://github.com/sandialabs/Albany/issues