From: nbrouard Date: Sun, 17 Nov 2024 17:32:07 +0000 (+0100) Subject: * src/imach.c: Fixing memory leak which made execution random in s X-Git-Url: https://henry.ined.fr/git/?a=commitdiff_plain;h=af54db87423771ecdb29e91011f13dddf0540209;p=.git * src/imach.c: Fixing memory leak which made execution random in s This error existed since the praxis algorithm has been implemented in "s" series. Sorry for that. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e281ac1..b30785d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.13..3.26.3) set(PACKAGE_NAME "imach") SET(IMACH_VERSION_MAJOR 0) -SET(IMACH_VERSION_MINOR 99s11) +SET(IMACH_VERSION_MINOR 99s12) SET(IMACH_VERSION_PATCH 0) SET(IMACH_VERSION_NOTE "") SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR}) diff --git a/src/Makefile b/src/Makefile index cf17b14..0d62dd2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -284,6 +284,11 @@ uploaddmg: uploadsetup: rsync -v ../build/Output/imach-$(VERSION)-icl-setup.exe brouard@henry.ined.fr:/home/euroreves/html/imach/Download +TESTFILE=../tests/testV2.imach + +valgrind-test : imach $(TESTFILE) + valgrind --dsymutil=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./imach $(TESTFILE) + $(PARAM).htm: imach $(PARAM).imach data1.txt ./imach $(PARAM).imach diff --git a/src/imach.c b/src/imach.c index ef99faf..654bae1 100644 --- a/src/imach.c +++ b/src/imach.c @@ -3694,7 +3694,7 @@ double praxis(double tol, double macheps, double h0, int _n, int _prin, double * e=vector(1, n); tflin=vector(1, n); v=matrix(1, n, 1, n); - for(i=1;i<=n;i++){d[i]=y[i]=z[i]=q0[0]=e[i]=tflin[i]=0.;} + for(i=1;i<=n;i++){d[i]=y[i]=z[i]=q0[i]=e[i]=tflin[i]=0.;} small_windows = (macheps) * (macheps); vsmall = small_windows*small_windows; large = 1.0/small_windows; vlarge = 1.0/vsmall; m2 = sqrt(macheps); m4 = sqrt(m2); diff --git a/src/version.h b/src/version.h index 1180d3d..a7255f4 100644 --- a/src/version.h +++ b/src/version.h @@ -1,5 +1,5 @@ #define __IMACH_VERSION_MAJOR__ 0 -#define __IMACH_VERSION_MINOR__ 99s11 +#define __IMACH_VERSION_MINOR__ 99s12 #define __IMACH_VERSION_PATCH__ 0 #define __IMACH_VERSION__ "0.99s11"