README.install 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. ===================
  2. CLAPACK README FILE
  3. ===================
  4. ============================================================================================
  5. Version 3.2.1 (threadsafe)
  6. Release date: June 2009 / April 2010
  7. F2C translation of LAPACK 3.2.1
  8. To get revisions info about LAPACK 3.2.1, please see http://www.netlib.org/lapack/lapack-3.2.1.html
  9. FOR SUPPORT: LAPACK Forum: http://icl.cs.utk.edu/lapack-forum/
  10. ============================================================================================
  11. This README file describes how and how to install the ANSI C translation of the
  12. LAPACK library, called CLAPACK. CLAPACK must be compiled with an ANSI Standard
  13. C compiler. If the C compiler on your machine is an old-style C compiler, you
  14. will have to use gcc to compile the package.
  15. IMPORTANT NOTE:
  16. You *CANNOT* just go to www.netlib.org/clapack, download a routine like
  17. sgesv.c and have it work unless you properly install and link to the
  18. f2c and BLAS routines as described below. If your linker complains about
  19. missing functions, you have probably accidentally neglected this step.
  20. Also, you will need the file "f2c.h" (included with the f2c libraries)
  21. in order to compile these routines.
  22. The default BLAS routines included with CLAPACK in the BLAS/SRC
  23. subdirectory may also be used these will most likely be
  24. slower than a BLAS library optimized for your machine. If you do
  25. not have such an optimized BLAS library, you can get one at
  26. http://www.netlib.org/atlas
  27. ==============================================================================
  28. For a fast default installation, you will need to
  29. - Untar clapack.tar and modify the make.inc file (see step 1 below)
  30. - Make the f2c libraries (see step 2 below)
  31. - Make the BLAS library (see step 2 below)
  32. - Make the main library, test it, and time it by simply typing
  33. make
  34. If you encounter difficulties, you may find the installation manual for
  35. the FORTRAN version (INSTALL/lawn81.*) useful.
  36. Procedure for installing CLAPACK:
  37. ==============================================================================
  38. (1) 'tar xvf clapack.tar' to build the following directory structure:
  39. CLAPACK/README.install this file
  40. CLAPACK/BLAS/ C source for BLAS
  41. CLAPACK/F2CLIBS/ f2c I/O functions (libI77) and math functions (libF77)
  42. CLAPACK/INSTALL/ Testing functions and pre-tested make.inc files
  43. for various platforms.
  44. CLAPACK/INCLUDE/ header files - clapack.h is including C prototypes of all the
  45. CLAPACK routines.
  46. CLAPACK/SRC/ C source of LAPACK routines
  47. CLAPACK/TESTING/ driver routines to test correctness
  48. CLAPACK/make.inc compiler, compile flags and library definitions,
  49. included in all Makefiles.
  50. NOTE: It's better to use gcc compiler on some older
  51. Sun systems.
  52. You should be sure to modify the make.inc file for your system.
  53. (2) Build the f2c libraries by doing:
  54. make f2clib
  55. ##############################################################################
  56. WARNING: 1) If your system lacks onexit() and you are not using an ANSI C
  57. compiler, then you should change your F2CCFLAGS line in
  58. make.inc to
  59. F2CCFLAGS=$(CFLAGS) -DNO_ONEXIT
  60. On at least some Sun systems, it is better to use
  61. F2CCFLAGS=$(CFLAGS) -Donexit=on_exit
  62. 2) On at least some Sun systems, the type declaration in
  63. F2CLIBS/libI77/rawio.h: extern FILE *fdopen(int, char*)
  64. is not consistent with the one defined in stdio.h. In this case
  65. you should comment out this line.
  66. ##############################################################################
  67. (3) To run CLAPACK, you need to create a BLAS library.
  68. The performance of CLAPACK largely depends on the performance
  69. of the BLAS library.
  70. You can either use the reference BLAS library included with
  71. this distribution, which is easy to install but not optimized to be
  72. fast on any particular machine, or else find a version of the
  73. BLAS optimized for your machine.
  74. If you want to use the reference BLAS library included with
  75. this distribution, build it by doing
  76. make blaslib
  77. from the main directory.
  78. If you want to find a BLAS library optimized for your machine,
  79. see the note below for more details;
  80. see also the README in the BLAS/WRAP directory.
  81. (4) Compile and run the BLAS TESTING code by doing:
  82. cd CLAPACK/BLAS/TESTING; make -f Makeblat2
  83. cd CLAPACK/BLAS
  84. xblat2s < sblat2.in
  85. xblat2d < dblat2.in
  86. xblat2c < cblat2.in
  87. xblat2z < zblat2.in
  88. cd CLAPACK/BLAS/TESTING; make -f Makeblat3
  89. cd CLAPACK/BLAS
  90. xblat3s < sblat3.in
  91. xblat3d < dblat3.in
  92. xblat3c < cblat3.in
  93. xblat3z < zblat3.in
  94. Inspect the output files *.SUMM to confirm that no errors occurred.
  95. {NOTE: If a compiling error involving _atexit appears then see information
  96. within the WARNING above.}
  97. {NOTE: For the highest performance, it is best to use a version of the BLAS
  98. optimized for your particular machine. This may be done by modifying
  99. the line
  100. BLASLIB = ../../blas$(PLAT).a
  101. in CLAPACK/make.inc to point to the optimized BLAS.
  102. Link with BLAS which provides the standard CBLAS interface
  103. ==========================================================
  104. If you are using a version of the BLAS which provides the standard
  105. CBLAS interface (e.g. ATLAS), you need to add the appropriate "wrapper" library.
  106. you can make the wrapper library libcblaswr.a by typing
  107. "make cblaswrap" from the main directory. For this setup
  108. (ATLAS with the CBLAS wrapper), the BLASLIB line might look like
  109. Example:
  110. Modification to make.inc
  111. CC = gcc
  112. BLASLIB = ../../libcblaswr.a -lcblas -latlas
  113. Creation of libcblaswr.a : make cblaswrap
  114. Link with BLAS which Fortran calling interface
  115. ===============================================
  116. Two possibilities:
  117. - add -DNO_BLAS_WRAP to the CC variable to when compiling and no need of a "wrapper" library
  118. Example:
  119. CC = gcc -DNO_BLAS_WRAP
  120. BLASLIB = -lgoto -lpthread
  121. - add the sample Fortran calling interface (libfblaswr.a) for systems with
  122. Sun-style Fortran calling conventions is also provided; however,
  123. this interface will need modifications to work on other
  124. architectures which have different Fortran calling convensions.
  125. See the README in the BLAS/WRAP subdirectory for further information.
  126. Example:
  127. CC = gcc
  128. BLASLIB = ../../libfblaswr.a -lgoto -lpthread
  129. Creation of libfblaswr.a : make fblaswrap
  130. }
  131. (5) Build the archive containing lapack source code by doing:
  132. cd CLAPACK/SRC; make
  133. (6) Compile the matrix generation software, the eigenroutine TESTING
  134. code, the linear system TESTING code, and run the LAPACK tests
  135. by doing:
  136. cd CLAPACK/TESTING/MATGEN; make
  137. cd CLAPACK/TESTING; make
  138. Inspect the output files *.out to confirm that no errors occurred.
  139. I. Compile the matrix generation software, the eigenroutine TESTING code,
  140. the linear system TESTING code, and run the LAPACK tests separately
  141. by doing:
  142. cd CLAPACK/TESTING/MATGEN; make
  143. cd CLAPACK/TESTING/EIG; make
  144. cd CLAPACK/TESTING/LIN; make
  145. cd CLAPACK/TESTING; make
  146. II. After the executable files and libraries have been created for each
  147. of the compiles, the object files should be removed by doing:
  148. make clean
  149. III. Each 'make' may be accomplished just for one or a subset of the
  150. precisions desired. For example:
  151. make single
  152. make single complex
  153. make single double complex complex16
  154. Using make without any arguments will compile all four precisions.
  155. James Demmel
  156. Xiaoye Li
  157. Chris Puscasiu
  158. Steve Timson
  159. UC Berkeley
  160. Sept 27 1993
  161. {Revised by Susan Ostrouchov and Jude Toth}
  162. {The University of Tennessee at Knoxville}
  163. {October 15, 1993}
  164. {Revised by Xiaoye Li and James Demmel}
  165. {University of California at Berkeley}
  166. {November 22, 1994}
  167. {Revised by David Bindel and James Demmel}
  168. {University of California at Berkeley}
  169. {July 19, 2000}
  170. {Revised by Julie Langou}
  171. {University of Tennessee}
  172. {February 2008}
  173. {Revised by Julie Langou}
  174. {University of Tennessee}
  175. {October 2008, April 2010}
  176. {Revised by Peng Du}
  177. {University of Tennessee}
  178. {May 2009}