Clear the sentMessages container in Island and IslandModel in order to use the model more than once (Nils Mangelsen)

This commit is contained in:
quemy 2013-02-07 22:04:14 +01:00
commit bbe3553f47
2 changed files with 6 additions and 0 deletions

View file

@ -68,6 +68,9 @@ void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::operator()()
// Let's wait the end of communications with the island model
for(auto& message : sentMessages)
message.join();
// Clear the sentMessages container
sentMessages.clear();
}
template<template <class> class EOAlgo, class EOT, class bEOT>

View file

@ -99,6 +99,9 @@ void paradiseo::smp::IslandModel<EOT>::operator()()
for(auto& message : sentMessages)
message.join();
// Clear the sentMessages container
sentMessages.clear();
// Force last integration
i = 0;
for(auto it : islands)