Running standalone flux-shell as rank 1 #3167
-
When running
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Now, the standalone shell option is not designed nor well tested for multiple rank jobs. Things may break in strange ways. You may have to exit early from the shell via a custom initrc to avoid a hang. For example, here's a simple, multi-rank R: {
"version": 1,
"execution": {
"R_lite": [
{
"rank": "0-1",
"children": {
"core": "0"
}
}
]
}
} And an initrc that prints the shell rank: print("shell rank is: "..shell.info.rank) If we use broker 1 with the R above, we should get shell rank 1 as well: $ ./flux-shell -s -j jobspec -R R -r 1 --initrc print-shell-rank.lua 1
shell rank is: 1
flux-shell: ERROR: shell_output_write: Function not implemented
flux-shell: ERROR: shell_output_write: Function not implemented
flux-shell: ERROR: shell_output_write: Function not implemented (note the errors since there is no shell rank 0 to which to send output messages) We could suppress these messages by exiting from the $ cat print-shell-rank.lua
print("shell rank is: "..shell.info.rank)
os.exit(0)
$ ./flux-shell -s -j jobspec -R R -r 1 --initrc print-shell-rank.lua 1
shell rank is: 1 Though there may be other side effects from doing that. You could use |
Beta Was this translation helpful? Give feedback.
The
-r
standalone shell option specifies the broker rank not the shell rank. To run a standalone shell as shell rank 1, you will need to provide an R that contains 2 broker ranks, and set-r
to the 2nd broker rank in R.Now, the standalone shell option is not designed nor well tested for multiple rank jobs. Things may break in strange ways. You may have to exit early from the shell via a custom initrc to avoid a hang.
For example, here's a simple, multi-rank R:
And an initrc that prints the shell rank: