public class JobSupportSLURM extends java.lang.Object
Constructor and Description |
---|
JobSupportSLURM() |
Modifier and Type | Method and Description |
---|---|
boolean |
createSubmitFile(java.lang.String filename,
Job job)
Create a submission file for the specific job manager, based on the
information available in Job: - executable name - input files - output
files - arguments for the job
|
java.lang.String |
getDeleteCmd(java.lang.String jobID)
Get the command to remove a job from queue (either running or waiting
jobs). return: the String of command
|
java.lang.String |
getStatusCmd(java.lang.String jobID)
Get the command to ask the status of the job return: the String of
command
|
java.lang.String |
getSubmitCmd(java.lang.String submitFile,
java.lang.String options,
Job job)
Submit command for SLURM return: the command for submission
|
java.lang.String |
getTaskStatusCmd(java.lang.String jobID)
Get the command to ask the status of both job and tasks
Eg.
|
void |
init(java.lang.String slurmBinPath)
Store the binary path given by the user and use that in the methods below
|
boolean |
parseDeleteOutput(java.lang.String jobID,
int exitCode,
java.lang.String output,
java.lang.String error)
Parse output of delete command. return: true or false indicating that the
command was successful or not
|
JobStatusInfo |
parseStatusOutput(java.lang.String jobID,
int exitCode,
java.lang.String output,
java.lang.String error)
Parse output of status check command and get status info return: a
JobStatusInfo object, or throws an JobException with the error output
|
java.lang.String |
parseSubmitOutput(java.lang.String output,
java.lang.String error)
Parse output of submission and get information: jobID return String jobID
on success throws JobException at failure (will contain the error stream
or output stream)
|
TaskParallelJobStatusInfo |
parseTaskStatusOutput(java.lang.String jobID,
int numTasks,
int exitCode,
java.lang.String output,
java.lang.String error)
Parse output of task status check command and get status info
|
public JobSupportSLURM()
public void init(java.lang.String slurmBinPath)
public boolean createSubmitFile(java.lang.String filename, Job job)
public java.lang.String getSubmitCmd(java.lang.String submitFile, java.lang.String options, Job job) throws JobException
JobException
public java.lang.String parseSubmitOutput(java.lang.String output, java.lang.String error) throws JobException
JobException
public java.lang.String getStatusCmd(java.lang.String jobID)
public JobStatusInfo parseStatusOutput(java.lang.String jobID, int exitCode, java.lang.String output, java.lang.String error) throws JobException
JobException
public java.lang.String getDeleteCmd(java.lang.String jobID)
public boolean parseDeleteOutput(java.lang.String jobID, int exitCode, java.lang.String output, java.lang.String error) throws JobException
JobException
public java.lang.String getTaskStatusCmd(java.lang.String jobID) throws NotSupportedException
NotSupportedException
public TaskParallelJobStatusInfo parseTaskStatusOutput(java.lang.String jobID, int numTasks, int exitCode, java.lang.String output, java.lang.String error) throws JobException, NotSupportedException
JobException
NotSupportedException