[Paradiseo-help] [PEO] Lesson 4: Parallel transformation

paradiseo-help team paradiseo-help at lists.gforge.inria.fr
Lun 22 Juin 17:43:52 CEST 2009


Dear user,

I took a look at your code and seems fine to me. Indeed, the problem may 
come from your packing and unpacking functions.
Are you sure you pack and unpack correctly? I suggest you to pack and 
unpack an individual and check that the individual has not changed. This 
way
you would be absolutely sure if this is the cause of the trouble.

Kind regards.
ParadisEO help team.

Clément Perrod wrote:
> Hi!
>
> Me, again.
>
> I am using PARADISEO with my own problem: PDP (same kind as (C)VRP-TW) 
> and I have a genetic algorithm where the mutation operator has been 
> changed with a simulated annealing. It works well but it is very... slow !
>
> So I wanted to parallelize the SA. I followed the lesson 4 and my 
> application gives me this kind of error:
>
>     Fatal error in MPI_Isend: Invalid rank, error stack:
>     MPI_Isend(152): MPI_Isend(buf=0x18bd1930, count=6396, MPI_PACKED,
>     dest=2, tag=18, MPI_COMM_WORLD, request=0x18b32fc0) failed
>     MPI_Isend(104): Invalid rank has value 2 but must be nonnegative
>     and less than 2Terminated
>
>
> My schema.xml is the same as for the parallelization of the evaluation 
> function (which works well).
>
> What kind of problem can it be in my code? As a novice with MPI and 
> PEO I don't know what to do...
> Can this error come from my pack/unpack functions?
>
> My code (assuming I also wrote pack/unpack functions):
>
>                    // Evaluation function
>                    PDPEvalFunc plainEval;
>
>                    // Initializer
>                    PDPInit init;
>
>                    // Population Initialization
>                    unsigned popSize = parser.createParam
>     (unsigned(100), "popSize", "Population siwze",
>     'P',"Configuration").value ();
>                    eoPop<PDP> pop (popSize, init);
>
>                    // Crossover
>                    PDPEOCrossover cross;
>                   
>                    ////////////////// SA PART //////////////////
>                    // Random move
>                    PDPMORandMove randomMove;
>                    // Incremental evaluation
>                    PDPMOIncrEval incrementalEval;
>                    // SA parameters
>                    double threshold = 1;
>                    double linearRatio = 0.98;
>                    moCoolingSchedule* coolingSchedule = new
>     moGeometricCoolingSchedule (threshold, linearRatio);
>                    double initialTemperature = 10;
>                    // Stopping criteria
>                    moGenSolContinue<PDP> continu (maxIterations);
>                    // Simulated Annealing
>                    moSA<PDPMOMove> simulated_annealing (randomMove,
>     incrementalEval,
>                            continu, initialTemperature,
>     *coolingSchedule, plainEval);
>
>                    ////////////////// GA PART //////////////////
>                    eoStochTournamentSelect<PDP> selectOne (0.7);
>                    eoSelectPerc<PDP> select (selectOne);
>                    eoEPReplacement<PDP> replace (2);
>                 
>                    eoGenContinue<PDP> genCont (maxGen);
>
>                    ////////////////// PEO PART //////////////////
>                    peo::init (argc, argv);
>                    peoTransform<PDP> transform (cross, pCross,
>     simulated_annealing, pMut);
>                    eoEasyEA<PDP> ga (genCont, plainEval, select,
>     transform, replace);
>                    peoWrapper pea (ga, pop);
>                    transform.setOwner (pea);
>
>                    std::cerr << "Running algorithm..." << std::endl;
>                    peo :: run();
>                    peo :: finalize();
>
>                    if (getNodeRank () == 1)
>                    {
>                      // Solution
>                      PDP solution;
>                      solution = pop.best_element ();
>                      std::cout << std::endl;
>                    }
>
>
>
>
> Sincerely,
>
> -- 
> Clément Perrod
> EPITA 2009
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Paradiseo-help mailing list
> Paradiseo-help at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/paradiseo-help





Plus d'informations sur la liste de diffusion Paradiseo-help