From: barate Date: Fri, 5 Apr 2013 13:07:52 +0000 (+0000) Subject: Explicitly indicate batch managers with limited support X-Git-Tag: V7_2_0~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5701ef4de4cfddb9ea5f538d816cb2e20107c18;p=modules%2Fjobmanager.git Explicitly indicate batch managers with limited support --- diff --git a/doc/resource.rst b/doc/resource.rst index d71876f..47a420d 100644 --- a/doc/resource.rst +++ b/doc/resource.rst @@ -55,8 +55,13 @@ The description of each attribute is given in the table below. **protocol** Yes Network protocol to use for creating connections (ssh or rsh). **username** Yes User login on the computer. -**batch** Yes Type of batch manager installed in the resource. Use *ssh* if - the resource is a single computer. +**Batch Manager** No Type of batch manager installed in the resource. Use *None* + if the resource is a single computer. Some batch managers are + indicated with "limited support". This means that their + support in JOBMANAGER is either new and experimental or + old and obsolete. In both cases, they have not been fully + validated in this version and thus can be buggy or even not + work at all. **iprotocol** Yes Internal protocol to use on a cluster (i.e. the command used to launch processes on other nodes of the cluster). **mpiImpl** No MPI implementation to use. @@ -148,10 +153,10 @@ Two usage scenarios of SALOME's resource with the JOBMANAGER This section describes to common scenarios for understanding how to describe a resource for the JOBMANAGER. -Using an interactive resource ------------------------------ +Using a single machine +---------------------- -In this scenario, you need to launch a job into your computer or an interactive computer +In this scenario, you need to launch a job on your computer or another single computer available in your network. To launch a **command** job you need to fill the following attributes: @@ -159,7 +164,7 @@ To launch a **command** job you need to fill the following attributes: - **hostname** - **protocol** = *ssh* - **username** -- **batch** = *ssh* +- **Batch Manager** = *None* - **Is Cluster Head** = *false* **Warning:** You have to configure ssh for allowing ssh commands without asking @@ -179,14 +184,14 @@ To launch a **command** job you need to fill the following attributes: - **hostname** - **protocol** - **username** -- **batch** +- **Batch Manager** - **iprotocol** - **nb_proc_per_node** (only with PBS batch manager) - **Is Cluster Head** = *true* **Warning:** You have to configure ssh for allowing ssh commands without asking -interactive password (RSA or DSA keys) between your computer and the cluster and between -the cluster's nodes. +interactive password (RSA or DSA keys) between your computer and the cluster and +eventually between the cluster's nodes. To launch a **SALOME** command job you also need to fill the following attributes: diff --git a/src/engine/BL_SALOMEServices.cxx b/src/engine/BL_SALOMEServices.cxx index f237f44..1b579e5 100644 --- a/src/engine/BL_SALOMEServices.cxx +++ b/src/engine/BL_SALOMEServices.cxx @@ -179,7 +179,7 @@ BL::SALOMEServices::addResource(BL::ResourceDescr & new_resource) resource_definition->name = CORBA::string_dup(new_resource.name.c_str()); resource_definition->hostname = CORBA::string_dup(new_resource.hostname.c_str()); - if (new_resource.batch == "" || new_resource.batch == "ssh_batch") + if (new_resource.batch == "ssh_batch") resource_definition->type = CORBA::string_dup("single_machine"); else resource_definition->type = CORBA::string_dup("cluster"); diff --git a/src/genericgui/JM_EditSalomeResource.cxx b/src/genericgui/JM_EditSalomeResource.cxx index bdab699..8d40837 100644 --- a/src/genericgui/JM_EditSalomeResource.cxx +++ b/src/genericgui/JM_EditSalomeResource.cxx @@ -20,6 +20,8 @@ #include "JM_EditSalomeResource.hxx" #include "BL_Traces.hxx" +using namespace std; + JM::EditSalomeResource::EditSalomeResource(QWidget *parent, BL::SALOMEServices * salome_services, const std::string & resource_name) : QDialog(parent) { @@ -127,19 +129,19 @@ JM::EditSalomeResource::EditSalomeResource(QWidget *parent, BL::SALOMEServices * _iprotocol_line->addItem("blaunch"); _iprotocol_line->setCurrentIndex(0); - QLabel * batch_label = new QLabel("Batch:"); + QLabel * batch_label = new QLabel("Batch Manager:"); _batch_line = new QComboBox(this); - _batch_line->addItem("pbs"); - _batch_line->addItem("lsf"); - _batch_line->addItem("sge"); - _batch_line->addItem("ssh"); - _batch_line->addItem("ccc"); - _batch_line->addItem("slurm"); - _batch_line->addItem("ll"); - _batch_line->addItem("vishnu"); - _batch_line->addItem("oar"); - _batch_line->addItem("coorm"); - _batch_line->setCurrentIndex(-1); + _batch_line->addItem("None", "ssh_batch"); + _batch_line->addItem("CCC", "ccc"); + _batch_line->addItem("LSF", "lsf"); + _batch_line->addItem("SGE", "sge"); + _batch_line->addItem("SLURM", "slurm"); + _batch_line->addItem("VISHNU", "vishnu"); + _batch_line->addItem("CooRM (limited support)", "coorm"); + _batch_line->addItem("LoadLeveler (limited support)", "ll"); + _batch_line->addItem("OAR (limited support)", "oar"); + _batch_line->addItem("PBS (limited support)", "pbs"); + _batch_line->setCurrentIndex(0); QLabel * mpiImpl_label = new QLabel("MPI impl:"); _mpiImpl_line = new QComboBox(this); @@ -240,29 +242,13 @@ JM::EditSalomeResource::get_infos() else _iprotocol_line->setCurrentIndex(-1); - std::string batch = resource_descr.batch.c_str(); - if (batch == "pbs") - _batch_line->setCurrentIndex(0); - else if (batch == "lsf") - _batch_line->setCurrentIndex(1); - else if (batch == "sge") - _batch_line->setCurrentIndex(2); - else if (batch == "ssh_batch") - _batch_line->setCurrentIndex(3); - else if (batch == "ccc") - _batch_line->setCurrentIndex(4); - else if (batch == "slurm") - _batch_line->setCurrentIndex(5); - else if (batch == "ll") - _batch_line->setCurrentIndex(6); - else if (batch == "vishnu") - _batch_line->setCurrentIndex(7); - else if (batch == "oar") - _batch_line->setCurrentIndex(8); - else if (batch == "coorm") - _batch_line->setCurrentIndex(9); - else - _batch_line->setCurrentIndex(-1); + for (int i=0 ; i<_batch_line->count() ; i++) + { + if (_batch_line->itemData(i).toString().toStdString() == resource_descr.batch) + { + _batch_line->setCurrentIndex(i); + } + } std::string mpiImpl = resource_descr.mpiImpl.c_str(); if (mpiImpl == "lam") @@ -361,9 +347,7 @@ JM::EditSalomeResource::accept() // ComboBox resource.protocol = _protocol_line->currentText().toStdString(); resource.iprotocol = _iprotocol_line->currentText().toStdString(); - resource.batch = _batch_line->currentText().toStdString(); - if (resource.batch == "ssh") - resource.batch = "ssh_batch"; + resource.batch = _batch_line->itemData(_batch_line->currentIndex()).toString().toStdString(); resource.mpiImpl = _mpiImpl_line->currentText().toStdString(); // QSpinBox