Invalidate individuals in order to force evaluation in Island. Remove some debug messages.
This commit is contained in:
parent
cfbe7ad242
commit
84b3601f90
2 changed files with 4 additions and 2 deletions
|
|
@ -140,7 +140,6 @@ void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::receive(void)
|
|||
std::lock_guard<std::mutex> lock(this->m);
|
||||
while (!listImigrants.empty())
|
||||
{
|
||||
//std::cout << "On reçoit dans l'île : " << listImigrants.size() << std::endl;
|
||||
eoPop<bEOT> base_offspring = std::move(listImigrants.front());
|
||||
|
||||
// Convert objects from base to our objects type
|
||||
|
|
@ -149,8 +148,12 @@ void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::receive(void)
|
|||
offspring.push_back(std::move(convertFromBase(indi)));
|
||||
|
||||
// Evaluate objects to integrate
|
||||
// We first invalidate the individuals in order to explicitly force the evaluation
|
||||
for(auto& indi : offspring)
|
||||
{
|
||||
indi.invalidate();
|
||||
eval(indi);
|
||||
}
|
||||
|
||||
intPolicy(pop, offspring);
|
||||
listImigrants.pop();
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ void paradiseo::smp::IslandModel<EOT>::operator()()
|
|||
thread.join();
|
||||
|
||||
running = false;
|
||||
std::cout << "hhhhhhh" << listEmigrants.size() << std::endl;
|
||||
}
|
||||
|
||||
template<class EOT>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue