Commit 6fb64e3f authored by Leo Gordon's avatar Leo Gordon
Browse files

Branch names proved to be too confusing. The functionality stays, but is...

Branch names proved to be too confusing. The functionality stays, but is removed from the example to follow.
parent fcdf0749
......@@ -132,7 +132,7 @@ sub pipeline_analyses {
],
-flow_into => {
2 => [ 'part_multiply' ], # will create a fan of jobs
'MAIN' => [ 'add_together' ], # will create a funnel job to wait for the fan to complete and add the results
1 => [ 'add_together' ], # will create a funnel job to wait for the fan to complete and add the results
},
},
......@@ -144,7 +144,7 @@ sub pipeline_analyses {
# (jobs for this analysis will be flown_into via branch-2 from 'start' jobs above)
],
-flow_into => {
'MAIN' => [ ':////intermediate_result' ],
1 => [ ':////intermediate_result' ],
},
},
......@@ -156,7 +156,7 @@ sub pipeline_analyses {
],
-wait_for => [ 'part_multiply' ], # we can only start adding when all partial products have been computed
-flow_into => {
'MAIN' => [ ':////final_result' ],
1 => [ ':////final_result' ],
},
},
];
......
......@@ -81,7 +81,7 @@ sub write_output { # store and dataflow
'a_multiplier' => $self->param('a_multiplier'),
'b_multiplier' => $self->param('b_multiplier'),
'result' => $self->param('result'),
}, 'MAIN');
}, 1);
}
=head2 _add_together
......
......@@ -67,7 +67,7 @@ sub write_output { # but this time we have something to store
'a_multiplier' => $self->param('a_multiplier'),
'digit' => $self->param('digit'),
'result' => $self->param('result')
}, 'MAIN');
}, 1);
}
=head2 _rec_multiply
......
......@@ -82,8 +82,8 @@ sub write_output { # nothing to write out, but some dataflow to perform:
my $output_ids = $self->param('output_ids');
# first we flow the MAIN branch into the (semaphored) funnel job:
my ($funnel_job_id) = @{ $self->dataflow_output_id($self->input_id, 'MAIN', { -semaphore_count => scalar(@$output_ids) }) };
# first we flow the branch#1 into the (semaphored) funnel job:
my ($funnel_job_id) = @{ $self->dataflow_output_id($self->input_id, 1, { -semaphore_count => scalar(@$output_ids) }) };
# then we fan out into branch#2, and pass the $funnel_job_id to all of them
my $fan_job_ids = $self->dataflow_output_id($output_ids, 2, { -semaphored_job_id => $funnel_job_id } );
......
......@@ -86,8 +86,8 @@ sub write_output { # nothing to write out, but some dataflow to perform:
$self->warning(scalar(@$output_ids).' multiplication jobs have been created'); # warning messages get recorded into 'job_message' table
# then flow into the MAIN branch funnel; input_id would flow into MAIN branch by default anyway, but we request it here explicitly:
$self->dataflow_output_id($self->input_id, 'MAIN');
# then flow into the branch#1 funnel; input_id would flow into branch#1 by default anyway, but we request it here explicitly:
$self->dataflow_output_id($self->input_id, 1);
}
1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment