]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Add Vishnu batch manager and Vishnu specific parameters
authorbarate <barate>
Thu, 1 Dec 2011 08:22:45 +0000 (08:22 +0000)
committerbarate <barate>
Thu, 1 Dec 2011 08:22:45 +0000 (08:22 +0000)
src/Launcher/Launcher.cxx
src/Launcher/Launcher_Job.cxx
src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx
src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx
src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx
src/ResourcesManager/SALOME_ResourcesManager.cxx

index 919f2fcc0374cfba21dc4a573459ab10765182f9..46ee67b54a7984c40092487c482ca57f4c937c2a 100644 (file)
@@ -422,6 +422,9 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params)
     case ll:
       bmType = "eLL";
       break;
+    case vishnu:
+      bmType = "eVISHNU";
+      break;
     default:
       LAUNCHER_MESSAGE("Bad batch description of the resource: Batch = " << params.Batch);
       throw LauncherException("No batchmanager for that cluster - Bad batch description of the resource");
index 77cb72f4ec531eabfb28d7b44f1416a5b4924338..8d18a32039624da0faf3602ffa0d573f2268621e 100644 (file)
@@ -539,6 +539,18 @@ Launcher::Job::common_job_params()
   std::map<std::string, std::string>::iterator it = _specific_parameters.find("LoalLevelerJobType");
   if (it != _specific_parameters.end())
     params["LL_JOBTYPE"] = it->second;
+  it = _specific_parameters.find("VishnuPassword");
+  if (it != _specific_parameters.end())
+    params["VISHNU_PASSWORD"] = it->second;
+  it = _specific_parameters.find("VishnuHostname");
+  if (it != _specific_parameters.end())
+    params["VISHNU_HOSTNAME"] = it->second;
+  it = _specific_parameters.find("VishnuHostLogin");
+  if (it != _specific_parameters.end())
+    params["VISHNU_HOST_LOGIN"] = it->second;
+  it = _specific_parameters.find("VishnuHostWorkdir");
+  if (it != _specific_parameters.end())
+    params["VISHNU_HOST_WORKDIR"] = it->second;
   return params;
 }
 
index 54efedf58f851780d01bb241ec7ff2d4cb416954..db3f42d16d9793fc2e904c00b54c52a892456a6e 100755 (executable)
@@ -547,6 +547,8 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser
       resource.Batch = slurm;
     else if  (aBatch == "ll")
       resource.Batch = ll;
+    else if  (aBatch == "vishnu")
+      resource.Batch = vishnu;
     else
       resource.Batch = none;
   }
@@ -757,6 +759,9 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc)
       case ll:
         xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ll");
         break;
+      case vishnu:
+        xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "vishnu");
+        break;
       default:
         xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "");
     }
index 31d99920fde1e0ecaafa7d0af577ddfdf7d11dd0..b3b2057fff8feeb15edc0e0da98c4378e42eb650 100644 (file)
@@ -215,6 +215,8 @@ ParserResourcesType::PrintBatchType() const
     return "slurm";
   else if (Batch == ll)
     return "ll";
+  else if (Batch == vishnu)
+    return "vishnu";
   else 
     return "ssh";
 }
index 39b732dcab82f08e66af315fe27bc28695f9a0a2..48800da409532c7092d47cfef2ab9b41b83b48ef 100755 (executable)
@@ -45,7 +45,7 @@ enum AccessProtocolType {rsh, ssh, srun};
 
 enum AccessModeType {interactive, batch};
 
-enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll, slurm};
+enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll, slurm, vishnu};
 
 enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurmmpi, prun};
 
index 3d0b9f48ff4f6aeb13c00f7d3ba5ea49aa48a94a..ff499c6cc23697d4a9db06d0d85a46967e7551d5 100644 (file)
@@ -264,6 +264,8 @@ SALOME_ResourcesManager::GetResourceDefinition(const char * name)
     p_ptr->batch = "ssh";
   else if( resource.Batch == ll )
     p_ptr->batch = "ll";
+  else if( resource.Batch == vishnu )
+    p_ptr->batch = "vishnu";
 
   return p_ptr;
 }
@@ -299,6 +301,8 @@ SALOME_ResourcesManager::AddResource(const Engines::ResourceDefinition& new_reso
     resource.Batch = ssh_batch;
   else if  (aBatch == "ll")
     resource.Batch = ll;
+  else if  (aBatch == "vishnu")
+    resource.Batch = vishnu;
   else if (aBatch == "")
     resource.Batch = none;
   else {