surmann / ODEsensitivity

6 stars 3 forks source link

Using ODEsobol with paralell_eval=T: function cannot use global variables #3

Open egoult opened 4 years ago

egoult commented 4 years ago

Apologies if there is an obvious solution. I am attempting to use ODEsobol to analyse a function, which uses global variables inside the function. It works okay if parallel_eval=F, but when running in parallel it gives the error "object 'Extvariable' not found". I cannot define the Global variables inside the function being analysed, so I am unsure how to avoid this error. Thanks sobol_easy_example.TXT

surmann commented 4 years ago

Is it possible to avoid global variables and define it as a parameter? We start different workers in parallel which don't know about global variables. It works in non-parallel because of the R scoping rules.