Keywords: slug

Next: Distribute the Matrix on Up: Four Basic Steps Required Previous: Four Basic Steps Required

## Initialize the Process Grid

A call to the ScaLAPACK TOOLS routine SL_INIT initializes the process grid. This routine initializes a (denoted in the source code) process grid by using a row-major ordering of the processes, and obtains a default system context . For more information on contexts, refer to section 4.1.2 or [54].

The user can then query the process grid to identify each process's coordinates (MYROW,MYCOL) ) via a call to BLACS_GRIDINFO .

A typical code fragment (as obtained from the example program in section 2.3) to accomplish this task would be the following:

          CALL SL_INIT( ICTXT, NPROW, NPCOL )
          CALL BLACS_GRIDINFO( ICTXT, NPROW, NPCOL, MYROW, MYCOL )

where details of the calling sequence for SL_INIT are provided below. Detailed descriptions of calling sequences for each BLACS routine can be found in [54] and Appendix D.3. Note that underlined arguments in the calling sequence denote output arguments.

- SL_INIT( , NPROW, NPCOL )
  ICTXT
    (global output) INTEGER
    ICTXT specifies the BLACS context identifying the created process grid.
  NPROW
    (global input) INTEGER
    NPROW specifies the number of process rows in the process grid to be created.
  NPCOL
    (global input) INTEGER
    NPCOL specifies the number of process columns in the process grid to be created.

For a description of these variables names, please refer to the example program notation in section 2.3 and [54].