|
In processing radar data, some computations can be run independently in separate threads. In Rack, parallel computation can be enabled flexibly on command line. Parallel computing is enabled by putting a desired command sequence inside braces: [...] .
Here, a routine to be run for each input is defined as a script, just as explained in Defining scripts . Then, the triggering commands – input file arguments – are put in braces. In the following example, for each input Pseudo CAPPI and Echo Top products are generated converted to Cartesian coordinates and stored in a file.
Within braces, [–inputFile] <file>
command will trigger the defined script in a separate, parallel thread.
More schematically, consider a command line invocation of Rack
marking thread-triggering commands with CMD
and other commands with cmd
. A schematic decomposition of such a line is shown below:
During execution, Rack creates and maintains certain resources in memory for commands to read and write: a polar volume, a polar product, Cartesian product and compositing arrays. (See the scheme in Introduction .) A thread has private resources – its so called context – in addition to shared resources called the base context. As a principle in threads, any data loaded or created in the thread are used instead of those of the main thread (base context).
Especially, a composite (accumulation array) initialized in the main thread will serve the threads as a shared resource unless (until) a new composite is initialized or loaded in the thread. Commands use internal logic in selecting data.
The following picture illustrates how the above command line structure is actually computed.
Instead of a predefined script, commands can be run parallel by putting them inside braces and separating independent command sequences to threads with a slash '/'
.
Example:
For accumulating polar data, Rack uses a shared accumulation array, enabling parallelizing the process in straightforward way:
However, parallel computing does not provide much advantage because actual computing is simple and file read is more a slowing factor.
The following example creates a composite as a single command line – as a single yet parallelized computation job:
(Under construction.) In operational environment, one typically has system-level parallel processes in receiving radar data, hence there is less use in designing \i parallel tiled compositing in Rack level. See the single-thread Tiled compositing instead.
Given a single volume as input, generate products to separate /dataset
groups:
As anomaly detectors are independent of each other, they can be computed in parallel, each updating the resulting quality field (QIND
quantity) when completed. Finally, the combined detection field can be used for removing the anomalies in the volume.