Skip to content

Commit

Permalink
Merge pull request #3173 from SteVwonder/fix-spectrum
Browse files Browse the repository at this point in the history
shell: fix Spectrum 2020.06 bootstrap
  • Loading branch information
mergify[bot] committed Aug 29, 2020
2 parents e31fab0 + 12a3536 commit babd275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/shell/lua.d/spectrum.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ plugin.register {
-- Approximately `ulimit -Ss 10240`
-- Used to silence IBM MCM warnings
setrlimit ("stack", 10485760)
local rank = task.info.rank
task.setenv ("OMPI_COMM_WORLD_RANK", rank)
end
}
}
Expand Down
10 changes: 10 additions & 0 deletions t/t3001-mpi-personalities.t
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,14 @@ test_expect_success NO_ASAN,HAVE_JQ "spectrum mpi only enabled with option" '
grep /opt/ibm/spectrum spectrum.out
'

test_expect_success HAVE_JQ 'spectrum mpi sets OMPI_COMM_WORLD_RANK' '
flux jobspec srun -n${SIZE} -N${SIZE} printenv OMPI_COMM_WORLD_RANK \
| jq ".attributes.system.shell.options.mpi = \"spectrum\"" > j.spectrum &&
jobid=$(flux job submit j.spectrum) &&
flux job attach ${jobid} | sort -n > spectrum.rank.out &&
test_debug "cat spectrum.rank.out" &&
printf "0\n1\n2\n3\n" > spectrum.rank.expected &&
test_cmp spectrum.rank.expected spectrum.rank.out
'

test_done

0 comments on commit babd275

Please sign in to comment.