0
1

More than 1 year has passed since last update.

Deepspeedの「unhandled system error, NCCL version 2.7.8」の対処法

Posted at

症状

DeepspeedをDockerコンテナを使ってマルチGPUで学習しようとしたところ,以下のようなエラーを出して止まってしまった.

RuntimeError: NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:825, unhandled system error, NCCL version 2.7.8
ncclSystemError: System call (socket, malloc, munmap, etc) failed.

当初,nccl系のエラーだと思いバージョンを変えてみたが,改善しなかった.

解決方法

どうやら,Dockerコンテナに割り当てられているshared memoryが64MBと少なすぎたのが原因っぽい.わりあてられているめもりりょうはコンテナ内で以下を実行するとshmの行から確認できる.

$ df -h
shm              64M     0   64M   0% /dev/shm

なので,Dockerコンテナを起動させるときのコマンドで下記のように割り当てるメモリ量を増やすと解決した.

docker run --rm --it --gpus all \
    --shm-size=1g \
    --hoge:latest
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1