Frontier build/run scripts

This commit is contained in:
Carl Pearson
2023-10-06 16:17:15 -04:00
parent f0317af1dd
commit 5b8a8f4f5c
2 changed files with 55 additions and 0 deletions

31
scripts/build.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
set -eou pipefail
# export ROOT=/lustre/orion/CSC465/scratch/cpearson/frontier-gpu-bandwidth
export ROOT=$HOME/frontier-gpu-bandwidth
export SCOPE_SRC=${ROOT}/comm_scope
export SCOPE_BUILD=${ROOT}/build
git clone --recursive git@github.com:c3sr/comm_scope.git $SCOPE_SRC || true
cd $SCOPE_SRC && git checkout d744349
module load PrgEnv-amd/8.3.3
rm -rf $SCOPE_BUILD
mkdir -p $SCOPE_BUILD
module list > $SCOPE_BUILD/modules.txt 2>&1
env > $SCOPE_BUILD/env.txt
cmake \
-S $SCOPE_SRC \
-B $SCOPE_BUILD \
-D CMAKE_CXX_COMPILER=hipcc \
-D CMAKE_BUILD_TYPE=Release \
-D SCOPE_ARCH_MI250X=ON \
-D SCOPE_USE_NUMA=ON \
-D CMAKE_CXX_FLAGS="--amdgpu-target=gfx90a:xnack+" \
| tee $SCOPE_BUILD/configure.log 2>&1
nice -n20 make -C ${SCOPE_BUILD} -j16 \
| tee ${SCOPE_BUILD}/build.log 2>&1

24
scripts/run.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
#SBATCH -A CSC465
#SBATCH -J frontier-gpu-bandwidth
#SBATCH -o %x-%j.out
#SBATCH -t 1:00:00
#SBATCH -p batch
#SBATCH -N 1
# export ROOT=/lustre/orion/CSC465/scratch/cpearson/frontier-gpu-bandwidth
export ROOT=$HOME/frontier-gpu-bandwidth
export SCOPE_SRC=${ROOT}/comm_scope
export SCOPE_BUILD=${ROOT}/build
export SCOPE_RESULTS=${ROOT}/run
module load PrgEnv-amd/8.3.3
export HSA_XNACK=1
mkdir -p $SCOPE_RESULTS
module list > $SCOPE_RESULTS/modules.$SLURM_JOBID.txt 2>&1
env > $SCOPE_RESULTS/env.$SLURM_JOBID.txt
srun -c 56 -n 1 --gpus 8 $SCOPE_BUILD/comm_scope \
--benchmark_list_tests