Loo() error for brms model compiled on different computer

Thanks fr the additional info

Did you try also options(mc.cores = 1)

loo(model, cores=1) should work, so then it looks like a bug (in addition of Windows having a problem with multiple cores)

Did you use the latest loo version? This or related bug was fixed November 14 https://github.com/stan-dev/loo/issues/129

1 Like

I haven’t tried options(mc.cores=1) yet. Will do this now.

I will also restart R to be sure parallel cores has been stopped and is not running in the background. and then try cores=1.

I am using the latest loo() version as far as I can tell (loo version 2.2.0).

Thanks a lot for the help. Much appreciated! I will report back with the result.

options(mc.cores = 1) worked!

With one of my models I did get some warnings (but not for all):

options(mc.cores = 1)
loo_percdepmod <- loo(percdep_mod_BB)
There were 43 warnings (use warnings() to see them)
warnings()
Warning messages:
1: In for (ic in 1:sim$chains) { … :
closing unused connection 66 (<-DESKTOP-0CRLI75:11388)
2: In for (ic in 1:sim$chains) { … :
closing unused connection 65 (<-DESKTOP-0CRLI75:11388)
3: In for (ic in 1:sim$chains) { … :
closing unused connection 64 (<-DESKTOP-0CRLI75:11388)
4: In for (ic in 1:sim$chains) { … :
closing unused connection 63 (<-DESKTOP-0CRLI75:11388)
5: In for (ic in 1:sim$chains) { … :
closing unused connection 62 (<-DESKTOP-0CRLI75:11388)
6: In for (ic in 1:sim$chains) { … :
closing unused connection 61 (<-DESKTOP-0CRLI75:11388)
7: In for (ic in 1:sim$chains) { … :
closing unused connection 60 (<-DESKTOP-0CRLI75:11388)
8: In for (ic in 1:sim$chains) { … :
closing unused connection 59 (<-DESKTOP-0CRLI75:11388)
9: In for (ic in 1:sim$chains) { … :
closing unused connection 58 (<-DESKTOP-0CRLI75:11388)
10: In for (ic in 1:sim$chains) { … :
closing unused connection 57 (<-DESKTOP-0CRLI75:11388)
11: In for (ic in 1:sim$chains) { … :
closing unused connection 56 (<-DESKTOP-0CRLI75:11388)
12: In for (ic in 1:sim$chains) { … :
closing unused connection 55 (<-DESKTOP-0CRLI75:11388)
13: In for (ic in 1:sim$chains) { … :
closing unused connection 54 (<-DESKTOP-0CRLI75:11388)
14: In for (ic in 1:sim$chains) { … :
closing unused connection 53 (<-DESKTOP-0CRLI75:11388)
15: In for (ic in 1:sim$chains) { … :
closing unused connection 52 (<-DESKTOP-0CRLI75:11388)
16: In for (ic in 1:sim$chains) { … :
closing unused connection 51 (<-DESKTOP-0CRLI75:11388)
17: In for (ic in 1:sim$chains) { … :
closing unused connection 50 (<-DESKTOP-0CRLI75:11388)
18: In for (ic in 1:sim$chains) { … :
closing unused connection 49 (<-DESKTOP-0CRLI75:11388)
19: In for (ic in 1:sim$chains) { … :
closing unused connection 48 (<-DESKTOP-0CRLI75:11388)
20: In for (ic in 1:sim$chains) { … :
closing unused connection 47 (<-DESKTOP-0CRLI75:11388)
21: In for (ic in 1:sim$chains) { … :
closing unused connection 46 (<-DESKTOP-0CRLI75:11388)
22: In for (ic in 1:sim$chains) { … :
closing unused connection 45 (<-DESKTOP-0CRLI75:11388)
23: In for (ic in 1:sim$chains) { … :
closing unused connection 44 (<-DESKTOP-0CRLI75:11388)
24: In for (ic in 1:sim$chains) { … :
closing unused connection 43 (<-DESKTOP-0CRLI75:11388)
25: In for (ic in 1:sim$chains) { … :
closing unused connection 42 (<-DESKTOP-0CRLI75:11388)
26: In for (ic in 1:sim$chains) { … :
closing unused connection 41 (<-DESKTOP-0CRLI75:11388)
27: In for (ic in 1:sim$chains) { … :
closing unused connection 40 (<-DESKTOP-0CRLI75:11388)
28: In for (ic in 1:sim$chains) { … :
closing unused connection 39 (<-DESKTOP-0CRLI75:11388)
29: In for (ic in 1:sim$chains) { … :
closing unused connection 38 (<-DESKTOP-0CRLI75:11388)
30: In for (ic in 1:sim$chains) { … :
closing unused connection 37 (<-DESKTOP-0CRLI75:11388)
31: In for (ic in 1:sim$chains) { … :
closing unused connection 36 (<-DESKTOP-0CRLI75:11388)
32: In for (ic in 1:sim$chains) { … :
closing unused connection 35 (<-DESKTOP-0CRLI75:11388)
33: In for (ic in 1:sim$chains) { … :
closing unused connection 34 (<-DESKTOP-0CRLI75:11388)
34: In for (ic in 1:sim$chains) { … :
closing unused connection 33 (<-DESKTOP-0CRLI75:11388)
35: In for (ic in 1:sim$chains) { … :
closing unused connection 32 (<-DESKTOP-0CRLI75:11388)
36: In for (ic in 1:sim$chains) { … :
closing unused connection 31 (<-DESKTOP-0CRLI75:11388)
37: In for (ic in 1:sim$chains) { … :
closing unused connection 30 (<-DESKTOP-0CRLI75:11388)
38: In for (ic in 1:sim$chains) { … :
closing unused connection 29 (<-DESKTOP-0CRLI75:11388)
39: In for (ic in 1:sim$chains) { … :
closing unused connection 28 (<-DESKTOP-0CRLI75:11388)
40: In for (ic in 1:sim$chains) { … :
closing unused connection 27 (<-DESKTOP-0CRLI75:11388)
41: In for (ic in 1:sim$chains) { … :
closing unused connection 26 (<-DESKTOP-0CRLI75:11388)
42: In for (ic in 1:sim$chains) { … :
closing unused connection 25 (<-DESKTOP-0CRLI75:11388)
43: In for (ic in 1:sim$chains) { … :
closing unused connection 24 (<-DESKTOP-0CRLI75:11388)

I was struggling for a long time with this particular issue so thanks a lot all for your help!

1 Like