Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Check types matching in MPI communications.
[simgrid.git] / src / smpi / include / smpi_request.hpp
index 547d93b..1449c54 100644 (file)
@@ -30,7 +30,7 @@ class Request : public F2C {
   void* old_buf_;
   /* this is especially for derived datatypes that we need to serialize/unserialize.
    * It let us know how to unserialize at the end of the communication */
-  MPI_Datatype old_type_;
+  MPI_Datatype type_;
   size_t size_;
   aid_t src_;
   aid_t dst_;
@@ -40,6 +40,7 @@ class Request : public F2C {
   aid_t real_src_;
   int real_tag_;
   bool truncated_;
+  bool unmatched_types_;
   size_t real_size_;
   MPI_Comm comm_;
   simgrid::kernel::activity::ActivityImplPtr action_;
@@ -51,6 +52,7 @@ class Request : public F2C {
   std::unique_ptr<smpi_mpi_generalized_request_funcs_t> generalized_funcs;
   std::vector<MPI_Request> nbc_requests_;
   static bool match_common(MPI_Request req, MPI_Request sender, MPI_Request receiver);
+  static bool match_types(MPI_Datatype stype, MPI_Datatype rtype);
 
 public:
   Request() = default;
@@ -65,7 +67,7 @@ public:
   int flags() const { return flags_; }
   bool detached() const { return detached_; }
   std::string name() const override { return std::string("MPI_Request"); }
-  MPI_Datatype type() const { return old_type_; }
+  MPI_Datatype type() const { return type_; }
   void print_request(const char* message) const;
   void start();
   void cancel();