-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add pio_finalize calls for CICE history and restart files #995
Conversation
…g with PIO. This cleans up some PIO internal data. The code was aborting when trying to write lots of files (>600) because we reinitialize PIO for each file. This is a short term fix. A longer term fix is to initialize PIO once and reuse as much as possible. Add a new test that runs CICE for a year writing hourly files (>8000 files). Test with pio2 and netcdf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In UFS, this successfully generates over 1900 hourly files for a C48-5deg case by the end of the wall-clock time. The previous limit was 675 files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this :)
integer(kind=int_kind) :: ierr | ||
character(len=*), parameter :: subname = '(ice_pio_finalize)' | ||
|
||
call pio_finalize(ice_pio_subsystem,ierr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly when there is an ierr code returned from a pio function, elsewhere there is a
call pio_seterrorhandling(File, PIO_RETURN_ERROR)
before the call, then the ierr is checked with ice_pio_check
and the error handling is set back to internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I've updated the implementation.
|
||
integer(kind=int_kind) :: ierr | ||
character(len=*), parameter :: subname = '(ice_pio_finalize)' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#ifndef CESMCOUPLED |
This is handled elsewhere for CESMCOUPLED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I've updated the implementation.
Thanks @apcraig |
PR checklist
Add pio_finalize calls for CICE history and restart files
apcraig
Tested quick_suite and io_suite on derecho with 6 compilers. All tests pass and are bit for bit. New tests pass. One old test, restart_gx3_32x1_alt02_histall_iohdf5_iopio1 now is failing with an hdf5 dimscales error. I tried to look into the problem, but this seems to be a problem on with pio1 and hdf5. I am going to allow this to fail.
This fixes a "too many communicators" error caught in UFS and duplicated in standalone CICE when writing lots of files.
Add pio_finalize calls for CICE history and restart files when running with PIO. This cleans up some PIO internal data. The code was aborting when trying to write lots of files (>600) because we reinitialize PIO for each file. This is a short term fix. A longer term fix is to initialize PIO once and reuse as much as possible.
Add a new test that runs CICE for a year writing hourly files (>8000 files). Test with pio2 and netcdf.