Skip to content

Instantly share code, notes, and snippets.

@ax3l
Last active May 13, 2019 14:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ax3l/68cb4caa597df3def9b01640959ea56b to your computer and use it in GitHub Desktop.
Save ax3l/68cb4caa597df3def9b01640959ea56b to your computer and use it in GitHub Desktop.
Piz Daint: PIConGPU 0.4.0-dev Quick-Start
#!/usr/bin/env bash
#
# Authors: Axel Huebl, Marco Garten, Klaus Steiniger
#
# last updated: 2019-05-13
#
# execute:
# wget -O - https://gist.githubusercontent.com/ax3l/68cb4caa597df3def9b01640959ea56b/raw/PIConGPU_040-dev_PizDaint.sh | bash
PIC_BRANCH="dev"
# get PIConGPU profile
if [ ! -f $SCRATCH/picongpu.profile ]; then
wget -O $SCRATCH/picongpu.profile \
https://raw.githubusercontent.com/ComputationalRadiationPhysics/picongpu/dev/etc/picongpu/pizdaint-cscs/picongpu.profile.example
fi
# load modules
source $SCRATCH/picongpu.profile
set -euf -o pipefail
# create temporary (24 hours) directory for software source files
mkdir -p /dev/shm/$(whoami)/src
export SOURCE_DIR=/dev/shm/$(whoami)/src
# create directory for picongpu code
mkdir -p $HOME/src
# zlib
if [ ! -d $ZLIB_ROOT ]; then
cd $SOURCE_DIR
wget -O zlib-1.2.11.tar.gz \
https://github.com/madler/zlib/archive/v1.2.11.tar.gz
tar -xf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure \
--prefix=$ZLIB_ROOT
make -j4
make install
fi
# libpng
if [ ! -d $PNG_ROOT ]; then
cd $SOURCE_DIR
wget -O libpng-1.6.34.tar.gz \
ftp://ftp-osl.osuosl.org/pub/libpng/src/libpng16/libpng-1.6.34.tar.gz
tar -xf libpng-1.6.34.tar.gz
cd libpng-1.6.34
CPPFLAGS=-I$ZLIB_ROOT/include LDFLAGS=-L$ZLIB_ROOT/lib \
./configure --enable-static --enable-shared \
--prefix=$PNG_ROOT
make -j4
make install
fi
# c-blosc
if [ ! -d $BLOSC_ROOT ]; then
cd $SOURCE_DIR
git clone -b v1.12.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 -j4
make install
fi
# Boost
if [ ! -d $BOOST_ROOT ]; then
cd $SOURCE_DIR
wget -O boost_1_65_1.tar.gz \
http://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.gz/download
tar -xf boost_1_65_1.tar.gz
cd boost_1_65_1
./bootstrap.sh --with-libraries=atomic,chrono,context,date_time,fiber,filesystem,math,program_options,regex,serialization,system,thread \
--prefix=$BOOST_ROOT
./b2 cxxflags="-std=c++11" -j4
./b2 install
fi
# ADIOS
if [ ! -d $ADIOS_ROOT ]; then
cd $SOURCE_DIR
wget https://users.nccs.gov/~pnorbert/adios-1.13.1.tar.gz
tar -xf adios-1.13.1.tar.gz
cd adios-1.13.1
CFLAGS="-fPIC" ./configure --enable-static --enable-shared \
--disable-fortran --with-mpi=$MPI_ROOT --with-zlib=$ZLIB_ROOT \
--with-blosc=$BLOSC_ROOT \
--prefix=$ADIOS_ROOT
make
make 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 install
fi
# Splash
if [ ! -d $Splash_DIR ]; then
git clone -b v1.7.0 https://github.com/ComputationalRadiationPhysics/libSplash.git \
$SOURCE_DIR/splash
mkdir $SOURCE_DIR/splash-build
cd $SOURCE_DIR/splash-build
cmake -DCMAKE_INSTALL_PREFIX=$Splash_DIR $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 $SCRATCH/picongpu.profile'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment