piLaboratory / GillesCom

Gillespie Simulation of Ecological Communities Dynamics
2 stars 0 forks source link

Persistence in C is not sustainable for multiple simulations #19

Closed Lobz closed 7 years ago

andrechalom commented 8 years ago

Trying to set up the object persistence using an Rcpp module. I've made a lot of progress on branches rcpp_module (in which I've transformed Community in a module) and record_times (in which I created a new module for the Trajectories). Using a module means that the persistence is handled by an external pointer, so the data is actually in the C layer - but we don't need to worry about managing a single community or garbage collecting. That's some impressive work from the Rcpp team!

Some problems that I've found:

> old_community
Error: external pointer is not valid

This can't be fixed using a simple save(old_community, file='x.rdata'), so we still need the file persistence functions.

andrechalom commented 8 years ago

[EDIT: works with stochastic very well, still need to check the parallel (pse?)]

TODO: need to check if this works fine with stochastic AND if this works fine in parallel computing