Skip to content

Building

Ben Baker edited this page Jan 5, 2018 · 3 revisions

Dependencies

Required

Before compiling the following dependencies must be met

  1. CMake
  2. A valid C11 compiler
  3. A valid Fortran2003 compiler
  4. Intel's Math Kernel Library which will be necessary to perform the interpolation.
  5. Intel's Performance Primitives.
  6. HDF5 for archiving outputs. This will likely require zlib.
  7. IniParser for parsing initialization files.

Optional

  1. visit_writer A light-weight utility for writing VTK files (an alternative to HDF5 + XDMF).
  2. If the goal is to compute travel-times in the CVM model then one option would be to use fteik. This will in-turn require MPI.

Configuring CMake

I typically feed directly to CMake the requisite dependency information via a script. One such example of building with the Intel compilers would be config_intel.sh

#!/bin/sh
export CC=/opt/intel/bin/icc
export Fortran=/opt/intel/bin/ifort
/usr/bin/cmake ./ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=./ \
-DCMAKE_C_FLAGS="-g3 -O2 -fopenmp -Wall -Wextra -Wcomment -Wcheck" \
-DMKL_LIBRARY="/opt/intel/mkl/lib/intel64_lin/libmkl_intel_lp64.so;/opt/intel/mkl/lib/intel64_lin/libmkl_sequential.so;/opt/intel/mkl/lib/intel64_lin/libmkl_core.so" \
-DIPP_LIBRARY="/opt/intel/ipp/lib/intel64_lin/libipps.so;/opt/intel/ipp/lib/intel64_lin/libippvm.so;/opt/intel/ipp/lib/intel64_lin/libippcore.so" \
-DISCL_LIBRARY=/home/bakerb25/C/libiscl/lib/libiscl_shared.so \
-DISCL_INCLUDE_DIR=/home/bakerb25/C/libiscl/include \
-DH5_C_INCLUDE_DIR=/home/bakerb25/C/hdf5-1.10.1_intel/include \
-DH5_C_LIBRARY=/home/bakerb25/C/hdf5-1.10.1_intel/lib/libhdf5.so \
-DINIPARSER_INCLUDE_DIR=/home/bakerb25/C/iniparser/src \
-DINIPARSER_LIBRARY=/home/bakerb25/C/iniparser/libiniparser.a \
-DUSE_FTEIK=TRUE \
-DFTEIK_INCLUDE_DIR=/home/bakerb25/C/fteik/include \
-DXML2_LIBRARY=/usr/lib/x86_64-linux-gnu/libxml2.so \
-DFTEIK_LIBRARY=/home/bakerb25/C/fteik/lib/libfteik_shared.so \
-DMPI_C_LIBRARIES=/opt/intel/impi/2018.0.128/lib64/libmpi.so \
-DMPI_Fortran_LIBRARIES=/opt/intel/impi/2018.0.128/lib64/libmpifort.so \
-DUSE_VISIT_WRITER=TRUE \
-DVISIT_INCLUDE_DIR=/home/bakerb25/C/VisIt \
-DVISIT_LIBRARY=/home/bakerb25/C/VisIt/libvisit.a

In the source root directory one can then configure by specifying

./config_intel.sh

And dealing with any errors.

Building

After configuring CMake one can build the libraries by specifying

make

in the root source directory.

Clone this wiki locally