org.objectweb.proactive.core.process.oar
Class OARGRIDSubProcess
java.lang.Object
org.objectweb.proactive.core.process.AbstractUniversalProcess
org.objectweb.proactive.core.process.AbstractExternalProcess
org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
org.objectweb.proactive.core.process.oar.OARGRIDSubProcess
- All Implemented Interfaces:
- ExternalProcess, ExternalProcessDecorator, java.io.Serializable, UniversalProcess
- public class OARGRIDSubProcess
- extends AbstractExternalProcessDecorator
The OARGRIDSubProcess class is able to start any class, of the ProActive library,
on a cluster managed by OARGRID protocol.
It is strongly advised to use XML Deployment files to run such processes
- Since:
- ProActive 3.0
- Version:
- 1.0, 2005/09/20
- Author:
- ProActive Team
- See Also:
- Serialized Form
Fields inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
certificateLocation, command, command_path, DEFAULT_HOSTNAME, DEFAULT_USERNAME, environment, hostname, isFinished, isStarted, LOCALHOST, privateKeyLocation, securityFile, username |
Method Summary |
UniversalProcess |
getFinalProcess()
Returns the last process of the chain |
int |
getNodeNumber()
Returns the number of nodes targeted |
java.lang.String |
getProcessId()
Returns the id of the process |
java.lang.String |
getWallTime()
|
protected java.lang.String |
internalBuildCommand()
oargridsub is not able to receive env variables or parameters for a
script we thus rely on the following trick, the command has the form echo
"real command" | qsub -I ... oarStartRuntime.sh |
protected void |
internalStartProcess(java.lang.String commandToExecute)
|
static void |
main(java.lang.String[] args)
|
void |
setAccessProtocol(java.lang.String accessProtocol)
Sets the protocol to access booked nodes. |
void |
setQueueName(java.lang.String queueName)
Sets the value of the queue where the job will be launched. |
void |
setResources(java.lang.String resources)
Set the resource option in the OARGRID command. |
void |
setScriptLocation(java.lang.String location)
Set the script location on the remote host * |
void |
setWallTime(java.lang.String walltime)
|
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, closeStream, getErrorMessageLogger, getFileTransferDefaultCopyProtocol, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, internalFileTransferDefaultProtocol, internalStartFileTransfer, internalStopProcess, internalWaitFor, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink |
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
checkStarted, getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, pushProcessAttributes, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, toString, waitFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, waitFor |
DEFAULT_OARGRIDSUBPATH
public static final java.lang.String DEFAULT_OARGRIDSUBPATH
- See Also:
- Constant Field Values
DEFAULT_HOSTS_NUMBER
protected static final int DEFAULT_HOSTS_NUMBER
- See Also:
- Constant Field Values
DEFAULT_WEIGHT
protected static final int DEFAULT_WEIGHT
- See Also:
- Constant Field Values
DEFAULT_WALLTIME
protected static final java.lang.String DEFAULT_WALLTIME
- See Also:
- Constant Field Values
oarsite
protected OARGRIDSubProcess.OarSite[] oarsite
scriptLocation
protected java.lang.String scriptLocation
jobID
protected int jobID
queueName
protected java.lang.String queueName
accessProtocol
protected java.lang.String accessProtocol
resources
protected java.lang.String resources
walltime
protected java.lang.String walltime
OARGRIDSubProcess
public OARGRIDSubProcess()
OARGRIDSubProcess
public OARGRIDSubProcess(ExternalProcess targetProcess)
getProcessId
public java.lang.String getProcessId()
- Description copied from interface:
UniversalProcess
- Returns the id of the process
- Returns:
- the id of the process. This id is just the first letters of the process
class, to be able to identify the sequence of processes used
- See Also:
UniversalProcess.getProcessId()
getNodeNumber
public int getNodeNumber()
- Description copied from interface:
UniversalProcess
- Returns the number of nodes targeted
- Returns:
- the number of nodes targeted. Represents the number of nodes expected to use
when starting this process. If this number cannot be known, waiting for all available nodes
for example, UNKNOWN_NODE_NUMBER is returned.
- See Also:
UniversalProcess.getNodeNumber()
getFinalProcess
public UniversalProcess getFinalProcess()
- Description copied from interface:
UniversalProcess
- Returns the last process of the chain
- Returns:
- the last process of the chain
- See Also:
UniversalProcess.getFinalProcess()
getWallTime
public java.lang.String getWallTime()
setScriptLocation
public void setScriptLocation(java.lang.String location)
- Set the script location on the remote host *
- Parameters:
location
-
setAccessProtocol
public void setAccessProtocol(java.lang.String accessProtocol)
- Sets the protocol to access booked nodes. Two possibilities, rsh, ssh.
Default is ssh.
- Parameters:
accessProtocol
-
setResources
public void setResources(java.lang.String resources)
- Set the resource option in the OARGRID command. Represents the DESC
option of OARGRID
- Parameters:
resources
- (cluster1:nodes=2,cluster2:nodes=3:weight=2)
setQueueName
public void setQueueName(java.lang.String queueName)
- Sets the value of the queue where the job will be launched. The default
is 'default'
- Parameters:
queueName
-
setWallTime
public void setWallTime(java.lang.String walltime)
internalStartProcess
protected void internalStartProcess(java.lang.String commandToExecute)
throws java.io.IOException
- Overrides:
internalStartProcess
in class AbstractExternalProcessDecorator
- Throws:
java.io.IOException
internalBuildCommand
protected java.lang.String internalBuildCommand()
- oargridsub is not able to receive env variables or parameters for a
script we thus rely on the following trick, the command has the form echo
"real command" | qsub -I ... oarStartRuntime.sh
- Specified by:
internalBuildCommand
in class AbstractExternalProcessDecorator
main
public static void main(java.lang.String[] args)
Copyright 2001-2005 INRIA All Rights Reserved.