Skip to content

Commit

Permalink
forcing sync threads before MPI isend and irecv and once after
Browse files Browse the repository at this point in the history
  • Loading branch information
suvarchal committed Feb 9, 2024
1 parent b502a93 commit 14cd58e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gen_support.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ subroutine smooth_nod2D(arr, N, partit, mesh)
arr(node)=work_array(node)
ENDDO
!$OMP END PARALLEL DO
!$OMP BARRIER
!$OMP MASTER
call exchange_nod(arr, partit)
!$OMP END MASTER
Expand Down Expand Up @@ -151,6 +152,7 @@ subroutine smooth_nod3D(arr, N_smooth, partit, mesh)
END DO
END DO
!$OMP END DO
!$OMP BARRIER
!$OMP MASTER
call exchange_nod(arr, partit)
!$OMP END MASTER
Expand Down Expand Up @@ -185,6 +187,7 @@ subroutine smooth_nod3D(arr, N_smooth, partit, mesh)
END DO
END DO
!$OMP END DO
!$OMP BARRIER
!$OMP MASTER
call exchange_nod(arr, partit)
!$OMP END MASTER
Expand Down Expand Up @@ -224,6 +227,7 @@ subroutine smooth_elem2D(arr, N, partit, mesh)
work_array(node)=work_array(node)/vol
END DO
!$OMP END DO
!$OMP BARRIER
!$OMP MASTER
call exchange_nod(work_array, partit)
!$OMP END MASTER
Expand All @@ -234,6 +238,7 @@ subroutine smooth_elem2D(arr, N, partit, mesh)
arr(elem)=sum(work_array(elnodes))/3.0_WP ! Here, we need the inverse and scale by 1/3
ENDDO
!$OMP END DO
!$OMP BARRIER
!$OMP MASTER
call exchange_elem(arr, partit)
!$OMP END MASTER
Expand Down Expand Up @@ -286,6 +291,7 @@ subroutine smooth_elem3D(arr, N, partit, mesh)
work_array(node)=work_array(node)/vol
END DO
!$OMP END DO
!$OMP BARRIER
!$OMP MASTER
call exchange_nod(work_array, partit)
!$OMP END MASTER
Expand Down

0 comments on commit 14cd58e

Please sign in to comment.