Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_cabinet_cb
[simgrid.git] / src / mc / mc_smx.cpp
index 8372875..9e95602 100644 (file)
@@ -8,9 +8,9 @@
 
 #include <xbt/log.h>
 
-#include "simix/smx_private.h"
+#include "src/simix/smx_private.h"
 
-#include "mc_smx.h"
+#include "src/mc/mc_smx.h"
 #include "ModelChecker.hpp"
 
 using simgrid::mc::remote;
@@ -57,7 +57,7 @@ mc_smx_process_info_t MC_smx_process_get_info(smx_process_t p)
  *  @param remote_swag Address of the process SWAG in the remote list
  */
 static void MC_process_refresh_simix_process_list(
-  mc_process_t process,
+  simgrid::mc::Process* process,
   xbt_dynar_t target, xbt_swag_t remote_swag)
 {
   // swag = REMOTE(*simix_global->process_list)
@@ -84,10 +84,9 @@ static void MC_process_refresh_simix_process_list(
   assert(i == swag.count);
 }
 
-void MC_process_smx_refresh(mc_process_t process)
+void MC_process_smx_refresh(simgrid::mc::Process* process)
 {
   xbt_assert(mc_mode == MC_MODE_SERVER);
-  xbt_assert(!process->is_self());
   if (process->cache_flags & MC_PROCESS_CACHE_FLAG_SIMIX_PROCESSES)
     return;
 
@@ -176,9 +175,9 @@ mc_smx_process_info_t MC_smx_resolve_process_info(smx_process_t process_remote_a
 const char* MC_smx_process_get_host_name(smx_process_t p)
 {
   if (mc_mode == MC_MODE_CLIENT)
-    return SIMIX_host_get_name(p->smx_host);
+    return SIMIX_host_get_name(p->host);
 
-  mc_process_t process = &mc_model_checker->process();
+  simgrid::mc::Process* process = &mc_model_checker->process();
 
   // Currently, smx_host_t = xbt_dictelm_t.
   // TODO, add an static_assert on this if switching to C++
@@ -188,7 +187,7 @@ const char* MC_smx_process_get_host_name(smx_process_t p)
   if (!info->hostname) {
 
     // Read the hostname from the MCed process:
-    process->read_bytes(&host_copy, sizeof(host_copy), remote(p->smx_host));
+    process->read_bytes(&host_copy, sizeof(host_copy), remote(p->host));
     int len = host_copy.key_len + 1;
     char hostname[len];
     process->read_bytes(hostname, len, remote(host_copy.key));
@@ -199,7 +198,7 @@ const char* MC_smx_process_get_host_name(smx_process_t p)
 
 const char* MC_smx_process_get_name(smx_process_t p)
 {
-  mc_process_t process = &mc_model_checker->process();
+  simgrid::mc::Process* process = &mc_model_checker->process();
   if (mc_mode == MC_MODE_CLIENT)
     return p->name;
   if (!p->name)
@@ -212,6 +211,7 @@ const char* MC_smx_process_get_name(smx_process_t p)
   return info->name;
 }
 
+#ifdef HAVE_SMPI
 int MC_smpi_process_count(void)
 {
   if (mc_mode == MC_MODE_CLIENT)
@@ -223,6 +223,7 @@ int MC_smpi_process_count(void)
     return res;
   }
 }
+#endif
 
 unsigned long MC_smx_get_maxpid(void)
 {