Connect to schedulers when client utilities are not available locally
parallel.cluster.RemoteClusterAccess
r = parallel.cluster.RemoteClusterAccess(username)
r = parallel.cluster.RemoteClusterAccess(username,P1,V1,...,Pn,Vn)
parallel.cluster.RemoteClusterAccess
allows you to
establish a connection and run commands on a remote host. This class is intended
for use with the generic scheduler interface when using remote submission of
jobs or on nonshared file systems.
r = parallel.cluster.RemoteClusterAccess(username)
uses the supplied username when connecting to the remote host, and returns a
RemoteClusterAccess
object r
. You will
be prompted for a password when establishing the connection.
r = parallel.cluster.RemoteClusterAccess(username,P1,V1,...,Pn,Vn)
allows additional parameter-value pairs that modify the behavior of the
connection. The accepted parameters are:
'IdentityFilename'
— A character vector
containing the full path to the identity file to use when connecting to
a remote host. If 'IdentityFilename'
is not
specified, you are prompted for a password when establishing the
connection.
'IdentityFileHasPassphrase'
— A logical
indicating whether or not the identity file requires a passphrase. If
true, you are prompted for a password when establishing a connection. If
an identity file is not supplied, this property is ignored. This value
is false
by default.
For more information and detailed examples, see Submitting from a Remote Host and Submitting without a Shared File System.
Method Name | Description |
---|---|
connect |
|
disconnect | disconnect(r) disconnects the existing remote
connection. The connect method must have already
been called. |
doLastMirrorForJob |
|
getRemoteJobLocation |
|
isJobUsingConnection |
|
resumeMirrorForJob |
|
runCommand |
|
startMirrorForJob |
|
stopMirrorForJob |
|
getConnectedAccess |
|
getConnectedAccessWithMirror |
|
A RemoteClusterAccess
object has the following
read-only properties. Their values are set when you construct the
object or call its connect
method.
Property Name | Description |
---|---|
Hostname | Name of the remote host to access. |
IdentityFileHasPassphrase | Indicates if the identity file requires a passphrase. |
IdentityFilename | Full path to the identity file used when connecting to the remote host. |
IsConnected | Indicates if there is an active connection to the remote host. |
IsFileMirrorSupported | Indicates if file mirroring is supported for this connection.
This is false if no remote DataLocation is
supplied to the connect() method. |
JobStorageLocation | Location on the remote host for files that are being mirrored. |
UseIdentityFile | Indicates if an identity file should be used when connecting to the remote host. |
Username | User name for connecting to the remote host. |
Mirror files from the remote data location. Assume the object job
represents
a job on your generic scheduler.
remoteConnection = parallel.cluster.RemoteClusterAccess('testname'); connect(remoteConnection,'headnode1','/tmp/filemirror'); startMirrorForJob(remoteConnection,job); submit(job) % Wait for the job to finish wait(job); % Ensure that all the local files are up to date, and remove the % remote files doLastMirrorForJob(remoteConnection,job); % Get the output arguments for the job results = fetchOutputs(job)
For more information and examples, see Submitting from a Remote Host and Submitting without a Shared File System.