]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
MPI fixes.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Tue, 5 Jan 2016 14:29:27 +0000 (15:29 +0100)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Tue, 5 Jan 2016 14:29:27 +0000 (15:29 +0100)
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".

salome_adm/cmake_files/FindSalomeMPI.cmake
src/Container/Component_i.cxx
src/Container/SALOME_ContainerManager.cxx

index 9eee1cf0b0e85e846d0e9fb70f2693ceca6e7353..d9e6ec1c56f7782a3e4fb380024a96c4f3586e10 100644 (file)
@@ -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")
index 5cd709ace0d7a4fb17df421938ed347771906e08..d45bd4ed81f7c65c928cb7184d67a319472bf34c 100644 (file)
@@ -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);
 
index 36b5df43e39e763d70a5f871f4c7644ee5d33131..98f03802a5e625cbe357b0141ecccd23097cdf16 100644 (file)
@@ -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 ";