Skip to content
Snippets Groups Projects
compiling_code.rst 3.44 KiB

Compiling SWIFT

Compilers

SWIFT is a C99 code, and as such requires a C compiler that is able to work with code built for that standard.

SWIFT has been tested with the Intel, GCC, LLVM (clang) C compilers.

We suggest:

  • Intel >= 2018
  • GCC >= 8.2.0
  • LLVM >= 7.0.0

We have specific issues with the following compilers:

  • GCC 7.3.0 with the -mskylake-avx512 flag.

Dependencies

To compile SWIFT, you will need the following libraries:

HDF5

Version 1.8.x or higher is required. Input and output files are stored as HDF5 and are compatible with the existing GADGET-2 specification. Please consider using a build of parallel-HDF5, as SWIFT can leverage this when writing and reading snapshots. We recommend using HDF5 > 1.10.x as this is vastly superior in parallel.

MPI

A recent implementation of MPI, such as Open MPI (v2.x or higher), is required, or any library that implements at least the MPI 3 standard.

Running SWIFT on OmniPath atchitechtures with Open MPI

When running SWIFT on an OmniPath system we suggest that Open MPI v3.1.3 or higher is used. A bug in the psm2 library causes communications to be lost. It is possible to run SWIFT with older versions (tested with v2.1.x) of Open MPI so long as psm is used instead of psm2, i.e. that you invoke mpirun with --mca btl vader,self -mca mtl psm.

Libtool

The build system depends on libtool.

FFTW

Version 3.3.x or higher is required for periodic gravity.

ParMETIS or METIS

One is required for domain decomposition and load balancing.

libNUMA

libNUMA is used to pin threads (but see INSTALL.swift).

GSL

The GSL is required for cosmological integration.

Optional Dependencies

There are also the following _optional_ dependencies.