sgetrf matlab mex file - crashing...

Open discussion for MAGMA

Re: sgetrf matlab mex file - crashing...

Postby jpeinado » Fri Dec 11, 2009 6:45 am

Stan,

Thank you very much for your fast answer. I have the same problem as Boxed Cyclon. As he claims, MATLAB crashes used with MAGMA working with nvmex.

Even, I only link with MAGMA (-lmagma -lmagmablas) and my mex program crashes. I dont use any MAGMA call...

The program execution crashes only by linking MAGMA. I dont use any MAGMA call

Any idea?

With many thanks in advance

jpeinado
jpeinado
 
Posts: 10
Joined: Thu Dec 03, 2009 2:53 pm

Re: sgetrf matlab mex file - crashing...

Postby jpeinado » Thu Jan 07, 2010 11:53 pm

Hi again:

I am trying to research in this matter. I find out that the problematic library is "libmagmablas". It seems that mex files are very sensitive to memory issues. In fact I read in nvidia forums that it could be an incompatibility beetween mex files and pinned memory. My questions about this are:

1) Is libmagmablas using pinned memory?

2) Does the next version of MAGMA publish the source files? I am not sure of what is happening. Perhaps (but I have no idea of what is happening) it could be any library incompatibility)

Thanks

jpeinado
jpeinado
 
Posts: 10
Joined: Thu Dec 03, 2009 2:53 pm

Re: sgetrf matlab mex file - crashing...

Postby Stan Tomov » Fri Jan 08, 2010 3:06 pm

Jpeinado,
We leave it up to the user to allocate memory, e.g., working spaces, etc.; the magma and magmablas libraries do not need and do not allocate additional memory space. The examples in the testing directory use pinned memory for performance, but non-pinned would work as well.
We are still working on releasing the sources. I can send you some if you think that may be helpful. Can you run other CUDA-based routines/code (not just a single CUDA kernel) through matlab?
Stan
Stan Tomov
 
Posts: 253
Joined: Fri Aug 21, 2009 10:39 pm

Re: sgetrf matlab mex file - crashing...

Postby jpeinado » Fri Jan 08, 2010 7:20 pm

Hi Stan:

Thank you very much for your help.

Stan Tomov wrote:Jpeinado,
We leave it up to the user to allocate memory, e.g., working spaces, etc.; the magma and magmablas libraries do not need and do not allocate additional memory space.

OK. Really I dont know what is happening, but when compiling with -lmagmablas option my mexfiles, then MATLAB crash. This crash happens even if I dont include any MAGMA call when running the mex. It is really strange...

Stan Tomov wrote: The examples in the testing directory use pinned memory for performance, but non-pinned would work as well.

OK

Stan Tomov wrote: Can you run other CUDA-based routines/code (not just a single CUDA kernel) through matlab?
Stan

Yes. In my mex code I call several CUBLAS routines (perhaps, all of them are kernels? ) and then work OK. Even I tested/tried a commercial CUDA LAPACK called CULATOOLS, and also it worked. I dont like these commercial histories, and I prefer MAGMA (I have always been using BLAS, LAPACK, SCALAPACK free (or MKL) versions before, in my work, phD...etc). Moreover, at this time, the performance of sgesv CULATOOLS it is not very good, but it works, really works OK.

Stan Tomov wrote:We are still working on releasing the sources. I can send you some if you think that may be helpful.

Good to hear this!!

Thank you for your offering. Anyway I would like to know if it is possible to get the sgesv source code, but the problem is that I dont know if this routine relies on your magmablas package. Does it need the magmablas library?, or can it be used with CUBLAS?

Again, thank you very much for your interest

jpeinado
jpeinado
 
Posts: 10
Joined: Thu Dec 03, 2009 2:53 pm

Previous

Return to User discussion

Who is online

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