From: secher Date: Fri, 8 Jul 2011 14:39:21 +0000 (+0000) Subject: petits bugs X-Git-Tag: V6_main_FINAL~1007 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f903606903f454a073bd71fa8c574d09959388c4;p=tools%2Fmedcoupling.git petits bugs --- diff --git a/src/ParaMEDMEM/OverlapElementLocator.hxx b/src/ParaMEDMEM/OverlapElementLocator.hxx index 398657647..a3358b8af 100644 --- a/src/ParaMEDMEM/OverlapElementLocator.hxx +++ b/src/ParaMEDMEM/OverlapElementLocator.hxx @@ -29,6 +29,7 @@ #include #include #include +#include namespace ParaMEDMEM { diff --git a/src/ParaMEDMEMTest/MPI2Connector.cxx b/src/ParaMEDMEMTest/MPI2Connector.cxx index 386587c20..226e30690 100644 --- a/src/ParaMEDMEMTest/MPI2Connector.cxx +++ b/src/ParaMEDMEMTest/MPI2Connector.cxx @@ -20,6 +20,7 @@ #include "MPI2Connector.hxx" #include +#include MPI2Connector::MPI2Connector() { @@ -55,7 +56,12 @@ MPI_Comm MPI2Connector::remoteMPI2Connect(const std::string& service) { /* rank 0 try to be a server. If service is already published, try to be a cient */ MPI_Open_port(MPI_INFO_NULL, port_name); - if ( MPI_Publish_name((char*)service.c_str(), MPI_INFO_NULL, port_name) == MPI_SUCCESS ) + if ( MPI_Lookup_name((char*)service.c_str(), MPI_INFO_NULL, port_name_clt) == MPI_SUCCESS ) + { + std::cerr << "[" << _num_proc << "] 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 ) { _srv = true; _port_name = port_name;