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

Remove an omp parallel do directive due to thread-unsafe cpu_clock #173

Merged
merged 1 commit into from
Jan 9, 2021

Conversation

alperaltuntas
Copy link
Member

This PR removes an omp parallel do directive from MOM_set_diffusivity.F90. This is because the do-loop includes thread-unsafe cpu_clock_begin and cpu_clock_end calls. An alternative solution is to divide the outer j-loop into three parts and isolate the thread-unsafe calls, which would arguably degrade clarity, and (perhaps) non-omp performance.

Fixes: #161

@codecov-io
Copy link

codecov-io commented Jan 8, 2021

Codecov Report

Merging #173 (0262e93) into dev/ncar (49c0167) will decrease coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/ncar     #173      +/-   ##
============================================
- Coverage     43.56%   43.46%   -0.11%     
============================================
  Files           224      224              
  Lines         70511    71095     +584     
============================================
+ Hits          30720    30903     +183     
- Misses        39791    40192     +401     
Impacted Files Coverage Δ
...parameterizations/vertical/MOM_set_diffusivity.F90 64.35% <ø> (ø)
src/framework/MOM_random.F90 0.00% <0.00%> (ø)
src/tracer/MOM_neutral_diffusion.F90 36.04% <0.00%> (+0.90%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49c0167...0262e93. Read the comment docs.

@gustavo-marques gustavo-marques merged commit cc2b999 into dev/ncar Jan 9, 2021
@alperaltuntas alperaltuntas deleted the fix_omp_set_diff branch December 8, 2021 16:59
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.

cpu clock error with OMP in MOM_set_diffusivity.F90
3 participants