Skip to content

Commit

Permalink
Low-scaling RPA: adapt regtests
Browse files Browse the repository at this point in the history
- accuracy more sensitive to filter thresholds due to optimized blocking
- enable regtests for serial testing (reverts 0c22640)
  • Loading branch information
pseewald committed Feb 24, 2020
1 parent 9b43173 commit 24abbe5
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 39 deletions.
36 changes: 12 additions & 24 deletions src/mp2_gpw.F
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ SUBROUTINE mp2_gpw_main(qs_env, mp2_env, Emp2, Emp2_Cou, Emp2_EX, Emp2_S, Emp2_T
CHARACTER(LEN=*), PARAMETER :: routineN = 'mp2_gpw_main', routineP = moduleN//':'//routineN

INTEGER :: blacs_grid_layout, color_sub, comm_sub, dimen, dimen_RI, dimen_RI_red, &
eri_method, group_size_3c, group_size_P, gw_corr_lev_occ, gw_corr_lev_occ_beta, &
gw_corr_lev_virt, gw_corr_lev_virt_beta, handle, homo, homo_beta, local_unit_nr, &
my_group_L_end, my_group_L_size, my_group_L_start, nelectron, nelectron_beta, nmo, &
nspins, potential_type, ri_metric_type
eri_method, gw_corr_lev_occ, gw_corr_lev_occ_beta, gw_corr_lev_virt, &
gw_corr_lev_virt_beta, handle, homo, homo_beta, local_unit_nr, my_group_L_end, &
my_group_L_size, my_group_L_start, nelectron, nelectron_beta, nmo, nspins, &
potential_type, ri_metric_type
INTEGER, ALLOCATABLE, DIMENSION(:) :: ends_array_mc, ends_array_mc_block, &
starts_array_mc, starts_array_mc_block
INTEGER, DIMENSION(3) :: periodic
Expand Down Expand Up @@ -281,27 +281,15 @@ SUBROUTINE mp2_gpw_main(qs_env, mp2_env, Emp2, Emp2_Cou, Emp2_EX, Emp2_S, Emp2_T
IF (do_im_time) THEN

IF (.NOT. mp2_env%ri_rpa_im_time%group_size_internal) THEN
group_size_3c = mp2_env%ri_rpa_im_time%group_size_3c

IF (group_size_3c > para_env%num_pe) THEN

group_size_3c = para_env%num_pe
mp2_env%ri_rpa_im_time%group_size_3c = para_env%num_pe

END IF

IF (mp2_env%ri_rpa_im_time%group_size_P > para_env%num_pe) THEN
mp2_env%ri_rpa_im_time%group_size_P = para_env%num_pe
END IF

group_size_P = mp2_env%ri_rpa_im_time%group_size_P

! only allow group_size_P which is a factor of the total number of MPI tasks
CPASSERT(MODULO(para_env%num_pe, group_size_P) == 0)

! only allow group_size_3c which is a factor of the total number of MPI tasks
CPASSERT(MODULO(para_env%num_pe, group_size_3c) == 0)
ASSOCIATE (group_size_3c=>mp2_env%ri_rpa_im_time%group_size_3c, group_size_P=>mp2_env%ri_rpa_im_time%group_size_P)
DO WHILE (MOD(para_env%num_pe, group_size_3c) .NE. 0)
group_size_3c = group_size_3c - 1
END DO

DO WHILE (MOD(para_env%num_pe, group_size_P) .NE. 0)
group_size_P = group_size_P - 1
END DO
END ASSOCIATE
ENDIF

IF (mp2_env%ri_metric%potential_type == ri_default) mp2_env%ri_metric%potential_type = do_potential_id
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-ri-rpa-rse/Cubic_RPA_RSE_H2.inp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
&WFC_GPW
! normally, this EPS_FILTER controls the accuracy and
! the time for the cubic_scaling RPA calculation
EPS_FILTER 1.0E-5
EPS_FILTER 1.0E-6
EPS_GRID 1.0E-4
&END
! ERI_METHOD MME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
&END
ERI_METHOD MME
&LOW_SCALING
EPS_FILTER 1.0E-4
EPS_FILTER 1.0E-5
EPS_FILTER_FACTOR 1.0
&END
&RI_RPA
Expand Down
2 changes: 1 addition & 1 deletion tests/QS/regtest-rpa-cubic-scaling/Cubic_RPA_CH3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
POTENTIAL_TYPE IDENTITY
&END
&LOW_SCALING
EPS_FILTER 1.0E-6
EPS_FILTER 1.0E-7
&END
&RI_RPA
RPA_NUM_QUAD_POINTS 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
&END
ERI_METHOD MME
&LOW_SCALING
EPS_FILTER 1.0E-6
EPS_FILTER 1.0E-7
!MEMORY_INFO
! normally, increase MEMORY_CUT for large systems
! not to run out of memory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
POTENTIAL_TYPE IDENTITY
&END
&LOW_SCALING
EPS_FILTER 1.0E-6
EPS_FILTER 1.0E-7
&END
&RI_RPA
RPA_NUM_QUAD_POINTS 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
EPS_FILTER 1.0E-7
MEMORY_CUT 2
!MEMORY_INFO
&TEST
GROUP_SIZE_3C 2
GROUP_SIZE_P 2
&END
DO_KPOINTS
&END LOW_SCALING
&RI_RPA
Expand Down
8 changes: 4 additions & 4 deletions tests/QS/regtest-rpa-cubic-scaling/TEST_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Cubic_RPA_H2O_standard.inp 11 1e-08 -
Cubic_RPA_H2O_check_filtering.inp 11 1e-08 -17.160043265154691
Cubic_RPA_H2O_check_group_sizes.inp 11 1e-08 -17.157441957209130
Cubic_RPA_2x_H2_check_filtering.inp 11 1e-08 -2.119159936957426
Cubic_RPA_CH3.inp 11 3e-07 -7.415770007082211
Cubic_RPA_CH3.inp 11 3e-07 -7.415769010864526
Cubic_RPA_H2O_standard_svd.inp 11 1e-08 -17.160037461527960
Cubic_RPA_H2O_trunc.inp 11 1e-08 -17.160104846593164
RPA_kpoints_H2O.inp 11 1e-08 -17.384611923474342
RPA_kpoints_H2O_non_zero_group_sizes.inp 11 1e-08 -17.384611923474342
RPA_kpoints_from_Gamma_H2O.inp 11 1e-08 -17.384614981790069
RPA_kpoints_H2O.inp 11 1e-08 -17.384611631024235
RPA_kpoints_H2O_batched.inp 11 1e-08 -17.384611631024235
RPA_kpoints_from_Gamma_H2O.inp 11 1e-08 -17.384614689370530
#EOF
4 changes: 2 additions & 2 deletions tests/TEST_DIRS
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ QS/regtest-ri-laplace-mp2 libint
QS/regtest-pexsi pexsi
QS/regtest-sym-1
QS/regtest-rma-3D libint mpi3 mpiranks==8
QS/regtest-rpa-cubic-scaling libint mpiranks==2||mpiranks==4||mpiranks==6||mpiranks==16||mpiranks==24
QS/regtest-rpa-cubic-scaling libint
QS/regtest-cdft-4-3
Fist/regtest-1-2
Fist/regtest-1-3
Expand Down Expand Up @@ -261,7 +261,7 @@ Fist/regtest-quip quip
ATOM/regtest-libxc libxc
Fist/regtest-plumed2 plumed2
QS/regtest-sto
QS/regtest-ri-laplace-mp2-cubic libint mpiranks==2||mpiranks==4||mpiranks==6||mpiranks==16||mpiranks==24
QS/regtest-ri-laplace-mp2-cubic libint
QS/regtest-dm-ls-scf-4
QS/regtest-almo-trustr
QS/regtest-nlmo

0 comments on commit 24abbe5

Please sign in to comment.