Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further snake_case s4u::Actor
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 10 Apr 2018 21:59:57 +0000 (23:59 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 10 Apr 2018 21:59:57 +0000 (23:59 +0200)
32 files changed:
examples/s4u/actor-kill/s4u-actor-kill.cpp
examples/s4u/actor-lifetime/s4u-actor-lifetime.cpp
examples/s4u/actor-migration/s4u-actor-migration.cpp
examples/s4u/actor-suspend/s4u-actor-suspend.cpp
examples/s4u/app-bittorrent/s4u-peer.cpp
examples/s4u/app-bittorrent/s4u-tracker.cpp
examples/s4u/app-pingpong/s4u-app-pingpong.cpp
examples/s4u/cloud-capping/s4u-cloud-capping.cpp
examples/s4u/cloud-simple/s4u-cloud-simple.cpp
examples/s4u/dht-chord/s4u-dht-chord-node.cpp
examples/s4u/dht-chord/s4u-dht-chord.hpp
examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp
include/simgrid/forward.h
include/simgrid/s4u/Actor.hpp
src/s4u/s4u_actor.cpp
src/simix/smx_private.hpp
src/smpi/bindings/smpi_pmpi.cpp
src/smpi/bindings/smpi_pmpi_coll.cpp
src/smpi/bindings/smpi_pmpi_comm.cpp
src/smpi/bindings/smpi_pmpi_group.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/bindings/smpi_pmpi_win.cpp
src/smpi/colls/smpi_automatic_selector.cpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_global.cpp
src/smpi/internals/smpi_replay.cpp
src/smpi/mpi/smpi_f2c.cpp
src/smpi/mpi/smpi_request.cpp
teshsuite/s4u/actor/actor.cpp
teshsuite/s4u/concurrent_rw/concurrent_rw.cpp
teshsuite/s4u/pid/pid.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp

index f2dd73d..7bac6a7 100644 (file)
@@ -15,7 +15,7 @@ static int on_exit(void*, void*)
 
 static void victimA_fun()
 {
-  simgrid::s4u::this_actor::onExit(on_exit, nullptr);
+  simgrid::s4u::this_actor::on_exit(on_exit, nullptr);
   XBT_INFO("Hello!");
   XBT_INFO("Suspending myself");
   simgrid::s4u::this_actor::suspend(); /* - Start by suspending itself */
index a83445f..0390881 100644 (file)
@@ -24,7 +24,7 @@ public:
   explicit sleeper(std::vector<std::string> /*args*/)
   {
     XBT_INFO("Hello! I go to sleep.");
-    simgrid::s4u::this_actor::onExit(my_onexit, NULL);
+    simgrid::s4u::this_actor::on_exit(my_onexit, NULL);
 
     simgrid::s4u::this_actor::sleep_for(10);
   }
index 9830683..60a7782 100644 (file)
@@ -31,11 +31,11 @@ static void worker(simgrid::s4u::Host* first, simgrid::s4u::Host* second)
   simgrid::s4u::this_actor::migrate(first);
   simgrid::s4u::this_actor::execute(flopAmount);
 
-  XBT_INFO("I wake up on %s. Let's suspend a bit", simgrid::s4u::this_actor::getHost()->get_cname());
+  XBT_INFO("I wake up on %s. Let's suspend a bit", simgrid::s4u::this_actor::get_host()->get_cname());
 
   simgrid::s4u::this_actor::suspend();
 
-  XBT_INFO("I wake up on %s", simgrid::s4u::this_actor::getHost()->get_cname());
+  XBT_INFO("I wake up on %s", simgrid::s4u::this_actor::get_host()->get_cname());
   XBT_INFO("Done");
 }
 
index e2b9c84..757d2ee 100644 (file)
@@ -32,7 +32,7 @@ static void lazy_guy()
 static void dream_master()
 {
   XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
-  simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::create("Lazy", simgrid::s4u::this_actor::getHost(), lazy_guy);
+  simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::create("Lazy", simgrid::s4u::this_actor::get_host(), lazy_guy);
   XBT_INFO("Let's wait a little bit...");
   simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
   XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
index 4d89148..2fef81f 100644 (file)
@@ -45,7 +45,7 @@ Peer::Peer(std::vector<std::string> args)
   }
   xbt_assert(deadline > 0, "Wrong deadline supplied");
 
-  stream = simgrid::s4u::this_actor::getHost()->extension<HostBittorrent>()->getStream();
+  stream = simgrid::s4u::this_actor::get_host()->extension<HostBittorrent>()->getStream();
 
   if (args.size() == 4 && args[3] == "1") {
     bitfield_       = (1U << FILE_PIECES) - 1U;
index b3f29a0..9f0a73c 100644 (file)
@@ -22,7 +22,7 @@ Tracker::Tracker(std::vector<std::string> args)
   }
   xbt_assert(deadline > 0, "Wrong deadline supplied");
 
-  stream = simgrid::s4u::this_actor::getHost()->extension<HostBittorrent>()->getStream();
+  stream = simgrid::s4u::this_actor::get_host()->extension<HostBittorrent>()->getStream();
 
   mailbox = simgrid::s4u::Mailbox::byName(TRACKER_MAILBOX);
 
index f208785..e09f35e 100644 (file)
@@ -21,7 +21,7 @@ static void pinger(std::vector<std::string> args)
   simgrid::s4u::Mailbox::byName(args[0])->put(payload, 1);
   /* - ... then wait for the (large) pong */
   double* sender_time =
-      static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getHost()->get_name())->get());
+      static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_name())->get());
 
   double communication_time = simgrid::s4u::Engine::getClock() - *sender_time;
   XBT_INFO("Task received : large communication (bandwidth bound)");
@@ -38,7 +38,7 @@ static void ponger(std::vector<std::string> args)
 
   /* - Receive the (small) ping first ....*/
   double* sender_time =
-      static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getHost()->get_name())->get());
+      static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_name())->get());
   double communication_time = simgrid::s4u::Engine::getClock() - *sender_time;
   XBT_INFO("Task received : small communication (latency bound)");
   XBT_INFO(" Ping time (latency bound) %f", communication_time);
index 7674ad2..95bc71a 100644 (file)
@@ -41,12 +41,12 @@ static void worker_busy_loop(const char* name, double speed)
     if (speed > 0) {
       double new_bound = (speed / 10) * i;
       XBT_INFO("set bound of VM1 to %f", new_bound);
-      static_cast<simgrid::s4u::VirtualMachine*>(simgrid::s4u::this_actor::getHost())->setBound(new_bound);
+      static_cast<simgrid::s4u::VirtualMachine*>(simgrid::s4u::this_actor::get_host())->setBound(new_bound);
     }
     simgrid::s4u::this_actor::sleep_for(100);
     double exec_remain_now = exec->get_remaining();
     double flops_per_sec   = exec_remain_prev - exec_remain_now;
-    XBT_INFO("%s@%s: %.0f flops/s", name, simgrid::s4u::this_actor::getHost()->get_cname(), flops_per_sec / 100);
+    XBT_INFO("%s@%s: %.0f flops/s", name, simgrid::s4u::this_actor::get_host()->get_cname(), flops_per_sec / 100);
     exec_remain_prev = exec_remain_now;
     simgrid::s4u::this_actor::sleep_for(1);
   }
index 1e3bc41..be899fb 100644 (file)
@@ -15,7 +15,7 @@ static void computation_fun()
   simgrid::s4u::this_actor::execute(1000000);
   double clock_end = simgrid::s4u::Engine::getClock();
 
-  XBT_INFO("%s:%s task executed %g", simgrid::s4u::this_actor::getHost()->get_cname(),
+  XBT_INFO("%s:%s task executed %g", simgrid::s4u::this_actor::get_host()->get_cname(),
            simgrid::s4u::this_actor::get_cname(), clock_end - clock_sta);
 }
 
@@ -35,7 +35,7 @@ static void communication_tx_fun(std::vector<std::string> args)
   simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(args.at(0));
   s_payload* payload            = new s_payload;
   payload->tx_actor_name        = simgrid::s4u::Actor::self()->get_cname();
-  payload->tx_host              = simgrid::s4u::this_actor::getHost();
+  payload->tx_host              = simgrid::s4u::this_actor::get_host();
   payload->clock_sta            = simgrid::s4u::Engine::getClock();
 
   mbox->put(payload, 1000000);
@@ -44,7 +44,7 @@ static void communication_tx_fun(std::vector<std::string> args)
 static void communication_rx_fun(std::vector<std::string> args)
 {
   const char* actor_name        = simgrid::s4u::Actor::self()->get_cname();
-  const char* host_name         = simgrid::s4u::this_actor::getHost()->get_cname();
+  const char* host_name         = simgrid::s4u::this_actor::get_host()->get_cname();
   simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(args.at(0));
 
   struct s_payload* payload = static_cast<struct s_payload*>(mbox->get());
index 871c6a9..620a957 100644 (file)
@@ -52,7 +52,7 @@ Node::Node(std::vector<std::string> args)
 
   // initialize my node
   id_                = std::stoi(args[1]);
-  stream             = simgrid::s4u::this_actor::getHost()->extension<HostChord>()->getStream();
+  stream             = simgrid::s4u::this_actor::get_host()->extension<HostChord>()->getStream();
   mailbox_           = simgrid::s4u::Mailbox::byName(std::to_string(id_));
   next_finger_to_fix = 0;
   fingers_           = new int[nb_bits];
index 74ddd3a..4e82016 100644 (file)
@@ -64,7 +64,7 @@ public:
   simgrid::s4u::MailboxPtr answer_to; // mailbox to send an answer to (if any)
 
   explicit ChordMessage(e_message_type_t type)
-      : type(type), issuer_host_name(simgrid::s4u::this_actor::getHost()->get_name())
+      : type(type), issuer_host_name(simgrid::s4u::this_actor::get_host()->get_name())
   {
   }
 
index 7fdadea..2c44125 100644 (file)
@@ -10,7 +10,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Pstate properties test");
 static int dvfs()
 {
   double workload = 100E6;
-  simgrid::s4u::Host* host = simgrid::s4u::this_actor::getHost();
+  simgrid::s4u::Host* host = simgrid::s4u::this_actor::get_host();
 
   int nb = host->getPstatesCount();
   XBT_INFO("Count of Processor states=%d", nb);
index 59b45c7..5fbff21 100644 (file)
@@ -9,9 +9,6 @@
 #ifdef __cplusplus
 
 #include <simgrid/s4u/forward.hpp>
-#include <xbt/base.h>
-
-#include <boost/intrusive_ptr.hpp>
 
 namespace simgrid {
 namespace config {
index 22a5199..25f2ede 100644 (file)
@@ -346,7 +346,7 @@ public:
  *  @brief Static methods working on the current actor (see @ref s4u::Actor) */
 namespace this_actor {
 
-XBT_PUBLIC bool isMaestro();
+XBT_PUBLIC bool is_maestro();
 
 /** Block the actor sleeping for that amount of seconds (may throws hostFailure) */
 XBT_PUBLIC void sleep_for(double duration);
@@ -379,21 +379,18 @@ XBT_PUBLIC ExecPtr exec_init(double flops_amounts);
 XBT_PUBLIC ExecPtr exec_async(double flops_amounts);
 
 /** @brief Returns the actor ID of the current actor). */
-XBT_PUBLIC aid_t getPid();
+XBT_PUBLIC aid_t get_pid();
 
 /** @brief Returns the ancestor's actor ID of the current actor. */
-XBT_PUBLIC aid_t getPpid();
+XBT_PUBLIC aid_t get_ppid();
 
 /** @brief Returns the name of the current actor. */
 XBT_PUBLIC std::string get_name();
 /** @brief Returns the name of the current actor as a C string. */
 XBT_PUBLIC const char* get_cname();
 
-XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_name()") XBT_PUBLIC std::string getName();
-XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_cname()") XBT_PUBLIC const char* getCname();
-
 /** @brief Returns the name of the host on which the actor is running. */
-XBT_PUBLIC Host* getHost();
+XBT_PUBLIC Host* get_host();
 
 /** @brief Suspend the actor. */
 XBT_PUBLIC void suspend();
@@ -404,16 +401,26 @@ XBT_PUBLIC void yield();
 /** @brief Resume the actor. */
 XBT_PUBLIC void resume();
 
-XBT_PUBLIC bool isSuspended();
+XBT_PUBLIC bool is_suspended();
 
 /** @brief kill the actor. */
 XBT_PUBLIC void kill();
 
 /** @brief Add a function to the list of "on_exit" functions. */
-XBT_PUBLIC void onExit(int_f_pvoid_pvoid_t fun, void* data);
+XBT_PUBLIC void on_exit(int_f_pvoid_pvoid_t fun, void* data);
 
 /** @brief Migrate the actor to a new host. */
 XBT_PUBLIC void migrate(Host* new_host);
+
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_name()") XBT_PUBLIC std::string getName();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_cname()") XBT_PUBLIC const char* getCname();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::is_maestro()") XBT_PUBLIC bool isMaestro();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_pid()") XBT_PUBLIC aid_t getPid();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_ppid()") XBT_PUBLIC aid_t getPpid();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_host()") XBT_PUBLIC Host* getHost();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::is_suspended()") XBT_PUBLIC bool isSuspended();
+XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::on_exit()") XBT_PUBLIC
+    void onExit(int_f_pvoid_pvoid_t fun, void* data);
 }
 
 /** @} */
index f0d1a57..748091d 100644 (file)
@@ -259,7 +259,7 @@ namespace this_actor {
  * In SimGrid, the actor in charge of doing the stuff in kernel mode is called Maestro,
  * because it is the one scheduling when the others should move or wait.
  */
-bool isMaestro()
+bool is_maestro()
 {
   smx_actor_t process = SIMIX_process_self();
   return process == nullptr || process == simix_global->maestro_process;
@@ -285,13 +285,13 @@ XBT_PUBLIC void sleep_until(double timeout)
 
 void execute(double flops)
 {
-  smx_activity_t s = simcall_execution_start(nullptr, flops, 1.0 /*priority*/, 0. /*bound*/, getHost());
+  smx_activity_t s = simcall_execution_start(nullptr, flops, 1.0 /*priority*/, 0. /*bound*/, get_host());
   simcall_execution_wait(s);
 }
 
 void execute(double flops, double priority)
 {
-  smx_activity_t s = simcall_execution_start(nullptr, flops, 1 / priority /*priority*/, 0. /*bound*/, getHost());
+  smx_activity_t s = simcall_execution_start(nullptr, flops, 1 / priority /*priority*/, 0. /*bound*/, get_host());
   simcall_execution_wait(s);
 }
 
@@ -311,7 +311,7 @@ void parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, d
 ExecPtr exec_init(double flops_amount)
 {
   ExecPtr res        = ExecPtr(new Exec());
-  res->host_         = getHost();
+  res->host_         = get_host();
   res->flops_amount_ = flops_amount;
   res->set_remaining(flops_amount);
   return res;
@@ -324,12 +324,12 @@ ExecPtr exec_async(double flops)
   return res;
 }
 
-aid_t getPid()
+aid_t get_pid()
 {
   return SIMIX_process_self()->pid;
 }
 
-aid_t getPpid()
+aid_t get_ppid()
 {
   return SIMIX_process_self()->ppid;
 }
@@ -344,7 +344,7 @@ const char* get_cname()
   return SIMIX_process_self()->get_cname();
 }
 
-Host* getHost()
+Host* get_host()
 {
   return SIMIX_process_self()->host;
 }
@@ -352,7 +352,7 @@ Host* getHost()
 void suspend()
 {
   if (TRACE_actor_is_enabled())
-    instr::Container::byName(get_name() + "-" + std::to_string(getPid()))
+    instr::Container::byName(get_name() + "-" + std::to_string(get_pid()))
         ->getState("ACTOR_STATE")
         ->pushEvent("suspend");
   simcall_process_suspend(SIMIX_process_self());
@@ -364,10 +364,10 @@ void resume()
   simgrid::simix::kernelImmediate([process] { process->resume(); });
 
   if (TRACE_actor_is_enabled())
-    instr::Container::byName(get_name() + "-" + std::to_string(getPid()))->getState("ACTOR_STATE")->popEvent();
+    instr::Container::byName(get_name() + "-" + std::to_string(get_pid()))->getState("ACTOR_STATE")->popEvent();
 }
 
-bool isSuspended()
+bool is_suspended()
 {
   smx_actor_t process = SIMIX_process_self();
   return simgrid::simix::kernelImmediate([process] { return process->suspended; });
@@ -379,7 +379,7 @@ void kill()
   simgrid::simix::kernelImmediate([process] { SIMIX_process_kill(process, process); });
 }
 
-void onExit(int_f_pvoid_pvoid_t fun, void* data)
+void on_exit(int_f_pvoid_pvoid_t fun, void* data)
 {
   simcall_process_on_exit(SIMIX_process_self(), fun, data);
 }
@@ -393,6 +393,39 @@ void migrate(Host* new_host)
   SIMIX_process_self()->iface()->migrate(new_host);
 }
 
+std::string getName() /* deprecated */
+{
+  return get_name();
+}
+const char* getCname() /* deprecated */
+{
+  return get_cname();
+}
+bool isMaestro() /* deprecated */
+{
+  return is_maestro();
+}
+aid_t getPid() /* deprecated */
+{
+  return get_pid();
+}
+aid_t getPpid() /* deprecated */
+{
+  return get_ppid();
+}
+Host* getHost() /* deprecated */
+{
+  return get_host();
+}
+bool isSuspended() /* deprecated */
+{
+  return is_suspended();
+}
+void onExit /* deprecated */ (int_f_pvoid_pvoid_t fun, void* data)
+{
+  on_exit(fun, data);
+}
+
 } // namespace this_actor
 } // namespace s4u
 } // namespace simgrid
index e220311..3609c1f 100644 (file)
@@ -18,7 +18,7 @@ namespace simgrid {
 namespace simix {
 
 class Global {
-  friend XBT_PUBLIC bool simgrid::s4u::this_actor::isMaestro();
+  friend XBT_PUBLIC bool simgrid::s4u::this_actor::is_maestro();
 
 public:
   smx_context_factory_t context_factory = nullptr;
index 10a3936..1409885 100644 (file)
@@ -36,7 +36,7 @@ int PMPI_Init(int *argc, char ***argv)
   if(already_init == 0){
     simgrid::smpi::Process::init(argc, argv);
     smpi_process()->mark_as_initialized();
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_init(rank);
     TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("init"));
     TRACE_smpi_comm_out(rank);
@@ -52,7 +52,7 @@ int PMPI_Init(int *argc, char ***argv)
 int PMPI_Finalize()
 {
   smpi_bench_end();
-  int rank = simgrid::s4u::this_actor::getPid();
+  int rank = simgrid::s4u::this_actor::get_pid();
   TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("finalize"));
 
   smpi_process()->finalize();
@@ -108,7 +108,7 @@ int PMPI_Is_thread_main(int *flag)
   if (flag == nullptr) {
     return MPI_ERR_ARG;
   } else {
-    *flag = simgrid::s4u::this_actor::getPid() ==
+    *flag = simgrid::s4u::this_actor::get_pid() ==
             1; // FIXME: I don't think this is correct: This just returns true if the process ID is 1,
                // regardless of whether this process called MPI_Thread_Init() or not.
     return MPI_SUCCESS;
index b4a298c..48e31cf 100644 (file)
@@ -25,7 +25,7 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c
   } else if (not datatype->is_valid()) {
     retval = MPI_ERR_ARG;
   } else {
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::CollTIData("bcast", root, -1.0,
                                                       datatype->is_replayable() ? count : count * datatype->size(), -1,
@@ -49,7 +49,7 @@ int PMPI_Barrier(MPI_Comm comm)
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
   } else {
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::NoOpTIData("barrier"));
 
     simgrid::smpi::Colls::barrier(comm);
@@ -89,7 +89,7 @@ int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbu
       sendtmpcount=0;
       sendtmptype=recvtype;
     }
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(
         rank, __func__,
@@ -133,7 +133,7 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recv
       sendtmptype=recvtype;
     }
 
-    int rank         = simgrid::s4u::this_actor::getPid();
+    int rank         = simgrid::s4u::this_actor::get_pid();
     int dt_size_recv = recvtype->is_replayable() ? 1 : recvtype->size();
 
     std::vector<int>* trace_recvcounts = new std::vector<int>;
@@ -178,7 +178,7 @@ int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       sendcount=recvcount;
       sendtype=recvtype;
     }
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::CollTIData(
@@ -215,7 +215,7 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       sendcount=recvcounts[comm->rank()];
       sendtype=recvtype;
     }
-    int rank               = simgrid::s4u::this_actor::getPid();
+    int rank               = simgrid::s4u::this_actor::get_pid();
     int dt_size_recv       = recvtype->is_replayable() ? 1 : recvtype->size();
 
     std::vector<int>* trace_recvcounts = new std::vector<int>;
@@ -258,7 +258,7 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       recvtype  = sendtype;
       recvcount = sendcount;
     }
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(
         rank, __func__,
@@ -296,7 +296,7 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
       recvtype  = sendtype;
       recvcount = sendcounts[comm->rank()];
     }
-    int rank               = simgrid::s4u::this_actor::getPid();
+    int rank               = simgrid::s4u::this_actor::get_pid();
     int dt_size_send       = sendtype->is_replayable() ? 1 : sendtype->size();
 
     std::vector<int>* trace_sendcounts = new std::vector<int>;
@@ -331,7 +331,7 @@ int PMPI_Reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   } else if (not datatype->is_valid() || op == MPI_OP_NULL) {
     retval = MPI_ERR_ARG;
   } else {
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::CollTIData("reduce", root, 0,
@@ -381,7 +381,7 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
       sendtmpbuf = static_cast<char*>(xbt_malloc(count*datatype->get_extent()));
       simgrid::smpi::Datatype::copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
     }
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(rank, __func__,
                        new simgrid::instr::CollTIData("allReduce", -1, 0,
@@ -414,7 +414,7 @@ int PMPI_Scan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MP
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-    int rank = simgrid::s4u::this_actor::getPid();
+    int rank = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::Pt2PtTIData(
                                            "scan", -1, datatype->is_replayable() ? count : count * datatype->size(),
@@ -441,7 +441,7 @@ int PMPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-    int rank         = simgrid::s4u::this_actor::getPid();
+    int rank         = simgrid::s4u::this_actor::get_pid();
     void* sendtmpbuf = sendbuf;
     if (sendbuf == MPI_IN_PLACE) {
       sendtmpbuf = static_cast<void*>(xbt_malloc(count * datatype->size()));
@@ -477,7 +477,7 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datat
   } else if (recvcounts == nullptr) {
     retval = MPI_ERR_ARG;
   } else {
-    int rank                           = simgrid::s4u::this_actor::getPid();
+    int rank                           = simgrid::s4u::this_actor::get_pid();
     std::vector<int>* trace_recvcounts = new std::vector<int>;
     int dt_send_size                   = datatype->is_replayable() ? 1 : datatype->size();
     int totalcount    = 0;
@@ -526,7 +526,7 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
   } else {
     int count = comm->size();
 
-    int rank                           = simgrid::s4u::this_actor::getPid();
+    int rank                           = simgrid::s4u::this_actor::get_pid();
     int dt_send_size                   = datatype->is_replayable() ? 1 : datatype->size();
     std::vector<int>* trace_recvcounts = new std::vector<int>(recvcount * dt_send_size); // copy data to avoid bad free
 
@@ -568,7 +568,7 @@ int PMPI_Alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* rec
   } else if ((sendbuf != MPI_IN_PLACE && sendtype == MPI_DATATYPE_NULL) || recvtype == MPI_DATATYPE_NULL) {
     retval = MPI_ERR_TYPE;
   } else {
-    int rank                 = simgrid::s4u::this_actor::getPid();
+    int rank                 = simgrid::s4u::this_actor::get_pid();
     void* sendtmpbuf         = static_cast<char*>(sendbuf);
     int sendtmpcount         = sendcount;
     MPI_Datatype sendtmptype = sendtype;
@@ -613,7 +613,7 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
              recvdisps == nullptr) {
     retval = MPI_ERR_ARG;
   } else {
-    int rank                           = simgrid::s4u::this_actor::getPid();
+    int rank                           = simgrid::s4u::this_actor::get_pid();
     int size               = comm->size();
     int send_size                      = 0;
     int recv_size                      = 0;
index 85d57ca..be80206 100644 (file)
@@ -101,7 +101,7 @@ int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm)
     return MPI_ERR_GROUP;
   } else if (newcomm == nullptr) {
     return MPI_ERR_ARG;
-  } else if (group->rank(simgrid::s4u::this_actor::getPid()) == MPI_UNDEFINED) {
+  } else if (group->rank(simgrid::s4u::this_actor::get_pid()) == MPI_UNDEFINED) {
     *newcomm= MPI_COMM_NULL;
     return MPI_SUCCESS;
   }else{
index 6ada956..172b5c1 100644 (file)
@@ -46,7 +46,7 @@ int PMPI_Group_rank(MPI_Group group, int *rank)
   } else if (rank == nullptr) {
     return MPI_ERR_ARG;
   } else {
-    *rank = group->rank(simgrid::s4u::this_actor::getPid());
+    *rank = group->rank(simgrid::s4u::this_actor::get_pid());
     return MPI_SUCCESS;
   }
 }
index c47791c..8df9c83 100644 (file)
@@ -163,7 +163,7 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MP
     retval = MPI_ERR_TAG;
   } else {
 
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
 
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("Irecv", src,
@@ -204,7 +204,7 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MP
   } else if(tag<0 && tag !=  MPI_ANY_TAG){
     retval = MPI_ERR_TAG;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     int trace_dst = getPid(comm, dst);
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("Isend", dst,
@@ -246,7 +246,7 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, M
   } else if(tag<0 && tag !=  MPI_ANY_TAG){
     retval = MPI_ERR_TAG;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     int trace_dst = getPid(comm, dst);
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("ISsend", dst,
@@ -286,7 +286,7 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI
   } else if(tag<0 && tag !=  MPI_ANY_TAG){
     retval = MPI_ERR_TAG;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("recv", src,
                                                        datatype->is_replayable() ? count : count * datatype->size(),
@@ -328,7 +328,7 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI
   } else if(tag < 0 && tag !=  MPI_ANY_TAG){
     retval = MPI_ERR_TAG;
   } else {
-    int my_proc_id         = simgrid::s4u::this_actor::getPid();
+    int my_proc_id         = simgrid::s4u::this_actor::get_pid();
     int dst_traced         = getPid(comm, dst);
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("send", dst,
@@ -366,7 +366,7 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
   } else if(tag<0 && tag !=  MPI_ANY_TAG){
     retval = MPI_ERR_TAG;
   } else {
-    int my_proc_id         = simgrid::s4u::this_actor::getPid();
+    int my_proc_id         = simgrid::s4u::this_actor::get_pid();
     int dst_traced         = getPid(comm, dst);
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("Ssend", dst,
@@ -415,7 +415,7 @@ int PMPI_Sendrecv(void* sendbuf, int sendcount, MPI_Datatype sendtype, int dst,
   } else if((sendtag<0 && sendtag !=  MPI_ANY_TAG)||(recvtag<0 && recvtag != MPI_ANY_TAG)){
     retval = MPI_ERR_TAG;
   } else {
-    int my_proc_id         = simgrid::s4u::this_actor::getPid();
+    int my_proc_id         = simgrid::s4u::this_actor::get_pid();
     int dst_traced         = getPid(comm, dst);
     int src_traced         = getPid(comm, src);
 
@@ -476,7 +476,7 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
     simgrid::smpi::Status::empty(status);
     retval = MPI_SUCCESS;
   } else {
-    int my_proc_id = ((*request)->comm() != MPI_COMM_NULL) ? simgrid::s4u::this_actor::getPid() : -1;
+    int my_proc_id = ((*request)->comm() != MPI_COMM_NULL) ? simgrid::s4u::this_actor::get_pid() : -1;
 
     TRACE_smpi_testing_in(my_proc_id);
 
@@ -591,7 +591,7 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
     retval = MPI_SUCCESS;
   } else {
     int my_proc_id = (*request)->comm() != MPI_COMM_NULL
-                         ? simgrid::s4u::this_actor::getPid()
+                         ? simgrid::s4u::this_actor::get_pid()
                          : -1; // TODO: cheinrich: Check if this correct or if it should be MPI_UNDEFINED
 
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("wait"));
@@ -618,7 +618,7 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
 
   smpi_bench_end();
 
-  int rank_traced = simgrid::s4u::this_actor::getPid(); // FIXME: In PMPI_Wait, we check if the comm is null?
+  int rank_traced = simgrid::s4u::this_actor::get_pid(); // FIXME: In PMPI_Wait, we check if the comm is null?
   TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAny", static_cast<double>(count)));
 
   *index = simgrid::smpi::Request::waitany(count, requests, status);
@@ -636,7 +636,7 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
 {
   smpi_bench_end();
 
-  int rank_traced = simgrid::s4u::this_actor::getPid(); // FIXME: In PMPI_Wait, we check if the comm is null?
+  int rank_traced = simgrid::s4u::this_actor::get_pid(); // FIXME: In PMPI_Wait, we check if the comm is null?
   TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAll", static_cast<double>(count)));
 
   int retval = simgrid::smpi::Request::waitall(count, requests, status);
index 77bd23e..3842cbb 100644 (file)
@@ -165,7 +165,7 @@ int PMPI_Win_fence( int assert,  MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_fence"));
     retval = win->fence(assert);
     TRACE_smpi_comm_out(my_proc_id);
@@ -194,7 +194,7 @@ int PMPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
             ((not origin_datatype->is_valid()) || (not target_datatype->is_valid()))) {
     retval = MPI_ERR_TYPE;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -235,7 +235,7 @@ int PMPI_Rget( void *origin_addr, int origin_count, MPI_Datatype origin_datatype
   } else if(request == nullptr){
     retval = MPI_ERR_REQUEST;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -273,7 +273,7 @@ int PMPI_Put( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
             ((not origin_datatype->is_valid()) || (not target_datatype->is_valid()))) {
     retval = MPI_ERR_TYPE;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     int dst_traced = group->actor(target_rank)->get_pid();
@@ -316,7 +316,7 @@ int PMPI_Rput( void *origin_addr, int origin_count, MPI_Datatype origin_datatype
   } else if(request == nullptr){
     retval = MPI_ERR_REQUEST;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     int dst_traced = group->actor(target_rank)->get_pid();
@@ -358,7 +358,7 @@ int PMPI_Accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_da
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -400,7 +400,7 @@ int PMPI_Raccumulate( void *origin_addr, int origin_count, MPI_Datatype origin_d
   } else if(request == nullptr){
     retval = MPI_ERR_REQUEST;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -442,7 +442,7 @@ MPI_Datatype target_datatype, MPI_Op op, MPI_Win win){
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -489,7 +489,7 @@ MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request){
   } else if(request == nullptr){
     retval = MPI_ERR_REQUEST;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -531,7 +531,7 @@ int PMPI_Compare_and_swap(void* origin_addr, void* compare_addr, void* result_ad
   } else if ((datatype == MPI_DATATYPE_NULL) || (not datatype->is_valid())) {
     retval = MPI_ERR_TYPE;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     MPI_Group group;
     win->get_group(&group);
     TRACE_smpi_comm_in(my_proc_id, __func__,
@@ -555,7 +555,7 @@ int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win){
   } else if (group==MPI_GROUP_NULL){
     retval = MPI_ERR_GROUP;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_post"));
     retval = win->post(group,assert);
     TRACE_smpi_comm_out(my_proc_id);
@@ -572,7 +572,7 @@ int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win){
   } else if (group==MPI_GROUP_NULL){
     retval = MPI_ERR_GROUP;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_start"));
     retval = win->start(group,assert);
     TRACE_smpi_comm_out(my_proc_id);
@@ -587,7 +587,7 @@ int PMPI_Win_complete(MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_complete"));
 
     retval = win->complete();
@@ -604,7 +604,7 @@ int PMPI_Win_wait(MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_wait"));
 
     retval = win->wait();
@@ -626,7 +626,7 @@ int PMPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win){
   } else if (rank == MPI_PROC_NULL){
     retval = MPI_SUCCESS;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_lock"));
     retval = win->lock(lock_type,rank,assert);
     TRACE_smpi_comm_out(my_proc_id);
@@ -643,7 +643,7 @@ int PMPI_Win_unlock(int rank, MPI_Win win){
   } else if (rank == MPI_PROC_NULL){
     retval = MPI_SUCCESS;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_unlock"));
     retval = win->unlock(rank);
     TRACE_smpi_comm_out(my_proc_id);
@@ -658,7 +658,7 @@ int PMPI_Win_lock_all(int assert, MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_lock_all"));
     retval = win->lock_all(assert);
     TRACE_smpi_comm_out(my_proc_id);
@@ -673,7 +673,7 @@ int PMPI_Win_unlock_all(MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_unlock_all"));
     retval = win->unlock_all();
     TRACE_smpi_comm_out(my_proc_id);
@@ -690,7 +690,7 @@ int PMPI_Win_flush(int rank, MPI_Win win){
   } else if (rank == MPI_PROC_NULL){
     retval = MPI_SUCCESS;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush"));
     retval = win->flush(rank);
     TRACE_smpi_comm_out(my_proc_id);
@@ -707,7 +707,7 @@ int PMPI_Win_flush_local(int rank, MPI_Win win){
   } else if (rank == MPI_PROC_NULL){
     retval = MPI_SUCCESS;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_local"));
     retval = win->flush_local(rank);
     TRACE_smpi_comm_out(my_proc_id);
@@ -722,7 +722,7 @@ int PMPI_Win_flush_all(MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_all"));
     retval = win->flush_all();
     TRACE_smpi_comm_out(my_proc_id);
@@ -737,7 +737,7 @@ int PMPI_Win_flush_local_all(MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    int my_proc_id = simgrid::s4u::this_actor::getPid();
+    int my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_local_all"));
     retval = win->flush_local_all();
     TRACE_smpi_comm_out(my_proc_id);
index 39db8b0..3eee4bc 100644 (file)
@@ -15,7 +15,7 @@
   if (TRACE_is_enabled()) {                                                                                            \
     simgrid::instr::EventType* type = simgrid::instr::Container::getRoot()->type_->getOrCreateEventType(#cat);         \
                                                                                                                        \
-    std::string cont_name = std::string("rank-" + std::to_string(simgrid::s4u::this_actor::getPid()));                 \
+    std::string cont_name = std::string("rank-" + std::to_string(simgrid::s4u::this_actor::get_pid()));                \
     type->addEntityValue(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0");                                  \
     new simgrid::instr::NewEvent(SIMIX_get_clock(), simgrid::instr::Container::byName(cont_name), type,                \
                                  type->getEntityValue(Colls::mpi_coll_##cat##_description[i].name));                   \
index 3c30b89..17e2f24 100644 (file)
@@ -59,7 +59,7 @@ void smpi_execute(double duration)
   if (duration >= smpi_cpu_threshold) {
     XBT_DEBUG("Sleep for %g to handle real computation time", duration);
     double flops = duration * smpi_host_speed;
-    int rank     = simgrid::s4u::this_actor::getPid();
+    int rank     = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_computing_in(rank, flops);
 
     smpi_execute_flops(flops);
@@ -161,7 +161,7 @@ void smpi_bench_end()
 #if HAVE_PAPI
   if (xbt_cfg_get_string("smpi/papi-events")[0] != '\0' && TRACE_smpi_is_enabled()) {
     container_t container =
-        new simgrid::instr::Container(std::string("rank-") + std::to_string(simgrid::s4u::this_actor::getPid));
+        new simgrid::instr::Container(std::string("rank-") + std::to_string(simgrid::s4u::this_actor::get_pid));
     papi_counter_t& counter_data = smpi_process()->papi_counters();
 
     for (auto const& pair : counter_data) {
@@ -277,7 +277,7 @@ public:
   SampleLocation(bool global, const char* file, int line) : std::string(std::string(file) + ":" + std::to_string(line))
   {
     if (not global)
-      this->append(":" + std::to_string(simgrid::s4u::this_actor::getPid()));
+      this->append(":" + std::to_string(simgrid::s4u::this_actor::get_pid()));
   }
 };
 
index de0b17c..599d0d4 100644 (file)
@@ -114,7 +114,7 @@ void smpi_process_init(int *argc, char ***argv){
 }
 
 int smpi_process_index(){
-  return simgrid::s4u::this_actor::getPid();
+  return simgrid::s4u::this_actor::get_pid();
 }
 
 void * smpi_process_get_user_data(){
index b88aecd..0258665 100644 (file)
@@ -53,12 +53,12 @@ static void log_timed_action(simgrid::xbt::ReplayAction& action, double clock)
 
 static std::vector<MPI_Request>* get_reqq_self()
 {
-  return reqq.at(simgrid::s4u::this_actor::getPid());
+  return reqq.at(simgrid::s4u::this_actor::get_pid());
 }
 
 static void set_reqq_self(std::vector<MPI_Request> *mpi_request)
 {
-  reqq.insert({simgrid::s4u::this_actor::getPid(), mpi_request});
+  reqq.insert({simgrid::s4u::this_actor::get_pid(), mpi_request});
 }
 
 /* Helper function */
@@ -406,7 +406,7 @@ protected:
   T args;
 
 public:
-  explicit ReplayAction(std::string name) : name(name), my_proc_id(simgrid::s4u::this_actor::getPid()) {}
+  explicit ReplayAction(std::string name) : name(name), my_proc_id(simgrid::s4u::this_actor::get_pid()) {}
   virtual ~ReplayAction() = default;
 
   virtual void execute(simgrid::xbt::ReplayAction& action)
@@ -818,7 +818,7 @@ void smpi_replay_init(int* argc, char*** argv)
   smpi_process()->mark_as_initialized();
   smpi_process()->set_replaying(true);
 
-  int my_proc_id = simgrid::s4u::this_actor::getPid();
+  int my_proc_id = simgrid::s4u::this_actor::get_pid();
   TRACE_smpi_init(my_proc_id);
   TRACE_smpi_computing_init(my_proc_id);
   TRACE_smpi_comm_in(my_proc_id, "smpi_replay_run_init", new simgrid::instr::NoOpTIData("init"));
@@ -894,13 +894,13 @@ void smpi_replay_main(int* argc, char*** argv)
     smpi_free_replay_tmp_buffers();
   }
 
-  TRACE_smpi_comm_in(simgrid::s4u::this_actor::getPid(), "smpi_replay_run_finalize",
+  TRACE_smpi_comm_in(simgrid::s4u::this_actor::get_pid(), "smpi_replay_run_finalize",
                      new simgrid::instr::NoOpTIData("finalize"));
 
   smpi_process()->finalize();
 
-  TRACE_smpi_comm_out(simgrid::s4u::this_actor::getPid());
-  TRACE_smpi_finalize(simgrid::s4u::this_actor::getPid());
+  TRACE_smpi_comm_out(simgrid::s4u::this_actor::get_pid());
+  TRACE_smpi_finalize(simgrid::s4u::this_actor::get_pid());
 }
 
 /** @brief chain a replay initialization and a replay start */
index 9a69ab4..0294dcd 100644 (file)
@@ -39,7 +39,7 @@ char* F2C::get_key(char* key, int id) {
 }
 
 char* F2C::get_key_id(char* key, int id) {
-  std::snprintf(key, KEY_SIZE, "%x_%ld", static_cast<unsigned>(id), simgrid::s4u::this_actor::getPid());
+  std::snprintf(key, KEY_SIZE, "%x_%ld", static_cast<unsigned>(id), simgrid::s4u::this_actor::get_pid());
   return key;
 }
 
index 5739c1c..9255101 100644 (file)
@@ -179,19 +179,19 @@ void Request::print_request(const char *message)
 MPI_Request Request::send_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
 
-  return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                      comm->group()->actor(dst)->get_pid(), tag, comm, PERSISTENT | SEND | PREPARED);
 }
 
 MPI_Request Request::ssend_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
-  return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                      comm->group()->actor(dst)->get_pid(), tag, comm, PERSISTENT | SSEND | SEND | PREPARED);
 }
 
 MPI_Request Request::isend_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
-  return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                      comm->group()->actor(dst)->get_pid(), tag, comm, PERSISTENT | ISEND | SEND | PREPARED);
 }
 
@@ -217,7 +217,7 @@ MPI_Request Request::recv_init(void *buf, int count, MPI_Datatype datatype, int
 {
   return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype,
                      src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->get_pid(),
-                     simgrid::s4u::this_actor::getPid(), tag, comm, PERSISTENT | RECV | PREPARED);
+                     simgrid::s4u::this_actor::get_pid(), tag, comm, PERSISTENT | RECV | PREPARED);
 }
 
 MPI_Request Request::rma_recv_init(void *buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm,
@@ -240,13 +240,13 @@ MPI_Request Request::irecv_init(void *buf, int count, MPI_Datatype datatype, int
 {
   return new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype,
                      src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->get_pid(),
-                     simgrid::s4u::this_actor::getPid(), tag, comm, PERSISTENT | RECV | PREPARED);
+                     simgrid::s4u::this_actor::get_pid(), tag, comm, PERSISTENT | RECV | PREPARED);
 }
 
 MPI_Request Request::isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
   MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
-  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                         comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | ISEND | SEND);
   request->start();
   return request;
@@ -255,7 +255,7 @@ MPI_Request Request::isend(void *buf, int count, MPI_Datatype datatype, int dst,
 MPI_Request Request::issend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
   MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
-  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                         comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | ISEND | SSEND | SEND);
   request->start();
   return request;
@@ -267,7 +267,7 @@ MPI_Request Request::irecv(void *buf, int count, MPI_Datatype datatype, int src,
   MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
   request             = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype,
                         src == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(src)->get_pid(),
-                        simgrid::s4u::this_actor::getPid(), tag, comm, NON_PERSISTENT | RECV);
+                        simgrid::s4u::this_actor::get_pid(), tag, comm, NON_PERSISTENT | RECV);
   request->start();
   return request;
 }
@@ -283,7 +283,7 @@ void Request::recv(void *buf, int count, MPI_Datatype datatype, int src, int tag
 void Request::send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
   MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
-  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                         comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | SEND);
 
   request->start();
@@ -294,7 +294,7 @@ void Request::send(void *buf, int count, MPI_Datatype datatype, int dst, int tag
 void Request::ssend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 {
   MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
-  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::getPid(),
+  request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, simgrid::s4u::this_actor::get_pid(),
                         comm->group()->actor(dst)->get_pid(), tag, comm, NON_PERSISTENT | SSEND | SEND);
 
   request->start();
@@ -308,7 +308,7 @@ void Request::sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,int d
 {
   MPI_Request requests[2];
   MPI_Status stats[2];
-  int myid = simgrid::s4u::this_actor::getPid();
+  int myid = simgrid::s4u::this_actor::get_pid();
   if ((comm->group()->actor(dst)->get_pid() == myid) && (comm->group()->actor(src)->get_pid() == myid)) {
     Datatype::copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype);
     if (status != MPI_STATUS_IGNORE) {
@@ -640,7 +640,7 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
   double maxrate = xbt_cfg_get_double("smpi/iprobe-cpu-usage");
   MPI_Request request = new Request(nullptr, 0, MPI_CHAR,
                                     source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(),
-                                    simgrid::s4u::this_actor::getPid(), tag, comm, PERSISTENT | RECV);
+                                    simgrid::s4u::this_actor::get_pid(), tag, comm, PERSISTENT | RECV);
   if (smpi_iprobe_sleep > 0) {
     smx_activity_t iprobe_sleep = simcall_execution_start(
         "iprobe", /* flops to executek*/ nsleeps * smpi_iprobe_sleep * speed * maxrate, /* priority */ 1.0,
@@ -730,7 +730,7 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
   }
 
   if (TRACE_smpi_view_internals() && ((req->flags_ & RECV) != 0)){
-    int rank       = simgrid::s4u::this_actor::getPid();
+    int rank       = simgrid::s4u::this_actor::get_pid();
     int src_traced = (req->src_ == MPI_ANY_SOURCE ? req->real_src_ : req->src_);
     TRACE_smpi_recv(src_traced, rank,req->tag_);
   }
index ccf99d5..9b47529 100644 (file)
@@ -10,10 +10,10 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 static void worker()
 {
   simgrid::s4u::this_actor::sleep_for(.5);
-  XBT_INFO("Worker started (PID:%ld, PPID:%ld)", simgrid::s4u::this_actor::getPid(),
-           simgrid::s4u::this_actor::getPpid());
+  XBT_INFO("Worker started (PID:%ld, PPID:%ld)", simgrid::s4u::this_actor::get_pid(),
+           simgrid::s4u::this_actor::get_ppid());
   while (1) {
-    XBT_INFO("Plop i am %ssuspended", simgrid::s4u::this_actor::isSuspended() ? "" : "not ");
+    XBT_INFO("Plop i am %ssuspended", simgrid::s4u::this_actor::is_suspended() ? "" : "not ");
     simgrid::s4u::this_actor::sleep_for(1);
   }
   XBT_INFO("I'm done. See you!");
@@ -23,16 +23,16 @@ static void master()
 {
   simgrid::s4u::this_actor::sleep_for(1);
   std::vector<simgrid::s4u::ActorPtr>* actor_list = new std::vector<simgrid::s4u::ActorPtr>();
-  simgrid::s4u::this_actor::getHost()->actorList(actor_list);
+  simgrid::s4u::this_actor::get_host()->actorList(actor_list);
 
   for (auto const& actor : *actor_list) {
     XBT_INFO("Actor (pid=%ld, ppid=%ld, name=%s)", actor->get_pid(), actor->get_ppid(), actor->get_cname());
-    if (simgrid::s4u::this_actor::getPid() != actor->get_pid())
+    if (simgrid::s4u::this_actor::get_pid() != actor->get_pid())
       actor->kill();
   }
 
   simgrid::s4u::ActorPtr actor =
-      simgrid::s4u::Actor::create("worker from master", simgrid::s4u::this_actor::getHost(), worker);
+      simgrid::s4u::Actor::create("worker from master", simgrid::s4u::this_actor::get_host(), worker);
   simgrid::s4u::this_actor::sleep_for(2);
 
   XBT_INFO("Suspend Actor (pid=%ld)", actor->get_pid());
index b53d921..8378e8e 100644 (file)
@@ -10,7 +10,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u test");
 static void host()
 {
   simgrid::s4u::Storage* storage = simgrid::s4u::Storage::byName("Disk1");
-  int id = simgrid::s4u::this_actor::getPid();
+  int id                         = simgrid::s4u::this_actor::get_pid();
   XBT_INFO("process %d is writing!", id);
   storage->write(3000000);
   XBT_INFO("process %d goes to sleep for %d seconds", id, id);
index 1d70216..07b0f61 100644 (file)
@@ -16,9 +16,9 @@ static int my_onexit(smx_process_exit_status_t /*status*/, int* pid)
 static void sendpid()
 {
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox");
-  int pid                          = simgrid::s4u::this_actor::getPid();
+  int pid                          = simgrid::s4u::this_actor::get_pid();
   double comm_size                 = 100000;
-  simgrid::s4u::this_actor::onExit((int_f_pvoid_pvoid_t)my_onexit, &pid);
+  simgrid::s4u::this_actor::on_exit((int_f_pvoid_pvoid_t)my_onexit, &pid);
 
   XBT_INFO("Sending pid of \"%d\".", pid);
   mailbox->put(&pid, comm_size);
index d3dd770..4a87601 100644 (file)
@@ -130,8 +130,8 @@ static void client()
 
 static void server()
 {
-  storage_info(simgrid::s4u::this_actor::getHost());
-  simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getHost()->get_cname());
+  storage_info(simgrid::s4u::this_actor::get_host());
+  simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_cname());
 
   XBT_INFO("Server waiting for transfers ...");
   while (1) {
@@ -148,7 +148,7 @@ static void server()
     }
   }
 
-  storage_info(simgrid::s4u::this_actor::getHost());
+  storage_info(simgrid::s4u::this_actor::get_host());
   dump_platform_storages();
 }