相关内容参考:

https://www.cnblogs.com/devilmaycry812839668/p/15022320.html

=================================================================

docker 容器内安装 nccl  后,测试是否安装成功:

使用  NVIDIA公司官方提供的测试工具: nccl-tests

国内下载地址:

https://gitee.com/devilmaycry812839668/nccl-tests

下载后,进行编译: make

If CUDA is not installed in /usr/local/cuda, you may specify CUDA_HOME.

Similarly, if NCCL is not installed in /usr, you may specify NCCL_HOME.

默认,cuda的安装位置:/usr/local/cuda

默认,nccl的安装位置:/usr

如果cuda和nccl的安装位置不是默认的,而是手动选择其他地方的,那么需要在make的时候配置路径:

$ make CUDA_HOME=/path/to/cuda NCCL_HOME=/path/to/nccl
CUDA_HOME 为 cuda的安装路径。
NCCL_HOME 为 nccl的安装路径。

make 编译后进行简单的例子进行测试nccl是否安装成功。

Quick examples

Run on 8 GPUs (-g 8), scanning from 8 Bytes to 128MBytes :

$ ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 8

Run with MPI on 40 processes (potentially on multiple nodes) with 4 GPUs each :

$ mpirun -np 40 ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 4

(该例子假设系统中已经安装了 openmpi)

这里我们需要修改的示例代码的地方为  -g  ,  如果你有一个显卡,那么就是-g 1  , 如果有四个显卡就是 -g 4

需要注意的是如果有显卡内存不够用(被其他进程调用已经占满),那么需要设置环境变量: export CUDA_VISIBLE_DEVICES="0,1,2,3"

CUDA_VISIBLE_DEVICES 变量用来指定可以用来进行测试的显卡,同时修改-g 后的数值。

假设 1 号显卡已经没有显存,那么设置  export CUDA_VISIBLE_DEVICES="0,2,3"

运行:

./build/all_reduce_perf -b 8 -e 128M -f 2 -g 3
mpirun -np 40 ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 3

===========================================================

在容器中安装  nccl 后使用  nccl-tests  测试后报错:

Failed to init nccl communicator for group

 

init nccl communicator for group nccl_world_group

78244:78465 [0] NCCL INFO Call to connect returned Connection timed out, retrying
78244:78466 [1] NCCL INFO Call to connect returned Connection timed out, retrying
78244:78465 [0] NCCL INFO Call to connect returned Connection timed out, retrying
78244:78466 [1] NCCL INFO Call to connect returned Connection timed out, retrying

很大的可能就是建立容器的时候没有设置允许共享内存:  --ipc=host

解决方案:

重新建立容器,在建立时加入设置:   --ipc=host

形式如:   sudo docker run -it --ipc=host   **************************(其他参数这里不表)

docker容器下安装nccl失败,报错:Failed to init nccl communicator for group,init nccl communicator for group nccl_world_group的更多相关文章

  1. 安装maven工程报错"Failed to execute goal on project...Could not resolve dependencies for project..."

    我在qingcheng_interface中Lifecycle目录下执行install命令后报错"Failed to execute goal on project...Could not ...

  2. docker 容器使用 systemctl 命令是报错

    看了许多解决方案,但是对于新手来说并不友好,不是特别清楚 报错内容: System has not been booted with systemd as init system (PID 1). C ...

  3. window7下安装第三方包报错及解决

    window7 64位下安装第三方包,,比如安装yaml的exe执行文件,会 报错及解决:python version 2.7(3.4) required,which was not found in ...

  4. Linux下安装Tomcat启动报错

    一.报以下错误: Using CATALINA_BASE:   /home/apache-tomcat-7.0.72Using CATALINA_HOME:   /home/apache-tomcat ...

  5. [python]解决Windows下安装第三方插件报错:UnicodeDecodeError: 'ascii' codec can't decode byte 0xcb in position 0:

    系统:win7IDE:pycharm Python版本:2.7 安装第三方插件是报错:  报错原因与编码有关,pip把下载的临时文件存放在了用户临时文件中,这个目录一般是C:\Users\用户名\Ap ...

  6. docker 容器内启动 sshd 启动报错

    创建容器设置密码 安装 openssh-server 启动出错 在容器内 使用 /usr/sbin/sshd -d 启动报错? [root@9d41c7f36c5e tmp]# /usr/sbin/s ...

  7. Windows下安装模块mysqlclient报错处理

    Windows环境下使用pip命令安装Python模块mysqlclientpip install mysqlclient安装过程报错  [error] Microsoft Visual C++ 14 ...

  8. windows环境下安装scrapy框架报错问题--最快捷有效的解决方案

    windows在执行如下命令,安装scrapy的过程中会报错: pip install scrapy 报错分析: windows环境下,会出现如下错误: 1.提示的错误是编译环境的问题,字面意思看需要 ...

  9. 在docker容器下安装airflow

    本人的环境是基于centos7下来安装的 一.安装docker  下载docker安装包,下载地址:https://download.docker.com/linux/static/stable/x8 ...

  10. linux下安装redis组件报错-gcc报错

    报错如图: 1.解决办法    先安装gcc插件.删除redis解压后文件.重新解压

随机推荐

  1. 像 Google SRE 一样 OnCall

    在 Google SRE 的著作<Google运维解密>(原作名:Site Reliability Engineering: How Google Runs Production Syst ...

  2. Scrapy框架(八)--CrawlSpider

    CrawlSpider类,Spider的一个子类 - 全站数据爬取的方式 - 基于Spider:手动请求 - 基于CrawlSpider - CrawlSpider的使用: - 创建一个工程 - cd ...

  3. Mybatis-MySQL 中使用IFNUL

    Mybatis-MySQL 中使用IFNULL(p1,p2)函数但是有一些需要注意的地方. 假设数据 title: student id name age 1 Ann 18 2 Bom 19 3 He ...

  4. insert into 表名 set

    insert into 表名 set CREATE TABLE `tbl_str` ( `id` INT DEFAULT NULL, `Str` VARCHAR(30) DEFAULT NULL ) ...

  5. ps top命令查看内存空间

    [root@VM-4-3-centos local]# ps aux --sort -rss | head USER PID %CPU %MEM VSZ RSS TTY STAT START TIME ...

  6. hbase的优缺点

    一. 一个关于hbase介绍全面的博客地址 https://www.csdn.net/gather_22/MtTaEgysNjYwOS1ibG9n.html 优点: 1,方便高效的压缩数据. 2,支持 ...

  7. 牛客小白月赛96(待F)

    比赛链接:牛客小白月赛96 赛时感受 赛时在前面卡的时间有点长,C题没开longlong wa了n发,D题没考虑负数又wa了n发,然后来写E的时候时间就不长了,匆忙写一次交一发. A 思路 当其中一个 ...

  8. ssh_exchange_identification: Connection closed by remote host 错误解决方案

    问题 今天登陆服务器时候,ssh 后返回 ssh_exchange_identification: Connection closed by remote host 错误,重试了几次,会有一定概率失败 ...

  9. 【JavaScript】聊聊js中关于this的指向

    前言 最近在看回JavaScript的面试题,this 指向问题是入坑前端必须了解的知识点,现在迎来了ES6+的时代,因为箭头函数的出现,所以感觉有必要对 this 问题梳理一下,所以刚好总结一下Ja ...

  10. 200 行 ,一个PYQT 窗口 + 后台 AIOHTTP 服务 , 例子

    直接上代码 import sys from typing import Dict, List from aiohttp import web import asyncio from functools ...