Skip to content

Commit

Permalink
Fixed gradient of Jastrow in HPC version
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Feb 21, 2024
1 parent e07b8bf commit 21f40b3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion org/qmckl_jastrow_champ.org
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 21f40b3

Please sign in to comment.