From cf93d6aeb4eb2ddb299526ecc2f91e695c755311 Mon Sep 17 00:00:00 2001 From: quemy Date: Sat, 24 Nov 2012 16:23:01 +0100 Subject: [PATCH] Mecanism to isolate stopped island in topology --- smp/src/bimap.h | 7 ------- smp/src/island.cpp | 41 +++++++++++++++++++--------------------- smp/src/island.h | 3 +-- smp/src/islandModel.cpp | 11 ++++++++--- smp/test/t-smpIsland.cpp | 7 ++++--- 5 files changed, 32 insertions(+), 37 deletions(-) diff --git a/smp/src/bimap.h b/smp/src/bimap.h index 4b1adfed6..8d85bc102 100644 --- a/smp/src/bimap.h +++ b/smp/src/bimap.h @@ -57,13 +57,6 @@ public: { rightAssociation[a] = b; leftAssociation[b] = a; - - std::cout << "DUMP" << std::endl; - for(auto i : rightAssociation) - std::cout << i.first << "------" << i.second << std::endl; - for(auto i : leftAssociation) - std::cout << i.first << "------" << i.second << std::endl; - std::cout << "END DUMP" << std::endl; } std::map getRight() const diff --git a/smp/src/island.cpp b/smp/src/island.cpp index 52b9b74af..1d9cb8a52 100644 --- a/smp/src/island.cpp +++ b/smp/src/island.cpp @@ -43,7 +43,8 @@ paradiseo::smp::Island::Island(unsigned _popSize, eoInit& _chro pop(_popSize, _chromInit), intPolicy(_intPolicy), migPolicy(_migPolicy), - stopped(false) + stopped(false), + model(nullptr) { // Check in compile time the inheritance thanks to type_trait. static_assert(std::is_base_of,EOAlgo>::value, "Algorithm must inherit from eoAlgo"); @@ -58,6 +59,7 @@ void paradiseo::smp::Island::operator()() for(auto& message : sentMessages) message.join(); stopped = true; + //std::cout << "Fin de l'île " << this << std::endl; } template