Requirements and Ports for MATLAB Parallel Server
This section discusses the requirements and port configuration for your network to support parallel computing.
Fully Qualified Domain Names
MATLAB® Parallel Server™ software and Parallel Computing Toolbox™ software support both short host names and fully qualified domain names. The default usage is short host names. Check the following considerations depending on your scheduler type:
| Scheduler | Consideration |
|---|---|
| MATLAB Job Scheduler |
|
| Third-Party scheduler |
|
Security Considerations
Check the following table for security considerations when using MATLAB Parallel Server:
| Scheduler | Security Consideration |
|---|---|
| MATLAB Job Scheduler |
|
| Third-Party scheduler |
|
Required Ports
Before you can use MATLAB Parallel Server, you must configure certain required ports. If you need more help during configuration, see this information from MathWorks Support Team on MATLAB Answers: MATLAB Job Scheduler, or Third-Party Scheduler.
For MATLAB Job Scheduler
BASE_PORT. The mjs_def file specifies and describes the ports
required by the job manager and all workers. For more information, see the
description for the BASE_PORT parameter in Define MATLAB Job Scheduler Startup Parameters.
Communicating Jobs. On worker machines running a UNIX operating system, the number of ports required by MPICH for
the running of communicating jobs ranges from BASE_PORT +
1000 to BASE_PORT + 2000.
SOCKS5 Proxy for MATLAB Job Scheduler. You can route all Parallel Computing Toolbox client traffic to a MATLAB Job Scheduler cluster through a single SOCKS5 proxy endpoint
using the parallelserverproxy tool. This reduces the
number of open client‑to‑cluster ports and simplifies firewall rules. The
proxy also authenticates clients with mutual TLS and encrypts all
communication. (since R2026a)
To learn more, see Configure SOCKS5 Proxy for MATLAB Job Scheduler.
With Third-Party Scheduler
Communication Between Workers. Before the worker processes start, you can control the port range the workers use for communicating jobs.
For Microsoft HPC Pack clusters, define the environment variable
MPICH_PORT_RANGEwith the valueminport:maxport.For all other third-party schedulers, define the minimum port number using the
FI_TCP_PORT_LOW_RANGEenvironment variable and the maximum port number using theFI_TCP_PORT_HIGH_RANGEenvironment variable.Before R2024b: You can control the range of ports used by the workers for communicating jobs by defining the environment variable
MPICH_PORT_RANGEwith the valueminport:maxport.
Open Ports on Workers for Inbound Communication from Client. You can control the listening port range workers open to connect to clients for interactive parallel pool jobs.
Use the
pctconfig(Parallel Computing Toolbox) function to specify which listening ports workers must open orDefine the environment variable
PARALLEL_SERVER_OVERRIDE_PORT_RANGEwith the value"minport maxport". This will override the port range specified withpctconfig.For Microsoft HPC Pack, set
PARALLEL_SERVER_OVERRIDE_PORT_RANGEin the job template with an addition to the Environments field. For example, to open a listening port in the range 30000 to 31000, add this code to the job template.PARALLEL_SERVER_OVERRIDE_PORT_RANGE=30000 31000;
For other third-party schedulers, set
PARALLEL_SERVER_OVERRIDE_PORT_RANGEin thecommunicatingJobWrapper.shscript. For example, to open a listening port in the range 29000 to 31000, add this code to thecommunicatingJobWrapper.shscript.To learn more about theexport PARALLEL_SERVER_OVERRIDE_PORT_RANGE="29000 31000"
communicatingJobWrapper.shscript, see Wrapper Scripts.