Print

Print


Hello,

I've been playing with the steady state evolution features of ECJ.   
One of my steady state experiments reached my checkpoint modulo of  
100, and began repeatedly re-writing the checkpoint file, like this:

Generation 99
Checkpointing
Wrote out checkpoint file experiment129.100.gz
Generation 100
Checkpointing
Wrote out checkpoint file experiment129.100.gz
Checkpointing
Wrote out checkpoint file experiment129.100.gz
Checkpointing
Wrote out checkpoint file experiment129.100.gz
Checkpointing
Wrote out checkpoint file experiment129.100.gz
Checkpointing
Wrote out checkpoint file experiment129.100.gz
Checkpointing
...etc...

Inspecting ec.steadystate.SteadyStateEvolutionState, I noticed this  
line:

	// CHECKPOINTING
         if (checkpoint && generation%checkpointModulo == 0)

I reasoned that "generation" is only incremented during generation  
boundaries, which for steady state occurs when the number of  
evaluations reaches some multiple of the population size.  Thus, the  
checkpointing will continue unnecessarily until the next generation  
boundary is reached.

Here is my bandaid:

         // CHECKPOINTING
         if (checkpoint && generation%checkpointModulo == 0 &&  
evaluations%checkpointModulo == 0)

Does this look like a valid bug and fix?  I am reluctant to check  
anything into CVS without review.

Thanks,
-Dave