[Rd] R 4.1.x make check fails, stats-Ex.R, step factor reduced below minFactor
peter dalgaard
pd@|gd @end|ng |rom gm@||@com
Fri Oct 1 13:14:19 CEST 2021
On Mac, I also don't get the error, but I think this is a different issue.
If I remember correctly, the error is known to occur on some platforms, but not all, which is the reason for the ## IGNORE_RDIFF_BEGIN ... END.
However _when_ it occurs, R should just print the error and continue. If it doesn't, something is up. One possible reason is that something has been playing with options(error=), e.g. in a start-up file.
-pd
> On 1 Oct 2021, at 12:03 , Sebastian Meyer <seb.meyer using fau.de> wrote:
>
> For what it's worth, make check runs OK for me with sessionInfo()
>
> R version 4.1.1 Patched (2021-09-30 r80997)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 18.04.6 LTS
>
> Matrix products: default
> BLAS: /home/smeyer/R/base/release/build/lib/libRblas.so
> LAPACK: /home/smeyer/R/base/release/build/lib/libRlapack.so
>
> The output of these examples is:
>
>>> try(nlm1 <- update(nlmod, control = list(tol = 1e-7))) # where central diff. work here:
>> Warning in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", :
>> No starting values specified for some parameters.
>> Initializing ‘Const’, ‘A’, ‘B’ to '1.'.
>> Consider specifying 'start' or using a selfStart model
>> Error in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", : step factor 0.000488281 reduced below 'minFactor' of 0.000976562
>>> (nlm2 <- update(nlmod, control = list(tol = 8e-8, nDcentral=TRUE), trace=TRUE))
>> Warning in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", :
>> No starting values specified for some parameters.
>> Initializing ‘Const’, ‘A’, ‘B’ to '1.'.
>> Consider specifying 'start' or using a selfStart model
>> 1017460.306 (4.15e+02): par = (1 1 1)
>> 758164.7503 (2.34e+02): par = (13.42031396 1.961485 0.05947543745)
>> 269506.3537 (3.23e+02): par = (51.75719817 -13.09155958 0.8428607712)
>> 68969.21891 (1.03e+02): par = (76.0006985 -1.93522675 1.0190858)
>> 633.3672224 (1.29e+00): par = (100.3761515 8.624648408 5.104490252)
>> 151.4400170 (9.39e+00): par = (100.6344391 4.913490999 0.2849209664)
>> 53.08739445 (7.24e+00): par = (100.6830407 6.899303393 0.4637755095)
>> 1.344478582 (5.97e-01): par = (100.0368306 9.897714144 0.5169294926)
>> 0.9908415908 (1.55e-02): par = (100.0300625 9.9144191 0.5023516843)
>> 0.9906046057 (1.84e-05): par = (100.0288724 9.916224018 0.5025207336)
>> 0.9906046054 (9.94e-08): par = (100.028875 9.916228366 0.50252165)
>> 0.9906046054 (5.00e-08): par = (100.028875 9.916228377 0.5025216525)
>> Nonlinear regression model
>> model: y ~ Const + A * exp(B * x)
>> data: parent.frame()
>> Const A B 100.0288750 9.9162284 0.5025217 residual sum-of-squares: 0.9906046
>
> Running with example(nls) in an interactive session gives the extra output
>
>> Number of iterations to convergence: 11 Achieved convergence tolerance: 4.996813e-08
>
> (when the "show.nls.convergence" option is not set to FALSE. It is set to FALSE in SSasymp.Rd but not reset at the end.)
>
> Best regards,
>
> Sebastian
>
>
> Am 01.10.21 um 11:01 schrieb Andrew Piskorski:
>> I recently built R 4.1.1 (Patched) from source, as I have many older
>> versions over the years. This version, on Ubuntu 18.04.4 LTS:
>> R 4.1.1 (Patched), 2021-09-21, svn.rev 80946, x86_64-pc-linux-gnu
>> Surprisingly, "make check" fails, which I don't recall seeing before.
>> The error is in from stats-Ex.R, which unfortunately terminates all
>> further testing! This particular error, "step factor ... reduced
>> below 'minFactor'" does not seem very serious, but I can't figure out
>> why it's happening.
>> I installed with "make install install-tests" as usual, which seemed
>> to work fine. Running the same tests after install, I'm able to get
>> more coverage by using errorsAreFatal=FALSE. However, it seems the
>> rest of the 'stats' tests after the bad one still do not run.
>> I'm confused about the intent of this particular test. The comment
>> above it seems to says that it's SUPPOSED to throw this error, yet
>> getting the error still terminates further testing, which seems
>> strange. What's supposed to happen here?
>> Any ideas on why this error might be occurring, and how I should debug
>> it? What's the right way for me to disable this one failing test, so
>> the ones after it can run?
>> Thanks for your help!
>> ## "make check" output:
>> make[1]: Entering directory '/home/nobackup/co/R/R-4-1-branch/Build-x86_64/tests'
>> make[2]: Entering directory '/home/nobackup/co/R/R-4-1-branch/Build-x86_64/tests'
>> make[3]: Entering directory '/home/nobackup/co/R/R-4-1-branch/Build-x86_64/tests/Examples'
>> Testing examples for package 'base'
>> Testing examples for package 'tools'
>> comparing 'tools-Ex.Rout' to 'tools-Ex.Rout.save' ... OK
>> Testing examples for package 'utils'
>> Testing examples for package 'grDevices'
>> comparing 'grDevices-Ex.Rout' to 'grDevices-Ex.Rout.save' ... OK
>> Testing examples for package 'graphics'
>> comparing 'graphics-Ex.Rout' to 'graphics-Ex.Rout.save' ... OK
>> Testing examples for package 'stats'
>> Error: testing 'stats' failed
>> Execution halted
>> Makefile:37: recipe for target 'test-Examples-Base' failed
>> make[3]: *** [test-Examples-Base] Error 1
>> make[3]: Leaving directory '/home/nobackup/co/R/R-4-1-branch/Build-x86_64/tests/Examples'
>> ../../tests/Makefile.common:198: recipe for target 'test-Examples' failed
>> make[2]: *** [test-Examples] Error 2
>> make[2]: Leaving directory '/home/nobackup/co/R/R-4-1-branch/Build-x86_64/tests'
>> ../../tests/Makefile.common:184: recipe for target 'test-all-basics' failed
>> make[1]: *** [test-all-basics] Error 1
>> make[1]: Leaving directory '/home/nobackup/co/R/R-4-1-branch/Build-x86_64/tests'
>> Makefile:305: recipe for target 'check-all' failed
>> make: *** [check-all] Error 2
>> ## From file: tests/Examples/stats-Ex.Rout.fail
>>> ## Here, requiring close convergence, you need to use more accurate numerical
>>> ## differentiation; this gives Error: "step factor .. reduced below 'minFactor' .."
>>> options(digits = 10) # more accuracy for 'trace'
>>> ## IGNORE_RDIFF_BEGIN
>>> try(nlm1 <- update(nlmod, control = list(tol = 1e-7))) # where central diff. work here:
>> Warning in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", :
>> No starting values specified for some parameters.
>> Initializing 'Const', 'A', 'B' to '1.'.
>> Consider specifying 'start' or using a selfStart model
>>> (nlm2 <- update(nlmod, control = list(tol = 8e-8, nDcentral=TRUE), trace=TRUE))
>> Warning in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", :
>> No starting values specified for some parameters.
>> Initializing 'Const', 'A', 'B' to '1.'.
>> Consider specifying 'start' or using a selfStart model
>> 1017460.306 (4.15e+02): par = (1 1 1)
>> 758164.7503 (2.34e+02): par = (13.42031396 1.961485 0.05947543745)
>> 269506.3538 (3.23e+02): par = (51.75719816 -13.09155957 0.8428607709)
>> 68969.21893 (1.03e+02): par = (76.0006985 -1.935226745 1.0190858)
>> 633.3672230 (1.29e+00): par = (100.3761515 8.624648402 5.104490259)
>> 151.4400218 (9.39e+00): par = (100.6344391 4.913490985 0.2849209569)
>> 53.08739850 (7.24e+00): par = (100.6830407 6.899303317 0.4637755074)
>> 1.344478640 (5.97e-01): par = (100.0368306 9.897714142 0.5169294939)
>> 0.9908415909 (1.55e-02): par = (100.0300625 9.9144191 0.5023516843)
>> 0.9906046057 (1.84e-05): par = (100.0288724 9.916224018 0.5025207336)
>> 0.9906046054 (9.95e-08): par = (100.028875 9.916228366 0.50252165)
>> 0.9906046054 (9.93e-08): par = (100.028875 9.916228366 0.50252165)
>> Error in nls(formula = y ~ Const + A * exp(B * x), algorithm = "default", :
>> step factor 0.000488281 reduced below 'minFactor' of 0.000976562
>> Calls: update -> update.default -> eval -> eval -> nls
>> Execution halted
>> ## After install, start R with --vanilla and run tests like this:
>> ## https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Testing-a-Unix_002dalike-Installation
>> Sys.setenv(LC_COLLATE = "C", LC_TIME = "C", LANGUAGE = "en")
>> pdf("tests.pdf")
>> tools::testInstalledPackages(scope="base", errorsAreFatal=FALSE)
>>
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes using cbs.dk Priv: PDalgd using gmail.com
More information about the R-devel
mailing list