Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCCL_HOME set, and still nccl.h: No such file or directory #81

Closed
WurmD opened this issue Apr 5, 2021 · 5 comments
Closed

NCCL_HOME set, and still nccl.h: No such file or directory #81

WurmD opened this issue Apr 5, 2021 · 5 comments

Comments

@WurmD
Copy link

WurmD commented Apr 5, 2021

$ git clone https://github.com/NVIDIA/nccl.git
$ git clone https://github.com/NVIDIA/nccl-tests.git
$ cd nccl-tests
$ make MPI=1 NCCL_HOME=/home/dario/nccl/src 

make -C src build
make[1]: Entering directory '/mnt/home/dario/nccl-tests/src'
Compiling  all_reduce.cu                       > ../build/all_reduce.o
In file included from all_reduce.cu:8:0:
common.h:9:10: fatal error: nccl.h: No such file or directory
 #include "nccl.h"
          ^~~~~~~~
compilation terminated.
Makefile:82: recipe for target '../build/all_reduce.o' failed
make[1]: *** [../build/all_reduce.o] Error 1
make[1]: Leaving directory '/mnt/home/dario/nccl-tests/src'
Makefile:17: recipe for target 'src.build' failed
make: *** [src.build] Error 2

What now?

@kwen2501
Copy link

kwen2501 commented Apr 5, 2021

If NCCL is built under the same folder where you clone it, then nccl.h should be under the build subfolder rather than the src subfolder. Thus, you can use the command: make -j MPI=1 NCCL_HOME=/home/dario/nccl/build

@WurmD
Copy link
Author

WurmD commented Apr 6, 2021

cd ~/nccl
make -j src.build
cd ~/nccl-tests
make MPI=1 NCCL_HOME=/home/dario/nccl/build MPI_HOME=/usr/lib/x86_64-linux-gnu/openmpi

success ^_^

@WurmD WurmD closed this as completed Apr 6, 2021
@XiaoqingNLP
Copy link

@WurmD I am used the lastest nccl version and found that my nccl.h file path is ./build/include/nccl.h. How can I deal this problem ?

@sjeaugey
Copy link
Member

What is the problem? nccl.h being under include/ is expected.

If you compile NCCL tests with NCCL_HOME=/path/to/nccl/build then the build will include -I $NCCL_HOME/include so it should find nccl.h.

@XiaoqingNLP
Copy link

XiaoqingNLP commented Jun 17, 2022

@sjeaugey Thank you, I have solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants