]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/internals/smpi_global.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reimplement s4u::Barrier natively, and make them visible from MC
[simgrid.git] / src / smpi / internals / smpi_global.cpp
index 2a8d1889ae0cd49129ff4c1df50b8ef81489fa82..681c183d0559df70759b70bbb695e8f5dbd3e1c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2022. 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. */
@@ -120,7 +120,7 @@ MPI_Info smpi_process_info_env(){
 }
 
 void * smpi_process_get_user_data(){
-  return simgrid::s4u::Actor::self()->get_data();
+  return simgrid::s4u::Actor::self()->get_data<void>();
 }
 
 void smpi_process_set_user_data(void *data){
@@ -149,7 +149,7 @@ static void check_blocks(const std::vector<std::pair<size_t, size_t>>& private_b
 }
 
 static void smpi_cleanup_comm_after_copy(simgrid::kernel::activity::CommImpl* comm, void* buff){
-  if (comm->detached()) {
+  if (comm->is_detached()) {
     // if this is a detached send, the source buffer was duplicated by SMPI
     // sender to make the original buffer available to the application ASAP
     xbt_free(buff);
@@ -596,11 +596,11 @@ int smpi_main(const char* executable, int argc, char* argv[])
 // Called either directly from the user code, or from the code called by smpirun
 void SMPI_init(){
   smpi_init_options_internal(false);
-  simgrid::s4u::Actor::on_creation.connect([](simgrid::s4u::Actor& actor) {
+  simgrid::s4u::Actor::on_creation_cb([](simgrid::s4u::Actor& actor) {
     if (not actor.is_daemon())
       actor.extension_set<simgrid::smpi::ActorExt>(new simgrid::smpi::ActorExt(&actor));
   });
-  simgrid::s4u::Host::on_creation.connect(
+  simgrid::s4u::Host::on_creation_cb(
       [](simgrid::s4u::Host& host) { host.extension_set(new simgrid::smpi::Host(&host)); });
   for (auto const& host : simgrid::s4u::Engine::get_instance()->get_all_hosts())
     host->extension_set(new simgrid::smpi::Host(host));