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

◆ pdblas1tstchke()

subroutine pdblas1tstchke ( logical, dimension( * )  ltest,
integer  inout,
integer  nprocs 
)

Definition at line 1468 of file pdblas1tst.f.

1469*
1470* -- PBLAS test routine (version 2.0) --
1471* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
1472* and University of California, Berkeley.
1473* April 1, 1998
1474*
1475* .. Scalar Arguments ..
1476 INTEGER INOUT, NPROCS
1477* ..
1478* .. Array Arguments ..
1479 LOGICAL LTEST( * )
1480* ..
1481*
1482* Purpose
1483* =======
1484*
1485* PDBLAS1TSTCHKE tests the error exits of the Level 1 PBLAS.
1486*
1487* Notes
1488* =====
1489*
1490* A description vector is associated with each 2D block-cyclicly dis-
1491* tributed matrix. This vector stores the information required to
1492* establish the mapping between a matrix entry and its corresponding
1493* process and memory location.
1494*
1495* In the following comments, the character _ should be read as
1496* "of the distributed matrix". Let A be a generic term for any 2D
1497* block cyclicly distributed matrix. Its description vector is DESCA:
1498*
1499* NOTATION STORED IN EXPLANATION
1500* ---------------- --------------- ------------------------------------
1501* DTYPE_A (global) DESCA( DTYPE_ ) The descriptor type.
1502* CTXT_A (global) DESCA( CTXT_ ) The BLACS context handle, indicating
1503* the NPROW x NPCOL BLACS process grid
1504* A is distributed over. The context
1505* itself is global, but the handle
1506* (the integer value) may vary.
1507* M_A (global) DESCA( M_ ) The number of rows in the distribu-
1508* ted matrix A, M_A >= 0.
1509* N_A (global) DESCA( N_ ) The number of columns in the distri-
1510* buted matrix A, N_A >= 0.
1511* IMB_A (global) DESCA( IMB_ ) The number of rows of the upper left
1512* block of the matrix A, IMB_A > 0.
1513* INB_A (global) DESCA( INB_ ) The number of columns of the upper
1514* left block of the matrix A,
1515* INB_A > 0.
1516* MB_A (global) DESCA( MB_ ) The blocking factor used to distri-
1517* bute the last M_A-IMB_A rows of A,
1518* MB_A > 0.
1519* NB_A (global) DESCA( NB_ ) The blocking factor used to distri-
1520* bute the last N_A-INB_A columns of
1521* A, NB_A > 0.
1522* RSRC_A (global) DESCA( RSRC_ ) The process row over which the first
1523* row of the matrix A is distributed,
1524* NPROW > RSRC_A >= 0.
1525* CSRC_A (global) DESCA( CSRC_ ) The process column over which the
1526* first column of A is distributed.
1527* NPCOL > CSRC_A >= 0.
1528* LLD_A (local) DESCA( LLD_ ) The leading dimension of the local
1529* array storing the local blocks of
1530* the distributed matrix A,
1531* IF( Lc( 1, N_A ) > 0 )
1532* LLD_A >= MAX( 1, Lr( 1, M_A ) )
1533* ELSE
1534* LLD_A >= 1.
1535*
1536* Let K be the number of rows of a matrix A starting at the global in-
1537* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
1538* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
1539* receive if these K rows were distributed over NPROW processes. If K
1540* is the number of columns of a matrix A starting at the global index
1541* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
1542* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
1543* these K columns were distributed over NPCOL processes.
1544*
1545* The values of Lr() and Lc() may be determined via a call to the func-
1546* tion PB_NUMROC:
1547* Lr( IA, K ) = PB_NUMROC( K, IA, IMB_A, MB_A, MYROW, RSRC_A, NPROW )
1548* Lc( JA, K ) = PB_NUMROC( K, JA, INB_A, NB_A, MYCOL, CSRC_A, NPCOL )
1549*
1550* Arguments
1551* =========
1552*
1553* LTEST (global input) LOGICAL array
1554* On entry, LTEST is an array of dimension at least 8 (NSUBS).
1555* If LTEST( 1 ) is .TRUE., PDSWAP will be tested;
1556* If LTEST( 2 ) is .TRUE., PDSCAL will be tested;
1557* If LTEST( 3 ) is .TRUE., PDCOPY will be tested;
1558* If LTEST( 4 ) is .TRUE., PDAXPY will be tested;
1559* If LTEST( 5 ) is .TRUE., PDDOT will be tested;
1560* If LTEST( 6 ) is .TRUE., PDNRM2 will be tested;
1561* If LTEST( 7 ) is .TRUE., PDASUM will be tested;
1562* If LTEST( 8 ) is .TRUE., PDAMAX will be tested.
1563*
1564* INOUT (global input) INTEGER
1565* On entry, INOUT specifies the unit number for output file.
1566* When INOUT is 6, output to screen, when INOUT = 0, output to
1567* stderr. INOUT is only defined in process 0.
1568*
1569* NPROCS (global input) INTEGER
1570* On entry, NPROCS specifies the total number of processes cal-
1571* ling this routine.
1572*
1573* Calling sequence encodings
1574* ==========================
1575*
1576* code Formal argument list Examples
1577*
1578* 11 (n, v1,v2) _SWAP, _COPY
1579* 12 (n,s1, v1 ) _SCAL, _SCAL
1580* 13 (n,s1, v1,v2) _AXPY, _DOT_
1581* 14 (n,s1,i1,v1 ) _AMAX
1582* 15 (n,u1, v1 ) _ASUM, _NRM2
1583*
1584* 21 ( trans, m,n,s1,m1,v1,s2,v2) _GEMV
1585* 22 (uplo, n,s1,m1,v1,s2,v2) _SYMV, _HEMV
1586* 23 (uplo,trans,diag, n, m1,v1 ) _TRMV, _TRSV
1587* 24 ( m,n,s1,v1,v2,m1) _GER_
1588* 25 (uplo, n,s1,v1, m1) _SYR
1589* 26 (uplo, n,u1,v1, m1) _HER
1590* 27 (uplo, n,s1,v1,v2,m1) _SYR2, _HER2
1591*
1592* 31 ( transa,transb, m,n,k,s1,m1,m2,s2,m3) _GEMM
1593* 32 (side,uplo, m,n, s1,m1,m2,s2,m3) _SYMM, _HEMM
1594* 33 ( uplo,trans, n,k,s1,m1, s2,m3) _SYRK
1595* 34 ( uplo,trans, n,k,u1,m1, u2,m3) _HERK
1596* 35 ( uplo,trans, n,k,s1,m1,m2,s2,m3) _SYR2K
1597* 36 ( uplo,trans, n,k,s1,m1,m2,u2,m3) _HER2K
1598* 37 ( m,n, s1,m1, s2,m3) _TRAN_
1599* 38 (side,uplo,transa, diag,m,n, s1,m1,m2 ) _TRMM, _TRSM
1600* 39 ( trans, m,n, s1,m1, s2,m3) _GEADD
1601* 40 ( uplo,trans, m,n, s1,m1, s2,m3) _TRADD
1602*
1603* -- Written on April 1, 1998 by
1604* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
1605*
1606* =====================================================================
1607*
1608* .. Parameters ..
1609 INTEGER NSUBS
1610 parameter( nsubs = 8 )
1611* ..
1612* .. Local Scalars ..
1613 LOGICAL ABRTSAV
1614 INTEGER I, ICTXT, MYCOL, MYROW, NPCOL, NPROW
1615* ..
1616* .. Local Arrays ..
1617 INTEGER SCODE( NSUBS )
1618* ..
1619* .. External Subroutines ..
1620 EXTERNAL blacs_get, blacs_gridexit, blacs_gridinfo,
1621 $ blacs_gridinit, pdamax, pdasum, pdaxpy, pdcopy,
1622 $ pddimee, pddot, pdnrm2, pdscal, pdswap,
1623 $ pdvecee
1624* ..
1625* .. Common Blocks ..
1626 LOGICAL ABRTFLG
1627 INTEGER NOUT
1628 CHARACTER*7 SNAMES( NSUBS )
1629 COMMON /snamec/snames
1630 COMMON /pberrorc/nout, abrtflg
1631* ..
1632* .. Data Statements ..
1633 DATA scode/11, 12, 11, 13, 13, 15, 15, 14/
1634* ..
1635* .. Executable Statements ..
1636*
1637* Temporarily define blacs grid to include all processes so
1638* information can be broadcast to all processes.
1639*
1640 CALL blacs_get( -1, 0, ictxt )
1641 CALL blacs_gridinit( ictxt, 'Row-major', 1, nprocs )
1642 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
1643*
1644* Set ABRTFLG to FALSE so that the PBLAS error handler won't abort
1645* on errors during these tests and set the output device unit for
1646* it.
1647*
1648 abrtsav = abrtflg
1649 abrtflg = .false.
1650 nout = inout
1651*
1652* Test PDSWAP
1653*
1654 i = 1
1655 IF( ltest( i ) ) THEN
1656 CALL pddimee( ictxt, nout, pdswap, scode( i ), snames( i ) )
1657 CALL pdvecee( ictxt, nout, pdswap, scode( i ), snames( i ) )
1658 END IF
1659*
1660* Test PDSCAL
1661*
1662 i = i + 1
1663 IF( ltest( i ) ) THEN
1664 CALL pddimee( ictxt, nout, pdscal, scode( i ), snames( i ) )
1665 CALL pdvecee( ictxt, nout, pdscal, scode( i ), snames( i ) )
1666 END IF
1667*
1668* Test PDCOPY
1669*
1670 i = i + 1
1671 IF( ltest( i ) ) THEN
1672 CALL pddimee( ictxt, nout, pdcopy, scode( i ), snames( i ) )
1673 CALL pdvecee( ictxt, nout, pdcopy, scode( i ), snames( i ) )
1674 END IF
1675*
1676* Test PDAXPY
1677*
1678 i = i + 1
1679 IF( ltest( i ) ) THEN
1680 CALL pddimee( ictxt, nout, pdaxpy, scode( i ), snames( i ) )
1681 CALL pdvecee( ictxt, nout, pdaxpy, scode( i ), snames( i ) )
1682 END IF
1683*
1684* Test PDDOT
1685*
1686 i = i + 1
1687 IF( ltest( i ) ) THEN
1688 CALL pddimee( ictxt, nout, pddot, scode( i ), snames( i ) )
1689 CALL pdvecee( ictxt, nout, pddot, scode( i ), snames( i ) )
1690 END IF
1691*
1692* Test PDNRM2
1693*
1694 i = i + 1
1695 IF( ltest( i ) ) THEN
1696 CALL pddimee( ictxt, nout, pdnrm2, scode( i ), snames( i ) )
1697 CALL pdvecee( ictxt, nout, pdnrm2, scode( i ), snames( i ) )
1698 END IF
1699*
1700* Test PDASUM
1701*
1702 i = i + 1
1703 IF( ltest( i ) ) THEN
1704 CALL pddimee( ictxt, nout, pdasum, scode( i ), snames( i ) )
1705 CALL pdvecee( ictxt, nout, pdasum, scode( i ), snames( i ) )
1706 END IF
1707*
1708* Test PDAMAX
1709*
1710 i = i + 1
1711 IF( ltest( i ) ) THEN
1712 CALL pddimee( ictxt, nout, pdamax, scode( i ), snames( i ) )
1713 CALL pdvecee( ictxt, nout, pdamax, scode( i ), snames( i ) )
1714 END IF
1715*
1716 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
1717 $ WRITE( nout, fmt = 9999 )
1718*
1719 CALL blacs_gridexit( ictxt )
1720*
1721* Reset ABRTFLG to the value it had before calling this routine
1722*
1723 abrtflg = abrtsav
1724*
1725 9999 FORMAT( 2x, 'Error-exit tests completed.' )
1726*
1727 RETURN
1728*
1729* End of PDBLAS1TSTCHKE
1730*
subroutine pddimee(ictxt, nout, subptr, scode, sname)
Definition pdblastst.f:455
subroutine pdvecee(ictxt, nout, subptr, scode, sname)
Definition pdblastst.f:936
Here is the call graph for this function:
Here is the caller graph for this function: