Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • MPI: MOAB supports both MPICH- and OpenMPI-based libraries configured externally to enable scalable mesh manipulation algorithms. Needed for MOAB-coupler. ( If you were to build without MPI, a serial version of MOAB would result.) Use the same library you use for E3SM.

  • Parallel-NetCDF: MOAB library uses parallel-NetCDF (pnetcdf) library directly for parallel read of NetCDF meshes and linear map weight files (the r2o map. The rest are calculated online). Use the same one you built for E3SM.

  • Zoltan: Support for online partitioning through Zoltan (and its dependencies on Scotch, ParMetis etc) can be utilized through the partitioner tool and at runtime with appropriate file read options (PARTITION_METHOD=RCBZOLTAN;). This dynamic rebalancing is important to achieve good scalability when reading nc files. Currently you have to download and build Zoltan on your own but we are fixing that.

  • TempestRemap: Provides support for online remapping of Climate field data on unstructured spherical meshes. MOAB’s build will download and build TempestRemap if you have not done it separately.

  • Eigen3: A substitute for BLAS/LAPACK interfaces. Required when calculating weights with TempestRemap as we store the SparseMatrix internally on every task using the Eigen3 data-structures and apply the map with those structures. MOAB’s build will download and build Eigne3 if you have not done it separately.

...

Currently, both CMake and Autotools are maintained simultaneously to support all platforms (including Windows). In this section, we will focus only on the autotools configuration system as this remains the most tested configuration approach for now. In the future (FY24Q3), we will deprecate the autotools configuration system and use the CMake-based approach instead. When this happens, the instructions will be updated accordingly.

...

  • Override default compilers with environment variables or configure-time options with the compilers you use for E3SM: CC, CXX, FC, F77

  • For the MPI installed for E3SM, use --with-mpi=$MPI_DIR

  • For the PNetCDF installed, use --with-pnetcdf=$PNETCDF_DIR (if you built NetCDF4 and HDF5, add --with-hdf5=$HDF5_DIR --with-netcdf=$NETCDF_DIR)

  • Zoltan must currently be installed separately. use --with-zoltan=$ZOLTAN_DIR to tell MOAB its location.

  • For TempestRemap, if you pre-installed it, then use --with-tempestremap=$TEMPESTREMAP_DIR during configuration, or you can use the auto-download option to let MOAB automatically build the dependency with the configure option --download-tempestremap(to download the latest release) OR --download-tempestremap=master (to build from TempestRemap git repository, master branch).

  • For Eigen3….

  • Now execute Execute the configure script with desired configuration options either in-source or out-of-source (recommended) directory. A typical MOAB configuration command with all TPLs enabled for E3SM might look like the one shown below, where $PACKAGE_DIR indicates the location of the installation prefix for the particular TPL.

    Code Block
    $MOAB_SRC/configure CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif77 \
                        --prefix=$MOAB_INSTALL_DIR \
                        --enable-debug --enable-optimize \
                        --with-mpi=$MPI_DIR \
                        --with-eigen3=$EIGEN3_INCLUDE_DIR \
                        --with-hdf5=$HDF5_DIR \
                        --with-netcdf=$NETCDF_DIR \
                        --with-pnetcdf=$PNETCDF_DIR \
                        --with-tempestremap=$TEMPESTREMAP_DIR \
                        --with-zoltan=$ZOLTAN_DIR 

...

Once you have verified MOAB has been built correctly, you need to tell the CIME machine config that it is available.

Edit the entry for your machine in config_machines.xml and and lines like the following (taken from pm-cpu)

Code Block
<environment_variables compiler="intel">
  <env name="MOAB_ROOT">$SHELL{if [ -z "$MOAB_ROOT" ]; then echo /global/cfs/cdirs/e3sm/software/moab/intel; else echo "$MOAB_ROOT"; fi}</env>
</environment_variables>

Replace the path with the path to your MOAB install. In the above case, MOAB was built for multiple compilers so “intel” is in the path and there’s another entry for “gnu”.

After you’ve built MOAB and modified config_machines.xml, you can try building and running a case.

A simple create_newcase line is:

Code Block
./create_newcase --case Wne4mbtest --res ne4pg2_oQU480 --compset WCYCL1850NS --driver moab

You can add “--driver moab” to any B or F case at this time.

For create_test, a command like the following:

Code Block
./create_test SMS_Vmoab.ne4pg2_oQU480.WCYCL1850NS

You can add “Vmoab” to any B or F case test.

Pre-built recipes (Conda)

MOAB comes pre-built as part of a conda package to use offline tools like mbtempest. DO NOT use the conda installation for of MOAB for the MOAB coupler in E3SM as often the preinstalled package will be suboptimal for the cluster or machine in use. However, such installations are useful for offline remapping (mbtempest) and computational analysis workflows (with Python interfaces) using MOAB (and pyMOAB).

...