diff --git a/eo/test/mpi/eval.cpp b/eo/test/mpi/eval.cpp index 312c9d65..72fca755 100644 --- a/eo/test/mpi/eval.cpp +++ b/eo/test/mpi/eval.cpp @@ -11,8 +11,6 @@ #include -#include - #include #include @@ -144,10 +142,10 @@ int main(int ac, char** av) eo::log << "Size of population : " << popSize << std::endl; - eo::mpi::ParallelEvalStore< EOT > store( eval, eo::mpi::DEFAULT_MASTER ); + eo::mpi::ParallelApplyStore< EOT > store( eval, eo::mpi::DEFAULT_MASTER ); store.wrapHandleResponse( new CatBestAnswers ); - eoParallelPopLoopEval< EOT > popEval( eval, assign, &store, eo::mpi::DEFAULT_MASTER, 3 ); + eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, &store ); eo::log << eo::quiet << "Before first evaluation." << std::endl; popEval( pop, pop ); eo::log << eo::quiet << "After first evaluation." << std::endl; @@ -160,7 +158,7 @@ int main(int ac, char** av) } else { eoPop< EOT > pop( popSize, init ); - eoParallelPopLoopEval< EOT > popEval( eval, assign, eo::mpi::DEFAULT_MASTER, 3 ); + eoParallelPopLoopEval< EOT > popEval( assign, eo::mpi::DEFAULT_MASTER, eval ); popEval( pop, pop ); } diff --git a/eo/test/mpi/multipleRoles.cpp b/eo/test/mpi/multipleRoles.cpp index ce10f621..232a6110 100644 --- a/eo/test/mpi/multipleRoles.cpp +++ b/eo/test/mpi/multipleRoles.cpp @@ -1,5 +1,6 @@ # include # include +# include # include @@ -32,9 +33,11 @@ void subtask( vector& v, int rank ) DynamicAssignmentAlgorithm algo( workers ); SubWork sw; - ParallelApplyStore store( sw, v, rank ); + ParallelApplyStore store( sw, rank ); + store.data( v ); ParallelApply job( algo, rank, store ); job.run(); + EmptyJob stop( algo, rank ); } struct Work: public eoUF< vector&, void > @@ -74,11 +77,13 @@ int main(int argc, char** argv) { Work w; DynamicAssignmentAlgorithm algo( 1, 2 ); - ParallelApplyStore< vector > store( w, metaV, 0 ); + ParallelApplyStore< vector > store( w, 0 ); + store.data( metaV ); ParallelApply< vector > job( algo, 0, store ); job.run(); if( job.isMaster() ) { + EmptyJob stop( algo, 0 ); v = metaV[0]; cout << "Results : " << endl; for(int i = 0; i < v.size(); ++i) diff --git a/eo/test/mpi/parallelApply.cpp b/eo/test/mpi/parallelApply.cpp index d562ef0e..26b0b30e 100644 --- a/eo/test/mpi/parallelApply.cpp +++ b/eo/test/mpi/parallelApply.cpp @@ -1,5 +1,6 @@ # include # include +# include # include @@ -110,8 +111,8 @@ int main(int argc, char** argv) for( unsigned int i = 0; i < tests.size(); ++i ) { - ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 3 ); - // Job< JobData > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); + ParallelApplyStore< int > store( plusOneInstance, eo::mpi::DEFAULT_MASTER, 3 ); + store.data( v ); ParallelApply< int > job( *(tests[i].assign), eo::mpi::DEFAULT_MASTER, store ); if( job.isMaster() ) @@ -126,6 +127,7 @@ int main(int argc, char** argv) if( job.isMaster() ) { + EmptyJob stop( *(tests[i].assign), eo::mpi::DEFAULT_MASTER ); ++offset; for(int i = 0; i < v.size(); ++i) { diff --git a/eo/test/mpi/wrapper.cpp b/eo/test/mpi/wrapper.cpp index d8b72c98..527c7cc6 100644 --- a/eo/test/mpi/wrapper.cpp +++ b/eo/test/mpi/wrapper.cpp @@ -1,5 +1,6 @@ # include # include +# include # include @@ -60,13 +61,15 @@ int main(int argc, char** argv) StaticAssignmentAlgorithm assign( v.size() ); - ParallelApplyStore< int > store( plusOneInstance, v, eo::mpi::DEFAULT_MASTER, 1 ); + ParallelApplyStore< int > store( plusOneInstance, eo::mpi::DEFAULT_MASTER, 1 ); + store.data( v ); store.wrapIsFinished( new ShowWrappedResult ); ParallelApply job( assign, eo::mpi::DEFAULT_MASTER, store ); // Equivalent to: // Job< ParallelApplyData > job( assign, 0, store ); job.run(); + EmptyJob stop( assign, eo::mpi::DEFAULT_MASTER ); if( job.isMaster() ) {