parallelly icon indicating copy to clipboard operation
parallelly copied to clipboard

makeClusterPSOCK(): Add `rscript_options`

Open HenrikBengtsson opened this issue 3 years ago • 1 comments

Add argument rscript_options to makeClusterPSOCK(), cf. argument rscript_envs. This can be used to see R options on the cluster nodes on startup. For example,

cl <- makeClusterPSOCK(1, rscript_options=list(socketOptions="no-delay"))

and

options(socketOptions="no-delay")
cl <- makeClusterPSOCK(1, rscript_options="socketOptions")

Background: https://github.com/HenrikBengtsson/future/issues/437

HenrikBengtsson avatar Nov 02 '21 04:11 HenrikBengtsson

The complicated part here is that, contrary to env vars, options can hold objects of any type, which makes then hard to pass via an CLI option. One could serialize them and unserialize on node, but that will add lots of clutter and will have an upper limit.

HenrikBengtsson avatar Nov 03 '21 05:11 HenrikBengtsson