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

Threading issue in ocn_data_hadgem #128

Closed
dabail10 opened this issue Apr 27, 2018 · 2 comments
Closed

Threading issue in ocn_data_hadgem #128

dabail10 opened this issue Apr 27, 2018 · 2 comments
Assignees

Comments

@dabail10
Copy link
Contributor

dabail10 commented Apr 27, 2018

workx and worky need to be OMP PRIVATE here. Found by Keith Lindsay, NCAR

!$OMP PARALLEL DO PRIVATE(iblk,i,j)
do iblk = 1, nblocks
do j = 1, ny_block
do i = 1, nx_block

           workx      = uocn(i,j,iblk) 
           worky      = vocn(i,j,iblk)
           uocn(i,j,iblk) = workx*cos(ANGLET(i,j,iblk)) & 
                              + worky*sin(ANGLET(i,j,iblk))   
           vocn(i,j,iblk) = worky*cos(ANGLET(i,j,iblk)) & 
                              - workx*sin(ANGLET(i,j,iblk))

           uocn(i,j,iblk) = uocn(i,j,iblk) * cm_to_m
           vocn(i,j,iblk) = vocn(i,j,iblk) * cm_to_m

        enddo		! i
        enddo		! j
     enddo		! nblocks
     !$OMP END PARALLEL DO
@dabail10 dabail10 self-assigned this Apr 27, 2018
@dabail10
Copy link
Contributor Author

I fixed this. It will be in a PR soon.

@dabail10
Copy link
Contributor Author

This was fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant