This guide describes how to build SWIFT with the structure finding code called VELOCIraptor.
- Download SWIFT and VELOCIraptor
git clone git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git
git clone https://github.com/pelahi/VELOCIraptor-STF.git
- Build VELOCIraptor
This shows how to compile velociraptor with optimization on Cosma. Load modules:
module purge
module load intel_comp/2018 intel_mpi/2018
module load parallel_hdf5/1.10.3 gsl/2.4
module load cmake
Create the build directory
cd VELOCIraptor-STF
mkdir build
cd build
Configure with cmake and then compile
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -ipo -xAVX -DNDEBUG" \
-DCMAKE_C_FLAGS_RELEASE="-O3 -ipo -xAVX -DNDEBUG" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_C_COMPILER=icc \
-DCMAKE_CXX_COMPILER=icpc \
-DVR_USE_SWIFT_INTERFACE=ON
make
- Make sure that the
python
module is unloaded on COSMA5 as it causes problems when linking VELOCIraptor with SWIFT
- Build SWIFT
module purge
module load intel_comp/2018 intel_mpi/2018 fftw/3.3.7
module load parallel_hdf5/1.10.3 gsl/2.4 parmetis/4.0.3
module load gsl/2.4
./autogen.sh
./configure CC=icc CXX=icpc CFLAGS=-qopt-zmm-usage=high LDFLAGS="-cxxlib" \
--enable-ipo \
--with-hdf5 \
--with-fftw \
--with-parmetis \
--with-gsl \
--with-tbbmalloc \
--with-velociraptor=`pwd`/../VELOCIraptor-STF/build/src
Note: make sure that the same compiler, mpi, gsl and hdf5 modules are loaded that were used to build the VELOCIraptor library. VELOCIraptor is now compatible with parallel hdf5 because it only uses the C API.