Closed Tom-python0121 closed 3 years ago
Sorry, I am confused. Are you saying you are worried that Rscript test-all.R
fails?
Have you tried the standard way to test a package that is documented, (more or less) required, and also used by CRAN where it clearly passes on all test systems (ignore the fact that there are two versions, a new one just arrived with a minute, unrelated configure
update) ? You are supposed to run
R CMD build . # when in the source directory, above use the source-dir name as arg
R CMD check nloptr_*.tar.gz # the resulting source tar ball
Please try that as it is the usual way to test.
@eddelbuettel ,I have done that,but it have failed:
[root@localhost spack-stage-r-nloptr-1.2.1-s4wmhuj3djfft6a67xbdlfdlyrvyvorl]# ls
nloptr_1.2.1.tar.gz spack-build-env.txt spack-build-out.txt spack-configure-args.txt spack-src
[root@localhost spack-stage-r-nloptr-1.2.1-s4wmhuj3djfft6a67xbdlfdlyrvyvorl]# R CMD check nloptr_1.2.1.tar.gz
* using log directory '/home/all_spack_env/spack_stage/root/spack-stage-r-nloptr-1.2.1-s4wmhuj3djfft6a67xbdlfdlyrvyvorl/nloptr.Rcheck'
* using R version 4.0.4 (2021-02-15)
* using platform: aarch64-unknown-linux-gnu (64-bit)
* using session charset: ASCII
* checking for file 'nloptr/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'nloptr' version '1.2.1'
* checking package namespace information ... OK
* checking package dependencies ...Warning: unable to access index for repository https://CRAN.R-project.org/src/contrib:
Line starting '<!DOCTYPE html ...' is malformed!
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 'nloptr' can be installed ... WARNING
Found the following significant warnings:
'config' variable 'CPP' is deprecated
'config' variable 'CXXCPP' is deprecated
See '/home/all_spack_env/spack_stage/root/spack-stage-r-nloptr-1.2.1-s4wmhuj3djfft6a67xbdlfdlyrvyvorl/nloptr.Rcheck/00install.out' for details.
* checking installed package size ... 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 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 shell scripts ... OK
* checking line endings in C/C++/Fortran sources/headers ... NOTE
Found the following sources/headers with CR or CRLF line endings:
inst/include/nloptrAPI.h
Some Unix compilers require LF line endings.
* 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 include directives in Makefiles ... OK
* checking compiled code ... OK
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ... OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
Running 'test-all.R'
ERROR
Running the tests in 'tests/test-all.R' failed.
Last 13 lines of output:
-- Failure (test-hs071.R:96:5): Test HS071. ------------------------------------
`x` not equal to `expected`.
3/4 mismatches (average diff: 5.54e-06)
[2] 4.74 - 4.74 == 6.69e-06
[3] 3.82 - 3.82 == -8.73e-06
[4] 1.38 - 1.38 == 1.21e-06
Backtrace:
x
1. \-testthat::expect_that(res$solution, equals(solution.opt, tolerance = 1e-06)) test-hs071.R:96:4
2. \-testthat:::condition(object)
3. \-testthat::expect_equal(x, expected, ..., expected.label = label)
[ FAIL 3 | WARN 10 | SKIP 0 | PASS 43 ]
Error: Test failures
Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ...
'nloptr.Rmd' using 'UTF-8'... OK
NONE
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE
Status: 1 ERROR, 1 WARNING, 1 NOTE
Well
using platform: aarch64-unknown-linux-gnu (64-bit)
and
-- Failure (test-hs071.R:96:5): Test HS071. ------------------------------------
`x` not equal to `expected`.
3/4 mismatches (average diff: 5.54e-06)
[2] 4.74 - 4.74 == 6.69e-06
[3] 3.82 - 3.82 == -8.73e-06
[4] 1.38 - 1.38 == 1.21e-06
may go hand-in-hand? Maybe some things are different on that platform? I did point you to the CRAN page at https://cran.r-project.org/web/checks/check_results_nloptr.html which looks pretty good for the current version. You may have to put on the hard hat and get down into the mine if you're porting to a new / less supported platform. "It works over here for me" is sadly all I can say on x86_64.
@eddelbuettel You are correct, it did pass the test on x86_64 and may produce error values on the aarch64 platform, which does seem to need to dig deeper. Thank you for letting me know that at least this bug is not caused by the software itself, but by a difference in the platform system. Now that I've confirmed this, I'm going to turn off this issuse.
test nloptr failed.
Steps to reproduce the issue
can you tell me why?