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

Is it possible to compile completely using clang? #76

Open
kayaercument opened this issue Oct 2, 2021 · 0 comments
Open

Is it possible to compile completely using clang? #76

kayaercument opened this issue Oct 2, 2021 · 0 comments

Comments

@kayaercument
Copy link

Dear all,

I'm trying to compile CUDA versions completely using clang and I'm facing some issues.

For example, original compilation sequence of level0 is below:
`clang++ -DHAVE_CONFIG_H -I. -I../../../config -I/usr/include -I../../../src/cuda/common -I../../../src/common -I../../../config -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o ./../common/main.cpp

mv -f .deps/main.Tpo .deps/main.Po
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c BusSpeedDownload.cu
clang++ -L../../../src/cuda/common -L../../../src/common -o BusSpeedDownload main.o BusSpeedDownload.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt

/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c BusSpeedReadback.cu
clang++ -L../../../src/cuda/common -L../../../src/common -o BusSpeedReadback main.o BusSpeedReadback.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt

/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c DeviceMemory.cu
clang++ -L../../../src/cuda/common -L../../../src/common -o DeviceMemory main.o DeviceMemory.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt

/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c MaxFlops.cu
clang++ -L../../../src/cuda/common -L../../../src/common -o MaxFlops main.o MaxFlops.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt`

And my attempt to compile it using clang is like this:

`clang++ MaxFlops.cu -I../../../src/cuda/common -I../../../src/common -I../../../config -L/usr/local/cuda-10.0/lib64 --cuda-gpu-arch=sm_61 --cuda-path=/usr/local/cuda-10.0 -lcudart_static -ldl -lrt -pthread -c

clang++ -L../../../src/cuda/common -L../../../src/common -o MaxFlops main.o MaxFlops.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
`

I got error as: "undefined reference to `__cudaPushCallConfiguration'"

Is there any way to fix it?

Thank you for your time.

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

1 participant