Skip to content

Commit a316714

Browse files
committed
Fix flux --nodes in direct MPI path; warn on mpi_config extraction failure
1 parent 4f8ff3e commit a316714

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

toolchain/mfc/test/case.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def _get_mpi_config() -> MPIConfig:
106106
if cfg is not None:
107107
_resolved_mpi_config = cfg
108108
return _resolved_mpi_config
109+
print(f" Warning: -c {computer} specified but could not extract mpi_config from {computer}.mako. Falling back to auto-detection.")
109110

110111
# Auto-detect: try common launchers in order
111112
for name in ["mpirun", "srun", "mpiexec"]:
@@ -128,7 +129,7 @@ def _mpi_cmd(cfg: MPIConfig, ppn: int, exe: str, gpu: bool = False) -> List[str]
128129
gpu_per_rs = "1" if gpu else "0"
129130
return [binary, "--nrs", str(ppn), "--cpu_per_rs", "1", "--gpu_per_rs", gpu_per_rs, "--tasks_per_rs", "1", *gf, *cfg.flags, exe]
130131
if binary == "flux":
131-
return [binary, *cfg.flags, "--ntasks", str(ppn), *gf, exe]
132+
return [binary, *cfg.flags, "--nodes", "1", "--ntasks", str(ppn), *gf, exe]
132133
return [binary, "-n", str(ppn), *gf, *cfg.flags, exe]
133134

134135

0 commit comments

Comments
 (0)