_salome_launcher_id = -1;
_dump_yacs_state = 0;
_ll_jobtype = "";
+ _vishnu_password = "";
+ _vishnu_hostname = "";
+ _vishnu_host_login = "";
+ _vishnu_host_workdir = "";
}
BL::Job::Job(const std::string & name)
_salome_launcher_id = -1;
_dump_yacs_state = 0;
_ll_jobtype = "";
+ _vishnu_password = "";
+ _vishnu_hostname = "";
+ _vishnu_host_login = "";
+ _vishnu_host_workdir = "";
}
BL::Job::~Job()
return _ll_jobtype;
}
+void
+BL::Job::setVishnuPassword(const std::string & vishnu_password)
+{
+ _vishnu_password = vishnu_password;
+}
+
+const std::string &
+BL::Job::getVishnuPassword()
+{
+ return _vishnu_password;
+}
+
+void BL::Job::setVishnuHostname(const std::string & vishnu_hostname)
+{
+ _vishnu_hostname = vishnu_hostname;
+}
+
+const std::string &
+BL::Job::getVishnuHostname()
+{
+ return _vishnu_hostname;
+}
+
+void
+BL::Job::setVishnuHostLogin(const std::string & vishnu_host_login)
+{
+ _vishnu_host_login = vishnu_host_login;
+}
+
+const std::string &
+BL::Job::getVishnuHostLogin()
+{
+ return _vishnu_host_login;
+}
+
+void
+BL::Job::setVishnuHostWorkdir(const std::string & vishnu_host_workdir)
+{
+ _vishnu_host_workdir = vishnu_host_workdir;
+}
+
+const std::string &
+BL::Job::getVishnuHostWorkdir()
+{
+ return _vishnu_host_workdir;
+}
+
void
BL::Job::setState(BL::Job::State state)
{
void setLoadLevelerJobType(const std::string & jobtype);
std::string & getLoadLevelerJobType();
+ void setVishnuPassword(const std::string & vishnu_password);
+ const std::string & getVishnuPassword();
+
+ void setVishnuHostname(const std::string & vishnu_hostname);
+ const std::string & getVishnuHostname();
+
+ void setVishnuHostLogin(const std::string & vishnu_host_login);
+ const std::string & getVishnuHostLogin();
+
+ void setVishnuHostWorkdir(const std::string & vishnu_host_workdir);
+ const std::string & getVishnuHostWorkdir();
+
enum State {CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR, FAILED, NOT_CREATED};
void setState(BL::Job::State state);
BL::Job::State getState();
std::string _batch_queue;
std::string _ll_jobtype;
+ std::string _vishnu_password;
+ std::string _vishnu_hostname;
+ std::string _vishnu_host_login;
+ std::string _vishnu_host_workdir;
+
int _salome_launcher_id;
};
new_parameter->value = CORBA::string_dup(job->getLoadLevelerJobType().c_str());
job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter;
}
+ if (job->getVishnuPassword() != "")
+ {
+ job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1);
+ Engines::Parameter_var new_parameter = new Engines::Parameter;
+ new_parameter->name = CORBA::string_dup("VishnuPassword");
+ new_parameter->value = CORBA::string_dup(job->getVishnuPassword().c_str());
+ job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter;
+ }
+ if (job->getVishnuHostname() != "")
+ {
+ job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1);
+ Engines::Parameter_var new_parameter = new Engines::Parameter;
+ new_parameter->name = CORBA::string_dup("VishnuHostname");
+ new_parameter->value = CORBA::string_dup(job->getVishnuHostname().c_str());
+ job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter;
+ }
+ if (job->getVishnuHostLogin() != "")
+ {
+ job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1);
+ Engines::Parameter_var new_parameter = new Engines::Parameter;
+ new_parameter->name = CORBA::string_dup("VishnuHostLogin");
+ new_parameter->value = CORBA::string_dup(job->getVishnuHostLogin().c_str());
+ job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter;
+ }
+ if (job->getVishnuHostWorkdir() != "")
+ {
+ job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1);
+ Engines::Parameter_var new_parameter = new Engines::Parameter;
+ new_parameter->name = CORBA::string_dup("VishnuHostWorkdir");
+ new_parameter->value = CORBA::string_dup(job->getVishnuHostWorkdir().c_str());
+ job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter;
+ }
// Files
job_parameters->job_name = CORBA::string_dup(job->getName().c_str());
std::string user_value = job_parameters->specific_parameters[i].value.in();
job_return->setLoadLevelerJobType(user_value);
}
+ if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuPassword")
+ {
+ std::string user_value = job_parameters->specific_parameters[i].value.in();
+ job_return->setVishnuPassword(user_value);
+ }
+ if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuHostname")
+ {
+ std::string user_value = job_parameters->specific_parameters[i].value.in();
+ job_return->setVishnuHostname(user_value);
+ }
+ if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuHostLogin")
+ {
+ std::string user_value = job_parameters->specific_parameters[i].value.in();
+ job_return->setVishnuHostLogin(user_value);
+ }
+ if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuHostWorkdir")
+ {
+ std::string user_value = job_parameters->specific_parameters[i].value.in();
+ job_return->setVishnuHostWorkdir(user_value);
+ }
}
// Get current state
dump_yacs_state = -1;
ll_jobtype = "";
+ vishnu_password = "";
+ vishnu_hostname = "";
+ vishnu_host_login = "";
+ vishnu_host_workdir = "";
+
setOptions(QWizard::IndependentPages | QWizard::NoBackButtonOnStartPage);
// Common pages
setField("resource_choosed", QString(job->getResource().c_str()));
setField("batch_queue", QString(job->getBatchQueue().c_str()));
setField("ll_jobtype", QString(job->getLoadLevelerJobType().c_str()));
+
+ setField("vishnu_password", QString(job->getVishnuPassword().c_str()));
+ setField("vishnu_hostname", QString(job->getVishnuHostname().c_str()));
+ setField("vishnu_host_login", QString(job->getVishnuHostLogin().c_str()));
+ setField("vishnu_host_workdir", QString(job->getVishnuHostWorkdir().c_str()));
}
}
ll_jobtype = "";
}
+ // Vishnu parameters
+ if (batch == "vishnu")
+ {
+ QString f_vishnu_password = field("vishnu_password").toString();
+ vishnu_password = f_vishnu_password.toStdString();
+ QString f_vishnu_hostname = field("vishnu_hostname").toString();
+ vishnu_hostname = f_vishnu_hostname.toStdString();
+ QString f_vishnu_host_login = field("vishnu_host_login").toString();
+ vishnu_host_login = f_vishnu_host_login.toStdString();
+ QString f_vishnu_host_workdir = field("vishnu_host_workdir").toString();
+ vishnu_host_workdir = f_vishnu_host_workdir.toStdString();
+ }
+ else
+ {
+ vishnu_password = "";
+ vishnu_hostname = "";
+ vishnu_host_login = "";
+ vishnu_host_workdir = "";
+ }
+
start_job = field("start_job").toBool();
}
}
_ll_label->hide();
_ll_value->hide();
+ _vishnu_password_label = new QLabel("Vishnu password (not secure!!!):", this);
+ _vishnu_password_value = new QLineEdit(this);
+ QString tt = "This password will be transmitted and stored without encryption. "
+ "This mechanism is absolutely not secure. "
+ "Do never use any of your \"real\" passwords here.";
+ _vishnu_password_label->setToolTip(tt);
+ _vishnu_password_value->setToolTip(tt);
+ registerField("vishnu_password", _vishnu_password_value);
+ _vishnu_password_label->hide();
+ _vishnu_password_value->hide();
+
+ _vishnu_hostname_label = new QLabel("Vishnu hostname:", this);
+ _vishnu_hostname_value = new QLineEdit(this);
+ registerField("vishnu_hostname", _vishnu_hostname_value);
+ _vishnu_hostname_label->hide();
+ _vishnu_hostname_value->hide();
+
+ _vishnu_host_login_label = new QLabel("Vishnu host login:", this);
+ _vishnu_host_login_value = new QLineEdit(this);
+ registerField("vishnu_host_login", _vishnu_host_login_value);
+ _vishnu_host_login_label->hide();
+ _vishnu_host_login_value->hide();
+
+ _vishnu_host_workdir_label = new QLabel("Vishnu host working directory:", this);
+ _vishnu_host_workdir_value = new QLineEdit(this);
+ registerField("vishnu_host_workdir", _vishnu_host_workdir_value);
+ _vishnu_host_workdir_label->hide();
+ _vishnu_host_workdir_value->hide();
+
_main_layout = new QGridLayout;
_main_layout->addWidget(resource_group_box, 0, 0, 1, -1);
_main_layout->addWidget(resource_label, 1, 0);
_ll_label->show();
_ll_value->show();
}
+
+ if (field("vishnu_password").toString() != "")
+ {
+ _main_layout->addWidget(_vishnu_password_label, 3, 0);
+ _main_layout->addWidget(_vishnu_password_value, 3, 1);
+ _vishnu_password_label->show();
+ _vishnu_password_value->show();
+
+ _main_layout->addWidget(_vishnu_hostname_label, 4, 0);
+ _main_layout->addWidget(_vishnu_hostname_value, 4, 1);
+ _vishnu_hostname_label->show();
+ _vishnu_hostname_value->show();
+
+ _main_layout->addWidget(_vishnu_host_login_label, 5, 0);
+ _main_layout->addWidget(_vishnu_host_login_value, 5, 1);
+ _vishnu_host_login_label->show();
+ _vishnu_host_login_value->show();
+
+ _main_layout->addWidget(_vishnu_host_workdir_label, 6, 0);
+ _main_layout->addWidget(_vishnu_host_workdir_value, 6, 1);
+ _vishnu_host_workdir_label->show();
+ _vishnu_host_workdir_value->show();
+ }
}
bool
return false;
}
}
+ if (batch == "vishnu")
+ {
+ QString vishnu_password = field("vishnu_password").toString();
+ if (vishnu_password == "")
+ {
+ QMessageBox::warning(NULL, "Vishnu Error", "Please define a Vishnu password");
+ return false;
+ }
+ QString vishnu_hostname = field("vishnu_hostname").toString();
+ if (vishnu_hostname == "")
+ {
+ QMessageBox::warning(NULL, "Vishnu Error", "Please define a Vishnu hostname");
+ return false;
+ }
+ QString vishnu_host_login = field("vishnu_host_login").toString();
+ if (vishnu_host_login == "")
+ {
+ QMessageBox::warning(NULL, "Vishnu Error", "Please define a login for Vishnu host");
+ return false;
+ }
+ QString vishnu_host_workdir = field("vishnu_host_workdir").toString();
+ if (vishnu_host_workdir == "")
+ {
+ QMessageBox::warning(NULL, "Vishnu Error", "Please define a working directory on Vishnu host");
+ return false;
+ }
+ }
return true;
}
_ll_label->hide();
_ll_value->hide();
}
+
+ // Specific parameters for Vishnu
+ if (batch == "vishnu")
+ {
+ _main_layout->addWidget(_vishnu_password_label, 3, 0);
+ _main_layout->addWidget(_vishnu_password_value, 3, 1);
+ _vishnu_password_label->show();
+ _vishnu_password_value->show();
+
+ _main_layout->addWidget(_vishnu_hostname_label, 4, 0);
+ _main_layout->addWidget(_vishnu_hostname_value, 4, 1);
+ _vishnu_hostname_label->show();
+ _vishnu_hostname_value->show();
+
+ _main_layout->addWidget(_vishnu_host_login_label, 5, 0);
+ _main_layout->addWidget(_vishnu_host_login_value, 5, 1);
+ _vishnu_host_login_label->show();
+ _vishnu_host_login_value->show();
+
+ _main_layout->addWidget(_vishnu_host_workdir_label, 6, 0);
+ _main_layout->addWidget(_vishnu_host_workdir_value, 6, 1);
+ _vishnu_host_workdir_label->show();
+ _vishnu_host_workdir_value->show();
+ }
+ else
+ {
+ _main_layout->removeWidget(_vishnu_password_label);
+ _main_layout->removeWidget(_vishnu_password_value);
+ _vishnu_password_label->hide();
+ _vishnu_password_value->hide();
+
+ _main_layout->removeWidget(_vishnu_hostname_label);
+ _main_layout->removeWidget(_vishnu_hostname_value);
+ _vishnu_hostname_label->hide();
+ _vishnu_hostname_value->hide();
+
+ _main_layout->removeWidget(_vishnu_host_login_label);
+ _main_layout->removeWidget(_vishnu_host_login_value);
+ _vishnu_host_login_label->hide();
+ _vishnu_host_login_value->hide();
+
+ _main_layout->removeWidget(_vishnu_host_workdir_label);
+ _main_layout->removeWidget(_vishnu_host_workdir_value);
+ _vishnu_host_workdir_label->hide();
+ _vishnu_host_workdir_value->hide();
+ }
}
int
int dump_yacs_state;
std::string ll_jobtype;
+ std::string vishnu_password;
+ std::string vishnu_hostname;
+ std::string vishnu_host_login;
+ std::string vishnu_host_workdir;
+
public:
enum {Page_JobName,
Page_YACSSchema,
QLabel * _ll_label;
QLineEdit * _ll_value;
QGridLayout * _main_layout;
+
+ QLabel * _vishnu_password_label;
+ QLineEdit * _vishnu_password_value;
+ QLabel * _vishnu_hostname_label;
+ QLineEdit * _vishnu_hostname_value;
+ QLabel * _vishnu_host_login_label;
+ QLineEdit * _vishnu_host_login_value;
+ QLabel * _vishnu_host_workdir_label;
+ QLineEdit * _vishnu_host_workdir_value;
};
class YACSSchemaPage: virtual public QWizardPage
_batch_queue_value = new QLabel("");
_ll_jobtype_label = new QLabel("LoadLeveler JobType:");
_ll_jobtype_value = new QLabel("");
+ _vishnu_password_label = new QLabel("Vishnu password:");
+ _vishnu_password_value = new QLabel("");
+ _vishnu_hostname_label = new QLabel("Vishnu hostname:");
+ _vishnu_hostname_value = new QLabel("");
+ _vishnu_host_login_label = new QLabel("Vishnu host login:");
+ _vishnu_host_login_value = new QLabel("");
+ _vishnu_host_workdir_label = new QLabel("Vishnu host working directory:");
+ _vishnu_host_workdir_value = new QLabel("");
QGroupBox * run_values_box = new QGroupBox("Run values");
_run_values_form = new QFormLayout;
_ll_jobtype_value->setText(QVariant(job->getLoadLevelerJobType().c_str()).toString());
_other_run_values_form->insertRow(_other_run_values_form->rowCount(), _ll_jobtype_label, _ll_jobtype_value);
}
+ if (job->getVishnuPassword() != "")
+ {
+ _vishnu_password_value->setText(QVariant(job->getVishnuPassword().c_str()).toString());
+ _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_password_label, _vishnu_password_value);
+ _vishnu_hostname_value->setText(QVariant(job->getVishnuHostname().c_str()).toString());
+ _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_hostname_label, _vishnu_hostname_value);
+ _vishnu_host_login_value->setText(QVariant(job->getVishnuHostLogin().c_str()).toString());
+ _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_host_login_label, _vishnu_host_login_value);
+ _vishnu_host_workdir_value->setText(QVariant(job->getVishnuHostWorkdir().c_str()).toString());
+ _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_host_workdir_label, _vishnu_host_workdir_value);
+ }
}
else
DEBTRACE ("itemFromIndex returns 0 !");
_yacs_dump_state_value->setText("");
_batch_queue_value->setText("");
_ll_jobtype_value->setText("");
+ _vishnu_password_value->setText("");
+ _vishnu_hostname_value->setText("");
+ _vishnu_host_login_value->setText("");
+ _vishnu_host_workdir_value->setText("");
}
}
QLabel * _batch_queue_value;
QLabel * _ll_jobtype_label;
QLabel * _ll_jobtype_value;
+ QLabel * _vishnu_password_label;
+ QLabel * _vishnu_password_value;
+ QLabel * _vishnu_hostname_label;
+ QLabel * _vishnu_hostname_value;
+ QLabel * _vishnu_host_login_label;
+ QLabel * _vishnu_host_login_value;
+ QLabel * _vishnu_host_workdir_label;
+ QLabel * _vishnu_host_workdir_value;
QListWidget * _input_files_list;
QListWidget * _output_files_list;
new_job->setResource(wizard.resource_choosed);
new_job->setBatchQueue(wizard.batch_queue);
new_job->setLoadLevelerJobType(wizard.ll_jobtype);
+ new_job->setVishnuPassword(wizard.vishnu_password);
+ new_job->setVishnuHostname(wizard.vishnu_hostname);
+ new_job->setVishnuHostLogin(wizard.vishnu_host_login);
+ new_job->setVishnuHostWorkdir(wizard.vishnu_host_workdir);
// End
addJobToLauncher(wizard.job_name);
_batch_line->addItem("ccc");
_batch_line->addItem("slurm");
_batch_line->addItem("ll");
+ _batch_line->addItem("vishnu");
_batch_line->setCurrentIndex(-1);
QLabel * mpiImpl_label = new QLabel("MPI impl:");
_batch_line->setCurrentIndex(5);
else if (batch == "ll")
_batch_line->setCurrentIndex(6);
+ else if (batch == "vishnu")
+ _batch_line->setCurrentIndex(7);
else
_batch_line->setCurrentIndex(-1);