Skip to content

Commit

Permalink
RI-HFX| fixing regtests
Browse files Browse the repository at this point in the history
  • Loading branch information
abussy committed Oct 27, 2021
1 parent 8d1019c commit e6dc803
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
3 changes: 0 additions & 3 deletions src/hfx_ri.F
Original file line number Diff line number Diff line change
Expand Up @@ -1875,9 +1875,6 @@ SUBROUTINE hfx_ri_forces_mo(qs_env, ri_data, nspins, hf_fraction, mo_coeff, mo_c
END DO
CALL timestop(handle)

!Convert the MO tensors to dense block format (bsizes_RI_fit, or blk_size=1 since MO is not so ?)
!TODO: try the above for performance later (prob before S^-1 contraction) (for GPUs)

! 5) Force due to d/dx (P|Q)
CALL timeset(routineN//"_PQ_der", handle)
CALL dbcsr_t_copy(t_3c_2, t_3c_3)
Expand Down
3 changes: 1 addition & 2 deletions src/mp2.F
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ SUBROUTINE mp2_main(qs_env, calc_forces)
IF (ASSOCIATED(qs_env%x_data)) THEN
free_hfx_buffer = .TRUE.
IF (calc_forces .AND. (.NOT. mp2_env%ri_mp2%free_hfx_buffer)) free_hfx_buffer = .FALSE.
IF (qs_env%x_data(1, 1)%do_hfx_ri) free_hfx_buffer = .FALSE.
END IF

IF (.NOT. do_kpoints_cubic_RPA) THEN
Expand All @@ -450,7 +451,6 @@ SUBROUTINE mp2_main(qs_env, calc_forces)
DO irep = 1, n_rep_hf
DO i_thread = 0, n_threads - 1
actual_x_data => qs_env%x_data(irep, i_thread + 1)
IF (actual_x_data%do_hfx_ri) CYCLE
do_dynamic_load_balancing = .TRUE.
IF (n_threads == 1 .OR. actual_x_data%memory_parameter%do_disk_storage) do_dynamic_load_balancing = .FALSE.
Expand Down Expand Up @@ -697,7 +697,6 @@ SUBROUTINE mp2_main(qs_env, calc_forces)
DO irep = 1, n_rep_hf
DO i_thread = 0, n_threads - 1
actual_x_data => qs_env%x_data(irep, i_thread + 1)
IF (actual_x_data%do_hfx_ri) CYCLE
do_dynamic_load_balancing = .TRUE.
IF (n_threads == 1 .OR. actual_x_data%memory_parameter%do_disk_storage) do_dynamic_load_balancing = .FALSE.
Expand Down
3 changes: 1 addition & 2 deletions src/mp2_cphf.F
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,14 @@ SUBROUTINE solve_z_vector_eq(qs_env, mp2_env, para_env, dft_control, &
CALL section_vals_get(hfx_sections, explicit=do_hfx, n_repetition=n_rep_hf)
IF (do_hfx) THEN
! here we check if we have to reallocate the HFX container
IF (mp2_env%ri_mp2%free_hfx_buffer) THEN
IF (mp2_env%ri_mp2%free_hfx_buffer .AND. (.NOT. qs_env%x_data(1, 1)%do_hfx_ri)) THEN
CALL timeset(routineN//"_alloc_hfx", handle2)
n_threads = 1
!$ n_threads = omp_get_max_threads()

DO irep = 1, n_rep_hf
DO i_thread = 0, n_threads - 1
actual_x_data => qs_env%x_data(irep, i_thread + 1)
IF (actual_x_data%do_hfx_ri) CYCLE

do_dynamic_load_balancing = .TRUE.
IF (n_threads == 1 .OR. actual_x_data%memory_parameter%do_disk_storage) do_dynamic_load_balancing = .FALSE.
Expand Down
1 change: 1 addition & 0 deletions tests/QS/regtest-hfx-ri-2/CH-hfx-ri-rho.inp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
&HF
&RI
RI_FLAVOR RHO
EPS_FILTER 1.0E-12
&END
&END
&END XC
Expand Down
1 change: 1 addition & 0 deletions tests/QS/regtest-hfx-ri-2/H2O-hfx-stress-identity.inp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
&END XC_FUNCTIONAL
&HF
&RI
EPS_FILTER 1.0E-12
&END
&INTERACTION_POTENTIAL
POTENTIAL_TYPE IDENTITY
Expand Down
4 changes: 2 additions & 2 deletions tests/QS/regtest-hfx-ri-2/TEST_FILES
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#Testing the forces:
CH-hfx-ri-rho.inp 11 1.0E-8 -38.259646458859827
CH-hfx-ri-rho.inp 11 1.0E-8 -38.259646529584394
CH-hfx-ri-mo.inp 11 1.0E-9 -38.262303893579102
Ne-hfx-pbc-metric-rho.inp 11 1.0E-9 -633.525916555354343
Ne-hfx-pbc-metric-mo.inp 11 1.0E-9 -632.285120513072002
CH3-b3lyp-ADMM.inp 11 1.0E-9 -7.413742783916254
H2O-pbe0-stress-truncated.inp 31 1.0E-9 2.01366131588E-01
H2O-hfx-stress-identity.inp 31 1.0E-9 6.44733085054E-02
H2O-hfx-stress-identity.inp 31 1.0E-8 6.44733085405E-02
#EOF
1 change: 1 addition & 0 deletions tests/QS/regtest-mp2-grad/H2O_grad_ri-hfx.inp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
T_C_G_DATA t_c_g.dat
&END
&RI
EPS_FILTER 1.0E-12
&END RI
&END HF
&WF_CORRELATION
Expand Down
1 change: 1 addition & 0 deletions tests/QS/regtest-mp2-grad/O2_dyn_ri-hfx.inp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
T_C_G_DATA t_c_g.dat
&END
&RI
EPS_FILTER 1.0E-12
&END
&END HF
&WF_CORRELATION
Expand Down
4 changes: 2 additions & 2 deletions tests/QS/regtest-mp2-grad/TEST_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ CH_dyn_screen.inp 11 2e-04
MOM_MP2_geoopt.inp 11 2e-06 -13.969926262647746
H2O_MD_mme.inp 11 1e-10 -17.056807598425291
H2_MP2_debug.inp 11 1e-10 -1.146241031776471
H2O_grad_ri-hfx.inp 11 1e-10 -16.763446635143474
O2_dyn_ri-hfx.inp 11 1e-10 -31.518462685641584
H2O_grad_ri-hfx.inp 11 1e-10 -16.763446635150810
O2_dyn_ri-hfx.inp 11 1e-10 -31.518462685646885
#EOF

0 comments on commit e6dc803

Please sign in to comment.