From ccc7bcb8098ff70e46e05358e830a5184f6186a3 Mon Sep 17 00:00:00 2001 From: Andrei Mesinger Date: Fri, 5 Oct 2018 15:32:07 +0200 Subject: [PATCH] fixed bug when using discrete halos and removed unneeded fftwf_destroy statments in find_HII_bubbles.c --- Programs/find_HII_bubbles.c | 74 +++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/Programs/find_HII_bubbles.c b/Programs/find_HII_bubbles.c index 560377b..3a70b03 100755 --- a/Programs/find_HII_bubbles.c +++ b/Programs/find_HII_bubbles.c @@ -600,7 +600,9 @@ int main(int argc, char ** argv){ fftwf_free(N_rec_filtered); free(Fcoll); if (HALO_MASS_DEPENDENT_IONIZING_EFFICIENCY) {destroy_21cmMC_arrays();} - + fftwf_destroy_plan(plan); + fftwf_cleanup(); + return -1; } @@ -664,8 +666,8 @@ int main(int argc, char ** argv){ } plan = fftwf_plan_dft_c2r_3d(HII_DIM, HII_DIM, HII_DIM, (fftwf_complex *)deltax_filtered, (float *)deltax_filtered, FFTW_ESTIMATE); fftwf_execute(plan); - fftwf_destroy_plan(plan); - fftwf_cleanup(); + // fftwf_destroy_plan(plan); + // fftwf_cleanup(); fprintf(LOG, "end fft with R=%f, clock=%06.2f\n", R, (double)clock()/CLOCKS_PER_SEC); fflush(LOG); @@ -715,46 +717,46 @@ int main(int argc, char ** argv){ initialiseGL_Nion(NGL_SFR, M_TURN, massofscaleR); initialise_Nion_spline(REDSHIFT, massofscaleR,M_TURN,ALPHA_STAR,ALPHA_ESC,F_STAR10,F_ESC10,Mlim_Fstar,Mlim_Fesc); } + } - for (x=0; x