Diagnosing machine-specific sampling problem (brms, cmdstanr)

Hello! I am running into a perplexing issue with fitting brms models on my PC. I say that this is a “machine specific” problem because it only occurs on a specific PC, and does not happen on any of my other computers (my work laptop and desktop).

Specifically, whenever I attempt to fit any model using brms (even the tutorial), I receive something like the following warning:

library(brms)
prior1 <- prior(normal(0,10), class = b) +
  prior(cauchy(0,2), class = sd)
fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient),
            data = epilepsy, family = poisson(), prior = prior1,
            backend = "cmdstanr")

Chain 3 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 3 Exception: poisson_log_glm_lpmf: Intercept[1] is inf, but must be finite! (in 'C:/Users/rydbe/AppData/Local/Temp/RtmpC4ekvt/model-11dc8002898.stan', line 51, column 4 to column 50)
Chain 3 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 3 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.

In this case, the model does fit, but for more complex models sampling never occurs. The warnings are specific to the likelihood specified in the model. For instance, a more complex item response model with a bernoulli likelihood produces a similar warning, but never actually samples.

I am able to fit models using rstanarm just fine. I was able to run the example stan model from the cmdstanr tutorial just fine as well. I am really over my head when it comes to diagnosing why this is occuring on this specific machine and not my other computers. I’ll note that I have already tried reinstalling both brms and cmdstan.

> sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] brms_2.20.1 Rcpp_1.0.11

loaded via a namespace (and not attached):
  [1] gridExtra_2.3        inline_0.3.19        rlang_1.1.1          magrittr_2.0.3       matrixStats_1.0.0    compiler_4.3.1      
  [7] loo_2.6.0            callr_3.7.3          vctrs_0.6.3          reshape2_1.4.4       stringr_1.5.0        crayon_1.5.2        
 [13] pkgconfig_2.0.3      fastmap_1.1.1        backports_1.4.1      ellipsis_0.3.2       utf8_1.2.3           cmdstanr_0.6.0      
 [19] threejs_0.3.3        promises_1.2.1       markdown_1.7         ps_1.7.5             nloptr_2.0.3         purrr_1.0.2         
 [25] xfun_0.40            jsonlite_1.8.7       later_1.3.1          sjmisc_2.8.9         ggeffects_1.2.3      prettyunits_1.1.1   
 [31] broom_1.0.5          parallel_4.3.1       R6_2.5.1             dygraphs_1.1.1.6     StanHeaders_2.26.27  stringi_1.7.12      
 [37] boot_1.3-28.1        estimability_1.4.1   rstan_2.21.8         knitr_1.43           modelr_0.1.11        zoo_1.8-12          
 [43] base64enc_0.1-3      bayesplot_1.10.0     httpuv_1.6.11        Matrix_1.6-0         splines_4.3.1        igraph_1.5.1        
 [49] tidyselect_1.2.0     rstudioapi_0.15.0    abind_1.4-5          codetools_0.2-19     miniUI_0.1.1.1       sjlabelled_1.2.0    
 [55] processx_3.8.2       pkgbuild_1.4.2       lattice_0.21-8       tibble_3.2.1         plyr_1.8.8           withr_2.5.0         
 [61] shiny_1.7.4.1        robustHD_0.7.4       bridgesampling_1.1-2 bayestestR_0.13.1    posterior_1.4.1      coda_0.19-4         
 [67] RcppParallel_5.1.7   xts_0.13.1           pillar_1.9.0         tensorA_0.36.2       checkmate_2.2.0      DT_0.28             
 [73] stats4_4.3.1         insight_0.19.3       shinyjs_2.1.0        distributional_0.3.2 generics_0.1.3       ggplot2_3.4.2       
 [79] rstantools_2.3.1.1   munsell_0.5.0        scales_1.2.1         minqa_1.2.5          gtools_3.9.4         xtable_1.8-4        
 [85] glue_1.6.2           sjPlot_2.8.14        emmeans_1.8.7        tools_4.3.1          shinystan_2.6.0      data.table_1.14.8   
 [91] robustbase_0.99-0    lme4_1.1-34          colourpicker_1.2.0   mvtnorm_1.2-2        grid_4.3.1           tidyr_1.3.0         
 [97] crosstalk_1.2.0      colorspace_2.1-0     nlme_3.1-162         performance_0.10.4   cli_3.6.1            perry_0.3.1         
[103] fansi_1.0.4          Brobdingnag_1.2-9    sjstats_0.18.2       dplyr_1.1.2          gtable_0.3.3         DEoptimR_1.1-1      
[109] digest_0.6.33        htmlwidgets_1.6.2    farver_2.1.1         htmltools_0.5.5      lifecycle_1.0.3      mime_0.12           
[115] shinythemes_1.2.0    MASS_7.3-60         

For my machine specs…

OS Name	Microsoft Windows 11 Home
Version	10.0.22621 Build 22621
Other OS Description 	Not Available
OS Manufacturer	Microsoft Corporation
System Name	JASON-ENVY-DESK
System Manufacturer	HP
System Model	HP ENVY Desktop TE02-0xxx
System Type	x64-based PC
System SKU	319M1AA#ABA
Processor	12th Gen Intel(R) Core(TM) i7-12700, 2100 Mhz, 12 Core(s), 20 Logical Processor(s)
BIOS Version/Date	AMI F.30, 3/17/2023
SMBIOS Version	3.4
Embedded Controller Version	90.28
BIOS Mode	UEFI
BaseBoard Manufacturer	HP
BaseBoard Product	894B
BaseBoard Version	10
Platform Role	Desktop
Secure Boot State	On
PCR7 Configuration	Elevation Required to View
Windows Directory	C:\windows
System Directory	C:\windows\system32
Boot Device	\Device\HarddiskVolume1
Locale	United States
Hardware Abstraction Layer	Version = "10.0.22621.1413"
User Name	Jason-Envy-Desk\rydbe
Time Zone	Eastern Daylight Time
Installed Physical Memory (RAM)	32.0 GB
Total Physical Memory	31.7 GB
Available Physical Memory	17.1 GB
Total Virtual Memory	36.4 GB
Available Virtual Memory	17.2 GB
Page File Space	4.75 GB
Page File	C:\pagefile.sys
Kernel DMA Protection	On
Virtualization-based security	Running
Virtualization-based security Required Security Properties	
Virtualization-based security Available Security Properties	Base Virtualization Support, Secure Boot, DMA Protection, UEFI Code Readonly, SMM Security Mitigations 1.0, Mode Based Execution Control, APIC Virtualization
Virtualization-based security Services Configured	Hypervisor enforced Code Integrity
Virtualization-based security Services Running	Hypervisor enforced Code Integrity
Windows Defender Application Control policy	Enforced
Windows Defender Application Control user mode policy	Off
Device Encryption Support	Elevation Required to View
A hypervisor has been detected. Features required for Hyper-V will not be displayed.