* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/mvgam.Rcheck’ * using R Under development (unstable) (2026-01-10 r89298) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * checking for file ‘mvgam/DESCRIPTION’ ... OK * this is package ‘mvgam’ version ‘1.1.593’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... INFO Package suggested but not available for checking: ‘cmdstanr’ * 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 ‘mvgam’ can be installed ... [73s/73s] OK * used C++ compiler: ‘g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)’ * 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 code 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 whether startup messages can be suppressed ... 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 ... [80s/79s] 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 contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... 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 compilation flags used ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking examples with --run-donttest ... [14m/13m] ERROR Running examples in ‘mvgam-Ex.R’ failed The error most likely occurred in: > ### Name: ZMVN > ### Title: Specify correlated residual processes in 'mvgam' > ### Aliases: ZMVN > > ### ** Examples > > ## No test: > # Simulate counts of four species over ten sampling locations > site_dat <- data.frame( + site = rep(1:10, 4), + species = as.factor(sort(rep(letters[1:4], 10))), + y = c(NA, rpois(39, 3)) + ) > head(site_dat) site species y 1 1 a NA 2 2 a 2 3 3 a 2 4 4 a 3 5 5 a 5 6 6 a 2 > > # Set up a correlated residual (i.e. Joint Species Distribution) model > trend_model <- ZMVN(unit = site, subgr = species) > mod <- mvgam( + y ~ species, + trend_model = ZMVN(unit = site, subgr = species), + data = site_dat, + chains = 2, + silent = 2 + ) Warning in mvgam(y ~ species, trend_model = ZMVN(unit = site, subgr = species), : cmdstanr library not found. Defaulting to rstan SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 1). Chain 1: Chain 1: Gradient evaluation took 9.4e-05 seconds Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.94 seconds. Chain 1: Adjust your expectations accordingly! Chain 1: Chain 1: Chain 1: Iteration: 1 / 1000 [ 0%] (Warmup) SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 2). Chain 2: Chain 2: Gradient evaluation took 7.3e-05 seconds Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.73 seconds. Chain 2: Adjust your expectations accordingly! Chain 2: Chain 2: Chain 2: Iteration: 1 / 1000 [ 0%] (Warmup) Chain 1: Iteration: 100 / 1000 [ 10%] (Warmup) Chain 2: Iteration: 100 / 1000 [ 10%] (Warmup) Chain 1: Iteration: 200 / 1000 [ 20%] (Warmup) Chain 2: Iteration: 200 / 1000 [ 20%] (Warmup) Chain 1: Iteration: 300 / 1000 [ 30%] (Warmup) Chain 2: Iteration: 300 / 1000 [ 30%] (Warmup) Chain 1: Iteration: 400 / 1000 [ 40%] (Warmup) Chain 2: Iteration: 400 / 1000 [ 40%] (Warmup) Chain 1: Iteration: 500 / 1000 [ 50%] (Warmup) Chain 1: Iteration: 501 / 1000 [ 50%] (Sampling) Chain 2: Iteration: 500 / 1000 [ 50%] (Warmup) Chain 1: Iteration: 600 / 1000 [ 60%] (Sampling) Chain 2: Iteration: 501 / 1000 [ 50%] (Sampling) Chain 1: Iteration: 700 / 1000 [ 70%] (Sampling) Chain 2: Iteration: 600 / 1000 [ 60%] (Sampling) Chain 1: Iteration: 800 / 1000 [ 80%] (Sampling) Chain 2: Iteration: 700 / 1000 [ 70%] (Sampling) Chain 1: Iteration: 900 / 1000 [ 90%] (Sampling) Chain 2: Iteration: 800 / 1000 [ 80%] (Sampling) Chain 1: Iteration: 1000 / 1000 [100%] (Sampling) Chain 1: Chain 1: Elapsed Time: 0.63 seconds (Warm-up) Chain 1: 0.526 seconds (Sampling) Chain 1: 1.156 seconds (Total) Chain 1: Chain 2: Iteration: 900 / 1000 [ 90%] (Sampling) Chain 2: Iteration: 1000 / 1000 [100%] (Sampling) Chain 2: Chain 2: Elapsed Time: 0.691 seconds (Warm-up) Chain 2: 0.534 seconds (Sampling) Chain 2: 1.225 seconds (Total) Chain 2: Warning: There were 8 divergent transitions after warmup. See https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup to find out why this is a problem and how to eliminate them. Warning: Examine the pairs() plot to diagnose sampling problems Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable. Running the chains for more iterations may help. See https://mc-stan.org/misc/warnings.html#bulk-ess > > # Inspect the estimated species-species residual covariances > mcmc_plot(mod, variable = 'Sigma', regex = TRUE, type = 'hist') `stat_bin()` using `bins = 30`. Pick better value `binwidth`. > > # A hierarchical correlation example > Sigma <- matrix( + c(1, -0.4, 0.5, + -0.4, 1, 0.3, + 0.5, 0.3, 1), + byrow = TRUE, + nrow = 3 + ) > > make_site_dat <- function(...) { + errors <- mgcv::rmvn( + n = 30, + mu = c(0.6, 0.8, 1.8), + V = Sigma + ) + site_dat <- do.call(rbind, lapply(1:3, function(spec) { + data.frame( + y = rpois(30, lambda = exp(errors[, spec])), + species = paste0('species', spec), + site = 1:30 + ) + })) + site_dat + } > > site_dat <- rbind( + make_site_dat() %>% + dplyr::mutate(group = 'group1'), + make_site_dat() %>% + dplyr::mutate(group = 'group2') + ) %>% + dplyr::mutate( + species = as.factor(species), + group = as.factor(group) + ) > > # Fit the hierarchical correlated residual model > mod <- mvgam( + y ~ species, + trend_model = ZMVN(unit = site, gr = group, subgr = species), + data = site_dat + ) Warning in mvgam(y ~ species, trend_model = ZMVN(unit = site, gr = group, : cmdstanr library not found. Defaulting to rstan Compiling Stan program using rstan Start sampling Error in .check_ncores(cores) : 4 simultaneous processes spawned Calls: mvgam ... .fun -> .fun -> .local -> -> .check_ncores Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [20s/17s] [20s/18s] OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [20s/20s] 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 * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/blackswan/ripley/R/packages/tests-devel/mvgam.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 18:04.11, 1054.80 + 91.50