Comments (5)
I also had this problem using Rstan 1.3 stable, but it worked fine using the latest revision of Github master branch.
from stan.
I just verified that this crashes in the most recent
RStan either in debug or fast mode. I don't even get
an error message, the R process crashes and the GUI disappears.
(I'm on: R 2.15.3 GUI 1.53 Leopard build 64-bit (6451))
This model runs without crashing or providing warnings
from the command line on the current master branch.
Printing out the product it looks OK.
Oh, and it's not the data. I changed that to transformed
data and made the num==5 so I could inspect the product
and it still crashed R.
- Bob
On 5/1/13 5:20 AM, Paul Metcalfe wrote:
This is a minimal version of a problem that has caught me in a real model. This model:
|data {
int<lower=0> num;
}parameters {
vector<lower=0, upper=1>[num] scale;
matrix[num, num] fred;
}transformed parameters {
matrix[num, num] out;out <- diag_pre_multiply(scale, fred);
}
model {
for (indx in 1:num) {
for (indy in 1:num) {
fred[indy, indx] ~ normal(0, 1);
}
}
}
|dies with the error
|/home/pdm/.R/x86_64-unknown-linux-gnu/2.15/rstan/include//stanlib/eigen_3.1.2/Eigen/src/Core/DenseCoeffsBase.h:337: typename Eigen::internal::traits::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(typename Eigen::internal::traits::Index, typename Eigen::internal::traits::Index) [with Derived = Eigen::Matrix<stan::agrad::var, -0x00000000000000001, -0x00000000000000001, 0, -0x00000000000000001, -0x00000000000000001>]: Assertion `row >= 0 && row < rows() && col >= 0 && col < cols()' failed.
Aborted (core dumped)
|when run with
|library(rstan)
set_cppo("debug")
results <-
stan(file="dummy.txt",
data=list(num=100),
iter=1000,
chains=4)
|The R version is 2.15.1, Rcpp is 0.10.3, gcc is
|Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile
--enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
|and rstan is
|rstan (Version 1.3.0, packaged: 2013-04-12 21:12:02 UTC, GitRev: f574555)
|The OS is linux amd64.
—
Reply to this email directly or view it on GitHub #34.
from stan.
I'm using a modified makefile to compile Rstan, so, this might be the reason it worked for me (I tried the model again and it worked):
I changed:
$(R) CMD rstan --md5 # --no-vignettes --no-manual
with
$(R) CMD build /home/marco/Documents/stan/rstan/rstan --md5 --no-vignettes --no-manual
And:
with
$(R) CMD INSTALL --no-multiarch rstan_1.3.0.tar.gz
Maybe this is a clue. I'll trying using the default makefile and see if it runs. My OS is also Linux amd64.
EDIT: I wasn't able to reproduce this problem using the latest revision of Github master branch even after using the default makefile.
from stan.
If we use the current master branch, I think both stan from the command
line or rstan work. But using Stan 1.3.0 that we released, we have the same problem
as with RStan 1.3.0 that we released. So I do not think this is a problem with
RStan. This is the result of using stan-1.3.0 downloaded from mc-stan.org:
jq2@jq-tpw510:~/Desktop/stan-src-1.3.0/tmp$ more m1.stan
data {
int<lower=0> num;
}
parameters {
vector<lower=0, upper=1>[num] scale;
matrix[num, num] fred;
}
transformed parameters {
matrix[num, num] out;
out <- diag_pre_multiply(scale, fred);
}
model {
for (indx in 1:num) {
for (indy in 1:num) {
fred[indy, indx] ~ normal(0, 1);
}
}
}
jq2@jq-tpw510:~/Desktop/stan-src-1.3.0/tmp$ ./m1 --data=m1.rdump
m1: lib/eigen_3.1.2/Eigen/src/Core/DenseCoeffsBase.h:337: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::DenseCoeffsBase<Derived, 1>::Index, Eigen::DenseCoeffsBase<Derived, 1>::Index) [with Derived = Eigen::Matrix<stan::agrad::var, -1, -1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = stan::agrad::var; Eigen::DenseCoeffsBase<Derived, 1>::Index = long int]: Assertion `row >= 0 && row < rows() && col >= 0 && col < cols()' failed.
Aborted
Jiqiang
from stan.
I guess the fix was 405bc3d ?
Thanks for the very wonderful stan!
from stan.
Related Issues (20)
- Typo on wiki: prior choice recommendation for correlation HOT 2
- Pathfinder run not reproducible from seed
- Underflow in psis_weights leads to uniform sampling from multi-pathfinder draws
- Add resampling options for multi-Pathfinder HOT 5
- min:max indexing does not support SoA but does not prevent this at compile time? HOT 5
- `install-tbb.bat` fails on windows
- Write metric as JSON - add field "metric_type" HOT 1
- How to use stan::math::hypergeometric_2F1 in stan? HOT 1
- Move away from the `boost::ecuyer1988` pRNG HOT 3
- Remove places where exceptions are unconditionally swallowed.
- Add an argument to write Hessian from Laplace algorithm to a file
- CompileError: command '/usr/bin/gcc' failed with exit code 1 HOT 6
- Pathfinder: unexpected behavior when num_draws < num_elbo_draws
- Implementation of improved Rhat for assessing convergence of MCMC
- Exception: In serializer: Storage capacity [763] exceeded while writing value of size [16] from position [759] HOT 6
- Too loose ASSERT_NEAR and wrong test values in compute_potential_scale_reduction_test.cpp HOT 3
- Allow some chains in multi chain samplers to fail during initialization HOT 3
- Move from int to long int? HOT 3
- Round the Pathfinder Pareto k-value
- report condition number of metric for HMC adaptive samplers HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stan.