1 |
markusle 07/10/23 14:14:53 |
2 |
|
3 |
Modified: blas-lapack.xml |
4 |
Log: |
5 |
Added the completely reworked blas-lapack guide. Many thanks to nightmorph for putting all of this into a nice guidexml framework. |
6 |
|
7 |
Revision Changes Path |
8 |
1.2 xml/htdocs/proj/en/science/blas-lapack.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/science/blas-lapack.xml?rev=1.2&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/science/blas-lapack.xml?rev=1.2&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/science/blas-lapack.xml?r1=1.1&r2=1.2 |
13 |
|
14 |
Index: blas-lapack.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/science/blas-lapack.xml,v |
17 |
retrieving revision 1.1 |
18 |
retrieving revision 1.2 |
19 |
diff -u -r1.1 -r1.2 |
20 |
--- blas-lapack.xml 11 Oct 2006 11:35:47 -0000 1.1 |
21 |
+++ blas-lapack.xml 23 Oct 2007 14:14:53 -0000 1.2 |
22 |
@@ -1,125 +1,475 @@ |
23 |
-<?xml version='1.0' encoding="UTF-8"?> |
24 |
+<?xml version="1.0" encoding="UTF-8"?> |
25 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
26 |
-<guide link="blas-lapack.xml"> |
27 |
-<title> |
28 |
- Using multiple versions of BLAS and LAPACK with Gentoo/Linux |
29 |
-</title> |
30 |
-<author title="Scientific Gentoo Project"> |
31 |
- <mail link="sci@g.o">Scientific Gentoo Project</mail> |
32 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/science/blas-lapack.xml,v 1.2 2007/10/23 14:14:53 markusle Exp $ --> |
33 |
+ |
34 |
+<guide link="/proj/en/science/blas-lapack.xml"> |
35 |
+<title>Using multiple versions of BLAS and LAPACK with Gentoo/Linux</title> |
36 |
+ |
37 |
+<author title="Author"> |
38 |
+ <mail link="bicatali@g.o">Sébastien Fabbro</mail> |
39 |
</author> |
40 |
-<author> |
41 |
- <mail link="kugelfang@g.o">Danny van Dyk</mail> |
42 |
+<author title="Author"> |
43 |
+ <mail link="markusle@g.o">Markus Dittrich</mail> |
44 |
+</author> |
45 |
+<author title="Editor"> |
46 |
+ <mail link="nightmorph@g.o">Joshua Saddler</mail> |
47 |
</author> |
48 |
|
49 |
<abstract> |
50 |
-This Guide intends to explain the usage of different implementations |
51 |
-of the BLAS and LAPACK libraries that are available via portage as |
52 |
-implemented with regard to BUG #30453. |
53 |
+This guide explains the use of the different implementations of the BLAS |
54 |
+and LAPACK libraries that are available via Portage. |
55 |
</abstract> |
56 |
|
57 |
+<!-- The content of this document is licensed under the CC-BY-SA license --> |
58 |
+<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
59 |
<license/> |
60 |
|
61 |
-<version>BUG-PENDING</version> |
62 |
-<date>2005-01-03</date> |
63 |
+<version>1.0</version> |
64 |
+<date>2007-10-22</date> |
65 |
|
66 |
<chapter> |
67 |
-<title>BLAS</title> |
68 |
- <section> |
69 |
- <title>Providing BLAS Implementations</title> |
70 |
- <body> |
71 |
- <p> |
72 |
- The Gentoo portage tree contains many ebuilds that depend on the BLAS-Library. As |
73 |
- there are more than one implementation of BLAS, the Gentoo Scientific Project reorganised |
74 |
- all the BLAS packages to provide <c>virtual/blas</c>. <e>All</e> ebuilds using BLAS should |
75 |
- depend on this virtual package, unless it is explicitly known to break with different BLAS |
76 |
- implementations. |
77 |
- </p> |
78 |
- <p> |
79 |
- To work with Gentoo's BLAS Configuration Tool (<c>sci-libs/blas-config</c>), every |
80 |
- ebuild that installs a BLAS Implementation must fulfill following requirements: |
81 |
- </p> |
82 |
- <ol> |
83 |
- <li>The ebuild must install the actual libraries to <c>/usr/$(get_libdir)/blas/${PN}</c>.</li> |
84 |
- <li>The ebuild must <c>PROVIDE="virtual/blas"</c>.</li> |
85 |
- <li>The ebuild must install its configuration script to <c>/usr/$(get_libdir)/blas/</c>. |
86 |
- Their names should resemble the originating packages. If the ebuild provides more than |
87 |
- one implementation of BLAS (e.g. <c>sci-libs/blas-atlas</c>), each implementation |
88 |
- requires a configurations script on its own.</li> |
89 |
- </ol> |
90 |
- <p> |
91 |
- Each configuration script to be used by <c>sci-libs/blas-config</c> requires at least one |
92 |
- function, <c>setup()</c>, that will be called by <c>blas-config</c> directly. Further, it can |
93 |
- set environment variables that shall be used to compile and/or link against the particular |
94 |
- library. |
95 |
- </p> |
96 |
- <p> |
97 |
- The function <c>setup()</c> creates symbolic links for the chosen BLAS implementation's libraries |
98 |
- in <c>/usr/$(get_libdir)/</c>. The following symbolic links are available: |
99 |
- </p> |
100 |
- <ul> |
101 |
- <li>libblas.so[.0] - Shared object for FORTRAN applications</li> |
102 |
- <li>libblas.a - Static library for FORTRAN applications</li> |
103 |
- <li>libcblas.so[.0] - Shared object for C/C++ applications</li> |
104 |
- <li>libcblas.a - Static library for C/C++ applications</li> |
105 |
- </ul> |
106 |
- <p> |
107 |
- Currently the portage tree contains the following BLAS implementations: |
108 |
- </p> |
109 |
- <ul> |
110 |
- <li>sci-libs/acml</li> |
111 |
- <li>sci-libs/blas-atlas</li> |
112 |
- <li>sci-libs/blas-reference</li> |
113 |
- </ul> |
114 |
- </body> |
115 |
- </section> |
116 |
+<title>Introduction</title> |
117 |
+<section> |
118 |
+<body> |
119 |
+ |
120 |
+<p> |
121 |
+The Basic Linear Algebra Subroutines (BLAS) and Linear Algebra PACKage (LAPACK) |
122 |
+are well designed linear algebra software libraries developed by the |
123 |
+High Performance Computing (HPC) community. BLAS |
124 |
+implements dense matrix and vectors products, while LAPACK provides routines for |
125 |
+solving systems of linear equations. Both are widely used in |
126 |
+many scientific applications and it is, therefore, important to |
127 |
+have efficient implementations available. |
128 |
+</p> |
129 |
+ |
130 |
+<p> |
131 |
+Originally written in FORTRAN 77, a number of additional language |
132 |
+wrappers have been developed for languages like C, C++, FORTRAN 95, and others. |
133 |
+The following legacy libraries are available via the reference ebuilds: |
134 |
+</p> |
135 |
+ |
136 |
+<ul> |
137 |
+ <li> |
138 |
+ <uri link="http://netlib.org/blas">BLAS</uri>: FORTRAN 77 implementation of |
139 |
+ BLAS |
140 |
+ </li> |
141 |
+ <li> |
142 |
+ <uri link="http://netlib.org/blas">CBLAS</uri>: C implementation of BLAS |
143 |
+ </li> |
144 |
+ <li> |
145 |
+ <uri link="http://netlib.org/lapack">LAPACK</uri>: FORTRAN 77 implementation |
146 |
+ of LAPACK |
147 |
+ </li> |
148 |
+</ul> |
149 |
+ |
150 |
+<p> |
151 |
+In addition, Gentoo provides a number of optimized BLAS and LAPACK implementations |
152 |
+that will be described below. Different implementations are bundled together with |
153 |
+Gentoo's <c>eselect</c> system and the widely used <c>pkg-config</c> tool. |
154 |
+</p> |
155 |
+ |
156 |
+<p> It is important to note that if you require, e.g., a well performing |
157 |
+BLAS implementation, simply emerging X over Y often is not enough. Rather, you will have |
158 |
+to carefully benchmark your applications since performance may depend |
159 |
+on many factors, |
160 |
+such as hardware or network. |
161 |
+If you are simply looking for a well performing and well tested |
162 |
+implementation, the reference ebuilds will likely be your best choice. |
163 |
+</p> |
164 |
+ |
165 |
+ |
166 |
+</body> |
167 |
+</section> |
168 |
</chapter> |
169 |
+ |
170 |
<chapter> |
171 |
-<title>LAPACK</title> |
172 |
- <section> |
173 |
- <title>Providing LAPACK Implementations</title> |
174 |
- <body> |
175 |
- <p> |
176 |
- The Gentoo portage tree contains many ebuilds that depend on the LAPACK-Library. As |
177 |
- there are more than one implementation of LAPACK, the Gentoo Scientific Project reorganised |
178 |
- all the LAPACK packages to provide <c>virtual/lapack</c>. <e>All</e> ebuilds should depend |
179 |
- on this virtual package, unless it is explicitly known to break with different LAPACK |
180 |
- implementations. |
181 |
- </p> |
182 |
- <p> |
183 |
- To work with Gentoo's LAPACK Configuration Tool (<c>sci-libs/lapack-config</c>), every |
184 |
- ebuild that installs a LAPACK Implementation must fulfill following requirements: |
185 |
- </p> |
186 |
- <ol> |
187 |
- <li>The ebuild must install the actual libraries to <c>/usr/$(get_libdir)/lapack/${PN}</c>.</li> |
188 |
- <li>The ebuild must <c>PROVIDE="virtual/lapack"</c>.</li> |
189 |
- <li>The ebuild must install its configuration script to <c>/usr/$(get_libdir)/lapack/</c>. |
190 |
- Their names should resemble the originating packages. If the ebuild provides more than |
191 |
- one implementation of LAPACK (e.g. <c>sci-libs/lapack-atlas</c>), each implementation |
192 |
- requires a configurations script on its own.</li> |
193 |
- </ol> |
194 |
- <p> |
195 |
- Each configuration script to be used by <c>sci-libs/lapack-config</c> requires at least one |
196 |
- function, <c>setup()</c> that will be called by <c>lapack-config</c> directly. Further, it can |
197 |
- set environment variables that shall be used to compile and/or link against the particular |
198 |
- library. |
199 |
- </p> |
200 |
- <p> |
201 |
- The function <c>setup()</c> creates symbolic links for the chosen LAPACK implementation's libraries |
202 |
- in <c>/usr/$(get_libdir)/</c>. The following symbolic links are available: |
203 |
- </p> |
204 |
- <ul> |
205 |
- <li>liblapack.iso[.0] - Shared object for FORTRAN applications</li> |
206 |
- <li>liblapack.a - Static library for FORTRAN applications</li> |
207 |
- </ul> |
208 |
- <p> |
209 |
- Currently the portage tree contains the following LAPACK implementations: |
210 |
- </p> |
211 |
- <ul> |
212 |
- <li>sci-libs/acml</li> |
213 |
- <li>sci-libs/lapack-atlas</li> |
214 |
- <li>sci-libs/lapack-reference</li> |
215 |
- </ul> |
216 |
- </body> |
217 |
- </section> |
218 |
+<title>For Users</title> |
219 |
+<section> |
220 |
+<title>Installing</title> |
221 |
+<body> |
222 |
+ |
223 |
+<p> |
224 |
+If best possible performance is not of paramount importance for you |
225 |
+and you simply |
226 |
+need BLAS and/or LAPACK, just emerge the virtual packages: |
227 |
+</p> |
228 |
+ |
229 |
+<pre caption="Installing"> |
230 |
+# <i>emerge blas cblas lapack</i> |
231 |
+</pre> |
232 |
+ |
233 |
+<p> |
234 |
+These will install the reference legacy packages from |
235 |
+<uri>http://netlib.org</uri>. They are well tested, easy to debug |
236 |
+implementations. They should satisfy most users; if they're all you need, you're |
237 |
+done reading. |
238 |
+</p> |
239 |
+ |
240 |
+<p> |
241 |
+However, if: |
242 |
+</p> |
243 |
+ |
244 |
+<ul> |
245 |
+ <li>BLAS/LAPACK are critical for the speed of your applications</li> |
246 |
+ <li>you absolutely need to build the fastest computer</li> |
247 |
+ <li>you want to help Gentoo sci project to improve their packages</li> |
248 |
+</ul> |
249 |
+ |
250 |
+<p> |
251 |
+... then read on, and be sure to file bugs both to Gentoo and upstream. |
252 |
+</p> |
253 |
+ |
254 |
+<p> |
255 |
+There is a number of optimized implementations of these libraries in the Portage |
256 |
+tree: |
257 |
+</p> |
258 |
+ |
259 |
+<ul> |
260 |
+ <li> |
261 |
+ <uri link="http://math-atlas.sourceforge.net">ATLAS</uri>: Automatically |
262 |
+ Tuned Linear Algebra Software is an open-source package that empirically |
263 |
+ tunes the library to the machine it is being compiled on. It provides BLAS |
264 |
+ (FORTRAN 77 and C), and LAPACK implementations on various architectures. |
265 |
+ </li> |
266 |
+ <li> |
267 |
+ <uri |
268 |
+ link="http://www.tacc.utexas.edu/resources/software/software.php">GotoBLAS</uri>: |
269 |
+ Goto BLAS provide open-source, free for academic use, hand-coded |
270 |
+ machine language, processor optimized versions of the FORTRAN 77 BLAS |
271 |
+ routines. Claims to be the fastest BLAS. |
272 |
+ </li> |
273 |
+ <li> |
274 |
+ <uri link="http://developer.amd.com/acml.jsp">ACML</uri>: AMD Core Math |
275 |
+ Library is a closed-source but free package containing BLAS (FORTRAN 77 |
276 |
+ only) and LAPACK for x86 and amd64 architectures, but also other math tools |
277 |
+ such as statistical libraries and FFTs. |
278 |
+ </li> |
279 |
+ <li> |
280 |
+ <uri link="http://developer.intel.com/software/products/mkl/">MKL</uri>: |
281 |
+ Intel® Math Kernel Library is a closed-source but free package for |
282 |
+ non-commercial use containing BLAS (FORTRAN 77 and C), LAPACK optimized for |
283 |
+ Intel® based architectures: x86, amd64 and ia64. |
284 |
+ </li> |
285 |
+</ul> |
286 |
+ |
287 |
+<p> |
288 |
+Usually performance gain is noticeable mainly with BLAS, since LAPACK routines |
289 |
+depend on BLAS kernels. |
290 |
+</p> |
291 |
+ |
292 |
+</body> |
293 |
+</section> |
294 |
+<section> |
295 |
+<title>Compiling and linking with installed libraries</title> |
296 |
+<body> |
297 |
+ |
298 |
+<p> |
299 |
+We took great care to make sure that each package provides consistent pkg-config files. |
300 |
+Hence, compiling and linking with BLAS/LAPACK should be simple and straightforward: |
301 |
+</p> |
302 |
+ |
303 |
+<pre caption="Compiling and linking BLAS/LAPACK"> |
304 |
+# <i>pkg-config --libs blas</i> <comment>(To link with FORTRAN 77 BLAS library)</comment> |
305 |
+# <i>pkg-config --cflags cblas</i> <comment>(To compile against C BLAS library)</comment> |
306 |
+# <i>pkg-config --libs cblas</i> <comment>(To link with C BLAS library)</comment> |
307 |
+# <i>pkg-config --libs lapack</i> <comment>(To link with FORTRAN 77 LAPACK library)</comment> |
308 |
+</pre> |
309 |
+ |
310 |
+<p> |
311 |
+<c>pkg-config</c> files are available for whichever implementation you select with <c>eselect</c>. |
312 |
+More information on using <c>pkg-config</c> can be obtained with <c>man pkg-config</c>. |
313 |
+</p> |
314 |
+ |
315 |
+</body> |
316 |
+</section> |
317 |
+<section> |
318 |
+<title>Switching libraries</title> |
319 |
+<body> |
320 |
+ |
321 |
+<p> |
322 |
+You can easily switch BLAS, CBLAS and LAPACK implementations with |
323 |
+<c>eselect</c>. At this point, you probably have <c>eselect-blas</c>, |
324 |
+<c>eselect-cblas</c> and <c>eselect-lapack</c> installed. If you do not, |
325 |
+install them now! Using eselect, you can view which implementations of CBLAS |
326 |
+are available. |
327 |
+</p> |
328 |
+ |
329 |
+<pre caption="Viewing available implementations"> |
330 |
+# <i>eselect cblas list</i> |
331 |
+Installed CBLAS for library directory lib64 |
332 |
+[1] atlas |
333 |
+[2] atlas-threads |
334 |
+[3] gsl |
335 |
+[4] mkl-threads * |
336 |
+[5] reference |
337 |
+</pre> |
338 |
+ |
339 |
+<p> |
340 |
+The implementation marked with an asterisk (*) is the currently |
341 |
+selected implementation. To switch implementations, run: |
342 |
+</p> |
343 |
+ |
344 |
+<pre caption="Switching to the ATLAS implementation of LAPACK"> |
345 |
+# <i>eselect lapack set atlas</i> |
346 |
+</pre> |
347 |
+ |
348 |
+<p> |
349 |
+To learn more about the <c>eselect</c> tool, visit the |
350 |
+<uri link="http://www.gentoo.org/proj/en/eselect/user-guide.xml">eselect guide</uri> |
351 |
+</p> |
352 |
+ |
353 |
+</body> |
354 |
+</section> |
355 |
+<section> |
356 |
+<title>Choosing a compiler</title> |
357 |
+<body> |
358 |
+ |
359 |
+<p> |
360 |
+Most of the libraries can compile with both the GNU compiler collection and the |
361 |
+Intel® compilers on the x86, amd64 and ia64 architectures. By default, you are |
362 |
+probably using <c>gcc</c>. You can also compile the <c>*-reference</c> packages |
363 |
+with <c>ifort</c> and <c>icc</c>. To do this, you need to define the F77 |
364 |
+environment variable and don't forget the FFLAGS. |
365 |
+</p> |
366 |
+ |
367 |
+<pre caption="Using non-GCC compilers"> |
368 |
+# <i>F77=ifort FFLAGS="-O2 -mp" emerge blas-reference</i> |
369 |
+</pre> |
370 |
+ |
371 |
+<p> |
372 |
+Depending on your hardware, a small performance gain can be noticed thanks to |
373 |
+vectorization. The <c>-mp</c> flag maintains floating-point precision, since by |
374 |
+default ifort is pretty aggressive on floating point arithmetic, and we are |
375 |
+actually compiling a math package. Try <c>man ifort</c> to see additional flags |
376 |
+to fit your hardware. |
377 |
+</p> |
378 |
+ |
379 |
+<p> |
380 |
+Some of the implementations let you specify the Intel® C compiler as well. Please beware that |
381 |
+not all libraries compile with all combinations. |
382 |
+You should receive an error during the emerge in case you have |
383 |
+chosen |
384 |
+an incompatible combination. |
385 |
+</p> |
386 |
+ |
387 |
+<p> |
388 |
+As usual for Gentoo, there are many combinations of USE flags and compilers with |
389 |
+which you could compile a package. Unfortunately switching compilers between |
390 |
+BLAS and LAPACK might not be always compatible. For example: |
391 |
+</p> |
392 |
+ |
393 |
+<pre caption="Incompatible combinations"> |
394 |
+# <i>F77=ifort FFLAGS="-O2 -mp" USE="openmp" emerge =acml-3.6.0-r1</i> |
395 |
+# <i>eselect blas set acml-ifort-openmp</i> |
396 |
+# <i>F77=gfortran FFLAGS="-O2" emerge lapack-reference</i> |
397 |
+</pre> |
398 |
+ |
399 |
+<p> |
400 |
+This will most likely break things or not even compile. |
401 |
+</p> |
402 |
+ |
403 |
+<p> |
404 |
+Try to be consistent in your choice. Stay with the GCC most of the time will |
405 |
+avoid you some trouble, unless you want to use the MKL, in which case the Intel® |
406 |
+C and FORTRAN compilers make a good combination. |
407 |
+</p> |
408 |
+ |
409 |
+</body> |
410 |
+</section> |
411 |
+<section> |
412 |
+<title>Documentation</title> |
413 |
+<body> |
414 |
+ |
415 |
+<p> |
416 |
+If you need BLAS or LAPACK to develop your own programs, the documentation |
417 |
+becomes pretty handy. Setting the USE="doc" flag for the corresponding BLAS or |
418 |
+LAPACK package will install man pages and quick reference sheets from the |
419 |
+<c>app-doc/blas-docs</c> and <c>app-doc/lapack-docs</c> packages. They are |
420 |
+standard and valid for all implementations. For optimized packages, the |
421 |
+USE="doc" flags will usually install extra doc in PDF or HTML format. |
422 |
+</p> |
423 |
+ |
424 |
+</body> |
425 |
+</section> |
426 |
+</chapter> |
427 |
+ |
428 |
+<chapter> |
429 |
+<title>For Developers</title> |
430 |
+<section> |
431 |
+<title>Providing new implementations</title> |
432 |
+<body> |
433 |
+ |
434 |
+<p> |
435 |
+The Portage tree contains many ebuilds that depend on the BLAS/CBLAS/LAPACK |
436 |
+libraries. As there is more than one possible implementation, the Gentoo |
437 |
+Scientific Project reorganized all the packages to provide <c>virtual/blas</c>, |
438 |
+<c>virtual/cblas</c>, and <c>virtual/lapack</c>. All ebuilds using BLAS should |
439 |
+depend on this virtual package, unless it is explicitly known to break with |
440 |
+different BLAS implementations. |
441 |
+</p> |
442 |
+ |
443 |
+<p> |
444 |
+To work with Gentoo's configuration tools |
445 |
+<c>app-admin/eselect-{blas,cblas,lapack}</c>, and the virtual, every ebuild that |
446 |
+installs a BLAS implementation must fulfill following requirements: |
447 |
+</p> |
448 |
+ |
449 |
+<ol> |
450 |
+ <li> |
451 |
+ The ebuild must install an eselect file for each profile it provides. The |
452 |
+ libraries should link to the ones in <path>/usr/$(get_libdir)</path> |
453 |
+ directories and the include files in <path>/usr/include</path>: |
454 |
+ <ul> |
455 |
+ <li> |
456 |
+ <path>libblas.so[.0]</path> - Shared object for FORTRAN BLAS |
457 |
+ applications |
458 |
+ </li> |
459 |
+ <li> |
460 |
+ <path>libblas.a</path> - Static library for FORTRAN BLAS applications |
461 |
+ </li> |
462 |
+ <li> |
463 |
+ <path>libcblas.so[.0]</path> - Shared object for C/C++ CBLAS applications |
464 |
+ </li> |
465 |
+ <li> |
466 |
+ <path>libcblas.a</path> - Static library for C/C++ CBLAS applications |
467 |
+ </li> |
468 |
+ <li><path>cblas.h</path> - Include header for C/C++ applications</li> |
469 |
+ <li> |
470 |
+ <path>liblapack.so[.0]</path> - Shared object for FORTRAN LAPACK |
471 |
+ applications |
472 |
+ </li> |
473 |
+ <li> |
474 |
+ <path>liblapack.a</path> - Static library for FORTRAN LAPACK applications |
475 |
+ </li> |
476 |
+ </ul> |
477 |
+ </li> |
478 |
+ <li> |
479 |
+ The ebuild must install a <path>blas.pc</path>, <path>cblas.pc</path> and/or |
480 |
+ <path>lapack.pc</path> pkg-config file and therefore RDEPEND on |
481 |
+ <c>dev-util/pkgconfig</c>. They should also be included in the eselect |
482 |
+ files, and link to the <path>/usr/$(get_libdir)/pkgconfig</path> directory: |
483 |
+ <ul> |
484 |
+ <li><path>blas.pc</path> - BLAS pkg-config file</li> |
485 |
+ <li><path>cblas.pc</path> - CBLAS pkg-config file</li> |
486 |
+ <li><path>lapack.pc</path> - LAPACK pkg-config file</li> |
487 |
+ </ul> |
488 |
+ </li> |
489 |
+ <li>Be included in the virtual package as a possible provider: |
490 |
+ <ul> |
491 |
+ <li><c>virtual/blas</c> - BLAS virtual package</li> |
492 |
+ <li><c>virtual/cblas</c> - CBLAS virtual package</li> |
493 |
+ <li><c>virtual/lapack</c> - LAPACK virtual package</li> |
494 |
+ </ul> |
495 |
+ </li> |
496 |
+</ol> |
497 |
+ |
498 |
+<p> |
499 |
+The easiest way of understanding all this is probably getting inspiration from |
500 |
+one of the available packages. Currently the Portage tree provide the following |
501 |
+virtuals: |
502 |
+</p> |
503 |
+ |
504 |
+<table> |
505 |
+<tr> |
506 |
+ <th>Package name</th> |
507 |
+ <th>virtual/blas</th> |
508 |
+ <th>virtual/cblas</th> |
509 |
+ <th>virtual/lapack</th> |
510 |
+</tr> |
511 |
+<tr> |
512 |
+ <ti><c>sci-libs/acml</c></ti> |
513 |
+ <ti>*</ti> |
514 |
+ <ti></ti> |
515 |
+ <ti>*</ti> |
516 |
+</tr> |
517 |
+<tr> |
518 |
+ <ti><c>sci-libs/blas-atlas</c></ti> |
519 |
+ <ti>*</ti> |
520 |
+ <ti>*</ti> |
521 |
+ <ti></ti> |
522 |
+</tr> |
523 |
+<tr> |
524 |
+ <ti><c>sci-libs/blas-goto</c></ti> |
525 |
+ <ti>*</ti> |
526 |
+ <ti></ti> |
527 |
+ <ti></ti> |
528 |
+</tr> |
529 |
+<tr> |
530 |
+ <ti><c>sci-libs/blas-reference</c></ti> |
531 |
+ <ti>*</ti> |
532 |
+ <ti></ti> |
533 |
+ <ti></ti> |
534 |
+</tr> |
535 |
+<tr> |
536 |
+ <ti><c>sci-libs/cblas-reference</c></ti> |
537 |
+ <ti></ti> |
538 |
+ <ti>*</ti> |
539 |
+ <ti></ti> |
540 |
+</tr> |
541 |
+<tr> |
542 |
+ <ti><c>sci-libs/gsl</c></ti> |
543 |
+ <ti></ti> |
544 |
+ <ti>*</ti> |
545 |
+ <ti></ti> |
546 |
+</tr> |
547 |
+<tr> |
548 |
+ <ti><c>sci-libs/lapack-atlas</c></ti> |
549 |
+ <ti></ti> |
550 |
+ <ti></ti> |
551 |
+ <ti>*</ti> |
552 |
+</tr> |
553 |
+<tr> |
554 |
+ <ti><c>sci-libs/lapack-reference</c></ti> |
555 |
+ <ti></ti> |
556 |
+ <ti></ti> |
557 |
+ <ti>*</ti> |
558 |
+</tr> |
559 |
+<tr> |
560 |
+ <ti><c>sci-libs/mkl</c></ti> |
561 |
+ <ti>*</ti> |
562 |
+ <ti>*</ti> |
563 |
+ <ti>*</ti> |
564 |
+</tr> |
565 |
+</table> |
566 |
+ |
567 |
+</body> |
568 |
+</section> |
569 |
+<section> |
570 |
+<title>Packages with BLAS/LAPACK dependencies</title> |
571 |
+<body> |
572 |
+ |
573 |
+<p> |
574 |
+Simply use <c>virtual/{blas,cblas,lapack}</c> as a [R]DEPEND. To build some |
575 |
+packages, you might need to use the pkg-config tool. If you are lucky, the |
576 |
+package uses autotools together with common BLAS and LAPACK M4 macros.In this |
577 |
+case, the configuration step becomes simple. For example: |
578 |
+</p> |
579 |
+ |
580 |
+<pre caption="Sample package configuration"> |
581 |
+<keyword>econf</keyword> --with-blas="<var>$(pkg-config --libs blas)</var>" |
582 |
+</pre> |
583 |
+ |
584 |
+<impo> |
585 |
+Don't forget to add <c>dev-util/pkgconfig</c> in DEPEND. |
586 |
+</impo> |
587 |
+ |
588 |
+</body> |
589 |
+</section> |
590 |
+</chapter> |
591 |
+ |
592 |
+<chapter> |
593 |
+<title>In the near future</title> |
594 |
+<section> |
595 |
+<body> |
596 |
+ |
597 |
+<p> |
598 |
+We plan to include more standard BLAS, LAPACK libraries: BLAS 95, LAPACK 95, |
599 |
+Sparse BLAS, ScaLAPACK. If you feel inclined to write an ebuild for these, you |
600 |
+are more than welcomed to file it on our <uri |
601 |
+link="http://bugs.gentoo.org">Bugzilla</uri>. |
602 |
+</p> |
603 |
+ |
604 |
+</body> |
605 |
+</section> |
606 |
</chapter> |
607 |
</guide> |
608 |
|
609 |
|
610 |
|
611 |
-- |
612 |
gentoo-commits@g.o mailing list |