OpenMPI: Limit orterunprefix variant to pre-5.x versions#43961
OpenMPI: Limit orterunprefix variant to pre-5.x versions#43961jack-morrison wants to merge 1 commit intospack:developfrom
orterunprefix variant to pre-5.x versions#43961Conversation
|
@hppritcha, separately but related, do I understand correctly that the intention with these is to have If so, I think the True condition should be |
|
yes. including it in this correction for romio in this PR would be fine with me. nice catch! |
| default=False, | ||
| when="@:4", | ||
| description="Prefix Open MPI to PATH and LD_LIBRARY_PATH on local and remote hosts", | ||
| ) |
There was a problem hiding this comment.
If there is a desire to optionally offer the old behavior, we could
- Keep this variant
- Use
config_args.append("--enable-prte-prefix-by-default")For+orterunprefix(not essential, but explicit) - Use
--disable-...(if available) fort~orterunprefix
I get the impression though that no one was depending on ~orterunprefix, since it sounds like we would have been effectively ignoring that for @5:.
It would be nice (but not strictly required) to edit logic that looks at +orterunprefix, like
if spec.satisfies("@1.3:"):
if spec.satisfies("+orterunprefix"):
(even if you don't change that, the code will still work, but it would be easier to read if for example the range were updated to @1.3:4)
It sounds like you were going to make additional changes based on #43961 (comment), so let me know when that's ready and I can take another look.
There was a problem hiding this comment.
Thanks for the feedback @scheibelp! I'll be looping back to this next week and will try to take some of this into account. I agree that for completion we should maybe offer the older behavior in 5.x versions (the ability to do ~, not currently present), even if the default behavior is changing (to +).
You're right that I'd still like to make some changes wrt the romio variant, but am having some trouble. I'll copy here a note that I had put in Slack, and I'd appreciate your expert guidance:
As written now,
variant("romio", default=True, when="@:5", description="Enable ROMIO support")
variant("romio", default=False, when="@5:", description="Enable ROMIO support")
, it's always false. I tried adjusting this to have the True case be
@:4instead [from our discussion above], but then I realized this is the overriding variants situation described in the docs and it continues to (correctly) be False regardless of version.
To switch the +/~ behavior of a variant based on version, does it need to be separately handled or can that be done entirely as variant definitions?
There was a problem hiding this comment.
Thanks for the pointer, and yeah apologies it looks like we don't provide a way to do this with variant declarations. The only way I can think to do this right now is to add some config to etc/spack/defaults/packages.yaml:
packages:
openmpi:
prefer:
- spec: ~romio
when: @5:
(I'll check internally and get back to you on whether we'd want that sort of change, since we try to keep that scope as concise as possible)
I swear we were talking about adding a prefer directive (so we could encode this in the package itself), but that's not available right now. @alalazo was that you who mentioned this?
There was a problem hiding this comment.
Yes. My take is that we don't want to have prefer directive in package.py, since packages might conflict with each other (and there's no opt-out to a directive). requires is different, cause it's really enforcing something.
Having prefer in packages.yaml is instead fine, cause that is "by user" and not "by package".
There was a problem hiding this comment.
My take is that we don't want to have prefer directive in package.py
Fine by me, but I'm not following your reasoning
since packages might conflict with each other (and there's no opt-out to a directive
I assume conflicting preferences would have a winner (in terms of weighting) and because the user encoded them as a preference, they'd be fine with any particular one being ignored.
There was a problem hiding this comment.
@tgamblin, who I spoke with, is working on a mechanism to adjust the default variant value based on when specs (so that will be a preferred mechanism to support this, vs. adding preferences to the default packages.yaml)
|
I haven't abandoned this, just haven't gotten to touching it up just yet. |
|
Thanks, I likewise have not yet delivered on my promise:
I probably wont be able to until end of next week (most core team members are busy in the short term) |
|
#44425 is (finally) merged, so multiple variant definitions should now work as you'd expect. |
|
This pull request has been automatically marked as stale because it has not had |
|
This pull request was closed because it had no activity for 30 days after being marked stale. |
OpenMPI 5.x switches to
--enable-prte-prefix-by-defaultinstead, which is enabled by default at configure time.