#!/bin/bash
#SBATCH --job-name=DeviceQuery
#SBATCH --nodes=1
#SBATCH --partition=ampere
#SBATCH --gpus=2
#SBATCH --time=10:00

nvidia-smi

# load the required modules
module load gcc/14.2.0 cuda/12.8.1 cmake

cd cuda-samples-v13.1/Samples/1_Utilities/deviceQuery

# compile and run deviceQuery
mkdir build && cd build
cmake -DCMAKE_CUDA_COMPILER=$CUDA_HOME/bin/nvcc ..
make
./deviceQuery
