For a detailed description of MPI Requirements see Using ScaLAPACK Enhanced Routines in the Introduction of this manual.
This routine sets up a processor grid and calculates default values for various entities to be used in mapping a global array to the processor grid. All processors in the BLACS context call the routine.
M The row dimension of the global array for which the local array dimensions are to be calculated. (Input)
N The column dimension of the global array for which the local array dimensions are to be calculated. (Input)
NSQUARE Input logical which indicates whether the block used for mapping the global array to the processor grid must be square. If the block must be square, set NSQUARE to .TRUE., otherwise, set it to .FALSE. (Input)
GRID1D Input logical which indicates whether the processor grid is to be one dimensional or two dimensional. Set GRID1D to .TRUE. if the grid is to be one dimensional. Otherwise, set GRID1D to .FALSE. (Input)
Generic: CALL ScaLAPACK_SETUP (M, N, NSQUARE, GRID1D)
Subroutine ScaLAPACK_SETUP creates a processor grid based on the number of processors being used and the GRID1D logical supplied by the user. The argument, NSQUARE, is supplied because some ScaLAPACK routines require that the row and column blocking factors be equal. GRID1D is supplied for those routines which require that the processor grid be one dimensional. ScaLAPACK_SETUP also establishes values for MP_M, MP_N, MP_NPROW, MP_NPCOL, MP_MB, MP_NB, MP_PIGRID, MP_ICTXT, MP_NSQUARE, and MP_GRID1D in the IMSL Fortran Library module GRIDINFO_INT. The above entities are defined as follows:
MP_M The row dimension of the primary array which is to be distributed among the processors.
MP_N The column dimension of the primary array which is to be distributed among the processors.
MP_NPROW The number of rows in the processor grid.
MP_NPCOL The number of columns in the processor grid.
MP_MB The row blocking factor to be used in distributing the array.
MP_NB The column blocking factor to be used in distributing the array.
MP_PIGRID The pointer to the processor grid, MP_IGRID.
MP_ICTXT The BLACS context ID associated with the processor grid.
MP_NSQUARE
Logical indicating whether or not the block used for mapping
the global
array to the processor grid must be square.
MP_GRID1D Logical indicating whether or not the processor grid must be one dimensional.
GRIDINFO_INT is used by MPI_SETUP_INT so users do not need to explicitly use GRIDINFO_INT since they will be using MPI_SETUP_INT when they use MPI.
See ScaLAPACK_WRITE.
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |