Unable to retreive Fortran libraries from `mpi` package providers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 2.5k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 82
Description
Summary
I ran into some hard-coded library names here:
This would fail if we used any other mpi provider not listed here. It also would remove duplication across any other project that hard-codes it. A brief search showed others.
For example, neither of these packages reference the Fortran libraries at all:
https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/mvapich2/package.py
https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/openmpi/package.py
Rationale
Lower hard-coded bleed.
Description
This should be able to retrievable from the mpi providers themselves in one of the following ways:
# Specifically get just the fortran libraries
spec["mpi"].fortran_libs
# Get all libraries C/C++/Fortran
spec["mpi"].libs
This would also need to work with spec.ld_flags as well.
Additional information
No response
General information
- I have searched the issues of this repo and believe this is not a duplicate
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with var/spack/repos/builtin/packages/mfem/package.py at the referenced lines, then compare the mvapich2 and openmpi package definitions. Trace how MPI provider specs expose libraries and how spec.ld_flags consumes them. Done means Fortran or all MPI libraries can be retrieved from the provider without hard-coded names and the linker flags work for alternate providers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100