Required and Optional Third-Party Libraries
General notes
- Many of the required libraries may already be available on your system, or could be installed using a package manager. It is generally possible to use system installations of serial libraries used by IBAMR (Boost, Eigen, HDF5, Silo, and muParser) when such installations are available.
- It is also possible to use system MPI installations when available.
- A Fortran compiler (e.g.,
gfortran
) is required to build IBAMR. - Use the same C, C++, and Fortran compilers to build all of the required libraries.
- Third-party libraries that require MPI (PETSc, hypre,
libMesh
, and SAMRAI), as well as IBAMR, must use the same MPI implementation. - SAMRAI must be patched to work properly with IBAMR. See instructions below.
- SAMRAI must be configured with the flag
--enable-implicit-template-instantiation
. - Debugging builds should be used when developing new models or code. Use optimized builds of PETSc, SAMRAI, and IBAMR only for production runs (i.e., after all model or method development work has been completed).
Before starting
- Determine which C, C++, and Fortran compilers are available on your
system. Development on IBAMR is carried out primarily using GCC (
gcc
,g++
, andgfortran
) and Clang (clang
andclang++
along withgfortran
). - Determine whether the BLAS and LAPACK libraries have been installed on your system. Prefer to use an optimized system-supplied BLAS/LAPACK library when possible. Non-optimized BLAS/LAPACK libraries can also be installed and built automatically by the PETSc configuration script.
- Determine whether MPI is installed on your system. Prefer to use a system-supplied MPI implementation when possible; otherwise, MPICH2 can be installed and built automatically by the PETSc configuration script.
Plan of attack
Where possible, use a package manager to install available third-party libraries.
First, download and install the serial libraries:
- HDF5, a general purpose library and file format for storing scientific data,
- Silo, a general purpose library and file format for storing scientific data for visualization and post-processing, and
- Boost, a collection of C++ standard libraries.
The build process for HDF5 and Silo follows the configure
, make
, make
install
paradigm. Boost does not need to be installed and can simply be
unpacked in place. IBAMR generally supports the latest versions of HDF5, Silo,
and Boost, although earlier versions are likely to work.
Next, download and install PETSc.
Instructions on building PETSc are available from:
http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html. PETSc’s
build system can also automatically install MPI, BLAS/LAPACK, and hypre. If
you have PETSc build hypre, PETSc will install hypre in the directory
$PETSC_DIR/$PETSC_ARCH
. IBAMR is currently used and tested with PETSc 3.13.X
and 3.17.X.
Next, if you do not have PETSc build hypre, download and install hypre. IBAMR generally supports the latest versions hypre (currently version 2.27.0), although earlier versions are likely to work.
Finally, download SAMRAI. IBAMR uses SAMRAI 2.4.4. Before building SAMRAI, it is necessary to patch SAMRAI using the patch file ibamr-samrai-fixes.patch: To unpack and patch SAMRAI, do:
tar xvfz /path/to/SAMRAI-v2.4.4.tar.gz
tar xvfz /path/to/SAMRAI-docs-v2.4.4.tar.gz
cd SAMRAI
./source/scripts/includes --link
patch -p1 </path/to/samrai-2.4.4-patch-ibamr-0.13.0.patch
Next, configure and build SAMRAI. SAMRAI must be configured with the flag
--enable-implicit-template-instantiation
. SAMRAI also must be directed to
link with your HDF5 installation; linking with other packages is optional.
Getting help
If you experience difficulties building any of the required third-party libraries, please attempt to contact the maintainers of those libraries, or request help through the IBAMR Users or IBAMR Developers Google Groups.