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

Update mpi4py_available to work around conda-forge/openmpi #3416

Merged
merged 9 commits into from
Nov 14, 2024

Conversation

jsiirola
Copy link
Member

@jsiirola jsiirola commented Nov 14, 2024

Fixes # .

Summary/Motivation:

This PR was motivated by conda-forge/openmpi's (inexplicable) implicit hard dependence on cuda in the most recent rebuild of openmpi (and mpich) {see conda-forge/openmpi-feedstock#184). mpi4py was installed and importable in our testing environment, however mpi4py.MPI would raise a linking error because libcudart.so was missing. So, this PR:

  • makes sure that mpi4py.MPI is importable when checking if mpi4py is available
  • updates various tests to all use pyomo.common.dependencies to check for the availability of mpi4py
  • adds a test that will fail if mpi4py is not available and the mpi pytest marker is set (so that we will be able to detect if mpi4py [or its dependencies] cause the MPI tests to be silently skipped again).
  • add cudatoolkit cuda-version=11 to the conda environment for MPI tests so that tests resume running. -- [14 Nov 24] conda-forge/openmpi reverted their build, so updating the dependency is no longer needed. The rest of this PR is still useful, as it makes our codebase more robust.

Changes proposed in this PR:

  • (see above)

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@blnicho blnicho merged commit b9213cf into Pyomo:main Nov 14, 2024
29 of 32 checks passed
@jsiirola jsiirola deleted the mpi4py_available branch November 15, 2024 03:21
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

Successfully merging this pull request may close these issues.

3 participants