-
Notifications
You must be signed in to change notification settings - Fork 274
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
pmi: work with 3rd party pmi libraries #6662
Conversation
Cray PMI does not define PMI2_keyval_t. Check it in configure and typedef INFO_TYPE PMI2_keyval_t if needed. This will allow mpich to compile using Cray PMI. The PMI2_keyval_t is only used in PMI2_Job_Spawn. The name publishing API always uses NULL for its info pointers. It is possible that our INFO_TYPE is incompatible with Cray PMI's internal type, which will break PMI2_Job_spawn. If so, this need be fixed in the future, possibly on the Cray side.
Skip PMI2_Set_threaded if it does not exist. For example, it does not exist from Cray's libpmi2.so.
Make sure to set LIBS before checking PMI capability. Also disable built-in pm if user is configuring with external pmi library. Hydra can be installed separated if needed.
test:mpich/pmi ✔️ - https://jenkins-pmrs.cels.anl.gov/job/mpich-review-pmi/242/ |
Now we can directly link with cray pmi using --with-pmi=path or --with-pmi2=path.
These configure macros are no longer used since we support runtime PMI versions.
713102e
to
e5572f8
Compare
configure.ac
Outdated
@@ -1704,22 +1663,39 @@ esac | |||
enable_pmi1="no" | |||
enable_pmi2="no" | |||
enable_pmix="no" | |||
if test "$with_pmi" = "pmi2" ; then | |||
if test "$with_pmi" = "pmi1" ; then | |||
enable_pmi2="yes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable_pmi2="yes" | |
enable_pmi1="yes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Applied
Allow users to force --with-pm and --with-pmilib options. It allows users to build hydra even with external pmi library or build embedded libpmi concurrently with an external pmi library (e.g. libpmix). This may not work due to conflicts, but it is at user's descretion. Use may load 3rd party pmi libraries with: --with-pmi1=path (libpmi.so) --with-pmi2=path (libpmi2.so) --with-pmix=path (libpmix.so) As of this commit, following options are more or less independent: --with-pmi=default|pmi1|pmi2|pmix --with-pmilib=default|no|mpich|install --with-pm=default|no|gforker|remshell|hydra The default option can be internally overwritten. with_pmilib=no will not build internal(embedded) libpmi. with_pm=no will not build internal pm. A special option is --with-pmi=slurm. This is mainly because Slurm installs header as #include "slurm/pmi.h".
test:mpich/pmi ✔️ (except for pmix spawn failures) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK with me. @sonjahapp I can't request your review since you are not yet part of @pmodels/mpich-partec (invite just sent). Could you comment saying this works for your use-case before we merge? Thanks.
For a configuration including support for hydra, PMI1 and PMI2 provided via MPICHs libpmi, and PMIx provided by OpenPMIx I have to configure with You may want to update the documentation A question out of curiosity: |
Yes, this is how it supposed to work.
Will do.
I suppose we can pass configure flags to builtin pmi to skip certain protocols. For example, if you do |
I think something like |
Pull Request Description
Cray PMI does not define PMI2_keyval_t. Check it in configure and typedef INFO_TYPE PMI2_keyval_t if needed. This will allow mpich to compile using Cray PMI. The PMI2_keyval_t is only used in PMI2_Job_Spawn. The name publishing API always uses NULL for its info pointers. It is possible that our INFO_TYPE is incompatible with Cray PMI's internal type, which will break PMI2_Job_spawn. If so, this needs to be fixed in the future, possibly on the Cray side.
A summary:
Fixes #6653
[skip warnings]
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short description
Commit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.