Skip to content

Commit

Permalink
Fixing HPC version of jast grad only
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Dec 14, 2024
1 parent 26f9135 commit d3ac2a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion org/qmckl_jastrow_champ.org
Original file line number Diff line number Diff line change
Expand Up @@ -11767,7 +11767,8 @@ qmckl_compute_jastrow_champ_factor_een_grad_hpc(const qmckl_context context,
#pragma omp parallel for
#endif
for (size_t nw = 0; nw < (size_t) walk_num; ++nw) {
memset(&factor_een_grad[elec_num*3*nw], 0, elec_num*3*sizeof(double));
double* const restrict factor_een_grad_0nw = &(factor_een_grad[elec_num*3*nw]);
memset(factor_een_grad_0nw, 0, elec_num*3*sizeof(double));
}
return QMCKL_SUCCESS;
}
Expand All @@ -11779,6 +11780,7 @@ qmckl_compute_jastrow_champ_factor_een_grad_hpc(const qmckl_context context,
#endif
for (size_t nw = 0; nw < (size_t) walk_num; ++nw) {
double* const restrict factor_een_grad_0nw = &(factor_een_grad[elec_num*3*nw]);
memset(factor_een_grad_0nw, 0, elec_num*3*sizeof(double));
for (size_t n = 0; n < (size_t) dim_c_vector; ++n) {
const size_t l = lkpm_combined_index[n];
const size_t k = lkpm_combined_index[n+ dim_c_vector];
Expand Down Expand Up @@ -12972,6 +12974,7 @@ assert(qmckl_jastrow_champ_provided(context));
if (fabs(total_j_grad[k][m][e] - total_j_deriv[k][m][e]) > 1e-12) {
printf("%ld %ld %ld\n", k, m, e);
printf("total_j_grad = %20.15e\n", total_j_grad[k][m][e]);
fflush(stdout);
}
assert (fabs(total_j_deriv[k][m][e] - total_j_grad[k][m][e]) < 1.e-12);
}
Expand Down

0 comments on commit d3ac2a0

Please sign in to comment.