Trouble with Matlab link Interface

General CULA Dense (LAPACK & BLAS) support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

Trouble with Matlab link Interface

Postby prisma » Sat Aug 25, 2012 2:33 am

Hi,

now that CULA R15 dense is available, i tested it with my various configurations:
OS:Ubuntu Linux
2010b R14 ok
2010b R15:
Code: Select all
libmwlapack: load error: /usr/local/cula/lib64/libcula_lapack_link.so: undefined symbol: dlamc1_
Caught "std::exception" Exception message is:
/usr/local/cula/lib64/libcula_lapack_link.so: undefined symbol: dlamc1_


2012a R14 (see viewtopic.php?f=15&t=1010)
2012a R15
Code: Select all
cula error: culaInitialize failed (CUDA runtime or driver is not supported)
cula info:  forwarding all calls to CPU
cula info:  parsing crossover list '/usr/local/cula/crossover.list'
cula info:  setting crossover for dgemm to '22500'
cula info:  setting crossover for dsyrk to '2500'
cula info:  setting crossover for zgetrf to '10000'
cula info:  dgemm (N, N, 5000, 5000, 5000, 1.000000, 0x7f5894143020, 5000, 0x7f5888286020, 5000, 0.000000, 0x7f587c3c9020, 5000)
cula info:  issuing to CPU (cula not available)
cula info:  CPU library is /usr/local/cula/lib64/lapackcpu.so
cula info:  done

This seems to be the same Problem again that MATLAB loads some cuda runtime ahead. I still didn't find anything to do preventing this. ARE YOU NOT TESTING AGAINST MATLAB?
I must say for something advertised i'm quite surprised that the MATLAB link interface is more or less unusable (i'm stuck to the R2010b R14 combination which ingnores crossover_list). I think i will have to look at JACKET although it's expensive and requires changing of my code.

Sebastian
prisma
 
Posts: 4
Joined: Wed Jun 15, 2011 12:39 am

Re: Trouble with Matlab link Interface

Postby john » Tue Aug 28, 2012 12:17 pm

Dear Sebastian, I can assure you that the all-caps questions are not necessary - we are interested in making this work. CULA has been tested repeatedly against Matlab on a number of configurations.

Matlab presents two distinct problems for us.

1) The Matlab LAPACK is something of a moving target for us because it's changed periodically. Any given release of CULA might only be compatible with a couple versions of Matlab.

2) Their GPU environment in the GPU toolbox is very invasive. It loads whether you use it or not, and that prevents other GPU products from being loaded correctly (especially if the CUDA version isn't a precise match). Unfortunately Mathworks has decided not to update their CUDA version for quite some time and still ships CUDA 4.0. Our philosophy is to always remain current with the latest production release of CUDA, as this is important to continue supporting new hardware devices. To this end, our tests target systems withoutthe Matlab GPU toolkit. I suspect that the presence of the GPU toolkit is causing the majority of your problems, and so I would try on the Mathworks or NVIDIA forums for advice on how to load a different CUDA version. You could also try disabling that toolkit while you try to get CULA up and running.

(A thought: LD_PRELOAD might be able to handle the Matlab CUDA situation, but I haven't tried.)

I would like to note in closing that Matlab is not officially on our supported list. We are fundamentally a programmer-oriented C, C++, Fortran, and PGI CUDA-Fortran library. If Matlab becomes an official platform of ours, it will become noted in the Programmer's Guide and the package will contain examples (etc). The Link interface happens to shine when used with Matlab and so is our go-to for demonstration.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Trouble with Matlab link Interface

Postby prisma » Mon Sep 03, 2012 5:19 am

Hi,

thanks for the answer and the hints. I managed to make matlab 2012a and cula R15 work by deleting the cuda libs from the matlab/bin/glnxa64 dir:
libcudart.*
libcufft.*
libcublas.*
This seems very drastic but it works.

But now something new appears, what i have not seen before:
Code: Select all
cula info:  zgetri (11532, 0x7f7a8b853020, 11532, 0x7f7c08513440)
cula info:  issuing to CPU (work query) <---
cula info:  work query returned 738048
cula info:  done
cula info:  zgetri (11532, 0x7f7a8b853020, 11532, 0x7f7c08513440)
cula info:  issuing to GPU (over threshold)
cula info:  done

What does this work query mean and why is it first tried on CPU and then on GPU?
prisma
 
Posts: 4
Joined: Wed Jun 15, 2011 12:39 am

Re: Trouble with Matlab link Interface

Postby kyle » Mon Sep 03, 2012 4:34 pm

The work queries are tests performed by the host version of LAPACK to see how much extra memory is required by that call. As CULA has no notion of workspaces, these calls are never run on the GPU.
kyle
Administrator
 
Posts: 301
Joined: Fri Jun 12, 2009 7:47 pm


Return to CULA Dense Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron