-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
int i;
char port_name[MPI_MAX_PORT_NAME];
char port_name_clt[MPI_MAX_PORT_NAME];
+ MPI_Info info;
std::ostringstream msg;
if( service.size() == 0 )
MPI_Barrier(MPI_COMM_WORLD);
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ MPI_Info_create(&info);
+ MPI_Info_set(info, "ompi_unique", "true");
if( _numproc == 0 )
{
/* rank 0 try to be a server. If service is already published, try to be a cient */
MESSAGE("[" << _numproc << "] I get the connection with " << service << " at " << port_name_clt << std::endl);
MPI_Close_port( port_name );
}
- else if ( MPI_Publish_name((char*)service.c_str(), MPI_INFO_NULL, port_name) == MPI_SUCCESS )
+ else if ( MPI_Publish_name((char*)service.c_str(), info, port_name) == MPI_SUCCESS )
{
_srv[service] = true;
_port_name[service] = port_name;