=================================================================== RCS file: /home/cvs/OpenXM/src/hgm/mh/src/wmain.c,v retrieving revision 1.31 retrieving revision 1.35 diff -u -p -r1.31 -r1.35 --- OpenXM/src/hgm/mh/src/wmain.c 2016/02/13 22:56:50 1.31 +++ OpenXM/src/hgm/mh/src/wmain.c 2016/06/04 07:52:14 1.35 @@ -1,5 +1,5 @@ /* - $OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.30 2016/02/13 05:55:09 takayama Exp $ + $OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.34 2016/03/02 00:27:02 takayama Exp $ License: LGPL */ #include @@ -179,7 +179,7 @@ struct MH_RESULT *mh_main(int argc,char *argv[]) { if (MH_strategy) { if (MH_abserr > SIGDIGIT_DEFAULT*myabs(y0[0])) { MH_success = 0; - oxprintfe("%%%%Warning, abserr seems not to be small enough, abserr=%lg, y[0]=%lg. Increasing the starting point (q0 or X0g(standalone case)) may help.\n",MH_abserr,y0[0]); + oxprintfe("%%%%Warning, abserr seems not to be small enough, abserr=%lg, y[0]=%lg. Increasing the starting point (q0 or X0g(standalone case)) may or making abserr (err[1] or abserror(standalone case)) smaller will help, e.g., err=c(1e-20,1e-10)\n",MH_abserr,y0[0]); }else{ MH_success = 1; } @@ -242,7 +242,7 @@ static int setParamDefault() { Ef = 0.01034957388338225707; MH_X0g = 0.3; MH_Hg = 0.001; - MH_Dp = 1; + MH_Dp = 1000; Xng = 10.0; return(0); } #ifdef STANDALONE @@ -316,7 +316,7 @@ static int setParam(char *fname) { Ef=1.0; /* exponential factor */ MH_Ef_type=1; MH_Hg=0.01; /* step size for RK */ - MH_Dp = 1; /* sampling rate */ + MH_Dp = -1; /* sampling rate */ Xng = 10.0; /* terminal point for RK */ /* Parser for the old style (version <2.0) input */ @@ -594,6 +594,10 @@ static int setParam(char *fname) { } if ((MH_M < 0) || (MH_A_pFq==NULL)) { oxprintfe("MH_M and p_pFq, q_pFq are compulsory parameters.\n"); mh_exit(-1); + } + if (MH_Dp < 0) MH_Dp = (int) floor(1/MH_Hg); + if (MH_P95 && (MH_Dp*MH_Hg < 2.0)) { + oxprintfe("%%%%Warning, the resolution to find 95 percent point is less than 2.0. Decrease Dp\n"); } mh_fclose(fp); return(0);