Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[cppcheck] Reduce scope for variable.
[simgrid.git] / src / smpi / mpi / smpi_comm.cpp
index a670b30..8571f38 100644 (file)
@@ -39,12 +39,12 @@ Comm::Comm(MPI_Group group, MPI_Topology topo, int smp, int in_id) : group_(grou
   leaders_map_     = nullptr;
   is_blocked_      = 0;
   info_            = MPI_INFO_NULL;
-  errhandler_      = MPI_ERRORS_RETURN;
-  static int global_id_=0;
+  errhandler_      = MPI_ERRORS_ARE_FATAL;
   //First creation of comm is done before SIMIX_run, so only do comms for others
   if(in_id==MPI_UNDEFINED && smp==0 && this->rank()!=MPI_UNDEFINED ){
     int id;
     if(this->rank()==0){
+      static int global_id_ = 0;
       id=global_id_;
       global_id_++;
     }