Building & Installing

MOAB uses an autoconf and libtool-based build process by default. The procedure used to build MOAB from scratch depends on whether the source code was obtained from a “tarball” or directly from the Subversion repository. Assuming the latter, the following steps should be executed for building and installing MOAB:

  • Locate and build any required dependencies. MOAB can be built with no dependencies on other libraries; this may be useful for applications only needing basic mesh representation and not needing to export mesh to formats implemented in other libraries. MOAB’s native save/restore capability is built on HDF5-based files; applications needing to save and restore files from MOAB reliably should use this library. MOAB also uses ExodusII, a netCDF-based file format developed at Sandia National Laboratories [10]. Applications needing to execute these tests should also build netCDF. Note that MOAB uses netCDF’s C++ interface, which is not enabled by default in netCDF but can be enabled using the “–enable-cxx” option to netCDF’s configure script.
  • Unpack source code into <moab>, and change current working directory to that location.
  • Execute “autoreconf –fi”.
  • Run configure script, by executing “./configure <options>”. Recommended options:
    1. –prefix=<install_dir>: directory below which MOAB library and include files will be installed; can either be the directory used for MOAB source (<moab> from step 1), or a different directory.
    2. –hdf5-dir=<hdf5_dir>: directory whose “include” and “lib” subdirectories hold HDF5 include and library, respectively. MOAB uses HDF5 for its native save/restore format (see Section 4.6.1).
    3. –netcdf-dir=: directory whose “include” and “lib” subdirectories hold netCDF include and library, respectively. MOAB uses netCDF-based files for many of its build tests. If the location of netCDF cannot be found, MOAB’s build tests will not function properly, but MOAB will still be usable.
  • Run “make check”; this runs a series of build tests, to verify that the MOAB build was successful. Note this check will fail if netCDF is not used, but MOAB itself will still be usable from applications.
  • Run “make install”; this copies include files and libraries to subdirectories of the directory specified in the “prefix” option.

These steps are sufficient for building MOAB against HDF5 and netCDF. By default, a small number of standard MOAB-based applications are also built, including mbconvert (a utility for reading and writing files), mbsize (for querying basic information about a mesh), and the iMesh interface (see Section 7). Other utilities can be enabled using various other options to the configure script; for a complete list of build options, execute “./configure –help”.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines