./shmget_demo_issue.py -v 1024 -n 2048
gr_vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr_buffer::allocate_buffer: failed to allocate buffer of size 16392 KB
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted
So, I have the latest gnuradio next and ubuntu 10.10. This issue crops
up whenever I try to run the wxgui fftsink with my usrp2 at full rate,
and on several different computers.
I have recreated the problem with a simple python app. No message
queues, no usrp hardware, no graphics, just core gnuradio blocks.
Application attached.
null source -> keep one in n -> null sink
Basically, increasing the N (decimation) to a high enough number causes
this issue consistently. Why should more decimation cause this? Did
something in the tags implementation change this behavior? Any ideas?
Thanks,
-Josh
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Shmget Demo Issue
# Generated: Thu Feb 10 11:33:40 2011
##################################################
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio.eng_option import eng_option
from gnuradio.gr import firdes
from optparse import OptionParser
class shmget_demo_issue(gr.top_block):
def __init__(self, num=10000, vec_len=1024):
gr.top_block.__init__(self, "Shmget Demo Issue")
##################################################
# Parameters
##################################################
self.num = num
self.vec_len = vec_len
##################################################
# Blocks
##################################################
self.gr_keep_one_in_n_0 = gr.keep_one_in_n(gr.sizeof_float*vec_len, int(num))
self.gr_null_sink_0 = gr.null_sink(gr.sizeof_float*vec_len)
self.gr_null_source_0 = gr.null_source(gr.sizeof_float*vec_len)
##################################################
# Connections
##################################################
self.connect((self.gr_keep_one_in_n_0, 0), (self.gr_null_sink_0, 0))
self.connect((self.gr_null_source_0, 0), (self.gr_keep_one_in_n_0, 0))
def set_num(self, num):
self.num = num
self.gr_keep_one_in_n_0.set_n(int(self.num))
def set_vec_len(self, vec_len):
self.vec_len = vec_len
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
parser.add_option("-n", "--num", dest="num", type="eng_float", default=eng_notation.num_to_str(10000),
help="Set Keep 1 in N [default=%default]")
parser.add_option("-v", "--vec-len", dest="vec_len", type="intx", default=1024,
help="Set Vector Length [default=%default]")
(options, args) = parser.parse_args()
tb = shmget_demo_issue(num=options.num, vec_len=options.vec_len)
tb.start()
raw_input('Press Enter to quit: ')
tb.stop()
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio