Skip to content

Instantly share code, notes, and snippets.

@erikzenker
Last active May 20, 2016 12:51
Show Gist options
  • Save erikzenker/93c24bdb2c00a22a6f54448dbe64a70d to your computer and use it in GitHub Desktop.
Save erikzenker/93c24bdb2c00a22a6f54448dbe64a70d to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# Create paths
cd ~
mkdir projects
cd projects
# Load modules
module purge
module load gcc/4.9.2
module load boost/1.60.0
module load cmake/3.3.0
module load cuda/7.0
module load openmpi/1.8.4.kepler.cuda70
module load pngwriter
# Clone PIConCupla
git clone https://github.com/psychocoderHPC/picongpu-alpaka.git
cd picongpu-alpaka
git checkout topic-cupla
cd ..
# Clone Alpaka
git clone https://github.com/psychocoderHPC/alpaka.git
cd alpaka
git checkout topic-picongpu-alpaka
cd ..
# Clone cupla
git clone https://github.com/psychocoderHPC/cupla.git
cd cupla
git checkout topic-dualAccelerators
git submodule init
git submodule update
cd ..
# Init run/build/paramsets
mkdir -p ~/projects/pic
mkdir -p ~/projects/pic/build
mkdir -p ~/projects/pic/paramSets
mkdir -p ~/projects/pic/runs
# Init environment
export PICSRc=~/projects/picongpu-alpaka
export CUPLA_ROOT=~/projects/cupla
export ALPAKA_ROOT=~/projects/alpaka
export PICHOME=~/projects/pic
export PATH=$PATH:$PICSRC/src/tools/bin
# Create paramesterset
$PICSRC/createParameterSet $PICSRC/examples/LaserWakefield/ $PICHOME/paramSets/lwa/case001
# Build make file
cd $PICHOME/build
$PICSRC/configure $PICHOME/paramSets/lwa/case001
# Set accelerator
ccmake .
# CMAKE_BUILD_TYPE: Release
# CMAKE_CXX_FLAGS: -ffast-math -march=native -funroll-loops -fopt-info-loop-optimized=vec.opt
# Build
make -j install
# Run PIC
cd $PICHOME/paramSets/lwa/case001
mpiexec -n4 ./bin/picongpu -d 4 1 1 -g 128 128 128 -s 100 --periodic 1 1 1 -p 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment