Update mpi4py_available
to work around conda-forge/openmpi
#3416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, howevermpi4py.MPI
would raise a linking error becauselibcudart.so
was missing. So, this PR:mpi4py.MPI
is importable when checking ifmpi4py
is availablepyomo.common.dependencies
to check for the availability ofmpi4py
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-- [14 Nov 24]cudatoolkit cuda-version=11
to the conda environment for MPI tests so that tests resume running.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:
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: