From adffe84535370ab0850a520897d1e6eabe235f5a Mon Sep 17 00:00:00 2001 From: barate Date: Thu, 1 Dec 2011 08:22:45 +0000 Subject: [PATCH] Add Vishnu batch manager and Vishnu specific parameters --- src/Launcher/Launcher.cxx | 3 +++ src/Launcher/Launcher_Job.cxx | 12 ++++++++++++ .../SALOME_ResourcesCatalog_Handler.cxx | 5 +++++ .../SALOME_ResourcesCatalog_Parser.cxx | 2 ++ .../SALOME_ResourcesCatalog_Parser.hxx | 2 +- src/ResourcesManager/SALOME_ResourcesManager.cxx | 4 ++++ 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 919f2fcc0..46ee67b54 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -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"); diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx index 77cb72f4e..8d18a3203 100644 --- a/src/Launcher/Launcher_Job.cxx +++ b/src/Launcher/Launcher_Job.cxx @@ -539,6 +539,18 @@ Launcher::Job::common_job_params() std::map::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; } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 54efedf58..db3f42d16 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -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 ""); } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index 31d99920f..b3b2057ff 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -215,6 +215,8 @@ ParserResourcesType::PrintBatchType() const return "slurm"; else if (Batch == ll) return "ll"; + else if (Batch == vishnu) + return "vishnu"; else return "ssh"; } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx index 39b732dca..48800da40 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx @@ -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}; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 3d0b9f48f..ff499c6cc 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -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 { -- 2.39.2