Problem with dimention

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

Problem with dimention

Postby tsuitung » Mon Dec 05, 2011 7:49 am

Hi!
I'm using CUDA fortran's device interface. I mainly use sgels to solve a least square problem.
for example, A and B is in device memory.The total number of least square problems is K. So every time i solve a equation A(M,N)*X(N,1)=B(M,1). But in fortran, I allocate A & B to be only one-dimention, that will be ok in lapack,but i got error in cula.
Code: Select all
A(M*N*K),B(M*K)
do i=1,MAX
      call cula_device_sgels('n',M,N,1,A((i-1)*M*N+1),M,B((i-1)*M+1),M)
end do

How to solve this problem? Is that ok If I set A(M,N,K), and A(:,:,i) in the loop?
Ps: if MAx=1, it looks like no error.
tsuitung
 
Posts: 8
Joined: Mon Nov 15, 2010 7:08 pm

Re: Problem with dimention

Postby tsuitung » Mon Dec 05, 2011 8:07 am

I saw this in the forum
http://www.culatools.com/forums/viewtopic.php?f=14&t=774&p=1530&hilit=batch#p1530
I'm looking forward to this batched-solver. Is there a plan for this product?
tsuitung
 
Posts: 8
Joined: Mon Nov 15, 2010 7:08 pm

Re: Problem with dimention

Postby john » Tue Dec 06, 2011 11:36 am

You will want to list the error in order to get assistance.

As for the batch solver, at this time we are creating these solely on a custom basis. The CUDA code needs to be created uniquely for each parameter combination and batch size and so cannot readily be turned into an effective library.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Problem with dimention

Postby tsuitung » Wed Dec 07, 2011 12:48 am

john wrote:You will want to list the error in order to get assistance.

As for the batch solver, at this time we are creating these solely on a custom basis. The CUDA code needs to be created uniquely for each parameter combination and batch size and so cannot readily be turned into an effective library.

Hi john
The error is a segment fault. The problem lies in segls. Is there any error in the usage of arrays? Or the segls's parameter must be exactly the same dimention according to the reference?
I'm using a batched-solver from nvdia, you can download it from nv developer's site if you're registed. It's open-source under BSD licence.
tsuitung
 
Posts: 8
Joined: Mon Nov 15, 2010 7:08 pm

Re: Problem with dimention

Postby john » Wed Dec 07, 2011 7:42 am

Given that you said you allocated in Fortran, but you're using the Device interface, I have to guess that the problem is that the Device interface requires GPU memory pointers. These must be allocated with cudaMalloc rather than Fortran's allocate.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm


Return to CULA Dense Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron