Illegel memory access errors

Open discussion for MAGMA

Illegel memory access errors

Postby dalal » Thu May 15, 2014 4:18 am

Hello,
running following code for matrix size which a multiple of 32, I get the following error, otherwise the code run without errors.
%%%%%%%%%%%%%%
n = 1024; n32 = n32up(n);
int *ipiv; magma_imalloc_cpu( &ipiv, n); int info;
double *d_Utmp; magma_dmalloc( &d_Utmp, n32*n );
float *d_B; magma_smalloc( &d_B, n32*n );
float *Us; magma_smalloc_pinned(&Us,n*n);
magmablas_dlag2s( n, n, d_Utmp, n32, d_B, n32, &info );
magma_sgetmatrix( n, n, d_B, n32, Us, n );
magma_sgetrf( n, n, Us, n, ipiv, &info); magma_free_cpu(ipiv);
magma_ssetmatrix( n, n, Us, n, d_B, n32 );
magmablas_slag2d( n, n, d_B, n32, d_Utmp, n32, &info );
magma_free(d_Utmp); magma_free(d_B); magma_free_pinned(Us);
%%%%%%%%%%%%%%%
I get the following error at each magma_free:
CUDA runtime error: an illegal memory access was encountered (77) in main at main.c:220

Also running the same code with with magma_memcheck, I get many errors such as the following followed by unspecified launch failure (4) in main.

magmablas_slag2d( M, M, d_H2s, M32, d_H2, M32, &info );
========= Invalid __global__ read of size 4
========= at 0x00000128 in slag2d_generic(int, int, float const *, int, double*, int)
========= by thread (15,1,0) in block (0,0,0)
========= Address 0x130290007c is out of bounds
========= Saved host backtrace up to driver entry point at kernel launch time
========= Host Frame:/usr/lib64/libcuda.so (cuLaunchKernel + 0x331) [0x138291]
========= Host Frame:/usr/local/cuda/lib64/libcudart.so.6.0 [0xfa98]
========= Host Frame:/usr/local/cuda/lib64/libcudart.so.6.0 (cudaLaunch + 0x143) [0x2e6a3]
========= Host Frame:./exe [0xc72f]
========= Host Frame:./exe [0x6ebd]
========= Host Frame:./exe [0xa89e]
========= Host Frame:./exe [0x8742]
========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xfd) [0x1ecdd]
========= Host Frame:./exe [0x4d59]

Any help is appreciated.
Thanks
dalal
 
Posts: 9
Joined: Thu Feb 20, 2014 4:30 am

Re: Illegel memory access errors

Postby mgates3 » Fri May 16, 2014 6:02 pm

Thanks for reporting this problem. There was an out-of-bounds access bug in dlag2s and slag2d. Attached are the corrected files. Just untar in the magma directory and re-compile MAGMA.

Let us know if that fixes the problem or not.

-mark
Attachments
zlag2c-fix.tar.gz
(2.23 KiB) Downloaded 24 times
mgates3
 
Posts: 427
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron