-
Notifications
You must be signed in to change notification settings - Fork 383
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
get_proc_bounds called from threaded region #1369
Comments
@amametjanov: This is a good catch. I'm surprised it wasn't caught early. For the long term fix, I will have a discussion with NCAR CSEG. In the meantime, the easiest fix I can think of is to disable the call to GetGlobalIndex(). |
This bug has been reported to NCAR CSEG as bug-2439. |
Agreed about disabling the call to GetGlobalIndex. But acme.log also had the
which @jayeshkrishna recommends to fix by surrounding the write statements with !$omp master ... !$omp end master. Could you push a fix to master? Needed by @PeterCaldwell. BTW, any idea why an ne120-A_WCYCL run is producing |
A shortcut fix is now open #1370 |
Any news on a possible resolution? I'm seeing Only one thread can be doing IO on a given unit at a time. A proposed patch for review is here: https://gist.github.com/amametjanov/48c7f1d6eb9a97391a97cb0155c9604e. |
One more related item from the same location: acme.log sometimes contains messages like
but the run continues because the call to |
I have some concerns about having this balance check endrun commented out. We should turn it back on, and if we are concerned about fatal errors for trivial balance problems then we should loosen the tolerance. |
@amametjanov: Regarding the proposed patch, can the @thorntonpe: In clm4_5_1_r082 tag, the |
It's not allowed to branch into or out of a critical block: either all threads encounter it or none. It looks like the Another alternative is to call a single write with a format statement like |
I should have read the restrictions section for OMP Critical more carefully. Your propsed solution looks good to me. Do you want to issue a PR or should I? |
Since balance check warning messages are relatively rare, let me test a lighter-weight approach of a single |
Probably adding |
Yes, but |
|
If there is an error in components/clm/src/biogeophys/BalanceCheckMod.F90, there is a call
GetGlobalIndex
which is expected to be called from non-threaded regions: GetGlobalIndex calls get_proc_bounds, which throws an abort.The full stack trace is https://gist.github.com/amametjanov/0b67cf3f9ccec5b67b986ca1d2e43bb6 .
Possible fixes are to either remove the check in get_proc_bounds_new or surround the call sites with !$omp single ... !$omp end single.
The text was updated successfully, but these errors were encountered: