Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / mc / checker / CommunicationDeterminismChecker.cpp
index 0a7a4a2..5c2f3ae 100644 (file)
@@ -1,12 +1,10 @@
-/* Copyright (c) 2008-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/mc/checker/CommunicationDeterminismChecker.hpp"
 #include "src/kernel/activity/MailboxImpl.hpp"
-#include "src/mc/Session.hpp"
-#include "src/mc/mc_api.hpp"
 #include "src/mc/mc_config.hpp"
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
@@ -70,16 +68,16 @@ static void restore_communications_pattern(simgrid::mc::State* state)
     patterns_copy(incomplete_communications_pattern[i], state->incomplete_comm_pattern_[i]);
 }
 
-static char* print_determinism_result(simgrid::mc::CommPatternDifference diff, int process,
+static char* print_determinism_result(simgrid::mc::CommPatternDifference diff, aid_t process,
                                       const simgrid::mc::PatternCommunication* comm, unsigned int cursor)
 {
   char* type;
   char* res;
 
   if (comm->type == simgrid::mc::PatternCommunicationType::send)
-    type = bprintf("The send communications pattern of the process %d is different!", process - 1);
+    type = bprintf("The send communications pattern of the process %ld is different!", process - 1);
   else
-    type = bprintf("The recv communications pattern of the process %d is different!", process - 1);
+    type = bprintf("The recv communications pattern of the process %ld is different!", process - 1);
 
   using simgrid::mc::CommPatternDifference;
   switch (diff) {
@@ -129,7 +127,7 @@ static void update_comm_pattern(simgrid::mc::PatternCommunication* comm_pattern,
 namespace simgrid {
 namespace mc {
 
-void CommunicationDeterminismChecker::deterministic_comm_pattern(int process, const PatternCommunication* comm,
+void CommunicationDeterminismChecker::deterministic_comm_pattern(aid_t process, const PatternCommunication* comm,
                                                                  int backtracking)
 {
   if (not backtracking) {
@@ -261,7 +259,7 @@ void CommunicationDeterminismChecker::complete_comm_pattern(const kernel::activi
   }
 }
 
-CommunicationDeterminismChecker::CommunicationDeterminismChecker(Session& s) : Checker(s) {}
+CommunicationDeterminismChecker::CommunicationDeterminismChecker() : Checker() {}
 
 CommunicationDeterminismChecker::~CommunicationDeterminismChecker() = default;
 
@@ -537,15 +535,15 @@ void CommunicationDeterminismChecker::real_run()
 void CommunicationDeterminismChecker::run()
 {
   XBT_INFO("Check communication determinism");
-  mcapi::get().s_initialize();
+  mcapi::get().session_initialize();
 
   this->prepare();
   this->real_run();
 }
 
-Checker* createCommunicationDeterminismChecker(Session& s)
+Checker* createCommunicationDeterminismChecker()
 {
-  return new CommunicationDeterminismChecker(s);
+  return new CommunicationDeterminismChecker();
 }
 
 } // namespace mc