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

◆ pzblas1tstchke()

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

Definition at line 1494 of file pzblas1tst.f.

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