Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix GCC+MC builds
[simgrid.git] / src / mc / mc_smx.cpp
index 920a9a2..54e9ba9 100644 (file)
@@ -145,21 +145,12 @@ const char* MC_smx_actor_get_name(smx_actor_t actor)
   return info->name.c_str();
 }
 
-#if HAVE_SMPI
-int MC_smpi_process_count()
-{
-  if (mc_model_checker == nullptr)
-    return smpi_process_count();
-  int res;
-  mc_model_checker->process().read_variable("process_count", &res, sizeof(res));
-  return res;
-}
-#endif
-
 unsigned long MC_smx_get_maxpid()
 {
   unsigned long maxpid;
-  mc_model_checker->process().read_variable("simix_process_maxpid",
-    &maxpid, sizeof(maxpid));
+  const char* name = "simgrid::kernel::actor::maxpid";
+  if (mc_model_checker->process().find_variable(name) == nullptr)
+    name = "maxpid"; // We seem to miss the namespaces when compiling with GCC
+  mc_model_checker->process().read_variable(name, &maxpid, sizeof(maxpid));
   return maxpid;
 }