Interface of the salome launcher. More...
Public Member Functions | |
long | createJob (in Engines::JobParameters job_parameters) raises (SALOME::SALOME_Exception) |
Create a job and set its parameters, without launching it. More... | |
void | launchJob (in long job_id) raises (SALOME::SALOME_Exception) |
Launch an already created job (job's state should be "CREATED"). More... | |
string | getJobState (in long job_id) raises (SALOME::SALOME_Exception) |
Get the execution state of the job. More... | |
string | getAssignedHostnames (in long job_id) raises (SALOME::SALOME_Exception) |
Get names or ids of hosts assigned to the job. More... | |
void | getJobResults (in long job_id, in string directory) raises (SALOME::SALOME_Exception) |
Copy the result files from the work directory of the job to a local directory. More... | |
boolean | getJobDumpState (in long job_id, in string directory) raises (SALOME::SALOME_Exception) |
Try to copy the files named "dumpState*.xml" from the working directory. More... | |
boolean | getJobWorkFile (in long job_id, in string work_file, in string directory) raises (SALOME::SALOME_Exception) |
Retrieve one sigle file from the working directory. More... | |
void | stopJob (in long job_id) raises (SALOME::SALOME_Exception) |
Kill the job and set its state to "FAILED". More... | |
void | removeJob (in long job_id) raises (SALOME::SALOME_Exception) |
Kill the job and remove it from the jobs list. More... | |
long | createJobWithFile (in string xmlJobFile, in string clusterName) raises (SALOME::SALOME_Exception) |
boolean | testBatch (in ResourceParameters params) raises (SALOME::SALOME_Exception) |
void | Shutdown () |
Shutdow SalomeLauncher server. More... | |
long | getPID () |
Get the PID of the current process. More... | |
void | addObserver (in Engines::SalomeLauncherObserver observer) |
Add an observer to be notified of the jobs list modifications. More... | |
void | removeObserver (in Engines::SalomeLauncherObserver observer) |
Engines::JobsList | getJobsList () |
Engines::JobParameters | getJobParameters (in long job_id) raises (SALOME::SALOME_Exception) |
void | loadJobs (in string jobs_file) raises (SALOME::SALOME_Exception) |
Add to the current jobs list the jobs previously saved in an xml file. More... | |
void | saveJobs (in string jobs_file) raises (SALOME::SALOME_Exception) |
Save the current list of jobs in an xml file. More... | |
Interface of the salome launcher.
This interface is used for interaction with the unique instance of SalomeLauncher. The utilisation of this interface is explained in the YACS documentation, article "Starting a SALOME application in a batch manager". Other examples of use can be found in the modules JOBMANAGER, PARAMETRIC and SMESH (PADDER tool).
long Engines::SalomeLauncher::createJob | ( | in Engines::JobParameters | job_parameters | ) | raises (SALOME::SALOME_Exception) |
Create a job and set its parameters, without launching it.
Its state becomes "CREATED".
void Engines::SalomeLauncher::launchJob | ( | in long | job_id | ) | raises (SALOME::SALOME_Exception) |
Launch an already created job (job's state should be "CREATED").
Launching the job consists of:
string Engines::SalomeLauncher::getJobState | ( | in long | job_id | ) | raises (SALOME::SALOME_Exception) |
Get the execution state of the job.
string Engines::SalomeLauncher::getAssignedHostnames | ( | in long | job_id | ) | raises (SALOME::SALOME_Exception) |
Get names or ids of hosts assigned to the job.
void Engines::SalomeLauncher::getJobResults | ( | in long | job_id, |
in string | directory | ||
) | raises (SALOME::SALOME_Exception) |
Copy the result files from the work directory of the job to a local directory.
The list of result files is given by the JobParameters::out_files parameter. If a result "file" is a directory, the copy is recursive. The "logs" directory contains the standard and the error outputs of the job.
job_id | Job id returned by createJob(). |
directory | Local directory where to copy the results. If this value is an empty string (""), files will be copied to the directory given by JobParameters::result_directory. |
boolean Engines::SalomeLauncher::getJobDumpState | ( | in long | job_id, |
in string | directory | ||
) | raises (SALOME::SALOME_Exception) |
Try to copy the files named "dumpState*.xml" from the working directory.
The file "dumpState_name.xml" can be produced by the execution of a YACS schema and it contains the execution state of the schema. You can activate the creation of this file by adding the parameter "EnableDumpYACS" in JobParameters::specific_parameters when the job is created.
job_id | Job id returned by createJob(). |
directory | Local directory where to copy the file. If this value is an empty string (""), the file will be copied to the directory given by JobParameters::result_directory. |
boolean Engines::SalomeLauncher::getJobWorkFile | ( | in long | job_id, |
in string | work_file, | ||
in string | directory | ||
) | raises (SALOME::SALOME_Exception) |
Retrieve one sigle file from the working directory.
Use this method if you don't want to copy all the results of the job, for instance if you want to obtain a file which contains the computing progress while the job is running.
job_id | Job id returned by createJob(). |
work_file | Path to the file to be copied, relative to the working directory of the job. If it is a directory, it will be copied recursively. |
directory | Local directory where to copy the file. If this value is an empty string (""), the file will be copied to the directory given by JobParameters::result_directory. |
void Engines::SalomeLauncher::stopJob | ( | in long | job_id | ) | raises (SALOME::SALOME_Exception) |
Kill the job and set its state to "FAILED".
void Engines::SalomeLauncher::removeJob | ( | in long | job_id | ) | raises (SALOME::SALOME_Exception) |
Kill the job and remove it from the jobs list.
void Engines::SalomeLauncher::Shutdown | ( | ) |
Shutdow SalomeLauncher server.
long Engines::SalomeLauncher::getPID | ( | ) |
Get the PID of the current process.
void Engines::SalomeLauncher::addObserver | ( | in Engines::SalomeLauncherObserver | observer | ) |
Add an observer to be notified of the jobs list modifications.
void Engines::SalomeLauncher::loadJobs | ( | in string | jobs_file | ) | raises (SALOME::SALOME_Exception) |
Add to the current jobs list the jobs previously saved in an xml file.
void Engines::SalomeLauncher::saveJobs | ( | in string | jobs_file | ) | raises (SALOME::SALOME_Exception) |
Save the current list of jobs in an xml file.