stephenslab / mashr

An R package for multivariate adaptive shrinkage.
https://stephenslab.github.io/mashr
Other
88 stars 19 forks source link

A test failed on cran comparing R and C++ result #82

Closed gaow closed 3 years ago

gaow commented 4 years ago

Currently our unit test on cran has this issue under OpenBLAS

image

the error message reads:

* using log directory ‘/data/gannet/ripley/R/packages/tests-OpenBLAS/mashr.Rcheck’
* using R Under development (unstable) (2020-06-10 r78681)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-stop-on-test-error’
* checking for file ‘mashr/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘mashr’ version ‘0.2.28’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* 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 ‘mashr’ can be installed ... [92s/105s] OK
* checking package directory ... OK
* checking ‘build’ 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 use of S3 registration ... OK
* checking dependencies in R code ... NOTE
Namespace in Imports field not imported from: ‘mixsqp’
  All declared Imports should be used.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [17s/24s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... 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 shell scripts ... 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 use of PKG_*FLAGS in Makefiles ... OK
* checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compilation flags used ... OK
* checking compiled code ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... [18s/23s] OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’ [70s/100s]
 [70s/101s] ERROR
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mashr)
  Loading required package: ashr
  > test_check("mashr")
  ── 1. Failure: compare posterior computation R vs C++ in provided data of 100 X 
  `out1` not equal to `out2`.
  Component "PosteriorSD": Mean relative difference: 0.01556414

  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 125 | SKIPPED: 3 | WARNINGS: 0 | FAILED: 1 ]
  1. Failure: compare posterior computation R vs C++ in provided data of 100 X 5 (@test_cpp_computation.R#97) 

  Error: testthat unit tests failed
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking re-building of vignette outputs ... [111s/145s] OK
* checking PDF version of manual ... OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE

Status: 1 ERROR, 1 NOTE
See
  ‘/data/gannet/ripley/R/packages/tests-OpenBLAS/mashr.Rcheck/00check.log’
for details.

Command exited with non-zero status 1
Time 8:07.69, 353.51 + 19.30

It is using an R version that is "under development", and we cannot reproduce it on our end (using R 3.6.3 for my case). I keep track of this issue here for future reference.

pcarbo commented 4 years ago

Also could not reproduce with R 4.0.0 + OpenBLAS on midway2.