在Ubuntu 12.04上构建支持CUDA的openMPI找不到cuda.h [英] Building CUDA-aware openMPI on Ubuntu 12.04 cannot find cuda.h
问题描述
我在Ubuntu 12.04上构建了openMPI 1.8.5,并安装了CUDA 6.5并使用默认样本进行测试。我打算在具有以下配置的单个节点上运行:
I am building openMPI 1.8.5 on Ubuntu 12.04 with CUDA 6.5 installed and tested with default samples. I intend to run it on a single node with following configuration:
Dell Precision T7400
双Xeon X5450
Nvidia GT730 / Tesla C1060
Dell Precision T7400
Dual Xeon X5450
Nvidia GT730/Tesla C1060
发出的配置命令为
The configure command issued was
$ ./configure --prefix=/usr --with-cuda=/usr/local/cuda
在生成的config.log中,很明显配置脚本找不到/ usr / loca / cuda / include中的cuda.h和cuda_runtime_api.h,它们确实存在。
In the generated config.log, it is clear the the configure script was not able to find cuda.h and cuda_runtime_api.h in /usr/loca/cuda/include, which do exist.
对于cuda.h:
For cuda.h:
configure:73774: checking cuda.h usability
configure:73774: gcc -std=gnu99 -c -O3 -DNDEBUG conftest.c >&5
conftest.c:645:18: fatal error: cuda.h: No such file or directory
compilation terminated.
configure:73774: $? = 1
configure: failed program was:
| /* confdefs.h */
对于cuda_runtime_api.h:
For cuda_runtime_api.h:
configure:73857: checking cuda_runtime_api.h presence
configure:73857: gcc -E conftest.c
conftest.c:612:30: fatal error: cuda_runtime_api.h: No such file or directory
compilation terminated.
configure:73857: $? = 1
configure: failed program was:
| /* confdefs.h */
我试图将路径更改为特定于版本的目录, usr / loca / cuda-6.5 / cuda,但引发了相同的错误。
I tried to change the path to version-specific directory, i.e. /usr/loca/cuda-6.5/cuda but same error was thrown.
我试图继续安装,ompi_info给了
I tried to proceed to install, and the ompi_info gave
mca:mpi:base:param:mpi_built_with_cuda_support:value:false
有没有人有类似的经验,可以帮助我吗?非常感谢!
Does anybody had similar experience that can help me out? Many thanks!
推荐答案
好的,我想我解决了这个问题。 conftest.c似乎在/ usr / include中寻找cuda.h,而不是假定的/ usr / local / cuda / include。一旦我创建了一个软链接cuda.h和cuda_runtime_api.h,问题就解决了。
OK, I think I fixed the problem. The conftest.c seems to be looking for cuda.h in /usr/include, instead of the supposed /usr/local/cuda/include. The problem is solved once I created a soft link of cuda.h and cuda_runtime_api.h.
这篇关于在Ubuntu 12.04上构建支持CUDA的openMPI找不到cuda.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!