Commit 34f3ff0e authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Add the Class FUTestMpi, that have one only attribute : FMpi. The reason is...

Add the Class FUTestMpi, that have one only attribute : FMpi. The reason is the following, FMpi need for its initialisation the args argc and argv, so it cannot be done in RunTest() since its protype is fied (void RunTest(void)). Btw, I overloaded Print function for this class in order to avoid multiple prints (only root prints).
parent bb443606
......@@ -205,8 +205,38 @@ public :
};
#ifdef ScalFMM_USE_MPI
#include "../Src/Utils/FMpi.hpp"
#define TestClassMpi(X) \
int main(int argc, char** argv){ \
X Controller(argc,argv); \
return Controller.Run(); \
} \
template <class TestClass>
class FUTesterMpi : public FUTester<TestClass>{
protected:
FMpi app;
//Constructor with params to initialize FMpi
FUTesterMpi(int argc, char ** argv) : app(argc,argv){
}
/**
* To print a message manually in the test
* @param value a object that ostream can work on
*/
template <class Output>
void Print(const Output& value){
if(app.global().processId()==0){
std::cout<< "--- Output from program : " << value << "\n";
}
}
};
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment