rstan still not installable on posit cloud

rstan is still not installable on Posit cloud. Below is part of the (very long) error message.

This issue has previously been reported and it does not appear to be resolved.

install.packages("rstan")
[...more messages...]
Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >; DerivedB = Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >]’
/cloud/lib/x86_64-pc-linux-gnu-library/4.2/StanHeaders/include/stan/math/prim/mat/fun/autocovariance.hpp:66:18:   required from ‘void stan::math::autocovariance(const Eigen::MatrixBase<U>&, Eigen::MatrixBase<OtherDerived>&, Eigen::FFT<T>&) [with T = double; DerivedA = Eigen::Map<const Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >; DerivedB = Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >]’
/cloud/lib/x86_64-pc-linux-gnu-library/4.2/StanHeaders/include/stan/math/prim/mat/fun/autocovariance.hpp:94:17:   required from ‘void stan::math::autocovariance(const std::vector<T>&, std::vector<T>&) [with T = double]’
chains.cpp:245:43:   required from here
/cloud/lib/x86_64-pc-linux-gnu-library/4.2/RcppEigen/include/Eigen/src/Core/CoreEvaluators.h:960:8: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
  960 |   enum {
      |        ^
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [/opt/R/4.2.2/lib/R/etc/Makeconf:178: chains.o] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.2/rstan’
Warning in install.packages :
  installation of package ‘rstan’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmptBGRxM/downloaded_packages’

Any ideas on how to proceed?

Cheers,

Julia

I tried this solution and found out that sudo permissions are, quite understandably, not allowed in Posit cloud.

rstan compiles just fine on Posit Cloud it just needs a lot of RAM. It is a problem with a specific C++ library that requires lots of memory to compile, the package maintainers are already working to solve the limitation for future versions.

If you don't have a paid account (to increase the RAM limit) and Posit people has not provisioned more resources on the Package Manager for rstan to compile then I'm afraid it is not going to be possible for you to install the latest rstan version in Posit Cloud for the time being.

Do you know this for certain? Here is the latest quote from Posit:

The latest version of rstan seems to have a significantly higher memory requirement for compilation than before. We're accounting for that now, and rstan should be installable in both Cloud and from Package Manager, with dependent packages like rstanarm coming soon.

source

That suggests they want to make using this possible.

Yet there is no rstan binary for Ubuntu 20 (the version Posit Cloud uses) in the Package Manager

It could be an oversight on their part, wait for them to chime in

I appreciate your speculation on the matter. Thank you for your help.

I'm actually not speculating (because I'm not assuming any intentions), I'm just stating the current facts. That doesn't mean things will not change in the near future.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.