Skip to content

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

Merged
blnicho merged 9 commits intoPyomo:mainfrom
jsiirola:mpi4py_available
Nov 14, 2024
Merged

Update mpi4py_available to work around conda-forge/openmpi#3416
blnicho merged 9 commits intoPyomo:mainfrom
jsiirola:mpi4py_available

Conversation

@jsiirola
Copy link
Copy Markdown
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
@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