R CMD 使用 CUDA *.cu 文件检查警告
R CMD check warning with CUDA *.cu files
我正在构建 tiny R package that uses Rcpp and CUDA. It's a learning exercise to help me build a bigger package to submit to Bioconductor. The package installs and runs just fine on the Linux machine I describe in 。但是,当我 运行 R CMD check
在 tarball 上时,我收到警告。
$ R CMD check rcppcuda_0.0.tar.gz
* using log directory ‘/home/landau/rcppcuda.Rcheck’
* using R version 3.2.0 (2015-04-16)
* using platform: x86_64-unknown-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘rcppcuda/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘rcppcuda’ version ‘0.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... WARNING
Subdirectory ‘src’ contains:
someCUDAcode.cu
These are unlikely file names for src files.
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘rcppcuda’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... OK
* checking examples ... NONE
* checking PDF version of manual ... OK
* DONE
Status: 1 WARNING
See
‘/home/landau/rcppcuda.Rcheck/00check.log’
for details.
$
这个警告,也出现在我正在构建的更大的包中,阻止我提交到 Bioconductor。 R CMD check
中的警告自动取消我的资格。遗憾的是,nvcc
要求每个 CUDA 文件都有一个 .cu
扩展名,因此我无法将 *.cu
重命名为 *.c
或 *.cpp
。有谁知道如何告诉 R *.cu
文件是合法的源文件?
虽然 nvcc 的默认行为是自动从文件扩展名推断语言(以便 CUDA 代码预计包含在 .cu
扩展文件中),但这不是固定要求。 nvcc 支持 -x
标志来为给定的编译单元手动设置语言,因此您可以使用传递 -x cu
到包含扩展名为 .cpp
的 CUDA 代码的源文件,并且编译将正常工作.
从可维护性的角度来看,这是否可取是您必须做出的决定。但它应该可以解决您眼前的问题。
我正在构建 tiny R package that uses Rcpp and CUDA. It's a learning exercise to help me build a bigger package to submit to Bioconductor. The package installs and runs just fine on the Linux machine I describe in R CMD check
在 tarball 上时,我收到警告。
$ R CMD check rcppcuda_0.0.tar.gz
* using log directory ‘/home/landau/rcppcuda.Rcheck’
* using R version 3.2.0 (2015-04-16)
* using platform: x86_64-unknown-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘rcppcuda/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘rcppcuda’ version ‘0.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... WARNING
Subdirectory ‘src’ contains:
someCUDAcode.cu
These are unlikely file names for src files.
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘rcppcuda’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... OK
* checking examples ... NONE
* checking PDF version of manual ... OK
* DONE
Status: 1 WARNING
See
‘/home/landau/rcppcuda.Rcheck/00check.log’
for details.
$
这个警告,也出现在我正在构建的更大的包中,阻止我提交到 Bioconductor。 R CMD check
中的警告自动取消我的资格。遗憾的是,nvcc
要求每个 CUDA 文件都有一个 .cu
扩展名,因此我无法将 *.cu
重命名为 *.c
或 *.cpp
。有谁知道如何告诉 R *.cu
文件是合法的源文件?
虽然 nvcc 的默认行为是自动从文件扩展名推断语言(以便 CUDA 代码预计包含在 .cu
扩展文件中),但这不是固定要求。 nvcc 支持 -x
标志来为给定的编译单元手动设置语言,因此您可以使用传递 -x cu
到包含扩展名为 .cpp
的 CUDA 代码的源文件,并且编译将正常工作.
从可维护性的角度来看,这是否可取是您必须做出的决定。但它应该可以解决您眼前的问题。