* using log directory ‘/home/hornik/tmp/CRAN_special_noSuggests/rlibkriging.Rcheck’ * using R Under development (unstable) (2025-07-21 r88439) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc-14 (Debian 14.2.0-19) 14.2.0 GNU Fortran (Debian 14.2.0-19) 14.2.0 * running under: Debian GNU/Linux 13 (trixie) * using session charset: UTF-8 * checking for file ‘rlibkriging/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘rlibkriging’ version ‘0.9-2’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... [4s/6s] NOTE Maintainer: ‘Yann Richet ’ New submission Package was archived on CRAN Possibly misspelled words in DESCRIPTION: Ciyou (47:5) Nocedal (47:36) Sanderson (45:90) Zhu (47:11) CRAN repository db overrides: X-CRAN-Comment: Archived on 2025-06-16 as issues were not corrected in time. * 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 ‘rlibkriging’ can be installed ... [177s/142s] OK * used C++ compiler: ‘g++-14 (Debian 14.2.0-19) 14.2.0’ * checking C++ specification ... OK * checking package directory ... OK * checking for future file timestamps ... 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s/0s] OK * checking whether the package can be loaded with stated dependencies ... [0s/0s] OK * checking whether the package can be unloaded cleanly ... [0s/0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK * checking whether the namespace can be unloaded cleanly ... [0s/0s] OK * checking loading without being on the library search path ... [0s/0s] OK * checking use of S3 registration ... 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 ... [6s/6s] OK * checking Rd files ... [0s/0s] 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 include directives in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking examples ... [4s/4s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [75s/76s] ERROR Running ‘test-AllKrigingConcistency.R’ [2s/2s] Running ‘test-KrigingCopy.R’ [1s/1s] Running ‘test-KrigingFit.R’ [1s/1s] Running ‘test-KrigingLeaveOneOut.R’ [2s/2s] Running ‘test-KrigingLeaveOneOut_3d.R’ [1s/1s] Running ‘test-KrigingLogLik.R’ [2s/2s] Running ‘test-KrigingLogLikGradHess.R’ [5s/5s] Running ‘test-KrigingMethods.R’ [2s/2s] Running ‘test-KrigingPredict.R’ [7s/7s] Running ‘test-KrigingSimulate.R’ [1s/1s] Running ‘test-KrigingUpdate.R’ [1s/1s] Running ‘test-KrigingUpdateSimulate.R’ [2s/2s] Running ‘test-LinearAlgebra.R’ [1s/1s] Running ‘test-NoiseKrigingFit.R’ [1s/1s] Running ‘test-NoiseKrigingLogLik.R’ [2s/2s] Running ‘test-NoiseKrigingMethods.R’ [2s/2s] Running ‘test-NoiseKrigingPredict.R’ [5s/5s] Running ‘test-NoiseKrigingSimulate.R’ [3s/3s] Running ‘test-NoiseKrigingUpdate.R’ [1s/1s] Running ‘test-NoiseKrigingUpdateSimulate.R’ [2s/2s] Running ‘test-NuggetKrigingFit.R’ [1s/1s] Running ‘test-NuggetKrigingLogLik.R’ [3s/3s] Running ‘test-NuggetKrigingLogMargPost.R’ [4s/4s] Running ‘test-NuggetKrigingMethods.R’ [2s/2s] Running ‘test-NuggetKrigingPredict.R’ [5s/5s] Running ‘test-NuggetKrigingSimulate.R’ [1s/1s] Running ‘test-NuggetKrigingUpdate.R’ [1s/1s] Running ‘test-NuggetKrigingUpdateSimulate.R’ [2s/2s] Running ‘test-RobustGaSP-Nugget.R’ [0s/0s] Running ‘test-RobustGaSP.R’ [0s/0s] Running ‘test-RobustGaSPtrendlinear.R’ [0s/0s] Running ‘test-RobustGaSPvsKrigingLMP.R’ [0s/0s] Running ‘test-RobustGaSPvsNuggetKrigingLMP.R’ [0s/0s] Running ‘test-SaveLoad.R’ [1s/1s] Running ‘test-asDiceKriging.R’ [6s/6s] Running ‘test-estimnone.R’ [1s/1s] Running ‘test-normalize.R’ [2s/2s] Running ‘test-rlibkriging-demo.R’ [1s/1s] Running ‘test-unstableLL.R’ [1s/1s] Running the tests in ‘tests/test-KrigingFit.R’ failed. Complete output: > library(testthat) > Sys.setenv('OMP_THREAD_LIMIT'=2) > library(rlibkriging) Attaching package: 'rlibkriging' The following objects are masked from 'package:base': load, save > > context("Fit: 1D") > > f = function(x) 1-1/2*(sin(12*x)/(1+x)+2*cos(7*x)*x^5+0.7) > n <- 5 > set.seed(123) > X <- as.matrix(runif(n)) > y = f(X) > k = NULL > r = NULL > k = DiceKriging::km(design=X,response=y,covtype = "gauss",control = list(trace=F)) > r <- Kriging(y, X, "gauss") > > ll = Vectorize(function(x) logLikelihoodFun(r,x)$logLikelihood) > plot(ll,xlim=c(0.000001,10)) > for (x in seq(0.000001,10,,11)){ + envx = new.env() + ll2x = logLikelihoodFun(r,x)$logLikelihood + gll2x = logLikelihoodFun(r,x,return_grad = T)$logLikelihoodGrad + arrows(x,ll2x,x+.1,ll2x+.1*gll2x,col='red') + } > > theta_ref = optimize(ll,interval=c(0.001,2),maximum=T)$maximum > abline(v=theta_ref,col='black') > abline(v=as.list(r)$theta,col='red') > abline(v=k@covariance@range.val,col='blue') > > test_that(desc="Fit: 1D / fit of theta by DiceKriging is right", + expect_equal(theta_ref, k@covariance@range.val, tol= 1e-3)) Test passed 😸 > > test_that(desc="Fit: 1D / fit of theta by libKriging is right", + expect_equal(array(theta_ref), array(as.list(r)$theta), tol= 0.01)) Test passed 🥳 > > ############################################################# > > context("Fit: 2D (Branin)") > > f = function(X) apply(X,1,DiceKriging::branin) > n <- 15 > set.seed(1234) > X <- cbind(runif(n),runif(n)) > y = f(X) > k = NULL > r = NULL > k = DiceKriging::km(design=X,response=y,covtype = "gauss",control = list(trace=F),parinit = c(.2,.5)) > r <- Kriging(y, X, "gauss", parameters=list(theta=matrix(c(.2,.5),ncol=2))) > > ll = function(X) {if (!is.matrix(X)) X = matrix(X,ncol=2); + # print(dim(X)); + apply(X,1, + function(x) { + # print(dim(x)) + #print(matrix(unlist(x),ncol=2)); + y=-logLikelihoodFun(r,matrix(unlist(x),ncol=2))$logLikelihood + #print(y); + y})} > #DiceView::contourview(ll,xlim=c(0.01,2),ylim=c(0.01,2)) > x=seq(0.01,2,,5) > contour(x,x,matrix(ll(as.matrix(expand.grid(x,x))),nrow=length(x)),nlevels = 30) > > theta_ref = optim(par=matrix(c(.2,.5),ncol=2),ll,lower=c(0.01,0.01),upper=c(2,2),method="L-BFGS-B")$par > points(theta_ref,col='black') > points(as.list(r)$theta[1],as.list(r)$theta[2],col='red') > points(k@covariance@range.val[1],k@covariance@range.val[2],col='blue') > > test_that(desc="Fit: 2D (Branin) / fit of theta 2D is _quite_ the same that DiceKriging one", + expect_equal(ll(array(as.list(r)$theta)), ll(k@covariance@range.val), tol=1e-1)) Test passed 😸 > > > > ############################################################# > > context("Fit: 2D (Branin) multistart") > > f = function(X) apply(X,1,DiceKriging::branin) > n <- 15 > set.seed(1234) > X <- cbind(runif(n),runif(n)) > y = f(X) > k = NULL > r = NULL > > parinit = matrix(runif(10*ncol(X)),ncol=ncol(X)) > k <- tryCatch( # needed to catch warning due to %dopar% usage when using multistart + withCallingHandlers( + { + error_text <- "No error." + DiceKriging::km(design=X,response=y,covtype = "gauss",multistart = 10, parinit=parinit,control = list(trace=F)) + }, + warning = function(e) { + error_text <<- trimws(paste0("WARNING: ", e)) + invokeRestart("muffleWarning") + } + ), + error = function(e) { + return(list(value = NA, error_text = trimws(paste0("ERROR: ", e)))) + }, + finally = { + } + ) > r <- Kriging(y, X, "gauss", parameters=list(theta=parinit)) > l = as.list(r) > > # save(list=ls(),file="fit-2d-multistart.Rdata") > > ll = function(X) {if (!is.matrix(X)) X = matrix(X,ncol=2); + # print(dim(X)); + apply(X,1, + function(x) { + # print(dim(x)) + #print(matrix(unlist(x),ncol=2)); + y=-logLikelihoodFun(r,matrix(unlist(x),ncol=2))$logLikelihood + #print(y); + y})} > #DiceView::contourview(ll,xlim=c(0.01,2),ylim=c(0.01,2)) > x=seq(0.01,2,,5) > contour(x,x,matrix(ll(as.matrix(expand.grid(x,x))),nrow=length(x)),nlevels = 30) > > theta_ref = optim(par=matrix(c(.2,.5),ncol=2),ll,lower=c(0.01,0.01),upper=c(2,2),method="L-BFGS-B")$par > points(theta_ref,col='black') > points(as.list(r)$theta[1],as.list(r)$theta[2],col='red') > points(k@covariance@range.val[1],k@covariance@range.val[2],col='blue') Error in k@covariance : no applicable method for `@` applied to an object of class "list" Calls: points Execution halted Running the tests in ‘tests/test-NoiseKrigingFit.R’ failed. Complete output: > library(testthat) > Sys.setenv('OMP_THREAD_LIMIT'=2) > library(rlibkriging) Attaching package: 'rlibkriging' The following objects are masked from 'package:base': load, save > > ##library(rlibkriging, lib.loc="bindings/R/Rlibs") > ##library(testthat) > > context("Fit: 1D") > > f = function(x) 1-1/2*(sin(12*x)/(1+x)+2*cos(7*x)*x^5+0.7) > n <- 5 > set.seed(123) > X <- as.matrix(runif(n)) > y = f(X) + 0.1*rnorm(nrow(X)) > k = NULL > r = NULL > k = DiceKriging::km(design=X,response=y,noise.var=rep(0.1^2,nrow(X)),covtype = "gauss",control = list(trace=F),nugget.estim=F,optim.method='BFGS',multistart = 20) Error in f(model, envir = envir.logLik) : Package "foreach" not found Calls: -> f Execution halted Running the tests in ‘tests/test-NuggetKrigingFit.R’ failed. Complete output: > library(testthat) > Sys.setenv('OMP_THREAD_LIMIT'=2) > library(rlibkriging) Attaching package: 'rlibkriging' The following objects are masked from 'package:base': load, save > > ##library(rlibkriging, lib.loc="bindings/R/Rlibs") > ##library(testthat) > > context("Fit: 1D") > > f = function(x) 1-1/2*(sin(12*x)/(1+x)+2*cos(7*x)*x^5+0.7) > n <- 5 > set.seed(123) > X <- as.matrix(runif(n)) > y = f(X) > k = NULL > r = NULL > k = DiceKriging::km(design=X,response=y,covtype = "gauss",control = list(trace=F),nugget.estim=T,optim.method='BFGS',multistart = 20) Error in f(model, envir = envir.logLik) : Package "foreach" not found Calls: -> f Execution halted * checking PDF version of manual ... [4s/4s] OK * checking HTML version of manual ... [2s/2s] 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