-
Notifications
You must be signed in to change notification settings - Fork 63
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
Segfault thrown when Python is finalizing ESMF through pybind11 #748
Comments
Interestingly, changed:
and this left me with the error:
when running with MPI enabled. MPI disabled gives me the same segfault, but the above errors don't actually segfault and the unit test program exits normally... |
After talking with @hellkite500 and @PhilMiller, I can confirm at the very least that this is due to an By changing the unit test tear down function to:
where I forcibly call all |
Working with Justin, we validated using the PMPI interfaces to 'detour' the The way this works is that we provide a 'profiling' implementation of |
As an update for this, esmf-org/esmf#234 was merged which solves half of this issue (assuming the user has an ESMF build with this feature). The other half left is ensuring destruction of ESMF Grid/Mesh/Field objects used in the Forcings Engine python code (NOAA-OWP/ngen-forcing#14). |
This segfault occurs at a call to
ESMCI::VM::finalize(ESMC_Logical*, int*)
at program termination. Part of this issue may be theatexit
hooks that ESMF creates on initialization of its objects (Mesh, Grid, Field, etc.), where destruction is not occurring in the "correct" order, and the finalization function attempts to dereference an object that doesn't exist anymore (speculation).The location of this issue was found during the Forcings Engine integration work by enabling address sanitizer.
Potentially related to #470
The text was updated successfully, but these errors were encountered: