ScaLAPACK 2.1  2.1 ScaLAPACK: Scalable Linear Algebra PACKage
infog1l.f
Go to the documentation of this file.
1  SUBROUTINE infog1l( GINDX, NB, NPROCS, MYROC, ISRCPROC, LINDX,
2  \$ ROCSRC )
3 *
4 * -- ScaLAPACK tools routine (version 1.7) --
5 * University of Tennessee, Knoxville, Oak Ridge National Laboratory,
6 * and University of California, Berkeley.
7 * May 1, 1997
8 *
9 * .. Scalar Arguments ..
10  INTEGER GINDX, ISRCPROC, LINDX, MYROC, NB, NPROCS,
11  \$ rocsrc
12 * ..
13 *
14 * Purpose
15 * =======
16 *
17 * INFOG1L computes the starting local indexes LINDX corresponding to
18 * the distributed submatrix starting globally at the entry pointed by
19 * GINDX. This routine returns the coordinates of the process in the
20 * grid owning the submatrix entry of global index GINDX: ROCSRC.
21 * INFOG1L is a 1-dimensional version of INFOG2L.
22 *
23 * Arguments
24 * =========
25 *
26 * GINDX (global input) INTEGER
27 * The global starting index of the submatrix.
28 *
29 * NB (global input) INTEGER
30 * The block size.
31 *
32 * NPROCS (global input) INTEGER
33 * The total number of processes over which the distributed
34 * submatrix is distributed.
35 *
36 * MYROC (local input) INTEGER
37 * The coordinate of the process calling this routine.
38 *
39 * ISRCPROC (global input) INTEGER
40 * The coordinate of the process having the first entry of
41 * the distributed submatrix.
42 *
43 * LINDX (local output) INTEGER
44 * The local starting indexes of the distributed submatrix.
45 *
46 * ROCSRC (global output) INTEGER
47 * The coordinate of the process that possesses the first
48 * row and column of the submatrix.
49 *
50 * =====================================================================
51 *
52 * .. Local Scalars ..
53  INTEGER GCPY, IBLK
54 * ..
55 * .. Intrinsic Functions ..
56  INTRINSIC mod
57 * ..
58 * .. Executable Statements ..
59 *
60  gcpy = gindx-1
61  iblk = gcpy / nb
62  rocsrc = mod( iblk + isrcproc, nprocs )
63 *
64  lindx = ( iblk / nprocs + 1 ) * nb + 1
65 *
66  IF( mod(myroc+nprocs-isrcproc,nprocs).GE.mod(iblk, nprocs) ) THEN
67  IF( myroc.EQ.rocsrc )
68  \$ lindx = lindx + mod( gcpy, nb )
69  lindx = lindx - nb
70  END IF
71 *
72  RETURN
73 *
74 * End of INFOG1L
75 *
76  END
infog1l
subroutine infog1l(GINDX, NB, NPROCS, MYROC, ISRCPROC, LINDX, ROCSRC)
Definition: infog1l.f:3