Skip to content

Commit db00a0e

Browse files
HELP: Update all HPC example to (a) request the same resources and (b) to use also the 'asis' specifier
1 parent 35d6d46 commit db00a0e

11 files changed

+67
-25
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future.batchtools
2-
Version: 0.12.2-9949
2+
Version: 0.12.2-9950
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

R/batchtools_lsf.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ BatchtoolsLsfFutureBackend <- function(...) {
3636
#' @examplesIf interactive()
3737
#' library(future)
3838
#'
39-
#' # Limit runtime to 3 minutes and memory to 200 MiB per future
40-
#' plan(future.batchtools::batchtools_lsf, resources = list(W = "00:03:00", M = "200"))
39+
#' # Limit runtime to 10 minutes and total memory to 400 MiB per future,
40+
#' # request a parallel environment with four slots on a single host.
41+
#' # Submit to the 'freecycle' queue.
42+
#' plan(future.batchtools::batchtools_lsf, resources = list(
43+
#' W = "00:10:00", M = "400",
44+
#' asis = c("-n 4", "-R 'span[hosts=1]'", "-q freecycle")
45+
#' ))
4146
#'
4247
#' f <- future(Sys.info())
4348
#' info <- value(f)

R/batchtools_openlava.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ BatchtoolsOpenLavaFutureBackend <- function(...) {
3636
#' @examplesIf interactive()
3737
#' library(future)
3838
#'
39-
#' # Limit runtime to 3 minutes and memory to 200 MiB per future
40-
#' plan(future.batchtools::batchtools_lsf, resources = list(W = "00:03:00", M = "200"))
39+
#' # Limit runtime to 10 minutes and total memory to 400 MiB per future,
40+
#' # request a parallel environment with four slots on a single host.
41+
#' # Submit to the 'freecycle' queue.
42+
#' plan(future.batchtools::batchtools_openlava, resources = list(
43+
#' W = "00:10:00", M = "400",
44+
#' asis = c("-n 4", "-R 'span[hosts=1]'", "-q freecycle")
45+
#' ))
4146
#'
4247
#' f <- future(Sys.info())
4348
#' info <- value(f)

R/batchtools_sge.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ BatchtoolsSGEFutureBackend <- function(...) {
4040
#' @examplesIf interactive()
4141
#' library(future)
4242
#'
43-
#' # Limit runtime to 3 minutes and memory to 200 MiB per future,
44-
#' # request two slots and run in the current working directory.
43+
#' # Limit runtime to 10 minutes and memory to 400 MiB per future,
44+
#' # request a parallel environment with four slots on a single host.
45+
#' # Submit to the 'freecycle' queue.
4546
#' plan(future.batchtools::batchtools_sge, resources = list(
46-
#' h_rt = "00:03:00", mem_free = "200M",
47-
#' asis = c("-pe smp 2", "-cwd")
47+
#' h_rt = "00:10:00", mem_free = "100M", ## memory is per process
48+
#' asis = c("-pe smp 4", "-q freecycle.q")
4849
#' ))
4950
#'
5051
#' f <- future(Sys.info())

R/batchtools_slurm.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ BatchtoolsSlurmFutureBackend <- function(...) {
4141
#' @examplesIf interactive()
4242
#' library(future)
4343
#'
44-
#' # Limit runtime to 3 minutes and memory to 200 MiB per future
45-
#' plan(future.batchtools::batchtools_slurm, resources = list(time = "00:03:00", mem = "200M"))
44+
#' # Limit runtime to 10 minutes and memory to 400 MiB per future,
45+
#' # request a parallel environment with four slots on a single host.
46+
#' # Submit to the 'freecycle' partition.
47+
#' plan(future.batchtools::batchtools_slurm, resources = list(
48+
#' time = "00:10:00", mem = "400M",
49+
#' asis = c("--nodes=1", "-ntasks=4", "--partition=freecycle")
50+
#' ))
4651
#'
4752
#' f <- future(Sys.info())
4853
#' info <- value(f)

R/batchtools_torque.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ BatchtoolsTorqueFutureBackend <- function(...) {
3535
#' @examplesIf interactive()
3636
#' library(future)
3737
#'
38-
#' # Limit runtime to 3 minutes and memory to 200 MiB per future
39-
#' plan(future.batchtools::batchtools_torque, resources = list(walltime = "00:03:00", mem = "200mb"))
38+
#' # Limit runtime to 10 minutes and total memory to 400 MiB per future,
39+
#' # request a parallel environment with four slots on a single host.
40+
#' # Submit to the 'freecycle' queue.
41+
#' plan(future.batchtools::batchtools_torque, resources = list(
42+
#' walltime = "00:10:00", mem = "100mb", ## memory is per process
43+
#' asis = c("-l nodes=1:ppn=4", "-q freecycle")
44+
#' ))
4045
#'
4146
#' f <- future(Sys.info())
4247
#' info <- value(f)

man/batchtools_lsf.Rd

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/batchtools_openlava.Rd

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/batchtools_sge.Rd

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/batchtools_slurm.Rd

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)