Getting Started

  • Mohamed Houssem Kasbaoui

Getting Started

To get started with LEAP you need to have a modern Fortran compiler that supports Fortran 2018 features, such as Gfortran 13x and higher, and follow the instructions below to get third-party libraries and compile the code.

Getting Third-Party Libraries

The following libraries are required to run LEAP:

  • An MPI distribution (recommended OpenMPI): This library handles the distributed memory aspects and allows the code to run in parallel on large computing systems.
  • HDF5: This library provides a file format (hdf5) that is widely used for scientific data. It is designed to be scalable, and optimizes IO on distributed systems. There is a nice little tool called HDF View that provides a GUI to look into the meta data in the file. A command line tool, h5dump, can give more information. Data produced with HDF5 can also be viewed in VisIt/ParaVeiw.
  • SZIP: A compression library from the HDF group used by HDF5.
  • ZLIB: Another compression library used by HDF5.
  • SILO: A file format for point, structured, and unstructured meshes developed by the Lawrence Livermore National Laboratory.
  • HYPRE: Scalable linear solvers and multigrid methods developed by the Lawrence Livermore National Laboratory
  • FFTW: A ****library that performs efficient Fast Fourier Transforms.

You may download these libraries from their developer websites and follow their compilation instructions. In general, it is best to use the latest version available.

Compiling LEAP

After getting the third-party libraries, you may now compile LEAP. Go to /path/to/leap/src and run the following commands:

cd /path/to/leap

# Type this command if compiling from source codes downloaded from Bitbucket.
# This is not required if using a distribution file.
autoreconf -fi

# Configure the package (replace mpifort with your actual mpi fortran compiler).
./configure FC=mpifort                         \
  --prefix="/path/to/leap/installation/folder" \
  --with-szip=/path/to/szip/                   \
  --with-zlib=/path/to/zlib/                   \
  --with-hdf5=/path/to/hdf5/                   \
  --with-silo=/path/to/silo/                   \
  --with-fftw=/path/to/fftw/                   \
  --with-hypre=/path/to/hypre/

# Compile and install LEAP
make
make install

# (Optional) Compile and install examples
make examples
make install-examples

This will compile LEAP in production mode (with optimization) and double-precision. To enable debug flags and/or single-precision, you may add --enable-debug and --enable-single-precision to the configure command. Note that the code runs significantly faster when compiled in production mode.

If for any reason you need to restart from a clean slate, you can delete all compilation files with the following

make clean

LEAP also has a number of tests. If you would like to compile those too run the following

# (Optional) Compile and run the test-suite
make check