Skip to content

Commit

Permalink
no backslash in log file name; tested on SGE 8.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mschubert committed Dec 13, 2023
1 parent 55f66b9 commit 5ca9f9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions R/qsys_sge.r
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ SGE = R6::R6Class("SGE",
opts$log_file = normalizePath(opts$log_file, mustWork=FALSE)
else if (log_worker)
opts$log_file = sprintf("%s-%s.log", private$job_name, private$array_idx)
filled = fill_template(private$template, opts,
required=c("master", "n_jobs"))
filled = fill_template(private$template, opts, required=c("master", "n_jobs"))

if (verbose)
message("Submitting ", n_jobs, " worker jobs (ID: ", private$job_name, ") ...")
Expand All @@ -41,7 +40,7 @@ SGE = R6::R6Class("SGE",
qsub_stdout = NULL,
job_name = NULL,
job_id = NULL,
array_idx = "\\$TASK_ID",
array_idx = "$TASK_ID",
is_cleaned_up = NULL,

finalize = function(quiet = TRUE) { # self$workers_running == 0
Expand Down
2 changes: 1 addition & 1 deletion vignettes/userguide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ In order to log each worker separately, some schedulers support wildcards in
their log file names. For instance:

* Multicore/Multiprocess: `log_file="/path/to.file.%i"`
* SGE: `log_file="/path/to.file.\$TASK_ID"`
* SGE: `log_file="/path/to.file.$TASK_ID"`
* LSF: `log_file="/path/to.file.%I"`
* Slurm: `log_file="/path/to.file.%a"`
* PBS: `log_file="/path/to.file.$PBS_ARRAY_INDEX"`
Expand Down

0 comments on commit 5ca9f9b

Please sign in to comment.