Skip to content

Commit

Permalink
Improved Jastrow
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Feb 14, 2024
1 parent be2a719 commit 2f0ca9f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions org/qmckl_jastrow_champ.org
Original file line number Diff line number Diff line change
Expand Up @@ -6177,19 +6177,22 @@ qmckl_exit_code qmckl_compute_een_rescaled_e_hpc (
const size_t e2 = elec_num*elec_num;

#ifdef HAVE_OPENMP
#pragma omp parallel for
#pragma omp parallel
#endif
for (size_t nw = 0; nw < (size_t) walk_num; ++nw) {

memset(&een_rescaled_e[nw*(cord_num+1)*elec_num*elec_num],0,(cord_num+1)*elec_num*elec_num*sizeof(double));

double* restrict een_rescaled_e_ij = malloc(len_een_ij*sizeof(double));
{
double* restrict een_rescaled_e_ij = calloc(len_een_ij,sizeof(double));

memset(&(een_rescaled_e_ij[0]),0,len_een_ij*sizeof(double));
for (size_t kk = 0; kk < elec_pairs ; ++kk) {
een_rescaled_e_ij[kk]= 1.0;
}

#ifdef HAVE_OPENMP
#pragma omp for
#endif
for (size_t nw = 0; nw < (size_t) walk_num; ++nw) {

memset(&een_rescaled_e[nw*(cord_num+1)*elec_num*elec_num],0,(cord_num+1)*elec_num*elec_num*sizeof(double));

size_t kk = 0;
for (size_t i = 0; i < (size_t) elec_num; ++i) {
double* restrict ee1 = &een_rescaled_e_ij[kk + elec_pairs];
Expand Down Expand Up @@ -6257,8 +6260,9 @@ qmckl_exit_code qmckl_compute_een_rescaled_e_hpc (
}
}

free(een_rescaled_e_ij);
}
free(een_rescaled_e_ij);
} // OpenMP

return QMCKL_SUCCESS;
}
Expand Down

0 comments on commit 2f0ca9f

Please sign in to comment.