#include <SALOME_Launcher.hxx>
Public Member Functions | |
SALOME_Launcher (CORBA::ORB_ptr orb, PortableServer::POA_var poa) | |
Constructor. More... | |
virtual | ~SALOME_Launcher () |
destructor More... | |
CORBA::Long | createJob (const Engines::JobParameters &job_parameters) |
void | launchJob (CORBA::Long job_id) |
char * | getJobState (CORBA::Long job_id) |
char * | getAssignedHostnames (CORBA::Long job_id) |
void | getJobResults (CORBA::Long job_id, const char *directory) |
CORBA::Boolean | getJobDumpState (CORBA::Long job_id, const char *directory) |
CORBA::Boolean | getJobWorkFile (CORBA::Long job_id, const char *work_file, const char *directory) |
void | stopJob (CORBA::Long job_id) |
void | removeJob (CORBA::Long job_id) |
CORBA::Long | createJobWithFile (const char *xmlExecuteFile, const char *clusterName) |
CORBA Method: Create a job in the launcher with a file. More... | |
CORBA::Boolean | testBatch (const Engines::ResourceParameters ¶ms) |
CORBA Method: the test batch configuration. More... | |
void | Shutdown () |
CORBA method: shutdown all the containers, then the ContainerManager servant. More... | |
CORBA::Long | getPID () |
CORBA Method: Returns the PID of the process. More... | |
virtual void | addObserver (Engines::SalomeLauncherObserver_ptr observer) |
CORBA Method: Add a new observer to the launcher. More... | |
virtual void | removeObserver (Engines::SalomeLauncherObserver_ptr observer) |
CORBA Method: Add a new observer to the launcher. More... | |
virtual Engines::JobsList * | getJobsList () |
CORBA Method: Returns current launcher jobs list. More... | |
virtual Engines::JobParameters * | getJobParameters (CORBA::Long job_id) |
CORBA Method: Returns the job description. More... | |
virtual void | loadJobs (const char *jobs_file) |
CORBA Method: Loads jobs saved in jobs_file. More... | |
virtual void | saveJobs (const char *jobs_file) |
CORBA Method: Save jobs of Launcher (in any steps) in file jobs_file. More... | |
Static Public Attributes | |
static const char * | _LauncherNameInNS = "/SalomeLauncher" |
Protected Member Functions | |
virtual void | notifyObservers (const std::string &event_name, const std::string &event_data) |
Internal Method: Notify observers on a new event. More... | |
Protected Attributes | |
CORBA::ORB_var | _orb |
PortableServer::POA_var | _poa |
SALOME_ContainerManager * | _ContManager |
SALOME_ResourcesManager * | _ResManager |
SALOME_NamingService * | _NS |
std::list < Engines::SalomeLauncherObserver_var > | _observers |
Launcher_cpp | _l |
SALOME_Launcher::SALOME_Launcher | ( | CORBA::ORB_ptr | orb, |
PortableServer::POA_var | poa | ||
) |
Constructor.
orb |
References _ContManager, _l, _LauncherNameInNS, _NS, _orb, _poa, _ResManager, SALOME_ResourcesManager::GetImpl(), MESSAGE, SALOME_NamingService::Register(), and Launcher_cpp::SetResourcesManager().
|
virtual |
CORBA Method: Add a new observer to the launcher.
References _l, _observers, _orb, Launcher_cpp::getJobs(), and MESSAGE.
CORBA::Long SALOME_Launcher::createJob | ( | const Engines::JobParameters & | job_parameters | ) |
References _l, Launcher::Job::add_in_file(), Launcher::Job::add_out_file(), Launcher::Job::addSpecificParameter(), SALOME::BAD_PARAM, Launcher::Job::checkSpecificParameters(), resourceParams::cpu_clock, Engines::ResourceParameters::cpu_clock, Launcher_cpp::createJob(), Engines::JobParameters::env_file, Engines::JobParameters::exclusive, Engines::JobParameters::extra_params, Launcher::Job::getNumber(), Engines::ResourceParameters::hostname, resourceParams::hostname, Engines::JobParameters::in_files, INFOS, SALOME::INTERNAL_ERROR, Engines::JobParameters::job_file, Engines::JobParameters::job_name, Engines::JobParameters::job_type, Engines::JobParameters::launcher_args, Engines::JobParameters::launcher_file, Engines::JobParameters::local_directory, Engines::JobParameters::maximum_duration, resourceParams::mem_mb, Engines::ResourceParameters::mem_mb, Engines::JobParameters::mem_per_cpu, LauncherException::msg, Engines::ResourceParameters::name, resourceParams::name, resourceParams::nb_node, Engines::ResourceParameters::nb_node, resourceParams::nb_proc, Engines::ResourceParameters::nb_proc, resourceParams::nb_proc_per_node, Engines::ResourceParameters::nb_proc_per_node, notifyObservers(), Engines::ResourceParameters::OS, resourceParams::OS, Engines::JobParameters::out_files, Engines::JobParameters::queue, Engines::JobParameters::resource_required, Engines::JobParameters::result_directory, Launcher::Job::setEnvFile(), Launcher::Job::setExclusive(), Launcher::Job::setExtraParams(), Launcher::Job::setJobFile(), Launcher::Job::setJobName(), Launcher::Job::setLauncherArgs(), Launcher::Job::setLauncherFile(), Launcher::Job::setLocalDirectory(), Launcher::Job::setMaximumDuration(), Launcher::Job::setMemPerCpu(), Launcher::Job::setQueue(), Launcher::Job::setResourceRequiredParams(), Launcher::Job::setResultDirectory(), Launcher::Job::setWCKey(), Launcher::Job::setWorkDirectory(), Engines::JobParameters::specific_parameters, THROW_SALOME_CORBA_EXCEPTION, Engines::JobParameters::wckey, and Engines::JobParameters::work_directory.
CORBA::Long SALOME_Launcher::createJobWithFile | ( | const char * | xmlExecuteFile, |
const char * | clusterName | ||
) |
CORBA Method: Create a job in the launcher with a file.
xmlExecuteFile | : .xml to parse that contains job description |
clusterName | : machine choosed |
References _l, Launcher_cpp::createJobWithFile(), INFOS, SALOME::INTERNAL_ERROR, LauncherException::msg, and THROW_SALOME_CORBA_EXCEPTION.
char * SALOME_Launcher::getAssignedHostnames | ( | CORBA::Long | job_id | ) |
CORBA::Boolean SALOME_Launcher::getJobDumpState | ( | CORBA::Long | job_id, |
const char * | directory | ||
) |
|
virtual |
CORBA Method: Returns the job description.
References _l, Launcher::Job::get_in_files(), Launcher::Job::get_out_files(), Launcher::Job::getEnvFile(), Launcher::Job::getExclusive(), Launcher::Job::getExtraParams(), Launcher::Job::getJobFile(), Launcher::Job::getJobName(), Launcher_cpp::getJobs(), Launcher::Job::getJobType(), Launcher::Job::getLauncherArgs(), Launcher::Job::getLauncherFile(), Launcher::Job::getLocalDirectory(), Launcher::Job::getMaximumDuration(), Launcher::Job::getMemPerCpu(), Launcher::Job::getQueue(), Launcher::Job::getResourceRequiredParams(), Launcher::Job::getResultDirectory(), Launcher::Job::getSpecificParameters(), Launcher::Job::getWCKey(), Launcher::Job::getWorkDirectory(), INFOS, SALOME::INTERNAL_ERROR, Engines::JobParameters::job_name, Engines::Parameter::name, resourceParams::name, and THROW_SALOME_CORBA_EXCEPTION.
Referenced by getJobsList().
void SALOME_Launcher::getJobResults | ( | CORBA::Long | job_id, |
const char * | directory | ||
) |
References _l, SALOME::BAD_PARAM, Launcher_cpp::getJobResults(), INFOS, LauncherException::msg, and THROW_SALOME_CORBA_EXCEPTION.
|
virtual |
CORBA Method: Returns current launcher jobs list.
References _l, getJobParameters(), and Launcher_cpp::getJobs().
char * SALOME_Launcher::getJobState | ( | CORBA::Long | job_id | ) |
References _l, SALOME::BAD_PARAM, Launcher_cpp::getJobState(), INFOS, LauncherException::msg, and THROW_SALOME_CORBA_EXCEPTION.
CORBA::Boolean SALOME_Launcher::getJobWorkFile | ( | CORBA::Long | job_id, |
const char * | work_file, | ||
const char * | directory | ||
) |
References _l, SALOME::BAD_PARAM, Launcher_cpp::getJobWorkFile(), INFOS, LauncherException::msg, and THROW_SALOME_CORBA_EXCEPTION.
CORBA::Long SALOME_Launcher::getPID | ( | ) |
CORBA Method: Returns the PID of the process.
void SALOME_Launcher::launchJob | ( | CORBA::Long | job_id | ) |
References _l, SALOME::BAD_PARAM, INFOS, Launcher_cpp::launchJob(), LauncherException::msg, and THROW_SALOME_CORBA_EXCEPTION.
|
virtual |
CORBA Method: Loads jobs saved in jobs_file.
References _l, INFOS, SALOME::INTERNAL_ERROR, Launcher_cpp::loadJobs(), LauncherException::msg, notifyObservers(), and THROW_SALOME_CORBA_EXCEPTION.
|
protectedvirtual |
Internal Method: Notify observers on a new event.
References _observers, and MESSAGE.
Referenced by createJob(), loadJobs(), removeJob(), saveJobs(), and stopJob().
void SALOME_Launcher::removeJob | ( | CORBA::Long | job_id | ) |
|
virtual |
CORBA Method: Add a new observer to the launcher.
References _observers, and _orb.
|
virtual |
CORBA Method: Save jobs of Launcher (in any steps) in file jobs_file.
References _l, notifyObservers(), and Launcher_cpp::saveJobs().
void SALOME_Launcher::Shutdown | ( | ) |
CORBA method: shutdown all the containers, then the ContainerManager servant.
References _ContManager, _LauncherNameInNS, _NS, _orb, _poa, _ResManager, SALOME_NamingService::Destroy_Name(), MESSAGE, SALOME_ContainerManager::Shutdown(), and SALOME_ResourcesManager::Shutdown().
void SALOME_Launcher::stopJob | ( | CORBA::Long | job_id | ) |
CORBA::Boolean SALOME_Launcher::testBatch | ( | const Engines::ResourceParameters & | params | ) |
CORBA Method: the test batch configuration.
params | : The batch cluster |
References _ResManager, Engines::ResourceParameters::can_launch_batch_jobs, SALOME_ResourcesManager::GetFittingResources(), SALOME_ResourcesManager::GetResourceDefinition(), INFOS, SALOME::INTERNAL_ERROR, MESSAGE, LauncherException::msg, Engines::ResourceDefinition::name, BatchTest::test(), and THROW_SALOME_CORBA_EXCEPTION.
|
protected |
Referenced by SALOME_Launcher(), and Shutdown().
|
protected |
|
static |
Referenced by SALOME_Launcher(), and Shutdown().
|
protected |
Referenced by SALOME_Launcher(), Shutdown(), and ~SALOME_Launcher().
|
protected |
Referenced by addObserver(), notifyObservers(), and removeObserver().
|
protected |
Referenced by addObserver(), removeObserver(), SALOME_Launcher(), and Shutdown().
|
protected |
Referenced by SALOME_Launcher(), and Shutdown().
|
protected |
Referenced by SALOME_Launcher(), Shutdown(), and testBatch().