OpendTect
7.0
|
Base class (with factory) for methods to kick-off an OD batch job. More...
Public Member Functions | |
JobDispatcher () | |
virtual | ~JobDispatcher () |
virtual bool | canHandle (const JobSpec &) const |
virtual bool | canResume (const JobSpec &) const |
virtual uiString | description () const =0 |
uiString | errMsg () const |
bool | go (const JobSpec &, ID *=nullptr) |
virtual bool | isSuitedFor (const char *prognm) const =0 |
BufferString | jobName () const |
void | setJobName (const char *) |
void | setToDefParFileName () |
Static Public Member Functions | |
static void | addIDTo (ID, OS::MachineCommand &) |
static void | getDefParFilename (const char *prognm, BufferString &) |
static ID | getInvalid () |
static BufferString | getJobName (const char *) |
static void | getJobNames (BufferStringSet &) |
static void | setUserWantsResume (IOPar &, bool) |
static const char * | sKeyFinishMsg () |
static bool | userWantsResume (const IOPar &) |
Public Attributes | |
JobSpec | jobspec_ |
BufferString | parfnm_ |
Protected Member Functions | |
virtual bool | init () |
virtual bool | launch (ID *)=0 |
void | serviceEnded (CallBacker *) |
bool | writeParFile () const |
Protected Attributes | |
uiString | errmsg_ |
Base class (with factory) for methods to kick-off an OD batch job.
Subclasses are expected to be ranging from simple single-process starters to elaborate cluster-based job splitting monsters.
isSuitedFor() determines whether a certain type of dispatcher can handle any job for this program. canHandle() decides on the whole JobSpec. If the job creates intermediate results, then it may be able to resume after the user has stopped. In that case, canResume() can return true.
Every job will sooner or later be written to a par file. We want to have user select job names, not par file names. Thus, there are both job names and the actual parameter file full path. Par files are written to, and expected to be in the 'Proc' directory. If that is the case, than job name <-> par file goes both ways. The returned BatchID will uniquely identify any job within a session that is launched using a machine command. It can be used to match the spawn process with the spawn request.
<>
Batch::JobDispatcher::JobDispatcher | ( | ) |
|
virtual |
|
static |
|
virtual |
Reimplemented in Batch::MMJobDispatcher, and Batch::ClusterJobDispatcher.
|
inlinevirtual |
Reimplemented in Batch::MMJobDispatcher, and Batch::ClusterJobDispatcher.
|
pure virtual |
Implemented in Batch::SingleJobDispatcher, Batch::MMJobDispatcher, and Batch::ClusterJobDispatcher.
|
inline |
|
static |
|
inlinestatic |
|
static |
|
static |
|
inlineprotectedvirtual |
Reimplemented in Batch::SingleJobDispatcher, and Batch::MMJobDispatcher.
|
pure virtual |
Implemented in Batch::SingleJobDispatcher, Batch::MMJobDispatcher, and Batch::ClusterJobDispatcher.
|
inline |
|
protectedpure virtual |
Implemented in Batch::SingleJobDispatcher, Batch::MMJobDispatcher, and Batch::ClusterJobDispatcher.
|
protected |
void Batch::JobDispatcher::setJobName | ( | const char * | ) |
|
inline |
|
static |
|
inlinestatic |
|
static |
|
protected |
|
mutableprotected |
JobSpec Batch::JobDispatcher::jobspec_ |
BufferString Batch::JobDispatcher::parfnm_ |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024