Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions testcases/conus_12-km/setup_rundir_WRF.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ cp ${scriptdir}/namelist_v4.5.2_conus12km_restart.input ${rundir}/namelist.input
#copy sbatch script
cp ${scriptdir}/sub_wrf_pm_testcase.sh ${rundir}/sub_testcase.sh
cp ${scriptdir}/updown.sh ${rundir}/updown.sh
cp ${scriptdir}/wrapper-ncu.sh ${rundir}/wrapper-ncu.sh

#edit the email address and job name in the sbatch script
sed -i "s/elvis@nersc.gov/${myemail}/" sub_testcase.sh
Expand Down
4 changes: 3 additions & 1 deletion testcases/conus_12-km/sub_wrf_pm_testcase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ if [[ $use_gpu -eq 0 ]]; then
srun -n $n -c $c --cpu-bind=cores /global/common/software/m4232/pm/v4.5.2/wrf.exe
else
(( c = (64 / (n / SLURM_JOB_NUM_NODES)) * 2 ))
srun -n $n -c $c --cpu-bind=cores --gpus-per-task=1 -gpu-bind=none /global/common/software/m4232/pm/v4.5.2/wrf.exe
srun -n $n -c $c --cpu-bind=cores --gpus-per-task=1 --gpu-bind=none /global/common/software/m4232/pm/v4.5.2/wrf.exe
# Profile with Nsight Compute:
srun -n $n -c $c --cpu_bind=cores --gpus-per-task=1 --gpu-bind=none ./wrapper-ncu.sh /global/common/software/m4232/pm/v4.5.2/wrf.exe
fi

#capture error code
Expand Down
10 changes: 10 additions & 0 deletions testcases/conus_12-km/wrapper-ncu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
output=report.%q{SLURM_PROCID}.%q{SLURM_JOBID}

if [[ ${SLURM_PROCID} == "0" ]] ; then
dcgmi profile --pause
ncu --target-processes all --kernel-id :::1 -o ${output} "$@"
dcgmi profile --resume
else
"$@"
fi