OpenCL code in clmagma-0.2.0 does not compile

Open discussion for MAGMA

OpenCL code in clmagma-0.2.0 does not compile

Postby marin » Fri Jun 01, 2012 2:03 am

Hi,

I installed

Code: Select all
clAmdBlas-1.8.269-Linux.tar.gz
AMD-APP-SDK-v2.6-lnx64.tgz
clmagma-0.2.0.tar.gz
acml-5-1-0-gfortran-64bit.tgz


on a system running an AMD A8-3850 APU with Radeon(tm) HD Graphics and CentOS 6.2. To be able to compile I had to build gfortran 4.6 from source.

Problem is that with the exception of

Code: Select all
cpermute-v2.co  ctranspose-v2.co  sinplace_transpose.co  stranspose-v2.co


the build of the opencl code fails. The other parts of the build process complete successfully. To catch the error code I added

Code: Select all
printf ("clBuildProgram error code: %d\n", ciErrNum);


in line 566 to CL_MAGMA_RT.cpp (This is the only source code change I made) and the compile output looks like this

Code: Select all
gcc -O0 -DADD_ -g -Wall -DHAVE_clAmdBlas -I/opt/clAmdBlas-1.8.269/include -I/opt/AMDAPP/include -I../include -I../control -c clcompile.cpp -o clcompile.o
gcc -fPIC -Xlinker -zmuldefs -Wl,-rpath=/opt/gcc-4.6.0/lib64 clcompile.o -o clcompile \
        -L../lib -lclmagma -L/opt/clAmdBlas-1.8.269/lib64 -L/opt/gcc-4.6.0/lib64 -L/opt/acml5.1.0/gfortran64_mp/lib -lacml_mp -lclAmdBlas -lOpenCL
./clcompile sinplace_transpose.cl
Initializing...
Device: BeaverCreek
./clcompile spermute-v2.cl
Initializing...
Device: BeaverCreek
clBuildProgram error at 565 in CL_MAGMA_RT.cpp
clBuildProgram error code: -11
./clcompile stranspose.cl
Initializing...
Device: BeaverCreek
clBuildProgram error at 565 in CL_MAGMA_RT.cpp
clBuildProgram error code: -11
./clcompile stranspose-v2.cl
Initializing...
Device: BeaverCreek
./clcompile dinplace_transpose.cl
Initializing...
Device: BeaverCreek
clBuildProgram error at 565 in CL_MAGMA_RT.cpp
clBuildProgram error code: -11
...


The error code is pretty generic

CL_BUILD_PROGRAM_FAILURE if there is a failure to build the program executable. This error will be returned if clBuildProgram does not return until the build has completed.


I am a complete opencl noob and not quite sure what to make of this message.

The other odd thing is that the failure is not totally consistent from run to run. In the last three runs the following were built:

Code: Select all
[root@apudemo interface_opencl]# ls *.co
cpermute-v2.co  sinplace_transpose.co  stranspose-v2.co
[root@apudemo interface_opencl]# ls *.co
cinplace_transpose.co  ctranspose-v2.co  stranspose.co  stranspose-v2.co
[root@apudemo interface_opencl]# ls *.co
cpermute-v2.co  stranspose-v2.co
[root@apudemo interface_opencl]# ls *.co
cpermute-v2.co  sinplace_transpose.co  stranspose-v2.co


Any idea is appreciated. Thank you in advance.
marin
 
Posts: 3
Joined: Fri Jun 01, 2012 12:37 am

Re: OpenCL code in clmagma-0.2.0 does not compile

Postby Stan Tomov » Fri Jun 08, 2012 12:42 am

Hello,
The kernels that fail to compile are used in the LU factorization and assume certain GPU characteristics such as size of local memory, support of double precision, etc. We tested only on a Tahiti card and I see that if for example I increase the memory allocations used I get similar errors. I would recommend that you first try the other factorizations, namely QR, and Cholesky, as they rely entirely on BLAS (we didn't have to write additional OpenCL kernels for them). You can just remove $(CL_OBJS) from line all: $(LIBMAGMA) $(CL_OBJS) $(CL_COMPILER) of file clmagma-0.2.0/interface_opencl/Makefile and try for example testing_spotrf_gpu. If this works we can try next to determine what features are assumed and not sufficient on your GPU, and try to provide other implementations that use less resources.
Stan
Stan Tomov
 
Posts: 253
Joined: Fri Aug 21, 2009 10:39 pm


Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron