parallelly
parallelly copied to clipboard
makeClusterPSOCK(): Add `rscript_options`
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
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.