Main Content

Create and Discover Clusters

Create a Cloud Cluster

If you are new to cloud clusters, seeGetting Started with Cloud Center.

  1. Sign in to Cloud Center athttps://cloudcenter.mathworks.com.

  2. If you have never used Cloud Center before, there is a one-time setup to link your cloud account with Cloud Center. SeeLink Your Cloud Account to Cloud Center.

  3. To start any cloud resources, click theCloud Resourcestab.

  4. Next toMATLAB®Parallel Server™, clickCreate.

    Create MATLAB Parallel Server resource button in the Cloud Resource tab.

  5. On the Create Cluster page, specify your cluster options.

    Tip

    Specify a cluster name and clickCreate Clusterto try a default cluster. Cloud Center prompts you if you need to create a new SSH key. You might want to configure other cluster settings, such as cluster size, machine types and storage options. For example, for deep learning, choose aMachine typewith GPUs such as the P2 or G3 instances.

    Option Description
    Give this cluster a name Specify a name.
    MATLAB Version Select the same version as your local desktop client MATLAB.
    Automatically terminate cluster Select a timeout for the cluster so that it shuts down automatically.
    Cluster Log Level Change the cluster log level. If you need to diagnose cluster issues with support engineers, increase the log level for more detail. Log levels aboveMediumcan negatively impact performance.
    Location & Network

    Select theRegionwhere your cluster will run. Consider your location and connectivity. Select aNetworkandSubnetthat meet the requirements forConnecting a Desktop Computer (Client Machine) to MATLAB Parallel Server Running on the Amazon EC2 Cloud. You can only use the Amazon Virtual Private Cloud (VPC) network type with Cloud Center. For more information, seeConfigure AWS VPC for Cloud Center.

    Shared State

    SelectPersonal ClusterorShareable Cluster.

    SeeSharing Options for Clusters.

    Personal Cluster (default) - A personal cluster is one that is accessible only by you.

    • Auto-Manage Cluster Access- This attribute is checked by default. Deselect this option if you prefer to manage cluster access to and from MATLAB manually.

    • Dedicated headnode- Leave the dedicated headnode checked (by default when you selectPersonal Cluster) to have your cluster access files on yourMATLAB Drive™(read-only).

    Shareable Cluster - Shareable clusters can be shared with other people.

    • Shared With(R2019b only) — Enter the email addresses and/or domains of people that are allowed to access your cluster.

    • Auto-Manage Cluster Access— This attribute is deselected when you specify a Shareable Cluster. Check this option if you prefer to have Cloud Center manage the access to and from MATLAB.

    Auto-Manage Cluster Access

    Auto-Manage Cluster Accessautomatically manages inbound cluster firewall rules that allow MATLAB orMATLAB Online™to interact with the cluster. SeeManage Cluster Access Automatically.

    Selected - Allows Cloud Center to manage a cluster’s inbound firewall rules.
    Deselected - Manually manage a cluster's inbound firewall rules.
    Worker Machine Type

    Choose an instance that suits your application. Types vary by hardware specification, including number of cores, memory, and GPU support. For details, seeChoose Supported EC2 Instance Machine Types.

    Tip

    For deep learning, choose a machine type with GPUs such as the P2 or G3 instances. P2s have GPUs with high performance for general computation. G3s have GPUs with high single-precision performance for deep learning, image processing, and computer vision.

    Workers per Machine The maximum number of workers per machine depends on your selectedWorker Machine Type, and it corresponds to the number of physical CPU cores.
    Use a dedicated headnode Enabled (default) - Add a headnode instance that only runs management services (for example, the job manager orMATLAB Drive), and does not host any MATLAB workers. Cloud Center uses the instance type shown inHeadnode Machine Type(read-only). This mode improves performance. For details, seeUse a Dedicated Headnode Instance for Management Services.

    Disabled - The headnode shares the job manager and workers. This mode minimizes machine cost, but can reduce performance. For details seeUse a Shared Instance for Management Services.

    Allow cluster to auto-resize Enabled - The number of machines in your cluster will shrink or grow depending on the amount of work submitted to the cluster. SetWorkers in Clusterto the maximum number of workers you want in the cluster. You must use a dedicated headnode to enable the auto-resize feature. For more information, seeResize Clusters Automatically.

    Disabled (default) - The number of machines in your cluster remains fixed at the number of workers set byWorkers in Cluster.

    Workers in Cluster

    Choose the number of workers, using theUpper Limitmenu. If you select a number greater than theWorkers per Machine, you see theMachines in Clusterinformation update to show more than one machine. Cloud Center supports a maximum of 1024 workers per cluster.

    TheInitial Countfield shows the number of workers your cluster will start with. IfAllow cluster to auto-resizeis disabled, theInitial Countfield matches yourUpper Limitselection.

    IfAllow cluster to auto-resizeis enabled, theUpper Limitmenu sets the maximum number of workers for your cluster, in increments ofWorkers per Machine. TheInitial Countfield is zero. You cluster starts with zero workers and can resize up to the maximum number of workers. For more information, seeResize Clusters Automatically.

    Cluster Shared Storage,Local Machine Storage For details, seeCluster File System and Storage.
    SSH Key

    If you do not have a key, Cloud Center prompts you to create one. AWS requires an SSH key to start EC2 instances. Clickcreate a new key, in the dialog box, enter a name, and clickDownload Key. Your browser might require you to identify a location. You get a root access key file with the extension.pem. Store this file in a safe place, because you cannot download it again. However, you can always create a new key, and download its key file. You can specify the same SSH key for multiple clusters.

    If you want to log in as ubuntu (root) to your cloud cluster machines, you need the root SSH key. Cluster machines have no password, so you use a key to log in using SSH. Cloud Center also provides a clouduser (nonroot) user access key file, which is unique to each cluster. For details on the user access key file, seeDownload SSH Key Identity File.

    If you have existing keys, select from the keys for the specified region of your AWS account, or create a new key. Otherwise, Cloud Center uses the previously selected key or the first key listed alphabetically in the AWS account.

    Operating System Image (AMI) If you have created a custom AMI, you can select it. SeeCreate a Custom Amazon Machine Image (AMI).
  6. ClickCreate Clusterto create and start your cluster machines. The cluster starts a number of machines (instances) determined by your choices of number of workers and workers per machine. Cloud Center displays the cluster statusStarting, and indicates the interim status of all the cluster machines.

    It can take up to several minutes for a cluster to completely start up. The status indicates the stages of the process. To get status on any individual cluster machine, underCluster Details, clickHeadnodeorWorkerexpanders.

    When the cluster is started and ready for use, Cloud Center displays the cluster status asOnline.

Tip

For next steps using your new cluster, discover the running cluster from MATLAB. SeeDiscover Clusters.

这个图显示了一个示例创建集群组tings for a personal cluster.

Create Cluster window with example settings for a personal cluster. Set the Shared State in the Cluster Configuration to Personal Cluster.

这个图显示了一个示例创建集群组tings for a shareable cluster.

Create Cluster window with example settings for a shareable cluster. Set the Shared State in the Cluster Configuration to Shareable Cluster.

This figure shows a typical shareable cluster status after starting a standard 16-worker cluster with a 2-hour time limit.

Cluster Summary window. The Default Run Time field is 2 Hours, Workers per Machine is 16 and the Shared State under More Details is Shareable.

如果集群未能完全启动,它的统计us will indicate that. For information on the failure, underCluster Details, click the appropriateHeadnodeorWorkerexpander to read the respective log. Often you can shut down your failed cluster and attempt to start it again.

Discover Clusters on Local Machine

To access a running cluster created in your account, useDiscover Clustersfrom MATLAB. SeeDiscover Clusters.

Alternatively, it can be useful to download and share the cluster profile. When your cloud cluster is starting or online, clickMATLAB Cluster Profileto save a cluster profile from Cloud Center onto your local machine orMATLAB Drive, allowing you to access that cluster from MATLAB and the Cluster Profile Manager. Save the profile in a folder accessible from your client MATLAB. SeeImport Cluster Profiles.

Related Topics