Skip to content

Commit 613bb41

Browse files
Updated options to handle checkpointing without exceptions.
1 parent 0d42f31 commit 613bb41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcmctree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ int SaveMCMCstate(char *filename, int ir, double lnpR, double lnL)
492492
fwrite(&lnL, sizeof(double), 1, f);
493493
fclose(f);
494494
free(tmp);
495-
printf("iteration %6d: lnpR = %.2f lnL = %.2f\n", ir, lnpR, lnL);
495+
printf("iteration %6d: lnpR = %.2f lnL = %.2f\n", ir+1, lnpR, lnL);
496496
return(0);
497497
}
498498

@@ -4296,7 +4296,7 @@ int MCMC(FILE* fout)
42964296

42974297
/* save MCMC state */
42984298
if (com.checkpoint == 1 && k > 100 && ir > 0
4299-
&& (ir + 1) % (int)(k * com.checkpointp) == 0)
4299+
&& (ir + 1) % (k /10) == 0)
43004300
SaveMCMCstate(com.checkpointf, ir, data.lnpR, lnL);
43014301
} /* for(ir) */
43024302

0 commit comments

Comments
 (0)