From 84b3601f9027b2fd2241c543db13f0d64ec6380d Mon Sep 17 00:00:00 2001 From: quemy Date: Fri, 22 Nov 2013 08:31:46 +0100 Subject: [PATCH] Invalidate individuals in order to force evaluation in Island. Remove some debug messages. --- smp/src/island.cpp | 5 ++++- smp/src/islandModel.cpp | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/smp/src/island.cpp b/smp/src/island.cpp index ea3e5ea92..783d42d75 100644 --- a/smp/src/island.cpp +++ b/smp/src/island.cpp @@ -140,7 +140,6 @@ void paradiseo::smp::Island::receive(void) std::lock_guard lock(this->m); while (!listImigrants.empty()) { - //std::cout << "On reçoit dans l'île : " << listImigrants.size() << std::endl; eoPop base_offspring = std::move(listImigrants.front()); // Convert objects from base to our objects type @@ -149,8 +148,12 @@ void paradiseo::smp::Island::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(); diff --git a/smp/src/islandModel.cpp b/smp/src/islandModel.cpp index f93362011..e32fb8e4f 100644 --- a/smp/src/islandModel.cpp +++ b/smp/src/islandModel.cpp @@ -118,7 +118,6 @@ void paradiseo::smp::IslandModel::operator()() thread.join(); running = false; - std::cout << "hhhhhhh" << listEmigrants.size() << std::endl; } template