Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sanitize the OOP of kernel::profile
[simgrid.git] / src / smpi / mpi / smpi_datatype.cpp
index c9b75ab..1f233ba 100644 (file)
@@ -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 <string>
@@ -227,8 +228,9 @@ MPI_Datatype Datatype::decode(std::string datatype_id)
 
 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(){