From 4f574e92fa8f54ae961eefa7bc2a08eb679a3c3f Mon Sep 17 00:00:00 2001 From: secher Date: Wed, 9 Jun 2010 14:17:05 +0000 Subject: [PATCH] add ccc batch manager for CCRT machines --- src/Launcher/BatchTest.cxx | 13 +++++++++++++ src/Launcher/Launcher.cxx | 5 +++++ .../SALOME_ResourcesCatalog_Handler.cxx | 5 +++++ .../SALOME_ResourcesCatalog_Parser.cxx | 2 ++ .../SALOME_ResourcesCatalog_Parser.hxx | 2 +- src/ResourcesManager/SALOME_ResourcesManager.cxx | 4 ++++ 6 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/Launcher/BatchTest.cxx b/src/Launcher/BatchTest.cxx index b9a9a5d62..80f59953e 100644 --- a/src/Launcher/BatchTest.cxx +++ b/src/Launcher/BatchTest.cxx @@ -298,6 +298,12 @@ BatchTest::test_jobsubmit_simple() result = "OK"; return result; } + if (batch_type == "ccc") + { + INFOS("test_jobsubmit_simple not yet implemented for ccc... return OK"); + result = "OK"; + return result; + } if (batch_type == "sge") { INFOS("test_jobsubmit_simple not yet implemented for sge... return OK"); @@ -482,6 +488,13 @@ BatchTest::test_jobsubmit_mpi() return result; } + if (batch_type == "ccc") + { + INFOS("test_jobsubmit_simple not yet implemented for ccc... return OK"); + result = "OK"; + return result; + } + if (batch_type == "sge") { INFOS("test_jobsubmit_simple not yet implemented for sge... return OK"); diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 0af54436c..8489de9b2 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -22,6 +22,7 @@ #ifdef WITH_LIBBATCH #include +#include #include #include #include @@ -409,6 +410,10 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) message += "eSGE"; fact = new Batch::FactBatchManager_eSGE; break; + case ccc: + message += "eCCC"; + fact = new Batch::FactBatchManager_eCCC; + break; case ssh_batch: message += "eSSH"; fact = new Batch::FactBatchManager_eSSH; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index f7ac8ba75..ac6341bb6 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -534,6 +534,8 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser resource.Batch = sge; else if (aBatch == "ssh_batch") resource.Batch = ssh_batch; + else if (aBatch == "ccc") + resource.Batch = ccc; else resource.Batch = none; } @@ -726,6 +728,9 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc) case sge: xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "sge"); break; + case ccc: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ccc"); + break; case ssh_batch: xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ssh_batch"); break; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index 8bd177c4e..f84d26b2c 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -205,6 +205,8 @@ ParserResourcesType::PrintBatchType() const return "lsf"; else if (Batch == sge) return "sge"; + else if (Batch == ccc) + return "ccc"; else return "ssh"; } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx index a867f96aa..d376e5545 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx @@ -45,7 +45,7 @@ enum AccessProtocolType {rsh, ssh}; enum AccessModeType {interactive, batch}; -enum BatchType {none, pbs, lsf, sge, ssh_batch}; +enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc}; enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurm, prun}; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index b03d51fcb..acdfe259d 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -252,6 +252,8 @@ SALOME_ResourcesManager::GetResourceDefinition(const char * name) p_ptr->batch = "lsf"; else if( resource.Batch == sge ) p_ptr->batch = "sge"; + else if( resource.Batch == ccc ) + p_ptr->batch = "ccc"; else if( resource.Batch == ssh_batch ) p_ptr->batch = "ssh"; @@ -281,6 +283,8 @@ SALOME_ResourcesManager::AddResource(const Engines::ResourceDefinition& new_reso resource.Batch = lsf; else if (aBatch == "sge") resource.Batch = sge; + else if (aBatch == "ccc") + resource.Batch = ccc; else if (aBatch == "ssh_batch") resource.Batch = ssh_batch; else if (aBatch == "") -- 2.39.2