RSM will invoke a custom implementation for the following commands:
Job-Specific Commands
getAllStatus Command (optional)
queryQueues Command (optional)
getAllQueues Command (optional)
File Storage Commands
The submit
command is invoked to submit a job to the cluster.
The command should return as soon as the queuing system has taken ownership of the job and
a unique Job ID is available.
The parsing of the output of the submit
command is handled by
the post command parseSubmit
, which will look through all of the
output from the submit
script, find the Job ID, and return it in
a formal manner. For details see Parsing of the Commands Output.
The custom integration infrastructure provides the Python script, ClusterJobs.py, in the [RSMInstall]\Config\scripts directory. The script serves as a layer of abstraction that allows a user-selected operation (such as a component update for one or more of the applications or a design point update) to be invoked without the need to be aware of the command line arguments and options required for the appropriate submission of the job.
In the Submit command, the ClusterJobs.py script should be invoked (rather than executing the individual applications). This Python script should be considered as a layer that builds the appropriate command line and sets the appropriate environment variables for the remote execution. The usage of application specific command line in the Submit script is strongly discouraged and cannot be properly supported in a general way.
For user convenience, the complete Python command that contains the job to be executed by the Submit command (for instance, by LSF bsub) is provided through the environment variable RSM_HPC_COMMAND.
Examples: —
Custom server examples for [RSMInstall]\Config\scripts\EXAMPLES directory.
, , , and are located in theA generalized custom client example (for all cluster types) is provided in the file submitGeneric.py, located in the [RSMInstall]\Config\scripts directory.
The queryStatus
command has access to the Job ID through the
environment variable RSM_HPC_JOBID. Given a Job ID, the command
should query the cluster for the status of the job and return the status of that job in
string format.
The output of the queryStatus
command should be direct output
from the cluster. Any parsing of this output can be done by the post command
parseStatus
, which will look through all of the output from the
queryStatus
command, find the job status, and return it in a
formal manner. For details see Parsing of the Commands Output.
Examples: —
Custom server examples are not provided for this command.
A generalized custom client example (for all cluster types) is provided in the file statusGeneric.py, located in the [RSMInstall]\Config\scripts directory.
The getAllStatus
command is an optional command to implement
that may improve performance in heavily loaded RSM installations.
The command should query the cluster for the status of all the jobs available and return the job status for each in a Python dictionary format, or add a post (parsing) command to convert the output into the format described in Required Output from Commands. If no jobs are running, a dictionary result should still be returned, but it should be “{-1:UNKNOWN}”.
The queryQueues
command is an optional command to implement
that enables RSM to check if a queue specified by the user is a valid queue that can be
used. This can prevent the submission of many invalid jobs.
Given a queue name, RSM_HPC_QUEUE, the command should check if
that queue is valid for this user and return TRUE or FALSE as described in Outputting Variables from the Parsing Scripts and Required Output from Commands
(checkQueueExists
).
The getAllQueues
command is an optional command to implement
that allows RSM to let users use the Import/Refresh HPC Queues button when defining RSM
queues in the RSM Configuration application, which will return a list of available cluster
queues. If no command is defined for the cluster type, then the import function will
simply not work, and users will need to input the cluster queue name(s) manually in order
to run jobs on the cluster.
The cancel
command has access to the Job ID through the
environment variable RSM_HPC_JOBID. Given a Job ID, the command
should invoke the cluster command to cancel the job.
No output is required from the cancel
command. However, an
output statement should be given for verification in the RSM log.
Examples: —
Custom server examples are not provided for this command.
A generalized custom client example (for all cluster types) is provided in the file cancelGeneric.py, located in the[RSMInstall]\Config\scripts directory.
The createStorage
command is expected to create a storage
location using the environment variable identifier
RSM_HPC_FILE_REMOTE_DIR.
No output is required from the createStorage
command.
However, an output statement should be given for verification in the RSM log.
The deleteStorage
command is expected to delete a storage
location and all of its sub contents using the environment variable identifier
(directoryName) RSM_HPC_FILE_REMOTE_DIR.
No output is required from the deleteStorage
command.
However, an output statement should be given for verification in the RSM log.
The uploadToStorage
command is expected to upload a list of
files provided in the environment variable RSM_HPC_FILELIST from a
local directory RSM_HPC_FILE_LOCAL_DIR to a storage location with the
identifier (directoryName) RSM_HPC_FILE_REMOTE_DIR.
No output is required from the uploadToStorage
command.
However, an output statement should be given for verification in the RSM log when files
are uploaded.
The downloadFromStorage
command is expected to download a
list of files provided in the environment variable RSM_HPC_FILELIST
from a storage location with the identifier (directoryName)
RSM_HPC_FILE_REMOTE_DIR to the local directory
RSM_HPC_FILE_LOCAL_DIR.
No output is required from the downloadFromStorage
command.
However, an output statement should be given for verification in the RSM log when files
are downloaded.
The listStorageContents
command is expected to return the
files found in the RSM_HPC_FILE_REMOTE_DIR that match the
specifications listed in RSM_HPC_FILELIST while excluding any files
that match the specifications listed in RSM_HPC_FILEEXCLUDE.
The format of the output should be a that of a stringified Python dictionary of the filenames along with other required information as shown in Required Output from Commands.