Run MATLAB Parallel Server from Microsoft Azure Marketplace
This topic describes how to use the Azure® Marketplace to quickly deploy and run MATLAB® Parallel Server™ in Azure. The elasticity of the cloud infrastructure combined with MATLAB Parallel Server enables you to leverage greater computing resources and keep your calculations close to your data.
Anyone with a valid MATLAB license that includes MATLAB Parallel Server and an Azure account can run MATLAB Parallel Server in the cloud. This offering is called MATLAB Parallel Server (BYOL) because you "Bring Your Own License."
To complete these instructions, you need:
By default, the MATLAB Parallel Server (BYOL) offering in the Azure Marketplace uses online licensing. The following table summarizes which licenses support running MATLAB Parallel Server on the cloud using online licensing.
|License Type||Cloud Availability|
Individual (a license that only you use that is in your name; not a Home or Student license)
Your license is already configured for MATLAB Parallel Server in the cloud.
Campus-Wide License (a license that you use that belongs to your academic institution)
Your license is already configured for MATLAB Parallel Server in the cloud.
Home and Student (that only you use and is in your name)
These license types are not eligible to use MATLAB Parallel Server in the cloud.
All other license types, including Concurrent and Network Named User
Contact your license administrator.*
The license administrator might need to make some changes to the license to enable you to run MATLAB Parallel Server in the cloud.
Administrators: For more information on this process, see Configure MATLAB Parallel Server Licensing for Cloud Platforms.
*Not sure who the license administrator is? Sign in to your MathWorks Account, click the license you are using, then click the tab marked “Contact Administrators.”
To use a license that is managed using a network license manager, you can specify the port and host name or IP address of the network license manager when you create the cloud resources in Azure. You can either specify the location of an existing license manager, or deploy a new license manager in the cloud. You must make sure that the license manager can communicate with your cloud resources. To deploy a Network Manager in Azure using an Azure Marketplace software plan developed by MathWorks®, follow the steps at Run Network License Manager from Azure Marketplace.
Deploy MATLAB Parallel Server Resources in Azure
Configure and Deploy Template from Marketplace
Use the following steps to configure and deploy MATLAB Parallel Server (BYOL) resources in a resource group.
Navigate to https://portal.azure.com and log in to your Azure account.
From the Portal, click Create a Resource.
Search for “matlab parallel server” in the marketplace and select the MATLAB Parallel Server (BYOL) offering.
Click Create on the offering page to begin setup.
The setup process uses a Resource Manager template to help you configure the virtual machine (VM) and networking settings. To make setup easy, many of the fields come prepopulated with suitable values. The following table describes how to set the various options in each menu of the template. Click Next at the end of each step to proceed to the next menu.
Menu Option Description
Select an Azure subscription to use.
You can select an existing resource group from the drop-down menu, or click Create New to create a new resource group. If you select an existing resource group, then it must not have any currently deployed resources.
Select a region from the drop-down list.
Select a name for the cluster. The default name is
Num worker nodes
The number of Azure instances to start for the workers to run on.
Num workers per node
The number of MATLAB workers to start on each instance. Specify one worker for every two vCPUs to assign one worker per physical core. For example, a Standard_D64s_v3 instance has 64 vCPUs, so can support 32 MATLAB workers. For details on the number of vCPUs for each instance type, see https://docs.microsoft.com/en-us/azure/virtual-machines/sizes.
Headnode instance type
The Azure instance type to use for the head node, which runs the job manager. No workers are started on this node, so this node can be a smaller instance type than the worker nodes. For a list of instance types and sizes, see https://docs.microsoft.com/en-us/azure/virtual-machines/sizes.
Worker instance type
The Azure instance type to use for the workers. For a list of instance types and sizes, see https://docs.microsoft.com/en-us/azure/virtual-machines/sizes.
Database volume size
The size of the volume in gigabytes used to store the database files. If you set this value to 0, a separate volume is not created and the root volume is used for the database. Client IP address The IP address range that can be used to access the cluster from MATLAB. The range must be a valid IP CIDR range of the form x.x.x.x/x. Use a value of the form x.x.x.x/32 to restrict access to only your computer. Password Choose the admin password for the user "matlab". This password is required when you log into any instance (headnode or worker) using remote desktop protocol. Your password must have at least 12 characters and meet the Azure password requirements. For information on the password requirements, see What are the password requirements when creating a VM? Confirm password Retype your chosen password.
Network license manager port@server
If you are using a network license manager, enter the port and hostname or IP address. Make sure that the network license manager can communicate with your Azure resources. To deploy a network license manager in Azure, see Run Network License Manager from Azure Marketplace.
The Virtual network field is prepopulated with a new virtual network resource named
You can configure the name, address space, or subnets of the new virtual network resource by clicking Create new.
You can select an existing virtual network resource in the drop-down menu. If you choose to use an existing resource, then the template does not create any new virtual network resources.
The Subnet field is prepopulated with a new subnet named
subnet-1and an associated subnet address.
You can select a different subnet of the selected virtual network in the drop-down menu.
If you selected an existing virtual network rather than creating a new one, then you can click Manage subnet configuration to configure the subnets for the network.
Review and Create
When you advance to the Review and Create menu, Azure automatically runs some final validation checks on the information entered on previous screens. If Azure finds any errors, then you must fix them before proceeding.
Once you are satisfied with the values you have entered, click Create to finalize setup and begin deploying the selected resources, or click Download a template for automation to get a copy of the completed template.
Connect to your Cluster from MATLAB
Once you have successfully configured and deployed the MATLAB Parallel Server (BYOL) resources, use the following steps to connect to the cluster you set up.
From the Azure Portal, navigate to the resource group with the resources you deployed.
Select the Storage Account ending with storage.
Select the Files container type.
Select the File Share named "shared."
Open MATLAB on your client machine.
In the Parallel drop-down menu in the MATLAB toolstrip, select Create and Manage Clusters....
Select the downloaded profile and click open.
Click Set as Default.
(Optional) Validate your cluster by clicking the Validate button.
After you set the cloud cluster as the default, the next time you run a parallel
language command (such as
batch), MATLAB connects to the cluster. The first time you connect, you are prompted for
your MathWorks account login. The first time you run a task on a worker, it can take
several minutes for the worker MATLAB to start. This delay is due to provisioning the instance disk. This is a
one-time operation, and subsequent tasks begin much faster.
Your cluster is now ready to use. The cluster remains running after you close MATLAB on the client machine.
Use the profile and client IP address range to control access to your cloud resources. Anyone with the .settings file can connect to your resources from a machine within the specified IP address range and run jobs on it.
Port Requirements for Accessing MATLAB Parallel Server
To access a MATLAB Parallel Server cluster from your client MATLAB, your client machine must be able to communicate on specific ports. Make sure that the network firewall allows the following outgoing connections.
|TCP 27350 to 27358 + 4*N||Ports 27350 to 27358 + 4*N, where N is the maximum number of workers on a single node|
|TCP 443||HTTPS access to (at least) *.mathworks and *.microsoft.com|
|TCP 3389||Remote Desktop Protocol for access to cluster nodes|
Delete MATLAB Parallel Server Resources from Azure
You can remove the resource group and all associated resources when you are done with them to help save on costs.
Log in to the Azure Portal.
Select the resource group containing the MATLAB Parallel Server (BYOL) resources you deployed.
Click the Delete resource group icon to delete all resources deployed in the group.
You are prompted to confirm the deletion.
The deletion is final, and files do not persist between deployments. You must create the resources to make them available again.
Architecture and Resources for MATLAB Parallel Server in Azure
Deploying MATLAB Parallel Server in Azure creates several resources in your resource group. The deployment sets up a single Azure VM for the headnode, an Azure virtual machine scaling set (VMSS) for the workers, a network interface with a public IP address to connect to the VM, a network security group that controls network traffic, and a virtual network for communication between resources. The following table summarizes the resources that are created.
|Resource Name||Default Resource Name in Azure||Description|
|Virtual machine||A compute instance for the cluster headnode. The MATLAB install is part of the VM image and the job database is stored either locally on the root volume. Optionally, a separate data disk can be used. Communication between clients and the headnode is secured using SSL.|
|Virtual machine scaling set||A scaling set for worker instances to be launched into. The scaling features are not currently used. The scaling set is configured to attach an extension to each instance that is configured at deployment time as a worker node of the cluster. Communication between clients and workers is secured using SSL.|
|Network interface||Enables the headnode and workers to communicate with the internet, Azure, and on-premises resources.|
|Network security group||Allows or denies traffic to and from sources and destinations.|
|Virtual network||Enables resources to communicate with each other. If you select an existing virtual network resource, then the template does not create this resource.|
The architecture of these resources is summarized in the following diagram.
A preconfigured Windows® VM is provided to make deployment easy. The VM contains the following software:
MATLAB, Simulink®, toolboxes, and support for GPUs.
The license used to run MATLAB determines which products and toolboxes are available for you to use. However, all products are installed on the VM, so the
vercommand returns a list of all products. To add new products to your license, see Products and Services.
Add-Ons: Deep Learning Toolbox™ Model for AlexNet Network, Deep Learning Toolbox Model for GoogLeNet Network, and Deep Learning Toolbox Model for ResNet-50 Network.
Marketplace vs. Reference Architecture
The Azure Marketplace offering runs only the latest release of MATLAB Parallel Server. If you want to run older releases of MATLAB Parallel Server, or customize the templates and automation scripts more extensively, then you can use the MATLAB Parallel Server Reference Architecture for Microsoft Azure instead.
If you encounter an unexpected problem, search MATLAB Answers for solutions first. Most likely, other people have run into the same problem and resolved it already.
If the problem persists, or there are not any relevant posts on MATLAB Answers for the issue, contact Technical Support.