• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

mathworks-ref-arch/matlab-parallel-server-on-aws: Stand up a MATLAB Parallel Ser ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mathworks-ref-arch/matlab-parallel-server-on-aws

开源软件地址(OpenSource Url):

https://github.com/mathworks-ref-arch/matlab-parallel-server-on-aws

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

MATLAB Parallel Server on Amazon Web Services (Linux VM)

Requirements

Before starting, you will need the following:

  • MATLAB Parallel Server™ license. For more information on how to configure your license for cloud use, see MATLAB Parallel Server on the Cloud. Either:

    • MATLAB Parallel Server TM license configured to use online licensing for MATLAB.
    • A network license manager for MATLAB hosting sufficient MATLAB Parallel Server licenses for you cluster. MathWorks provide a reference architecture to deploy a suitable Network License Manager for MATLAB on AWS or an existing license manager can be used.
  • MATLAB® and Parallel Computing Toolbox™ on your desktop. These must match the chosen MATLAB version of this reference architecture.

  • An Amazon Web Services™ (AWS) account with required permissions. To see what is required look at the example policy. For more information about the services used see Learn About Cluster Architecture. To learn more about IAM roles, see Getting Started with IAM and Security Best Practices in IAM.

  • An SSH Key Pair for your AWS account in your chosen region. Create an SSH key pair if you do not already have one. For instructions see the AWS documentation.

Costs

You are responsible for the cost of the AWS services used when you create cloud resources using this guide. Resource settings, such as instance type, will affect the cost of deployment. For cost estimates, see the pricing pages for each AWS service you will be using. Prices are subject to change.

Introduction

The following guide will help you automate the process of launching MATLAB Parallel Server and MATLAB Job Scheduler, running on Linux virtual machines, on Amazon EC2 resources with your Amazon Web Services (AWS) account. For information about the architecture of this solution, see Learn About Cluster Architecture.

Use this reference architecture to control every aspect of your cloud resources. Alternatively, for an easier onramp, you can use MathWorks Cloud Center to manage the platform for you. Cloud Center is simpler, but not customisable.

This reference architecture has been reviewed and qualified by AWS.

AWS Qualified Software badge

Deployment Steps

To view instructions for deploying the MATLAB Parallel Server reference architecture, select a MATLAB release:

Linux Windows
R2022a R2022a
R2021b R2021b
R2021a
R2020b
R2020a
R2019b
R2019a_and_older

Learn About Cluster Architecture

Parallel Computing Toolbox and MATLAB Parallel Server software 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 at a high level in MATLAB. To learn more see the documentation: Parallel Computing Toolbox and MATLAB Parallel Server.

The MATLAB Job Scheduler is a built-in 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.

AWS is a set of cloud services which allow you to build, deploy, and manage applications hosted in Amazon’s global network of data centres. This guide will help you launch a compute cluster using compute, storage, and network services hosted by AWS. Find out more about the range of cloud-based products offered by AWS. Services launched in AWS can be created, managed, and deleted using the AWS Management Console. For more information about the AWS Management Console, see AWS Management Console.

The MATLAB Job Scheduler and the resources required by it are created using AWS CloudFormation templates. This diagram illustrates the cluster architecture created by the template, it defines the resources below. For more information about each resource see the AWS CloudFormation template reference.

Cluster Architecture

Networking resources

  • Security Group (AWS::EC2::SecurityGroup): The security group defines the ports that are opened for ingress to the cluster:
  • Internal Security Group Traffic Rule (AWS::EC2::SecurityGroupIngress): Opens access to network traffic between all cluster nodes internally.

Instances

  • Headnode instance (AWS::EC2::Instance): An EC2 instance for the cluster headnode. The MATLAB snapshot is mounted at /mnt/matlab and the job database is stored either locally on the root volume, or optionally, a separate EBS volume can be used which is mounted at /mnt/database. Communication between clients and the headnode is secured using SSL.
    • Database Volume (optional) (AWS::EC2::Volume): A separate EBS volume to store the job database. This is optional, and if not chosen the root volume will be used for the job database.
    • Database Mount Point (optional) (AWS::EC2::VolumeAttachment): The mount point for the database volume, specified as /dev/sdh (which may be converted to /dev/xvdh on the instance depending on the OS).
  • IAM Role for Cluster Instances (AWS::IAM::Role): A role allowing access to Amazon S3 from services running in EC2.
  • Instance Profile for cluster instances (AWS::IAM::InstanceProfile): A profile for the cluster instances that associates them with the IAM role above.
  • Worker Auto Scaling Group (AWS::AutoScaling::AutoScalingGroup): A scaling group for worker instances to be launched into. The scaling features are not currently used. From the R2021b release, you can also enable scale-in protection for your cluster. For more information see, Use Scale-in Protection.
  • Worker Launch Configuration (AWS::AutoScaling::LaunchConfiguration): A launch configuration for one or more worker nodes which each run one or more worker MATLAB processes. Communication between clients and workers is secured using SSL.

S3 bucket

  • Cluster S3 Bucket (AWS::S3::Bucket): An S3 bucket to facilitate sharing the shared secret required for workers to register and establish a secure connection with the job scheduler between the cluster nodes. The shared secret is encrypted in the bucket using server-side encryption. The cluster profile required to connect to the cluster from the MATLAB client is also uploaded to this bucket.
  • IAM role for deletion of S3 bucket (AWS::IAM::Role): The S3 bucket cannot be automatically deleted by Cloud Formation unless it is empty. This role gives permissions for an AWS lambda function to empty the S3 bucket during shut down of the cluster.
  • Lambda function to empty the S3 bucket (AWS::Lambda::Function): A lambda function that will empty the S3 bucket created above to allow Cloud Formation to successfully delete the S3 bucket when the cluster is shut down.
  • Custom lambda dependency (Custom::LambdaDependency): A custom dependency used to trigger the lambda function when the Cloud Formation stack is deleted.

FAQ

What skills or specializations do I need to use this Reference Architecture?

No programming or cloud experience required.

How long does this process take?

If you already have an AWS account set up and ready to use, you can start a MATLAB Parallel Server Reference Architecture cluster in less than 15 minutes. Time varies depending on the size of your cluster.

How do I manage limits?

To learn about setting quotas, see AWS Service Quotas.

How do I copy the VM image to a different region?

You can copy the AMI for a certain MATLAB version to a target region of your choice.

  • In the Releases folder of this repository, choose the MATLAB release that you want to copy. Download and open the CloudFormation template .json file for that release.
  • Locate the Mappings section in the CloudFormation template. Copy the AMI ID for one of the existing regions, for example, us-east-1.
  • To copy the AMI to your target region, follow the instructions at Copying an AMI on the AWS documentation.
  • In the Mappings section of the CloudFormation template, add a new RegionMap pair corresponding to your target region. Insert the new AMI ID of the AMI in the target region.
  • In your AWS Console, change your region to your target region. In the CloudFormation menu, select Create Stack > With new resources option. Provide the modified CloudFormation template.

You can now deploy the AMI in your target region using the AMI that you copied.

Technical Support

If you require assistance or have a request for additional features or capabilities, please contact MathWorks Technical Support.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap