{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/stan/issues/2179","repository_url":"https://api.github.com/repos/stan-dev/stan","labels_url":"https://api.github.com/repos/stan-dev/stan/issues/2179/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/stan/issues/2179/comments","events_url":"https://api.github.com/repos/stan-dev/stan/issues/2179/events","html_url":"https://github.com/stan-dev/stan/issues/2179","id":196948725,"number":2179,"title":"de/serialization issues","user":{"login":"wds15","id":12070126,"avatar_url":"https://avatars.githubusercontent.com/u/12070126?v=3","gravatar_id":"","url":"https://api.github.com/users/wds15","html_url":"https://github.com/wds15","followers_url":"https://api.github.com/users/wds15/followers","following_url":"https://api.github.com/users/wds15/following{/other_user}","gists_url":"https://api.github.com/users/wds15/gists{/gist_id}","starred_url":"https://api.github.com/users/wds15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wds15/subscriptions","organizations_url":"https://api.github.com/users/wds15/orgs","repos_url":"https://api.github.com/users/wds15/repos","events_url":"https://api.github.com/users/wds15/events{/privacy}","received_events_url":"https://api.github.com/users/wds15/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-21T14:41:21Z","updated_at":"2016-12-21T17:34:21Z","closed_at":null,"body":"#### Summary:\r\nWhen using rstan 2.13 stan_rdump to serialize arrays with zero size , then these cannot be read with cmdstan 2.13\r\n\r\n\r\n#### Description:\r\nSerializing with stan_rdump and starting a cmdstan run does not work any more if the arrays has size zero. This used to work with rstan 2.12 and cmdstand 2.12.\r\n\r\nThis releated to the issue rstan#371 .\r\n\r\n#### Reproducible Steps:\r\nserialized data with rstan 2.13 which does not work with cmdstan 2.13:\r\n```\r\nN <- 0\r\ny <- \r\nstructure(integer(0), \r\n.Dim = c(0))\r\n```\r\n\r\nthis data works with cmdstan 2.13 and was generated with rstan 2.12:\r\n```\r\nN <- 0\r\ny <- \r\nstructure(c(),\r\n.Dim = c(0))\r\n```\r\n\r\nHere is a dummy Stan program:\r\n```\r\ndata {\r\n  int N;\r\n  int y[N];\r\n}\r\nparameters {\r\n  real mu;\r\n}\r\nmodel {\r\n  target += normal_lpdf(mu|0, 1);\r\n}\r\n```\r\n\r\n#### Current Output:\r\ncmdstan fails to run\r\n\r\n\r\n#### Expected Output:\r\nError from cmdstan:\r\n```\r\n[weberse2@node04:~/work/stan/misc] ./stan_int_bug sample data file=notok.R\r\n\r\nException: data y value  beyond int range\r\nDiagnostic information: \r\nstan_2.13.1/src/stan/io/dump.hpp(518): Throw in function bool stan::io::dump_reader::next()\r\nDynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> >\r\nstd::exception::what: data y value  beyond int range\r\n```\r\n\r\n#### cmdstan Stan Version:\r\n2.13.1\r\n\r\n#### Operating System:\r\nRHEL 6.7"},"comment":{"url":"https://api.github.com/repos/stan-dev/stan/issues/comments/268587118","html_url":"https://github.com/stan-dev/stan/issues/2179#issuecomment-268587118","issue_url":"https://api.github.com/repos/stan-dev/stan/issues/2179","id":268587118,"user":{"login":"bob-carpenter","id":3383807,"avatar_url":"https://avatars.githubusercontent.com/u/3383807?v=3","gravatar_id":"","url":"https://api.github.com/users/bob-carpenter","html_url":"https://github.com/bob-carpenter","followers_url":"https://api.github.com/users/bob-carpenter/followers","following_url":"https://api.github.com/users/bob-carpenter/following{/other_user}","gists_url":"https://api.github.com/users/bob-carpenter/gists{/gist_id}","starred_url":"https://api.github.com/users/bob-carpenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bob-carpenter/subscriptions","organizations_url":"https://api.github.com/users/bob-carpenter/orgs","repos_url":"https://api.github.com/users/bob-carpenter/repos","events_url":"https://api.github.com/users/bob-carpenter/events{/privacy}","received_events_url":"https://api.github.com/users/bob-carpenter/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T17:34:21Z","updated_at":"2016-12-21T17:34:21Z","body":"This issue was moved to stan-dev/rstan#373"}}
{"actor":{"display_login":"bob-carpenter"}}