From 5228c287adc3cf9401ec577bedadbd0e7698a665 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 21 Jun 2023 14:42:40 +0200 Subject: [PATCH] Fix #110 --- org/qmckl_jastrow_champ.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;