The MATLAB® Parallel Server™ scripts run using several default parameters. You can customize the scripts, as described in this section.
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
mjs_def
file.
The startup script flags take precedence over the settings in the
mjs_def
file.
The default parameters used by the server service scripts are defined in the file:
(on Microsoft®
Windows® operating systems)matlabroot
\toolbox\parallel\bin\mjs_def.bat
(on Linux® or Macintosh operating systems)matlabroot
/toolbox/parallel/bin/mjs_def.sh
To set the default parameters, edit this file before installing or starting the mjs service.
The mjs_def
file is self-documented, and includes explanations of all
its parameters.
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.
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
mjs_def
file.
Parameter | Description |
---|---|
| Set this parameter to run the mjs 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. |
| On a Windows operating system, set this parameter to specify the password for the user
identified in the |
On UNIX operating systems, MJSUSER
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
MJSUSER
. For further information, refer to your system documentation on
the sudo
and sudoers
utilities (for example, man
sudo
and man sudoers
).
The MJSUSER
is granted these permissions on Windows systems:
Privilege | Purpose | Local Security Settings Policy |
---|---|---|
SeServiceLogonRight | Required to log on using the service logon type. | Log on as a service |
SeAssignPrimaryTokenPrivilege | Required to start a process under a different user account. | Replace a process level token |
SeIncreaseQuotaPrivilege | Required to start a process under a different user account. | Adjust memory quotas for a process |
To modify or remove these privileges,
Select the Windows menu Start > Settings > Control Panel.
Double-click Administrative Tools
, then Local Security
Policy
.
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 MJSUSER
.
Double-click any of the listed policies in the Local Security Settings GUI to alter its setting
or remove a user from that policy.
The default parameters used by the mjs service, job managers, and workers are defined in the file:
(on Windows operating systems)matlabroot
\toolbox\parallel\bin\mjs_def.bat
(on Linux or Macintosh operating systems)matlabroot
/toolbox/parallel/bin/mjs_def.sh
Before installing and starting the mjs 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
mjs start -mjsdef my_mjs_def.sh
On Windows operating systems, enter the command
mjs install -mjsdef my_mjs_def.bat mjs start -mjsdef my_mjs_def.bat
If you specify a new mjs_def
file instead of the default file for the
service on one computer, the new file is not automatically used by the mjs service on other
computers. If you want to use the same alternative file for all your mjs services, you must
specify it for each mjs service you install or start.
For more information, see Define Script Defaults.
The startup script flags take precedence over the settings in the
mjs_def
file.
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