Customize Startup Parameters

The MATLAB® Distributed Computing Server™ scripts run using several default parameters. You can customize the scripts, as described in this section.

Define Script Defaults

The scripts for the server services require values for several parameters. These parameters set the process name, the user name, log file location, ports, etc. Some of these can be set using flags on the command lines, but the full set of user-configurable parameters are in the mdce_def file.

    Note   The startup script flags take precedence over the settings in the mdce_def file.

The default parameters used by the server service scripts are defined in the file:

  • matlabroot\toolbox\distcomp\bin\mdce_def.bat (on Microsoft® Windows® operating systems)

  • matlabroot/toolbox/distcomp/bin/mdce_def.sh (on Linux® or Macintosh operating systems)

To set the default parameters, edit this file before installing or starting the mdce service.

The mdce_def file is self-documented, and includes explanations of all its parameters.

    Note   If you want to run more than one job manager on the same machine, they must all have unique names. Specify the names using flags with the startup commands.

Set the User

By default, the job manager and worker services run as the user who starts them. You can run the services as a different user with the following settings in the mdce_def file.

Parameter

Description

MDCEUSER

Set this parameter to run the mdce services as a user different from the user who starts the service. On a UNIX® operating system, set the value before starting the service; on a Windows operating system, set it before installing the service.

MDCEPASS

On a Windows operating system, set this parameter to specify the password for the user identified in the MDCEUSER parameter; otherwise, the system prompts you for the password when the service is installed.

On UNIX operating systems, MDCEUSER requires that the current machine has the sudo utility installed, and that the current user be allowed to use sudo to execute commands as the user identified by MDCEUSER. For further information, refer to your system documentation on the sudo and sudoers utilities (for example, man sudo and man sudoers).

The MDCEUSER is granted these permissions on Windows systems:

PrivilegePurposeLocal Security Settings Policy
SeServiceLogonRightRequired to log on using the service logon type.Log on as a service
SeAssignPrimaryTokenPrivilegeRequired to start a process under a different user account.Replace a process level token
SeIncreaseQuotaPrivilegeRequired to start a process under a different user account.Adjust memory quotas for a process

To modify or remove these privileges,

  1. Select the Windows menu Start > Settings > Control Panel.

  2. Double-click Administrative Tools, then Local Security Policy.

  3. In the tree, select Local Policies, then in the right pane, double-click User Rights Assignment.

The table above indicates which policies are affected by MDCEUSER. Double-click any of the listed policies in the Local Security Settings GUI to alter its setting or remove a user from that policy.

Override Script Defaults

Specify an Alternative Defaults File

The default parameters used by the mdce service, job managers, and workers are defined in the file:

  • matlabroot\toolbox\distcomp\bin\mdce_def.bat (on Windows operating systems)

  • matlabroot/toolbox/distcomp/bin/mdce_def.sh (on Linux or Macintosh operating systems)

Before installing and starting the mdce service, you can edit this file to set the default parameters with values you require.

Alternatively, you can make a copy of this file, modify the copy, and specify that this copy be used for the default parameters.

On Linux or Macintosh operating systems, enter the command

mdce start -mdcedef my_mdce_def.sh

On Windows operating systems, enter the command

mdce install -mdcedef my_mdce_def.bat
mdce start -mdcedef my_mdce_def.bat

If you specify a new mdce_def file instead of the default file for the service on one computer, the new file is not automatically used by the mdce service on other computers. If you want to use the same alternative file for all your mdce services, you must specify it for each mdce service you install or start.

For more information, see Define Script Defaults.

    Note   The startup script flags take precedence over the settings in the mdce_def file.

Start in a Clean State

When a job manager or worker starts up, it normally resumes its session from the past. This way, a job queue is not destroyed or lost if the job manager machine crashes or if the job manager is inadvertently shut down. To start up a job manager or worker from a clean state, with all history deleted, use the -clean flag on the start command:

startjobmanager -clean -name MyJobManager
startworker -clean -jobmanager MyJobManager
Was this topic helpful?