Dear list,
I just compiled gr-fosphor on a PC equipped with a HD 5450 card, and when I try to run osmocom_fft -F I gut the following error:
root@TH-SDR1:~/gr-fosphor/gr-fosphor/lib/fosphor# osmocom_fft -F linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.001-42-g8c87a524
gr-osmosdr v0.1.4-8-g46bb1ad1 (0.1.5git) gnuradio 3.7.5.1 built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace -- Operating over USB 3. -- Initialize CODEC control... -- Initialize Radio control... -- Performing register loopback test... pass -- Performing CODEC loopback test... pass -- Asking for clock rate 32.000000 MHz... -- Actually got clock rate 32.000000 MHz. -- Performing timer loopback test... pass -- Setting master clock rate selection to 'automatic'. -- Using subdev spec 'A:A'. [+] Selected device: Cedar Build log for 'display.cl': "/tmp/OCL2287T8.cl", line 67: error: work group size exceeds the maximum default value for the selected device __attribute__((reqd_work_group_size(16, 16, 1))) ^
1 error detected in the compilation of "/tmp/OCL2287T8.cl". Frontend phase failed compilation.
--- [!] CL Error (-11, /root/gr-fosphor/gr-fosphor/lib/fosphor/cl.c:344): Failed to build program
I installed the latest stable driver and APP-SDK.
oot@TH-SDR1:~/gr-fosphor/gr-fosphor/lib/fosphor# fglrxinfo display: :0.0 screen: 0 OpenGL vendor string: Advanced Micro Devices, Inc. OpenGL renderer string: AMD Radeon HD 5450 OpenGL version string: 4.4.13283 Compatibility Profile Context 14.501.1003
Here is the info about the card:
NAME: Cedar VENDOR: Advanced Micro Devices, Inc. PROFILE: FULL_PROFILE VERSION: OpenCL 1.2 AMD-APP (1642.5) EXTENSIONS: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_amd_image2d_from_buffer_read_only cl_khr_spir cl_khr_gl_event DRIVER_VERSION: 1642.5
Type: GPU EXECUTION_CAPABILITIES: Kernel GLOBAL_MEM_CACHE_TYPE: None (0) CL_DEVICE_LOCAL_MEM_TYPE: Local (1) SINGLE_FP_CONFIG: 0x3e QUEUE_PROPERTIES: 0x2
VENDOR_ID: 4098 MAX_COMPUTE_UNITS: 2 MAX_WORK_ITEM_DIMENSIONS: 3 MAX_WORK_GROUP_SIZE: 128 PREFERRED_VECTOR_WIDTH_CHAR: 16 PREFERRED_VECTOR_WIDTH_SHORT: 8 PREFERRED_VECTOR_WIDTH_INT: 4 PREFERRED_VECTOR_WIDTH_LONG: 2 PREFERRED_VECTOR_WIDTH_FLOAT: 4 PREFERRED_VECTOR_WIDTH_DOUBLE: 0 MAX_CLOCK_FREQUENCY: 650 ADDRESS_BITS: 32 MAX_MEM_ALLOC_SIZE: 134217728 IMAGE_SUPPORT: 1 MAX_READ_IMAGE_ARGS: 128 MAX_WRITE_IMAGE_ARGS: 8 IMAGE2D_MAX_WIDTH: 16384 IMAGE2D_MAX_HEIGHT: 16384 IMAGE3D_MAX_WIDTH: 2048 IMAGE3D_MAX_HEIGHT: 2048 IMAGE3D_MAX_DEPTH: 2048 MAX_SAMPLERS: 16 MAX_PARAMETER_SIZE: 1024 MEM_BASE_ADDR_ALIGN: 2048 MIN_DATA_TYPE_ALIGN_SIZE: 128 GLOBAL_MEM_CACHELINE_SIZE: 0 GLOBAL_MEM_CACHE_SIZE: 0 GLOBAL_MEM_SIZE: 268435456 MAX_CONSTANT_BUFFER_SIZE: 65536 MAX_CONSTANT_ARGS: 8 LOCAL_MEM_SIZE: 32768 ERROR_CORRECTION_SUPPORT: 0 PROFILING_TIMER_RESOLUTION: 1 ENDIAN_LITTLE: 1 AVAILABLE: 1 COMPILER_AVAILABLE: 1 MAX_WORK_GROUP_SIZES: 128 128 128 ---------------------------------------------------------------------
If someone can suggest what else to try, it will be appreciated.
Thanks,
Csaba
Hi,
I just compiled gr-fosphor on a PC equipped with a HD 5450 card, and when I try to run osmocom_fft -F I gut the following error:
[+] Selected device: Cedar Build log for 'display.cl': "/tmp/OCL2287T8.cl", line 67: error: work group size exceeds the maximum default value for the selected device __attribute__((reqd_work_group_size(16, 16, 1))) ^
1 error detected in the compilation of "/tmp/OCL2287T8.cl". Frontend phase failed compilation.
Yes, that card only suppot 128 as a maximum work group size and fosphor is written to use 256. I think this particular generation of card is the only one that's new enough to support OpenCL but old enough to not support WG of 256.
I did however write a patch to support it a while back and just never bothered to clean it up (to select size dynamically depending on your card).
Try the attached patch and see if it works for you.
Cheers,
Sylvain
Thanks mate, with your patch its working all right :-)
With Tom, we talked about a feature wich would be nice to have: a 10ms trigger so we can see something like this:
http://tsou.cc/lte/openlte-spectro.png
What do you think about it?
Regards, Csaba
----- Original Message ----- From: "Sylvain Munaut" tnt@246tnt.com To: "Sipos Csaba" sipos.csaba@kvk.uni-obuda.hu Cc: osmocom-sdr@lists.osmocom.org, "Sylvain Munaut" tnt@246tnt.com Sent: Friday, February 27, 2015 11:19:06 AM Subject: Re: gr-fosphor: error: work group size exceeds the maximum default value for the selected device (AMD HD 5450)
Hi,
I just compiled gr-fosphor on a PC equipped with a HD 5450 card, and when I try to run osmocom_fft -F I gut the following error:
[+] Selected device: Cedar Build log for 'display.cl': "/tmp/OCL2287T8.cl", line 67: error: work group size exceeds the maximum default value for the selected device __attribute__((reqd_work_group_size(16, 16, 1))) ^
1 error detected in the compilation of "/tmp/OCL2287T8.cl". Frontend phase failed compilation.
Yes, that card only suppot 128 as a maximum work group size and fosphor is written to use 256. I think this particular generation of card is the only one that's new enough to support OpenCL but old enough to not support WG of 256.
I did however write a patch to support it a while back and just never bothered to clean it up (to select size dynamically depending on your card).
Try the attached patch and see if it works for you.
Cheers,
Sylvain
Hi,
Thanks mate, with your patch its working all right :-)
Great. I'll see if I can make it part of the mailine code so you don't have to mess around with patch.
With Tom, we talked about a feature wich would be nice to have: a 10ms trigger so we can see something like this:
http://tsou.cc/lte/openlte-spectro.png
What do you think about it?
I'm not exactly sure what you mean with the above picture.
But something I'm thinking about it to have a return channel from the fosphor block that would basically feedback 'timestamps' of when the real time spectrum went above a given mask.
Then I'm also working on another piece of code that's oriented toward "off-line" signal browsing (so it works on a time-limited number of samples rather than a continuous stream). And when a trigger event is hit, it would basically send off that chunk of sample to that other blow for viewing / browsing.
I want them to be separate because the architecture of fosphor is oriented toward high rate real time display and so I have to sacrifice some other aspects to meet that. The other signal browsing block would be coded more with flexibility in mind. So in the end you'd have one display that represent the real-time of what's being recorded _right_now_ by your SDR, and then a second display that shows the last trigger event and allows you to browse around it, a bit like a scope does for time signals.
Cheers,
Sylvain
Hi,
Great. I'll see if I can make it part of the mailine code so you don't have to mess around with patch.
Great, that would be nice. :-)
I tried to compile the benchmark tool to measure what this card can do, but I hit a compilation error:
root@TH-SDR1:~/gr-fosphor/gr-fosphor/lib/fosphor# make clean rm -f main *.o resource_data.c root@TH-SDR1:~/gr-fosphor/gr-fosphor/lib/fosphor# make gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o main.o main.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o resource.o resource.c ./mkresources.py fft.cl display.cl cmap_simple.glsl cmap_bicubic.glsl cmap_fallback.glsl DroidSansMonoDotted.ttf > resource_data.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o resource_data.o resource_data.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o axis.o axis.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o cl.o cl.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o cl_compat.o cl_compat.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o fosphor.o fosphor.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o gl.o gl.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o gl_cmap.o gl_cmap.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o gl_cmap_gen.o gl_cmap_gen.c gcc -Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g -I/opt/AMDAPPSDK-2.9-1/include -c -o gl_font.o gl_font.c gcc -g main.o resource.o resource_data.o axis.o cl.o cl_compat.o fosphor.o gl.o gl_cmap.o gl_cmap_gen.o gl_font.o `pkg-config freetype2 glfw3 --libs` -lm -lOpenCL -lGL -ldl -o main cl.o: In function `cl_init_buffers_gl': /root/gr-fosphor/gr-fosphor/lib/fosphor/cl.c:469: undefined reference to `clCreateFromGLBuffer' cl.o: In function `fosphor_cl_process': /root/gr-fosphor/gr-fosphor/lib/fosphor/cl.c:875: undefined reference to `clEnqueueAcquireGLObjects' cl.o: In function `fosphor_cl_finish': /root/gr-fosphor/gr-fosphor/lib/fosphor/cl.c:938: undefined reference to `clEnqueueAcquireGLObjects' /root/gr-fosphor/gr-fosphor/lib/fosphor/cl.c:958: undefined reference to `clEnqueueReleaseGLObjects' cl_compat.o: In function `clCreateFromGLTexture_alt': /root/gr-fosphor/gr-fosphor/lib/fosphor/cl_compat.c:110: undefined reference to `clCreateFromGLTexture2D' collect2: error: ld returned 1 exit status make: *** [main] Error 1
The application (gr-fosphor) compiles and runs just fine. Maybe you know what am I missing.
I'm not exactly sure what you mean with the above picture.
I mean that LTE (and many other RF technology) has a 10ms radio frame lenght, so it would be nice to be able to analyze that (like on the picture) on a radio frame level, rather than a continous stream. I think what you described is pretty much what I am asking for anyway :-)
Thanks!
Csaba
----- Original Message ----- From: "Sylvain Munaut" tnt@246tnt.com To: "Sipos Csaba" sipos.csaba@kvk.uni-obuda.hu Cc: "Sylvain Munaut" tnt@246tnt.com, osmocom-sdr@lists.osmocom.org Sent: Friday, February 27, 2015 2:01:45 PM Subject: Re: gr-fosphor: error: work group size exceeds the maximum default value for the selected device (AMD HD 5450)
Hi,
Thanks mate, with your patch its working all right :-)
Great. I'll see if I can make it part of the mailine code so you don't have to mess around with patch.
With Tom, we talked about a feature wich would be nice to have: a 10ms trigger so we can see something like this:
http://tsou.cc/lte/openlte-spectro.png
What do you think about it?
I'm not exactly sure what you mean with the above picture.
But something I'm thinking about it to have a return channel from the fosphor block that would basically feedback 'timestamps' of when the real time spectrum went above a given mask.
Then I'm also working on another piece of code that's oriented toward "off-line" signal browsing (so it works on a time-limited number of samples rather than a continuous stream). And when a trigger event is hit, it would basically send off that chunk of sample to that other blow for viewing / browsing.
I want them to be separate because the architecture of fosphor is oriented toward high rate real time display and so I have to sacrifice some other aspects to meet that. The other signal browsing block would be coded more with flexibility in mind. So in the end you'd have one display that represent the real-time of what's being recorded _right_now_ by your SDR, and then a second display that shows the last trigger event and allows you to browse around it, a bit like a scope does for time signals.
Cheers,
Sylvain