From: Ovidiu Mircescu Date: Tue, 5 Jan 2016 14:29:27 +0000 (+0100) Subject: MPI fixes. X-Git-Tag: V7_8_0a1~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2b900d8a3cd172e349ea0750b4506b516edf179c;p=modules%2Fkernel.git MPI fixes. Flag -DHAVE_MPI2 is now detected properly.There was an issue when MPI_C_INCLUDE_PATH contained several paths. You can now use MPI containers on your local machine, with protocol "sh". --- diff --git a/salome_adm/cmake_files/FindSalomeMPI.cmake b/salome_adm/cmake_files/FindSalomeMPI.cmake index 9eee1cf0b..d9e6ec1c5 100644 --- a/salome_adm/cmake_files/FindSalomeMPI.cmake +++ b/salome_adm/cmake_files/FindSalomeMPI.cmake @@ -35,7 +35,8 @@ IF(MPI_FOUND) # otherwise take ours. include(CheckSymbolExists) SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBRARIES}) - CHECK_SYMBOL_EXISTS(MPI_Publish_name ${MPI_C_INCLUDE_PATH}/mpi.h MPI2_IS_OK) + SET(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH}) + CHECK_SYMBOL_EXISTS(MPI_Publish_name mpi.h MPI2_IS_OK) SET(MPI_DEFINITIONS "${MPI_CXX_COMPILE_FLAGS}") IF(MPI2_IS_OK) MESSAGE(STATUS "Your mpi implementation is compatible with mpi2 ... adding -DHAVE_MPI2") diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index 5cd709ace..d45bd4ed8 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -167,7 +167,9 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, setContainerName(); const CORBA::String_var ior = _orb->object_to_string(_container); if(regist) + { _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", _instanceName.c_str()); + } if(notif) _notifSupplier = new NOTIFICATION_Supplier(instanceName, notif); diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 36b5df43e..98f03802a 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -390,7 +390,8 @@ Engines::Container_ptr SALOME_ContainerManager::GiveContainer(const Engines::Con return ret; } // A mpi parallel container register on zero node in NS - containerNameInNS = _NS->BuildContainerNameForNS(params, GetMPIZeroNode(hostname,machFile).c_str()); + std::string mpiZeroNode = GetMPIZeroNode(resource_selected,machFile).c_str(); + containerNameInNS = _NS->BuildContainerNameForNS(params, mpiZeroNode.c_str()); } else containerNameInNS = _NS->BuildContainerNameForNS(params, hostname.c_str()); @@ -1194,12 +1195,17 @@ std::string SALOME_ContainerManager::GetMPIZeroNode(const std::string machine, c std::string zeronode; std::string command; std::string tmpFile = BuildTemporaryFileName(); + const ParserResourcesType resInfo(_resManager->GetResourceDefinition(machine)); + + if(resInfo.Protocol == sh) + { + return resInfo.HostName; + } if( GetenvThreadSafe("LIBBATCH_NODEFILE") == NULL ) { if (_isAppliSalomeDefined) { - const ParserResourcesType resInfo(_resManager->GetResourceDefinition(machine)); if (resInfo.Protocol == rsh) command = "rsh ";