gbradburd/conStruct

Issue compiling stan models

Closed this issue · 4 comments

kdm9 commented

Hi folks,

There's something funny going on with compiling stan model blocks on our HPC system. Namely, compiling while running parallel R instances (using either multiple Rscripts with gnu parallel, or with foreach & doFuture), conStruct/rstan irreproducibly fails to compile the stan model, or makes a stan model that "has no samples", or just quits with exit status 1, and has no output (no files except the _data.block.Robj are created). Running each model serially does work. There doesn't seem to be any rhyme or reason to which individual inputs cause this to happen.

As an aside, have you considered something along the lines of mvuorre/bmlm#3 ?

If you think that would help my current issue, I'm happy to have a go doing that if you think it would be relatively simple. The stan model blocks don't change with inputs do they? it's always just the same 4 (one/multiK & spatial/nonspatial)?

Cheers,
K

Hi Kevin,

I'm at a conference right now, so I can't get to this immediately, but yeah seems like the rstan-recommended setup as in the bmlm example is the way to go. You're correct that the stan model blocks don't change with input.

So, if you want to take a stab at it, that'd be great. I'm also planning another release in the next 2 weeks (I've been gathering suggestions from early users and making more vignettes), so if your problem isn't pressing I can just add this to the next release.

cheers!
-g

kdm9 commented

Hi Gideon,

I'll take a stab at it.

Any chance one of the extra vignettes is on model comparsion? I'm currently working on that. I'd be happy to give feedback on an early version of the vignette if you'd like!

P.S.: Is there any chance that the conStruct code can be split out of this repo/put in a different branch to the paper data? For some reason the git repo is huge (~1GB AFAICT), so I can't actually clone it to my laptop at the moment. If data files were accidentally added, you can remove them using these instructions.

Cheers,
Kevin

Great!

And yes, I've just started the model comparison vignette. I'll send it your way as soon as it's somewhere.

W/r/t splitting conStruct code out, I think that's out (the proofs are finalized and point to the current github), but I'll remove the big data files from the active repo and replace them with zero size dummies. That way, folks can access the original data files via data dryad and easily see what ought to go where.

Update - I've moved all non-package files to a new repo at gbradburd/conStruct-paper, and this repo contains just the R package now, so that should make cloning it easy and reduce some clutter.