Create a Complex Flow
Everything done so far could have been done just as easily using make or a C-shell script. In this step you will build a flow which neither make nor a shell script could handle efficiently. This is a flow that spans multiple directories.
This example project will dynamically create a set of subdirectories. For each subdirectory, it will run four jobs within that context that process the same input file aa that comes from the top level main directory. The jobs are the ones we have been using to emulate useful work.
% cat Flow2.tcl
for {set i 1 } { $i < 20 } { incr i } {
indir -create subdir$i {
J vw cp ../aa bb
J vw cp bb cc
J vw cp cc dd1
J vw cp cc dd2
}
}
The for construct is standard Tcl, while the procedure
indir is a FlowTracer extension. In this case you want to
create the subdirectories subdirN
, so you will use the
option -create of indir.