Coder Social home page Coder Social logo

jong980812 / slurm_multinode_ddp Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 219 KB

This helps you to submit job with multinode & multgpu in Slurm in Torchrun

Shell 82.57% Python 17.43%
ddp multinode pytorch multigpu slurm slurm-cluster distributed-data-pa distributed-launch slurm-multi-gpu slurm-multi-job

slurm_multinode_ddp's Introduction

Slurm MultiNode

This repository facilitates job submission with multi-node and multi-GPU configurations in Slurm using Torchrun.

Overview

This repository provides scripts that are helpful when using multinode with PyTorch DDP module in Slurm. It consists of master.sh and original.sh, where master.sh submits original.sh for each node. The example involves using a total of 32 GPUs across 4 nodes, each with 8 GPUs. The scripts offer color coding for sanity checks and also include a memo feature.

대체 텍스트

Contents

Environment

  • Slurm Version: 21.08.8-2
  • Pytorch Version: Recommended 1.8 and above
  • Ubuntu Version: 20.04.5 LTS

NCCL Setting

Handling "NCCL WARN Bootstrap: no socket interface found" Error

Ensure proper socket naming by following the instructions provided in the repository.

Setting the Appropriate Interface for Distributed Launch

If you intend to use distributed launch, set the "appropriate interface" for your environment. You can check your available interfaces using the following commands:

$ ifconfig
or
$ /sbin/ifconfig -a

The chosen Ethernet Interface name should have both inet6 and broadcast properties. This socket name will be used later, so carefully note your interface name.

Examples of Interface Information (ifconfig)

en***: flags=****<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet <inet ip>  netmask 255.255.255.0  broadcast <broadcast add>
        inet6 f****::****:****:****:****  prefixlen 64  scopeid 0x20<link>
        ether **:36:**:**:**:**  txqueuelen 1000  (Ethernet)
        RX packets 16632361209  bytes 24172178960947 (24.1 TB)
        RX errors 0  dropped 43641438  overruns 0  frame 0
        TX packets 16585505941  bytes 24290665224417 (24.2 TB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Choose the Ethernet Interface name with inet6 and broadcast properties for later use.

To set the NCCL_SOCKET_IFNAME, use the chosen Ethernet interface name.

For example:

export NCCL_SOCKET_IFNAME=en***

References

  1. Nvidia Environment Variables Official Docs
  2. Linux Commands about Net interface

Feel free to enhance the design for improved clarity and aesthetics.

slurm_multinode_ddp's People

Contributors

jong980812 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.