# Flow Graph Reconfiguration

**URL:** <https://www.ruby-forum.com/t/flow-graph-reconfiguration/231899>\
**Category:** GNU Radio\
**Created:** [September 4, 2014, 10:30pm UTC](https://www.ruby-forum.com/t/flow-graph-reconfiguration/231899 "2014-09-04T22:30:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 4, 2014, 10:30pm UTC](https://www.ruby-forum.com/t/flow-graph-reconfiguration/231899/1 "2014-09-04T22:30:15Z")

</div>

I am trying to setup a flow graph that has 2 states, in which upon a  
state change the flow graph is reconfigured.

FlowGraph 1:  
[src] -\> [filt] -\> [modem-1]

FlowGraph 2:  
[src] -\> [filt] -\> [modem-2]

FG-1 runs to completion, is then disconnected. Then FG-2 is connected  
and executed. For both flowgraphs the src and filt are the same. The  
modems are switched out and as such the requirements on the filter  
output buffer size changes. The filter min\_output\_buffer size is  
adjusted following the disconnect from FG-1 and prior to connecting  
FG-2.

When FG-2 is executed I immediately get an error from the scheduler  
complaining that a downstream sample requirement can’t be met. However,  
when I query the min\_output\_buffer size from the offending upstream  
blocks they appear to be correct. I also have tried locking the FG, then  
disconnecting, reconfiguring, and unlocking (per the recommendation for  
dynamic FG configuration in the GnuRadio FAQs). However, there is no  
change in behavior. If I execute just FG-2 there is no error, so my  
assumption is that I am not doing something when switching up the  
configuration of the FG or it just does not work.

---

<div class="post-metadata">

**Author:** ![GouldS\_Daniel\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@GouldS\_Daniel\_N](https://www.ruby-forum.com/u/GouldS_Daniel_N)\
**Post date:** [September 5, 2014, 4:58am UTC](https://www.ruby-forum.com/t/flow-graph-reconfiguration/231899/2 "2014-09-05T04:58:44Z")

</div>

On Sep 4, 2014, at 13:27, Gould, Daniel N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> FlowGraph 1:  
> [src] → [filt] → [modem-1]
> 
> FlowGraph 2:  
> [src] → [filt] → [modem-2]
> 
> FG-1 runs to completion, is then disconnected. Then FG-2 is connected and  
> executed. For both flowgraphs the src and filt are the same. The modems are  
> switched out and as such the requirements on the filter output buffer size  
> changes. The filter min\_output\_buffer size is adjusted following the disconnect  
> from FG-1 and prior to connecting FG-2.
> 
> When FG-2 is executed I immediately get an error from the scheduler complaining  
> that a downstream sample requirement cant be met.

What actual block classes are you using?

I’ve recently found a bug with the same effect as you describe, which  
occurs when I reuse a pfb\_arb\_resampler\_ccf (but not involving any  
explicit buffer control). See my report:  
[http://gnuradio.org/redmine/issues/713](http://gnuradio.org/redmine/issues/713)

A workaround I found was to redesign the graph so that I could use a  
rational\_resampler instead, but I don’t know if this bug is truly  
specific to that block or if the change avoids the problem by accident.

–  
Kevin R. [http://switchb.org/kpreid/](http://switchb.org/kpreid/)

---

<div class="post-metadata">

**Author:** ![GouldS\_Daniel\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@GouldS\_Daniel\_N](https://www.ruby-forum.com/u/GouldS_Daniel_N)\
**Post date:** [September 5, 2014, 1:25pm UTC](https://www.ruby-forum.com/t/flow-graph-reconfiguration/231899/3 "2014-09-05T13:25:58Z")

</div>

The source is the omsosdr-rtl block and the filter is the FIR. The  
blocks in the modem are OOT modules. Both flow graphs work  
independently, but when I try to dynamically switch between the modems,  
I get the same error you are seeing. I do have a buffer requirement  
change on the output of the FIR when I switch modems, but the querying  
the FIR object tells me that the min\_output\_buffer is correct.

Thanks
