gpuR icon indicating copy to clipboard operation
gpuR copied to clipboard

R CMD check error on matrix initialization

Open nfultz opened this issue 5 years ago • 2 comments

I'm doing some benchmarking on our new cluster, got a few test failures on R CMD check on vclMatrix initialization. 00check.log is attached.

  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 1802 | SKIPPED: 160 | WARNINGS: 0 | FAILED: 7 ]
  1. Error: gpuMatrix Integer Precision Sum (@test_gpuMatrix_row_col.R#41) 
  2. Failure: Non-Shared memory between vclMatrix & vclVector (@test_shared_memory.R#69) 
  3. Error: vclMatrix complex float class initializer (@test_vclMatrix_classes.R#22) 
  4. Error: vclMatrix complex double class initializer (@test_vclMatrix_classes.R#38) 
  5. Error: vclMatrix integer scalar initializers (@test_vclMatrix_classes.R#156) 
  6. Error: vclMatrix Integer Precision Sum (@test_vclMatrix_row_col.R#43) 
  7. Failure: vclMatrix set matrix access (@test_vclMatrix_utils.R#272) 

Here's our sessionInfo() also.

R version 3.6.2 (2019-12-12)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 8 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2   

00check.log

nfultz avatar Mar 02 '20 18:03 nfultz

Interesting, I'm not sure what is exactly happening. Could you try doing any of those tests directly to see more details of an exact error?

cdeterman avatar Apr 03 '20 14:04 cdeterman

Able to reproduce on one test - https://github.com/cdeterman/gpuR/blob/master/tests/testthat/test_gpuMatrix_algebra.R#L503

It crashes when run through testthat but not when run line-by-line in the console. here is the error message testthat prints:

gpuMatrix algebraR: /home/nfultz/R/x86_64-redhat-linux-gnu-library/3.6/RViennaCL/include/viennacl/ocl/kernel.hpp:232: void viennacl::ocl::kernel::arg(unsigned int, const VCL_TYPE&) [with VCL_TYPE = viennacl::matrix_range<viennacl::matrix<int, viennacl::row_major, 1> >]: Assertion `&val.handle().opencl_handle().context() == &handle_.context() && bool("Kernel and memory object not in the same context!")' failed.

nfultz avatar Apr 13 '20 20:04 nfultz