染念Blog

这个问题发生在如果你安装了mpich。
mpich是一个神奇的mpi实现,神奇在哪里呢?
这个问题在国内国外没有一个人指出答案,希望后续有人搜到,能够帮助到你。

mpich神奇在于如果我们安装了CUDA或者HIP,它对于GPU是默认自动启动支持的。
当初在跟随网上教程【以后还得看官方文档,网上这些人研究得太不仔细了】,就没有人说...

GPU support is automatically enabled if CUDA, ZE, or HIP runtime is
detected during configure. To specify where your GPU runtime is
installed, use:--with-cuda=<path> or --with-ze=<path> or --with-hip=<path>(我认为在这要指定是因为cuda这些安装不是正常位置,安装程序没有找到)

If the lib/ and include/ are not in the same path, both can be specified
separately, for example: --with-cuda-include= and --with-cuda-lib=

In addition, GPU support can be explicitly disabled by using:--without-cuda or --without-ze or --without-hip(如果当初加了这个指令,就根本没有GPU的事情了)

默认启动了GPU支持,如果我们在跑MPI例子,没有和cuda联动,那么很恭喜会神奇出现如标题的问题,GPU初始化失败,这个时候只需要增加一个环境变量:MPIR_CVAR_ENABLE_GPU=0就能解君愁。

环境配置 高性能

版权属于:染念
作品采用:本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
更新于: 2023年10月13日 15:41
1
发表评论

目录

来自 《MPICH:MPII_Init_thread(222): gpu_init failed》
173 文章数
645 评论量
4 分类数
177 页面数
已在风雨中度过 6年269天13小时48分
© 2023 染念Blog
浙ICP备19020194号-1
© 2023 染念Blog
浙ICP备19020194号-1