Version: 8.3.0
SALOME_Launcher Class Reference

#include <SALOME_Launcher.hxx>

Inheritance diagram for SALOME_Launcher:

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)
 
chargetJobState (CORBA::Long job_id)
 
chargetAssignedHostnames (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 &params)
 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::JobsListgetJobsList ()
 CORBA Method: Returns current launcher jobs list. More...
 
virtual Engines::JobParametersgetJobParameters (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
 

Constructor & Destructor Documentation

SALOME_Launcher::SALOME_Launcher ( CORBA::ORB_ptr  orb,
PortableServer::POA_var  poa 
)
SALOME_Launcher::~SALOME_Launcher ( )
virtual

destructor

References _NS, and MESSAGE.

Member Function Documentation

void SALOME_Launcher::addObserver ( Engines::SalomeLauncherObserver_ptr  observer)
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.

Parameters
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 
)
void SALOME_Launcher::getJobResults ( CORBA::Long  job_id,
const char directory 
)
Engines::JobsList * SALOME_Launcher::getJobsList ( )
virtual

CORBA Method: Returns current launcher jobs list.

References _l, getJobParameters(), and Launcher_cpp::getJobs().

char * SALOME_Launcher::getJobState ( CORBA::Long  job_id)
CORBA::Boolean SALOME_Launcher::getJobWorkFile ( CORBA::Long  job_id,
const char work_file,
const char directory 
)
CORBA::Long SALOME_Launcher::getPID ( )

CORBA Method: Returns the PID of the process.

void SALOME_Launcher::launchJob ( CORBA::Long  job_id)
void SALOME_Launcher::loadJobs ( const char jobs_file)
virtual
void SALOME_Launcher::notifyObservers ( const std::string &  event_name,
const std::string &  event_data 
)
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)
void SALOME_Launcher::removeObserver ( Engines::SalomeLauncherObserver_ptr  observer)
virtual

CORBA Method: Add a new observer to the launcher.

References _observers, and _orb.

void SALOME_Launcher::saveJobs ( const char jobs_file)
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)

Field Documentation

SALOME_ContainerManager* SALOME_Launcher::_ContManager
protected

Referenced by SALOME_Launcher(), and Shutdown().

const char * SALOME_Launcher::_LauncherNameInNS = "/SalomeLauncher"
static

Referenced by SALOME_Launcher(), and Shutdown().

SALOME_NamingService* SALOME_Launcher::_NS
protected
std::list<Engines::SalomeLauncherObserver_var> SALOME_Launcher::_observers
protected
CORBA::ORB_var SALOME_Launcher::_orb
protected
PortableServer::POA_var SALOME_Launcher::_poa
protected

Referenced by SALOME_Launcher(), and Shutdown().

SALOME_ResourcesManager* SALOME_Launcher::_ResManager
protected