在制作 CUDA 5.0 示例时遇到 Open MPI 相关问题 (Mac OS X ML)

编程入门 行业动态 更新时间:2024-10-08 00:31:12
本文介绍了在制作 CUDA 5.0 示例时遇到 Open MPI 相关问题 (Mac OS X ML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我尝试制作 CUDA 5.0 样本时,会出现错误:

When I'm trying to make CUDA 5.0 samples an error appears:

Makefile:79: * MPI 未找到,未构建 simpleMPI.. 停止.

Makefile:79: * MPI not found, not building simpleMPI.. Stop.

我已尝试下载和构建最新版本的 Open MPI,参考 Open MPI "FAQ/Platforms/OS X/6.如何不使用 OS X 捆绑的 Open MPI?"页面并没有解决错误.

I've tried to download and build the latest version of Open MPI reffering to Open MPI "FAQ / Platforms / OS X / 6. How do I not use the OS X-bundled Open MPI?" page and it did not solve the error.

make -j 4 2>&1 | tee make.out [ lots of output ] make[2]: *** [mpi/man/man3/MPI_Comm_disconnect.3] Error 127 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1

我现在真的很困惑,我不知道该怎么办.

I'm realy confused for now I have no idea what to do.

推荐答案

正如评论中提到的,simpleMPI 示例可以通过使用 make -k 来有效绕过,或者完全删除 simpleMPI 子目录,或者重命名 Makefile在那个目录中.但是,如果希望在 mac 上实际安装 MPI 版本以便能够构建 simpleMPI 示例,这些说明应该会有所帮助:

As mentioned in the comments, the simpleMPI example can be effectively bypassed by using make -k, or else deleting the simpleMPI subdirectory altogether, or renaming the Makefile that is in that directory. However if it is desired to actually install a version of MPI on the mac so as to be able to build the simpleMPI example, these instructions should help:

这里的问题是您没有安装 MPI 编译器.您需要为 Mac OSX 安装 MPICC 编译器.这些说明将使用 MPI 的 MPICH2 版本,该版本通常可用 这里

The issue here is that you don't have the MPI compiler installed. You will need to install the MPICC compiler for Mac OSX. These instructions will use the MPICH2 version of MPI, which is generally available here

直接链接到 MPICH21.4 下载

您可以按照这些说明为 Mac OSX 构建和配置 MPICH2.在配置步骤中,还要添加--disable-f77和--disable-fc:

You can follow these instructions to build and configure MPICH2 for Mac OSX. In the configure step, also add --disable-f77 and --disable-fc:

./configure --enable-shared --enable-sharedlibs=osx-gcc --enable-fast=all --prefix=/usr/local/mpich2-optimized --disable-f77 --disable-fc

然后按照指南说明进行制作,然后进行安装

Then follow the guide instructions to make and then make install

现在创建指向 MPICC 的符号链接,以便您轻松构建 CUDA MPI

Now create symbolic links to MPICC so you can build CUDA MPI easily

sudo ln -s /usr/local/mpich2-optimized/mpicxx /usr/bin/mpicxx sudo ln -s /usr/local/mpich2-optimized/mpic++ /usr/bin/mpic++

另外,另一种选择是添加

Alternatively, another option is to add

/usr/local/mpich2-optimized/bin

到你的路.

现在在制作 simpleMPI 时,它会正确构建.

Now when making simpleMPI, it will properly build.

更多推荐

在制作 CUDA 5.0 示例时遇到 Open MPI 相关问题 (Mac OS X ML)

本文发布于:2023-06-02 01:03:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/430999.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:示例   Open   CUDA   OS   ML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!