Skip to content

Commit dd460d7

Browse files
committed
feat: add ACES batch template and fix build_intel_gpu.sh to include pre_process
1 parent 4cd3df0 commit dd460d7

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

build_intel_gpu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ export CARGO_HOME=/scratch/user/u.sb27915/.cargo
1717
export PATH=$CARGO_HOME/bin:$PATH
1818

1919
cd /scratch/user/u.sb27915/MFC-intel
20-
./mfc.sh build -t simulation --gpu mp --intel-aot -j 8
20+
./mfc.sh build -t pre_process simulation --gpu mp --intel-aot -j 8

toolchain/templates/aces.mako

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 --cpus-per-task=1
9+
#SBATCH --job-name="${name}"
10+
#SBATCH --time=${walltime}
11+
% if partition:
12+
#SBATCH --partition=${partition}
13+
% else:
14+
#SBATCH --partition=pvc
15+
% endif
16+
% if account:
17+
#SBATCH --account="${account}"
18+
% endif
19+
% if gpu_enabled:
20+
#SBATCH --gres=gpu:pvc:${tasks_per_node}
21+
#SBATCH --mem=32G
22+
% endif
23+
#SBATCH --output="${name}.out"
24+
#SBATCH --error="${name}.err"
25+
% if email:
26+
#SBATCH --mail-user=${email}
27+
#SBATCH --mail-type="BEGIN, END, FAIL"
28+
% endif
29+
% endif
30+
31+
${helpers.template_prologue()}
32+
33+
ok ":) Loading modules:\n"
34+
cd "${MFC_ROOT_DIR}"
35+
. ./mfc.sh load -c aces -m ${'g' if gpu_enabled else 'c'}
36+
cd - > /dev/null
37+
echo
38+
39+
% for target in targets:
40+
${helpers.run_prologue(target)}
41+
42+
% if not mpi:
43+
(set -x; ${profiler} "${target.get_install_binpath(case)}")
44+
% else:
45+
(set -x; ${profiler} \
46+
mpirun -np ${nodes*tasks_per_node} \
47+
"${target.get_install_binpath(case)}")
48+
% endif
49+
50+
${helpers.run_epilogue(target)}
51+
52+
echo
53+
% endfor
54+
55+
${helpers.template_epilogue()}

0 commit comments

Comments
 (0)