SALOME::MPISender::param_var p =_mySender->getParam();
_mySender->send();
sproc = p->myproc;
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#endif
while ( i != TIMEOUT && MPI_Lookup_name((char*)p->service,MPI_INFO_NULL,port_name_clt) != MPI_SUCCESS) {
i++;
- }
+ }
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#endif
if ( i == TIMEOUT ) {
MPI_Finalize();
exit(-1);
// TIMEOUT is inefficient since MPI_Comm_Connect doesn't return if we asked for
// a service that has been unpublished !
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#endif
i = 0;
while ( i != TIMEOUT && MPI_Comm_connect(port_name_clt, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &com)!=MPI_SUCCESS ) {
i++;
- }
+ }
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#endif
if ( i == TIMEOUT ) {
MPI_Finalize();
exit(-1);
service += stag;
p->service = CORBA::string_dup(service.c_str());
MPI_Open_port(MPI_INFO_NULL, _portName);
- MPI_Errhandler_set(MPI_COMM_WORLD,MPI_ERRORS_RETURN);
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#else
+ MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#endif
while ( i != TIMEOUT && MPI_Publish_name((char*)service.c_str(),MPI_INFO_NULL,_portName) != MPI_SUCCESS) {
i++;
- }
- MPI_Errhandler_set(MPI_COMM_WORLD,MPI_ERRORS_ARE_FATAL);
+ }
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#else
+ MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#endif
if ( i == TIMEOUT ) {
MPI_Close_port(_portName);
MPI_Finalize();
_srv[service] = false;
MPI_Barrier(MPI_COMM_WORLD);
-
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#endif
MPI_Info_create(&info);
MPI_Info_set(info, "ompi_unique", "true");
if( _numproc == 0 )
throw SALOME_Exception(msg.str().c_str());
}
}
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#endif
/* If rank 0 is server, all processes call MPI_Comm_accept */
/* If rank 0 is not server, all processes call MPI_Comm_connect */
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
MPI_Barrier(MPI_COMM_WORLD);
-
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+#endif
+
#ifdef HAVE_MPI2
MPI_Info_create(&info);
MPI_Info_set(info, "ompi_unique", "true");
exit(1);
}
}
+#if OMPI_MAJOR_VERSION >= 4
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#else
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
+#endif
MPI_Bcast(&srv,1,MPI_INT,0,MPI_COMM_WORLD);
if ( srv )
MPI_Comm_accept( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &icom );