sjevelazco/flexsdm

Memory overflow

pedrosenna opened this issue · 3 comments

Hello everyone,

is there any way to reduce the memory allocation of flexsdm? Its simply impossible for me to run some functions, like correct_colinvar() and sdm_predict() since it eats up all memory of my notebook (i7-7500, 16 GB RAM, Ubuntu 22) and i'm using 13 cropped layers of 5400 x 6000 and ~1 km resolution. My notebook is not the best for the task but i feel this memory issue can make some people simply drop the package, mostly students and people who cannot afford for better setups.

For example, raster and terra packages create temp files on a temp dir and allows the user to set memory fraction manually when using rasterOptions(memfrac= value) or terraOptions(memfrac= value). It also can process files into chunks if needed as well.

Sincerely,

Pedro Bittencourt

Dear Pedro

We implemented in the flexsdm v.1.3.3 the possibility of sample rasters to reduce machine memory and speed up the process in correct_colinvar function and predict model in chunks to reduce machine memory in sdm_predict.

Thank you for these suggestions!

Dear Pedro

We implemented in the flexsdm v.1.3.3 the possibility of sample rasters to reduce machine memory and speed up the process in correct_colinvar function and predict model in chunks to reduce machine memory in sdm_predict.

Thank you for these suggestions!

That's amazing! Thanks a lot!