From f2fe987620641c30a57f6c2f8a52f442c6e5326e Mon Sep 17 00:00:00 2001 From: secher Date: Wed, 24 Oct 2012 08:37:23 +0000 Subject: [PATCH] add ompi mpi implementation for cea mars cluster --- src/Launcher/BatchTest.cxx | 2 ++ src/Launcher/Launcher.cxx | 3 +++ src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx | 7 +++++++ src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx | 2 ++ src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx | 2 +- src/ResourcesManager/SALOME_ResourcesManager.cxx | 6 +++++- 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Launcher/BatchTest.cxx b/src/Launcher/BatchTest.cxx index 37076b0fb..d765f51e8 100644 --- a/src/Launcher/BatchTest.cxx +++ b/src/Launcher/BatchTest.cxx @@ -478,6 +478,8 @@ BatchTest::test_jobsubmit_mpi() mpiImpl = new MpiImpl_MPICH2(); else if(mpi_type == "openmpi") mpiImpl = new MpiImpl_OPENMPI(); + else if(mpi_type == "ompi") + mpiImpl = new MpiImpl_OMPI(); else if(mpi_type == "slurmmpi") mpiImpl = new MpiImpl_SLURM(); else diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 62bfe647b..d749f8258 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -403,6 +403,9 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params) case openmpi: mpi = "openmpi"; break; + case ompi: + mpi = "ompi"; + break; case slurmmpi: mpi = "slurmmpi"; break; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index f65db96c0..ae42569dd 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -248,6 +248,8 @@ SALOME_ResourcesCatalog_Handler::ProcessCluster(xmlNodePtr cluster_descr, Parser resource.mpi = mpich2; else if (anMpi == "openmpi") resource.mpi = openmpi; + else if (anMpi == "ompi") + resource.mpi = ompi; else if (anMpi == "slurmmpi") resource.mpi = slurmmpi; else if (anMpi == "prun") @@ -543,6 +545,8 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser resource.mpi = mpich2; else if (anMpi == "openmpi") resource.mpi = openmpi; + else if (anMpi == "ompi") + resource.mpi = ompi; else if (anMpi == "slurmmpi") resource.mpi = slurmmpi; else if (anMpi == "prun") @@ -768,6 +772,9 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc) case openmpi: xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "openmpi"); break; + case ompi: + xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "ompi"); + break; case slurmmpi: xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurmmpi"); break; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index 50360f72f..9cf3cfa99 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -263,6 +263,8 @@ ParserResourcesType::PrintMpiImplType() const return "mpich2"; else if (mpi == openmpi) return "openmpi"; + else if (mpi == ompi) + return "ompi"; else if (mpi == slurmmpi) return "slurmmpi"; else diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx index 20a390db1..1ac87b340 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx @@ -47,7 +47,7 @@ enum AccessModeType {interactive, batch}; enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll, slurm, vishnu}; -enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurmmpi, prun}; +enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, ompi, slurmmpi, prun}; class RESOURCESMANAGER_EXPORT ResourceDataToSort { diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index eb932fdc8..30a1c1b44 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -237,6 +237,8 @@ SALOME_ResourcesManager::GetResourceDefinition(const char * name) p_ptr->mpiImpl = "mpich2"; else if( resource.mpi == openmpi ) p_ptr->mpiImpl = "openmpi"; + else if( resource.mpi == ompi ) + p_ptr->mpiImpl = "ompi"; else if( resource.mpi == slurmmpi ) p_ptr->mpiImpl = "slurmmpi"; else if( resource.mpi == prun ) @@ -315,6 +317,8 @@ SALOME_ResourcesManager::AddResource(const Engines::ResourceDefinition& new_reso resource.mpi = mpich2; else if (anMpi == "openmpi") resource.mpi = openmpi; + else if (anMpi == "ompi") + resource.mpi = ompi; else if (anMpi == "slurmmpi") resource.mpi = slurmmpi; else if (anMpi == "prun") @@ -499,7 +503,7 @@ SALOME_ResourcesManager::getMachineFile(std::string resource_name, cluster_it++; } } - else if (resource.mpi == openmpi) + else if ((resource.mpi == openmpi) || (resource.mpi == ompi)) { // Creating machine file machine_file_name = tmpnam(NULL); -- 2.39.2