From: Frederic Suter Date: Wed, 27 Nov 2019 12:16:59 +0000 (+0100) Subject: don't know why this was still a struct X-Git-Tag: v3.25~360 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8ba862f74d468ea353e79d4d8db17028689ab86f don't know why this was still a struct --- diff --git a/MANIFEST.in b/MANIFEST.in index af8fabfca3..fc4b1d2c37 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -799,6 +799,8 @@ include teshsuite/simix/generic-simcalls/generic-simcalls.cpp include teshsuite/simix/generic-simcalls/generic-simcalls.tesh include teshsuite/simix/stack-overflow/stack-overflow.cpp include teshsuite/simix/stack-overflow/stack-overflow.tesh +include teshsuite/smpi/auto-shared/auto-shared.c +include teshsuite/smpi/auto-shared/auto-shared.tesh include teshsuite/smpi/bug-17132/bug-17132.c include teshsuite/smpi/bug-17132/bug-17132.tesh include teshsuite/smpi/coll-allgather/coll-allgather.c diff --git a/include/simgrid/kernel/routing/NetZoneImpl.hpp b/include/simgrid/kernel/routing/NetZoneImpl.hpp index 8da6d424e6..4b0754414e 100644 --- a/include/simgrid/kernel/routing/NetZoneImpl.hpp +++ b/include/simgrid/kernel/routing/NetZoneImpl.hpp @@ -60,7 +60,7 @@ public: s4u::NetZone* get_iface() { return &piface_; } /** @brief Make a host within that NetZone */ - simgrid::s4u::Host* create_host(const char* name, const std::vector& speed_per_pstate, int core_count, + simgrid::s4u::Host* create_host(const std::string& name, const std::vector& speed_per_pstate, int core_count, const std::map* props); /** @brief Creates a new route in this NetZone */ virtual void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index ff8fe36d84..1fa94750af 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -92,7 +92,7 @@ int NetZoneImpl::get_host_count() return count; } -simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, const std::vector& speed_per_pstate, +simgrid::s4u::Host* NetZoneImpl::create_host(const std::string& name, const std::vector& speed_per_pstate, int coreAmount, const std::map* props) { simgrid::s4u::Host* res = new simgrid::s4u::Host(name); diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index c86fbbbb7b..318a7194a8 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -193,7 +193,7 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster XBT_DEBUG("", host_id.c_str(), cluster->speeds.front()); simgrid::kernel::routing::HostCreationArgs host; - host.id = host_id.c_str(); + host.id = host_id; if ((cluster->properties != nullptr) && (not cluster->properties->empty())) { host.properties = new std::unordered_map; @@ -316,7 +316,7 @@ void sg_platf_new_cabinet(simgrid::kernel::routing::CabinetCreationArgs* cabinet simgrid::kernel::routing::HostCreationArgs host; host.pstate = 0; host.core_amount = 1; - host.id = hostname.c_str(); + host.id = hostname; host.speed_per_pstate.push_back(cabinet->speed); sg_platf_new_host(&host); @@ -501,7 +501,7 @@ void sg_platf_new_peer(simgrid::kernel::routing::PeerCreationArgs* peer) std::vector speed_per_pstate; speed_per_pstate.push_back(peer->speed); - simgrid::s4u::Host* host = as->create_host(peer->id.c_str(), speed_per_pstate, 1, nullptr); + simgrid::s4u::Host* host = as->create_host(peer->id, speed_per_pstate, 1, nullptr); as->set_peer_link(host->get_netpoint(), peer->bw_in, peer->bw_out, peer->coord); diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 23ce8272aa..af6afbad2c 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -32,8 +32,9 @@ namespace routing { * used, instead of malloced structures. */ -struct HostCreationArgs { - const char* id = nullptr; +class HostCreationArgs { +public: + std::string id; std::vector speed_per_pstate; int pstate = 0; int core_amount = 0;