Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Using NVCC compiler options results in g++ unrecognized command line option #31

Open
ian-bertolacci opened this issue Jul 10, 2019 · 1 comment

Comments

@ian-bertolacci
Copy link

I'm trying a work-around for an issue (#1944) and thought that explicitly setting the gpu architecture and code flags in nvcc_wrapper might help.
However, nvcc_wrapper does not seem to be passing the arguments to what-ever correctly.

In particular, I am trying to set the --gpu-architecture and --gpu-code flags.
From nvcc_wrapper, it appears that both the space and equals sign (an issue in #17) should be handled.
I have tried both with about the same result.

using --gpu-architecture=sm_50 --gpu-code=sm_50

> nvcc_wrapper --expt-extended-lambda -D_FORCE_INLINES -D_MWAITXINTRIN_H_INCLUDED ../src/*.cpp ../src/simple_whole_kokkos/*.cpp -I../src -I../src/simple_whole_kokkos -lkokkos -ldl -lpthread -fopenmp --std=c++11 -DUSE_CUDA --gpu-architecture=sm_50 --gpu-code=sm_50
g++-5: error: unrecognized command line option ‘--gpu-architecture=sm_50’
g++-5: error: unrecognized command line option ‘--gpu-code=sm_50’

using --gpu-architecture sm_50 --gpu-code sm_50:

> nvcc_wrapper --expt-extended-lambda -D_FORCE_INLINES -D_MWAITXINTRIN_H_INCLUDED ../src/*.cpp ../src/simple_whole_kokkos/*.cpp -I../src -I../src/simple_whole_kokkos -lkokkos -ldl -lpthread -fopenmp --std=c++11 -DUSE_CUDA --gpu-architecture sm_50 --gpu-code sm_50
g++-5: error: sm_50: No such file or directory
g++-5: error: sm_50: No such file or directory
g++-5: error: unrecognized command line option ‘--gpu-architecture’
g++-5: error: unrecognized command line option ‘--gpu-code’

I've also tried using them in different locations in the command (thinking it was an argument ordering context issue), and with different orderings with respect to each other with no change.

@ibaned
Copy link
Contributor

ibaned commented Aug 19, 2019

It is possible that the script only recognizes the short forms (-arch instead of --gpu-architecture)

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

No branches or pull requests

2 participants