File: infog1l.f

package info (click to toggle)
scalapack 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 37,012 kB
  • sloc: fortran: 339,113; ansic: 74,517; makefile: 1,494; sh: 34
file content (76 lines) | stat: -rw-r--r-- 2,261 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
      SUBROUTINE INFOG1L( GINDX, NB, NPROCS, MYROC, ISRCPROC, LINDX,
     $                    ROCSRC )
*
*  -- ScaLAPACK tools routine (version 1.7) --
*     University of Tennessee, Knoxville, Oak Ridge National Laboratory,
*     and University of California, Berkeley.
*     May 1, 1997
*
*     .. Scalar Arguments ..
      INTEGER            GINDX, ISRCPROC, LINDX, MYROC, NB, NPROCS,
     $                   ROCSRC
*     ..
*
*  Purpose
*  =======
*
*  INFOG1L computes the starting local indexes LINDX corresponding to
*  the distributed submatrix starting globally at the entry pointed by
*  GINDX.  This routine returns the coordinates of the process in the
*  grid owning the submatrix entry of global index GINDX: ROCSRC.
*  INFOG1L is a 1-dimensional version of INFOG2L.
*
*  Arguments
*  =========
*
*  GINDX     (global input) INTEGER
*            The global starting index of the submatrix.
*
*  NB        (global input) INTEGER
*            The block size.
*
*  NPROCS    (global input) INTEGER
*            The total number of processes over which the distributed
*            submatrix is distributed.
*
*  MYROC     (local input) INTEGER
*            The coordinate of the process calling this routine.
*
*  ISRCPROC  (global input) INTEGER
*            The coordinate of the process having the first entry of
*            the distributed submatrix.
*
*  LINDX     (local output) INTEGER
*            The local starting indexes of the distributed submatrix.
*
*  ROCSRC    (global output) INTEGER
*            The coordinate of the process that possesses the first
*            row and column of the submatrix.
*
*  =====================================================================
*
*     .. Local Scalars ..
      INTEGER            GCPY, IBLK
*     ..
*     .. Intrinsic Functions ..
      INTRINSIC          MOD
*     ..
*     .. Executable Statements ..
*
      GCPY = GINDX-1
      IBLK = GCPY / NB
      ROCSRC = MOD( IBLK + ISRCPROC, NPROCS )
*
      LINDX = ( IBLK / NPROCS + 1 ) * NB + 1
*
      IF( MOD(MYROC+NPROCS-ISRCPROC,NPROCS).GE.MOD(IBLK, NPROCS) ) THEN
         IF( MYROC.EQ.ROCSRC )
     $      LINDX = LINDX + MOD( GCPY, NB )
         LINDX = LINDX - NB
      END IF
*
      RETURN
*
*     End of INFOG1L
*
      END