-
Notifications
You must be signed in to change notification settings - Fork 65
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
Model dies with segmentation fault if depth greater than 9250 m #491
Comments
I get a slightly different error (a MOM error, not a SIGSEGV), but otherwise the same result:
As you mentioned, the The segmentation fault has been "fixed", but this new error does not do a great job of directing the user to fix the problem, if all they want to do is run double gyre at a very large depth. |
Just to add a data point, I encountered the same error before with 1-layer barotropic runs. And I have also been using It is a bit counter-intuitive that subroutine |
Agreed. It took me a while to track down the problem because I had |
According to @adcroft it's the diagnostics which need |
It was noted in NOAA-GFDL/issues/491 that the call to initialize_regridding() for diagnostics gives a segmentation fault when the maximum depth of the ocean is greater than 9250 m unless DIAG_COORD_DEF_Z is explicitly set. This commit fixes this problem by (1) adding an extra layer to the bottom of the hard-coded WOA09 list of diagnostic depths when the ocean is deeper than the 9250 m maximum depth in that file, and (2) changing the default behavior for diagnostic grids to be be uniform when the maximum ocean depth is deeper than 9250 m, for which WOA09 is no longer likely to be a convenient choice. With this change, MOM6 no longer has segmentation faults for the configuration described in issues/491. All solutions are bitwise identical, but some z-space diagnostic grids will be modified in cases that previously had segmentation faults.
It was noted in /issues/491 that the call to initialize_regridding() for diagnostics gives a segmentation fault when the maximum depth of the ocean is greater than 9250 m unless DIAG_COORD_DEF_Z is explicitly set. This commit fixes this problem by (1) adding an extra layer to the bottom of the hard-coded WOA09 list of diagnostic depths when the ocean is deeper than the 9250 m maximum depth in that file, and (2) changing the default behavior for diagnostic grids to be be uniform when the maximum ocean depth is deeper than 9250 m, for which WOA09 is no longer likely to be a convenient choice. With this change, MOM6 no longer has segmentation faults for the configuration described in issues/491. All solutions are bitwise identical, but some z-space diagnostic grids will be modified in cases that previously had segmentation faults.
This issue has been addressed and corrected by PR #636. |
The model dies with a segmentation fault if the ocean depth is anywhere greater than 9250 m unless non-obvious, non-default settings are used.
Reproduction
Run the "double_gyre" example out of the box, except set
TOPO_CONFIG = "flat"
andMAXIMUM_DEPTH
to anything greater than 9250.Error message
Depends on fortran runtime and optimization level. Optimized Intel is unintelligible. gfortran helpfully produces
Expected behavior
No segmentation faults. If the parameters are inconsistent, model should post an error message and exit gracefully.
Origin
initialize_regridding
, called by the diagnostics mediator, will default (for convenience) to WOA09 vertical levels ifMAXIMUM_DEPTH > 3000
. The offending lines then look for an entry in the list of WOA09 vertical levels that exceeds the maximum depth of the domain. After 9250 m, the list ends butinitialize_regridding
keeps looking until it runs off the end of the list.Workaround
Set
DIAG_COORD_DEF_Z
explicitly. If you don't need diagnostics on anything other than the native grid,DIAG_COORD_DEF_Z = "UNIFORM"
works fine.The text was updated successfully, but these errors were encountered: