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

Enable compilation with older g++ #17

Merged
merged 1 commit into from
Apr 21, 2016
Merged

Enable compilation with older g++ #17

merged 1 commit into from
Apr 21, 2016

Conversation

Hopobcn
Copy link
Contributor

@Hopobcn Hopobcn commented Apr 12, 2016

In CUDA 7.5 nvcc only supports up to g++ 4.9 therefore in systems where g++ expands to g++-5 -ccbin=g++-4.9 has to be provided to nvcc.

If not the compiler fails:

$ make
Grabbing  src/nccl.h                > build/include/nccl.h     
Compiling src/libwrap.cu            > build/obj/libwrap.o      
Compiling src/core.cu               > build/obj/core.o         
Compiling src/all_gather.cu         > build/obj/all_gather.o   
/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_00003a6e_00000000-13_all_gather.compute_52.cpp1.ii".
Makefile:101: recipe for target 'build/obj/all_gather.o' failed
make: *** [build/obj/all_gather.o] Error 2

With my changes you may compile using:
GPP=g++-4.9 make CUDA_HOME=<cuda install path> test

@nluehr nluehr merged commit 658aca1 into NVIDIA:master Apr 21, 2016
@root29
Copy link

root29 commented Jun 5, 2018

I use 'GPP=g++-4.9 make CUDA_HOME=</usr/local/cuda> test'
but still error. Do you know the reason? Thanks!

@sjeaugey
Copy link
Member

sjeaugey commented Jun 5, 2018

GPP is no longer defined in the makefile, it has been replaced by the standard CXX.

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

Successfully merging this pull request may close these issues.

4 participants