X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43f7ca1cac5ab1858e318fdd6239d0a0c3b3d893..de190af4974a9ed57a52e649e5cbe0ac83512acb:/src/smpi/internals/SmpiHost.cpp diff --git a/src/smpi/internals/SmpiHost.cpp b/src/smpi/internals/SmpiHost.cpp index 6f7139162d..016072846f 100644 --- a/src/smpi/internals/SmpiHost.cpp +++ b/src/smpi/internals/SmpiHost.cpp @@ -1,14 +1,16 @@ -/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2017-2018. 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. */ #include "SmpiHost.hpp" #include "simgrid/s4u/VirtualMachine.hpp" -#include "smpi/smpi_utils.hpp" +#include "smpi_utils.hpp" +#include "xbt/config.hpp" #include #include +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_host, smpi, "Logging specific to SMPI (host)"); @@ -25,7 +27,7 @@ double SmpiHost::orecv(size_t size) // Iterate over all the sections that were specified and find the right value. (fact.factor represents the interval // sizes; we want to find the section that has fact.factor <= size and no other such fact.factor <= size) // Note: parse_factor() (used before) already sorts the vector we iterate over! - for (auto fact : orecv_parsed_values) { + for (auto const& fact : orecv_parsed_values) { if (size <= fact.factor) { // Values already too large, use the previously computed value of current! XBT_DEBUG("or : %zu <= %zu return %.10f", size, fact.factor, current); return current; @@ -48,7 +50,7 @@ double SmpiHost::osend(size_t size) // value. (fact.factor represents the interval sizes; we want to find the // section that has fact.factor <= size and no other such fact.factor <= size) // Note: parse_factor() (used before) already sorts the vector we iterate over! - for (auto& fact : osend_parsed_values) { + for (auto const& fact : osend_parsed_values) { if (size <= fact.factor) { // Values already too large, use the previously computed value of current! XBT_DEBUG("os : %zu <= %zu return %.10f", size, fact.factor, current); return current; @@ -71,7 +73,7 @@ double SmpiHost::oisend(size_t size) // Iterate over all the sections that were specified and find the right value. (fact.factor represents the interval // sizes; we want to find the section that has fact.factor <= size and no other such fact.factor <= size) // Note: parse_factor() (used before) already sorts the vector we iterate over! - for (auto& fact : oisend_parsed_values) { + for (auto const& fact : oisend_parsed_values) { if (size <= fact.factor) { // Values already too large, use the previously computed value of current! XBT_DEBUG("ois : %zu <= %zu return %.10f", size, fact.factor, current); return current; @@ -114,23 +116,5 @@ SmpiHost::SmpiHost(simgrid::s4u::Host *ptr) : host(ptr) } SmpiHost::~SmpiHost()=default; - -static void onCreation(simgrid::s4u::Host& host) -{ -} - -static void onHostDestruction(simgrid::s4u::Host& host) -{ - // Ignore virtual machines - if (dynamic_cast(&host)) - return; -} - -void sg_smpi_host_init() -{ - simgrid::s4u::Host::onCreation.connect(&onCreation); - simgrid::s4u::Host::onDestruction.connect(&onHostDestruction); -} - } }