better frontier scripts

This commit is contained in:
Carl Pearson
2023-11-30 16:52:57 -05:00
parent 250862ffbe
commit dc7f9414d0
4 changed files with 83 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
**/kokkos-*
**/kernels-*
**/*_run
**/*_build

43
frontier/download.sh Executable file
View File

@@ -0,0 +1,43 @@
#! /bin/bash
set -eou pipefail
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/env.sh
LOG_DIR="$(date +"%Y%m%d_%H%M%S")_build"
export LOG_DIR
mkdir -p "$LOG_DIR"
git clone git@github.com:kokkos/kokkos.git "$KOKKOS_SRC" || true
(cd "$KOKKOS_SRC" && git checkout $KOKKOS_SHA) || true
git clone git@github.com:kokkos/kokkos-kernels.git "$KERNELS_SRC" || true
(cd "$KERNELS_SRC" && git checkout $KERNELS_SHA) || true
srun -n1 -t 1 module list |& tee "$LOG_DIR/module-list.log"
srun -n1 -t 1 lscpu |& tee "$LOG_DIR/lscpu.log"
srun -n1 -t 1 hostname |& tee "$LOG_DIR/hostname.log"
## Configure Kokkos
cmake -S "$KOKKOS_SRC" -B "$KOKKOS_BUILD" \
-DCMAKE_INSTALL_PREFIX="$KOKKOS_INSTALL" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=CC \
-DKokkos_ENABLE_HIP=ON \
-DKokkos_ARCH_NATIVE=ON \
-DKokkos_ARCH_AMD_GFX90A=ON
## Build & Install Kokkos
cmake --build "$KOKKOS_BUILD" -j "$(nproc)" -t install
## Configure Kernels
cmake -S "$KERNELS_SRC" -B "$KERNELS_BUILD" \
-DKokkos_DIR="$KOKKOS_INSTALL/lib64/cmake/Kokkos" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=CC \
-DKokkosKernels_ENABLE_TPL_ROCSPARSE=ON \
-DKokkosKernels_ENABLE_TPL_ROCBLAS=ON \
## Build Kernels
cmake --build "$KERNELS_BUILD" -j "$(nproc)"

12
frontier/env.sh Normal file
View File

@@ -0,0 +1,12 @@
export ROOT_DIR=/lustre/orion/csc465/scratch/cpearson/kug-2023
export KOKKOS_SHA=f8788ef2ae1940b627cc6ebc6abeef2c34e7e8dc # 2023 11 30
export KOKKOS_SRC="$ROOT_DIR/kokkos-${KOKKOS_SHA:0:8}"
export KOKKOS_BUILD="$ROOT_DIR/kokkos-build-${KOKKOS_SHA:0:8}"
export KOKKOS_INSTALL="$ROOT_DIR/kokkos-install-${KOKKOS_SHA:0:8}"
export KERNELS_SHA=a80eb9114ddda2d9454e4f3cc8a3dd5143ecdfc8 # 2023 11 30
export KERNELS_SRC="$ROOT_DIR/kernels-${KERNELS_SHA:0:8}"
export KERNELS_BUILD="$ROOT_DIR/kernels-build-${KERNELS_SHA:0:8}"
module load PrgEnv-amd

24
frontier/run.sh Executable file
View File

@@ -0,0 +1,24 @@
#! /bin/bash
#SBATCH -A csc465
#SBATCH -N 1
set -eou pipefail
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/env.sh
LOG_DIR="$(date +"%Y%m%d_%H%M%S")_run"
export LOG_DIR
mkdir -p "$LOG_DIR"
srun -n1 -t 1 /opt/rocm-5.7.0/bin/rocm-smi \
--showdriverversion \
--showproductname \
--showmclkrange \
-v \
--showsclkrange \
--showfwinfo \
|& tee "$LOG_DIR/rocm-smi.log" || true
srun -n1 -t 1 /opt/rocm-5.7.0/bin/rocminfo |& tee "$LOG_DIR/rocminfo.log" || true
srun -n1 -t 1 lscpu |& tee "$LOG_DIR/lscpu.log" || true
srun -n1 -t 1 hostname |& tee "$LOG_DIR/hostname.log" || true
srun -n1 -t 1 cat /proc/cpuinfo |& tee "$LOG_DIR/cpuinfo.log" || true