CRAN Package Check Results for Package optimx

Last updated on 2019-08-20 05:47:12 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2018-7.10 11.70 102.58 114.28 OK
r-devel-linux-x86_64-debian-gcc 2018-7.10 8.70 80.98 89.68 OK
r-devel-linux-x86_64-fedora-clang 2018-7.10 131.52 OK
r-devel-linux-x86_64-fedora-gcc 2018-7.10 132.50 OK
r-devel-windows-ix86+x86_64 2018-7.10 30.00 122.00 152.00 OK
r-patched-linux-x86_64 2018-7.10 11.57 102.01 113.58 OK
r-patched-solaris-x86 2018-7.10 177.20 ERROR
r-release-linux-x86_64 2018-7.10 11.40 101.61 113.01 OK
r-release-windows-ix86+x86_64 2018-7.10 13.00 121.00 134.00 OK
r-release-osx-x86_64 2018-7.10 ERROR
r-oldrel-windows-ix86+x86_64 2018-7.10 24.00 139.00 163.00 OK
r-oldrel-osx-x86_64 2018-7.10 ERROR

Check Details

Version: 2018-7.10
Check: tests
Result: ERROR
     Running ‘bdstest.R’
     Running ‘hobbs.R’ [9s/18s]
     Running ‘jonesrun.R’
     Running ‘maxfn.R’
     Running ‘rosenbrock.R’ [11s/14s]
     Running ‘run1param.R’
     Running ‘simplefuntst.R’
     Running ‘snsimple.R’
     Running ‘snwood.R’
     Running ‘ssqbtest.R’
     Running ‘tfnchk.R’
     Running ‘tgrchk.R’
     Running ‘tkktc.R’
     Running ‘trig1507.R’ [13s/18s]
    Running the tests in ‘tests/hobbs.R’ failed.
    Complete output:
     > rm(list=ls())
     > require(optimx)
     Loading required package: optimx
     > ## Optimization test function HOBBS
     > ## ?? refs (put in .doc??)
     > ## Nash and Walker-Smith (1987, 1989) ...
     >
     >
     > hobbs.f<- function(x){ # # Hobbs weeds problem -- function
     + if (abs(12*x[3]) > 500) { # check computability
     + fbad<-.Machine$double.xmax
     + return(fbad)
     + }
     + res<-hobbs.res(x)
     + f<-sum(res*res)
     + }
     >
     >
     > hobbs.res<-function(x){ # Hobbs weeds problem -- residual
     + # This variant uses looping
     + if(length(x) != 3) stop("hobbs.res -- parameter vector n!=3")
     + y<-c(5.308, 7.24, 9.638, 12.866, 17.069, 23.192, 31.443, 38.558, 50.156, 62.948,
     + 75.995, 91.972)
     + t<-1:12
     + if(abs(12*x[3])>50) {
     + res<-rep(Inf,12)
     + } else {
     + res<-x[1]/(1+x[2]*exp(-x[3]*t)) - y
     + }
     + }
     >
     > hobbs.jac<-function(x){ # Jacobian of Hobbs weeds problem
     + jj<-matrix(0.0, 12, 3)
     + t<-1:12
     + yy<-exp(-x[3]*t)
     + zz<-1.0/(1+x[2]*yy)
     + jj[t,1] <- zz
     + jj[t,2] <- -x[1]*zz*zz*yy
     + jj[t,3] <- x[1]*zz*zz*yy*x[2]*t
     + return(jj)
     + }
     >
     > hobbs.g<-function(x){ # gradient of Hobbs weeds problem
     + # NOT EFFICIENT TO CALL AGAIN
     + jj<-hobbs.jac(x)
     + res<-hobbs.res(x)
     + gg<-as.vector(2.*t(jj) %*% res)
     + return(gg)
     + }
     >
     >
     > hobbs.rsd<-function(x) { # Jacobian second derivative
     + rsd<-array(0.0, c(12,3,3))
     + t<-1:12
     + yy<-exp(-x[3]*t)
     + zz<-1.0/(1+x[2]*yy)
     + rsd[t,1,1]<- 0.0
     + rsd[t,2,1]<- -yy*zz*zz
     + rsd[t,1,2]<- -yy*zz*zz
     + rsd[t,2,2]<- 2.0*x[1]*yy*yy*zz*zz*zz
     + rsd[t,3,1]<- t*x[2]*yy*zz*zz
     + rsd[t,1,3]<- t*x[2]*yy*zz*zz
     + rsd[t,3,2]<- t*x[1]*yy*zz*zz*(1-2*x[2]*yy*zz)
     + rsd[t,2,3]<- t*x[1]*yy*zz*zz*(1-2*x[2]*yy*zz)
     + ## rsd[t,3,3]<- 2*t*t*x[1]*x[2]*x[2]*yy*yy*zz*zz*zz
     + rsd[t,3,3]<- -t*t*x[1]*x[2]*yy*zz*zz*(1-2*yy*zz*x[2])
     + return(rsd)
     + }
     >
     >
     > hobbs.h <- function(x) { ## compute Hessian
     + # cat("Hessian not yet available\n")
     + # return(NULL)
     + H<-matrix(0,3,3)
     + res<-hobbs.res(x)
     + jj<-hobbs.jac(x)
     + rsd<-hobbs.rsd(x)
     + ## H<-2.0*(t(res) %*% rsd + t(jj) %*% jj)
     + for (j in 1:3) {
     + for (k in 1:3) {
     + for (i in 1:12) {
     + H[j,k]<-H[j,k]+res[i]*rsd[i,j,k]
     + }
     + }
     + }
     + H<-2*(H + t(jj) %*% jj)
     + return(H)
     + }
     >
     >
     >
     > x0 <- c(200, 50, .3)
     > # This start seems to be OK for all methods
     > cat("Start for Hobbs:")
     Start for Hobbs:> print(x0)
     [1] 200.0 50.0 0.3
     > cat("Initial value of hobbs.f = ",hobbs.f(x0),"\n")
     Initial value of hobbs.f = 158.2324
     > ahobb0 <- opm(x0, hobbs.f, hobbs.g, hess=hobbs.h, method="ALL")
     This problem is unconstrained.
     Error in if (delfb > -armtst/n) { : missing value where TRUE/FALSE needed
     In addition: Warning messages:
     1: In Rcgminu(par = spar, fn = efn, gr = egr, control = mcontrol, ...) :
     Rcgmin - undefined function
     2: In Rcgminu(par = spar, fn = efn, gr = egr, control = mcontrol, ...) :
     Rcgmin - undefined function
     3: In Rcgminu(par = spar, fn = efn, gr = egr, control = mcontrol, ...) :
     Rcgmin - undefined function
     4: In Rcgminu(par = spar, fn = efn, gr = egr, control = mcontrol, ...) :
     Rcgmin - undefined function
     5: In Rcgminu(par = spar, fn = efn, gr = egr, control = mcontrol, ...) :
     Rcgmin - undefined function
     Warning message:
     In dfoptim::hjk(par = spar, fn = efn, control = mcontrol, ...) :
     Function evaluation limit exceeded -- may not converge.
     > print(summary(ahobb0, order=value))
     p1 p2 p3 value fevals gevals convergence
     ucminf 196.1863 49.09164 0.3135697 2.587277e+00 22 22 0
     subplex 196.1863 49.09164 0.3135697 2.587277e+00 823 NA 0
     Rvmmin 196.1863 49.09164 0.3135697 2.587277e+00 35 17 0
     snewtonm 196.1863 49.09164 0.3135697 2.587277e+00 13 9 0
     nlminb 196.1863 49.09164 0.3135697 2.587277e+00 8 7 0
     nlm 196.1863 49.09164 0.3135697 2.587277e+00 NA 6 0
     snewton 196.1863 49.09164 0.3135697 2.587277e+00 10 10 92
     lbfgs 196.1863 49.09166 0.3135697 2.587277e+00 NA NA 0
     BFGS 196.1856 49.09156 0.3135701 2.587277e+00 74 25 0
     Rcgmin 196.1888 49.09191 0.3135683 2.587277e+00 2005 272 1
     Nelder-Mead 196.1782 49.09055 0.3135750 2.587279e+00 162 NA 0
     newuoa 196.5159 49.12861 0.3133856 2.587519e+00 4938 NA 0
     spg 199.6503 49.47564 0.3116572 2.612872e+00 974 419 0
     CG 199.9263 49.48658 0.3114687 2.617055e+00 4924 1001 1
     L-BFGS-B 200.0162 49.51389 0.3114545 2.618411e+00 25 25 0
     lbfgsb3 200.0162 49.51389 0.3114545 2.618411e+00 25 25 0
     bobyqa 200.4891 49.98062 0.3120166 2.662018e+00 38 NA 0
     Rtnmin 203.8197 50.04305 0.3096444 2.707066e+00 8 8 3
     hjkb 203.5517 49.70258 0.3091553 2.707067e+00 10006 NA 1
     hjn 221.3600 51.79258 0.3008320 3.639897e+00 10000 NA 1
     nmkb NA NA NA 8.988466e+307 NA NA 9999
     kkt1 kkt2 xtime
     ucminf TRUE FALSE 0.012
     subplex TRUE FALSE 0.027
     Rvmmin TRUE FALSE 0.015
     snewtonm TRUE FALSE 0.007
     nlminb TRUE FALSE 0.006
     nlm TRUE FALSE 0.137
     snewton TRUE FALSE 0.008
     lbfgs TRUE FALSE 0.020
     BFGS TRUE FALSE 0.166
     Rcgmin TRUE FALSE 0.073
     Nelder-Mead FALSE FALSE 0.004
     newuoa FALSE FALSE 0.449
     spg FALSE FALSE 0.219
     CG FALSE FALSE 0.170
     L-BFGS-B FALSE FALSE 0.004
     lbfgsb3 FALSE FALSE 0.045
     bobyqa FALSE FALSE 0.004
     Rtnmin FALSE FALSE 0.016
     hjkb FALSE FALSE 0.309
     hjn FALSE FALSE 0.297
     nmkb NA NA 0.011
     >
     >
     > x1 <- c(1, 1, 1)
     > # Several methods fail because f or g becomes Inf.
     > cat("Start for Hobbs:")
     Start for Hobbs:> print(x1)
     [1] 1 1 1
     > cat("Initial value of hobbs.f = ",hobbs.f(x1),"\n")
     Initial value of hobbs.f = 23520.58
     > ahobb1 <- opm(x1, hobbs.f, hobbs.g, hess=hobbs.h, method="ALL")
     Error in optim(par = par, fn = efn, gr = egr, method = method, hessian = FALSE, :
     L-BFGS-B needs finite values of 'fn'
     In addition: Warning message:
     In kktchk(ans$par, fn, wgr, hess = NULL, upper = NULL, lower = NULL, :
     Eigenvalue failure for projected Hessian
     This problem is unconstrained.
     Error in lbfgsb3::lbfgsb3(prm = spar, fn = efn, gr = egr, control = mcontrol, :
     NA/NaN/Inf in foreign function call (arg 7)
     In addition: Warning messages:
     1: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     2: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     3: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     4: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     terminate called after throwing an instance of 'std::range_error'
     what(): non-finite x values not allowed in calfun
Flavor: r-patched-solaris-x86

Version: 2018-7.10
Check: tests
Result: ERROR
     Running ‘bdstest.R’ [2s/4s]
     Running ‘hobbs.R’ [5s/14s]
    Running the tests in ‘tests/hobbs.R’ failed.
    Last 13 lines of output:
     In kktchk(ans$par, fn, wgr, hess = NULL, upper = NULL, lower = NULL, :
     Eigenvalue failure for projected Hessian
     This problem is unconstrained.
     Error in lbfgsb3::lbfgsb3(prm = spar, fn = efn, gr = egr, control = mcontrol, :
     NA/NaN/Inf in foreign function call (arg 7)
     In addition: Warning messages:
     1: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     2: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     3: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     4: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     libc++abi.dylib: terminating with uncaught exception of type std::range_error: non-finite x values not allowed in calfun
Flavor: r-release-osx-x86_64

Version: 2018-7.10
Check: tests
Result: ERROR
     Running ‘bdstest.R’ [1s/1s]
     Running ‘hobbs.R’ [4s/5s]
    Running the tests in ‘tests/hobbs.R’ failed.
    Last 13 lines of output:
     In kktchk(ans$par, fn, wgr, hess = NULL, upper = NULL, lower = NULL, :
     Eigenvalue failure for projected Hessian
     This problem is unconstrained.
     Error in lbfgsb3::lbfgsb3(prm = spar, fn = efn, gr = egr, control = mcontrol, :
     NA/NaN/Inf in foreign function call (arg 7)
     In addition: Warning messages:
     1: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     2: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     3: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     4: In nlm(f = nlmfn, p = spar, iterlim = iterlim, print.level = print.level, :
     NA/Inf replaced by maximum positive value
     libc++abi.dylib: terminating with uncaught exception of type std::range_error: non-finite x values not allowed in calfun
Flavor: r-oldrel-osx-x86_64