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

Io/pio put att #2

Draft
wants to merge 3 commits into
base: atmosphere/retry_pio_put_att
Choose a base branch
from
Draft

Conversation

amstokely
Copy link
Owner

The title above should be a 1 line short summary of the pull request (i.e. what the project the PR represents is intended to do).

Enter a description of this PR. This should include why this PR was created, and what it does.

Testing and relations to other Pull Requests should be added as subsequent comments.

See the below examples for more information.
MPAS-Dev/MPAS#930
MPAS-Dev/MPAS#931

@amstokely amstokely changed the base branch from atmosphere/mpas-bundle to atmosphere/retry_pio_put_att July 26, 2024 20:54
! type is (real(kind=8))
! pio_ierr = PIO_put_att(handle % pio_file, varid, attName, attValue)
! type is (character(len=*))
! pio_ierr = PIO_put_att(handle % pio_file, varid, attName, attValue)
Copy link
Collaborator

Choose a reason for hiding this comment

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

use trim(attValue)

@@ -5846,8 +5751,8 @@ subroutine MPAS_io_put_att_real0d(handle, attName, attValue, fieldname, syncVal,
#endif
else
#ifdef MPAS_PIO_SUPPORT
pio_ierr = pio_put_att_retry(handle, attName, realValue=attValueLocal)
!pio_ierr = PIO_put_att(handle % pio_file, varid, attName, attValueLocal)
call put_att_pio(handle, varid, attName, attValueLocal, ierr=ierr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

what type does this evaluate to in put_att_generic_pio?

pio_ierr = PIO_put_att(handle % pio_file, varid, attName, attValue)
end select
! if (pio_ierr /= PIO_noerr) then
!
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you log what the error code is here?


select type(attValue)
type is (integer)
call mpas_log_write('PIO_put_att called for integer attribute '//attName)
Copy link
Collaborator

Choose a reason for hiding this comment

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

the point of using STREAM_DEBUG_WRITE is that you can comment out the call to mpas_log_write in the macro instead of deleting code. That way when we run into another mysterious problem you can re-enable the macro.

@@ -1571,7 +1571,6 @@ logical function MPAS_stream_mgr_ringing_alarms(manager, streamID, direction, ie

threadNum = mpas_threading_get_thread_num()

STREAM_DEBUG_WRITE('-- Called MPAS_stream_mgr_ringing_alarms()')
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of deleting all of these debug logging you can just comment out the call to mpas_write in the macro.

@@ -6089,6 +5994,74 @@ subroutine MPAS_io_put_att_real1d(handle, attName, attValue, fieldname, syncVal,

end subroutine MPAS_io_put_att_real1d

subroutine put_att_generic_pio(handle, varid, attName, attValue, ierr)
type (MPAS_IO_Handle_type), intent(inout) :: handle
Copy link
Collaborator

Choose a reason for hiding this comment

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

use implicit none

character (len=*), intent(in) :: attName
class(*), intent(in) :: attValue
integer, optional :: ierr

Copy link
Collaborator

Choose a reason for hiding this comment

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

declare integer :: pio_ierr

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.

2 participants