File: node176.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 (71 lines) | stat: -rw-r--r-- 3,935 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
<!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>Translating LAPACK-based programs to ScaLAPACK</TITLE>
<META NAME="description" CONTENT="Translating LAPACK-based programs to ScaLAPACK">
<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="tex2html4403" HREF="node177.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="http://www.netlib.org/utk/icons/next_motif.gif"></A> <A NAME="tex2html4401" HREF="node174.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="http://www.netlib.org/utk/icons/up_motif.gif"></A> <A NAME="tex2html4397" HREF="node175.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="http://www.netlib.org/utk/icons/previous_motif.gif"></A> <A NAME="tex2html4405" 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="tex2html4406" 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="tex2html4404" HREF="node177.html">Sequential LU Factorization</A>
<B>Up:</B> <A NAME="tex2html4402" HREF="node174.html">Call Conversion:  LAPACK to </A>
<B> Previous:</B> <A NAME="tex2html4398" HREF="node175.html">Translating BLAS-based programs to </A>
<BR> <P>
<H1><A NAME="SECTION04920000000000000000">Translating LAPACK-based programs to ScaLAPACK</A></H1>
<P>
<A NAME="chapconvertscalapack">&#160;</A>
<P>
This section<A NAME="6796">&#160;</A>
demonstrates how sequential LAPACK-based programs are parallelized and 
converted to ScaLAPACK.
<P>
As with the BLAS conversion, it is relatively simple to translate the serial
version of an LAPACK call into its parallel equivalent.
Translating LAPACK calls to ScaLAPACK calls primarily
consists of the following steps:
<UL>
<LI>  a <TT>`P'</TT> has to be inserted in front of the routine name,
<LI> the leading dimensions should be replaced by the
global <I>array descriptors</I>, and
<LI> the global indices into the distributed matrices should be
inserted as separate parameters in the calling sequence.
</UL>
<P>
As an example of this translation process, let us consider the
parallelization of the LAPACK driver routine DGESV, which solves a
general system of linear equations.
The calling sequence comparison for DGESV versus its ScaLAPACK
equivalent, PDGESV, is presented below.
<P>
<PRE>      CALL DGESV( N, NRHS, A( I, J ), LDA, IPIV, B( I, 1 ), LDB, INFO )</PRE>
<IMG WIDTH=9 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline19869" SRC="img749.gif">

<PRE>      CALL PDGESV( N, NRHS, A, I, J, DESCA, IPIV, B, I, 1, DESCB, INFO )</PRE>
<P>
For a more complete example, let us consider parallelizing a serial
LU factorization code, as demonstrated in
sections&nbsp;<A HREF="node177.html#secSequentialLUFactorization">B.2.1</A> 
and&nbsp;<A HREF="node178.html#secParallelLUFactorization">B.2.2</A>.  Note that the parallel
routine assumes the existence of the auxiliary routines PDGETF2 (unblocked
<I>LU</I>) and PDLASWP (parallel swap routine) in addition to the
PBLAS.  With this in mind,
the serial and parallel versions are very similar since most of
the details of the parallel implementation such as communication
and synchronization are hidden at lower levels of the software.
<P>
<BR> <HR>
<UL><A NAME="CHILD_LINKS">&#160;</A>
<LI> <A NAME="tex2html4407" HREF="node177.html#SECTION04921000000000000000">Sequential LU Factorization</A>
<LI> <A NAME="tex2html4408" HREF="node178.html#SECTION04922000000000000000">Parallel LU Factorization</A>
</UL>
<BR> <HR>
<P><ADDRESS>
<I>Susan Blackford <BR>
Tue May 13 09:21:01 EDT 1997</I>
</ADDRESS>
</BODY>
</HTML>