From 18175edc1a0a24baf39a1e6acc8f23830f292df7 Mon Sep 17 00:00:00 2001 From: Nicolau Manubens Date: Mon, 21 Jan 2019 15:56:08 +0100 Subject: [PATCH 1/3] Small fixes. --- DESCRIPTION | 2 +- R/Compute.R | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a5ae9e7..5447239 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,7 +14,7 @@ Imports: abind, bigmemory, future, - multiApply (>= 2.1.1), + multiApply (>= 2.1.0), parallel Suggests: easyNCDF, diff --git a/R/Compute.R b/R/Compute.R index d3bfcd7..29d6be0 100644 --- a/R/Compute.R +++ b/R/Compute.R @@ -51,7 +51,9 @@ Compute <- function(workflow, chunks = 'auto', operation <- eval(parse(text = op_text)) operation <- Step(operation, attr(workflow$fun, 'TargetDims'), - attr(workflow$fun, 'OutputDims')) + attr(workflow$fun, 'OutputDims'), + attr(workflow$fun, 'UseLibraries'), + attr(workflow$fun, 'UseAttributes')) if (!all(sapply(workflow$inputs, class) == 'startR_header')) { stop("Workflows with only one step supported by now.") -- GitLab From be3662aeb808a1d0fae4857be6fc43281c57186a Mon Sep 17 00:00:00 2001 From: Nicolau Manubens Date: Mon, 21 Jan 2019 19:20:40 +0100 Subject: [PATCH 2/3] Small fix in remote library loading. --- inst/chunking/load_process_save_chunk.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/chunking/load_process_save_chunk.R b/inst/chunking/load_process_save_chunk.R index f2834da..4cf3b57 100644 --- a/inst/chunking/load_process_save_chunk.R +++ b/inst/chunking/load_process_save_chunk.R @@ -78,7 +78,7 @@ t_load <- as.numeric(difftime(t_end_load, t_begin_load, units = 'secs')) t_begin_compute <- Sys.time() if (!is.null(attr(fun, 'UseLibraries'))) { for (i in seq_along(attr(fun, 'UseLibraries'))) { - require(attr(fun, 'UseLibraries')[i]) + require(attr(fun, 'UseLibraries')[i], character.only = TRUE) } } Apply <- multiApply::Apply -- GitLab From d9e9a40f60d62bf510fb435c60cf5105e95d57f3 Mon Sep 17 00:00:00 2001 From: Nicolau Manubens Date: Mon, 21 Jan 2019 19:45:47 +0100 Subject: [PATCH 3/3] Small fix in propagation of chunk indices. --- inst/chunking/load_process_save_chunk.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inst/chunking/load_process_save_chunk.R b/inst/chunking/load_process_save_chunk.R index 4cf3b57..7c1bc8a 100644 --- a/inst/chunking/load_process_save_chunk.R +++ b/inst/chunking/load_process_save_chunk.R @@ -81,6 +81,8 @@ if (!is.null(attr(fun, 'UseLibraries'))) { require(attr(fun, 'UseLibraries')[i], character.only = TRUE) } } +chunk_indices <- setNames(as.integer(chunk_indices), names(chunk_indices)) +chunk_indices <- chunk_indices[names(chunks)[which(chunks > 1)]] Apply <- multiApply::Apply res <- do.call("Apply", c( @@ -89,7 +91,7 @@ res <- do.call("Apply", fun = fun, output_dims = attr(fun, 'OutputDims'), use_attributes = attr(fun, 'UseAttributes'), - extra_info = list(chunk_indices = as.integer(chunk_indices)), + extra_info = list(chunk_indices = chunk_indices), ncores = threads_compute), params ) -- GitLab