Skip to content

Commit 3c79d48

Browse files
author
Daniel Vickers
committed
make file to no longer require using -b
1 parent dafe5d8 commit 3c79d48

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
3+
<%namespace name="helpers" file="helpers.mako"/>
4+
5+
% if engine == 'batch':
6+
#SBATCH --nodes=${nodes}
7+
#SBATCH --ntasks-per-node=${tasks_per_node}
8+
#SBATCH --job-name="${name}"
9+
#SBATCH --output="${name}.out"
10+
#SBATCH --time=${walltime}
11+
#SBATCH --cpus-per-task=7
12+
% if gpu:
13+
#SBATCH --gpus-per-task=1
14+
#SBATCH --gpu-bind=closest
15+
% endif
16+
% if account:
17+
#SBATCH --account=${account}
18+
% endif
19+
% if partition:
20+
#SBATCH --partition=${partition}
21+
% else:
22+
#SBATCH --partition=hpg-b200
23+
% endif
24+
% if quality_of_service:
25+
#SBATCH --qos=${quality_of_service}
26+
% endif
27+
% if email:
28+
#SBATCH --mail-user=${email}
29+
#SBATCH --mail-type="BEGIN, END, FAIL"
30+
% endif
31+
% endif
32+
33+
${helpers.template_prologue()}
34+
35+
ok ":) Loading modules:\n"
36+
cd "${MFC_ROOT_DIR}"
37+
% if engine == 'batch':
38+
. ./mfc.sh load -c h -m ${'g' if gpu else 'c'}
39+
% endif
40+
cd - > /dev/null
41+
echo
42+
43+
44+
% for target in targets:
45+
${helpers.run_prologue(target)}
46+
47+
% if not mpi:
48+
(set -x; ${profiler} "${target.get_install_binpath(case)}")
49+
% else:
50+
(set -x; ${profiler} \
51+
mpirun -np ${nodes*tasks_per_node} \
52+
--bind-to none \
53+
"${target.get_install_binpath(case)}")
54+
% endif
55+
56+
${helpers.run_epilogue(target)}
57+
58+
echo
59+
% endfor
60+
61+
${helpers.template_epilogue()}

0 commit comments

Comments
 (0)