crew_launcher_sge {crew.cluster} | R Documentation |
Create a launcher with Sun Grid Engine (SGE) workers.
Description
Create an R6
object to launch and maintain
workers as Sun Grid Engine (SGE) jobs.
Usage
crew_launcher_sge(
name = NULL,
seconds_interval = 0.5,
seconds_timeout = 60,
seconds_launch = 86400,
seconds_idle = Inf,
seconds_wall = Inf,
tasks_max = Inf,
tasks_timers = 0L,
reset_globals = TRUE,
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
tls = crew::crew_tls(mode = "automatic"),
verbose = FALSE,
command_submit = as.character(Sys.which("qsub")),
command_terminate = as.character(Sys.which("qdel")),
command_delete = NULL,
script_directory = tempdir(),
script_lines = character(0L),
sge_cwd = TRUE,
sge_envvars = FALSE,
sge_log_output = "/dev/null",
sge_log_error = NULL,
sge_log_join = TRUE,
sge_memory_gigabytes_limit = NULL,
sge_memory_gigabytes_required = NULL,
sge_cores = NULL,
sge_gpu = NULL
)
Arguments
name |
Name of the launcher. |
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 |
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 |
tls |
A TLS configuration object from |
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 |
sge_cwd |
Logical of length 1, whether to
launch the worker from the current working directory (as opposed to
the user home directory). |
sge_envvars |
Logical of length 1, whether to forward the environment
variables of the current session to the SGE worker. |
sge_log_output |
Character of length 1, file or directory path to SGE
worker log files for standard output.
|
sge_log_error |
Character of length 1, file or directory path to SGE
worker log files for standard error.
|
sge_log_join |
Logical, whether to join the stdout and stderr log
files together into one file. |
sge_memory_gigabytes_limit |
Optional numeric of length 1
with the maximum number of gigabytes of memory a worker is allowed to
consume. If the worker consumes more than this level of memory, then
SGE will terminate it. |
sge_memory_gigabytes_required |
Optional positive numeric of length 1
with the gigabytes of memory required to run the worker.
|
sge_cores |
Optional positive integer of length 1,
number of cores per worker ("slots" in SGE lingo).
|
sge_gpu |
Optional integer of length 1 with the number of GPUs to
request for the worker. |
Details
To launch a Sun Grid Engine (SGE) worker, this launcher
creates a temporary job script with a call to crew::crew_worker()
and submits it as an SGE job with qsub
. To see most of the lines
of the job script in advance, use the script()
method of the launcher.
It has all the lines except for the job name and the
call to crew::crew_worker()
, both of
which will be inserted at the last minute when it is time
to actually launch a worker.
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 sge:
crew_class_launcher_sge
,
crew_class_monitor_sge
,
crew_controller_sge()
,
crew_monitor_sge()