|
|
| version 1.119, 2006/03/15 17:42:26 | version 1.126, 2006/04/28 17:23:28 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ | /* $Id$ |
| $State$ | $State$ |
| $Log$ | $Log$ |
| Revision 1.126 2006/04/28 17:23:28 brouard | |
| (Module): Yes the sum of survivors was wrong since | |
| imach-114 because nhstepm was no more computed in the age | |
| loop. Now we define nhstepma in the age loop. | |
| Version 0.98h | |
| Revision 1.125 2006/04/04 15:20:31 lievre | |
| Errors in calculation of health expectancies. Age was not initialized. | |
| Forecasting file added. | |
| Revision 1.124 2006/03/22 17:13:53 lievre | |
| Parameters are printed with %lf instead of %f (more numbers after the comma). | |
| The log-likelihood is printed in the log file | |
| Revision 1.123 2006/03/20 10:52:43 brouard | |
| * imach.c (Module): <title> changed, corresponds to .htm file | |
| name. <head> headers where missing. | |
| * imach.c (Module): Weights can have a decimal point as for | |
| English (a comma might work with a correct LC_NUMERIC environment, | |
| otherwise the weight is truncated). | |
| Modification of warning when the covariates values are not 0 or | |
| 1. | |
| Version 0.98g | |
| Revision 1.122 2006/03/20 09:45:41 brouard | |
| (Module): Weights can have a decimal point as for | |
| English (a comma might work with a correct LC_NUMERIC environment, | |
| otherwise the weight is truncated). | |
| Modification of warning when the covariates values are not 0 or | |
| 1. | |
| Version 0.98g | |
| Revision 1.121 2006/03/16 17:45:01 lievre | |
| * imach.c (Module): Comments concerning covariates added | |
| * imach.c (Module): refinements in the computation of lli if | |
| status=-2 in order to have more reliable computation if stepm is | |
| not 1 month. Version 0.98f | |
| Revision 1.120 2006/03/16 15:10:38 lievre | |
| (Module): refinements in the computation of lli if | |
| status=-2 in order to have more reliable computation if stepm is | |
| not 1 month. Version 0.98f | |
| Revision 1.119 2006/03/15 17:42:26 brouard | Revision 1.119 2006/03/15 17:42:26 brouard |
| (Module): Bug if status = -2, the loglikelihood was | (Module): Bug if status = -2, the loglikelihood was |
| computed as likelihood omitting the logarithm. Version O.98e | computed as likelihood omitting the logarithm. Version O.98e |
| Line 329 extern int errno; | Line 374 extern int errno; |
| /* $Id$ */ | /* $Id$ */ |
| /* $State$ */ | /* $State$ */ |
| char version[]="Imach version 0.98e, March 2006, INED-EUROREVES-Institut de longevite "; | char version[]="Imach version 0.98h, April 2006, INED-EUROREVES-Institut de longevite "; |
| char fullversion[]="$Revision$ $Date$"; | char fullversion[]="$Revision$ $Date$"; |
| char strstart[80]; | char strstart[80]; |
| char optionfilext[10], optionfilefiname[FILENAMELENGTH]; | char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
| Line 404 char strcurr[80], strfor[80]; | Line 449 char strcurr[80], strfor[80]; |
| char *endptr; | char *endptr; |
| long lval; | long lval; |
| double dval; | |
| #define NR_END 1 | #define NR_END 1 |
| #define FREE_ARG char* | #define FREE_ARG char* |
| Line 969 void powell(double p[], double **xi, int | Line 1015 void powell(double p[], double **xi, int |
| last_time=curr_time; | last_time=curr_time; |
| (void) gettimeofday(&curr_time,&tzp); | (void) gettimeofday(&curr_time,&tzp); |
| printf("\nPowell iter=%d -2*LL=%.12f %ld sec. %ld sec.",*iter,*fret, curr_time.tv_sec-last_time.tv_sec, curr_time.tv_sec-start_time.tv_sec);fflush(stdout); | printf("\nPowell iter=%d -2*LL=%.12f %ld sec. %ld sec.",*iter,*fret, curr_time.tv_sec-last_time.tv_sec, curr_time.tv_sec-start_time.tv_sec);fflush(stdout); |
| /* fprintf(ficlog,"\nPowell iter=%d -2*LL=%.12f %ld sec. %ld sec.",*iter,*fret, curr_time.tv_sec-last_time.tv_sec, curr_time.tv_sec-start_time.tv_sec); | fprintf(ficlog,"\nPowell iter=%d -2*LL=%.12f %ld sec. %ld sec.",*iter,*fret, curr_time.tv_sec-last_time.tv_sec, curr_time.tv_sec-start_time.tv_sec); fflush(ficlog); |
| fprintf(ficrespow,"%d %.12f %ld",*iter,*fret,curr_time.tv_sec-start_time.tv_sec); | /* fprintf(ficrespow,"%d %.12f %ld",*iter,*fret,curr_time.tv_sec-start_time.tv_sec); */ |
| */ | |
| for (i=1;i<=n;i++) { | for (i=1;i<=n;i++) { |
| printf(" %d %.12f",i, p[i]); | printf(" %d %.12f",i, p[i]); |
| fprintf(ficlog," %d %.12lf",i, p[i]); | fprintf(ficlog," %d %.12lf",i, p[i]); |
| Line 1386 double func( double *x) | Line 1431 double func( double *x) |
| } else if (s2==-2) { | } else if (s2==-2) { |
| for (j=1,survp=0. ; j<=nlstate; j++) | for (j=1,survp=0. ; j<=nlstate; j++) |
| survp += out[s1][j]; | survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
| /*survp += out[s1][j]; */ | |
| lli= log(survp); | lli= log(survp); |
| } | } |
| /* else if (s2==-4) { */ | else if (s2==-4) { |
| /* for (j=3,survp=0. ; j<=nlstate; j++) */ | for (j=3,survp=0. ; j<=nlstate; j++) |
| /* survp += out[s1][j]; */ | survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
| /* lli= survp; */ | lli= log(survp); |
| /* } */ | } |
| /* else if (s2==-5) { */ | |
| /* for (j=1,survp=0. ; j<=2; j++) */ | |
| /* survp += out[s1][j]; */ | |
| /* lli= survp; */ | |
| /* } */ | |
| else if (s2==-5) { | |
| for (j=1,survp=0. ; j<=2; j++) | |
| survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; | |
| lli= log(survp); | |
| } | |
| else{ | else{ |
| lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ | lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ |
| /* lli= (savm[s1][s2]>(double)1.e-8 ?log((1.+bbh)*out[s1][s2]- bbh*(savm[s1][s2])):log((1.+bbh)*out[s1][s2]));*/ /* linear interpolation */ | /* lli= (savm[s1][s2]>(double)1.e-8 ?log((1.+bbh)*out[s1][s2]- bbh*(savm[s1][s2])):log((1.+bbh)*out[s1][s2]));*/ /* linear interpolation */ |
| Line 1599 double funcone( double *x) | Line 1644 double funcone( double *x) |
| lli=log(out[s1][s2] - savm[s1][s2]); | lli=log(out[s1][s2] - savm[s1][s2]); |
| } else if (s2==-2) { | } else if (s2==-2) { |
| for (j=1,survp=0. ; j<=nlstate; j++) | for (j=1,survp=0. ; j<=nlstate; j++) |
| survp += out[s1][j]; | survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
| lli= log(survp); | lli= log(survp); |
| }else if (mle==1){ | }else if (mle==1){ |
| lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ | lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ |
| Line 2427 void evsij(char fileres[], double ***eij | Line 2472 void evsij(char fileres[], double ***eij |
| { | { |
| /* Health expectancies, no variances */ | /* Health expectancies, no variances */ |
| int i, j, nhstepm, hstepm, h, nstepm, k, cptj, cptj2, i2, j2; | int i, j, nhstepm, hstepm, h, nstepm, k, cptj, cptj2, i2, j2; |
| int nhstepma, nstepma; /* Decreasing with age */ | |
| double age, agelim, hf; | double age, agelim, hf; |
| double ***p3mat; | double ***p3mat; |
| double eip; | double eip; |
| Line 2473 void evsij(char fileres[], double ***eij | Line 2519 void evsij(char fileres[], double ***eij |
| hstepm=hstepm/stepm; /* Typically in stepm units, if stepm=6 & estepm=24 , = 24/6 months = 4 */ | hstepm=hstepm/stepm; /* Typically in stepm units, if stepm=6 & estepm=24 , = 24/6 months = 4 */ |
| agelim=AGESUP; | agelim=AGESUP; |
| /* nhstepm age range expressed in number of stepm */ | /* If stepm=6 months */ |
| nstepm=(int) rint((agelim-age)*YEARM/stepm); | /* Computed by stepm unit matrices, product of hstepm matrices, stored |
| in an array of nhstepm length: nhstepm=10, hstepm=4, stepm=6 months */ | |
| /* nhstepm age range expressed in number of stepm */ | |
| nstepm=(int) rint((agelim-bage)*YEARM/stepm); /* Biggest nstepm */ | |
| /* Typically if 20 years nstepm = 20*12/6=40 stepm */ | /* Typically if 20 years nstepm = 20*12/6=40 stepm */ |
| /* if (stepm >= YEARM) hstepm=1;*/ | /* if (stepm >= YEARM) hstepm=1;*/ |
| nhstepm = nstepm/hstepm;/* Expressed in hstepm, typically nhstepm=40/4=10 */ | nhstepm = nstepm/hstepm;/* Expressed in hstepm, typically nhstepm=40/4=10 */ |
| p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm); | p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm); |
| for (age=bage; age<=fage; age ++){ /* If stepm=6 months */ | for (age=bage; age<=fage; age ++){ |
| /* Computed by stepm unit matrices, product of hstepm matrices, stored | nstepma=(int) rint((agelim-bage)*YEARM/stepm); /* Biggest nstepm */ |
| in an array of nhstepm length: nhstepm=10, hstepm=4, stepm=6 months */ | /* Typically if 20 years nstepm = 20*12/6=40 stepm */ |
| /* if (stepm >= YEARM) hstepm=1;*/ | |
| nhstepma = nstepma/hstepm;/* Expressed in hstepm, typically nhstepma=40/4=10 */ | |
| /* If stepm=6 months */ | |
| /* Computed by stepm unit matrices, product of hstepma matrices, stored | |
| in an array of nhstepma length: nhstepma=10, hstepm=4, stepm=6 months */ | |
| hpxij(p3mat,nhstepm,age,hstepm,x,nlstate,stepm,oldm, savm, cij); | hpxij(p3mat,nhstepma,age,hstepm,x,nlstate,stepm,oldm, savm, cij); |
| hf=hstepm*stepm/YEARM; /* Duration of hstepm expressed in year unit. */ | hf=hstepm*stepm/YEARM; /* Duration of hstepm expressed in year unit. */ |
| Line 2526 void cvevsij(char fileres[], double ***e | Line 2582 void cvevsij(char fileres[], double ***e |
| to initial status i, ei. . | to initial status i, ei. . |
| */ | */ |
| int i, j, nhstepm, hstepm, h, nstepm, k, cptj, cptj2, i2, j2, ij, ji; | int i, j, nhstepm, hstepm, h, nstepm, k, cptj, cptj2, i2, j2, ij, ji; |
| int nhstepma, nstepma; /* Decreasing with age */ | |
| double age, agelim, hf; | double age, agelim, hf; |
| double ***p3matp, ***p3matm, ***varhe; | double ***p3matp, ***p3matm, ***varhe; |
| double **dnewm,**doldm; | double **dnewm,**doldm; |
| Line 2599 void cvevsij(char fileres[], double ***e | Line 2656 void cvevsij(char fileres[], double ***e |
| /* If stepm=6 months */ | /* If stepm=6 months */ |
| /* nhstepm age range expressed in number of stepm */ | /* nhstepm age range expressed in number of stepm */ |
| agelim=AGESUP; | agelim=AGESUP; |
| nstepm=(int) rint((agelim-age)*YEARM/stepm); | nstepm=(int) rint((agelim-bage)*YEARM/stepm); |
| /* Typically if 20 years nstepm = 20*12/6=40 stepm */ | /* Typically if 20 years nstepm = 20*12/6=40 stepm */ |
| /* if (stepm >= YEARM) hstepm=1;*/ | /* if (stepm >= YEARM) hstepm=1;*/ |
| nhstepm = nstepm/hstepm;/* Expressed in hstepm, typically nhstepm=40/4=10 */ | nhstepm = nstepm/hstepm;/* Expressed in hstepm, typically nhstepm=40/4=10 */ |
| Line 2612 void cvevsij(char fileres[], double ***e | Line 2669 void cvevsij(char fileres[], double ***e |
| gm=matrix(0,nhstepm,1,nlstate*nlstate); | gm=matrix(0,nhstepm,1,nlstate*nlstate); |
| for (age=bage; age<=fage; age ++){ | for (age=bage; age<=fage; age ++){ |
| nstepma=(int) rint((agelim-bage)*YEARM/stepm); /* Biggest nstepm */ | |
| /* Computed by stepm unit matrices, product of hstepm matrices, stored | /* Typically if 20 years nstepm = 20*12/6=40 stepm */ |
| in an array of nhstepm length: nhstepm=10, hstepm=4, stepm=6 months */ | /* if (stepm >= YEARM) hstepm=1;*/ |
| nhstepma = nstepma/hstepm;/* Expressed in hstepm, typically nhstepma=40/4=10 */ | |
| /* If stepm=6 months */ | |
| /* Computed by stepm unit matrices, product of hstepma matrices, stored | |
| in an array of nhstepma length: nhstepma=10, hstepm=4, stepm=6 months */ | |
| hf=hstepm*stepm/YEARM; /* Duration of hstepm expressed in year unit. */ | hf=hstepm*stepm/YEARM; /* Duration of hstepm expressed in year unit. */ |
| /* Computing Variances of health expectancies */ | /* Computing Variances of health expectancies */ |
| Line 2666 void cvevsij(char fileres[], double ***e | Line 2728 void cvevsij(char fileres[], double ***e |
| varhe[ij][ji][(int)age] += doldm[ij][ji]*hf*hf; | varhe[ij][ji][(int)age] += doldm[ij][ji]*hf*hf; |
| } | } |
| } | } |
| /* Computing expectancies */ | /* Computing expectancies */ |
| hpxij(p3matm,nhstepm,age,hstepm,x,nlstate,stepm,oldm, savm, cij); | hpxij(p3matm,nhstepm,age,hstepm,x,nlstate,stepm,oldm, savm, cij); |
| for(i=1; i<=nlstate;i++) | for(i=1; i<=nlstate;i++) |
| Line 3448 void printinghtml(char fileres[], char t | Line 3511 void printinghtml(char fileres[], char t |
| - Period (stable) prevalence in each health state: <a href=\"%s\">%s</a> <br>\n", | - Period (stable) prevalence in each health state: <a href=\"%s\">%s</a> <br>\n", |
| subdirf2(fileres,"pl"),subdirf2(fileres,"pl")); | subdirf2(fileres,"pl"),subdirf2(fileres,"pl")); |
| fprintf(fichtm,"\ | fprintf(fichtm,"\ |
| - (a) Life expectancies by health status at initial age, (b) health expectancies by health status at initial age: ei., eij (estepm=%2d months): \ | - (a) Life expectancies by health status at initial age, (b) health expectancies by health status at initial age: ei., eij . If one or more covariate are included, specific tables for each value of the covariate are output in sequences within the same file (estepm=%2d months): \ |
| <a href=\"%s\">%s</a> <br>\n</li>", | <a href=\"%s\">%s</a> <br>\n", |
| estepm,subdirf2(fileres,"e"),subdirf2(fileres,"e")); | estepm,subdirf2(fileres,"e"),subdirf2(fileres,"e")); |
| fprintf(fichtm,"\ | |
| - Population projections by age and states: \ | |
| <a href=\"%s\">%s</a> <br>\n</li>", subdirf2(fileres,"f"),subdirf2(fileres,"f")); | |
| fprintf(fichtm," \n<ul><li><b>Graphs</b></li><p>"); | fprintf(fichtm," \n<ul><li><b>Graphs</b></li><p>"); |
| Line 4547 int main(int argc, char *argv[]) | Line 4612 int main(int argc, char *argv[]) |
| free_ma3x(delti3,1,nlstate,1, nlstate+ndeath-1,1,ncovmodel); | free_ma3x(delti3,1,nlstate,1, nlstate+ndeath-1,1,ncovmodel); |
| fclose (ficparo); | fclose (ficparo); |
| fclose (ficlog); | fclose (ficlog); |
| goto end; | |
| exit(0); | exit(0); |
| } | } |
| else if(mle==-3) { | else if(mle==-3) { |
| Line 4577 int main(int argc, char *argv[]) | Line 4643 int main(int argc, char *argv[]) |
| j++; | j++; |
| fscanf(ficpar,"%1d%1d",&i1,&j1); | fscanf(ficpar,"%1d%1d",&i1,&j1); |
| if ((i1 != i) && (j1 != j)){ | if ((i1 != i) && (j1 != j)){ |
| printf("Error in line parameters number %d, %1d%1d instead of %1d%1d \n",numlinepar, i,j, i1, j1); | printf("Error in line parameters number %d, %1d%1d instead of %1d%1d \n \ |
| It might be a problem of design; if ncovcol and the model are correct\n \ | |
| run imach with mle=-1 to get a correct template of the parameter file.\n",numlinepar, i,j, i1, j1); | |
| exit(1); | exit(1); |
| } | } |
| fprintf(ficparo,"%1d%1d",i1,j1); | fprintf(ficparo,"%1d%1d",i1,j1); |
| Line 4801 int main(int argc, char *argv[]) | Line 4869 int main(int argc, char *argv[]) |
| cutv(stra, strb,line,' '); | cutv(stra, strb,line,' '); |
| errno=0; | errno=0; |
| lval=strtol(strb,&endptr,10); | dval=strtod(strb,&endptr); |
| if( strb[0]=='\0' || (*endptr != '\0')){ | if( strb[0]=='\0' || (*endptr != '\0')){ |
| printf("Error reading data around '%d' at line number %ld %s for individual %d\nShould be a weight. Exiting.\n",lval, i,line,linei); | printf("Error reading data around '%f' at line number %ld, \"%s\" for individual %d\nShould be a weight. Exiting.\n",dval, i,line,linei); |
| exit(1); | exit(1); |
| } | } |
| weight[i]=(double)(lval); | weight[i]=dval; |
| strcpy(line,stra); | strcpy(line,stra); |
| for (j=ncovcol;j>=1;j--){ | for (j=ncovcol;j>=1;j--){ |
| Line 4818 int main(int argc, char *argv[]) | Line 4886 int main(int argc, char *argv[]) |
| exit(1); | exit(1); |
| } | } |
| if(lval <-1 || lval >1){ | if(lval <-1 || lval >1){ |
| printf("Error reading data around '%d' at line number %ld %s for individual %d, '%s'\nShould be a value of the %d covar (meaning 0 for the reference or 1. IMaCh does not build design variables, do it your self). Exiting.\n",lval,linei, i,line,j); | printf("Error reading data around '%d' at line number %ld for individual %d, '%s'\n \ |
| Should be a value of %d(nth) covariate (0 should be the value for the reference and 1\n \ | |
| for the alternative. IMaCh does not build design variables automatically, do it yourself.\n \ | |
| For example, for multinomial values like 1, 2 and 3,\n \ | |
| build V1=0 V2=0 for the reference value (1),\n \ | |
| V1=1 V2=0 for (2) \n \ | |
| and V1=0 V2=1 for (3). V1=1 V2=1 should not exist and the corresponding\n \ | |
| output of IMaCh is often meaningless.\n \ | |
| Exiting.\n",lval,linei, i,line,j); | |
| exit(1); | exit(1); |
| } | } |
| covar[j][i]=(double)(lval); | covar[j][i]=(double)(lval); |
| Line 5114 int main(int argc, char *argv[]) | Line 5190 int main(int argc, char *argv[]) |
| printf("Problem with %s \n",optionfilehtmcov), exit(0); | printf("Problem with %s \n",optionfilehtmcov), exit(0); |
| } | } |
| else{ | else{ |
| fprintf(fichtmcov,"<body>\n<title>IMaCh Cov %s</title>\n <font size=\"2\">%s <br> %s</font> \ | fprintf(fichtmcov,"<html><head>\n<title>IMaCh Cov %s</title></head>\n <body><font size=\"2\">%s <br> %s</font> \ |
| <hr size=\"2\" color=\"#EC5E5E\"> \n\ | <hr size=\"2\" color=\"#EC5E5E\"> \n\ |
| Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\n",\ | Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\n",\ |
| fileres,version,fullversion,title,datafile,firstpass,lastpass,stepm, weightopt, model); | optionfilehtmcov,version,fullversion,title,datafile,firstpass,lastpass,stepm, weightopt, model); |
| } | } |
| fprintf(fichtm,"<body>\n<title>IMaCh %s</title>\n <font size=\"2\">%s <br> %s</font> \ | fprintf(fichtm,"<html><head>\n<title>IMaCh %s</title></head>\n <body><font size=\"2\">%s <br> %s</font> \ |
| <hr size=\"2\" color=\"#EC5E5E\"> \n\ | <hr size=\"2\" color=\"#EC5E5E\"> \n\ |
| Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\n\ | Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\n\ |
| \n\ | \n\ |
| Line 5131 Title=%s <br>Datafile=%s Firstpass=%d La | Line 5207 Title=%s <br>Datafile=%s Firstpass=%d La |
| - Log file of the run: <a href=\"%s\">%s</a><br>\n\ | - Log file of the run: <a href=\"%s\">%s</a><br>\n\ |
| - Gnuplot file name: <a href=\"%s\">%s</a><br>\n\ | - Gnuplot file name: <a href=\"%s\">%s</a><br>\n\ |
| - Date and time at start: %s</ul>\n",\ | - Date and time at start: %s</ul>\n",\ |
| fileres,version,fullversion,title,datafile,firstpass,lastpass,stepm, weightopt, model,\ | optionfilehtm,version,fullversion,title,datafile,firstpass,lastpass,stepm, weightopt, model,\ |
| optionfilefiname,optionfilext,optionfilefiname,optionfilext,\ | optionfilefiname,optionfilext,optionfilefiname,optionfilext,\ |
| fileres,fileres,\ | fileres,fileres,\ |
| filelog,filelog,optionfilegnuplot,optionfilegnuplot,strstart); | filelog,filelog,optionfilegnuplot,optionfilegnuplot,strstart); |
| Line 5314 Interval (in months) between two waves: | Line 5390 Interval (in months) between two waves: |
| fprintf(ficlog,"%d%d ",i,k); | fprintf(ficlog,"%d%d ",i,k); |
| fprintf(ficres,"%1d%1d ",i,k); | fprintf(ficres,"%1d%1d ",i,k); |
| for(j=1; j <=ncovmodel; j++){ | for(j=1; j <=ncovmodel; j++){ |
| printf("%f ",p[jk]); | printf("%lf ",p[jk]); |
| fprintf(ficlog,"%f ",p[jk]); | fprintf(ficlog,"%lf ",p[jk]); |
| fprintf(ficres,"%f ",p[jk]); | fprintf(ficres,"%lf ",p[jk]); |
| jk++; | jk++; |
| } | } |
| printf("\n"); | printf("\n"); |
| Line 5896 Interval (in months) between two waves: | Line 5972 Interval (in months) between two waves: |
| fprintf(ficlog,"Total time was %d Sec.\n", end_time.tv_sec -start_time.tv_sec); | fprintf(ficlog,"Total time was %d Sec.\n", end_time.tv_sec -start_time.tv_sec); |
| /* printf("Total time was %d uSec.\n", total_usecs);*/ | /* printf("Total time was %d uSec.\n", total_usecs);*/ |
| /* if(fileappend(fichtm,optionfilehtm)){ */ | /* if(fileappend(fichtm,optionfilehtm)){ */ |
| fprintf(fichtm,"<br>Local time at start %s<br>Local time at end %s<br>",strstart, strtend); | fprintf(fichtm,"<br>Local time at start %s<br>Local time at end %s<br>\n</body></html>",strstart, strtend); |
| fclose(fichtm); | fclose(fichtm); |
| fprintf(fichtmcov,"<br>Local time at start %s<br>Local time at end %s<br>\n</body></html>",strstart, strtend); | |
| fclose(fichtmcov); | fclose(fichtmcov); |
| fclose(ficgp); | fclose(ficgp); |
| fclose(ficlog); | fclose(ficlog); |