Open HenrikBengtsson opened 5 years ago
So, although this is unlikely to happen, here it goes:
This works:
library(future) plan(future.batchtools::batchtools_local) options(future.debug = TRUE) f <- future(42)
But not this:
library(future) loadNamespace("BatchJobs") plan(future.batchtools::batchtools_local) options(future.debug = TRUE) f <- future(42)
which gives:
[12:10:52.163] getGlobalsAndPackages() ... [12:10:52.164] Searching for globals... [12:10:52.165] [12:10:52.166] Searching for globals ... DONE [12:10:52.166] - globals: [0] <none> [12:10:52.166] getGlobalsAndPackages() ... DONE No readable configuration file found Created registry in '/home/hb/repositories/future.batchtools/.future/20190622_121007-qn0hej/batchtools_978006181' using cluster functions 'Interactive' Error in dbDoQuery(reg, query) : Error while etablishing the connection: Error in do.call(reg$db.driver, list()) : 'what' must be a function or character string [12:10:52.431] batchtools::waitForJobs() ... [12:10:52.447] - batchtools::waitForJobs(): TRUE [12:10:52.461] - status(): 'defined', 'finished', 'started', 'submitted' [12:10:52.462] batchtools::waitForJobs() ... done [12:10:52.462] Results: [12:10:52.484] List of 7 [12:10:52.484] $ value : num 42 [12:10:52.484] $ stdout : chr "" [12:10:52.484] $ conditions : list() [12:10:52.484] $ started : POSIXct[1:1], format: "2019-06-22 12:10:09" [12:10:52.484] $ finished : POSIXct[1:1], format: "2019-06-22 12:10:09" [12:10:52.484] $ version : chr "1.8" [12:10:52.484] $ batchtools_log: chr [1:9] "### [bt]: This is batchtools v0.9.11" "### [bt]: Starting calculation of 1 jobs" "### [bt]: Setting working directory to '/home/hb/repositories/future.batchtools'" "### [bt]: Memory measurement disabled" ... [12:10:52.484] - attr(*, "class")= chr "FutureResult" [12:10:52.497] delete(): Option 'future.delete = '<NULL>' Removing 1 jobs ... Removing user function ... Removing 1 obsolete result files ... Removing 1 obsolete log files ... Recursively removing files in '/home/hb/repositories/future.batchtools/.future/20190622_121007-qn0hej/batchtools_607848383' ... [12:10:52.543] delete(): batchtools registry deleted: '/home/hb/repositories/future.batchtools/.future/20190622_121007-qn0hej/batchtools_607848383' Enter a frame number, or 0 to exit 1: future(42) 2: .makeFuture(expr, substitute = FALSE, envir = envir, globals = globals, pac 3: makeFuture(...) 4: BatchtoolsFuture(expr = expr, envir = envir, substitute = FALSE, globals = 5: mprint(reg) 6: message(paste(now(), capture.output(print(...)), sep = "", collapse = "\n") 7: paste(now(), capture.output(print(...)), sep = "", collapse = "\n") 8: capture.output(print(...)) 9: evalVis(expr) 10: withVisible(eval(expr, pf)) 11: eval(expr, pf) 12: eval(expr, pf) 13: print(...) 14: print.Registry(...) 15: cat(" Number of jobs: ", dbGetJobCount(x), "\n") 16: dbGetJobCount(x) 17: dbDoQuery(reg, query) 18: stopf("Error while etablishing the connection: %s", as.character(con)) 19: stop(obj) 20: (function () { replicate(sink.number(), sink(NULL)) if (interactiv
So, although this is unlikely to happen, here it goes:
This works:
But not this:
which gives: