-
Notifications
You must be signed in to change notification settings - Fork 40
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
terra::rast() doesn't return a variable with workers > 1 #259
Comments
I'm not sure how big |
Are you sure |
If the error message for If it was a pathing issue, which it presumably isn't since there's no issue with Error: [rast] file does not exist: twoGBraster.tif
In addition: Warning message:
twoGBraster.tif: No such file or directory (GDAL error 4) come back. But future may not be able to route that.
Good question! It's only a couple MB, so negligible in this context—32 workers would be better but even 8 GB per worker is maybe asking too much (if this approach to the task had worked I was prepared to kill the |
A repex isn't feasible because multiple gigabytes (actually multiple terabytes in the full use case) of data are involved but I have the following scenario
which fails with
Same code runs fine with
workers = 1
. While this approach isn't ideal (it would likely waste 60+ GB of memory in duplicate copies of a raster which is thread safe since it sees only read access), the preferred implementation of hoistingrast()
out of the function body fails with #258. Since I've got 128 GB of DDR and can afford to waste some is there a way to getrast()
to construct an object under parallel execution?From what I can see at the moment, the least undesirable workaround appears to be refactor the code for single threaded execution, manually chunk and balance the polygons, and then kick off 16 background jobs in RStudio using Code -> Run selection as background job. But, insofar as I understand furrr, that's the sort of task
future_map()
exists to automate.The text was updated successfully, but these errors were encountered: