_batch_params.maximum_duration = "";
_batch_params.expected_memory = "";
_batch_params.nb_proc = 0;
+ _batch_params.exclusive = false;
_files_params.result_directory = "";
_resource_choosed = "";
_batch_queue = "";
_batch_params.maximum_duration = "";
_batch_params.expected_memory = "";
_batch_params.nb_proc = 0;
+ _batch_params.exclusive = false;
_files_params.result_directory = "";
_resource_choosed = "";
_batch_queue = "";
}
void
-BL::Job::setBatchParameters(BL::Job::BatchParam & param)
+BL::Job::setBatchParameters(const BL::Job::BatchParam & param)
{
- _batch_params.batch_directory = param.batch_directory;
- _batch_params.maximum_duration = param.maximum_duration;
- _batch_params.expected_memory = param.expected_memory;
- _batch_params.nb_proc = param.nb_proc;
-
- // Parameters for COORM
- _batch_params.launcher_file = param.launcher_file;
- _batch_params.launcher_args = param.launcher_args;
+ _batch_params = param;
}
-BL::Job::BatchParam &
+const BL::Job::BatchParam &
BL::Job::getBatchParameters()
{
return _batch_params;
std::string maximum_duration;
std::string expected_memory;
int nb_proc;
+ bool exclusive;
// Parameters for COORM
std::string launcher_file;
std::string launcher_args;
};
- void setBatchParameters(BL::Job::BatchParam & param);
- BL::Job::BatchParam & getBatchParameters();
+ void setBatchParameters(const BL::Job::BatchParam & param);
+ const BL::Job::BatchParam & getBatchParameters();
struct FilesParam
{
job_parameters->resource_required.name = CORBA::string_dup(job->getResource().c_str());
job_parameters->resource_required.nb_proc = cpp_batch_params.nb_proc;
job_parameters->queue = CORBA::string_dup(job->getBatchQueue().c_str());
+ job_parameters->exclusive = cpp_batch_params.exclusive;
// Memory
CORBA::Long memory;
batch_param.batch_directory = job_parameters->work_directory.in();
batch_param.maximum_duration = job_parameters->maximum_duration.in();
batch_param.nb_proc = job_parameters->resource_required.nb_proc;
+ batch_param.exclusive = job_parameters->exclusive;
std::ostringstream mem_stream;
mem_stream << job_parameters->resource_required.mem_mb << "mb";
batch_param.expected_memory = mem_stream.str();
proc_value.setNum(batch_params.nb_proc);
setField("proc_value", proc_value);
+ setField("exclusive", batch_params.exclusive);
+
if (batch_params.maximum_duration == "")
{
setField("duration_hour", 0);
expected_memory = mem.trimmed().toStdString() + mem_type.toStdString();
nb_proc = field("proc_value").toInt();
+ exclusive = field("exclusive").toBool();
// Files Panel
QString f_result_directory = field("result_directory").toString();
BL::JobNamePage::yacs_schema_button(bool checked)
{
if (checked)
+ {
_explanation->setText("This job permits to launch a YACS schema into a SALOME application");
+ setField("exclusive", true);
+ }
}
void
BL::JobNamePage::command_button(bool checked)
{
if (checked)
+ {
_explanation->setText("This job permits to launch a script into a distributed resource. This script is not launched into a SALOME application");
+ setField("exclusive", false);
+ }
}
void
BL::JobNamePage::python_salome_button(bool checked)
{
if (checked)
+ {
_explanation->setText("This job permits to launch a python script into a SALOME application");
+ setField("exclusive", true);
+ }
}
bool
registerField("batch_directory", line_directory);
// exected during time
- QLabel * label_duration = new QLabel("Maximum during time: ");
+ QLabel * label_duration = new QLabel("Time limit: ");
QSpinBox * spin_duration_hour = new QSpinBox(this);
QLabel * label_duration_hour = new QLabel("Hours");
spin_duration_hour->setMinimum(0);
registerField("duration_min", spin_duration_min);
// memory
- QLabel * label_memory = new QLabel("Memory per nodes expected: ");
+ QLabel * label_memory = new QLabel("Memory per node: ");
QSpinBox * spin_memory = new QSpinBox(this);
spin_memory->setMinimum(0);
spin_memory->setMaximum(1000000);
registerField("mem_type", combo_memory);
// proc
- QLabel * label_proc = new QLabel("Number of proc expected: ");
+ QLabel * label_proc = new QLabel("Number of cores: ");
QSpinBox * spin_proc = new QSpinBox(this);
spin_proc->setMinimum(1);
spin_proc->setMaximum(1000000);
registerField("proc_value", spin_proc);
+ // exclusive
+ QLabel * label_exclusive = new QLabel("Exclusive (do not share nodes with other jobs): ");
+ QCheckBox * check_exclusive = new QCheckBox(this);
+ check_exclusive->setChecked(true);
+ registerField("exclusive", check_exclusive);
+
QGridLayout *layout = new QGridLayout;
layout->addWidget(label_directory, 0, 0);
layout->addWidget(line_directory, 0, 1, 1, -1);
layout->addWidget(combo_memory, 2, 2);
layout->addWidget(label_proc, 3, 0);
layout->addWidget(spin_proc, 3, 1);
+ layout->addWidget(label_exclusive, 4, 0);
+ layout->addWidget(check_exclusive, 4, 1);
main_layout->insertLayout(-1, layout);
std::string maximum_duration;
std::string expected_memory;
int nb_proc;
+ bool exclusive;
// Parameters for COORM
std::string launcher_file;
_job_em_label_value = new QLabel("");
QLabel * job_nop_label = new QLabel("Number of processors:");
_job_nop_label_value = new QLabel("");
+ QLabel * job_excl_label = new QLabel("Exclusive:");
+ _job_excl_label_value = new QLabel("");
// Parameters for COORM
QLabel * job_lf_label = new QLabel("Launcher file:");
_other_run_values_form->insertRow(0, job_mdt_label, _job_mdt_label_value);
_other_run_values_form->insertRow(1, job_em_label, _job_em_label_value);
_other_run_values_form->insertRow(2, job_nop_label, _job_nop_label_value);
+ _other_run_values_form->insertRow(3, job_excl_label, _job_excl_label_value);
// Parameters for COORM
- _other_run_values_form->insertRow(3, job_la_label, _job_la_label_value);
+ _other_run_values_form->insertRow(4, job_la_label, _job_la_label_value);
QHBoxLayout * box_layout = new QHBoxLayout();
box_layout->addLayout(_run_values_form);
_job_mdt_label_value->setText(QString(batch_params.maximum_duration.c_str()));
_job_em_label_value->setText(QString(batch_params.expected_memory.c_str()));
_job_nop_label_value->setText(QVariant(batch_params.nb_proc).toString());
+ QString exclText = (batch_params.exclusive)? "yes" : "no";
+ _job_excl_label_value->setText(exclText);
// Parameters for COORM
_job_lf_label_value->setText(QString(batch_params.launcher_file.c_str()));
_job_mdt_label_value->setText("");
_job_em_label_value->setText("");
_job_nop_label_value->setText("");
+ _job_excl_label_value->setText("");
_job_jobfile_label_value->setText("");
_job_envfile_label_value->setText("");
QLabel * _job_mdt_label_value;
QLabel * _job_em_label_value;
QLabel * _job_nop_label_value;
+ QLabel * _job_excl_label_value;
// Specific Values
QLabel * _yacs_dump_state_label;
param.maximum_duration = wizard.maximum_duration;
param.expected_memory = wizard.expected_memory;
param.nb_proc = wizard.nb_proc;
+ param.exclusive = wizard.exclusive;
// Parameters for COORM
param.launcher_file = wizard.launcher_file;