rcannood / GillespieSSA2

Gillespie’s Stochastic Simulation Algorithm for Impatient People ⌛
https://rcannood.github.io/GillespieSSA2/
7 stars 0 forks source link

"maximal number of DLLs reached" when running many sims #9

Closed bbolker closed 1 year ago

bbolker commented 3 years ago

When I initiate many GillespieSSA2 runs in the same R session I appear to hit this:

Error in dyn.load("/tmp/RtmpQbBODP/filea416c7c8373cb/gillespie/sourceCpp-x86_64-pc-linux-gnu-1.0.6/sourcecpp_a416c3b7b9910/sourceCpp_2.so") : 
  unable to load shared object '/tmp/RtmpQbBODP/filea416c7c8373cb/gillespie/sourceCpp-x86_64-pc-linux-gnu-1.0.6/sourcecpp_a416c3b7b9910/sourceCpp_2.so':
  `maximal number of DLLs reached...

I think I can avoid this in the current case by restarting R (I was being lazy), but it seems like a potential issue (I will work on a reproducible example to see what the maximal value is) ...

rcannood commented 3 years ago

Hello @bbolker !

Sorry for the late response.

If your reactions are similar between the runs, you can use compile_reactions() to precompile your reactions once and reuse them in many executions.

Otherwise, I currently don't know of a way around this issue.

Does this solve your problem?

Robrecht

rcannood commented 1 year ago

Closing this issue due to inactivity