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
sgetrf matlab mex file - crashing...
Re: sgetrf matlab mex file - crashing...
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
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
-
Stan Tomov
- Posts: 283
- Joined: Fri Aug 21, 2009 10:39 pm
Re: sgetrf matlab mex file - crashing...
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
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
Re: sgetrf matlab mex file - crashing...
Hi Stan:
Thank you very much for your help.
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
Thank you very much for your help.
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: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.
OKStan Tomov wrote: The examples in the testing directory use pinned memory for performance, but non-pinned would work as well.
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: Can you run other CUDA-based routines/code (not just a single CUDA kernel) through matlab?
Stan
Good to hear this!!Stan Tomov wrote: We are still working on releasing the sources. I can send you some if you think that may be helpful.
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