-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: f2py undefined symbol for MPI application in HPE-Cray cluster with gfortran compiler (or "ftn" wrapper) #25159
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
Comments
Thanks for the report @AlexisEspinosaGayosso
That is hard to say without being able to reproduce the issue. My first recommendation is to see if things work for you with numpy |
Hi, if I create a similar fortran file, and run f2py with Where should I look for the relevant logfiles? The on-screen output of f2py with meson backend is rather concise Thanks! |
@HaoZeke is there an easy way to add the meson |
I'll look into this issue soon, seems like |
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
I have a fortran subroutine that makes use of MPI:
Then, I create the library with f2py:
This creates the library without errors:
helloworld.cpython-310-x86_64-linux-gnu.so
But when loading the library, I get an error related to MPI libraries:
When reviewing the output of the compilation, I can see that the "ftn" wrapper (which provides all the "options machinery" for compiling MPI code in the HPE-Cray) is used for compilation, but not for linking (partial output below):
The
linker_so
is callinggfortran
directly, so it is not using all the libraries and paths that the "ftn" wrapper calls.Issue is very similar (if not exactly the same) as that in:
#16481 (f2py undefined symbol with PGI fortran compiler and MPI calls)
but now when using the gfortran compiler (or "ftn" wrapper) in HPE-Cray EX cluster. On that similar issue, the explicit use of
<F90>
in the settings for "linker_so" made the trick. So I went intognu.py
file and noticed that the mentioned fix does not apply here, as<F90>
setting is already there:Then, I modified the
gnu.py
file and add all the paths and libraries that theftn
wrapper would have called in the linking step:With that change, the creation of the library again finished without errors, but when calling the library in python the same error happens:
So, it seems that even if the
ftn
wrapper was used in the linking step, the same error may persists. What would be the error source then?(Using a ctypes approach works for the same kind of MPI test function, so I'm wondering what could be going wrong with the f2py approach?)
Reproduce the code example:
All explained in the Description section above (including code snippets)
Error message:
Runtime information:
Context for the issue:
Users already count with postprocessing sets of scripts and functions that make use of f2py with fortran-MPI code. This error is affecting their workflows! Currently they are moving their data to an external cluster to proceed with their postprocessing which is, definitively, not ideal!
The text was updated successfully, but these errors were encountered: