- n
integer number of daemons to launch.
- url
if specified, a character string comprising a URL at which to
listen for remote daemons, including a port accepting incoming connections,
e.g. 'tcp://hostname:5555' or 'tcp://10.75.32.70:5555'. Specify a URL with
scheme 'tls+tcp://' to use secure TLS connections (for details see
Distributed Computing section below). Auxiliary function host_url()
may
be used to construct a valid host URL.
- remote
(required only for launching remote daemons) a configuration
generated by ssh_config()
, cluster_config()
, or remote_config()
.
- dispatcher
logical value, whether to use dispatcher. Dispatcher runs
in a separate process to ensure optimal scheduling, and should normally be
kept on (for details see Dispatcher section below).
- ...
(optional) additional arguments passed through to daemon()
if
launching daemons. These include asyncdial
, autoexit
, cleanup
,
output
, maxtasks
, idletime
, walltime
and tlscert
.
- sync
logical value, whether to evaluate mirai synchronously in the
current process. Setting to TRUE substantially changes the behaviour of
mirai by causing them to be evaluated immediately after creation. This
facilitates testing and debugging, e.g. via an interactive browser()
. In
this case, arguments other than seed
and .compute
are disregarded.
- seed
(optional) The default of NULL initializes L'Ecuyer-CMRG RNG
streams for each daemon, the same as base R's parallel package. Results are
statistically-sound, although generally non-reproducible, as which tasks
are sent to which daemons may be non-deterministic, and also depends on the
number of daemons.
(experimental) supply an integer value to instead initialize a
L'Ecuyer-CMRG RNG stream for the compute profile. This is advanced for each
mirai evaluation, hence allowing for reproducible results, as the random
seed is always associated with a given mirai, independently of where it is
evaluated.
- serial
(optional, requires dispatcher) a configuration created by
serial_config()
to register serialization and unserialization functions
for normally non-exportable reference objects, such as Arrow Tables or
torch tensors. If NULL, configurations registered with register_serial()
are automatically applied.
- tls
(optional for secure TLS connections) if not supplied,
zero-configuration single-use keys and certificates are automatically
generated when required. If supplied, either the character path to
a file containing the PEM-encoded TLS certificate and associated private
key (may contain additional certificates leading to a validation chain,
with the TLS certificate first), or a length 2 character vector
comprising (i) the TLS certificate (optionally certificate chain) and
(ii) the associated private key.
- pass
(required only if the private key supplied to tls
is encrypted
with a password) For security, should be provided through a function that
returns this value, rather than directly.
- .compute
character value for the compute profile to use (each has its
own independent set of daemons), or NULL to use the 'default' profile.