Customize Behavior of Sample Plugin Scripts
When using the generic scheduler interface, you can modify the behavior of the plugin
scripts by setting additional properties for a generic cluster profile or object using
AdditionalProperties
. For more information on the generic
scheduler interface, see Configure Using the Generic Scheduler Interface.
The sample plugin scripts allow you to set these properties.
Properties for All Schedulers
Property | Description | Type |
---|
AdditionalSubmitArgs
| Additional scheduler arguments for job submission. The
sample plugin scripts add the value of this property to the
scheduler submission string. | String |
AuthenticationMode
| Option to indicate how you are authenticated when you
connect to the cluster, specified as one of the following:
"Agent" – the client interfaces
with an SSH agent running on the client
machine.
"IdentityFile" – the client
uses the identity file specified by the
IdentityFile additional
property.
"Multifactor" – the client to
prompts you for input one or more times. For
example, if two-factor authentication (2FA) is
enabled on the client, the client requests your
password and a response for the second
authentication factor.
"Password" – the client prompts
you for your SSH password. Your user name is
specified by the Username
additional property.
| String String array |
ClusterHost
| Host name of the cluster machine that has the scheduler
utilities to submit jobs. Use this if your cluster is unable to
directly submit jobs to the scheduler. The cluster
machine must run Linux. | String |
IdentityFile
| Location on the client machine of the SSH identity file
that identifies you in
ClusterHost . | String String array |
IdentityFileHasPassphrase
| Set this property to true if
IdentityFile requires a
passphrase. | Logical |
RemoteJobStorageLocation
| Location to store job files on the cluster. Use this
property if your client and the cluster nodes do not have a
shared file system. | String |
UseIdentityFile
| Option to use an identity file. Set this property to
true if you want to use an SSH identity
file to log in to ClusterHost . If you set
this property, then also set IdentityFile
and
IdentityFileHasPassphrase . | Logical |
Username
| User name to log in to ClusterHost
with. | String |
UseUniqueSubfolders
| Option to use unique subfolders. Set this property to
true if you want MATLAB® to store job files under different subfolders
based on the user name and MATLAB version. Doing so helps to prevent conflicts
between jobs submitted from different users and MATLAB versions. | Logical |
Properties for Slurm Only
For more information about these properties, see the Slurm
documentation.
Property | Description | Type |
---|
AccountName
| Provide an account name to which the scheduler can charge
for the resources used. | String |
Constraint
| Specify the node features required to run the
job. | String |
MemPerCPU
| Specify the minimum memory required per CPU. | String |
Partition
| Specify a partition for the job's resource
allocation. | String |
RequireExclusiveNode
| Option to share nodes with other running jobs. Set this
property to true if the job cannot share
nodes with other running jobs. | Logical |
Reservation
| Specify a reservation name from which the scheduler can
allocate resources for the job. | String |
WallTime
| Specify a limit on the total run time of the
job. | String |
EmailAddress
| Provide an email address to receive notifications from the
scheduler. | String |
Properties for LSF Only
For more information about these properties, see the LSF documentation.
Property | Description | Type |
---|
MemPerCPU
| Specify the minimum memory required per CPU. | String |
Project
| Specify a project to which the scheduler must assign the
job. | String |
QueueName
| Specify a cluster queue name on which the scheduler can run
the job. | String |
RequireExclusiveNode
| Option to share nodes with other running jobs. Set this
property to true if the job cannot share
nodes with other running jobs. | Logical |
WallTime
| Specify a limit on the total run time of the
job. | String |
EmailAddress
| Provide an email address to receive notifications from the
scheduler. | String |
Properties for Grid Engine Family Only
Property | Description | Type |
---|
AccountName
| Specify an account name under which the scheduler must run
for the job. | String |
MemPerCPU
| Specify the minimum memory required per CPU. | String |
Project
| Specify a project to which the scheduler must assign the
job. | String |
QueueName
| Specify a cluster queue name to run the job. | String |
WallTime
| Specify a limit on the total run time of the
job. | String |
EmailAddress
| Provide an email address to receive notifications from the
scheduler. | String |
Properties for PBS Only
Property | Description | Type |
---|
AccountName
| Provide an account name to which the scheduler can charge
for the resources used. | String |
Priority
| Specify the priority of the job relative to other jobs in
the cluster. | Double |
ProcsPerNode
|
Number of processors per node, specified as a finite positive integer scalar. When you submit a job to the cluster, the number of cores per node that MATLAB requests is guaranteed to be less than or equal to
ProcsPerNode . Set ProcsPerNode equal to the
maximum number of processors you want MATLAB to request from each cluster node. MATLAB requests the smallest number of cores per node required to run the job.
If the NumThreads property of the cluster is less than or
equal to ProcsPerNode , MATLAB requests NumThreads processors per worker,
then maximizes the number of workers per node. For example if
ProcsPerNode is 16 and
NumThreads is 5 , MATLAB requests 15 cores, the largest multiple of
5 that is less than
ProcsPerNode . If NumThreads of the cluster is greater than
ProcsPerNode , MATLAB requests ProcsPerNode processors per
node. When NumThreads is greater than
ProcsPerNode , you might encounter performance issues.
As a best practice, set NumThreads less than or equal to
ProcsPerNode . For more information, see Edit Number of Workers and Cluster Settings (Parallel Computing Toolbox).
| Positive integer scalar |
QueueName
| Specify a cluster queue or server name to run the
job. | String |
WallTime
| Specify a limit on the total run time of the
job. | String |
EmailAddress
| Provide an email address to receive notifications from the
scheduler. | String |
Properties for HTCondor Only
For more information about these properties, see the HTCondor documentation.
Properties | Description | Type |
---|
AccountingGroup
| Specify an accounting group name under which the scheduler
must negotiate the job. | String |
AccountingGroupUsername
| Provide a username for resource usage
accounting. | String |
RequestDisk
| Specify the disk space requirements for the
job. | String |
RequestMemory
| Specify the memory requirements for the job. | String |
Priority
| Specify the priority of the job relative to other jobs in
the cluster. | Double |
Requirements
| Specify the node features required to run the
job. | String |
EmailAddress
| Provide an email address to receive notifications from the
scheduler. | String |
When you create a generic cluster profile for the first time with the Generic Profile
Wizard, the installer guides you through setting some of these properties. For more
information on the installer, see Interface with Third-Party Schedulers.
You can also define your own properties to customize the behavior of the plugin
scripts. To do so, you must modify the plugin scripts. For more information, see Adding User Customization (Parallel Computing Toolbox).
Set Additional Properties
You can set additional properties in the cluster profile, with the Cluster Profile
Manager, or programmatically.
Set Properties in Cluster Profile
When you set the additional properties in the cluster profile, the properties
apply every time you use the cluster.
In the MATLAB toolstrip, on the Home tab, in
the Environment area, select > .
In the Cluster Profile Manager, click on the generic profile that
you want to modify.
Click Edit at the bottom-right.
Go to the AdditionalProperties
table.
To add a new property, click Add. To modify
an existing property, click on the property.
The following image shows an example of setting
AdditionalSubmitArgs
for an LSF® cluster profile.
Set Properties Programmatically
You can set additional properties programmatically by
accessing the AdditionalProperties
of a generic cluster
object. Note that this action does not update the cluster profile and the
properties only apply to that particular cluster object. The following is an
example of how to set AdditionalSubmitArgs
for an
LSF cluster.
First, create a cluster object by using the
parcluster
function. In the following code,
change MyLSFCluster
to the name of your cluster
profile.
Next, set AdditionalSubmitArgs
so that the plugin
scripts use a different job
queue.
With this change, MATLAB passes the additional arguments to the scheduler when you
submit a job. For example, submit a batch
job.
Related Topics