Loading...

E2E deployment of a production ready NDv4 (A100) cluster targeting large deep learning training

E2E deployment of a production ready NDv4 (A100) cluster targeting large deep learning training

image.png

 

Introduction

The NDv4 series is very popular for running large deep learning training jobs, which require lots of floating-point performance and high interconnection bandwidth. In this article we will walk through the steps to deploy a complete E2E production ready Ndv4 cluster environment targeting large deep learning training.

The NDv4 cluster environment will consist of the following 

  • NDv4 compute nodes running Ubuntu-hpc 18.04 marketplace image (pre-installed with Infiniband drivers, gpu drivers, NCCL libraries/tests and MPI libraries)
  • Cyclecloud 8.2.2 with SLURM (with pmix support)
  • Premium SSD's used for OS disks with larger capacity (60 GB)
  • Accelerated networking is enabled on NDv4
  • Set up 7 TB local NVMe SSD's (/mnt/resource_nvme)
  • Automatically recover node from a reboot (e.g local NVMe SSD's, GPU persistence mode enabled and GPU app clock frequencies)
  • User home directories are mounted on Azure netapp files
  • container supported via pyxis+enroot integration with the SLURM scheduler.
  • Extensive automatic pre-job healthchecks are enabled, unhealthy nodes will be put into a DRAIN state. (See Automated HPC/AI compute node healthchecks integrated with the SLURM schedule)
  • Cyclecloud autoscaling is disabled
  • NDv4 actual and physical amount of memory relaxed (in SLURM)
  • No public IP's, the NDv4 cluster is accessed via a Bastion landing zone.
  • Windows server (winbox) is deployed to access the Cyclecloud portal via bastion.

 

Deployment procedure

The azurehpc github repository is used to deploy the complete NDv4 cluster environment.

 

Step 1 - Get azurehpc github respository

Frist, get the azurehpc repository, we will be working primarily in the experimental/deploy_cycle_slurm_ndv4 directory

 

git clone https://github.com/Azure/azurehpc.git

 

Step 2 - Deploy Bastion and jumpbox

Deploy the Bastion and a bjumpbox, this will be your landing zone. See examples/bastion for how to deploy this and edit examples/bastion/bastion_ssh_bjumpbox.sh so you will be able to access your bjumpbox directly by running this script.

 

Step 3 - deploy the prerequisites

From your jumpbox, deploy the prerequisites (VNET, keyvault, peering to bastion landing zone and Azure netapp files). A prereqs.json configuration file is provided (edit file before using).

azhpc-build -c prereqs.json

 

step 4 - prepare scripts for cyclecloud project generation

azurehpc will generate the cyclecloud projects defined in the config.json (no container support via pyxis+enroot integration with SLURM) or config_pyxis_enroot.json files, but the scripts referenced in the projects need to be in the deploy_cycle_slurm_ndv4/scripts directory.

cp ../gpu_optimizations/max_gpu_app_clocks.sh scripts
cp ../cc_slurm_nhc/cc_slurm_nhc/specs/default/cluster-init/files/* scripts
cp ../cc_slurm_pyxis_enroot/cc_slurm_pyxis_enroot/specs/default/cluster-init/files/* scripts

 

step 5 - deploy the NDv4 cluster with cyclecloud

Now we deploy the cyclecloud server, cyclecloud locker, generate the cyclecloud projects, upload the cyclecloud projects to the cyclecloud locker and create the NDv4 cluster. Two configuration files have been provided, config.json and config_pyxis_enroot.json.

 

azhpc-build --no-vnet -c config_pyxis_enroot.json

 

step 6 - start the NDv4 cluster

You have 2 options to start the NDv4 cluster, login to the Windows server via bastion and start it via the cyclecloud web portal or login to the jumpbox and start it vis the cyclecloud CLI.

azhpc-connect jumpbox
 cyclecloud start_cluster slurmcycle

 

step 7 - connect to the login node (login-1)

Now you can login to the login node (login-1) and submit jobs via the SLURM scheduler.

 

From the jumpbox

cyclecloud connect login-1 -c slurmcycle

 

How to connect to the cyclecloud web portal

You will first need to retrieve the Windows box (winbox) and cyclecloud server password's from the azure keyvault (they were added to the keyvault using the prereqs.json config file). You will also need the cycleserver private IP address.

Fortunately, azurehpc has support to retrieve secrets from azure keyvault.

azhpc-get secret.{{variables.key_vault}}.WinPassord
 azhpc-get secret.{{variables.key_vault}}.CycleAdminPassword
azhpc-get ip.cycleserver

Go to the azure portal (to your resource group) and login to winbox via bastion, using "hpcadmin" for the username and the retrieved password. Then from the Windows box, in a browser go to the cycleserver private IP address and use user "hpcadmin" and the retrieved password to access the cycleserver.

 

Manually start and delete NDv4 nodes

Autoscaling was disabled, so all NDV4 nodes in the cluster need to be manually added (up to the maximum number of cores you specified in cyclecloud configuration) or deleted.

You can add or delete nodes via the cyclecloud web portal, but the recommended way is from the scheduler node using the cyclecloud provided scripts.

 

First login to the scheduler (via the cyclecloud CLI) (from the jumpbox)

cyclecloud connect scheduler -c slurmcycle

 Then, from the scheduler, to add a node(s)

sudo /opt/cycle/slurm/resume_program.sh slurmcycle-hpc-pg0-[1-4]

To delete nodes

sudo /opt/cycle/slurm/suspend_progrma.sh  slurmcycle-hpc-pg0-1

 

Some GPU monitoring options

Moneo: Distributed GPU System Monitoring for AI Workflows based on prometheus and grafana can be easily integrated into this cluster. GPU Monitoring using Azure Monitor if you would prefer a more Azure native approach leveraging Azure monitor service.

 

Conclusion

The deployment procedure outlined above allows you to quickly deploy a complete production ready NDV4 cluster ideal for large deep learning training jobs. The azurehpc framework is very flexible and allows you to easily customize your deployment.

Published on:

Learn more
Need help with this product?

We can help you with E2E deployment of a production ready NDv4 (A100) cluster targeting large deep learning training

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

Azure Global articles
Azure Global articles

Azure Global articles

Share post:

Related posts

Large-scale docking for drug design on Azure

“Only 10 total drugs in 46 years have been intentionally developed for childhood cancer and have reached FDA approval (reference).  Childhood ...

2 years ago

Performance considerations for large scale deep learning training on Azure NDv4 (A100) series

Background The field of Artificial Intelligence is being applied to more and more application areas, such as self-driving cars, natural langua...

4 years ago

Best Practice for Running Cadence Spectre X on Microsoft Azure

Co-authors: Richard Paw and Andy Chan   Electronic Design Automation (EDA) consists of a set of software (tools) and workflows for design...

4 years ago

Spack in a Multi-User HPC Environment on Azure

Spack is a package management tool designed for HPC environments.  In this article we will demonstrate how to install and configure Spack...

4 years ago

AzureHPC Lustre Marketplace Offer

The AzureHPC Lustre Marketplace offer provides a fast and easy way to deploy a Lustre Filesystem on Azure. The features include:   Deplo...

4 years ago

Mainframe Migration to Microsoft Azure with Intel Architecture on Your Terms.

IntroductionMainframes are still in wide use today for business-critical applications in many industries. According to a 2021 survey by IBM, 7...

4 years ago

Why Organizations are Entrusting Microsoft Cloud with their Mainframes

There is a resurgence of interest and renewed priority to transform core enterprise systems. This resurgence is largely driven by rapidly shif...

4 years ago

Automated HPC/AI compute node health-checks Integrated with the SLURM scheduler

  Overview It is best practice to run health-checks on compute nodes before running jobs, this is especially important for tightly coupl...

4 years ago

GPU Monitoring using Azure Monitor

Overview Today, many highly parallel HPC/AI applications use GPU to improve the run-time performance. It is important to be able to monitor t...

4 years ago

Azure HPC OnDemand Platform: Cloud HPC made easy.

As many customers are looking at running their HPC workloads in the cloud, onboarding effort and cost are key consideration.  As an HPC a...

4 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.