-
Notifications
You must be signed in to change notification settings - Fork 159
bug-fix: perfect_model_obs prints #916
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
base: main
Are you sure you want to change the base?
Conversation
…s called with E_ALLMSG if pmo is being run on more than 1 mpi proc
A few extra notes:
![]() I could force the pmo prints to go in order, but I would have to sync across tasks, so I don't think we want to go for that...
![]() We could fix this by adding the same number of spaces to line 780 as there are in 782 here in the error_handler subroutine DART/assimilation_code/modules/utilities/utilities_mod.f90 Lines 779 to 782 in d908222
i.e.
|
Good call, no need waste core-hours syncing.
Gut feeling is to leave this alone so the PE 0: prints stand out. I think most of the time people will set either -1 (to not have printouts) or some n comparable to the total obs, e.g. for 50,000 obs print every 5000 obs. Its a sanity check to see that PMO is doing something, or where it got to when a job ran of wall clock. |
if(task_count() == 1) then | ||
write(msgstring, '(A,1x,I8,1x,A,I8)') 'Processing observation ', j, & | ||
' of ', num_obs_in_set | ||
call trace_message(msgstring, 'perfect_model_obs:', -1) | ||
else | ||
write(msgstring, '(A,1x,I8,1x,A,I8)') 'Processing observation ', global_obs_num, & | ||
' of ', num_obs_in_set | ||
call error_handler(E_ALLMSG, 'perfect_model_obs:' ,trim(msgstring)) | ||
endif |
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.
This is neat.
I was wondering if you could not have the if statement and use E_ALLMSG for both cases since j==global_obs_num for task_count()==1
But I have not looked through why trace_message is used rather than error_handler(E_MSG
Is the -1 to stop 'silence=.true.' from not printing the message?
Side note, there is bunch of replicated code "trace_message", "set_trace" between pmo and filter and other modules.
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.
I was wondering if you could not have the if statement and use E_ALLMSG for both cases since j==global_obs_num for task_count()==1
But I have not looked through why trace_message is used rather than error_handler(E_MSG Is the -1 to stop 'silence=.true.' from not printing the message?
That's a good point. I think it would be better to use E_ALLMSG in both cases. I'll make this change.
I was also wondering about the general need for trace_message since we have the error_handler. It seems that trace_message and error_handler are basically doing the same thing in a slightly different way. I think we could consider switching out the places that use trace_message to use the error_handler alltogether.
But like you said, trace_message is replicated in pmo and filter_mod.f90 (and models/coamps_nest/coamps_util_mod.f90 but I don't think this is seeing a lot of use). So at the very least I think we should move trace_message to utilities_mod. Should I go ahead and make an issue about this and its overlap with the error_handler?
Finally, the -1 in call trace_message(msgstring, 'perfect_model_obs:', -1)
is simply to force the message to print even if silence is set to true in the namelist
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.
Should I go ahead and make an issue about this and its overlap with the error_handler?
Yup make an issue. I wouldn't go ahead any make an code changes with the various trace message calls yet, let's collect all the various trace message stuff, e.g. there is a totally unused routine progress
subroutine progress(msg, when, dotime, label, threshold, sync) ! trace plus timestamp |
The window printing is broken too: |
…rints: using global_obs_num regardless of number of tasks since j==global_obs_num for task_count()==1. NOTE: now that we are not using trace_message, these prints will NOT execute anymore if the namelist option silence is set to true
…ime if on task 0 (fixes #922)
nice double bug fix Marlee! |
Description:
Adds a conditional to the print statements in pmo "Processing observation X of Y" so that the error_handler is called with E_ALLMSG if pmo is being run on more than 1 mpi proc
This fixes the issue that was occurring where it was only printing the the obs on task 0, which made it appear that only those obs were being processed
Fixes issue
#905
Types of changes
Documentation changes needed?
Tests
Please describe any tests you ran to verify your changes.
Ran pmo for lorenz models and MOM6 with various numbers of MPI procs and values for print_every_nth_obs, ensured prints were correct
Checklist for merging
Checklist for release
Testing Datasets