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

Setting ADIOS2_USE_Python=ON doesn't error when mpi4py is not found #2211

Closed
KyleFromKitware opened this issue May 6, 2020 · 1 comment · Fixed by #2213
Closed

Setting ADIOS2_USE_Python=ON doesn't error when mpi4py is not found #2211

KyleFromKitware opened this issue May 6, 2020 · 1 comment · Fixed by #2213

Comments

@KyleFromKitware
Copy link
Collaborator

Describe the bug
If ADIOS2_USE_Python is ON, and ADIOS2_USE_MPI is ON, but mpi4py is not present, configuration does not error like it should.

To Reproduce

  1. Make sure Python development files are installed but mpi4py is not
  2. Configure with ADIOS2_USE_Python=ON and ADIOS2_USE_MPI=ON
  3. Observe that no error occurs

Expected behavior
An error should occur, since the required mpi4py was not found

Additional context
This appears to be due to how find_package(PythonModule) works. It handles variables for PythonModule_<module> rather than PythonModule. So when REQUIRED is passed, PythonModule_FIND_REQUIRED is set to true, but find_package_handle_standard_args() reads PythonModule_mpi4py_FIND_REQUIRED, which is not set, and so the error is not triggered.

I believe that the solution is to either change how find_package(PythonModule) works, or write a dedicated find module for mpi4py.

@KyleFromKitware
Copy link
Collaborator Author

Cc: @chuckatkins

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 a pull request may close this issue.

1 participant