-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't try to bind tasks when direct launched by an external launcher that did no binding #1386
Conversation
I'll put this on the "to-be-discussed" list for next week's developer's meeting. The initial idea was to have mpirun and direct launch wind up with the same behavior in the absence of any directives. This proposal would seem to break that model - not sure which causes the most surprise. |
I totally agree that a common model between mpirun and direct launch is something very desirable ! By the way is it really as easy to get the right placement in srun as to my knowledge we don't have a mapping mca param with srun ? The surprise here is that an explicit command line option ( |
I would be inclined to agree that an explicit call to bind a certain way (or not to bind at all) should be respected. The difficulty is in detecting it, as you note. We cannot wait for PMIx directives as that might come too late to ensure that memory is aligned with the location, so we likely do have to look for RM-specific directives. Merits a little thought as to the best method for solving the problem. IIRC, we were supposed to check for an externally-applied binding (i.e., that we are already bound in some fashion) before auto-binding ourselves. So I think we are okay if they specify a binding pattern. Thus, the question really falls down to "how do we detect an explicit do-not-bind directive given to the RM"? Trickier problem. |
The detection of whether we were bound externally is also not quite This means that when slurm allocates only one socket on a node and That's why I think that as long as don't know what the user provided |
@plesn We talked about this at some length today. There was consensus that we should do a better job of detecting that we were externally bound so we don't change that binding pattern. This includes the case where the user explicitly told the RM "do not bind". @artpol84 found the right SLURM envars to support that behavior, and we'll have to see if others can provide us with similar "flags". There was general disagreement over the right behavior in the case where the user specified nothing on the RM cmd line. We currently bind by default due to user complaints over performance differences between jobs launched via mpirun vs srun. So in this case, we are going to stick with the current behavior of binding to some pre-defined pattern, or to the pattern specified via MCA param. We note that the MCA param offers the "bind-to-none" option, which the user can set for direct launch and the sys admin can include in the default MCA parameter file. So users and admins are free to customize this behavior today. However, we did recognize that a system wide default param would apply both to direct launch and launch via mpirun, and that this might not be desirable. So we will look into providing sectional headings in the default MCA parameter file that will let admins specify a different behavior for direct vs mpirun launch. Not sure when this will be done, but it would seem a better alternative to adding yet another param to control binding. Hope that makes sense. |
Ok I understand, and I agree that it makes sense to:
In the meantime for our internal usage at Bull we'll temporarily use |
Not for the master - it has been fixed there, albeit in a different way. |
When using an external launcher like srun, srun handles the
binding. Sometimes it does intentionnaly not bind, like for a hybrid
job.
If we set a binding policy in ompi (I like to have mpirun bind by
default) it is usually not applied in srun because there is a check to
see if processes were externally bound. But when they were
intentionally left unbound by srun, the check says they are unbound,
so we bind them.
I find this behaviour doesn't follow least suprise, and that by
default we should rather keep what the external launcher did.
So what I propose here is to not apply the binding policy for direct
launched jobs.
If we really want to enforce the binding policy when the launcher did
nothing, I propose a mca flag hwloc_base_bind_direct_launched=true
So for an unbound openmp job, with the original behaviour (or the new
mca param) we get:
With the new behaviour, we maintain what srun did:
What do you think of this ?