... | ... | @@ -10,59 +10,53 @@ git clone https://github.com/pelahi/VELOCIraptor-STF.git |
|
|
|
|
|
2. Build VELOCIraptor
|
|
|
---------------------
|
|
|
* Make sure that the `python` module is unloaded on COSMA5 as it causes problems when linking VELOCIraptor with SWIFT
|
|
|
* Checkout the `swift-interface` branch:
|
|
|
|
|
|
```
|
|
|
git checkout swift-interface
|
|
|
```
|
|
|
|
|
|
* Create a `Makefile.config` file from the template: `Makefile.config.template` and choose which build you would like e.g. compiler, MPI, OpenMP
|
|
|
* Example `Makefile.config` for COSMA7: [Makefile_VELOCIraptor_COSMA7.config](/uploads/a73ae325158c2a3ffab2f8712864b584/Makefile_VELOCIraptor_COSMA7.config)
|
|
|
* Make sure that the following flags are set:
|
|
|
|
|
|
```
|
|
|
SINGLEPRECISION="off"
|
|
|
NOMASS="off"
|
|
|
SINGLEPARTICLEPRECISION="off"
|
|
|
ADIOSENABLE="off"
|
|
|
SWIFTINTERFACE="on"
|
|
|
```
|
|
|
|
|
|
* Set the `GSL` and `HDF5` directories:
|
|
|
|
|
|
This shows how to compile velociraptor with optimization on Cosma. Load modules:
|
|
|
```
|
|
|
GSL_DIR = /cosma/local/gsl/c4/intel_2017/2.3
|
|
|
...
|
|
|
HDF_DIR = /cosma/local/hdf5//c5/intel_2017/1.8.18
|
|
|
module purge
|
|
|
module load intel_comp/2018 intel_mpi/2018
|
|
|
module load parallel_hdf5/1.10.3 gsl/2.4
|
|
|
module load cmake
|
|
|
```
|
|
|
Note: the versions of the libraries used for `GSL` and `HDF5` have to match what SWIFT is built with.
|
|
|
|
|
|
If the version of HDF5 is older than 1.10, comment-out the line
|
|
|
Create the build directory
|
|
|
```
|
|
|
C+FLAGS+= -DHDF5_NEWER_THAN_1_10_0
|
|
|
cd VELOCIraptor-STF
|
|
|
mkdir build
|
|
|
cd build
|
|
|
```
|
|
|
in the i/o section.
|
|
|
|
|
|
* Make sure that a C++ compiler module is loaded and set the compiler to:
|
|
|
|
|
|
Configure with cmake and then compile
|
|
|
```
|
|
|
C+ = mpiCC
|
|
|
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
|
|
|
```
|
|
|
|
|
|
* Build VELOCIraptor library with:
|
|
|
|
|
|
```
|
|
|
make lib; make libstf
|
|
|
```
|
|
|
this should create a libstf.a file in lib/
|
|
|
* Make sure that the `python` module is unloaded on COSMA5 as it causes problems when linking VELOCIraptor with SWIFT
|
|
|
|
|
|
3. Build SWIFT
|
|
|
--------------
|
|
|
* Run `autogen.sh`
|
|
|
* Configure SWIFT so that the path to `libstf.a` is known:
|
|
|
|
|
|
```
|
|
|
./configure --with-velociraptor=/cosma7/data/dp004/dc-will2/VELOCIraptor-STF/stf/lib/
|
|
|
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 jemalloc/5.1.0
|
|
|
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 modules are loaded for the `GSL` and `HDF5` libraries that were used to build the VELOCIraptor library. Also note that the parallel version of HDF5 does not support the C++ interface. |
|
|
\ No newline at end of file |
|
|
|
|
|
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. |
|
|
\ No newline at end of file |