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

Clément Perrod clement.perrod at gmail.com
Lun 22 Juin 16:33:58 CEST 2009


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
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.gforge.inria.fr/pipermail/paradiseo-help/attachments/20090622/f1c2f126/attachment.html>


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