From: Martin Quinson Date: Thu, 12 Jul 2018 21:55:41 +0000 (+0200) Subject: who still needs MSG in 2018? X-Git-Tag: v3_21~473 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fa5d711a39f9c9a5cf179ee5ac8cd8aa220fb2d0 who still needs MSG in 2018? --- diff --git a/src/smpi/internals/smpi_actor.cpp b/src/smpi/internals/smpi_actor.cpp index 2b88022816..0cbacec9ff 100644 --- a/src/smpi/internals/smpi_actor.cpp +++ b/src/smpi/internals/smpi_actor.cpp @@ -70,8 +70,6 @@ void ActorExt::set_data(int* argc, char*** argv) if (barrier != nullptr) // don't overwrite the current one if the instance has none finalization_barrier_ = barrier; - static_cast(actor_->get_impl()->get_user_data())->data = this; - if (*argc > 3) { memmove(&(*argv)[0], &(*argv)[2], sizeof(char*) * (*argc - 2)); (*argv)[(*argc) - 1] = nullptr; diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index 990a646807..f876f6a13c 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -3,16 +3,16 @@ /* 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 "smpi_host.hpp" #include "mc/mc.h" #include "simgrid/s4u/Engine.hpp" #include "smpi_coll.hpp" #include "smpi_f2c.hpp" -#include "src/msg/msg_private.hpp" +#include "smpi_host.hpp" +#include "src/kernel/activity/CommImpl.hpp" #include "src/simix/smx_private.hpp" +#include "src/smpi/include/smpi_actor.hpp" #include "xbt/config.hpp" -#include "src/smpi/include/smpi_actor.hpp" #include /* DBL_MAX */ #include #include @@ -99,10 +99,11 @@ int smpi_process_count() simgrid::smpi::ActorExt* smpi_process() { ActorPtr me = Actor::self(); + if (me == nullptr) // This happens sometimes (eg, when linking against NS3 because it pulls openMPI...) return nullptr; - simgrid::msg::ActorExt* msgExt = static_cast(me->get_impl()->get_user_data()); - return static_cast(msgExt->data); + + return process_data.at(me); } simgrid::smpi::ActorExt* smpi_process_remote(ActorPtr actor) @@ -626,9 +627,7 @@ int smpi_main(const char* executable, int argc, char* argv[]) } TRACE_global_init(); - SIMIX_global_init(&argc, argv); - MSG_init(&argc, argv); // FIXME Remove this MSG call. Once it's removed, we can remove the msg header include as well SMPI_switch_data_segment = &smpi_switch_data_segment;