bbolker / bbolker/R2admb

race conditions

Open
#3 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Smarty
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Description

I have encountered some problems with haphazard (!!) errors when running R2admb repeatedly over many subsets of data. I think the problem is a _race condition_, i.e. R notices that ADMB has finished running and tries to read the output files before the operating system has actually finished closing/finalizing the writes to (I don't know the precise terminology) the output files. I don't have a really good reproducible answer, but one place I think I repeatedly got bitten by this was trying to read profile output when ADMB was given starting conditions that were exactly at the MLE ... anyway, worth watching out for. The fix might be a simple as sleeping for a moment (although obviously that could be detrimental if someone were running R2admb 1000s of times in a case where the delay was unnecessary). I don't know if there's some way to check via the OS, and I also don't know if I might have an unusual setup (running Linux in a virtual machine, with the file system linked from the MacOS side of the machine) that exacerbates the problem for me.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing repeated R2admb runs over data subsets, especially profile output when ADMB starts at the MLE, in the reported virtualized Linux/macOS filesystem setup. Trace how R2admb detects ADMB completion and reads its output files; done means repeated runs reliably read complete output without an unnecessary fixed delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.