1 2These files were extracted from SuperLU-5.2.1/src 3A full distribution of SuperLU can be downloaded from: 4http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ 5 6 SuperLU (Version 5.2.x) 7 ======================= 8 9SuperLU contains a set of subroutines to solve a sparse linear system 10A*X=B. It uses Gaussian elimination with partial pivoting (GEPP). 11The columns of A may be preordered before factorization; the 12preordering for sparsity is completely separate from the factorization. 13 14SuperLU is implemented in ANSI C, and must be compiled with standard 15ANSI C compilers. It provides functionality for both real and complex 16matrices, in both single and double precision. The file names for the 17single-precision real version start with letter "s" (such as sgstrf.c); 18the file names for the double-precision real version start with letter "d" 19(such as dgstrf.c); the file names for the single-precision complex 20version start with letter "c" (such as cgstrf.c); the file names 21for the double-precision complex version start with letter "z" 22(such as zgstrf.c). 23 24 25SuperLU contains the following directory structure: 26 27 SuperLU/README instructions on installation 28 SuperLU/CBLAS/ needed BLAS routines in C, not necessarily fast 29 SuperLU/DOC/ Users' Guide and documentation of source code 30 SuperLU/EXAMPLE/ example programs 31 SuperLU/FORTRAN/ Fortran interface 32 SuperLU/INSTALL/ test machine dependent parameters; the Users' Guide. 33 SuperLU/MAKE_INC/ sample machine-specific make.inc files 34 SuperLU/MATLAB/ Matlab mex-file interface 35 SuperLU/SRC/ C source code, to be compiled into the superlu.a library 36 SuperLU/TESTING/ driver routines to test correctness 37 SuperLU/Makefile top level Makefile that does installation and testing 38 SuperLU/make.inc compiler, compile flags, library definitions and C 39 preprocessor definitions, included in all Makefiles. 40 (You may need to edit it to be suitable for your system 41 before compiling the whole package.) 42 43There are two ways to install the package. One uses CMake build system, 44the other requires users to edit makefile manually. The procedures 45are described below. 46 471. Manual installation with makefile. 48 Before installing the package, please examine the three things dependent 49 on your system setup: 50 51 1.1 Edit the make.inc include file. 52 This make include file is referenced inside each of the Makefiles 53 in the various subdirectories. As a result, there is no need to 54 edit the Makefiles in the subdirectories. All information that is 55 machine specific has been defined in this include file. 56 57 Example machine-specific make.inc include files are provided 58 in the MAKE_INC/ directory for several systems, such as Linux, 59 MacX, Cray, IBM, SunOS 5.x (Solaris), and HP-PA. 60 When you have selected the machine to which you wish 61 to install SuperLU, copy the appropriate sample include file (if one 62 is present) into make.inc. For example, if you wish to run 63 SuperLU on an linux, you can do 64 65 cp MAKE_INC/make.linux make.inc 66 67 For the systems other than listed above, slight modifications to the 68 make.inc file will need to be made. 69 70 1.2. The BLAS library. 71 If there is BLAS library available on your machine, you may define 72 the following in the file SuperLU/make.inc: 73 BLASDEF = -DUSE_VENDOR_BLAS 74 BLASLIB = <BLAS library you wish to link with> 75 76 The CBLAS/ subdirectory contains the part of the C BLAS needed by 77 SuperLU package. However, these codes are intended for use only if 78 there is no faster implementation of the BLAS already available 79 on your machine. In this case, you should do the following: 80 81 1) In SuperLU/make.inc, undefine (comment out) BLASDEF, and define: 82 BLASLIB = ../lib/blas$(PLAT).a 83 84 2) Go to the SuperLU/ directory, type: 85 make blaslib 86 to make the BLAS library from the routines in the 87 CBLAS/ subdirectory. 88 89 1.3. C preprocessor definition CDEFS. 90 In the header file SRC/slu_Cnames.h, we use macros to determine how 91 C routines should be named so that they are callable by Fortran. 92 (Some vendor-supplied BLAS libraries do not have C interface. So the 93 re-naming is needed in order for the SuperLU BLAS calls (in C) to 94 interface with the Fortran-style BLAS.) 95 The possible options for CDEFS are: 96 97 o -DAdd_: Fortran expects a C routine to have an underscore 98 postfixed to the name; 99 o -DNoChange: Fortran expects a C routine name to be identical to 100 that compiled by C; 101 o -DUpCase: Fortran expects a C routine name to be all uppercase. 102 103 1.4. The Matlab MEX-file interface. 104 The MATLAB/ subdirectory includes Matlab C MEX-files, so that 105 our factor and solve routines can be called as alternatives to those 106 built into Matlab. In the file SuperLU/make.inc, define MATLAB to be 107 the directory in which Matlab is installed on your system, for example: 108 109 MATLAB = /usr/local/matlab 110 111 At the SuperLU/ directory, type "make matlabmex" to build the MEX-file 112 interface. After you have built the interface, you may go to the 113 MATLAB/ directory to test the correctness by typing (in Matlab): 114 trysuperlu 115 trylusolve 116 117 A Makefile is provided in each subdirectory. The installation can be done 118 completely automatically by simply typing "make" at the top level. 119 The test results are in the files below: 120 INSTALL/install.out 121 TESTING/stest.out # single precision, real 122 TESTING/dtest.out # double precision, real 123 TESTING/ctest.out # single precision, complex 124 TESTING/ztest.out # double precision, complex 125 126 1272. Using CMake build system. 128 You will need to create a build tree from which to invoke CMake. 129 130 From the top level directory, do: 131 mkdir build ; cd build 132 cmake .. 133 134 or with more options, e.g., 135 cmake .. \ 136 -DCMAKE_INSTALL_INCLUDEDIR=/my/custom/path 137 138 To actually build, type: 139 make 140 141 To run the installation test, type: 142 make test (or: ctest) 143 144 The test results are in the files below: 145 build/TESTING/s_test.out # single precision, real 146 build/TESTING/d_test.out # double precision, real 147 build/TESTING/c_test.out # single precision, complex 148 build/TESTING/z_test.out # double precision, complex 149 150 To install the library, type: 151 make install 152 153 154-------------------- 155| RELEASE VERSIONS | 156-------------------- 157 February 4, 1997 Version 1.0 158 November 15, 1997 Version 1.1 159 September 1, 1999 Version 2.0 160 October 15, 2003 Version 3.0 161 August 1, 2008 Version 3.1 162 June 30, 2009 Version 4.0 163 November 23, 2010 Version 4.1 164 August 25, 2011 Version 4.2 165 October 27, 2011 Version 4.3 166 July 26, 2015 Version 5.0 167 December 3, 2015 Version 5.1 168 April 8, 2016 Version 5.2.0 169