SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pzchkarg2()

subroutine pzchkarg2 ( integer  ictxt,
integer  nout,
character*(*)  sname,
character*1  uplo,
character*1  trans,
character*1  diag,
integer  m,
integer  n,
complex*16  alpha,
integer  ia,
integer  ja,
integer, dimension( * )  desca,
integer  ix,
integer  jx,
integer, dimension( * )  descx,
integer  incx,
complex*16  beta,
integer  iy,
integer  jy,
integer, dimension( * )  descy,
integer  incy,
integer  info 
)

Definition at line 2237 of file pzblas2tst.f.

2240*
2241* -- PBLAS test routine (version 2.0) --
2242* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2243* and University of California, Berkeley.
2244* April 1, 1998
2245*
2246* .. Scalar Arguments ..
2247 CHARACTER*1 DIAG, TRANS, UPLO
2248 INTEGER IA, ICTXT, INCX, INCY, INFO, IX, IY, JA, JX,
2249 $ JY, M, N, NOUT
2250 COMPLEX*16 ALPHA, BETA
2251* ..
2252* .. Array Arguments ..
2253 CHARACTER*(*) SNAME
2254 INTEGER DESCA( * ), DESCX( * ), DESCY( * )
2255* ..
2256*
2257* Purpose
2258* =======
2259*
2260* PZCHKARG2 checks the input-only arguments of the Level 2 PBLAS. When
2261* INFO = 0, this routine makes a copy of its arguments (which are INPUT
2262* only arguments to PBLAS routines). Otherwise, it verifies the values
2263* of these arguments against the saved copies.
2264*
2265* Arguments
2266* =========
2267*
2268* ICTXT (local input) INTEGER
2269* On entry, ICTXT specifies the BLACS context handle, indica-
2270* ting the global context of the operation. The context itself
2271* is global, but the value of ICTXT is local.
2272*
2273* NOUT (global input) INTEGER
2274* On entry, NOUT specifies the unit number for the output file.
2275* When NOUT is 6, output to screen, when NOUT is 0, output to
2276* stderr. NOUT is only defined for process 0.
2277*
2278* SNAME (global input) CHARACTER*(*)
2279* On entry, SNAME specifies the subroutine name calling this
2280* subprogram.
2281*
2282* UPLO (global input) CHARACTER*1
2283* On entry, UPLO specifies the UPLO option in the Level 2 PBLAS
2284* operation.
2285*
2286* TRANS (global input) CHARACTER*1
2287* On entry, TRANS specifies the TRANS option in the Level 2
2288* PBLAS operation.
2289*
2290* DIAG (global input) CHARACTER*1
2291* On entry, DIAG specifies the DIAG option in the Level 2 PBLAS
2292* operation.
2293*
2294* M (global input) INTEGER
2295* On entry, M specifies the dimension of the submatrix ope-
2296* rands.
2297*
2298* N (global input) INTEGER
2299* On entry, N specifies the dimension of the submatrix ope-
2300* rands.
2301*
2302* ALPHA (global input) COMPLEX*16
2303* On entry, ALPHA specifies the scalar alpha.
2304*
2305* IA (global input) INTEGER
2306* On entry, IA specifies A's global row index, which points to
2307* the beginning of the submatrix sub( A ).
2308*
2309* JA (global input) INTEGER
2310* On entry, JA specifies A's global column index, which points
2311* to the beginning of the submatrix sub( A ).
2312*
2313* DESCA (global and local input) INTEGER array
2314* On entry, DESCA is an integer array of dimension DLEN_. This
2315* is the array descriptor for the matrix A.
2316*
2317* IX (global input) INTEGER
2318* On entry, IX specifies X's global row index, which points to
2319* the beginning of the submatrix sub( X ).
2320*
2321* JX (global input) INTEGER
2322* On entry, JX specifies X's global column index, which points
2323* to the beginning of the submatrix sub( X ).
2324*
2325* DESCX (global and local input) INTEGER array
2326* On entry, DESCX is an integer array of dimension DLEN_. This
2327* is the array descriptor for the matrix X.
2328*
2329* INCX (global input) INTEGER
2330* On entry, INCX specifies the global increment for the
2331* elements of X. Only two values of INCX are supported in
2332* this version, namely 1 and M_X. INCX must not be zero.
2333*
2334* BETA (global input) COMPLEX*16
2335* On entry, BETA specifies the scalar beta.
2336*
2337* IY (global input) INTEGER
2338* On entry, IY specifies Y's global row index, which points to
2339* the beginning of the submatrix sub( Y ).
2340*
2341* JY (global input) INTEGER
2342* On entry, JY specifies Y's global column index, which points
2343* to the beginning of the submatrix sub( Y ).
2344*
2345* DESCY (global and local input) INTEGER array
2346* On entry, DESCY is an integer array of dimension DLEN_. This
2347* is the array descriptor for the matrix Y.
2348*
2349* INCY (global input) INTEGER
2350* On entry, INCY specifies the global increment for the
2351* elements of Y. Only two values of INCY are supported in
2352* this version, namely 1 and M_Y. INCY must not be zero.
2353*
2354* INFO (global input/global output) INTEGER
2355* When INFO = 0 on entry, the values of the arguments which are
2356* INPUT only arguments to a PBLAS routine are copied into sta-
2357* tic variables and INFO is unchanged on exit. Otherwise, the
2358* values of the arguments are compared against the saved co-
2359* pies. In case no error has been found INFO is zero on return,
2360* otherwise it is non zero.
2361*
2362* -- Written on April 1, 1998 by
2363* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
2364*
2365* =====================================================================
2366*
2367* .. Parameters ..
2368 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2369 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2370 $ RSRC_
2371 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
2372 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2373 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2374 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2375* ..
2376* .. Local Scalars ..
2377 CHARACTER*1 DIAGREF, TRANSREF, UPLOREF
2378 INTEGER I, IAREF, INCXREF, INCYREF, IXREF, IYREF,
2379 $ JAREF, JXREF, JYREF, MREF, MYCOL, MYROW, NPCOL,
2380 $ NPROW, NREF
2381 COMPLEX*16 ALPHAREF, BETAREF
2382* ..
2383* .. Local Arrays ..
2384 CHARACTER*15 ARGNAME
2385 INTEGER DESCAREF( DLEN_ ), DESCXREF( DLEN_ ),
2386 $ DESCYREF( DLEN_ )
2387* ..
2388* .. External Subroutines ..
2389 EXTERNAL blacs_gridinfo, igsum2d
2390* ..
2391* .. External Functions ..
2392 LOGICAL LSAME
2393 EXTERNAL lsame
2394* ..
2395* .. Save Statements ..
2396 SAVE
2397* ..
2398* .. Executable Statements ..
2399*
2400* Get grid parameters
2401*
2402 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2403*
2404* Check if first call. If yes, then save.
2405*
2406 IF( info.EQ.0 ) THEN
2407*
2408 diagref = diag
2409 transref = trans
2410 uploref = uplo
2411 mref = m
2412 nref = n
2413 alpharef = alpha
2414 iaref = ia
2415 jaref = ja
2416 DO 10 i = 1, dlen_
2417 descaref( i ) = desca( i )
2418 10 CONTINUE
2419 ixref = ix
2420 jxref = jx
2421 DO 20 i = 1, dlen_
2422 descxref( i ) = descx( i )
2423 20 CONTINUE
2424 incxref = incx
2425 betaref = beta
2426 iyref = iy
2427 jyref = jy
2428 DO 30 i = 1, dlen_
2429 descyref( i ) = descy( i )
2430 30 CONTINUE
2431 incyref = incy
2432*
2433 ELSE
2434*
2435* Test saved args. Return with first mismatch.
2436*
2437 argname = ' '
2438 IF( .NOT. lsame( diag, diagref ) ) THEN
2439 WRITE( argname, fmt = '(A)' ) 'DIAG'
2440 ELSE IF( .NOT. lsame( trans, transref ) ) THEN
2441 WRITE( argname, fmt = '(A)' ) 'TRANS'
2442 ELSE IF( .NOT. lsame( uplo, uploref ) ) THEN
2443 WRITE( argname, fmt = '(A)' ) 'UPLO'
2444 ELSE IF( m.NE.mref ) THEN
2445 WRITE( argname, fmt = '(A)' ) 'M'
2446 ELSE IF( n.NE.nref ) THEN
2447 WRITE( argname, fmt = '(A)' ) 'N'
2448 ELSE IF( alpha.NE.alpharef ) THEN
2449 WRITE( argname, fmt = '(A)' ) 'ALPHA'
2450 ELSE IF( ia.NE.iaref ) THEN
2451 WRITE( argname, fmt = '(A)' ) 'IA'
2452 ELSE IF( ja.NE.jaref ) THEN
2453 WRITE( argname, fmt = '(A)' ) 'JA'
2454 ELSE IF( desca( dtype_ ).NE.descaref( dtype_ ) ) THEN
2455 WRITE( argname, fmt = '(A)' ) 'DESCA( DTYPE_ )'
2456 ELSE IF( desca( m_ ).NE.descaref( m_ ) ) THEN
2457 WRITE( argname, fmt = '(A)' ) 'DESCA( M_ )'
2458 ELSE IF( desca( n_ ).NE.descaref( n_ ) ) THEN
2459 WRITE( argname, fmt = '(A)' ) 'DESCA( N_ )'
2460 ELSE IF( desca( imb_ ).NE.descaref( imb_ ) ) THEN
2461 WRITE( argname, fmt = '(A)' ) 'DESCA( IMB_ )'
2462 ELSE IF( desca( inb_ ).NE.descaref( inb_ ) ) THEN
2463 WRITE( argname, fmt = '(A)' ) 'DESCA( INB_ )'
2464 ELSE IF( desca( mb_ ).NE.descaref( mb_ ) ) THEN
2465 WRITE( argname, fmt = '(A)' ) 'DESCA( MB_ )'
2466 ELSE IF( desca( nb_ ).NE.descaref( nb_ ) ) THEN
2467 WRITE( argname, fmt = '(A)' ) 'DESCA( NB_ )'
2468 ELSE IF( desca( rsrc_ ).NE.descaref( rsrc_ ) ) THEN
2469 WRITE( argname, fmt = '(A)' ) 'DESCA( RSRC_ )'
2470 ELSE IF( desca( csrc_ ).NE.descaref( csrc_ ) ) THEN
2471 WRITE( argname, fmt = '(A)' ) 'DESCA( CSRC_ )'
2472 ELSE IF( desca( ctxt_ ).NE.descaref( ctxt_ ) ) THEN
2473 WRITE( argname, fmt = '(A)' ) 'DESCA( CTXT_ )'
2474 ELSE IF( desca( lld_ ).NE.descaref( lld_ ) ) THEN
2475 WRITE( argname, fmt = '(A)' ) 'DESCA( LLD_ )'
2476 ELSE IF( ix.NE.ixref ) THEN
2477 WRITE( argname, fmt = '(A)' ) 'IX'
2478 ELSE IF( jx.NE.jxref ) THEN
2479 WRITE( argname, fmt = '(A)' ) 'JX'
2480 ELSE IF( descx( dtype_ ).NE.descxref( dtype_ ) ) THEN
2481 WRITE( argname, fmt = '(A)' ) 'DESCX( DTYPE_ )'
2482 ELSE IF( descx( m_ ).NE.descxref( m_ ) ) THEN
2483 WRITE( argname, fmt = '(A)' ) 'DESCX( M_ )'
2484 ELSE IF( descx( n_ ).NE.descxref( n_ ) ) THEN
2485 WRITE( argname, fmt = '(A)' ) 'DESCX( N_ )'
2486 ELSE IF( descx( imb_ ).NE.descxref( imb_ ) ) THEN
2487 WRITE( argname, fmt = '(A)' ) 'DESCX( IMB_ )'
2488 ELSE IF( descx( inb_ ).NE.descxref( inb_ ) ) THEN
2489 WRITE( argname, fmt = '(A)' ) 'DESCX( INB_ )'
2490 ELSE IF( descx( mb_ ).NE.descxref( mb_ ) ) THEN
2491 WRITE( argname, fmt = '(A)' ) 'DESCX( MB_ )'
2492 ELSE IF( descx( nb_ ).NE.descxref( nb_ ) ) THEN
2493 WRITE( argname, fmt = '(A)' ) 'DESCX( NB_ )'
2494 ELSE IF( descx( rsrc_ ).NE.descxref( rsrc_ ) ) THEN
2495 WRITE( argname, fmt = '(A)' ) 'DESCX( RSRC_ )'
2496 ELSE IF( descx( csrc_ ).NE.descxref( csrc_ ) ) THEN
2497 WRITE( argname, fmt = '(A)' ) 'DESCX( CSRC_ )'
2498 ELSE IF( descx( ctxt_ ).NE.descxref( ctxt_ ) ) THEN
2499 WRITE( argname, fmt = '(A)' ) 'DESCX( CTXT_ )'
2500 ELSE IF( descx( lld_ ).NE.descxref( lld_ ) ) THEN
2501 WRITE( argname, fmt = '(A)' ) 'DESCX( LLD_ )'
2502 ELSE IF( incx.NE.incxref ) THEN
2503 WRITE( argname, fmt = '(A)' ) 'INCX'
2504 ELSE IF( beta.NE.betaref ) THEN
2505 WRITE( argname, fmt = '(A)' ) 'BETA'
2506 ELSE IF( iy.NE.iyref ) THEN
2507 WRITE( argname, fmt = '(A)' ) 'IY'
2508 ELSE IF( jy.NE.jyref ) THEN
2509 WRITE( argname, fmt = '(A)' ) 'JY'
2510 ELSE IF( descy( dtype_ ).NE.descyref( dtype_ ) ) THEN
2511 WRITE( argname, fmt = '(A)' ) 'DESCY( DTYPE_ )'
2512 ELSE IF( descy( m_ ).NE.descyref( m_ ) ) THEN
2513 WRITE( argname, fmt = '(A)' ) 'DESCY( M_ )'
2514 ELSE IF( descy( n_ ).NE.descyref( n_ ) ) THEN
2515 WRITE( argname, fmt = '(A)' ) 'DESCY( N_ )'
2516 ELSE IF( descy( imb_ ).NE.descyref( imb_ ) ) THEN
2517 WRITE( argname, fmt = '(A)' ) 'DESCY( IMB_ )'
2518 ELSE IF( descy( inb_ ).NE.descyref( inb_ ) ) THEN
2519 WRITE( argname, fmt = '(A)' ) 'DESCY( INB_ )'
2520 ELSE IF( descy( mb_ ).NE.descyref( mb_ ) ) THEN
2521 WRITE( argname, fmt = '(A)' ) 'DESCY( MB_ )'
2522 ELSE IF( descy( nb_ ).NE.descyref( nb_ ) ) THEN
2523 WRITE( argname, fmt = '(A)' ) 'DESCY( NB_ )'
2524 ELSE IF( descy( rsrc_ ).NE.descyref( rsrc_ ) ) THEN
2525 WRITE( argname, fmt = '(A)' ) 'DESCY( RSRC_ )'
2526 ELSE IF( descy( csrc_ ).NE.descyref( csrc_ ) ) THEN
2527 WRITE( argname, fmt = '(A)' ) 'DESCY( CSRC_ )'
2528 ELSE IF( descy( ctxt_ ).NE.descyref( ctxt_ ) ) THEN
2529 WRITE( argname, fmt = '(A)' ) 'DESCY( CTXT_ )'
2530 ELSE IF( descy( lld_ ).NE.descyref( lld_ ) ) THEN
2531 WRITE( argname, fmt = '(A)' ) 'DESCY( LLD_ )'
2532 ELSE IF( incy.NE.incyref ) THEN
2533 WRITE( argname, fmt = '(A)' ) 'INCY'
2534 ELSE
2535 info = 0
2536 END IF
2537*
2538 CALL igsum2d( ictxt, 'All', ' ', 1, 1, info, 1, -1, 0 )
2539*
2540 IF( myrow.EQ.0 .AND. mycol.EQ.0 ) THEN
2541*
2542 IF( info.NE.0 ) THEN
2543 WRITE( nout, fmt = 9999 ) argname, sname
2544 ELSE
2545 WRITE( nout, fmt = 9998 ) sname
2546 END IF
2547*
2548 END IF
2549*
2550 END IF
2551*
2552 9999 FORMAT( 2x, ' ***** Input-only parameter check: ', a,
2553 $ ' FAILED changed ', a, ' *****' )
2554 9998 FORMAT( 2x, ' ***** Input-only parameter check: ', a,
2555 $ ' PASSED *****' )
2556*
2557 RETURN
2558*
2559* End of PZCHKARG2
2560*
logical function lsame(ca, cb)
Definition tools.f:1724
Here is the caller graph for this function: