Using ParallelApplyJob instead of MultiParallelApplyJob in eoPopEvalFunc.
This commit is contained in:
parent
108c0bcf35
commit
414e011296
2 changed files with 5 additions and 4 deletions
|
|
@ -91,7 +91,7 @@ void parallelApply(
|
||||||
std::vector<EOT>& _pop,
|
std::vector<EOT>& _pop,
|
||||||
eo::mpi::AssignmentAlgorithm& _algo,
|
eo::mpi::AssignmentAlgorithm& _algo,
|
||||||
int _masterRank,
|
int _masterRank,
|
||||||
eo::mpi::ParallelEvalStore<EOT> & _store )
|
eo::mpi::ParallelApplyStore<EOT> & _store )
|
||||||
{
|
{
|
||||||
_store.data( _pop );
|
_store.data( _pop );
|
||||||
_algo.reinit( _pop.size() );
|
_algo.reinit( _pop.size() );
|
||||||
|
|
|
||||||
|
|
@ -96,14 +96,15 @@ class eoParallelPopLoopEval : public eoPopEvalFunc<EOT>
|
||||||
masterRank( _masterRank ),
|
masterRank( _masterRank ),
|
||||||
needToDeleteStore( true )
|
needToDeleteStore( true )
|
||||||
{
|
{
|
||||||
store = new eo::mpi::ParallelEvalStore<EOT>( _eval, _masterRank, _packetSize );
|
// FIXME memory leak because of new.
|
||||||
|
store = new eo::mpi::ParallelApplyStore<EOT>( _eval, _masterRank, _packetSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
eoParallelPopLoopEval(
|
eoParallelPopLoopEval(
|
||||||
// Job parameters
|
// Job parameters
|
||||||
eo::mpi::AssignmentAlgorithm& _assignAlgo,
|
eo::mpi::AssignmentAlgorithm& _assignAlgo,
|
||||||
int _masterRank,
|
int _masterRank,
|
||||||
eo::mpi::ParallelEvalStore<EOT>* _store
|
eo::mpi::ParallelApplyStore<EOT>* _store
|
||||||
) :
|
) :
|
||||||
assignAlgo( _assignAlgo ),
|
assignAlgo( _assignAlgo ),
|
||||||
masterRank( _masterRank ),
|
masterRank( _masterRank ),
|
||||||
|
|
@ -138,7 +139,7 @@ class eoParallelPopLoopEval : public eoPopEvalFunc<EOT>
|
||||||
eo::mpi::AssignmentAlgorithm & assignAlgo;
|
eo::mpi::AssignmentAlgorithm & assignAlgo;
|
||||||
int masterRank;
|
int masterRank;
|
||||||
|
|
||||||
eo::mpi::ParallelEvalStore<EOT>* store;
|
eo::mpi::ParallelApplyStore<EOT>* store;
|
||||||
bool needToDeleteStore;
|
bool needToDeleteStore;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Reference in a new issue