Fixed gradient of Jastrow in HPC version

This commit is contained in:
Anthony Scemama 2024-02-21 16:33:49 +01:00
parent e07b8bfa55
commit 21f40b3a13
1 changed files with 11 additions and 1 deletions

View File

@ -6610,7 +6610,6 @@ integer function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_f( &
! Prepare table of exponentiated distances raised to appropriate power
do nw = 1, walk_num
een_rescaled_e_gl(:,:,:,:,nw) = 0.d0
do j = 1, elec_num
do i = 1, j-1
rij_inv = 1.0d0 / ee_distance(i, j, nw)
@ -6632,6 +6631,7 @@ integer function qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_f( &
end do
! prepare the actual een table
een_rescaled_e_gl(:,:,:,0,nw) = 0.d0
do l = 1, cord_num
kappa_l = - dble(l) * rescale_factor_ee
do j = 1, elec_num
@ -6804,6 +6804,16 @@ qmckl_exit_code qmckl_compute_jastrow_champ_factor_een_rescaled_e_gl_hpc (
}
}
for (int64_t j = 0; j < elec_num; ++j) {
double* restrict eegl = &een_rescaled_e_gl[ elec_num * 4 * (j + elec_num * (cord_num + 1) * nw)];
#ifdef HAVE_OPENMP
#pragma omp simd
#endif
for (int64_t i = 0; i < 4*elec_num; ++i) {
eegl[i] = 0.0;
}
}
for (int64_t l = 1; l <= cord_num; ++l) {
double kappa_l = - (double)l * rescale_factor_ee;
for (int64_t j = 0; j < elec_num; ++j) {