Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
activity::CommImpl: stick to our naming standards for the fields
[simgrid.git] / src / smpi / include / smpi_comm.hpp
index ed621f1..aaee438 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-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. */
@@ -28,7 +28,7 @@ class Comm : public F2C, public Keyval{
     int is_uniform_;
     int* non_uniform_map_; //set if smp nodes have a different number of processes allocated
     int is_blocked_;// are ranks allocated on the same smp node contiguous ?
-
+    int is_smp_comm_;// set to 0 in case this is already an intra-comm or a leader-comm to avoid recursivity
     std::list<MPI_Win> rma_wins_; // attached windows for synchronization.
 
   public:
@@ -36,7 +36,7 @@ class Comm : public F2C, public Keyval{
     static int keyval_id_;
 
     Comm() = default;
-    Comm(MPI_Group group, MPI_Topology topo);
+    Comm(MPI_Group group, MPI_Topology topo, int smp=0);
     int dup(MPI_Comm* newcomm);
     MPI_Group group();
     MPI_Topology topo();
@@ -51,6 +51,7 @@ class Comm : public F2C, public Keyval{
     MPI_Comm get_intra_comm();
     int is_uniform();
     int is_blocked();
+    int is_smp_comm();
     MPI_Comm split(int color, int key);
     void cleanup_smp();
     void ref();
@@ -58,7 +59,7 @@ class Comm : public F2C, public Keyval{
     static void destroy(MPI_Comm comm);
     void init_smp();
 
-    int add_f();
+    int add_f() override;
     static void free_f(int id);
     static Comm* f2c(int);
 
@@ -69,6 +70,7 @@ class Comm : public F2C, public Keyval{
     void add_rma_win(MPI_Win win);
     void remove_rma_win(MPI_Win win);
     void finish_rma_calls();
+    MPI_Comm split_type(int type, int key, MPI_Info info);
 
 };