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
|
<!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 BLAS-based programs to the PBLAS</TITLE>
<META NAME="description" CONTENT="Translating BLAS-based programs to the PBLAS">
<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="tex2html4393" HREF="node176.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="http://www.netlib.org/utk/icons/next_motif.gif"></A> <A NAME="tex2html4391" 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="tex2html4385" HREF="node174.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="http://www.netlib.org/utk/icons/previous_motif.gif"></A> <A NAME="tex2html4395" 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="tex2html4396" 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="tex2html4394" HREF="node176.html">Translating LAPACK-based programs to </A>
<B>Up:</B> <A NAME="tex2html4392" HREF="node174.html">Call Conversion: LAPACK to </A>
<B> Previous:</B> <A NAME="tex2html4386" HREF="node174.html">Call Conversion: LAPACK to </A>
<BR> <P>
<H1><A NAME="SECTION04910000000000000000">Translating BLAS-based programs to the PBLAS</A></H1>
<P>
<A NAME="secApplicationsAndUseOfThePBLAS"> </A>
<A NAME="6785"> </A>
<P>
With a concrete understanding of array descriptors
(Chapter <A HREF="node68.html#chap2dbsd">4</A>), it is relatively simple
to translate the serial version of a BLAS call into its
parallel equivalent. Translating BLAS calls to PBLAS 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>
An example of translating a DGEMM call to a PDGEMM call is given
below.
<PRE> CALL DGEMM( 'No transpose', 'No transpose', M-J-JB+1, N-J-JB+1,
$ JB, -ONE, A( J+JB, J ), LDA, A( J, J+JB ), LDA, ONE,
$ A( J+JB, J+JB ), LDA )</PRE>
<IMG WIDTH=9 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline19869" SRC="img749.gif">
<PRE> CALL PDGEMM( 'No transpose', 'No transpose', M-J-JB+JA, N-J-JB+JA,
$ JB, -ONE, A, J+JB, J, DESCA, A, J, J+JB, DESCA, ONE,
$ A, J+JB, J+JB, DESCA )</PRE>
<P>
This simple translation process considerably
simplifies the implementation phase of linear
algebra codes built on top of the BLAS.
<P>
The steps necessary to write a program to call a PBLAS routine
are analogous to the steps presented in section <A HREF="node33.html#basicsteps">2.4</A>.
<P>
<BR> <HR>
<P><ADDRESS>
<I>Susan Blackford <BR>
Tue May 13 09:21:01 EDT 1997</I>
</ADDRESS>
</BODY>
</HTML>
|