public class JobLaunchAction extends Action implements java.lang.Runnable
This class launches a job, either locally or remotely. It is used for launching simulations and other tasks in ICE. It uses ssh to connect to remote machines for which it may require a username and password. If it needs a username and password, execute() will post a FormStatus.NeedsInfo status message and the getForm() operation will return a LoginInfoForm that contains a DataComponent with the login request.
This Action launches the command "${executable} ${inputFile}" by default where ${executable} is the executable to run and ${inputFile} is the name of the input file.
The execute operation implements execute from the Action base class to launch the job. It requires that the following key-value pairs are defined in its dictionary in order to execute:
Key |
Value |
executable |
The name of the executable as it exists on the system path or, alternatively, the fully qualified path to the executable. |
inputFile |
The path of the input file used by the executable. This may, alternatively, represent any stream of characters. |
stdOutFile |
The path of the file to which information printed to stdout by the job should be written. |
stdErrFile |
The path of the file to which information printed to stderr by the job should be written. |
hostname |
The hostname of the remote machine on which the job should be launched. |
noAppendInput |
If this option is set to "true" then the JobLaunchAction will assume that the input information is supplied to the executable in some other way than the default and it will not append the name of the input file to the executable name during the launch. It will still upload the input file. (So, erroneously marking this value as none could cause a crash if the executable actually needs it.) |
projectSpaceDir |
The absolute path string of the ICE project directory. This can be found with IProject.getLocation().toOSString(). |
uploadInput |
If this option is set to true (default), then the JobLaunchAction will upload the specified input file(s) to the remote location. If this option is set to false, no input file(s) will be uploaded, with the exception of the job launching script. |
installDir |
The directory in which the executable is installed on the target platform. |
workingDir |
The directory from which the executable should be run and in which the user's input and output data should be stored. This directory will always be a subdirectory of ~/ICEFiles/default/jobs. The action will store its files in a generated directory in ~/ICEFiles/default/jobs if this value is not set. |
numProcs |
The number of MPI processes that should be used by the job. The default value of this is always 1. |
numOMPThreads |
The number of OpenMP threads that should be used by the job. The default value of this is always 1. |
numTBBThreads |
The number of Intel TBB threads that should be used by the job. The default value of this is always 1. |
os |
The operating system of the target host. |
accountCode |
The account code or project name that should be used for billing on the remote machine. |
downloadDirectory |
The directory on the remote machine from which data should be downloaded. This is optional and no data will be downloaded if this is not specified. |
Constructor and Description |
---|
JobLaunchAction()
The Constructor.
|
Modifier and Type | Method and Description |
---|---|
FormStatus |
cancel()
(non-Javadoc)
|
FormStatus |
execute(java.util.Dictionary<java.lang.String,java.lang.String> dictionary)
This operation executes the Action based on the information provided in
the dictionary.
|
void |
run()
(non-Javadoc)
|
FormStatus |
submitForm(Form form)
This operation overrides Action.submitForm to add the Form to an Atomic
container instead of the default Form class variable.
|
public FormStatus submitForm(Form form)
submitForm
in class Action
form
- The form being submitted.public FormStatus execute(java.util.Dictionary<java.lang.String,java.lang.String> dictionary)
Action
This operation executes the Action based on the information provided in the dictionary. Subclasses must implement this operation and should publish the exact keys and values that they require to perform their function in their documentation.
public FormStatus cancel()
cancel
in class Action
The ItemStatus value that specifies whether or not the Action was canceled successfully.
Action.cancel()
public void run()
run
in interface java.lang.Runnable
Runnable.run()