Skip to content

Commit

Permalink
Frontier Mako
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Radhakrishnan committed Apr 5, 2024
1 parent 3e4b8fe commit e8d17e2
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
54 changes: 54 additions & 0 deletions toolchain/templates/frontier.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash

<%namespace name="helpers" file="helpers.mako"/>

% if engine == 'batch':
#SBATCH --nodes=${nodes}
#SBATCH --ntasks-per-node=${tasks_per_node}
#SBATCH --job-name="${name}"
#SBATCH --output="${name}.out"
#SBATCH --time=${walltime}
% if account:
#SBATCH --account=${account}
% endif
% if partition:
#SBATCH --partition=${partition}
% endif
% if quality_of_service:
#SBATCH --qos=${quality_of_service}
% endif
% if email:
#SBATCH --mail-user=${email}
#SBATCH --mail-type="BEGIN, END, FAIL"
% endif
% endif

${helpers.template_prologue()}

ok ":) Loading modules:\n"
cd "${MFC_ROOTDIR}"
% if engine == 'batch':
. ./mfc.sh load -c c -m ${'g' if gpu else 'c'}
% endif
cd - > /dev/null
echo

% for target in targets:
${helpers.run_prologue(target)}

% if not mpi:
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}")
% else:
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
srun -N ${nodes} \
-n ${tasks_per_node} \
${' '.join([f"'{x}'" for x in ARG('--') ])} \
"${target.get_install_binpath()}")
% endif

${helpers.run_epilogue(target)}

echo
% endfor

${helpers.template_epilogue()}
1 change: 1 addition & 0 deletions toolchain/templates/phoenix.mako
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ echo
% endfor

${helpers.template_epilogue()}

0 comments on commit e8d17e2

Please sign in to comment.