Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bayes_R2.hsstan example failure: Error in FUN(X[[i]], ...): trying to get slot "mode" from an object of a basic class ("NULL") with no slots #4

Closed
barracuda156 opened this issue Feb 15, 2023 · 3 comments

Comments

@barracuda156
Copy link

* checking compiled code ... OK
* checking examples ... ERROR
Running examples in ‘hsstan-Ex.R’ failed
The error most likely occurred in:

> ### Name: bayes_R2.hsstan
> ### Title: Bayesian and LOO-adjusted R-squared
> ### Aliases: bayes_R2.hsstan bayes_R2 loo_R2.hsstan loo_R2
> 
> ### ** Examples
> 
> ## Don't show: 
> utils::example("hsstan", echo=FALSE)

SAMPLING FOR MODEL 'hs' NOW (CHAIN 1).

SAMPLING FOR MODEL 'hs' NOW (CHAIN 2).
Warning in mccollect(jobs) : 2 parallel jobs did not deliver results
Error in FUN(X[[i]], ...) : 
  trying to get slot "mode" from an object of a basic class ("NULL") with no slots
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> .local -> sapply -> lapply -> FUN
Execution halted

Detailed output:

hsstan 0.8.1: using 4 cores, set 'options(mc.cores)' to change.
> 
> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
> cleanEx()
> nameEx("bayes_R2.hsstan")
> ### * bayes_R2.hsstan
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: bayes_R2.hsstan
> ### Title: Bayesian and LOO-adjusted R-squared
> ### Aliases: bayes_R2.hsstan bayes_R2 loo_R2.hsstan loo_R2
> 
> ### ** Examples
> 
> ## Don't show: 
> utils::example("hsstan", echo=FALSE)

SAMPLING FOR MODEL 'hs' NOW (CHAIN 1).

SAMPLING FOR MODEL 'hs' NOW (CHAIN 2).
Warning in mccollect(jobs) : 2 parallel jobs did not deliver results
Error in FUN(X[[i]], ...) : 
  trying to get slot "mode" from an object of a basic class ("NULL") with no slots
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> .local -> sapply -> lapply -> FUN
Execution halted
@mcol
Copy link
Owner

mcol commented Feb 15, 2023

What versions of rstan and rstantools are you using? On what OS?

@barracuda156
Copy link
Author

@mcol Thank you very much for responding. My testing setup is this:

R-rstan @2.21.8_0
R-rstantools @2.2.0_0
R @4.2.2_4+builtin_lapack+cairo+gcc12+openmp+recommended+tcltk+x11
macOS 10.6.8 Rosetta
GCC 12.2.0

P. S. I am bringing R packages into Macports, so this is not just my personal issue, I need to make sure it works before submitting a port.

@barracuda156
Copy link
Author

@mcol Apparently the failure was caused by the malloc bug (unrelated to your port) that has been fixed since then; now all looks good:

--->  Configuring R-hsstan
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-hsstan/R-hsstan/work/hsstan-0.8.1" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes 
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘hsstan’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘hsstan_0.8.1.tar.gz’

--->  Building R-hsstan
--->  Testing R-hsstan
* using log directory ‘/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-hsstan/R-hsstan/work/hsstan-0.8.1/hsstan.Rcheck’
* using R version 4.2.2 (2022-10-31)
* using platform: powerpc-apple-darwin10.8.0 (32-bit)
* using session charset: UTF-8
* checking for file ‘hsstan/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘hsstan’ version ‘0.8.1’
* package encoding: UTF-8
* 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 ‘hsstan’ can be installed ... OK
* checking installed package size ... OK
* checking package 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 ... NOTE
Namespace in Imports field not imported from: ‘RcppParallel’
  All declared Imports should be used.
* 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 contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... 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 for GNU extensions in Makefiles ... NOTE
GNU make is a SystemRequirements.
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking PDF version of manual ... OK
* DONE

Status: 2 NOTEs
See
  ‘/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-hsstan/R-hsstan/work/hsstan-0.8.1/hsstan.Rcheck/00check.log’
for details.

I close the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants