10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 04:43:50 +01:00

Barrier is not implicit after OMP_SINGLE

This commit is contained in:
Anthony Scemama 2015-11-13 13:22:25 +01:00
parent e033596481
commit 66e1ef316d

View File

@ -1248,17 +1248,18 @@ subroutine H_u_0(v_0,u_0,H_jj,n,keys_tmp,Nint)
ASSERT (Nint > 0) ASSERT (Nint > 0)
ASSERT (Nint == N_int) ASSERT (Nint == N_int)
ASSERT (n>0) ASSERT (n>0)
PROVIDE ref_bitmask_energy PROVIDE ref_bitmask_energy davidson_criterion
v_0 = 0.d0
!$OMP PARALLEL DEFAULT(NONE) & !$OMP PARALLEL DEFAULT(NONE) &
!$OMP PRIVATE(i,hij,j,k,idx,jj,vt,ii,sh,sh2,ni,exa,ext,org_i,org_j,endi) & !$OMP PRIVATE(i,hij,j,k,idx,jj,vt,ii,sh,sh2,ni,exa,ext,org_i,org_j,endi) &
!$OMP SHARED(n,H_jj,u_0,keys_tmp,Nint,v_0,davidson_threshold,sorted,shortcut,sort_idx,version,davidson_criterion_is_built) !$OMP SHARED(n,H_jj,u_0,keys_tmp,Nint,v_0,davidson_threshold,sorted,shortcut,sort_idx,version)
allocate(idx(0:n), vt(n)) allocate(idx(0:n), vt(n))
Vt = 0.d0 Vt = 0.d0
v_0 = 0.d0
!$OMP SINGLE !$OMP SINGLE
call sort_dets_ab_v(keys_tmp, sorted, sort_idx, shortcut, version, n, Nint) call sort_dets_ab_v(keys_tmp, sorted, sort_idx, shortcut, version, n, Nint)
!$OMP END SINGLE !$OMP END SINGLE
!$OMP BARRIER
!$OMP DO SCHEDULE(dynamic) !$OMP DO SCHEDULE(dynamic)
do sh=1,shortcut(0) do sh=1,shortcut(0)
@ -1298,9 +1299,11 @@ subroutine H_u_0(v_0,u_0,H_jj,n,keys_tmp,Nint)
enddo enddo
!$OMP END DO !$OMP END DO
integer :: omp_get_num_threads , omp_get_thread_num
!$OMP SINGLE !$OMP SINGLE
call sort_dets_ba_v(keys_tmp, sorted, sort_idx, shortcut, version, n, Nint) call sort_dets_ba_v(keys_tmp, sorted, sort_idx, shortcut, version, n, Nint)
!$OMP END SINGLE !$OMP END SINGLE
!$OMP BARRIER
!$OMP DO SCHEDULE(dynamic) !$OMP DO SCHEDULE(dynamic)
do sh=1,shortcut(0) do sh=1,shortcut(0)