-
Notifications
You must be signed in to change notification settings - Fork 377
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
Check for NaNs and INFs in input to shr_reprosum_calc #1703
Conversation
In recent development NaNs and INFs are often first identified when passed to the shr_reprosum_calc routine, where they either lead to segmentation faults or to very slow performance (due to the interaction of NaNs and INFs with the reproducible sum logic). To more readily identify this error condition (and to prevent false attributions of error to shr_reprosum_calc), the input array is checked for the presence of NaNs and INFs. If found, an appropriate error message is output and the job is terminated. [BFB] *********1*********2*********3*********4*********5*********6*********7** Longer commit message body describing the commit. Can contain lists as follows: * Item 1 * Item 2 * Item 3 A good commit message should be written like an email, a subject followed by a blank line, followed by a more descriptive body. Can also contain a tag at the bottom describing what type of commit this is. [BFB] - Bit-For-Bit [FCC] - Flag Climate Changing [Non-BFB] - Non Bit-For-Bit [CC] - Climate Changing [NML] - Namelist Changing See confluence for a more detailed description about these tags.
Tested with -compset A_WCYCL2000 -res ne30_oEC on Titan and using PGI. Was BFB (in that the error test was not true, so everything worked as if the test was not there). I also modified the code to insert both some NaNs and some INFs, and the test reported these and then killed the job, as designed. |
@@ -338,8 +339,14 @@ subroutine shr_reprosum_calc (arr, arr_gsum, nsummands, dsummands, & | |||
logical :: validate ! flag indicating need to | |||
! verify gmax and max_levels | |||
! are accurate/sufficient | |||
integer :: nan_check, inf_check ! flag on whether there are |
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 was probably meant to be logical :: nan_check, inf_check
.
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.
yes - I'll update immediately. My tests still worked though ...
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.
just got lucky that assigning logical output to an integer and then testing using the integer gave the same result? At least it was consistent (assignment of logical to integer and evaluating integer as a logical).
New logical variables nan_check and inf_check were mistakenly declared as integer.
…1703) Check for NaNs and INFs in input to shr_reprosum_calc: In recent development NaNs and INFs are often first identified when passed to the shr_reprosum_calc routine, where they either lead to segmentation faults or to very slow performance (due to the interaction of NaNs and INFs with the reproducible sum logic). To more readily identify this error condition (and to prevent false attributions of error to shr_reprosum_calc), the input array is checked for the presence of NaNs and INFs. If found, an appropriate error message is output and the job is terminated. [BFB]
Check for NaNs and INFs in input to shr_reprosum_calc: In recent development NaNs and INFs are often first identified when passed to the shr_reprosum_calc routine, where they either lead to segmentation faults or to very slow performance (due to the interaction of NaNs and INFs with the reproducible sum logic). To more readily identify this error condition (and to prevent false attributions of error to shr_reprosum_calc), the input array is checked for the presence of NaNs and INFs. If found, an appropriate error message is output and the job is terminated. [BFB]
…amelist-parsing-order Fix bug in case.run where arg skip-preview-namelist is out of sequence arg parsing needs to be done after adding arguments master is broken on acme mira/cetus and blues/anvil without this fix Test suite: acme_developer on anvil Test baseline: Test namelist changes: Test status: Fixes #1690 User interface changes?: Update gh-pages html (Y/N)?: Code review:
Check for NaNs and INFs in input to shr_reprosum_calc: In recent development NaNs and INFs are often first identified when passed to the shr_reprosum_calc routine, where they either lead to segmentation faults or to very slow performance (due to the interaction of NaNs and INFs with the reproducible sum logic). To more readily identify this error condition (and to prevent false attributions of error to shr_reprosum_calc), the input array is checked for the presence of NaNs and INFs. If found, an appropriate error message is output and the job is terminated. [BFB]
Check for NaNs and INFs in input to shr_reprosum_calc: In recent development NaNs and INFs are often first identified when passed to the shr_reprosum_calc routine, where they either lead to segmentation faults or to very slow performance (due to the interaction of NaNs and INFs with the reproducible sum logic). To more readily identify this error condition (and to prevent false attributions of error to shr_reprosum_calc), the input array is checked for the presence of NaNs and INFs. If found, an appropriate error message is output and the job is terminated. [BFB]
Check for NaNs and INFs in input to shr_reprosum_calc: In recent development NaNs and INFs are often first identified when passed to the shr_reprosum_calc routine, where they either lead to segmentation faults or to very slow performance (due to the interaction of NaNs and INFs with the reproducible sum logic). To more readily identify this error condition (and to prevent false attributions of error to shr_reprosum_calc), the input array is checked for the presence of NaNs and INFs. If found, an appropriate error message is output and the job is terminated. [BFB]
In recent development NaNs and INFs are often first
identified when passed to the shr_reprosum_calc routine,
where they either lead to segmentation faults or to
very slow performance (due to the interaction of NaNs and
INFs with the reproducible sum logic). To more readily
identify this error condition (and to prevent false
attributions of error to shr_reprosum_calc), the input array
is checked for the presence of NaNs and INFs. If found,
an appropriate error message is output and the job is
terminated.
[BFB]