diff --git a/DESCRIPTION b/DESCRIPTION index aa758226e10c811f8a0faebf029c577a090e5ae1..4b74cadb096989a09d01f8172039f82baee720b1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: startR -Title: Automatically Retrieve Multidimensional Distributed Data Sets +Title: Automatically Retrieve Multidimensional Distributed Data Sets Version: 0.1.3 Authors@R: c( person("BSC-CNS", role = c("aut", "cph")), @@ -8,7 +8,15 @@ Authors@R: c( person("Javier", "Vegas", , "javier.vegas@bsc.es", role = c("ctb")), person("Pierre-Antoine", "Bretonniere", , "pierre-antoine.bretonniere@bsc.es", role = c("ctb")), person("Roberto", "Serrano", , "rsnotivoli@gmal.com", role = c("ctb"))) -Description: Tool to automatically fetch, transform and arrange subsets of multidimensional data sets (collections of files) stored in local and/or remote file systems or servers, using multicore capabilities where possible. The tool provides an interface to perceive a collection of data sets as a single large multidimensional data array, and enables the user to request for automatic retrieval, processing and arrangement of subsets of the large array. Wrapper functions to add support for custom file formats can be plugged in/out, making the tool suitable for any research field where large multidimensional data sets are involved. +Description: Tool to automatically fetch, transform and arrange subsets of + multidimensional data sets (collections of files) stored in local and/or remote + file systems or servers, using multicore capabilities where possible. The tool + provides an interface to perceive a collection of data sets as a single large + multidimensional data array, and enables the user to request for automatic + retrieval, processing and arrangement of subsets of the large array. Wrapper + functions to add support for custom file formats can be plugged in/out, making + the tool suitable for any research field where large multidimensional data sets + are involved. Depends: R (>= 3.2.0) Imports: diff --git a/R/ByChunks.R b/R/ByChunks.R index 3959edbe795b367a73e8c66ea71bc0c3dd0287cb..8c293b9fb568053f19f3b638c0ba327432b15ca3 100644 --- a/R/ByChunks.R +++ b/R/ByChunks.R @@ -81,6 +81,7 @@ ByChunks <- function(step_fun, cube_headers, ..., chunks = 'auto', lib_dir = NULL, init_commands = list(''), r_module = 'R', + CDO_module = NULL, ecflow_module = 'ecFlow', node_memory = NULL, cores_per_job = NULL, @@ -99,7 +100,8 @@ ByChunks <- function(step_fun, cube_headers, ..., chunks = 'auto', } if (any(!(names(cluster) %in% c('queue_host', 'queue_type', 'data_dir', 'temp_dir', 'lib_dir', 'init_commands', - 'r_module', 'ecflow_module', 'node_memory', + 'r_module', 'CDO_module', + 'ecflow_module', 'node_memory', 'cores_per_job', 'job_wallclock', 'max_jobs', 'extra_queue_params', 'bidirectional', 'polling_period', 'special_setup')))) { @@ -165,9 +167,19 @@ ByChunks <- function(step_fun, cube_headers, ..., chunks = 'auto', stop("The component 'r_module' of the parameter 'cluster' must be a character string.") } if ((nchar(cluster[['r_module']]) < 1) || (grepl(' ', cluster[['r_module']]))) { - stop("The component 'r_module' of the parameter 'cluster' must have at least one character ", + stop("The component 'r_module' of the parameter 'cluster' must have at least one character ", "and contain no blank spaces.") } + if (!is.null(cluster[['CDO_module']])) { + if (!is.character(cluster[['CDO_module']])) { + stop("The component 'CDO_module' of the parameter 'cluster' must be a character string.") + } + if (nchar(cluster[['CDO_module']]) < 1 || grepl(' ', cluster[['CDO_module']])) { + warning("The component 'CDO_module' of parameter 'cluster' must have ", + " than 1 and only the first element will be used.") + } + cluster[['r_module']] <- paste(cluster[['r_module']], cluster[['CDO_module']]) + } if (!is.character(cluster[['ecflow_module']])) { stop("The component 'ecflow_module' of the parameter 'cluster' must be a character string.") }