Global state on recursion workaround #5810
Unanswered
GregorySchwing
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear NF community:
I am working on a pipeline to run a process M times which uses the previous process' output as its input, but the names of the outputs are different
I.E
process iteration 1
Run0001
process iteration N=2...M
input:
Run000N-1
output:
Run000N
I am doing this in my pipeline:
M=3
md_production_iter_0(1, npt_equilibration.out.gro_file, create_system.out.topol_file, create_system.out.topol_include_files, FF)
md_production_iter_N.recurse(md_production_iter_0.out.observables.collect()).times(M)
and trying to pass the global iteration counter as the first variable, which is incremented inside the processes.
However, the same value is continually passed to the recursive function (its always 2, having been incremented in md_production_iter_0). Incrementing the input variable inside md_production_iter_N and passing the incremented value to the output channel doesnt seem to be affecting the input of the next recursive call.
Any suggestions?
example.tar.gz
Beta Was this translation helpful? Give feedback.
All reactions