Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Replay: Move CHECK_ACTION_PARAMS macro to the top of the file
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 20 Mar 2018 13:26:27 +0000 (14:26 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 28 Mar 2018 15:33:50 +0000 (17:33 +0200)
src/smpi/internals/smpi_replay.cpp

index 60a487b..676685c 100644 (file)
@@ -27,6 +27,16 @@ static std::unordered_map<int, std::vector<MPI_Request>*> reqq;
 
 static MPI_Datatype MPI_DEFAULT_TYPE;
 
 
 static MPI_Datatype MPI_DEFAULT_TYPE;
 
+#define CHECK_ACTION_PARAMS(action, mandatory, optional) {\
+    int i=0;\
+    while(action[i]!=nullptr)\
+     i++;\
+    if(i<mandatory+2)                                           \
+    THROWF(arg_error, 0, "%s replay failed.\n" \
+          "%d items were given on the line. First two should be process_id and action.  " \
+          "This action needs after them %d mandatory arguments, and accepts %d optional ones. \n" \
+          "Please contact the Simgrid team if support is needed", __FUNCTION__, i, mandatory, optional);\
+  }
 
 class ReplayActionArg {
   ReplayActionArg() {}
 
 class ReplayActionArg {
   ReplayActionArg() {}
@@ -75,17 +85,6 @@ const char* encode_datatype(MPI_Datatype datatype)
   return datatype->encode();
 }
 
   return datatype->encode();
 }
 
-#define CHECK_ACTION_PARAMS(action, mandatory, optional) {\
-    int i=0;\
-    while(action[i]!=nullptr)\
-     i++;\
-    if(i<mandatory+2)                                           \
-    THROWF(arg_error, 0, "%s replay failed.\n" \
-          "%d items were given on the line. First two should be process_id and action.  " \
-          "This action needs after them %d mandatory arguments, and accepts %d optional ones. \n" \
-          "Please contact the Simgrid team if support is needed", __FUNCTION__, i, mandatory, optional);\
-  }
-
 namespace simgrid {
 namespace smpi {
 
 namespace simgrid {
 namespace smpi {