From 5b8a8f4f5c7f6f75addf7e0fa3931f53067cd6cf Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Fri, 6 Oct 2023 16:17:15 -0400 Subject: [PATCH] Frontier build/run scripts --- scripts/build.sh | 31 +++++++++++++++++++++++++++++++ scripts/run.sh | 24 ++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100755 scripts/build.sh create mode 100644 scripts/run.sh diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..89d4296 --- /dev/null +++ b/scripts/build.sh @@ -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 + diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100644 index 0000000..4abd0e5 --- /dev/null +++ b/scripts/run.sh @@ -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