X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ede4cf5925f79bf5544eb880574789c28e086d8e..9e3b2f1d55a07271c05db2ed5b3fec27561097f9:/src/smpi/mpi/smpi_datatype.cpp diff --git a/src/smpi/mpi/smpi_datatype.cpp b/src/smpi/mpi/smpi_datatype.cpp index c9b75ab4ac..8da35270a4 100644 --- a/src/smpi/mpi/smpi_datatype.cpp +++ b/src/smpi/mpi/smpi_datatype.cpp @@ -1,5 +1,5 @@ /* smpi_datatype.cpp -- MPI primitives to handle datatypes */ -/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2019. 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. */ @@ -8,6 +8,7 @@ #include "simgrid/modelchecker.h" #include "smpi_datatype_derived.hpp" #include "smpi_op.hpp" +#include "src/instr/instr_private.hpp" #include "src/smpi/include/smpi_actor.hpp" #include @@ -220,15 +221,16 @@ const char* Datatype::encode(MPI_Datatype dt) return dt->id.c_str(); } -MPI_Datatype Datatype::decode(std::string datatype_id) +MPI_Datatype Datatype::decode(const std::string& datatype_id) { return id2type_lookup.find(datatype_id)->second; } bool Datatype::is_replayable() { - return ((this==MPI_BYTE)||(this==MPI_DOUBLE)||(this==MPI_INT)|| - (this==MPI_CHAR)||(this==MPI_SHORT)||(this==MPI_LONG)||(this==MPI_FLOAT)); + return (simgrid::instr::trace_format == simgrid::instr::TraceFormat::Ti) && + ((this == MPI_BYTE) || (this == MPI_DOUBLE) || (this == MPI_INT) || (this == MPI_CHAR) || + (this == MPI_SHORT) || (this == MPI_LONG) || (this == MPI_FLOAT)); } size_t Datatype::size(){