File: node35.html

package info (click to toggle)
scalapack-doc 1.5-11
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 10,336 kB
  • ctags: 4,931
  • sloc: makefile: 47; sh: 18
file content (84 lines) | stat: -rw-r--r-- 4,325 bytes parent folder | download | duplicates (4)
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
77
78
79
80
81
82
83
84
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Distribute the Matrix on the Process Grid</TITLE>
<META NAME="description" CONTENT="Distribute the Matrix on the Process Grid">
<META NAME="keywords" CONTENT="slug">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="slug.css">
</HEAD>
<BODY LANG="EN" >
 <A NAME="tex2html2555" HREF="node36.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="http://www.netlib.org/utk/icons/next_motif.gif"></A> <A NAME="tex2html2553" HREF="node33.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="http://www.netlib.org/utk/icons/up_motif.gif"></A> <A NAME="tex2html2547" HREF="node34.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="http://www.netlib.org/utk/icons/previous_motif.gif"></A> <A NAME="tex2html2557" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="http://www.netlib.org/utk/icons/contents_motif.gif"></A> <A NAME="tex2html2558" HREF="node190.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="http://www.netlib.org/utk/icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html2556" HREF="node36.html">Call the ScaLAPACK Routine</A>
<B>Up:</B> <A NAME="tex2html2554" HREF="node33.html">Four Basic Steps Required </A>
<B> Previous:</B> <A NAME="tex2html2548" HREF="node34.html">Initialize the Process Grid</A>
<BR> <P>
<H2><A NAME="SECTION04242000000000000000">Distribute the Matrix on the Process Grid</A></H2>
<P>
All global matrices must be distributed
on the process grid prior to the invocation of a ScaLAPACK routine.
It is the user's responsibility to perform this data distribution.
For further information on the appropriate data distribution, please refer to
Chapter&nbsp;<A HREF="node68.html#chap2dbsd">4</A>.
<P>
Each global matrix that is to be distributed across the process grid must
be assigned an <EM>array descriptor</EM><A NAME="824">&#160;</A><A NAME="825">&#160;</A><A NAME="826">&#160;</A>.  Details of the entries in the array 
descriptor can be found in section&nbsp;<A HREF="node77.html#secdesc1">4.3.3</A>.  This array
descriptor is
most easily initialized with a call to a ScaLAPACK TOOLS routine called
DESCINIT<A NAME="828">&#160;</A> and <EM>must</EM> be set prior to the
invocation of a ScaLAPACK routine.
<P>
As an example, the array descriptors<A NAME="830">&#160;</A> for
the matrices in
figures&nbsp;<A HREF="node28.html#figgrida9">2.2</A> and <A HREF="node28.html#figgridb9">2.3</A> are assigned with
the following code excerpt from the example program in
section&nbsp;<A HREF="node28.html#example1">2.3</A>.
<PRE>      CALL DESCINIT( DESCA, M, N, MB, NB, RSRC, CSRC, ICTXT, MXLLDA,
     $               INFO )
      CALL DESCINIT( DESCB, N, NRHS, NB, NBRHS, RSRC, CSRC, ICTXT,
     $               MXLLDB, INFO )</PRE>
These two calls to DESCINIT are equivalent to the assignment 
statements:
<PRE>      DESCA( 1 ) = 1
      DESCA( 2 ) = ICTXT
      DESCA( 3 ) = M
      DESCA( 4 ) = N
      DESCA( 5 ) = MB
      DESCA( 6 ) = NB
      DESCA( 7 ) = RSRC
      DESCA( 8 ) = CSRC
      DESCA( 9 ) = MXLLDA
*
      DESCB( 1 ) = 1
      DESCB( 2 ) = ICTXT
      DESCB( 3 ) = N
      DESCB( 4 ) = NRHS
      DESCB( 5 ) = NB
      DESCB( 6 ) = NBRHS
      DESCB( 7 ) = RSRC
      DESCB( 8 ) = CSRC
      DESCB( 9 ) = MXLLDB</PRE>
<P>
Details of the entries in the array descriptor can be found in
section&nbsp;<A HREF="node77.html#secdesc1">4.3.3</A>.
<P>
A simplistic mapping of the global matrix in figure&nbsp;<A HREF="node28.html#figgrida9">2.2</A> to a
process grid is accomplished in the example program in section&nbsp;<A HREF="node28.html#example1">2.3</A>
via a call to the subroutine MATINIT.  Please note that the routine
MATINIT is not a ScaLAPACK routine and is used in this example 
program for demonstrative purposes only.
<P>
Appendix&nbsp;<A HREF="node180.html#example2">C.1</A> provides a more detailed example program, which
reads a matrix from a file, distributes it onto a process grid,
and then writes the solution to a file.
<P>
<BR> <HR>
<P><ADDRESS>
<I>Susan Blackford <BR>
Tue May 13 09:21:01 EDT 1997</I>
</ADDRESS>
</BODY>
</HTML>