From 3179be7968e5e1f1c729702be700793d1bc4b352 Mon Sep 17 00:00:00 2001 From: jaguilar Date: Thu, 9 Apr 2026 14:28:33 -0400 Subject: [PATCH] Fix tuo mako file to support cpu build and batch scripts. Switched "gpu" to "gpu_enabled" so that the batch script is properly made when running on CPU and GPU. With just "gpu", it defaults to always being gpu. --- toolchain/templates/tuo.mako | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolchain/templates/tuo.mako b/toolchain/templates/tuo.mako index 846757d3cd..1b3247675e 100644 --- a/toolchain/templates/tuo.mako +++ b/toolchain/templates/tuo.mako @@ -24,12 +24,12 @@ ${helpers.template_prologue()} ok ":) Loading modules:\n" cd "${MFC_ROOT_DIR}" % if engine == 'batch': -. ./mfc.sh load -c tuo -m ${'g' if gpu else 'c'} +. ./mfc.sh load -c tuo -m ${'g' if gpu_enabled else 'c'} % endif cd - > /dev/null echo -% if gpu: +% if gpu_enabled: export MPICH_GPU_SUPPORT_ENABLED=1 % else: export MPICH_GPU_SUPPORT_ENABLED=0 @@ -46,7 +46,7 @@ export HSA_XNACK=0 (set -x; flux run \ --nodes=${nodes} --ntasks=${tasks_per_node * nodes} \ -o spindle.level=off --exclusive \ - % if gpu: + % if gpu_enabled: --gpus-per-task 1 \ % endif ${profiler} "${target.get_install_binpath(case)}")