Skip to content

Instantly share code, notes, and snippets.

@steindev
Last active May 26, 2021 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steindev/a063a0a0ab61c5bed3352ef1f5e07962 to your computer and use it in GitHub Desktop.
Save steindev/a063a0a0ab61c5bed3352ef1f5e07962 to your computer and use it in GitHub Desktop.
SPOCK@ORNL: Install PIConGPU dependencies to run on the caar partition
#!/usr/bin/env bash
#
# Authors: Axel Huebl, Marco Garten, Klaus Steiniger
#
# last updated: 2021-05-26
PIC_BRANCH="dev"
# get PIConGPU profile
if [ ! -f "$PIC_PROFILE" ]; then
export PIC_PROFILE_NAME="$HOME/caar_picongpu.profile"
wget -O $PIC_PROFILE_NAME \
https://raw.githubusercontent.com/ComputationalRadiationPhysics/picongpu/dev/etc/picongpu/spock-ornl/caar_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"
mkdir -p $SOURCE_DIR
# ZLIB
if [ ! -d $ZLIB_ROOT ]; then
cd $SOURCE_DIR
wget -O zlib-1.2.11.tar.gz \
https://github.com/madler/zlib/archive/refs/tags/v1.2.11.tar.gz
tar -xf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure \
--prefix=$ZLIB_ROOT
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
# Splash
if [ ! -d "$Splash_ROOT" ]; then
cd $SOURCE_DIR
git clone -b dev https://github.com/ComputationalRadiationPhysics/libSplash.git \
$SOURCE_DIR/splash
mkdir $SOURCE_DIR/splash-build
cd $SOURCE_DIR/splash-build
cmake -DCMAKE_INSTALL_PREFIX=$Splash_ROOT $SOURCE_DIR/splash
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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment