From 28cac78c055d0406843eb1890ba3e2d40d752334 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 6 Jun 2016 11:23:04 +0200 Subject: [PATCH 1/2] Removed critical regions --- scripts/generate_h_apply.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_h_apply.py b/scripts/generate_h_apply.py index 5a4d41de..e5006b12 100755 --- a/scripts/generate_h_apply.py +++ b/scripts/generate_h_apply.py @@ -248,13 +248,13 @@ class H_apply(object): """ self.data["deinit_thread"] = """ - !$OMP CRITICAL + ! OMP CRITICAL do k=1,N_st sum_e_2_pert_in(k) = sum_e_2_pert_in(k) + sum_e_2_pert(k) sum_norm_pert_in(k) = sum_norm_pert_in(k) + sum_norm_pert(k) sum_H_pert_diag_in(k) = sum_H_pert_diag_in(k) + sum_H_pert_diag(k) enddo - !$OMP END CRITICAL + ! OMP END CRITICAL deallocate (e_2_pert_buffer, coef_pert_buffer) """ self.data["size_max"] = "8192" @@ -356,12 +356,12 @@ class H_apply(object): self.data["skip"] = """ if (i_generator < size_select_max) then if (select_max(i_generator) < selection_criterion_min*selection_criterion_factor) then - !$OMP CRITICAL + ! OMP CRITICAL do k=1,N_st norm_psi(k) = norm_psi(k) + psi_coef_generators(i_generator,k)*psi_coef_generators(i_generator,k) pt2_old(k) = 0.d0 enddo - !$OMP END CRITICAL + ! OMP END CRITICAL cycle endif select_max(i_generator) = 0.d0 From 5502f94503bed5906c371c09152c9eb91ac5fcea Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 6 Jun 2016 15:40:14 +0200 Subject: [PATCH 2/2] Allocatable minilist --- src/Determinants/slater_rules.irp.f | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Determinants/slater_rules.irp.f b/src/Determinants/slater_rules.irp.f index 9bcc95f9..967ac9a3 100644 --- a/src/Determinants/slater_rules.irp.f +++ b/src/Determinants/slater_rules.irp.f @@ -904,12 +904,13 @@ subroutine create_minilist_find_previous(key_mask, fullList, miniList, N_fullLis integer, intent(in) :: Nint integer(bit_kind), intent(in) :: fullList(Nint, 2, N_fullList) integer(bit_kind),intent(out) :: miniList(Nint, 2, N_fullList) - integer(bit_kind) :: subList(Nint, 2, N_fullList) + integer(bit_kind), allocatable :: subList(:,:,:) logical,intent(out) :: fullMatch integer,intent(out) :: N_miniList integer(bit_kind) :: key_mask(Nint, 2) integer :: ni, i, k, l, N_subList + allocate (subList(Nint, 2, N_fullList)) fullMatch = .false. N_miniList = 0 @@ -962,6 +963,8 @@ subroutine create_minilist_find_previous(key_mask, fullList, miniList, N_fullLis enddo N_minilist = N_minilist + N_subList end if + + deallocate(sublist) end subroutine