-
Notifications
You must be signed in to change notification settings - Fork 142
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
Insert OpenMP directive, single, around allocation region of module level variables #1109
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added extra checks for module variables in subroutine, 'close_tridiagonal'.
rem1776
approved these changes
Mar 9, 2023
uramirez8707
added a commit
to uramirez8707/FMS
that referenced
this pull request
Apr 6, 2023
* fix - gnu and pgi issue with class(*) in send_data3d (NOAA-GFDL#1149) * feat: extend `string` interface in `fms_string_utils_mod` (NOAA-GFDL#1142) * fix: add omp directives for race condition in tridiagonal (NOAA-GFDL#1109) * fix: missing if statement in PR NOAA-GFDL#1149 (NOAA-GFDL#1155) * fix: time_manager missing changes from year to yr, month to mo, day to dy (NOAA-GFDL#1169) * chore: update changelog and version numbers for release (NOAA-GFDL#1167) * chore: append dev to version number post-release (NOAA-GFDL#1179) --------- Co-authored-by: Niki Zadeh <niki.zadeh@noaa.gov> Co-authored-by: Jesse Lentz <42011922+J-Lentz@users.noreply.github.com> Co-authored-by: ganganoaa <121043264+ganganoaa@users.noreply.github.com> Co-authored-by: MiKyung Lee <58964324+mlee03@users.noreply.github.com> Co-authored-by: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This update relates to race condition due to multiple threads accessing module level variables, 'e', 'g', 'cc', and 'bb' at the same time. The OpenMP directive, 'single', is inserted around the deallocation/allocation regions to avoid the race condition.
Fixes #1108
How Has This Been Tested?
The update was tested with 'make check' and 'make distcheck' without any issues on OS, 'CentOS Stream 8'. The following setup was used for compiler, MPI wrapper, and required packages:
Checklist:
make distcheck
passes