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

Raise error for misconfigured 3D physics diagnostics #133

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Jan 21, 2021

This is now the output upon model termination if this occurs. As in #132, the previous termination would be an uninformative segmentation fault.

FATAL from PE     0: FV3GFS_io::fv3gfs_diag_register Outputting 3D diagnostics from the physics requires gfs_physics_nml.ldiag3d be set to true.


FATAL from PE     1: FV3GFS_io::fv3gfs_diag_register Outputting 3D diagnostics from the physics requires gfs_physics_nml.ldiag3d be set to true.


FATAL from PE     0: FV3GFS_io::fv3gfs_diag_register Outputting 3D diagnostics from the physics requires gfs_physics_nml.ldiag3d be set to true.

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 1

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 13 RUNNING AT 8fdbee4d008c
=   EXIT CODE: 1
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================

@spencerkclark spencerkclark changed the title Add informative error if ldiag3d is set to false and a 3D physics diagnostic was requested Raise informative error if ldiag3d is set to false and a 3D physics diagnostic was requested Jan 21, 2021
@nbren12
Copy link
Contributor

nbren12 commented Jan 21, 2021

Related to #130

Copy link
Contributor

@nbren12 nbren12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks. Could you shorten the title? I'd also be okay with just setting ldiag3d=.true. and not killing the model.

@spencerkclark
Copy link
Member Author

spencerkclark commented Jan 21, 2021

Could you shorten the title?

Thanks, sure, that will produce a cleaner commit message.

I'd also be okay with just setting ldiag3d=.true. and not killing the model.

It's not this simple unfortunately, because currently the decision to allocate memory for the 3D diagnostics buckets is made before the diagnostics themselves are registered. So if we changed ldiag3d to .true. after we registered the diagnostics (read: parsed the diag_table), it would be too late. We could probably refactor things so that it didn't have to be this way, but I'm not sure if it's worth it.

@spencerkclark spencerkclark changed the title Raise informative error if ldiag3d is set to false and a 3D physics diagnostic was requested Raise error for misconfigured 3D physics diagnostics Jan 21, 2021
Copy link
Contributor

@oelbert oelbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@spencerkclark spencerkclark merged commit 18bbcbf into master Jan 21, 2021
@spencerkclark spencerkclark deleted the ldiag3d-error branch January 21, 2021 22:49
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 this pull request may close these issues.

3 participants