SIGMA

Scalable Interfaces for Geometry and Mesh based Applications

Building MOAB-TempestRemap for E3SM

Posted by in E3SM, MOAB

MOAB-TempestRemap Pre-installed

MOAB comes pre-built as part of a conda-forge MOAB package to test and experiment with the capabilities. This is also useful for linking against MOAB built with TempestRemap for E3SM as the build is consistent with all TPLs available with MPI enabled or disabled. For a more extensive TPL support in Conda, use the E3SM-Unified conda package.

Optional Dependencies

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

  • MPI: MOAB supports usage of MPICH and OpenMPI libraries configured externally in order to enable scalable mesh manipulation algorithms.
  • HDF5: In order to manage the data dependencies and to natively support parallel I/O, MOAB uses a custom file format that can represent the entire MOAB data model in a native HDF5-based file format.
  • NetCDF: MOAB library optionally depends on the NetCDF libraries (C) to compile the ExodusII reader/writer.
  • 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.
  • Metis/ParMetis: MOAB can optionally use the Metis or ParMetis library for partitioning mesh files in an offline form through the mbpart tool.
  • 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 options (PARTITION_METHOD=RCBZOLTAN;)
  • TempestRemap: Provide support for both offline and online remapping of Climate field data on unstructured spherical meshes
  • Eigen3: A substitute for BLAS/LAPACK interfaces. However if TempestRemap tools are to be built, this becomes a required dependency as we store the SparseMatrix internally on every task using Eigen3 datastructures

Configuration and building from source

First, clone the sources from the repository using the command

git clone https://bitbucket.org/fathomteam/moab.git

Currently, both CMake and Autotools are maintained simultaneously in order to support all platforms (including Windows). Please choose your build system according to your needs and follow instructions below. Both of these workflows follow the same pattern of commands to build and install in your platform. Note that the autotools workflow may get deprecated in the future.

Autotools based configuration workflow

  • Please ensure that the autotools toolchain is pre-installed locally. We recommend a minimum autoconf version of v2.69.
  • Run autoreconf -fi to generate the configure script
  • Run the configure --help script in the top source directory to see a list of available configure options.
    • Use --prefix=INSTALL_DIR to specify installation directory
    • Override default compilers with environment or user options: CC, CXX, FC, F77
    • If you have MPI installed, 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 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 master branch pre-installed, then use --with-tempestremap=$TEMPESTREMAP_DIR during configuration, or 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 Git master)
  • Now run the configure script with desired configuration options either in-source or out-of-source (build) directory.

Once configuration with either autotools or the CMake workflow is complete in the build directory, run the following to build the library:

  • Compile MOAB and supported tools: make -j4
  • Verify configuration and build setup: make check

Next to install the compiled libraries, headers and tools, run: make install

  • You can now use the makefile generated under the build/examples folder and modify it to compile downstream code with MOAB dependency

Submit a Comment


Copyright © 2014--2023 SIGMA. All Rights Reserved.