harvard-ufds / saeczi

Small Area Estimation for Continuous Zero Inflated data
https://harvard-ufds.github.io/saeczi/
Other
4 stars 2 forks source link

diagnose parallel bug #28

Closed joshyam-k closed 8 months ago

joshyam-k commented 8 months ago

The following code currently throws a mysterious error for me that I am having a hard time debugging

data(pop)
data(samp)
future::plan('multisession', workers = 6)
result <- saeczi(samp_dat = samp,
                 pop_dat = pop, 
                 lin_formula =  DRYBIO_AG_TPA_live_ADJ ~ tcc16 + elev,
                 log_formula = DRYBIO_AG_TPA_live_ADJ ~ tcc16 + elev,
                 domain_level = "COUNTYFIPS",
                 mse_est = TRUE,
                 B = 500L,
                 parallel = TRUE)

This gives me

Error in names(object) <- nm : attempt to set an attribute on NULL

It only happens when the parallel parameter is set to true and I know that for some reason the preds_full object which is the output of running generate_mse() is getting set to NULL at some stage.

joshyam-k commented 8 months ago

fixed!