--- imach/src/imach.c 2018/04/21 21:02:16 1.285 +++ imach/src/imach.c 2018/04/27 14:27:04 1.286 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.285 2018/04/21 21:02:16 brouard Exp $ +/* $Id: imach.c,v 1.286 2018/04/27 14:27:04 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.286 2018/04/27 14:27:04 brouard + Summary: some minor bugs + Revision 1.285 2018/04/21 21:02:16 brouard Summary: Some bugs fixed, valgrind tested @@ -1060,12 +1063,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.285 2018/04/21 21:02:16 brouard Exp $ */ +/* $Id: imach.c,v 1.286 2018/04/27 14:27:04 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; char copyright[]="April 2018,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2018"; -char fullversion[]="$Revision: 1.285 $ $Date: 2018/04/21 21:02:16 $"; +char fullversion[]="$Revision: 1.286 $ $Date: 2018/04/27 14:27:04 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -10302,7 +10305,7 @@ void syscompilerinfo(int logged) #endif #endif - // void main() + // void main () // { #if defined(_MSC_VER) if (IsWow64()){ @@ -11026,9 +11029,15 @@ int main(int argc, char *argv[]) fprintf(ficlog,"Not 11 parameters, for example:ftol=1.e-8 stepm=12 ncovcol=2 nqv=1 ntv=2 nqtv=1 nlstate=2 ndeath=1 maxwav=3 mle=1 weight=1\n"); fprintf(ficlog,"but line=%s\n",line); } - printf("ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); + if( lastpass > maxwav){ + printf("Error (lastpass = %d) > (maxwav = %d)\n",lastpass, maxwav); + fprintf(ficlog,"Error (lastpass = %d) > (maxwav = %d)\n",lastpass, maxwav); + fflush(ficlog); + goto end; + } + printf("ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); fprintf(ficparo,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); - fprintf(ficres,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); + fprintf(ficres,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, 0, weightopt); fprintf(ficlog,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); } /* ftolpl=6*ftol*1.e5; /\* 6.e-3 make convergences in less than 80 loops for the prevalence limit *\/ */ @@ -11637,7 +11646,7 @@ Title=%s
Datafile=%s Firstpass=%d La firstpass, lastpass, stepm, weightopt, model); fprintf(fichtm,"\n"); - fprintf(fichtm,"

Parameter line 2