Hi @jonah,
I am working on a package that depends on brms to fit various non-linear models. We have set up GitHub Actions to run R CMD check on various OS. It checks fine for osx and linux, however we started getting these error messages when it builds the vignette (which contains multiple independent calls to brms) during check on Windows which I think are related to this thread:
==== C stack trace ===============================
(No symbol) [0x0x67d2fd80]
R_RunWeakRefFinalizer [0x0x6c83373f+383]
R_RunWeakRefFinalizer [0x0x6c8339ed+1069]
R_initAssignSymbols [0x0x6c7f6ac5+73941]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_initAssignSymbols [0x0x6c7f2b47+57687]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_has_methods_attached [0x0x6c83a588+920]
R_has_methods_attached [0x0x6c83b0f4+3844]
R_initAssignSymbols [0x0x6c7ebdd1+29665]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_initAssignSymbols [0x0x6c7f2b47+57687]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_has_methods_attached [0x0x6c83a588+920]
R_has_methods_attached [0x0x6c83b0f4+3844]
R_initAssignSymbols [0x0x6c7ebdd1+29665]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_initAssignSymbols [0x0x6c7f2b47+57687]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_initAssignSymbols [0x0x6c7f2b47+57687]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
Rf_eval [0x0x6c7fbeac+796]
R_execMethod [0x0x6c800f9a+8378]
Rf_eval [0x0x6c7fc0e5+1365]
R_forceAndCall [0x0x6c801f93+3059]
R_initAssignSymbols [0x0x6c7ebf69+30073]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_initAssignSymbols [0x0x6c7f2b47+57687]
Rf_eval [0x0x6c7fbd01+369]
Rf_eval [0x0x6c7fc5b9+2601]
Rf_eval [0x0x6c7fc004+1140]
R_forceAndCall [0x0x6c802a4a+5802]
R_BadLongVector [0x0x6c83815f+383]
R_initAssignSymbols [0x0x6c7ebdd1+29665]
Rf_eval [0x0x6c7fbd01+369]
R_cmpfun1 [0x0x6c7fd9e0+1152]
Rf_applyClosure [0x0x6c7fec9a+442]
R_initAssignSymbols [0x0x6c7f2b47+57687]
Rf_eval [0x0x6c7fbd01+369]
Rf_eval [0x0x6c7fc5b9+2601]
It seems that the check does fit at least the first model from the vignette because this warning message is spat out as part of the output immediately before the error message:
Start sampling
##[warning]Warning: Found 1 observations with a pareto_k > 0.7 in model 'fit'. It is recommended to set 'moment_match = TRUE' in order to perform moment matching for problematic observations.
Warning:
4 (8.3%) p_waic estimates greater than 0.4. We recommend trying loo instead.
Based on your answers, I have tried to bypass this issue manually creating a Makevars.win
before running R CMD check on windows by adding this to my Actions yml file:
- name: Fix Windows Makevars
if: runner.os == 'Windows'
run: |
dir.create("C:\\Users\\runneradmin\\Documents\\.R", recursive = TRUE)
write("CXX14FLAGS=-O3 -mtune=native", "C:\\Users\\runneradmin\\Documents\\.R\\Makevars.win")
shell: Rscript {0}
But to no avail. The full error log can be checked here under the Check
red cross.
Any ideas how this could be fixed? Thanks!