findResource - Find available parallel computing resources

Syntax

out = findResource()
out = findResource('scheduler', ... 'configuration', 'ConfigurationName')
out = findResource('scheduler', 'type', 'SchedType')
out = findResource('worker')
out = findResource('scheduler', 'type', 'jobmanager', 'LookupURL', 'host:port')
out = findResource('worker', 'LookupURL', 'host:port')
out = findResource(... ,'p1', v1, 'p2', v2,...)

Arguments

out

Object or array of objects returned.

'configuration'

Literal string to indicate usage of a configuration.

'ConfigurationName'

Name of configuration to use.

'scheduler'

Literal string specifying that you are finding a scheduler, which can be a job manager or a third-party scheduler.

'SchedType'

Specifies the type of scheduler: 'jobmanager', 'local', 'ccs', 'LSF', 'pbspro', 'torque', 'mpiexec', or any string that starts with 'generic'.

'worker'

Literal string specifying that you are finding a worker.

'LookupURL'

Literal string to indicate usage of a remote lookup service.

'host:port'

Host name and (optionally) port of remote lookup service to use.

p1, p2

Object properties to match.

v1, v2

Values for corresponding object properties.

Description

out = findResource() returns a scheduler object , out, representing the scheduler identified by the default parallel configuration, with the scheduler object properties set to the values defined in that configuration.

out = findResource('scheduler', ... 'configuration', 'ConfigurationName') returns a scheduler object , out, representing the scheduler identified by the parallel configuration ConfigurationName, with the scheduler object properties set to the values defined in that configuration. For details about defining and applying parallel configurations, see Programming with User Configurations.

out = findResource('scheduler', 'type', 'SchedType') and out = findResource('worker') return an array, out, containing objects representing all available parallel computing schedulers of the given type, or workers. SchedType can be 'jobmanager', 'local', 'ccs', 'LSF', 'pbspro', 'torque', 'mpiexec', or any string starting with 'generic'. A 'local' scheduler will queue jobs for running on workers that it will start on your local client machine. You can use different scheduler types starting with 'generic' to identify one generic scheduler or configuration from another. For third-party schedulers, job data is stored in the location specified by the scheduler object's DataLocation property.

out = findResource('scheduler', 'type', 'jobmanager', 'LookupURL', 'host:port') and
out = findResource('worker', 'LookupURL', 'host:port') use the lookup process of the job manager running at a specific location. The lookup process is part of a job manager. By default, findResource uses all the lookup processes that are available to the local machine via multicast. If you specify 'LookupURL' with a host, findResource uses the job manager lookup process running at that location. The port is optional, and is only necessary if the lookup process was configured to use a port other than the default BASEPORT setting of the mdce_def file. This URL is where the lookup is performed from, it is not necessarily the host running the job manager or worker. This unicast call is useful when you want to find resources that might not be available via multicast or in a network that does not support multicast.

out = findResource(... ,'p1', v1, 'p2', v2,...) returns an array, out, of resources whose property names and property values match those passed as parameter-value pairs, p1, v1, p2, v2.

Note that the property value pairs can be in any format supported by the set function.

When a property value is specified, it must use the same exact value that the get function returns, including letter case. For example, if get returns the Name property value as 'MyJobManager', then findResource will not find that object if searching for a Name property value of 'myjobmanager'.

Remarks

Note that it is permissible to use parameter-value string pairs, structures, parameter-value cell array pairs, and configurations in the same call to findResource.

Examples

Find a particular job manager by its name and host.

jm1 = findResource('scheduler','type','jobmanager', ...
        'Name', 'ClusterQueue1');

Find all job managers. In this example, there are four.

all_job_managers = findResource('scheduler','type','jobmanager')
all_job_managers =
    distcomp.jobmanager: 1-by-4

Find all job managers accessible from the lookup service on a particular host.

jms = findResource('scheduler','type','jobmanager', ...
        'LookupURL','host234');

Find a particular job manager accessible from the lookup service on a particular host. In this example, subnet2.hostalpha port 6789 is where the lookup is performed, but the job manager named SN2Jmgr might be running on another machine.

jm = findResource('scheduler','type','jobmanager', ...
       'LookupURL', 'subnet2.hostalpha:6789', 'Name', 'SN2JMgr');

Find the Platform LSF scheduler on the network.

lsf_sched = findResource('scheduler','type','LSF')

Create a local scheduler that will start workers on the client machine for running your job.

local_sched = findResource('scheduler','type','local')

See Also

findJob, findTask

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS