-
-
Save n01r/20dacc20987b75d1858db5261d5d0205 to your computer and use it in GitHub Desktop.
Piz Daint: PIConGPU 0.4.0-dev Quick-Start
This file contains hidden or 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 | |
| # | |
| # Author: Axel Huebl, Marco Garten | |
| # | |
| # last updated: 2018-02-26 | |
| # | |
| # execute: | |
| # wget -O - https://gist.githubusercontent.com/n01r/20dacc20987b75d1858db5261d5d0205/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=$HOME/lib/zlib-1.2.11 | |
| 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=$HOME/lib/libpng-1.6.34 | |
| 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=$HOME/lib/blosc-1.12.1 \ | |
| -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_62_0.tar.gz \ | |
| http://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.gz/download | |
| tar -xf boost_1_62_0.tar.gz | |
| cd boost_1_62_0 | |
| ./bootstrap.sh --with-libraries=atomic,chrono,context,date_time,fiber,filesystem,math,program_options,regex,serialization,system,thread \ | |
| --prefix=$HOME/lib/boost-1.62.0 | |
| ./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=$HOME/lib/adios-1.13.1 | |
| 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=$HOME/lib/pngwriter-0.7.0 \ | |
| $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=$HOME/lib/splash-1.7.0 $SOURCE_DIR/splash | |
| make install | |
| fi | |
| cd $HOME | |
| # get PIConGPU | |
| if [ ! -d $HOME/src/picongpu ]; then | |
| git clone -b $PIC_BRANCH https://github.com/ComputationalRadiationPhysics/picongpu.git \ | |
| $HOME/src/picongpu | |
| fi | |
| # message to user | |
| echo '' | |
| echo 'edit user & email within picongpu.profile, e.g. via:' | |
| echo ' vim $SCRATCH/picongpu.profile' |
Author
Author
Just updated from ADIOS 1.13.0 to 1.13.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script installs the software needed for PIConGPU into $HOME so that it can live persistently.
The typical user quota on Daint is unfortunately limited to only 100k files. So any additional Python environment, for instance, will exceed this quota.
Also note that this script puts all the source files into a temporary space that gets deleted in 24 hours.