Skip to content

Instantly share code, notes, and snippets.

@steindev
Last active July 12, 2022 13:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steindev/86df43bef49586e2b33d2fb0a372f09c to your computer and use it in GitHub Desktop.
Save steindev/86df43bef49586e2b33d2fb0a372f09c to your computer and use it in GitHub Desktop.
taurus@TUD: Install PIConGPU dependencies to run on the partition
#!/usr/bin/env bash
#
# Authors: Axel Huebl, Marco Garten, Klaus Steiniger
#
# last updated: 2021-08-18
# It is advisable to compile libraries on an interactive node
# > srun -p gpu2-interactive --gres=gpu:0 --ntasks=1 --pty --mem=8G -t 2:00:00 bash # get resources on a node
# > ./PIConGPU_0.6.0-dev_taurus-tud.sh | tee lib_inst.out 2>lib_inst.err # compile libraries
PIC_BRANCH="dev"
# get PIConGPU profile
if [ ! -f "$PIC_PROFILE" ]; then
export PIC_PROFILE_NAME="$HOME/k80_picongpu.profile"
wget -O $PIC_PROFILE_NAME \
https://raw.githubusercontent.com/ComputationalRadiationPhysics/picongpu/dev/etc/picongpu/taurus-tud/k80_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="$HOME/lib_temp"
mkdir -p $SOURCE_DIR
# c-blosc
if [ ! -d "$BLOSC_ROOT" ]; then
cd $SOURCE_DIR
git clone -b v1.21.0 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 install
fi
# PNGwriter
if [ ! -d "$PNGwriter_ROOT" ]; 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_ROOT \
$SOURCE_DIR/pngwriter
make install
fi
# ADIOS2
if [ ! -d "$ADIOS2_ROOT" ]; then
cd $SOURCE_DIR
git clone -b v2.7.1 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 install
fi
# openPMD-api
if [ ! -d "OPENPMD_ROOT" ]; then
cd $SOURCE_DIR
git clone -b 0.14.1 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 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