]> henry.ined.fr Git - .git/commitdiff
* src/imach.c: Fixing memory leak which made execution random in s
authornbrouard <nicolas.brouard@libertysurf.fr>
Sun, 17 Nov 2024 17:32:07 +0000 (18:32 +0100)
committernbrouard <nicolas.brouard@libertysurf.fr>
Sun, 17 Nov 2024 17:32:07 +0000 (18:32 +0100)
This error existed since the praxis algorithm has been implemented in
"s" series. Sorry for that.

CMakeLists.txt
src/Makefile
src/imach.c
src/version.h

index e281ac15f9f6d615ab88141a0495c257c058e80e..b30785dde3f9eaa3da5076ae93d1b726e83fb888 100644 (file)
@@ -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})
index cf17b14b01f316ba718d031100ad3f2afefcd6b6..0d62dd255a49ded0a4c0421d2258c749400f1e0a 100644 (file)
@@ -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
 
index ef99fafb5db04871ba295bdd25f8e1fdc205d1b7..654bae10000d44fd6d4e5a1859d0af3355253037 100644 (file)
@@ -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);
index 1180d3dea085847405112a18db932a5565b70ebd..a7255f40fa8a0a754f113d952089b3d17e28bb2b 100644 (file)
@@ -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"