Stand up a MATLAB Parallel Server cluster using Azure Deployment
This repository helps you automate the process of deploying MATLAB® Parallel Server™ and MATLAB Job Scheduler using your Azure® account.
Use this repository to deploy a compute cluster using compute, storage, and network resources hosted by Azure. The cloud resources are created using Azure Resource Manager (ARM) templates. For information about the architecture of this solution, see Learn About Cluster Architecture.
Before starting, you need the following:
You are responsible for the cost of the Azure services you use when you create cloud resources using this repository. Resource settings, such as virtual machine (VM) type, affect the cost of deployment. For cost estimates, see the pricing pages for each Azure service you use. Prices are subject to change.
To view instructions for deploying the MATLAB Parallel Server reference architecture, select a MATLAB release.
Linux | Windows |
---|---|
R2024b | R2024b |
R2024a | R2024a |
R2023b | R2023b |
R2023a | R2023a |
R2022b | R2022b |
R2022a | R2022a |
R2021b | |
R2021a | |
R2020b | |
R2020a | |
R2019b | |
R2019a_and_older |
This diagram illustrates the cluster architecture created by the template. When you use the Azure Resource Manager template in this repository, it automatically creates the MATLAB Job Scheduler and necessary resources. For more information about each resource, see the Azure template reference.
Figure 1: Cluster Architecture
The following resources are created.
To enable autoscaling or auto-termination for your cluster, you must have the following permissions:
Microsoft.Authorization/roleDefinitions/write
Microsoft.Authorization/roleAssignments/write
To check if you have these permissions, see Check access for a user to Azure resources.
If you do not have these permissions, the administrator or owners of the subscription can either:
Parallel Computing Toolbox and MATLAB Parallel Server let you solve computationally and data-intensive programs using MATLAB and Simulink on computer clusters, clouds, and grids. Parallel processing constructs such as parallel for-loops and code blocks, distributed arrays, parallel numerical algorithms, and message-passing functions let you implement task-parallel and data-parallel algorithms in MATLAB. For more information, see the Parallel Computing Toolbox and MATLAB Parallel Server documentation.
MATLAB Job Scheduler is a scheduler that ships with MATLAB Parallel Server. The scheduler coordinates the execution of jobs and distributes the tasks for evaluation to the server’s individual MATLAB sessions called workers. For more details, see How Parallel Computing Toolbox Runs a Job. The MATLAB Job Scheduler and the resources required by it are created using Azure Resource Manager templates.
Microsoft Azure is a set of cloud services that allow you to build, deploy, and manage applications hosted in Microsoft’s global network of data centers. For more information about the range of services offered by Microsoft Azure, see Azure Services. Services deployed in Azure can be created, managed, and deleted using the Azure Portal UI. For more information about the Azure Portal, see Azure Portal.
No programming or cloud experience required.
If you already have an Azure account set up and ready to use, you can start a MATLAB Parallel Server reference architecture cluster in less than 15 minutes. Startup time varies depending on the size of your cluster.
For information about setting quotas, see Azure subscription and service limits.
Spot Virtual Machines allow you to use Azure VMs at a reduced cost. Azure uses Spot Virtual Machines to sell unused instances within their data centers. However, Azure can reclaim these virtual machines at any time. For more details, see the Azure documentation on Spot Virtual Machines.
Before enabling Spot Virtual Machines, consider these aspects:
Pricing: Spot Virtual Machines offer discounts compared to on-demand virtual machines. The actual discount depends on the available unused capacity of the virtual machines within the availability zone (AZ). For more details, see the Azure documentation.
Behavior of your cluster when Azure reclaims a Spot Virtual Machine: Spot Virtual Machines are used only for the worker nodes, whereas the head node always uses an on-demand virtual machine. This behavior protects your user job and task information from being lost when a virtual machine is reclaimed by Azure. Jobs in the queue are run when a new worker instance is available. For details on how jobs are run, refer to How Parallel Computing Toolbox Runs a Job. If a Spot VM for a worker is interrupted when it is running a task, the task is marked as failed. You can set the maximum number of times to rerun a failed task using the MaximumRetries
property. For more details, see Access task properties and behaviors.
The following VM sizes are not supported for Azure Spot Virtual Machines:
For more information about the limitations of using Spot Virtual Machines, see Azure Spot Virtual Machines for Virtual Machine Scale Sets.
If you need help or have a request for additional features or capabilities, contact MathWorks Technical Support.