X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2f32ccb82b474b69e3100f139e0b602d67ea5f63..edcc47d7373e2f1bc9ae14bf0dcceb38af59ba2b:/src/smpi/bindings/smpi_pmpi.cpp diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 8d8886f123..1f3ec5815d 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -4,12 +4,13 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "private.hpp" +#include "simgrid/instr.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" #include "smpi_comm.hpp" #include "smpi_datatype_derived.hpp" #include "smpi_status.hpp" -#include "src/simix/ActorImpl.hpp" +#include "src/kernel/actor/ActorImpl.hpp" #include "src/smpi/include/smpi_actor.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_pmpi, smpi, "Logging specific to SMPI (pmpi)"); @@ -19,15 +20,18 @@ void TRACE_smpi_set_category(const char *category) { //need to end bench otherwise categories for execution tasks are wrong smpi_bench_end(); - if (category != nullptr) - TRACE_internal_smpi_set_category(category); + if (category != nullptr) { + // declare category + TRACE_category(category); + smpi_process()->set_tracing_category(category); + } //begin bench after changing process's category smpi_bench_begin(); } /* PMPI User level calls */ -int PMPI_Init(int *argc, char ***argv) +int PMPI_Init(int*, char***) { xbt_assert(simgrid::s4u::Engine::is_initialized(), "Your MPI program was not properly initialized. The easiest is to use smpirun to start it."); @@ -211,7 +215,7 @@ int PMPI_Error_class(int errorcode, int* errorclass) { } int PMPI_Error_string(int errorcode, char* string, int* resultlen){ - if (errorcode<0 || string ==nullptr){ + if (errorcode<0 || errorcode>= MPI_MAX_ERROR_STRING || string ==nullptr){ return MPI_ERR_ARG; } else { static const char *smpi_error_string[] = {