Doubt
LuisAmaral2010 opened this issue · comments
Is there only one population shared among the ranks, or has each rank its own population?
I thank your answer previously.
Luís Amaral
Each rank has its own (replicated) population. Only the calculus of the scores is parallelized and shared at the end of each iteration. This approach is efficient when the scores computation requires the execution of an expensive simulation.
I am using their algorithm to a project of graduate studies. And I need to explain how the population is replicated. Also, I need shown in the code as it happens.
I understand Their algorithm uses MPI_Send and MPI_Recv on Population class to transmit the scores between the rows.
How does your algorithm to transmit the chromosomes of the population among the ranks?
I thank your answer previously.
Luís Amaral
All the tasks start with the same population, using the same random seed. Each task evaluates a portion of the individuals, obtaining its scores. The score data is sent to the first task, gathering the full vector and sending it back to the others. With this information each tasks performs genetic operations, obtaining all the same next generation. The communication steps are commented in the file: ga-mpi/GAPopulation.C