Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Replay: Move CHECK_ACTION_PARAMS macro to the top of the file
[simgrid.git] / 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;
 
+#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() {}
@@ -75,17 +85,6 @@ const char* encode_datatype(MPI_Datatype datatype)
   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 {