0
编译项目时使用nvcc(使用cuda 3.1),我得到了来自gthr-default.h的大量警告: nvcc/cuda 3.1 - ghtr-default.h洪水中的“声明静态”但未定义的警告
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/x86_64-redhat-linux/bits/gthr-default.h:118: warning: ‘int __gthrw_pthread_once(pthread_once_t*, void (*)())’ declared ‘static’ but never defined
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/x86_64-redhat-linux/bits/gthr-default.h:119: warning: ‘void* __gthrw_pthread_getspecific(pthread_key_t) throw()’ declared ‘static’ but never defined
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/x86_64-redhat-linux/bits/gthr-default.h:120: warning: ‘int __gthrw_pthread_setspecific(pthread_key_t, const void*) throw()’ declared ‘static’ but never defined
我已经挖遍了所有,似乎无法找到一种方法来抑制这种噪音,短缺删除-Wall,我真的不想做。这对任何人都很熟悉吗?
我CXXFLAGS是:
CXXFLAGS=-Isrc -I../cxxtest -I$(CUDA_INCLUDE_DIR) -Xcompiler -O2 -Xcompiler -Wall
我试着加入$(CUDA_INCLUDE_DIR)到-Xcompiler选项,以及,但无济于事。我不想从设置中删除Wall ...还有其他选项吗?
不幸的是,我没有任何并行线程的代码 - 或者至少,没有特别#包括在内。任何正在进行的线程都是nvcc在后台执行某些操作的结果... – trycatch
代码中的某些内容正在拉动gthr-default.h。尝试发布您的代码。或者只是尝试更新的CUDA版本,例如4.0。 – Tom