-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Modify setup.py
to avoid crash due to version 4.0.0 of mpi4py
during installation
#181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR. Some comments. I, unfortunately, have no idea why the CI is currently failing...
setup.py
Outdated
@@ -39,6 +30,17 @@ | |||
author_email='[email protected]', | |||
license='LGPL-3.0', | |||
packages=['fenicsprecice'], | |||
install_requires=['pyprecice>=3.0.0.0', 'scipy', 'numpy>=1.13.3, <2', 'mpi4py'], | |||
setup_requires=['mpi4py<4'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what setup_requires
exactly does but I would not put a hard requirement here for the sake of checking the FEniCS installation. If this check does not succeed there is probably a good reason for the warning. We should not try to fix a broken FEniCS installation with this setup.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked a bit into the reason why mpi4py
is failing and actually we are exactly trying to do this: We are fixing a broken FEniCS installation and this is also what we need to do because I think we cannot expect that there will be a corresponding fix for (legacy) FEniCS (either supporting mpi4py>=4
or restricting to mpi4py<4
).
setup.py
Outdated
try: | ||
from fenics import * | ||
except ModuleNotFoundError: | ||
warnings.warn("No FEniCS installation found on system. Please install FEniCS and check the installation.\n\n" | ||
"You can check this by running the command\n\n" | ||
"python3 -c 'from fenics import *'\n\n" | ||
"Please check https://fenicsproject.org/download/ for installation guidance.\n" | ||
"The installation will continue, but please be aware that your installed version of the " | ||
"fenics-adapter might not work as expected.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above. Try not to fix a broken FEniCS installation with this setup.py
then you can also move this up to the original position. Note: We might remove this warning very soon anyways.
I removed the checks. See #182. |
@BenjaminRodenberg So now, we only need to require + install_requires=['pyprecice>=3.0.0.0', 'scipy', 'numpy>=1.13.3, <2', 'mpi4py<4'] now? |
I hope so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I synchronized this PR and removed the setup_requires
. CI-wise everything looks good and I will merge this PR latest on the weekend.
…ing installation (precice#181) * Require mpi4py < 4 --------- Co-authored-by: Benjamin Rodenberg <[email protected]>
This PR closes #180.
setup_requires=['mpi4py<4']
is necessary as this requirement is needed for the imported FEniCS below.