Skip to content

Commit 64e514c

Browse files
authored
mvapich mpiexec flags & Print invocation (#355)
1 parent d15f9fa commit 64e514c

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

toolchain/templates/bridges2.mako

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ echo
3939
${helpers.run_prologue(target)}
4040

4141
% if not mpi:
42-
${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}"
42+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}")
4343
% else:
44-
${' '.join([f"'{x}'" for x in profiler ])} \
44+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
4545
mpirun -np ${nodes*tasks_per_node} \
4646
${' '.join([f"'{x}'" for x in ARG('--') ])} \
47-
"${target.get_install_binpath()}"
47+
"${target.get_install_binpath()}")
4848
% endif
4949

5050
${helpers.run_epilogue(target)}

toolchain/templates/default.mako

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,31 @@ warn "Consider using a different template via the $MAGENTA--computer$COLOR_RESET
3333
${helpers.run_prologue(target)}
3434

3535
% if not mpi:
36-
${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}"
36+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}")
3737
% else:
3838
if [ "$binary" == "jsrun" ]; then
39-
${' '.join([f"'{x}'" for x in profiler ])} \
39+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
4040
jsrun --nrs ${tasks_per_node*nodes} \
4141
--cpu_per_rs 1 \
4242
--gpu_per_rs ${1 if gpu else 0} \
4343
--tasks_per_rs 1 \
4444
${' '.join([f"'{x}'" for x in ARG('--') ])} \
45-
"${target.get_install_binpath()}"
45+
"${target.get_install_binpath()}")
4646
elif [ "$binary" == "srun" ]; then
47-
${' '.join([f"'{x}'" for x in profiler ])} \
47+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
4848
srun --ntasks-per-node ${tasks_per_node} \
4949
${' '.join([f"'{x}'" for x in ARG('--') ])} \
50-
"${target.get_install_binpath()}"
51-
elif [ "$binary" == "mpirun" ] || [ "$binary" == "mpiexec" ]; then
52-
${' '.join([f"'{x}'" for x in profiler ])} \
50+
"${target.get_install_binpath()}")
51+
elif [ "$binary" == "mpirun" ]; then
52+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
5353
$binary -np ${nodes*tasks_per_node} \
5454
${' '.join([f"'{x}'" for x in ARG('--') ])} \
55-
"${target.get_install_binpath()}"
55+
"${target.get_install_binpath()}")
56+
elif [ "$binary" == "mpiexec" ]; then
57+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
58+
$binary --ntasks ${nodes*tasks_per_node} \
59+
${' '.join([f"'{x}'" for x in ARG('--') ])} \
60+
"${target.get_install_binpath()}")
5661
fi
5762
% endif
5863

toolchain/templates/delta.mako

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sw/spack/deltas11-2023-03/apps/linux-rh
4141
${helpers.run_prologue(target)}
4242

4343
% if not mpi:
44-
${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}"
44+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}")
4545
% else:
46-
${' '.join([f"'{x}'" for x in profiler ])} \
47-
mpirun -np ${nodes*tasks_per_node} \
46+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
47+
mpirun -np ${nodes*tasks_per_node} \
4848
${' '.join([f"'{x}'" for x in ARG('--') ])} \
49-
"${target.get_install_binpath()}"
49+
"${target.get_install_binpath()}")
5050
% endif
5151

5252
${helpers.run_epilogue(target)}

toolchain/templates/phoenix.mako

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ echo
3939
${helpers.run_prologue(target)}
4040

4141
% if not mpi:
42-
${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}"
42+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}")
4343
% else:
44-
${' '.join([f"'{x}'" for x in profiler ])} \
44+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
4545
mpirun -np ${nodes*tasks_per_node} \
4646
--bind-to none \
4747
${' '.join([f"'{x}'" for x in ARG('--') ])} \
48-
"${target.get_install_binpath()}"
48+
"${target.get_install_binpath()}")
4949
% endif
5050

5151
${helpers.run_epilogue(target)}

toolchain/templates/summit.mako

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ echo
2424
${helpers.run_prologue(target)}
2525

2626
% if not mpi:
27-
${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}"
27+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} "${target.get_install_binpath()}")
2828
% else:
29-
${' '.join([f"'{x}'" for x in profiler ])} \
29+
(set -x; ${' '.join([f"'{x}'" for x in profiler ])} \
3030
jsrun \
3131
${'--smpiargs="-gpu"' if gpu else ''} \
3232
--nrs ${tasks_per_node*nodes} \
3333
--cpu_per_rs 1 \
3434
--gpu_per_rs ${1 if gpu else 0} \
3535
--tasks_per_rs 1 \
3636
${' '.join([f"'{x}'" for x in ARG('--') ])} \
37-
"${target.get_install_binpath()}"
37+
"${target.get_install_binpath()}")
3838
% endif
3939

4040
${helpers.run_epilogue(target)}

0 commit comments

Comments
 (0)