Versions Compared

Key

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

...

MOAB will be pre-built and installed on officially supported machines.

Building MOAB library with TPL dependencies needed for E3SM

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)

There are several option dependencies for MOAB that are required for MOAB-in-E3SM. Features and tools get automatically built and enabled based on the dependencies when configuring the MOAB library.

  • MPI: MOAB supports both MPICH- and OpenMPI-based libraries configured externally to enable scalable mesh manipulation algorithms. You will need thisNeeded for MOAB-coupler.HDF5: To manage the data dependencies and to natively support parallel I/O, MOAB uses a native HDF5-based file format to represent the entire MOAB data model. If MPI is enabled, HDF5 should be built with parallel support. Currently this is not optional.

  • To run E3SM, you built one or both of NetCDF and Parallel-Netcdf.

  • NetCDF: MOAB library optionally depends on the NetCDF libraries (C) to compile the ExodusII reader/writer. NetCDF is also required to process NetCDF4 format nc files for E3SM. If MPI is enabled, then the underlying HDF5 dependency for NetCDF should have parallel support i.e., serial HDF5 dependency will not pass configuration checks. If you built it for E3SM, use that one.

  • Parallel-NetCDF: MOAB library optionally depends on the parallel-NetCDF (pnetcdf) libraries to compile the support for parallel reader and writer of NetCDF meshes and linear map weight files. This is a required dependency to enable parallel I/O of MPAS, SCRIP, ESMF, and Exodus meshes. Use the same one you built for E3SM.Metis/ParMetis: MOAB can optionally use the Metis or ParMetis library for partitioning mesh files in an offline form through the mbpart tool. This may be useful to pre-partition the mesh apriori in offline remapping workflows. You don’t need this for E3SM.

  • Zoltan: Support for both offline and 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. If reading parallel h5m files, we recommend using the offline partitioning tool with mbpart with -z RCB to use the Recursive Bisection geometric partitioner implementation in Zoltan. This is required for E3SM’s moab coupler.

  • TempestRemap: Provides support for both offline and online remapping of Climate field data on unstructured spherical meshes. Required dependency for all E3SM workflows.

  • Eigen3: A substitute for BLAS/LAPACK interfaces. However, if TempestRemap tools are to be built, this becomes a required dependency Required with TempestRemap as we store the SparseMatrix internally on every task using the Eigen3 data-structures.

Optional dependencies (not needed to run the default moab coupler)

  • Metis/ParMetis: MOAB can optionally use the Metis or ParMetis library for partitioning mesh files in an offline form through the mbpart tool. This may be useful to pre-partition the mesh apriori in offline remapping workflows.

Configuring and building MOAB from source

...

  • Run autoreconf -fi to generate the configure script

  • Run ./configure --help script in the MOAB source directory to see the list of configure options

  • Use --prefix=INSTALL_DIR to specify installation directory for MOABUse

(Below use the same compiler

...

and mpi and I/O libraries you have set up for E3SM. If you have mutiple compiler-mpi options, you would need to build MOAB for each.)

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

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

  • If you have HDF5, NetCDF, PNetCDF installed, use --with-hdf5=$HDF5_DIR --with-netcdf=$NETCDF_DIR --with-pnetcdf=$PNETCDF_DIR to specify these external dependencies.

  • Similarly for Metis or ParMetis dependencies, use --with-metis=$METIS_DIR and --with-parmetis=$PARMETIS_DIR respectively

  • If you have Zoltan installed, use --with-zoltan=$ZOLTAN_DIR

  • If you have TempestRemap pre-installed, 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).

  • Now 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 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 

...