Salome HOME
Porting to OCCT 7.8.0
[modules/kernel.git] / src / MPIContainer / MPIObject_i.cxx
index 918bae62836edfb27a38edd9ee38a742d8051d01..ac51582e782179c9273ec57a5384e719b003a8e7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -23,6 +23,7 @@
 #include "MPIObject_i.hxx"
 #include "utilities.h"
 #include "Utils_SALOME_Exception.hxx"
+#include "Basics_MpiUtils.hxx"
 
 #define TIMEOUT 5
 
@@ -49,7 +50,7 @@ Engines::IORTab* MPIObject_i::tior()
   for(unsigned int ip=0;ip<tior->length();ip++)
     tior[ip] = (*_tior)[ip];
   return tior._retn(); 
-};
+}
 
 void MPIObject_i::tior(const Engines::IORTab& ior)
 {
@@ -153,8 +154,7 @@ void MPIObject_i::remoteMPI2Connect(std::string service)
   _srv[service] = false;
 
   MPI_Barrier(MPI_COMM_WORLD);
-
-  MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+  MPI_ERROR_HANDLER(MPI_ERRORS_RETURN);
   MPI_Info_create(&info);
   MPI_Info_set(info, "ompi_unique", "true");
   if( _numproc == 0 )
@@ -203,7 +203,7 @@ void MPIObject_i::remoteMPI2Connect(std::string service)
           throw SALOME_Exception(msg.str().c_str());
         }
     }
-  MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+  MPI_ERROR_HANDLER(MPI_ERRORS_ARE_FATAL);
   
   /* If rank 0 is server, all processes call MPI_Comm_accept */
   /* If rank 0 is not server, all processes call MPI_Comm_connect */