How to configure future.global.maxSize in R?

Can someone help me figure out how to change the maximum size of global objects passed to an element in a future package?

Here is a useless example that shows my point

library(future) a = 1:200000000 object.size(a) test %<-% head(a) 

I get the following error:

Error in getGlobalsAndPackages (expr, envir = envir, persistent = persistent :: The total size of all global objects that should be exported for a future expression ("head (a)) is 762.95 MiB. This exceeds the maximum size of 500.00 MiB (option 'Future.global.maxSize'). There are two globals: 'a (762.94 MB class' numeric) and' head (function 10.05 KiB class).

Can someone help me understand how to configure this parameter future.global.maxSize? I tried options(future.global.maxSize = 1500000) , but that did not work.

+6
source share
1 answer

Got this and realized how you can edit the parameters for any package.

This is the line I used:

 options(future.globals.maxSize= 891289600) 

If you want to set your limit, I saw in the packet source that the limit was calculated, and this is how you calculate the size for the 850 μs limit:

 850*1024^2 = 891289600 

Thanks!

+6
source

Source: https://habr.com/ru/post/1012235/


All Articles