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);
|
std::lock_guard<std::mutex> lock(this->m);
|
||||||
while (!listImigrants.empty())
|
while (!listImigrants.empty())
|
||||||
{
|
{
|
||||||
//std::cout << "On reçoit dans l'île : " << listImigrants.size() << std::endl;
|
|
||||||
eoPop<bEOT> base_offspring = std::move(listImigrants.front());
|
eoPop<bEOT> base_offspring = std::move(listImigrants.front());
|
||||||
|
|
||||||
// Convert objects from base to our objects type
|
// 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)));
|
offspring.push_back(std::move(convertFromBase(indi)));
|
||||||
|
|
||||||
// Evaluate objects to integrate
|
// Evaluate objects to integrate
|
||||||
|
// We first invalidate the individuals in order to explicitly force the evaluation
|
||||||
for(auto& indi : offspring)
|
for(auto& indi : offspring)
|
||||||
|
{
|
||||||
|
indi.invalidate();
|
||||||
eval(indi);
|
eval(indi);
|
||||||
|
}
|
||||||
|
|
||||||
intPolicy(pop, offspring);
|
intPolicy(pop, offspring);
|
||||||
listImigrants.pop();
|
listImigrants.pop();
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,6 @@ void paradiseo::smp::IslandModel<EOT>::operator()()
|
||||||
thread.join();
|
thread.join();
|
||||||
|
|
||||||
running = false;
|
running = false;
|
||||||
std::cout << "hhhhhhh" << listEmigrants.size() << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class EOT>
|
template<class EOT>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue