ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
SL_init.f
Go to the documentation of this file.
1  SUBROUTINE sl_init( ICTXT, NPROW, NPCOL )
2 *
3 * -- ScaLAPACK tools routine (version 1.7) --
4 * University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5 * and University of California, Berkeley.
6 * May 1, 1997
7 *
8 * .. Scalar Arguments ..
9  INTEGER ICTXT, NPCOL, NPROW
10 * ..
11 *
12 * Purpose
13 * =======
14 *
15 * SL_INIT initializes an NPROW x NPCOL process grid using a row-major
16 * ordering of the processes. This routine retrieves a default system
17 * context which will include all available processes. In addition it
18 * spawns the processes if needed.
19 *
20 * Arguments
21 * =========
22 *
23 * ICTXT (global output) INTEGER
24 * ICTXT specifies the BLACS context handle identifying the
25 * created process grid. The context itself is global.
26 *
27 * NPROW (global input) INTEGER
28 * NPROW specifies the number of process rows in the grid
29 * to be created.
30 *
31 * NPCOL (global input) INTEGER
32 * NPCOL specifies the number of process columns in the grid
33 * to be created.
34 *
35 * =====================================================================
36 *
37 * .. Local Scalars ..
38  INTEGER IAM, NPROCS
39 * ..
40 * .. External Subroutines ..
41  EXTERNAL blacs_get, blacs_gridinit, blacs_pinfo,
42  $ blacs_setup
43 * ..
44 * .. Executable Statements ..
45 *
46 * Get starting information
47 *
48  CALL blacs_pinfo( iam, nprocs )
49 *
50 * If machine needs additional set up, do it now
51 *
52  IF( nprocs.LT.1 ) THEN
53  IF( iam.EQ.0 )
54  $ nprocs = nprow * npcol
55  CALL blacs_setup( iam, nprocs )
56  END IF
57 *
58 * Define process grid
59 *
60  CALL blacs_get( -1, 0, ictxt )
61  CALL blacs_gridinit( ictxt, 'Row-major', nprow, npcol )
62 *
63  RETURN
64 *
65 * End of SL_INIT
66 *
67  END
sl_init
subroutine sl_init(ICTXT, NPROW, NPCOL)
Definition: SL_init.f:2