MATLAB: How to use ‘dmlworker’ to test the licensing and installation for the worker nodes in the MATLAB Parallel Server cluster

MATLAB Parallel Server

How can I use 'dmlworker' to test the licensing for the worker nodes in my MATLAB Parallel Server cluster?

Best Answer

The 'dmlworker' command can be used to ensure that the licensing and installation for MATLAB Parallel Server is configured correctly on your cluster. This is useful as MATLAB cannot be invoked directly if licensed as part of an MATLAB Parallel Server cluster.
This will also test to see if MATLAB is crashing on startup in your cluster. To test this, go to one of the worker nodes in the cluster and open up a Command Prompt or Terminal window, then run the following commands:
Windows
cd $MATLAB/bin
matlab.exe -dmlworker -nodisplay -logfile C:\Temp\output.txt -r "ver;exit"
Mac/Linux
cd $MATLAB/bin
./matlab -dmlworker -nodisplay -logfile /var/tmp/output.txt -r "ver;exit"
(where $MATLAB is the installation folder for MATLAB on the cluster)
These will generate an output.txt file (at your specified location) that contains the 'ver' output for the worker node. If the log file contains a license manager error, this is the issue. In that case, check MATLAB Answers for the license manager error number and take the appropriate action to resolve the license error before proceeding.
If you do not receive a License Manager error, confirm that "MATLAB Parallel Server" appears in the 'ver' output as an installed product.
NOTE: Starting in R2019a the following name changes occurred:
  • MATLAB Distributed Computing Server was renamed to MATLAB Parallel Server
  • mdce_def was renamed to mjs_def
  • mdce binary was renamed to mjs