Building CUDA-aware openMPI on Ubuntu 12.04 cannot find cuda.h

纵饮孤独 提交于 2020-01-06 14:52:54

问题


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
Dual Xeon X5450
Nvidia GT730/Tesla C1060

The configure command issued was

    $ ./configure --prefix=/usr --with-cuda=/usr/local/cuda

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.

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 */

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 */

I tried to change the path to version-specific directory, i.e. /usr/loca/cuda-6.5/cuda but same error was thrown.

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!


回答1:


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.



来源:https://stackoverflow.com/questions/30607733/building-cuda-aware-openmpi-on-ubuntu-12-04-cannot-find-cuda-h

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!