SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
All Classes Files Functions Variables Typedefs Macros

◆ pb_binfo()

subroutine pb_binfo ( integer  offd,
integer  m,
integer  n,
integer  imb1,
integer  inb1,
integer  mb,
integer  nb,
integer  mrrow,
integer  mrcol,
integer  lcmt00,
integer  mblks,
integer  nblks,
integer  imbloc,
integer  inbloc,
integer  lmbloc,
integer  lnbloc,
integer  ilow,
integer  low,
integer  iupp,
integer  upp 
)

Definition at line 3574 of file pblastst.f.

3577*
3578* -- PBLAS test routine (version 2.0) --
3579* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3580* and University of California, Berkeley.
3581* April 1, 1998
3582*
3583* .. Scalar Arguments ..
3584 INTEGER ILOW, IMB1, IMBLOC, INB1, INBLOC, IUPP, LCMT00,
3585 $ LMBLOC, LNBLOC, LOW, M, MB, MBLKS, MRCOL,
3586 $ MRROW, N, NB, NBLKS, OFFD, UPP
3587* ..
3588*
3589* Purpose
3590* =======
3591*
3592* PB_BINFO initializes the local information of an m by n local array
3593* owned by the process of relative coordinates ( MRROW, MRCOL ). Note
3594* that if m or n is less or equal than zero, there is no data, in which
3595* case this process does not need the local information computed by
3596* this routine to proceed.
3597*
3598* Arguments
3599* =========
3600*
3601* OFFD (global input) INTEGER
3602* On entry, OFFD specifies the off-diagonal of the underlying
3603* matrix of interest as follows:
3604* OFFD = 0 specifies the main diagonal,
3605* OFFD > 0 specifies lower subdiagonals, and
3606* OFFD < 0 specifies upper superdiagonals.
3607*
3608* M (local input) INTEGER
3609* On entry, M specifies the local number of rows of the under-
3610* lying matrix owned by the process of relative coordinates
3611* ( MRROW, MRCOL ). M must be at least zero.
3612*
3613* N (local input) INTEGER
3614* On entry, N specifies the local number of columns of the un-
3615* derlying matrix owned by the process of relative coordinates
3616* ( MRROW, MRCOL ). N must be at least zero.
3617*
3618* IMB1 (global input) INTEGER
3619* On input, IMB1 specifies the global true size of the first
3620* block of rows of the underlying global submatrix. IMB1 must
3621* be at least MIN( 1, M ).
3622*
3623* INB1 (global input) INTEGER
3624* On input, INB1 specifies the global true size of the first
3625* block of columns of the underlying global submatrix. INB1
3626* must be at least MIN( 1, N ).
3627*
3628* MB (global input) INTEGER
3629* On entry, MB specifies the blocking factor used to partition
3630* the rows of the matrix. MB must be at least one.
3631*
3632* NB (global input) INTEGER
3633* On entry, NB specifies the blocking factor used to partition
3634* the the columns of the matrix. NB must be at least one.
3635*
3636* MRROW (local input) INTEGER
3637* On entry, MRROW specifies the relative row coordinate of the
3638* process that possesses these M rows. MRROW must be least zero
3639* and strictly less than NPROW.
3640*
3641* MRCOL (local input) INTEGER
3642* On entry, MRCOL specifies the relative column coordinate of
3643* the process that possesses these N columns. MRCOL must be
3644* least zero and strictly less than NPCOL.
3645*
3646* LCMT00 (local output) INTEGER
3647* On exit, LCMT00 is the LCM value of the left upper block of
3648* this m by n local block owned by the process of relative co-
3649* ordinates ( MRROW, MRCOL ).
3650*
3651* MBLKS (local output) INTEGER
3652* On exit, MBLKS specifies the local number of blocks of rows
3653* corresponding to M. MBLKS must be at least zero.
3654*
3655* NBLKS (local output) INTEGER
3656* On exit, NBLKS specifies the local number of blocks of co-
3657* lumns corresponding to N. NBLKS must be at least zero.
3658*
3659* IMBLOC (local output) INTEGER
3660* On exit, IMBLOC specifies the number of rows (size) of the
3661* uppest blocks of this m by n local array owned by the process
3662* of relative coordinates ( MRROW, MRCOL ). IMBLOC is at least
3663* MIN( 1, M ).
3664*
3665* INBLOC (local output) INTEGER
3666* On exit, INBLOC specifies the number of columns (size) of
3667* the leftmost blocks of this m by n local array owned by the
3668* process of relative coordinates ( MRROW, MRCOL ). INBLOC is
3669* at least MIN( 1, N ).
3670*
3671* LMBLOC (local output) INTEGER
3672* On exit, LMBLOC specifies the number of rows (size) of the
3673* lowest blocks of this m by n local array owned by the process
3674* of relative coordinates ( MRROW, MRCOL ). LMBLOC is at least
3675* MIN( 1, M ).
3676*
3677* LNBLOC (local output) INTEGER
3678* On exit, LNBLOC specifies the number of columns (size) of the
3679* rightmost blocks of this m by n local array owned by the
3680* process of relative coordinates ( MRROW, MRCOL ). LNBLOC is
3681* at least MIN( 1, N ).
3682*
3683* ILOW (local output) INTEGER
3684* On exit, ILOW is the lower bound characterizing the first co-
3685* lumn block owning offdiagonals of this m by n array. ILOW
3686* must be less or equal than zero.
3687*
3688* LOW (global output) INTEGER
3689* On exit, LOW is the lower bound characterizing the column
3690* blocks with te exception of the first one (see ILOW) owning
3691* offdiagonals of this m by n array. LOW must be less or equal
3692* than zero.
3693*
3694* IUPP (local output) INTEGER
3695* On exit, IUPP is the upper bound characterizing the first row
3696* block owning offdiagonals of this m by n array. IUPP must be
3697* greater or equal than zero.
3698*
3699* UPP (global output) INTEGER
3700* On exit, UPP is the upper bound characterizing the row
3701* blocks with te exception of the first one (see IUPP) owning
3702* offdiagonals of this m by n array. UPP must be greater or
3703* equal than zero.
3704*
3705* -- Written on April 1, 1998 by
3706* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3707*
3708* =====================================================================
3709*
3710* .. Local Scalars ..
3711 INTEGER TMP1
3712* ..
3713* .. Intrinsic Functions ..
3714 INTRINSIC max, min
3715* ..
3716* .. Executable Statements ..
3717*
3718* Initialize LOW, ILOW, UPP, IUPP, LMBLOC, LNBLOC, IMBLOC, INBLOC,
3719* MBLKS, NBLKS and LCMT00.
3720*
3721 low = 1 - nb
3722 upp = mb - 1
3723*
3724 lcmt00 = offd
3725*
3726 IF( m.LE.0 .OR. n.LE.0 ) THEN
3727*
3728 IF( mrrow.GT.0 ) THEN
3729 iupp = mb - 1
3730 ELSE
3731 iupp = max( 0, imb1 - 1 )
3732 END IF
3733 imbloc = 0
3734 mblks = 0
3735 lmbloc = 0
3736*
3737 IF( mrcol.GT.0 ) THEN
3738 ilow = 1 - nb
3739 ELSE
3740 ilow = min( 0, 1 - inb1 )
3741 END IF
3742 inbloc = 0
3743 nblks = 0
3744 lnbloc = 0
3745*
3746 lcmt00 = lcmt00 + ( low - ilow + mrcol * nb ) -
3747 $ ( iupp - upp + mrrow * mb )
3748*
3749 RETURN
3750*
3751 END IF
3752*
3753 IF( mrrow.GT.0 ) THEN
3754*
3755 imbloc = min( m, mb )
3756 iupp = mb - 1
3757 lcmt00 = lcmt00 - ( imb1 - mb + mrrow * mb )
3758 mblks = ( m - 1 ) / mb + 1
3759 lmbloc = m - ( m / mb ) * mb
3760 IF( lmbloc.EQ.0 )
3761 $ lmbloc = mb
3762*
3763 IF( mrcol.GT.0 ) THEN
3764*
3765 inbloc = min( n, nb )
3766 ilow = 1 - nb
3767 lcmt00 = lcmt00 + inb1 - nb + mrcol * nb
3768 nblks = ( n - 1 ) / nb + 1
3769 lnbloc = n - ( n / nb ) * nb
3770 IF( lnbloc.EQ.0 )
3771 $ lnbloc = nb
3772*
3773 ELSE
3774*
3775 inbloc = inb1
3776 ilow = 1 - inb1
3777 tmp1 = n - inb1
3778 IF( tmp1.GT.0 ) THEN
3779*
3780* more than one block
3781*
3782 nblks = ( tmp1 - 1 ) / nb + 2
3783 lnbloc = tmp1 - ( tmp1 / nb ) * nb
3784 IF( lnbloc.EQ.0 )
3785 $ lnbloc = nb
3786*
3787 ELSE
3788*
3789 nblks = 1
3790 lnbloc = inb1
3791*
3792 END IF
3793*
3794 END IF
3795*
3796 ELSE
3797*
3798 imbloc = imb1
3799 iupp = imb1 - 1
3800 tmp1 = m - imb1
3801 IF( tmp1.GT.0 ) THEN
3802*
3803* more than one block
3804*
3805 mblks = ( tmp1 - 1 ) / mb + 2
3806 lmbloc = tmp1 - ( tmp1 / mb ) * mb
3807 IF( lmbloc.EQ.0 )
3808 $ lmbloc = mb
3809*
3810 ELSE
3811*
3812 mblks = 1
3813 lmbloc = imb1
3814*
3815 END IF
3816*
3817 IF( mrcol.GT.0 ) THEN
3818*
3819 inbloc = min( n, nb )
3820 ilow = 1 - nb
3821 lcmt00 = lcmt00 + inb1 - nb + mrcol * nb
3822 nblks = ( n - 1 ) / nb + 1
3823 lnbloc = n - ( n / nb ) * nb
3824 IF( lnbloc.EQ.0 )
3825 $ lnbloc = nb
3826*
3827 ELSE
3828*
3829 inbloc = inb1
3830 ilow = 1 - inb1
3831 tmp1 = n - inb1
3832 IF( tmp1.GT.0 ) THEN
3833*
3834* more than one block
3835*
3836 nblks = ( tmp1 - 1 ) / nb + 2
3837 lnbloc = tmp1 - ( tmp1 / nb ) * nb
3838 IF( lnbloc.EQ.0 )
3839 $ lnbloc = nb
3840*
3841 ELSE
3842*
3843 nblks = 1
3844 lnbloc = inb1
3845*
3846 END IF
3847*
3848 END IF
3849*
3850 END IF
3851*
3852 RETURN
3853*
3854* End of PB_BINFO
3855*
#define max(A, B)
Definition pcgemr.c:180
#define min(A, B)
Definition pcgemr.c:181
Here is the caller graph for this function: