-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memfrac lower than 0.1 #476
Comments
Thanks for reporting this. I ran into the very same issue myself a while ago, and worked around it; but never fixed it. I now changed terra so that you can set This will go to CRAN very soon, but it may take a while for it to hit your cluster. With older versions, a work-around is to use argument In my case, I opted for processing by tiles, which can be nice if you have relatively few, but very large files. It is a bit more involved, and it is on my to-do list to generalize that and make it available to all functions, as an option. It would allow you to specify the number of tiles, and the tile number so that you can parallelize. Tiles go to a folder with a .vrt file that virtually combines them. The benefit was that if a job got killed, none of the tiles already done were lost. One reason why I did not fix this earlier that I was wondering if there would be a generic way to discover the number of cores that share the available RAM so that the memory available can be automatically adjusted; but that may be rather complicated or system specific like calling slurm commands. However, another possibility would be to allow setting the available RAM as an option. I think I will add that. |
This should be perfect! Also, I wasn't aware of the |
terra now has a new option
|
Thanks! This is a huge help to be able to control memory usage either by the fraction of the total or the absolute amount of RAM. |
I'm running some
terra
code on a cluster with slurm where each node has 256 GB RAM and 64 cores. For a given job, the amount of RAM allocated is proportional to the number of cores (e.g. 4 GB for 2 cores), however,terra
seems to think it has access to all 256 GB, and I'm consistently having my jobs killed because they're using too much RAM. I tried usingterraOptions(memfrac = 0.015)
(4/256 = 0.015), however, this silently uses 0.1 instead, which is the lower threshold specified in theterraOptions()
documentation. Is there a way to use a lowermemfrac
or another way to control memory usage ofterra
.The text was updated successfully, but these errors were encountered: