-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjob_script.sh
More file actions
25 lines (21 loc) · 750 Bytes
/
job_script.sh
File metadata and controls
25 lines (21 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#SBATCH --job-name=streamjob
#SBATCH --output=streamjob.out
#SBATCH --error=streamjob.err
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=4
#SBATCH --gpus-per-task=1
#SBATCH --time=30
#SBATCH -C gpu
#SBATCH -A nstaff
#SBATCH -q regular
module load PrgEnv-nvidia
cd /pscratch/sd/m/mgawan/stream/BabelStream/build
JOBID=${SLURM_JOB_ID}
if [[ -z "$JOBID" ]]; then
echo "Error: JOBID is empty or invalid" >&2
exit 1
fi
mkdir -p ${JOBID}
# srun --ntasks-per-node=4 --gpus-per-task=1 bash -c 'node_name=$(hostname | tr -c "[:alnum:]" "_"); ./cuda-stream &> '${JOBID}'/${node_name}.out'
srun --ntasks-per-node=4 --gpus-per-task=1 bash -c 'node_name=$(hostname | tr -c "[:alnum:]" "_"); ./cuda-stream >> '${JOBID}'/${node_name}.out 2>&1'