1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
# Config file for Task 1 in a pipeline
# - Produce variables a b c
# - Write variables a b c to stream_T1.bp
# Config file for Task 2 in a pipeline
# - Read in variables a b from Task 1 (ignore c) from stream_T1.bp
# using a different decomposition
# - Write variables a b to stream_T2.bp
group io_T1
# item type varname N [dim1 dim2 ... dimN decomp1 decomp2 ... decompN]
array double a 2 100 200 X YZ
array float b 1 100 XYZ
array float c 3 100 200 300 XY z 1
group io_T2_in
# item type varname N [dim1 dim2 ... dimN decomp1 decomp2 ... decompN]
array double a 2 100 200 XY Z
array float b 1 100 XYZ
group io_T2_out
# use all variables read into io_T2_in in the output
link group io_T2_in
# Task 1 actions
app 1
steps 3
sleep 5.0
# write all of io_T1 into stream_T1.bp
write stream_T1.bp io_T1
# Task 2 actions
app 2
steps over stream_T1.bp
# read a & b from stream_T1.bp using io_T2_in definition with blocking wait
read next stream_T1.bp io_T2_in -1 a b
# Sleep and write only if read was successful:
cond stream_T1.bp sleep 2.0
# write io_T2 into stream_T2.bp
cond stream_T1.bp write stream_T2.bp io_T2_out
sleep 1.123456789
|