flux-core
flux-core copied to clipboard
shell: easily determine if current job has exclusive access to resources from initrc
A use case came up recently where it would be useful to be able to determine if a job has explicitly or implicitly obtained exclusive access to resources on the current node from the shell initrc. This could be used to determine if mpibind can be disable d by default, but could also has potential to be useful in other circumstances.
There is some subtlety here in what 'exclusive' means, because a batch job could be run with non-exclusive access, then jobs run within that instance could be exclusive. These jobs would not have exclusive access to the whole node, though they may have the exclusive
flag set, and the assigned R may match the shell's R_local, which is obtained from the parent broker.