Skip to content
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.md advertises a --with-pmilib value not documented in its synposis #6881

Open
SomeoneSerge opened this issue Jan 24, 2024 · 4 comments
Open

Comments

@SomeoneSerge
Copy link

SomeoneSerge commented Jan 24, 2024

As a special case, to build with a Slrum environment, use
`--with-pmilib=slurm --with-slurm=[path]`. This is because Slurm installs its
header file under `path/include/slurm/`, thus requires special handling.

...however:

mpich/configure.ac

Lines 1502 to 1506 in c2f04da

AC_ARG_WITH(pmilib, [
--with-pmilib=option - Specify whether to build and install libpmi.so.
mpich - embed into libmpi (default)
install - build and install libpmi.so
],,with_pmilib=default)

  • Should --with-pmilib be used this way?
  • What exactly is the interpretation of --with-pmilib=slurm (i.e. as used with a name instead of mpich/install)?
  • Is my understanding correct, that --with-pmi specifies the name of the interface, not (necessarily) an implementation?
  • Does --with-pmi specify the interface to expose exclusively, or just the default? If so, how does one build mpich with the (optional) support for other interfaces? E.g. can one build mpich to use slurm's libpmi2 by default, but with an option to fallback to pmix?

This came up in relation to NixOS/nixpkgs#283071 (comment) and any general advice on the meaning and interaction of --with-pmi, --with-pmilib, and --with-pmix flags is welcome

Thanks!

@hzhou
Copy link
Contributor

hzhou commented Jan 24, 2024

The slurm option was used as a transitional hack. Try --with-pmi2=[path to slurms libpmi2.so (above lib)].

@SomeoneSerge
Copy link
Author

Just to clarify, do I get it right that --with-pmi{1,2,x} are declared at

mpich/configure.ac

Lines 1537 to 1539 in c2f04da

PAC_CHECK_HEADER_LIB_EXPLICIT(pmi1, pmi.h, pmi, PMI_Init)
PAC_CHECK_HEADER_LIB_EXPLICIT(pmi2, pmi2.h, pmi2, PMI2_Init)
PAC_CHECK_HEADER_LIB_EXPLICIT(pmix, pmix.h, pmix, PMIx_Init)

...and also that instead of the autoconf-style --without-feature variants they implement --with-feature=no?

if test -n "${with_$1}" -a "${with_$1}" != "no" ; then
PAC_CHECK_HEADER_LIB_OPTIONAL($1, $2, $3, $4)
fi

@SomeoneSerge
Copy link
Author

SomeoneSerge commented Jan 24, 2024

Getting configure: WARNING: unrecognized options: --with-pmi1, --with-pmi2

To be clear, --with-pmilib=slurm did work, I just wasn't sure if it's the right thing to do.

This is with mpich 4.1.2

EDIT: I see now that 4.1.2 did contain logic for --with-pmi={slurm,cray,pmix,...} and that --with-pmi{1,2} were introduced later. We'll have to wait for the release to use those, I guess. Otherwise, could you confirm if my understanding above was close to correct?

@hzhou
Copy link
Contributor

hzhou commented Jan 24, 2024

The current state of PMI configure options are described in this PR: #6662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants