Last active
July 12, 2022 13:46
-
-
Save steindev/5a2ab0c4957a1e57ed671ac198b491c6 to your computer and use it in GitHub Desktop.
JUWELS@JSC: Install PIConGPU dependencies to run on the BOOSTER module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Authors: Axel Huebl, Marco Garten, Klaus Steiniger, Anton Lebedev | |
# | |
# last updated: 2022-06-13 | |
PIC_BRANCH="dev" | |
# get PIConGPU profile | |
if [ ! -f "$PIC_PROFILE" ]; then | |
export PIC_PROFILE_NAME="$HOME/booster_picongpu.profile" | |
wget -O $PIC_PROFILE_NAME \ | |
https://raw.githubusercontent.com/ComputationalRadiationPhysics/picongpu/dev/etc/picongpu/juwels-jsc/booster_picongpu.profile.example | |
# load modules | |
source "$PIC_PROFILE_NAME" | |
else | |
source "$PIC_PROFILE" | |
fi | |
set -euf -o pipefail | |
# create temporary directory for software source files | |
export SOURCE_DIR="$PROJECT/lib_temp_$USER" | |
mkdir -p $SOURCE_DIR | |
# c-blosc | |
if [ ! -d "$BLOSC_ROOT" ]; then | |
cd $SOURCE_DIR | |
git clone -b v1.21.1 https://github.com/Blosc/c-blosc.git \ | |
$SOURCE_DIR/c-blosc | |
mkdir c-blosc-build | |
cd c-blosc-build | |
cmake -DCMAKE_INSTALL_PREFIX=$BLOSC_ROOT \ | |
-DPREFER_EXTERNAL_ZLIB=ON \ | |
$SOURCE_DIR/c-blosc | |
make -j 10 install | |
fi | |
# PNGwriter | |
if [ ! -d "$PNGwriter_DIR" ]; then | |
cd $SOURCE_DIR | |
git clone -b 0.7.0 https://github.com/pngwriter/pngwriter.git \ | |
$SOURCE_DIR/pngwriter | |
mkdir pngwriter-build | |
cd pngwriter-build | |
cmake -DCMAKE_INSTALL_PREFIX=$PNGwriter_DIR \ | |
$SOURCE_DIR/pngwriter | |
make -j 10 install | |
fi | |
# ADIOS2 | |
if [ ! -d "$ADIOS2_ROOT" ]; then | |
cd $SOURCE_DIR | |
git clone -b v2.7.1.436 https://github.com/ornladios/ADIOS2.git \ | |
$SOURCE_DIR/adios2 | |
mkdir $SOURCE_DIR/adios2-build | |
cd $SOURCE_DIR/adios2-build | |
cmake $SOURCE_DIR/adios2 -DADIOS2_BUILD_EXAMPLES=OFF -DADIOS2_BUILD_TESTING=OFF \ | |
-DCMAKE_INSTALL_PREFIX="$ADIOS2_ROOT" -DADIOS2_USE_Fortran=OFF \ | |
-DADIOS2_USE_BZip2=OFF -DADIOS2_USE_PNG=OFF \ | |
-DADIOS2_USE_Python=OFF | |
make -j 10 install | |
fi | |
# openPMD-api | |
if [ ! -d "OPENPMD_ROOT" ]; then | |
cd $SOURCE_DIR | |
git clone -b 0.14.4 https://github.com/openPMD/openPMD-api.git \ | |
$SOURCE_DIR/openpmd-api | |
mkdir $SOURCE_DIR/openpmd-api-build | |
cd $SOURCE_DIR/openpmd-api-build | |
cmake $SOURCE_DIR/openpmd-api \ | |
-DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF \ | |
-DopenPMD_USE_PYTHON=ON \ | |
-DCMAKE_INSTALL_PREFIX="$OPENPMD_ROOT" | |
make -j 10 install | |
fi | |
cd $HOME | |
# get PIConGPU | |
if [ ! -d "$PICSRC" ]; then | |
git clone -b $PIC_BRANCH https://github.com/ComputationalRadiationPhysics/picongpu.git \ | |
"$PICSRC" | |
fi | |
# message to user | |
echo '' | |
echo 'edit user & email within picongpu.profile, e.g. via:' | |
echo ' vim $PIC_PROFILE' | |
echo 'delete temporary folder for library compilation' | |
printf " rm -rf %s\n" $SOURCE_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment