diff --git a/org/qmckl_jastrow_champ.org b/org/qmckl_jastrow_champ.org index 0696a0c..1f1dbad 100644 --- a/org/qmckl_jastrow_champ.org +++ b/org/qmckl_jastrow_champ.org @@ -5685,7 +5685,7 @@ qmckl_exit_code qmckl_compute_een_rescaled_e_hpc ( #endif for (size_t nw = 0; nw < (size_t) walk_num; ++nw) { - double een_rescaled_e_ij[len_een_ij]; + double* een_rescaled_e_ij = malloc(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) { @@ -5754,6 +5754,7 @@ qmckl_exit_code qmckl_compute_een_rescaled_e_hpc ( } } + free(een_rescaled_e_ij); } return QMCKL_SUCCESS;