From: ribes Date: Thu, 12 May 2011 15:42:31 +0000 (+0000) Subject: Adding SLURM batch X-Git-Tag: V6_3_0~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee22c85c9e09cadd0e43ebbc4bf5735a8d4cb196;p=modules%2Fkernel.git Adding SLURM batch Have to slurm to slurmmpi --- diff --git a/src/Launcher/BatchTest.cxx b/src/Launcher/BatchTest.cxx index 80f59953e..64424d4cc 100644 --- a/src/Launcher/BatchTest.cxx +++ b/src/Launcher/BatchTest.cxx @@ -304,6 +304,12 @@ BatchTest::test_jobsubmit_simple() result = "OK"; return result; } + if (batch_type == "slurm") + { + INFOS("test_jobsubmit_simple not yet implemented for slurm... return OK"); + result = "OK"; + return result; + } if (batch_type == "sge") { INFOS("test_jobsubmit_simple not yet implemented for sge... return OK"); @@ -472,7 +478,7 @@ BatchTest::test_jobsubmit_mpi() mpiImpl = new MpiImpl_MPICH2(); else if(mpi_type == "openmpi") mpiImpl = new MpiImpl_OPENMPI(); - else if(mpi_type == "slurm") + else if(mpi_type == "slurmmpi") mpiImpl = new MpiImpl_SLURM(); else { @@ -495,6 +501,13 @@ BatchTest::test_jobsubmit_mpi() return result; } + if (batch_type == "slurm") + { + INFOS("test_jobsubmit_simple not yet implemented for slurm... 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 c4ef5180c..1d8e0754a 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -426,8 +426,8 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) case openmpi: mpi = "openmpi"; break; - case slurm: - mpi = "slurm"; + case slurmmpi: + mpi = "slurmmpi"; break; case prun: mpi = "prun"; @@ -451,6 +451,9 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) case ccc: bmType = "eCCC"; break; + case slurm: + bmType = "eSLURM"; + break; case ssh_batch: bmType = "eSSH"; break; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 484517390..59334fa30 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -245,8 +245,8 @@ SALOME_ResourcesCatalog_Handler::ProcessCluster(xmlNodePtr cluster_descr, Parser resource.mpi = mpich2; else if (anMpi == "openmpi") resource.mpi = openmpi; - else if (anMpi == "slurm") - resource.mpi = slurm; + else if (anMpi == "slurmmpi") + resource.mpi = slurmmpi; else if (anMpi == "prun") resource.mpi = prun; else @@ -531,6 +531,8 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser resource.Batch = ssh_batch; else if (aBatch == "ccc") resource.Batch = ccc; + else if (aBatch == "slurm") + resource.Batch = slurm; else if (aBatch == "ll") resource.Batch = ll; else @@ -550,8 +552,8 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser resource.mpi = mpich2; else if (anMpi == "openmpi") resource.mpi = openmpi; - else if (anMpi == "slurm") - resource.mpi = slurm; + else if (anMpi == "slurmmpi") + resource.mpi = slurmmpi; else if (anMpi == "prun") resource.mpi = prun; else @@ -728,6 +730,9 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc) case ccc: xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ccc"); break; + case slurm: + xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "slurm"); + break; case ssh_batch: xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ssh_batch"); break; @@ -752,8 +757,8 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc) case openmpi: xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "openmpi"); break; - case slurm: - xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurm"); + case slurmmpi: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurmmpi"); break; case prun: xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "prun"); diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index aa7098266..c5e001bcd 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -207,6 +207,8 @@ ParserResourcesType::PrintBatchType() const return "sge"; else if (Batch == ccc) return "ccc"; + else if (Batch == slurm) + return "slurm"; else if (Batch == ll) return "ll"; else @@ -226,8 +228,8 @@ ParserResourcesType::PrintMpiImplType() const return "mpich2"; else if (mpi == openmpi) return "openmpi"; - else if (mpi == slurm) - return "slurm"; + else if (mpi == slurmmpi) + return "slurmmpi"; else return "prun"; } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx index 08fb578ca..b940b06cb 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx @@ -45,9 +45,9 @@ enum AccessProtocolType {rsh, ssh}; enum AccessModeType {interactive, batch}; -enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll}; +enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll, slurm}; -enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurm, prun}; +enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurmmpi, prun}; class RESOURCESMANAGER_EXPORT ResourceDataToSort { diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 281496eb3..876558d15 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -241,8 +241,8 @@ SALOME_ResourcesManager::GetResourceDefinition(const char * name) p_ptr->mpiImpl = "mpich2"; else if( resource.mpi == openmpi ) p_ptr->mpiImpl = "openmpi"; - else if( resource.mpi == slurm ) - p_ptr->mpiImpl = "slurm"; + else if( resource.mpi == slurmmpi ) + p_ptr->mpiImpl = "slurmmpi"; else if( resource.mpi == prun ) p_ptr->mpiImpl = "prun"; @@ -254,6 +254,8 @@ SALOME_ResourcesManager::GetResourceDefinition(const char * name) p_ptr->batch = "sge"; else if( resource.Batch == ccc ) p_ptr->batch = "ccc"; + else if( resource.Batch == slurm ) + p_ptr->batch = "slurm"; else if( resource.Batch == ssh_batch ) p_ptr->batch = "ssh"; else if( resource.Batch == ll ) @@ -285,8 +287,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 == "slurm") + resource.Batch = slurm; else if (aBatch == "ssh_batch") resource.Batch = ssh_batch; else if (aBatch == "ll") @@ -309,8 +311,8 @@ SALOME_ResourcesManager::AddResource(const Engines::ResourceDefinition& new_reso resource.mpi = mpich2; else if (anMpi == "openmpi") resource.mpi = openmpi; - else if (anMpi == "slurm") - resource.mpi = slurm; + else if (anMpi == "slurmmpi") + resource.mpi = slurmmpi; else if (anMpi == "prun") resource.mpi = prun; else if (anMpi == "")