Print

Print


The new readGenotype prints "Original size: 1 and read-size is 512".  
My species are the same, I only have one subpopulation. Everything is  
pretty simple.

No rush, I totally understand about GECCO's deadline.

A little quote from my parameter file:

pop = ec.Population
pop.subpops = 1

pop.subpop.0 = ec.Subpopulation
pop.subpop.0.species = ec.gp.GPSpecies
pop.subpop.0.species.ind = ec.gp.GPIndividual
pop.subpop.0.species.ind.numtrees = 1
pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree
pop.subpop.0.species.ind.tree.0.tc = tc0

//Brad


On Jan 24, 2008, at 11:39 PM, Sean Luke wrote:

> Interesting... the same parameter file you say?  That'd be odd.  As  
> it turns out, there are *two* reasons for this error.  Either the  
> number of trees being read from the file differs from the number of  
> trees in the original individual, *or* the tree array in the  
> original individual is null.  This second case is unlikely but you  
> can test it by changing readGenotype in GPIndividual.java to be  
> something like:
>
>     /** Overridden for the GPIndividual genotype. */
>     public void readGenotype(final EvolutionState state,
>                              final DataInput dataInput) throws  
> IOException
>         {
>         int treelength = dataInput.readInt();
> 	if (trees == null)
> 	    state.output.fatal("Hmmm... trees are null in readGenotype 
> (EvolutionState, DataInput).");
>         if (treelength != trees.length) // wrong size!
>             state.output.fatal("Number of trees differ in  
> GPIndividual when reading from readGenotype(EvolutionState,  
> DataInput).\n" +
> 	    "Original size: " + trees.length + " and read-size is " +  
> treelength);
>         for(int x=0;x<trees.length;x++)
>             trees[x].readTree(state,dataInput);
>         }
>
> This would also tell us how many trees you have coming in and  
> currently in the individual.
>
> Some other oddities.  Though you're setting  
> gp.individual.numtrees=1, this only gets checked (and used) if you  
> don't have the local parameter set, namely pop.subpop. 
> 0.species.ind.numtrees=1  What do you have set in the local  
> parameter?  Also, how many subpopulations do you have?  Do they  
> have different species?  I'm grasping at straws here but won't be  
> able to really look at it until after the GECCO deadline.
>
> Sean
>
> On Jan 24, 2008, at 10:28 PM, Bradford Barr wrote:
>
>> Hey List,
>>
>> I'm having an issue with an Island model. I keep getting this error:
>>
>> FATAL ERROR:
>> Number of trees differ in GPIndividual when reading from  
>> readGenotype(EvolutionState, DataInput).
>>
>> But both Islands (I'm only using two so I can figure out what's  
>> going on) are using the same parameter file, and I have a command  
>> line parameter saying gp.individual.numtrees=1 for both runs just  
>> to double check.
>>
>> I'm stumped. Can anyone offer any insight?
>>
>> Thanks in advance,
>> Brad Barr