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

◆ pb_desctrans()

subroutine pb_desctrans ( integer, dimension( * )  descin,
integer, dimension( * )  descout 
)

Definition at line 2963 of file pblastst.f.

2964*
2965* -- PBLAS test routine (version 2.0) --
2966* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2967* and University of California, Berkeley.
2968* April 1, 1998
2969*
2970* .. Array Arguments ..
2971 INTEGER DESCIN( * ), DESCOUT( * )
2972* ..
2973*
2974* Purpose
2975* =======
2976*
2977* PB_DESCTRANS converts a descriptor DESCIN of type BLOCK_CYCLIC_2D
2978* or BLOCK_CYCLIC_INB_2D into a descriptor DESCOUT of type
2979* BLOCK_CYCLIC_INB_2D.
2980*
2981* Notes
2982* =====
2983*
2984* A description vector is associated with each 2D block-cyclicly dis-
2985* tributed matrix. This vector stores the information required to
2986* establish the mapping between a matrix entry and its corresponding
2987* process and memory location.
2988*
2989* In the following comments, the character _ should be read as
2990* "of the distributed matrix". Let A be a generic term for any 2D
2991* block cyclicly distributed matrix. Its description vector is DESCA:
2992*
2993* NOTATION STORED IN EXPLANATION
2994* ---------------- --------------- -----------------------------------
2995* DTYPE_A (global) DESCA( DTYPE1_ ) The descriptor type.
2996* CTXT_A (global) DESCA( CTXT1_ ) The BLACS context handle indicating
2997* the NPROW x NPCOL BLACS process
2998* grid A is distributed over. The
2999* context itself is global, but the
3000* handle (the integer value) may
3001* vary.
3002* M_A (global) DESCA( M1_ ) The number of rows in the distri-
3003* buted matrix A, M_A >= 0.
3004* N_A (global) DESCA( N1_ ) The number of columns in the dis-
3005* tributed matrix A, N_A >= 0.
3006* MB_A (global) DESCA( MB1_ ) The blocking factor used to distri-
3007* bute the rows of A, MB_A > 0.
3008* NB_A (global) DESCA( NB1_ ) The blocking factor used to distri-
3009* bute the columns of A, NB_A > 0.
3010* RSRC_A (global) DESCA( RSRC1_ ) The process row over which the
3011* first row of the matrix A is dis-
3012* tributed, NPROW > RSRC_A >= 0.
3013* CSRC_A (global) DESCA( CSRC1_ ) The process column over which the
3014* first column of A is distributed.
3015* NPCOL > CSRC_A >= 0.
3016* LLD_A (local) DESCA( LLD1_ ) The leading dimension of the local
3017* array storing the local blocks of
3018* the distributed matrix A,
3019* IF( Lc( 1, N_A ) > 0 )
3020* LLD_A >= MAX( 1, Lr( 1, M_A ) )
3021* ELSE
3022* LLD_A >= 1.
3023*
3024* Let K be the number of rows of a matrix A starting at the global in-
3025* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
3026* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
3027* receive if these K rows were distributed over NPROW processes. If K
3028* is the number of columns of a matrix A starting at the global index
3029* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
3030* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
3031* these K columns were distributed over NPCOL processes.
3032*
3033* The values of Lr() and Lc() may be determined via a call to the func-
3034* tion PB_NUMROC:
3035* Lr( IA, K ) = PB_NUMROC( K, IA, MB_A, MB_A, MYROW, RSRC_A, NPROW )
3036* Lc( JA, K ) = PB_NUMROC( K, JA, NB_A, NB_A, MYCOL, CSRC_A, NPCOL )
3037*
3038* A description vector is associated with each 2D block-cyclicly dis-
3039* tributed matrix. This vector stores the information required to
3040* establish the mapping between a matrix entry and its corresponding
3041* process and memory location.
3042*
3043* In the following comments, the character _ should be read as
3044* "of the distributed matrix". Let A be a generic term for any 2D
3045* block cyclicly distributed matrix. Its description vector is DESCA:
3046*
3047* NOTATION STORED IN EXPLANATION
3048* ---------------- --------------- ------------------------------------
3049* DTYPE_A (global) DESCA( DTYPE_ ) The descriptor type.
3050* CTXT_A (global) DESCA( CTXT_ ) The BLACS context handle, indicating
3051* the NPROW x NPCOL BLACS process grid
3052* A is distributed over. The context
3053* itself is global, but the handle
3054* (the integer value) may vary.
3055* M_A (global) DESCA( M_ ) The number of rows in the distribu-
3056* ted matrix A, M_A >= 0.
3057* N_A (global) DESCA( N_ ) The number of columns in the distri-
3058* buted matrix A, N_A >= 0.
3059* IMB_A (global) DESCA( IMB_ ) The number of rows of the upper left
3060* block of the matrix A, IMB_A > 0.
3061* INB_A (global) DESCA( INB_ ) The number of columns of the upper
3062* left block of the matrix A,
3063* INB_A > 0.
3064* MB_A (global) DESCA( MB_ ) The blocking factor used to distri-
3065* bute the last M_A-IMB_A rows of A,
3066* MB_A > 0.
3067* NB_A (global) DESCA( NB_ ) The blocking factor used to distri-
3068* bute the last N_A-INB_A columns of
3069* A, NB_A > 0.
3070* RSRC_A (global) DESCA( RSRC_ ) The process row over which the first
3071* row of the matrix A is distributed,
3072* NPROW > RSRC_A >= 0.
3073* CSRC_A (global) DESCA( CSRC_ ) The process column over which the
3074* first column of A is distributed.
3075* NPCOL > CSRC_A >= 0.
3076* LLD_A (local) DESCA( LLD_ ) The leading dimension of the local
3077* array storing the local blocks of
3078* the distributed matrix A,
3079* IF( Lc( 1, N_A ) > 0 )
3080* LLD_A >= MAX( 1, Lr( 1, M_A ) )
3081* ELSE
3082* LLD_A >= 1.
3083*
3084* Let K be the number of rows of a matrix A starting at the global in-
3085* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
3086* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
3087* receive if these K rows were distributed over NPROW processes. If K
3088* is the number of columns of a matrix A starting at the global index
3089* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
3090* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
3091* these K columns were distributed over NPCOL processes.
3092*
3093* The values of Lr() and Lc() may be determined via a call to the func-
3094* tion PB_NUMROC:
3095* Lr( IA, K ) = PB_NUMROC( K, IA, IMB_A, MB_A, MYROW, RSRC_A, NPROW )
3096* Lc( JA, K ) = PB_NUMROC( K, JA, INB_A, NB_A, MYCOL, CSRC_A, NPCOL )
3097*
3098* Arguments
3099* =========
3100*
3101* DESCIN (global and local input) INTEGER array
3102* On entry, DESCIN is an array of dimension DLEN1_ or DLEN_ as
3103* specified by its first entry DESCIN( DTYPE_ ). DESCIN is the
3104* source array descriptor of type BLOCK_CYCLIC_2D or of type
3105* BLOCK_CYCLIC_2D_INB.
3106*
3107* DESCOUT (global and local output) INTEGER array
3108* On entry, DESCOUT is an array of dimension DLEN_. DESCOUT is
3109* the target array descriptor of type BLOCK_CYCLIC_2D_INB.
3110*
3111* -- Written on April 1, 1998 by
3112* R. Clint Whaley, University of Tennessee, Knoxville 37996, USA.
3113*
3114* =====================================================================
3115*
3116* .. Parameters ..
3117 INTEGER BLOCK_CYCLIC_2D, CSRC1_, CTXT1_, DLEN1_,
3118 $ DTYPE1_, LLD1_, M1_, MB1_, N1_, NB1_, RSRC1_
3119 parameter( block_cyclic_2d = 1, dlen1_ = 9, dtype1_ = 1,
3120 $ ctxt1_ = 2, m1_ = 3, n1_ = 4, mb1_ = 5,
3121 $ nb1_ = 6, rsrc1_ = 7, csrc1_ = 8, lld1_ = 9 )
3122 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
3123 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
3124 $ RSRC_
3125 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
3126 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
3127 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
3128 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
3129* ..
3130* .. Local Scalars ..
3131 INTEGER I
3132* ..
3133* .. Executable Statements ..
3134*
3135 IF( descin( dtype_ ).EQ.block_cyclic_2d ) THEN
3136 descout( dtype_ ) = block_cyclic_2d_inb
3137 descout( ctxt_ ) = descin( ctxt1_ )
3138 descout( m_ ) = descin( m1_ )
3139 descout( n_ ) = descin( n1_ )
3140 descout( imb_ ) = descin( mb1_ )
3141 descout( inb_ ) = descin( nb1_ )
3142 descout( mb_ ) = descin( mb1_ )
3143 descout( nb_ ) = descin( nb1_ )
3144 descout( rsrc_ ) = descin( rsrc1_ )
3145 descout( csrc_ ) = descin( csrc1_ )
3146 descout( lld_ ) = descin( lld1_ )
3147 ELSE IF( descin( dtype_ ).EQ.block_cyclic_2d_inb ) THEN
3148 DO 10 i = 1, dlen_
3149 descout( i ) = descin( i )
3150 10 CONTINUE
3151 ELSE
3152 descout( dtype_ ) = descin( 1 )
3153 descout( ctxt_ ) = descin( 2 )
3154 descout( m_ ) = 0
3155 descout( n_ ) = 0
3156 descout( imb_ ) = 1
3157 descout( inb_ ) = 1
3158 descout( mb_ ) = 1
3159 descout( nb_ ) = 1
3160 descout( rsrc_ ) = 0
3161 descout( csrc_ ) = 0
3162 descout( lld_ ) = 1
3163 END IF
3164*
3165 RETURN
3166*
3167* End of PB_DESCTRANS
3168*
Here is the caller graph for this function: