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.
The following libraries are required to run LEAP:
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.
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