Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:18

0001 #!/bin/bash
0002 
0003 #SBATCH -N 1  # number of nodes
0004 #SBATCH -p gpu
0005 #SBATCH --mem-per-cpu 8000 # MB
0006 #SBATCH --mail-type=END,FAIL
0007 #SBATCH --output=slurm_%j.out
0008 #SBATCH --job-name=jana_SubeventCUDAExample
0009 
0010 set -euxo pipefail
0011 
0012 source /etc/profile.d/modules.sh
0013 module use /apps/modulefiles
0014 module load cuda
0015 module unload gcc
0016 module load gcc/10.2.0
0017 
0018 which gcc
0019 which g++
0020 export CC=`which gcc`
0021 export CXX=`which g++`
0022 
0023 module unload cmake
0024 module load cmake/3.21.1
0025 which cmake
0026 
0027 pwd
0028 export WKDIR=${GITHUB_WORKSPACE}
0029 cd ${WKDIR}
0030 
0031 # config build
0032 mkdir -p $WKDIR/build
0033 mkdir -p $WKDIR/install
0034 export JANA_HOME=$WKDIR/install
0035 
0036 srun cmake -DUSE_CUDA=On -S . -B build
0037 
0038 # build
0039 srun cmake --build build -j 32 --target install
0040 
0041 # run
0042 echo "\n Launching SubeventCUDAExample for 1s..."
0043 srun ./install/bin/SubeventCUDAExample & \
0044   sleep 1  # exit effect