stan model works on Mac but not on Windows

48 views
Skip to first unread message

Adrian

unread,
Jan 16, 2017, 7:39:24 PM1/16/17
to Stan users mailing list
Dear all,

I ran my stan model (attached) on my Mac computer and it runs without any errors. However when I ran the exact same model on my windows, it throws the following exception. It says the variable "tc" does not exist but I checked and the variable tc is being based to stan and it is not empty. Would really appreciate it if anyone could help point me in the direction as to what could be wrong as it seems weird that it works on one platform but not the other. Thank you in advance. 

C:/Users/SimulationPC/Documents/R/win-library/3.3/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/SimulationPC/Documents/R/win-library/3.3/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:17: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
     static void set_zero_all_adjoints() {
                 ^
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : 
  variable does not exist; processing stage=data initialization; variable name=tc; base type=matrix_d
In addition: Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In FUN(X[[i]], ...) : data with name tc is not numeric and not used
failed to create the sampler; sampling not done
Stan model 'bc' does not contain samples.
starting run 
Error in 1:numrealize : argument of length  
bc.stan

Bob Carpenter

unread,
Jan 16, 2017, 8:09:21 PM1/16/17
to stan-...@googlegroups.com
Can you send the whole script you used to try to run it?
Looks like the data's missing in Windows for variable tc.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <bc.stan>

Adrian

unread,
Jan 17, 2017, 7:29:43 AM1/17/17
to Stan users mailing list
Bob,

Thank you for the prompt reply. Please find attached the script that generated the error. I've put all the data that was passed in "data.rda"

Regards,
Adrian
main.R
data.rda

Bob Carpenter

unread,
Jan 23, 2017, 4:02:37 PM1/23/17
to stan-...@googlegroups.com
I asked for clarification but don't know ow to debug this
problem. Anyone have any ideas?

I'm thinking we need a separate mailing list thread for
all of our interfaces dedicated to install problems just
so the right people see these messages.

- Bob
> <main.R><data.rda>

Ben Goodrich

unread,
Jan 23, 2017, 6:38:01 PM1/23/17
to Stan users mailing list
On Monday, January 23, 2017 at 4:02:37 PM UTC-5, Bob Carpenter wrote:
I asked for clarification but don't know ow to debug this
problem.  Anyone have any ideas?

The data file does not have an object named tc

> load("data.rda")
> ls()
[1] "dat"         "mcmc.chains" "mcmc.iter" 

Ben

Reply all
Reply to author
Forward
0 new messages