File: node120.html

package info (click to toggle)
lapack 3.0.20000531a-28
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 61,920 kB
  • ctags: 46,200
  • sloc: fortran: 584,835; perl: 8,226; makefile: 2,331; awk: 71; sh: 45
file content (223 lines) | stat: -rw-r--r-- 7,283 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Determining the Block Size for Block Algorithms</TITLE>
<META NAME="description" CONTENT="Determining the Block Size for Block Algorithms">
<META NAME="keywords" CONTENT="lug_l2h">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="lug_l2h.css">
<LINK REL="next" HREF="node121.html">
<LINK REL="previous" HREF="node110.html">
<LINK REL="up" HREF="node109.html">
<LINK REL="next" HREF="node121.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html5899"
 HREF="node121.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="next_motif.png"></A> 
<A NAME="tex2html5893"
 HREF="node109.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="up_motif.png"></A> 
<A NAME="tex2html5887"
 HREF="node119.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="previous_motif.png"></A> 
<A NAME="tex2html5895"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="contents_motif.png"></A> 
<A NAME="tex2html5897"
 HREF="node152.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="index_motif.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html5900"
 HREF="node121.html">Matrix Storage Schemes</A>
<B> Up:</B> <A NAME="tex2html5894"
 HREF="node109.html">Documentation and Software Conventions</A>
<B> Previous:</B> <A NAME="tex2html5888"
 HREF="node119.html">Error Handling and the</A>
 &nbsp <B>  <A NAME="tex2html5896"
 HREF="node1.html">Contents</A></B> 
 &nbsp <B>  <A NAME="tex2html5898"
 HREF="node152.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION03520000000000000000"></A><A NAME="secblocksize"></A>
<BR>
Determining the Block Size for Block Algorithms
</H1>

<P>
LAPACK routines that implement block algorithms need to determine
what block size<A NAME="19578"></A> to use.
The intention behind the design of LAPACK is that the choice of block size
should be hidden from users as much as possible, but at the same time
easily accessible to installers of the package 
when tuning LAPACK for a particular machine.

<P>
LAPACK routines call an auxiliary enquiry function ILAENV<A NAME="19579"></A>, which returns
the optimal block size to be used, as well as other parameters.
The version of ILAENV<A NAME="19580"></A> supplied with the 
package contains
default values that led to good behavior over a reasonable
number of our test machines, but to achieve optimal 
performance, it may be beneficial to 
tune ILAENV<A NAME="19581"></A> for your
particular machine environment.
Ideally a distinct implementation of ILAENV is needed for each
machine environment (see also Chapter&nbsp;<A HREF="node129.html#chapinstall">6</A>).
The optimal block size may also depend on the routine, the combination of
option arguments (if any), and the problem dimensions. 

<P>
If ILAENV<A NAME="19583"></A> returns a block size
of 1, then the routine performs the unblocked algorithm, calling Level 2 BLAS,
and makes no calls to Level 3 BLAS.

<P>
Some LAPACK routines require a work array whose size is proportional to
the block size (see subsection&nbsp;<A HREF="node117.html#subsecworkspace">5.1.7</A>). The actual length
of the work array is supplied as an argument LWORK. The description of
the arguments WORK and LWORK typically goes as follows:

<P>
<DIV ALIGN="CENTER">
</DIV><TABLE  WIDTH="634">
<TR><TD>

 
<DT>WORK   

<DL COMPACT><DD>(workspace) REAL array, dimension (LWORK) 
<BR>
On exit, if INFO = 0, then WORK(1) returns the optimal LWORK.

<P>
<DT>LWORK  
<DD>(input) INTEGER 
<BR>
The dimension of the array WORK.  LWORK <IMG
 WIDTH="18" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
 SRC="img913.png"
 ALT="$\geq$">
max(1,N). 
<BR>
For optimal performance LWORK <IMG
 WIDTH="18" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
 SRC="img913.png"
 ALT="$\geq$">
N*NB,
        where NB is the optimal block size returned by ILAENV.

</DL>
</TD></TR>
</TABLE>
<DIV ALIGN="CENTER">
</DIV>

<P>
The routine determines the block size to be used by the following steps:

<P>
<DL COMPACT>
<DT>1.
<DD>the optimal block size is determined by calling ILAENV;
<P>
<DT>2.
<DD>if the value of LWORK indicates that enough workspace has been
supplied, the routine uses the optimal block size;

<P>
<DT>3.
<DD>otherwise, the routine determines the largest block size that
can be used with the supplied amount of workspace;

<P>
<DT>4.
<DD>if this new block size does not fall below a
threshold value (also returned by ILAENV), the routine uses the new
value;

<P>
<DT>5.
<DD>otherwise, the routine uses the unblocked algorithm.
</DL>

<P>
The minimum value of LWORK that would be needed to use
the optimal block size, is returned in WORK(1).

<P>
Thus, the routine uses the largest block size allowed by the amount
of workspace supplied, as long as this is likely to
give better performance than the unblocked algorithm.
WORK(1) is not always a simple formula in terms of N and NB.

<P>
The specification of LWORK gives the minimum value for the
routine to return correct results. If the supplied value is less than
the minimum -- indicating that there is insufficient workspace to perform
the unblocked algorithm -- the value of LWORK is regarded as an illegal value,
and is treated like any other illegal argument value
(see subsection&nbsp;<A HREF="node119.html#subsecinfo">5.1.9</A>).

<P>
If in doubt about how much workspace to supply, users should supply a generous
amount (assume a block size of 64, say), 
and then examine the value of WORK(1) on exit.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html5899"
 HREF="node121.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="next_motif.png"></A> 
<A NAME="tex2html5893"
 HREF="node109.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="up_motif.png"></A> 
<A NAME="tex2html5887"
 HREF="node119.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="previous_motif.png"></A> 
<A NAME="tex2html5895"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="contents_motif.png"></A> 
<A NAME="tex2html5897"
 HREF="node152.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="index_motif.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html5900"
 HREF="node121.html">Matrix Storage Schemes</A>
<B> Up:</B> <A NAME="tex2html5894"
 HREF="node109.html">Documentation and Software Conventions</A>
<B> Previous:</B> <A NAME="tex2html5888"
 HREF="node119.html">Error Handling and the</A>
 &nbsp <B>  <A NAME="tex2html5896"
 HREF="node1.html">Contents</A></B> 
 &nbsp <B>  <A NAME="tex2html5898"
 HREF="node152.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
<I>Susan Blackford</I>
<BR><I>1999-10-01</I>
</ADDRESS>
</BODY>
</HTML>