crew_controller_lsf {crew.cluster} | R Documentation |
Create a controller with a LSF launcher.
Description
Create an R6
object to submit tasks and
launch workers on LSF workers.
Usage
crew_controller_lsf(
name = NULL,
workers = 1L,
host = NULL,
port = NULL,
tls = crew::crew_tls(mode = "automatic"),
tls_enable = NULL,
tls_config = NULL,
seconds_interval = 0.25,
seconds_timeout = 60,
seconds_launch = 86400,
seconds_idle = Inf,
seconds_wall = Inf,
seconds_exit = NULL,
retry_tasks = TRUE,
tasks_max = Inf,
tasks_timers = 0L,
reset_globals = TRUE,
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
verbose = FALSE,
command_submit = as.character(Sys.which("bsub")),
command_terminate = as.character(Sys.which("bkill")),
command_delete = NULL,
script_directory = tempdir(),
script_lines = character(0L),
lsf_cwd = getwd(),
lsf_log_output = "/dev/null",
lsf_log_error = "/dev/null",
lsf_memory_gigabytes_limit = NULL,
lsf_memory_gigabytes_required = NULL,
lsf_cores = NULL
)
Arguments
name |
Name of the client object. If |
workers |
Integer, maximum number of parallel workers to run. |
host |
IP address of the |
port |
TCP port to listen for the workers. If |
tls |
A TLS configuration object from |
tls_enable |
Deprecated on 2023-09-15 in version 0.4.1.
Use argument |
tls_config |
Deprecated on 2023-09-15 in version 0.4.1.
Use argument |
seconds_interval |
Number of seconds between
polling intervals waiting for certain internal
synchronous operations to complete,
such as checking |
seconds_timeout |
Number of seconds until timing
out while waiting for certain synchronous operations to complete,
such as checking |
seconds_launch |
Seconds of startup time to allow.
A worker is unconditionally assumed to be alive
from the moment of its launch until |
seconds_idle |
Maximum number of seconds that a worker can idle
since the completion of the last task. If exceeded, the worker exits.
But the timer does not launch until |
seconds_wall |
Soft wall time in seconds.
The timer does not launch until |
seconds_exit |
Deprecated on 2023-09-21 in version 0.1.2.9000. No longer necessary. |
retry_tasks |
|
tasks_max |
Maximum number of tasks that a worker will do before
exiting. See the |
tasks_timers |
Number of tasks to do before activating
the timers for |
reset_globals |
|
reset_packages |
|
reset_options |
|
garbage_collection |
|
launch_max |
Positive integer of length 1, maximum allowed
consecutive launch attempts which do not complete any tasks.
Enforced on a worker-by-worker basis.
The futile launch count resets to back 0
for each worker that completes a task.
It is recommended to set |
verbose |
Logical, whether to see console output and error messages when submitting worker. |
command_submit |
Character of length 1, file path to the executable to submit a worker job. |
command_terminate |
Character of length 1,
file path to the executable to terminate a worker job.
Set to |
command_delete |
Deprecated on 2024-01-08 (version 0.1.4.9001).
Use |
script_directory |
Character of length 1, directory path to the
job scripts. Just before each job submission, a job script
is created in this folder. Script base names are unique to each
launcher and worker, and the launcher deletes the script when the
worker is manually terminated. |
script_lines |
Optional character vector of additional lines to be
added to the job script just after the more common flags.
An example would be |
lsf_cwd |
Character of length 1, directory to
launch the worker from (as opposed to
the system default). |
lsf_log_output |
Character of length 1, file pattern to control
the locations of the LSF worker log files. By default, both standard
output and standard error go to the same file.
|
lsf_log_error |
Character of length 1, file pattern for standard
error. |
lsf_memory_gigabytes_limit |
Positive numeric of length 1
with the limit in gigabytes
|
lsf_memory_gigabytes_required |
Positive numeric of length 1
with the memory requirement in gigabytes
|
lsf_cores |
Optional positive integer of length 1,
number of CPU cores for the worker.
|
Details
WARNING: the crew.cluster
LSF plugin is experimental
and has not actually been tested on a LSF cluster. Please proceed
with caution and report bugs to
https://github.com/wlandau/crew.cluster.
Attribution
The template files at
https://github.com/mschubert/clustermq/tree/master/inst
informed the development of the crew
launcher plugins in
crew.cluster
, and we would like to thank
Michael Schubert for developing clustermq
and releasing it under
the permissive Apache License 2.0.
See the NOTICE
and README.md
files in the crew.cluster
source code for additional attribution.
See Also
Other lsf:
crew_class_launcher_lsf
,
crew_launcher_lsf()
Examples
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
controller <- crew_controller_lsf()
controller$start()
controller$push(name = "task", command = sqrt(4))
controller$wait()
controller$pop()$result
controller$terminate()
}