nvcc fatal : 未知选项 '--threads'
nvcc fatal : Unknown option '--threads'
我已经安装了 CUDA-11.3 和 NVIDIA 驱动程序版本 465,CMAKE 版本 3.16.3。
我试图编译工具包中包含的示例来验证安装,但出现以下错误。
make[1]: Entering directory '/home/user/NVIDIA_CUDA-11.3_Samples/0_Simple/simpleSeparateCompilation'
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../common/inc -m64 -dc --threads 0 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o simpleDeviceLibrary.o -c simpleDeviceLibrary.cu
nvcc fatal : Unknown option '--threads'
make[1]: *** [Makefile:321: simpleDeviceLibrary.o] Error 1
make[1]: Leaving directory '/home/user/NVIDIA_CUDA-11.3_Samples/0_Simple/simpleSeparateCompilation'
make: *** [Makefile:51: 0_Simple/simpleSeparateCompilation/Makefile.ph_build] Error 2
--threads
选项(控制 nvcc
将在编译期间尝试生成的线程数)仅添加到 nvcc
11.3。
OP 无意中使用 nvcc
11.1 尝试使用提供的 Makefile 编译来自 CUDA 11.3 工具包的示例,其中包括此选项。这导致无法识别的选项错误和构建失败。
如果您遇到此问题,请仔细检查您的编译器是否足够新以接受此编译器选项,并且搜索 paths/symlinks/modulefiles 等是否确实已更新以指向该编译器版本。
我已经安装了 CUDA-11.3 和 NVIDIA 驱动程序版本 465,CMAKE 版本 3.16.3。 我试图编译工具包中包含的示例来验证安装,但出现以下错误。
make[1]: Entering directory '/home/user/NVIDIA_CUDA-11.3_Samples/0_Simple/simpleSeparateCompilation'
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../common/inc -m64 -dc --threads 0 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o simpleDeviceLibrary.o -c simpleDeviceLibrary.cu
nvcc fatal : Unknown option '--threads'
make[1]: *** [Makefile:321: simpleDeviceLibrary.o] Error 1
make[1]: Leaving directory '/home/user/NVIDIA_CUDA-11.3_Samples/0_Simple/simpleSeparateCompilation'
make: *** [Makefile:51: 0_Simple/simpleSeparateCompilation/Makefile.ph_build] Error 2
--threads
选项(控制 nvcc
将在编译期间尝试生成的线程数)仅添加到 nvcc
11.3。
OP 无意中使用 nvcc
11.1 尝试使用提供的 Makefile 编译来自 CUDA 11.3 工具包的示例,其中包括此选项。这导致无法识别的选项错误和构建失败。
如果您遇到此问题,请仔细检查您的编译器是否足够新以接受此编译器选项,并且搜索 paths/symlinks/modulefiles 等是否确实已更新以指向该编译器版本。