Two users have experienced a bug associated with function scoping. Here is a reproducible example:
run_on_cluster( first={ sim <- new_sim() fn_level_2 <- function(nseq) { return(999) } fn_level_1 <- function(nseq) { fn_level_2(n) } sim %<>% set_script(function(){ x <- fn_level_1(nseq=L$n) return(list(x=x, y=runif(1))) }) sim %<>% set_levels(n=3) sim %<>% set_config(num_sim=10) }, main={ sim %<>% run() }, last={}, cluster_config=list(js="slurm") )
This works if the declaration of fn_level_2
is moved above run_on_cluster
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4