-
Notifications
You must be signed in to change notification settings - Fork 885
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
Add generic MPI pkgconfig descriptors #10572
Comments
Here is my counter offer: |
I thought about this, and I think this wouldn't be scalable. This means that cmake would need to look for all possible MPI implementations, and it would fail if it encounters an unknown one. All cmake configuration logic starts from known, semi-standardized files (e.g. |
For now, there are two main MPI implementations: Note you can |
Thanks for the pointer to |
@eschnett Is that sufficient? FWIW, I agree with @ggouaillardet: I don't think we want the files named the same across different MPI implementations. That will make potential binary package file conflicts (e.g., if Open MPI and MPICH RPMs both contain |
The The packages already both contain a |
That's a fair point about FWIW, @ggouaillardet is correct: there are a finite number of MPI implementations, and there really aren't any new mainstream ones coming any time soon. Also FWIW, it looks like MPICH installs Even if it was aimed at "alternatives"-style Finally, given the long tail of Open MPI installs in use out in the real world (that use |
Related:
Openmpi's current layout maps somewhat directly onto FindMPI.cmake's expectations, and mpich is open to implementing the same pattern. Downstream distributions (Nixpkgs, Debian, hypothetically speaking something like Vcpkg too) could in principle take on the responsibility of exposing these files under the exact names expected by CMake. I think that wouldn't be too bad, although I'd prefer to see CMake work with ompi/mpich as is too. EDIT: CC https://gitlab.kitware.com/cmake/cmake/-/issues/25529 |
cmake recently gained support to use pkgconfig to detect MPI options (see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6537/diffs). This is useful e.g. when cross-compiling. Cross-compiling with OpenMPI fails regularly for me because
mpicc
etc. are binaries and cannot be executed.This cmake patch looks for pkgconfig setups called
mpi-c
,mpi-cxx
, andmpi-fort
. It would be good if OpenMPI provided such configuration, in addition to theompi-c.pc
etc. that it already provides.The text was updated successfully, but these errors were encountered: