MATLAB: How to configure the cluster to utilize an Online Licensing MATLAB Parallel Server License

MATLAB Parallel Server

I have obtained an MATLAB Parallel Server Online Licensing license and would like some instructions on how to get started with using my license.

Best Answer

In order to use MATLAB Parallel Server* in the Cloud* with Online Licensing, the best way to start is the MathWorks Cloud Center User's Guide:
The guide covers configuring your Amazon AWS account, starting your cluster, and managing your data.
If you are using a* Local Cluster *with MATLAB Parallel Server Online Licensing, there are two changes that must be made to the cluster and client computers once MATLAB, MATLAB Parallel Server and Parallel Computing Toolbox have been installed:
1. Modify mjs_def.bat for Online Licensing usage
  • Navigate to:
$MATLAB/R20XXx/toolbox/parallel/bin
(where $MATLAB is the path to your MATLAB installation and R20XXx the release of MATLAB) * Open the mjs_def.bat (mjs_def.sh for Linux and Mac) file with a text editor * Find the entry in the .bat file titled:
set "USE_ONLINE_LICENSING"
Set it to "true". This needs to be done on every cluster node.
2. Configure MATLAB client
- Using the MATLAB Job Scheduler -
  1. Open the MATLAB client that has Parallel Computing Toolbox installed.
  2. On the Home tab click the Parallel drop down menu and select Create and Manage Clusters.
  3. Select your cluster profile and click Edit. (Note: On R2016b and higher, a blank MathWorks Cloud Profile is created on installation so you can use this one for convenience)
  4. Modify the license number field to include the license number of the Online Licensing license.
  5. Click on Done.
- Third-party schedulers -
  1. Open the MATLAB client that has Parallel Computing Toolbox installed.
  2. On the Home tab click the Parallel drop down menu and select Manage cluster profiles.
  3. Select your cluster profile and click Edit.
  4. Enter your LicenseNumber.* This is only needed if you have more than one MATLAB Parallel Server license and you don't want to be prompted for which one to use.
  5. Set RequiresOnlineLicensing to true.
  6. Click on Done.
Whether your compute nodes are in the cloud or not, it is necessary for the user of the cluster to be listed on the license as the licensed end user. They will be prompted to log into their MathWorks account when connecting the cluster.
NOTE: Starting in R2019a the following 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
  • mjs_def.bat file is located in $MATLAB/R20XXx/toolbox/distcomp/bin for R2019a and earlier.