Platform: HP Envy laptop, OpenSUSE Linux 13.1, kernel 13.12, CPU AMD A10 4600M with AMD Radeon HD 7660G, and discrete graphics AMD Radeon HD 7670M — 2048 Mb. In attachement detailed info about video driver version.
Description:
I've tried to study how to use CodeXL. The problem is: I can't start AMDTTeapot example. If I start it from CodeXL (be pressing 'Start' in Debug mode) then I've got the following:
1) AMDTTeapot example window apperars but freezes immediately;
2) CodeXL shows me the dialog: CodeXL Error Report;
3) From that dialog I can obtain the following information about the error:
Operating System:
LinuxSUSE-64
Call stack:
Function name - File path - Line number - Module path - Function Start address - Module Start address - Instruction counter address
__memcpy_sse2_unaligned - N/A - N/A - /lib64/libc.so.6 - N/A - N/A - 0xf5e7a10c
?? - N/A - N/A - /usr/lib64/libGL.so.1 - N/A - N/A - 0xe7bd120e
?? - N/A - N/A - /usr/lib64/libGL.so.1 - N/A - N/A - 0xe7bd1762
glDrawElements - Components/GpuDebugging/AMDTOpenGLServer/src/gsOpenGLWrappers.cpp - 1449 - N/A - N/A - N/A - 0xf773ca36
AMDTTeapotOGLCanvas::drawTeaPot - Examples/AMDTTeaPot/AMDTTeaPotLib/src/AMDTTeapotOGLCanvas.cpp - 576 - N/A - N/A - N/A - 0x00424aeb
AMDTTeapotOGLCanvas::drawScene - Examples/AMDTTeaPot/AMDTTeaPotLib/src/AMDTTeapotOGLCanvas.cpp - 501 - N/A - N/A - N/A - 0x004247e1
AMDTTeapotOGLCanvas::paintWindow - Examples/AMDTTeaPot/AMDTTeaPotLib/src/AMDTTeapotOGLCanvas.cpp - 389 - N/A - N/A - N/A - 0x00424516
AMDTTeapotOGLCanvas::onPaint - Examples/AMDTTeaPot/AMDTTeaPotLib/src/AMDTTeapotOGLCanvas.cpp - 153 - N/A - N/A - N/A - 0x00423da1
MainWin::expose_event - Examples/AMDTTeaPot/AMDTTeaPot/src/AMDTMainWin.cpp - 208 - N/A - N/A - N/A - 0x00415322
expose_event - Examples/AMDTTeaPot/AMDTTeaPot/src/AMDTGtkMain.cpp - 256 - N/A - N/A - N/A - 0x00406445
?? - N/A - N/A - /usr/lib64/libgtk-x11-2.0.so.0 - N/A - N/A - 0xf58e29d4
g_closure_invoke - N/A - N/A - /usr/lib64/libgobject-2.0.so.0 - N/A - N/A - 0xf52b6317
?? - N/A - N/A - /usr/lib64/libgobject-2.0.so.0 - N/A - N/A - 0xf52c7cac
g_signal_emit_valist - N/A - N/A - /usr/lib64/libgobject-2.0.so.0 - N/A - N/A - 0xf52cf688
g_signal_emit - N/A - N/A - /usr/lib64/libgobject-2.0.so.0 - N/A - N/A - 0xf52cfc71
?? - N/A - N/A - /usr/lib64/libgtk-x11-2.0.so.0 - N/A - N/A - 0xf59f2863
gtk_main_do_event - N/A - N/A - /usr/lib64/libgtk-x11-2.0.so.0 - N/A - N/A - 0xf58e1644
?? - N/A - N/A - /usr/lib64/libgdk-x11-2.0.so.0 - N/A - N/A - 0xf553976e
?? - N/A - N/A - /usr/lib64/libgdk-x11-2.0.so.0 - N/A - N/A - 0xf55363ad
gdk_window_process_all_updates - N/A - N/A - /usr/lib64/libgdk-x11-2.0.so.0 - N/A - N/A - 0xf5536c97
?? - N/A - N/A - /usr/lib64/libgtk-x11-2.0.so.0 - N/A - N/A - 0xf5869dc0
?? - N/A - N/A - /usr/lib64/libgdk-x11-2.0.so.0 - N/A - N/A - 0xf5516536
g_main_context_dispatch - N/A - N/A - /usr/lib64/libglib-2.0.so.0 - N/A - N/A - 0xf4fed315
?? - N/A - N/A - /usr/lib64/libglib-2.0.so.0 - N/A - N/A - 0xf4fed667
g_main_loop_run - N/A - N/A - /usr/lib64/libglib-2.0.so.0 - N/A - N/A - 0xf4feda69
gtk_main - N/A - N/A - /usr/lib64/libgtk-x11-2.0.so.0 - N/A - N/A - 0xf58e0626
main - Examples/AMDTTeaPot/AMDTTeaPot/src/AMDTGtkMain.cpp - 826 - N/A - N/A - N/A - 0x004143ff
Device 1 (GPU):
- Platform ID: 1
- Device Type: GPU
- Device Name: Devastator
- Vendor: Advanced Micro Devices, Inc.
Device 2 (CPU):
- Platform ID: 1
- Device Type: CPU
- Device Name: AMD A10-4600M APU with Radeon(tm) HD Graphics
- Vendor: AuthenticAMD
Platform 1:
- Vendor: Advanced Micro Devices, Inc.
- Name: AMD Accelerated Parallel Processing
- Profile: FULL_PROFILE
- Version: OpenCL 1.2 AMD-APP (1348.5)
Additional Information:
- OpenCL Engine loaded:Yes
- OpenGL Engine loaded:Yes
- Kernel Debugging Entered:No
4) Debugger shows that program stopped in AMDTTeapotOGLCanvas.cpp on the line number 576 : glDrawElements(GL_TRIANGLES, TP_TEAPOT_INDICES_AMOUNT, GL_UNSIGNED_SHORT, _indicesBasePointer);
Whole code for related method is:
// ---------------------------------------------------------------------------
// Name: AMDTTeapotOGLCanvas::drawTeaPot
// Description: Draws a teapot.
// Arguments: scale - Scaling (size) of the teapot.
// ---------------------------------------------------------------------------
void AMDTTeapotOGLCanvas::drawTeaPot(
GLfloat scale)
{
// Add a string marker:
if (_glStringMarkerGREMEDY != NULL)
{
float scaleAsFloat = float(scale);
char buff[256];
sprintf(buff, TP_DRAWING_TEAPOT_MARKER_STR, scaleAsFloat);
_glStringMarkerGREMEDY(0, buff);
}
glPushMatrix();
glRotatef(270.0f, 1.0f, 0.0f, 0.0f);
glScalef(0.03f * scale, 0.03f * scale, 0.03f * scale);
glTranslatef(0.0f, 0.0f, -25.0f);
glDrawElements(GL_TRIANGLES, TP_TEAPOT_INDICES_AMOUNT, GL_UNSIGNED_SHORT, _indicesBasePointer); <-- THIS LINE
glPopMatrix();
}
5) I've tried to start this sample is a standalone app but it completely freezes my system, and the hardreset the only way out.
6) Also, according to this discussion
http://devgurus.amd.com/thread/160534
I've tried to launch some SDK samples (BoxFilterGL, GaussianNoiseGL, SimpleGL, NBody...) and I have the same problem with NBody example. I've started NBody example as a standalone app, it works for a 5-6 seconds and then completely freezes system. But BoxFilterGL, GaussianNoiseGL, SimpleGL works without any problems.
Any suggestions what should I do now ?
Still no updates ? Anybody ... ?
It looks like I've found the solution, or some kind of half-solution. The problem is related to default command line options. I've got 3 OpenCL devices on my platform:
1) CPU
2) Discrete GPU (DGPU)
3) Integrated GPU (IGPU)
Use ACCCLE to switch between DGPU and IGPU.
For NBody sample use the following options:
CPU : \>./NBody --device cpu -x 1024 -i 10 -t
DGPU : \>./NBody --device gpu -x 1024 -i 10 -t
IGPU : \>./NBody --device gpu -x 128 -i 1 -t
Higher values for -x or -i parameters could cause OS hangs or completely OS freezes. I am not sure exactly why is this happening or why my solution works, but it helps and that's enough.
AMDTTeapot example still crashes/hangs OS on IGPU, but works fine on DGPU (there is no way to change it with command line option, changing with ACCCLE is the only way here).
The AMDTTeapot sample has menu items that allow you to choose which OpenCL device to use, which could be relevant in this case, except you say that it crashes before the application manages to run.
Could you please try the following:
1. In CodeXL, set a breakpoint on two functions, each early in the OpenCL / OpenGL initialization. For example, clGetPlatformIDs and glXCreateContext.
2. Run the application.
3. Once one of the breakpoints is hit, look through the debugged process events view for module loaded events. Look for when are libGL and libOpenCL loaded.
* Note that each of these should be loaded twice. First time, from the CodeXL folder (under the "spies" subfolder). Second, from the system folder. The second time interests us.
4. Are both files loaded from the same location / from subpaths of eachother; or are the paths unrelated? Also, libamdocl should come from the same place.
Thanks,
Hello and thank you for your response.
>> The AMDTTeapot sample has menu items that allow you to choose which OpenCL device to use, which could be relevant in this case, except you say that it crashes before the application manages to run.
Yes, I know about those menu items, but the program crashes before I could start interacting with menu.
I've tried to do as you say and I've got the following results.
I) DGPU (Discrete GPU)
1) Starting CodeXL and loading teapot sample, pressing Start Debugging;
2) CodeXL notifies me that I need to set 'su aticonfig --sb off'
3) Exit from CodeXL, doing 'su aticonfig --sb off', restarting CodeXL and reloading teapot sample;
4) Setting up 2 breakpoints as you said;
5) Start debugging. Here are all entries from Dubugged Process Events Log
------------------------------------
Process Run Started
GDB String: [Thread debugging using libthread_db enabled]
GDB String: Using host libthread_db library /lib64/libthread_db.so.1 .
API Connection Established: CodeXL Servers Manager
Thread Created: 140737180210944 (LWP: 8720)
API Connection Established: CodeXL OpenGL Server
Debug String: CodeXL OpenGL Server was initialized
API Connection Established: CodeXL OpenCL Server
Debug String: CodeXL OpenCL Server was initialized
Breakpoint Hit: clGetPlatformIDs
------------------------------------
Debugger stops in the AMDTOpenCLHelper.cpp at line 455
bool retVal = false;
cl_uint numPlatforms;
cl_int status = _clGetPlatformIDs(0, NULL, &numPlatforms); <-- THIS LINE
if (status == CL_SUCCESS && numPlatforms > 0)
{
cl_platform_id* platforms =
After disabling all breakpoints and pressing F5 (Start debugging), I've got the same results as in the first post (Crash and CodeXL dialog about sending crash report).
NOTE: I could start teapot sample from console as a standalone app when using DGPU no matter 'aticonfig --sb off' or 'aticonfig --sb on'
6) Using ACCCLE to switch from DGPU to IGPU
7) Rebooting
I) IGPU (Integrated GPU)
1) Starting CodeXL and loading teapot sample, pressing Start Debugging;
2) Start debugging. Here are all entries from Dubugged Process Events Log
-------------------------------------
Process Run Started
GDB String: [Thread debugging using libthread_db enabled]
GDB String: Using host libthread_db library /lib64/libthread_db.so.1 .
API Connection Established: CodeXL Servers Manager
Thread Created: 140737180210944 (LWP: 3466)
API Connection Established: CodeXL OpenGL Server
Debug String: CodeXL OpenGL Server was initialized
API Connection Established: CodeXL OpenCL Server
Debug String: CodeXL OpenCL Server was initialized
Breakpoint Hit: clGetPlatformIDs
--------------------------------------
Debugger stops in the AMDTOpenCLHelper.cpp at line 455
bool retVal = false;
cl_uint numPlatforms;
cl_int status = _clGetPlatformIDs(0, NULL, &numPlatforms); <-- THIS LINE
if (status == CL_SUCCESS && numPlatforms > 0)
{
cl_platform_id* platforms =
After disabling all breakpoints and pressing F5 (Start debugging), I've got the same results as in the first post (Crash and CodeXL dialog about sending crash report).
NOTE: I could not start teapot sample from console as a standalone app when using IGPU, it cause total system freeze.
Still no updates ? ...