Clear the sentMessages container in Island and IslandModel in order to use the model more than once (Nils Mangelsen)
This commit is contained in:
parent
23df679f51
commit
bbe3553f47
2 changed files with 6 additions and 0 deletions
|
|
@ -68,6 +68,9 @@ void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::operator()()
|
||||||
// Let's wait the end of communications with the island model
|
// Let's wait the end of communications with the island model
|
||||||
for(auto& message : sentMessages)
|
for(auto& message : sentMessages)
|
||||||
message.join();
|
message.join();
|
||||||
|
|
||||||
|
// Clear the sentMessages container
|
||||||
|
sentMessages.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<template <class> class EOAlgo, class EOT, class bEOT>
|
template<template <class> class EOAlgo, class EOT, class bEOT>
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,9 @@ void paradiseo::smp::IslandModel<EOT>::operator()()
|
||||||
for(auto& message : sentMessages)
|
for(auto& message : sentMessages)
|
||||||
message.join();
|
message.join();
|
||||||
|
|
||||||
|
// Clear the sentMessages container
|
||||||
|
sentMessages.clear();
|
||||||
|
|
||||||
// Force last integration
|
// Force last integration
|
||||||
i = 0;
|
i = 0;
|
||||||
for(auto it : islands)
|
for(auto it : islands)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue