X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5e472a6023eb14e7396b16fa4eb47c805d8f4acf..8d9283f70767d924231914c13674153d4b90a168:/src/smpi/colls/smpi_automatic_selector.cpp diff --git a/src/smpi/colls/smpi_automatic_selector.cpp b/src/smpi/colls/smpi_automatic_selector.cpp index 3ffffa0278..c01b6d3a24 100644 --- a/src/smpi/colls/smpi_automatic_selector.cpp +++ b/src/smpi/colls/smpi_automatic_selector.cpp @@ -1,29 +1,25 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. +/* Copyright (c) 2013-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 - #include -#include "colls_private.h" +#include "colls_private.hpp" #include "smpi_process.hpp" - //attempt to do a quick autotuning version of the collective, - #define TRACE_AUTO_COLL(cat) \ if (TRACE_is_enabled()) { \ - type_t type = PJ_type_get_or_null(#cat, PJ_type_get_root()); \ - if (not type) { \ - type = PJ_type_event_new(#cat, PJ_type_get_root()); \ - } \ - char cont_name[25]; \ - snprintf(cont_name, 25, "rank-%d", smpi_process()->index()); \ - value* val = value::get_or_new(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type); \ - new NewEvent(SIMIX_get_clock(), PJ_container_get(cont_name), type, val); \ + simgrid::instr::EventType* type = \ + simgrid::instr::Container::getRoot()->type_->by_name_or_create(#cat); \ + \ + 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)); \ } #define AUTOMATIC_COLL_BENCH(cat, ret, args, args2) \