public class JobLauncherForm extends Form
The JobLauncherForm is a subclass of Form that is specialized to work with the JobLauncher Item. It contains a DataComponents with Entries for any and all input files (configured by setInputFiles()) as well as the hostname of the machine on which the job should be launched. These data components have ids 1 and 2 respectively and the hostname data component's single entry is named "Platform." It also contains one ResourceComponent, id = 3, that holds the output data of the simulation. Hosts are configured using the add/deleteHost operations. Support for multithreading and multiprocessing is enabled or disabled using the appropriated operations and these options are in a fourth data component with id = 4.
The operations to add and removes hosts and to enable or disable multithreading and multiprocessing are not protected, but the JobLauncher class should be the only class to ever call these operations. Enabling either of these will creating a DataComponent called "Parallel Execution" in the Form. The Parallel Execution component contains an Entry each for OpenMPI and MPI that are named "Number of OpenMP Threads" and "Number of MPI Processes" respectively.
Hosts and input files should be added immediately after the constructor is called. Failure to set the hosts and input files will result in a malformed... er... form.
Additional input file types can be added to the Form. They are added directly to the Data Component by calling setInputFiles() with the name, description and allowed files.
Modifier and Type | Field and Description |
---|---|
static int |
filesId
The id of the files data component.
|
static int |
outputId
The id of the output component.
|
static int |
parallelId
The id of the parallel info data component.
|
iComponentVisitor
iComponentListener
Constructor and Description |
---|
JobLauncherForm()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
disableMPI()
This operation disables support for MPI.
|
void |
disableOpenMP()
This operation disables support for OpenMP.
|
void |
disableTBB()
This operation disables support for Intel Thread Building Blocks.
|
void |
enableMPI(int minProcesses,
int maxProcesses,
int defaultProcesses)
This operation enables support for MPI that allows a client to set the
number of threads for the job.
|
void |
enableOpenMP(int minThreads,
int maxThreads,
int defaultThreads)
This operation enables support for OpenMP that allows a client to set the
number of threads for the job.
|
void |
enableTBB(int minThreads,
int maxThreads,
int defaultThreads)
This operation enables support for Intel's Thread Building Blocks that
allows a client to set the number of threads for the job.
|
void |
removeInputFiles(java.lang.String name)
This method removes an input file type from the Form.
|
void |
setInputFiles(java.lang.String name,
java.lang.String desc,
java.util.ArrayList<java.lang.String> files)
This operation sets the input files that may be selected in the Form for
the input type with the specified name.
|
accept, addComponent, clone, copy, equals, getActionList, getComponent, getComponents, getItemID, getNumberOfComponents, hashCode, isReady, markReady, removeComponent, setActionList, setItemID, update
copy, getDescription, getId, getName, register, setDescription, setId, setName, unregister
getClass, notify, notifyAll, toString, wait, wait, wait
register, unregister
getDescription, getId, getName, setDescription, setId, setName
public static final int filesId
public static final int outputId
public static final int parallelId
public void enableMPI(int minProcesses, int maxProcesses, int defaultProcesses)
This operation enables support for MPI that allows a client to set the number of threads for the job. A value of zero or less than zero passed to this operation will be ignore and set to 1. Furthermore, the maximum must be greater than the minimum and the default value must be equal to or in between the maximum and minimum. If these conditions are not met, it will not be enabled.
minProcesses
- The minimum number of processes that should be allowed for this job.
maxProcesses
- The maximum number of processes that should be allowed for this job.
defaultProcesses
- The default number of processes for MPI to use.
public void disableMPI()
This operation disables support for MPI. The threading component will only be disabled if other threading support is also disabled.
public void enableOpenMP(int minThreads, int maxThreads, int defaultThreads)
This operation enables support for OpenMP that allows a client to set the number of threads for the job. A value of zero or less than zero passed to this operation will be ignore and set to 1. Furthermore, the maximum must be greater than the minimum and the default value must be equal to or in between the maximum and minimum. If these conditions are not met, it will not be enabled.
minThreads
- The minimum number of threads that should be allowed for this job.
maxThreads
- The maximum number of threads that should be allowed for this job.
defaultThreads
- The default number of threads that should be allowed for this job.
public void disableOpenMP()
This operation disables support for OpenMP. The threading component will only be disabled if other threading support is also disabled.
public void enableTBB(int minThreads, int maxThreads, int defaultThreads)
This operation enables support for Intel's Thread Building Blocks that allows a client to set the number of threads for the job. A value of zero or less than zero passed to this operation will be ignore and set to 1. Furthermore, the maximum must be greater than the minimum and the default value must be equal to or in between the maximum and minimum. If these conditions are not met, it will not be enabled.
minThreads
- The minimum number of threads that should be allowed for this job.
maxThreads
- The maximum number of threads that should be allowed for this job.
defaultThreads
- The default number of threads that should be allowed for this job.
public void disableTBB()
This operation disables support for Intel Thread Building Blocks. The threading component will only be disabled if other threading support is also disabled.
public void setInputFiles(java.lang.String name, java.lang.String desc, java.util.ArrayList<java.lang.String> files)
This operation sets the input files that may be selected in the Form for the input type with the specified name. Passing null for the name or file list will not make any changes to the Form.
name
- Name of the input file type.desc
- Description of the file type.files
- List of files available for the job.public void removeInputFiles(java.lang.String name)
name
- The name of the input file type