[R-SIG-Mac] Rstan compilation hangs misterisouly

Gonçalo Ferraz gonc@|o@|err@z @end|ng |rom u|rg@@br
Wed Nov 11 03:10:06 CET 2020


Hello Milani,

Thank you very much for your e-mail. I was not aware of CmdStan and cmdstanr and will look into them. Meanwhile, I will continue using rstan 2.19.3.

Regarding Makevars, I am puzzled that now I have two Makevars files, both within the folder ~/Library/Frameworks/R.framework/Versions/4.0/Resources/library 

one sits in the folder RcppArmadillo/Skeleton and contains:

## With R 3.1.0 or later, you can uncomment the following line to tell R to 
## enable compilation with C++11 (where available)
##
## Also, OpenMP support in Armadillo prefers C++11 support. However, for wider
## availability of the package we do not yet enforce this here.  It is however
## recommended for client packages to set it.
##
## And with R 3.4.0, and RcppArmadillo 0.7.960.*, we turn C++11 on as OpenMP
## support within Armadillo prefers / requires it
CXX_STD = CXX11

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) 
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

the other, in folder RcppEigen/skeleton, has every line commented out:

## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
## no user-facing library. The include path to headers is already set by R.
#PKG_LIBS =

## With R 3.1.0 or later, you can uncomment the following line to tell R to
## enable compilation with C++11 (or even C++14) where available
## CXX_STD = CXX11

The Renviron file has a lot mor information.

Since you tell me that none of these files are relevant for my problem now, I am inclined to forget abou them, but I am still curious as to what is their purpose.

Best wishes,

Gonçalo




Gonçalo Ferraz
Departamento de Ecologia, Instituto de Biociências
Universidade Federal do Rio Grande do Sul
http://ferrazlab.org/ <http://ferrazlab.org/>




> On Nov 9, 2020, at 7:05 PM, Milani Chaloupka <m.chaloupka using uq.edu.au> wrote:
> 
> Hi Goncalo
> 
> The issue, as I pointed out to you yesterday on Stan Discourse, is rstan (the interface to Stan via R).
> 
> And hence my advice to you there was to downgrade to Stan 2.19.3
> 
> It was not your Makevars file - although that was an incomplete Makevars you had if there were in fact no typos in your previous email.
> 
> As others have pointed out, a Makevars file is no longer necessary to run Stan if using MACOS X Catalina onwards. 
> 
> Nor is the Renviron file.
> 
> Do not upgrade to any rstan higher than 2.19.3 until the rstan issues on various platforms are resolved.
> 
> Meanwhile, you can use, as is my preference, the CmdStan and cmdstanr interface to Stan instead of rstan, which …
> 
> (1) samples quite a bit faster than rstan
> 
> (2) is more up-to-date with Stan although with a few less features than rstan
> 
> http://mc-stan.org/cmdstanr/articles/cmdstanr.html <http://mc-stan.org/cmdstanr/articles/cmdstanr.html>
> 
> And if you are using the brms interface to Stan then it also has an option in the brm() function to use cmdstanr as the backend rather than rstan.
> 
> regards
> 
> Milani
> 
> ____________________________________________________
> 
> Dr Milani Chaloupka
> Ecological Modelling Services P/L
> PO Box 6150, University of Queensland
> St Lucia, Queensland, 4067, Australia
> 
> Honorary Associate Professor
> School of Biological Sciences, University of Queensland
> Brisbane, Queensland, 4072, Australia
> 
> Scientific Advisory Committee (Member)
> Caribbean Conservation Corporation
> Gainesville, Florida, USA
> 
> Science and Statistics Committee (Member)
> Western Pacific Regional Fisheries Management Council
> NOAA, US Dept of Commerce, Honolulu, Hawaii, USA
> 
> m.chaloupka using uq.edu.au <mailto:m.chaloupka using uq.edu.au>
> mobile: (local) 0419180554  (international) + 61 419180554
> skype: milani2005
> ____________________________________________________
> 
> 
>> On 10 Nov 2020, at 6:03 am, Goncalo Ferraz via R-SIG-Mac <r-sig-mac using r-project.org <mailto:r-sig-mac using r-project.org>> wrote:
>> 
>> Hi, This is helpful information. Thank you. Meanwhile, I tried reverting to version 2.19.3 of rstan and it does not hang on me. I couldn’t yet understand what is going on with the most recent version, but at least for now I can work.
>> 
>> Gonçalo
>> 
>>> On Nov 9, 2020, at 5:00 PM, Robert Goedman <goedman using icloud.com <mailto:goedman using icloud.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> Not sure if this helps and/or is even related but since about 2 months I have not been able to get rstan to work inside the R-GUI. Like you describe, it hangs and never returns. I don’t use rstan directly but use ulam() in the `rethinking` package to very occasionally check the Stan language program generated by ulam() after running it.
>>> 
> 


	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list