Transposed cases with zgetrs and cgetrs

Open discussion for MAGMA

Transposed cases with zgetrs and cgetrs

Postby fletchjp » Tue Mar 29, 2011 4:35 pm

The header for MAGMA zgetrs_gpu.cpp contains the following information about the definition of the character describing use of the transpose:

Code: Select all
    TRANS   (input) CHARACTER*1
            Specifies the form of the system of equations:
            = 'N':  A * X = B  (No transpose)
            = 'T':  A'* X = B  (Transpose)
            = 'C':  A'* X = B  (Conjugate transpose = Transpose)


The implication of this is that the Transpose and Conjugate transpose cases are the same, and this is what is implemented in the code. Unfortunately this is not the case, as is indicated by the following from the NAG description at
http://www.nag.co.uk/numeric/Fl/manual2 ... f07asf.pdf

Code: Select all
TRANS – CHARACTER*1 Input
On entry: indicates the form of the equations as follows:
if TRANS == ’N’, AX = B is solved for X;
if TRANS == ’T’, ATX = B is solved for X;
if TRANS == ’C’, AHX = B is solved for X.
Constraint: TRANS == ’N’; ’T’ or ’C’.


I have tested this on MAGMA zgetrs_gpu.cpp from RC4 and it is indeed incorrect.

The T and C cases are very similar and the solution is that, once the N cases has been identified, to modify the code to pass the character from the call directly to the calls to ztrsm.

Code: Select all
       cublasZtrsm(MagmaLeft, MagmaUpper, trans, MagmaNonUnit, n, nrhs, c_one, dA, ldda, dB, lddb );
        cublasZtrsm(MagmaLeft, MagmaLower, trans, MagmaUnit,    n, nrhs, c_one, dA, ldda, dB, lddb );


I have tested this using an extension of testing_zgetrf_gpu_f.f and testing a small case which I have also solved using LAPACK.

Copies of the codes available on request.

Best wishes

John
fletchjp
 
Posts: 170
Joined: Mon Dec 27, 2010 7:29 pm

Re: Transposed cases with zgetrs and cgetrs

Postby mateo70 » Tue Apr 05, 2011 6:50 pm

John,

thanks for the information. I havn't seen it when it has been commited. I just corrected it and will be integrated in the next release. (I hope by the end of the week)

Mathieu
mateo70
 
Posts: 41
Joined: Tue Mar 08, 2011 12:38 pm

Re: Transposed cases with zgetrs and cgetrs

Postby fletchjp » Wed Apr 06, 2011 8:51 am

Thank you I will look forward to that.

John
fletchjp
 
Posts: 170
Joined: Mon Dec 27, 2010 7:29 pm


Return to User discussion

Who is online

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