Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix for potentially empty names
[simgrid.git] / src / smpi / include / smpi_win.hpp
index ef7eb7e..090e898 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2020. The SimGrid Team.
+/* Copyright (c) 2010-2021. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -54,9 +54,11 @@ public:
   int attach (void *base, MPI_Aint size);
   int detach (const void *base);
   void get_name(char* name, int* length) const;
+  std::string name() const {return name_.empty() ? std::string("MPI_Win") : name_;}
   void get_group( MPI_Group* group);
   void set_name(const char* name);
   int rank() const;
+  MPI_Comm comm() const;
   int dynamic() const;
   int start(MPI_Group group, int assert);
   int post(MPI_Group group, int assert);