problems with magma 1.3.0 and MKL Intel64

Open discussion for MAGMA

problems with magma 1.3.0 and MKL Intel64

Postby Linuxboy » Wed Mar 20, 2013 5:21 pm

Hi!
I've got ubuntu 11.10, magma 1.3.0 and MKL 11.0.
I've compile magma, make tests and run tests.
And got error:
MAGMA 1.3.0
device 0: GeForce GTX TITAN, 875.5 MHz clock, 6143.7 MB memory, capability 3.5

Usage: ./testing_dgetrf -N <m,n> -c -c2 -l
-N can be repeated up to 10 times. If only m is given, then m=n.
-c or setting $MAGMA_TESTINGS_CHECK checks result, PA - LU.
-c2 for square matrices, solves one RHS and checks residual, Ax - b.
-l or setting $MAGMA_RUN_LAPACK runs LAPACK.

M N CPU GFlop/s (sec) GPU GFlop/s (sec) |PA-LU|/(N*|A|)
=========================================================================
Ошибка сегментирования (segmentation fault)

try ./testing_dgetrf_gpu
Usage: ./testing_dgetrf_gpu -N <m,n> -c
-N can be repeated up to 10 times. If only m is given, then m=n.
-c or setting $MAGMA_TESTINGS_CHECK runs LAPACK and checks result.

M N CPU GFlop/s (sec) GPU GFlop/s (sec) ||PA-LU||/(||A||*N)
=========================================================================
CUBLAS error: memory mapping error (11) in main at testing_dgetrf_gpu.cpp:167
MKL ERROR: Parameter 4 was incorrect on entry to DGETRF.
1024 1024 --- ( --- ) 63.00 ( 0.01)
Ошибка сегментирования (segmentation fault)

make.inc

GPU_TARGET = Kepler

CC = gcc
NVCC = nvcc
FORT = gfortran

ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib

# CUDA 5 needs -DCUBLAS_GFORTRAN or appropriate setting to compile cuda/src/fortran.c bindings
OPTS = -O3 -DADD_ -DCUBLAS_GFORTRAN -DMKL_ILP64 -m64 -I$(MKLROOT)/include
F77OPTS = -O3 -DADD_
FOPTS = -O3 -DADD_ -x f95-cpp-input
NVOPTS = -O3 -DADD_ --compiler-options -fno-strict-aliasing -DUNIX
LDOPTS = -fPIC -Xlinker -zmuldefs

# gcc with MKL 10.3, Intel threads
LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lcublas -lcudart -lm -fopenmp

# define these in your environment
# for MKL run, e.g.: /opt/sw/intel/2011.2.137/mkl/bin/mklvars.sh intel64
MKLROOT = /opt/intel/composer_xe_2013.2.146/mkl
CUDADIR = /usr/local/cuda

LIBDIR = -L$(MKLROOT)/lib/intel64 \
-L$(CUDADIR)/lib64 \
-L/opt/intel/lib/intel64
INC = -I$(CUDADIR)/include
Linuxboy
 
Posts: 14
Joined: Tue Nov 29, 2011 9:24 pm

Re: problems with magma 1.3.0 and MKL Intel64

Postby mgates3 » Thu Mar 21, 2013 1:21 pm

You are using lmkl_intel_ilp64 (64-bit int), but probably should be using lmkl_intel_lp64 (32-bit int), unless you changed the magma_int_t in the include/magmablas.h file.

-mark
mgates3
 
Posts: 427
Joined: Fri Jan 06, 2012 2:13 pm

Re: problems with magma 1.3.0 and MKL Intel64

Postby Linuxboy » Thu Mar 21, 2013 2:39 pm

Thanks mark.
I use 32 bit int - mkl library is faster but less accurate.
I change magma_int_t and got new errors
testing_zhemv_mgpu.cpp:409:86: ошибка: cannot convert «int*» to «const magma_int_t* {aka const long int*}» for argument «1» to «void zaxpy_(const magma_int_t*, const cuDoubleComplex*, const cuDoubleComplex*, const magma_int_t*, cuDoubleComplex*, const magma_int_t*)»
testing_zhemv_mgpu.cpp:410:80: ошибка: cannot convert «int*» to «const magma_int_t* {aka const long int*}» for argument «2» to «double zlange_(const char*, const magma_int_t*, const magma_int_t*, const cuDoubleComplex*, const magma_int_t*, double*)»
make: *** [testing_zhemv_mgpu.o] Ошибка 1
Linuxboy
 
Posts: 14
Joined: Tue Nov 29, 2011 9:24 pm

Re: problems with magma 1.3.0 and MKL Intel64

Postby mgates3 » Thu Mar 21, 2013 4:27 pm

MKL with 32-bit int is the same numerical accuracy as with 64-bit int. Also, the performance difference between MKL with 32-bit int and with 64-bit int is very small. The significant performance and accuracy difference is 32-bit float vs. 64-bit double, which are both supported in all versions of MKL. The only advantage in changing to 64-bit int is it allows you to handle very large problems, for example N > 46340, since then the matrix size N^2 > 2^31.

For that particular error, change:
int nw = m - offset;
to
magma_int_t nw = m - offset;
You may encounter some other stray places where int was used instead of magma_int_t.

-mark
mgates3
 
Posts: 427
Joined: Fri Jan 06, 2012 2:13 pm

Re: problems with magma 1.3.0 and MKL Intel64

Postby Linuxboy » Thu Mar 21, 2013 5:01 pm

Thanks!
I've run testing_dgeqrf and then compared the results with testing_dgetrf with ATLAS! my mistake!
I change int to magma_int_t - some routines working, some not.
Linuxboy
 
Posts: 14
Joined: Tue Nov 29, 2011 9:24 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest