[superlu] 01/11: Imported Upstream version 3.0
Nico Schlömer
nschloe-guest at moszumanska.debian.org
Tue May 17 19:22:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
nschloe-guest pushed a commit to branch master
in repository superlu.
commit 167effdadb333b54307ffc7df707e18f6c57d18f
Author: Nico Schlömer <nico.schloemer at gmail.com>
Date: Tue May 17 21:22:22 2016 +0200
Imported Upstream version 3.0
---
CBLAS/Cnames.h | 1 +
CBLAS/Makefile | 86 +
CBLAS/caxpy.c | 90 +
CBLAS/ccopy.c | 74 +
CBLAS/cdotc.c | 87 +
CBLAS/cgemv.c | 399 ++
CBLAS/cgerc.c | 205 +
CBLAS/chemv.c | 421 ++
CBLAS/cher2.c | 436 ++
CBLAS/cmyblas2.c | 183 +
CBLAS/cscal.c | 70 +
CBLAS/ctrsv.c | 509 ++
CBLAS/dasum.c | 88 +
CBLAS/daxpy.c | 94 +
CBLAS/dcabs1.c | 28 +
CBLAS/dcopy.c | 94 +
CBLAS/ddot.c | 97 +
CBLAS/dgemv.c | 299 ++
CBLAS/dger.c | 182 +
CBLAS/dmyblas2.c | 225 +
CBLAS/dnrm2.c | 83 +
CBLAS/drot.c | 76 +
CBLAS/dscal.c | 83 +
CBLAS/dsymv.c | 300 ++
CBLAS/dsyr2.c | 264 +
CBLAS/dtrsv.c | 338 ++
CBLAS/dzasum.c | 68 +
CBLAS/dznrm2.c | 96 +
CBLAS/f2c.h | 48 +
CBLAS/icamax.c | 72 +
CBLAS/idamax.c | 80 +
CBLAS/isamax.c | 80 +
CBLAS/izamax.c | 81 +
CBLAS/sasum.c | 89 +
CBLAS/saxpy.c | 94 +
CBLAS/scasum.c | 74 +
CBLAS/scnrm2.c | 96 +
CBLAS/scopy.c | 94 +
CBLAS/sdot.c | 96 +
CBLAS/sgemv.c | 299 ++
CBLAS/sger.c | 181 +
CBLAS/smyblas2.c | 225 +
CBLAS/snrm2.c | 83 +
CBLAS/srot.c | 76 +
CBLAS/sscal.c | 82 +
CBLAS/ssymv.c | 300 ++
CBLAS/ssyr2.c | 263 +
CBLAS/strsv.c | 338 ++
CBLAS/superlu_f2c.h | 48 +
CBLAS/zaxpy.c | 87 +
CBLAS/zcopy.c | 74 +
CBLAS/zdotc.c | 85 +
CBLAS/zgemv.c | 400 ++
CBLAS/zgerc.c | 206 +
CBLAS/zhemv.c | 421 ++
CBLAS/zher2.c | 437 ++
CBLAS/zmyblas2.c | 183 +
CBLAS/zscal.c | 70 +
CBLAS/ztrsv.c | 510 ++
EXAMPLE/Makefile | 161 +
EXAMPLE/README | 34 +
EXAMPLE/clinsol.c | 116 +
EXAMPLE/clinsol1.c | 121 +
EXAMPLE/clinsolx.c | 209 +
EXAMPLE/clinsolx1.c | 237 +
EXAMPLE/clinsolx2.c | 275 +
EXAMPLE/cmat | 10968 ++++++++++++++++++++++++++++++++++++++++
EXAMPLE/dlinsol.c | 116 +
EXAMPLE/dlinsol1.c | 121 +
EXAMPLE/dlinsolx.c | 209 +
EXAMPLE/dlinsolx1.c | 237 +
EXAMPLE/dlinsolx2.c | 275 +
EXAMPLE/g10 | 146 +
EXAMPLE/slinsol.c | 116 +
EXAMPLE/slinsol1.c | 121 +
EXAMPLE/slinsolx.c | 209 +
EXAMPLE/slinsolx1.c | 237 +
EXAMPLE/slinsolx2.c | 275 +
EXAMPLE/sp_ienv.c | 68 +
EXAMPLE/superlu.c | 80 +
EXAMPLE/zlinsol.c | 116 +
EXAMPLE/zlinsol1.c | 121 +
EXAMPLE/zlinsolx.c | 209 +
EXAMPLE/zlinsolx1.c | 237 +
EXAMPLE/zlinsolx2.c | 275 +
FORTRAN/Makefile | 27 +
FORTRAN/README | 10 +
FORTRAN/c_fortran_dgssv.c | 175 +
FORTRAN/c_fortran_dgssv.c.old | 175 +
FORTRAN/f77_main.f | 48 +
FORTRAN/f77_main.f.old | 48 +
FORTRAN/hbcode1.f | 46 +
INSTALL/Makefile | 26 +
INSTALL/dlamch.c | 963 ++++
INSTALL/dlamchtst.c | 34 +
INSTALL/install.csh | 14 +
INSTALL/lsame.c | 70 +
INSTALL/slamch.c | 982 ++++
INSTALL/slamchtst.c | 33 +
INSTALL/superlu_timer.c | 45 +
INSTALL/timertst.c | 88 +
INSTALL/ug.ps | 8591 +++++++++++++++++++++++++++++++
MAKE_INC/make.alpha | 46 +
MAKE_INC/make.cray | 53 +
MAKE_INC/make.hppa | 54 +
MAKE_INC/make.inc | 52 +
MAKE_INC/make.linux | 52 +
MAKE_INC/make.rs6k | 58 +
MAKE_INC/make.sgi | 51 +
MAKE_INC/make.solaris | 51 +
MAKE_INC/make.sp | 58 +
MAKE_INC/make.sun4 | 56 +
MATLAB/Makefile | 20 +
MATLAB/README | 20 +
MATLAB/airfoil2.mat | Bin 0 -> 300139 bytes
MATLAB/babble.m | 2 +
MATLAB/burble.m | 2 +
MATLAB/copyright.m | 14 +
MATLAB/hbo.m | 119 +
MATLAB/isperm.m | 9 +
MATLAB/lusolve.m | 62 +
MATLAB/mexlusolve.c | 149 +
MATLAB/mexlusolve.m | 13 +
MATLAB/mexopts.sh.old | 234 +
MATLAB/mexsuperlu.c | 264 +
MATLAB/mexsuperlu.m | 17 +
MATLAB/permutation.m | 59 +
MATLAB/resetrandoms.m | 10 +
MATLAB/smallmesh.mat | Bin 0 -> 23036 bytes
MATLAB/spart2.m | 28 +
MATLAB/spypart.m | 35 +
MATLAB/superlu.m | 143 +
MATLAB/time.m | 12 +
MATLAB/try2.m | 68 +
MATLAB/try3.m | 82 +
MATLAB/try4.m | 79 +
MATLAB/trylusolve.m | 137 +
MATLAB/trysuperlu.m | 219 +
MATLAB/trytime.m | 63 +
MATLAB/verbose.m | 2 +
Makefile | 56 +
README | 157 +
SRC/Cnames.h | 278 +
SRC/Makefile | 115 +
SRC/ccolumn_bmod.c | 361 ++
SRC/ccolumn_dfs.c | 270 +
SRC/ccopy_to_ucol.c | 105 +
SRC/cgscon.c | 143 +
SRC/cgsequ.c | 186 +
SRC/cgsrfs.c | 447 ++
SRC/cgssv.c | 222 +
SRC/cgssvx.c | 614 +++
SRC/cgstrf.c | 433 ++
SRC/cgstrs.c | 345 ++
SRC/cgstrs.c.bak | 339 ++
SRC/clacon.c | 214 +
SRC/clangs.c | 112 +
SRC/claqgs.c | 140 +
SRC/cmemory.c | 676 +++
SRC/cmyblas2.c | 183 +
SRC/colamd.c | 2583 ++++++++++
SRC/colamd.h | 67 +
SRC/cpanel_bmod.c | 478 ++
SRC/cpanel_dfs.c | 249 +
SRC/cpivotL.c | 174 +
SRC/cpivotgrowth.c | 110 +
SRC/cpruneL.c | 149 +
SRC/creadhb.c | 266 +
SRC/csnode_bmod.c | 118 +
SRC/csnode_dfs.c | 106 +
SRC/csp_blas2.c | 561 ++
SRC/csp_blas2.c.bak | 479 ++
SRC/csp_blas3.c | 121 +
SRC/csp_defs.h | 237 +
SRC/cutil.c | 481 ++
SRC/dGetDiagU.c | 59 +
SRC/dcolumn_bmod.c | 348 ++
SRC/dcolumn_dfs.c | 270 +
SRC/dcomplex.c | 105 +
SRC/dcomplex.h | 72 +
SRC/dcopy_to_ucol.c | 105 +
SRC/dgscon.c | 146 +
SRC/dgsequ.c | 186 +
SRC/dgsrfs.c | 437 ++
SRC/dgssv.c | 222 +
SRC/dgssvx.c | 614 +++
SRC/dgstrf.c | 433 ++
SRC/dgstrs.c | 332 ++
SRC/dgstrs.c.bak | 334 ++
SRC/dgstrsL.c | 233 +
SRC/dlacon.c | 229 +
SRC/dlamch.c | 963 ++++
SRC/dlangs.c | 112 +
SRC/dlaqgs.c | 137 +
SRC/dmemory.c | 676 +++
SRC/dmyblas2.c | 225 +
SRC/dpanel_bmod.c | 450 ++
SRC/dpanel_dfs.c | 249 +
SRC/dpivotL.c | 173 +
SRC/dpivotgrowth.c | 109 +
SRC/dpruneL.c | 149 +
SRC/dreadhb.c | 256 +
SRC/dsnode_bmod.c | 116 +
SRC/dsnode_dfs.c | 106 +
SRC/dsp_blas2.c | 470 ++
SRC/dsp_blas2.c.bak | 469 ++
SRC/dsp_blas3.c | 121 +
SRC/dsp_defs.h | 234 +
SRC/dutil.c | 478 ++
SRC/dzsum1.c | 83 +
SRC/get_perm_c.c | 452 ++
SRC/heap_relax_snode.c | 116 +
SRC/icmax1.c | 108 +
SRC/izmax1.c | 101 +
SRC/lsame.c | 70 +
SRC/memory.c | 207 +
SRC/mmd.c | 1012 ++++
SRC/relax_snode.c | 71 +
SRC/scolumn_bmod.c | 348 ++
SRC/scolumn_dfs.c | 270 +
SRC/scomplex.c | 105 +
SRC/scomplex.h | 72 +
SRC/scopy_to_ucol.c | 105 +
SRC/scsum1.c | 95 +
SRC/sgscon.c | 146 +
SRC/sgsequ.c | 186 +
SRC/sgsrfs.c | 437 ++
SRC/sgssv.c | 222 +
SRC/sgssvx.c | 614 +++
SRC/sgstrf.c | 433 ++
SRC/sgstrs.c | 332 ++
SRC/sgstrs.c.bak | 334 ++
SRC/slacon.c | 229 +
SRC/slamch.c | 982 ++++
SRC/slangs.c | 112 +
SRC/slaqgs.c | 138 +
SRC/smemory.c | 676 +++
SRC/smyblas2.c | 225 +
SRC/sp_coletree.c | 332 ++
SRC/sp_ienv.c | 61 +
SRC/sp_preorder.c | 203 +
SRC/spanel_bmod.c | 450 ++
SRC/spanel_dfs.c | 249 +
SRC/spivotL.c | 173 +
SRC/spivotgrowth.c | 109 +
SRC/spruneL.c | 149 +
SRC/sreadhb.c | 256 +
SRC/ssnode_bmod.c | 116 +
SRC/ssnode_dfs.c | 106 +
SRC/ssp_blas2.c | 470 ++
SRC/ssp_blas2.c.bak | 469 ++
SRC/ssp_blas3.c | 121 +
SRC/ssp_defs.h | 234 +
SRC/superlu_timer.c | 53 +
SRC/supermatrix.h | 140 +
SRC/sutil.c | 478 ++
SRC/util.c | 391 ++
SRC/util.h | 267 +
SRC/xerbla.c | 40 +
SRC/zcolumn_bmod.c | 363 ++
SRC/zcolumn_dfs.c | 270 +
SRC/zcopy_to_ucol.c | 105 +
SRC/zgscon.c | 143 +
SRC/zgsequ.c | 186 +
SRC/zgsrfs.c | 447 ++
SRC/zgssv.c | 222 +
SRC/zgssvx.c | 614 +++
SRC/zgstrf.c | 433 ++
SRC/zgstrs.c | 345 ++
SRC/zgstrs.c.bak | 339 ++
SRC/zlacon.c | 214 +
SRC/zlangs.c | 112 +
SRC/zlaqgs.c | 140 +
SRC/zmemory.c | 676 +++
SRC/zmyblas2.c | 183 +
SRC/zpanel_bmod.c | 478 ++
SRC/zpanel_dfs.c | 249 +
SRC/zpivotL.c | 174 +
SRC/zpivotgrowth.c | 110 +
SRC/zpruneL.c | 149 +
SRC/zreadhb.c | 266 +
SRC/zsnode_bmod.c | 118 +
SRC/zsnode_dfs.c | 106 +
SRC/zsp_blas2.c | 561 ++
SRC/zsp_blas2.c.bak | 479 ++
SRC/zsp_blas3.c | 121 +
SRC/zsp_defs.h | 237 +
SRC/zutil.c | 481 ++
TESTING/MATGEN/Cnames.h | 1 +
TESTING/MATGEN/Cnames.h.bak | 197 +
TESTING/MATGEN/Makefile | 81 +
TESTING/MATGEN/cdotc.c | 87 +
TESTING/MATGEN/clacgv.c | 76 +
TESTING/MATGEN/clagge.c | 464 ++
TESTING/MATGEN/claghe.c | 309 ++
TESTING/MATGEN/clagsy.c | 363 ++
TESTING/MATGEN/clarge.c | 160 +
TESTING/MATGEN/clarnd.c | 125 +
TESTING/MATGEN/clarnv.c | 172 +
TESTING/MATGEN/claror.c | 351 ++
TESTING/MATGEN/clarot.c | 365 ++
TESTING/MATGEN/clartg.c | 147 +
TESTING/MATGEN/claset.c | 144 +
TESTING/MATGEN/clatb4.c | 466 ++
TESTING/MATGEN/clatm2.c | 283 ++
TESTING/MATGEN/clatm3.c | 295 ++
TESTING/MATGEN/clatme.c | 623 +++
TESTING/MATGEN/clatmr.c | 1507 ++++++
TESTING/MATGEN/clatms.c | 1650 ++++++
TESTING/MATGEN/csymv.c | 408 ++
TESTING/MATGEN/d_lg10.c | 15 +
TESTING/MATGEN/d_sign.c | 12 +
TESTING/MATGEN/dlabad.c | 60 +
TESTING/MATGEN/dlagge.c | 402 ++
TESTING/MATGEN/dlagsy.c | 276 +
TESTING/MATGEN/dlaran.c | 92 +
TESTING/MATGEN/dlarge.c | 154 +
TESTING/MATGEN/dlarnd.c | 94 +
TESTING/MATGEN/dlarnv.c | 126 +
TESTING/MATGEN/dlaror.c | 291 ++
TESTING/MATGEN/dlarot.c | 299 ++
TESTING/MATGEN/dlartg.c | 158 +
TESTING/MATGEN/dlaruv.c | 152 +
TESTING/MATGEN/dlaset.c | 131 +
TESTING/MATGEN/dlatb4.c | 463 ++
TESTING/MATGEN/dlatm1.c | 266 +
TESTING/MATGEN/dlatm2.c | 241 +
TESTING/MATGEN/dlatm3.c | 252 +
TESTING/MATGEN/dlatme.c | 682 +++
TESTING/MATGEN/dlatmr.c | 1288 +++++
TESTING/MATGEN/dlatms.c | 1341 +++++
TESTING/MATGEN/f2c.h | 48 +
TESTING/MATGEN/lsamen.c | 69 +
TESTING/MATGEN/pow_dd.c | 13 +
TESTING/MATGEN/r_lg10.c | 15 +
TESTING/MATGEN/r_sign.c | 12 +
TESTING/MATGEN/slabad.c | 60 +
TESTING/MATGEN/slagge.c | 400 ++
TESTING/MATGEN/slagsy.c | 272 +
TESTING/MATGEN/slaran.c | 92 +
TESTING/MATGEN/slarge.c | 152 +
TESTING/MATGEN/slarnd.c | 94 +
TESTING/MATGEN/slarnv.c | 124 +
TESTING/MATGEN/slaror.c | 287 ++
TESTING/MATGEN/slarot.c | 299 ++
TESTING/MATGEN/slartg.c | 157 +
TESTING/MATGEN/slaruv.c | 152 +
TESTING/MATGEN/slaset.c | 136 +
TESTING/MATGEN/slatb4.c | 465 ++
TESTING/MATGEN/slatm1.c | 267 +
TESTING/MATGEN/slatm2.c | 241 +
TESTING/MATGEN/slatm3.c | 252 +
TESTING/MATGEN/slatme.c | 676 +++
TESTING/MATGEN/slatmr.c | 1289 +++++
TESTING/MATGEN/slatms.c | 1337 +++++
TESTING/MATGEN/zdotc.c | 85 +
TESTING/MATGEN/zlacgv.c | 76 +
TESTING/MATGEN/zlagge.c | 465 ++
TESTING/MATGEN/zlaghe.c | 314 ++
TESTING/MATGEN/zlagsy.c | 365 ++
TESTING/MATGEN/zlarge.c | 161 +
TESTING/MATGEN/zlarnd.c | 126 +
TESTING/MATGEN/zlarnv.c | 173 +
TESTING/MATGEN/zlaror.c | 356 ++
TESTING/MATGEN/zlarot.c | 365 ++
TESTING/MATGEN/zlartg.c | 146 +
TESTING/MATGEN/zlaset.c | 145 +
TESTING/MATGEN/zlatb4.c | 467 ++
TESTING/MATGEN/zlatm2.c | 286 ++
TESTING/MATGEN/zlatm3.c | 297 ++
TESTING/MATGEN/zlatme.c | 627 +++
TESTING/MATGEN/zlatmr.c | 1510 ++++++
TESTING/MATGEN/zlatms.c | 1648 ++++++
TESTING/MATGEN/zsymv.c | 408 ++
TESTING/Makefile | 106 +
TESTING/cdrive.c | 538 ++
TESTING/ctest.csh | 50 +
TESTING/ddrive.c | 538 ++
TESTING/dtest.csh | 49 +
TESTING/sdrive.c | 538 ++
TESTING/sp_cconvert.c | 44 +
TESTING/sp_cget01.c | 161 +
TESTING/sp_cget02.c | 139 +
TESTING/sp_cget04.c | 125 +
TESTING/sp_cget07.c | 228 +
TESTING/sp_dconvert.c | 44 +
TESTING/sp_dget01.c | 156 +
TESTING/sp_dget02.c | 139 +
TESTING/sp_dget04.c | 123 +
TESTING/sp_dget07.c | 218 +
TESTING/sp_ienv.c | 57 +
TESTING/sp_sconvert.c | 44 +
TESTING/sp_sget01.c | 156 +
TESTING/sp_sget02.c | 139 +
TESTING/sp_sget04.c | 123 +
TESTING/sp_sget07.c | 218 +
TESTING/sp_zconvert.c | 44 +
TESTING/sp_zget01.c | 161 +
TESTING/sp_zget02.c | 139 +
TESTING/sp_zget04.c | 125 +
TESTING/sp_zget07.c | 228 +
TESTING/stest.csh | 50 +
TESTING/zdrive.c | 538 ++
TESTING/ztest.csh | 49 +
make.inc | 50 +
405 files changed, 117282 insertions(+)
diff --git a/CBLAS/Cnames.h b/CBLAS/Cnames.h
new file mode 120000
index 0000000..dd3a080
--- /dev/null
+++ b/CBLAS/Cnames.h
@@ -0,0 +1 @@
+../SRC/Cnames.h
\ No newline at end of file
diff --git a/CBLAS/Makefile b/CBLAS/Makefile
new file mode 100644
index 0000000..a6fdc77
--- /dev/null
+++ b/CBLAS/Makefile
@@ -0,0 +1,86 @@
+include ../make.inc
+HEADER = ../SRC
+
+#######################################################################
+# This is the makefile to create a library for C-BLAS.
+# The files are organized as follows:
+#
+# SBLAS1 -- Single precision real BLAS routines
+# CBLAS1 -- Single precision complex BLAS routines
+# DBLAS1 -- Double precision real BLAS routines
+# ZBLAS1 -- Double precision complex BLAS routines
+#
+# CB1AUX -- Real BLAS routines called by complex routines
+# ZB1AUX -- D.P. real BLAS routines called by d.p. complex
+# routines
+#
+# ALLBLAS -- Auxiliary routines for Level 2 and 3 BLAS
+#
+# SBLAS2 -- Single precision real BLAS2 routines
+# CBLAS2 -- Single precision complex BLAS2 routines
+# DBLAS2 -- Double precision real BLAS2 routines
+# ZBLAS2 -- Double precision complex BLAS2 routines
+#
+# SBLAS3 -- Single precision real BLAS3 routines
+# CBLAS3 -- Single precision complex BLAS3 routines
+# DBLAS3 -- Double precision real BLAS3 routines
+# ZBLAS3 -- Double precision complex BLAS3 routines
+#
+# The library can be set up to include routines for any combination
+# of the four precisions. To create or add to the library, enter make
+# followed by one or more of the precisions desired. Some examples:
+# make single
+# make single complex
+# make single double complex complex16
+# Alternatively, the command
+# make
+# without any arguments creates a library of all four precisions.
+# The library is called
+# blas.a
+# and is created at the next higher directory level.
+#
+# To remove the object files after the library is created, enter
+# make clean
+#
+#######################################################################
+
+SBLAS1 = isamax.o sasum.o saxpy.o scopy.o sdot.o snrm2.o \
+ srot.o sscal.o
+SBLAS2 = sgemv.o ssymv.o strsv.o sger.o ssyr2.o
+
+DBLAS1 = idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o \
+ drot.o dscal.o
+DBLAS2 = dgemv.o dsymv.o dtrsv.o dger.o dsyr2.o
+
+CBLAS1 = icamax.o scasum.o caxpy.o ccopy.o scnrm2.o \
+ cscal.o
+CBLAS2 = cgemv.o chemv.o ctrsv.o cgerc.o cher2.o
+
+ZBLAS1 = izamax.o dzasum.o zaxpy.o zcopy.o dznrm2.o \
+ zscal.o dcabs1.o
+ZBLAS2 = zgemv.o zhemv.o ztrsv.o zgerc.o zher2.o
+
+
+all: single double complex complex16
+
+single: $(SBLAS1) $(SBLAS2) $(SBLAS3)
+ $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3)
+ $(RANLIB) $(BLASLIB)
+
+double: $(DBLAS1) $(DBLAS2) $(DBLAS3)
+ $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3)
+ $(RANLIB) $(BLASLIB)
+
+complex: $(CBLAS1) $(CBLAS2) $(CBLAS3)
+ $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(CBLAS1) $(ALLBLAS) $(CBLAS2) $(CBLAS3)
+ $(RANLIB) $(BLASLIB)
+
+complex16: $(ZBLAS1) $(ZBLAS2) $(ZBLAS3)
+ $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(ZBLAS1) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3)
+ $(RANLIB) $(BLASLIB)
+
+.c.o:
+ $(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -c $< $(VERBOSE)
+
+clean:
+ rm -f *.o ../blas$(PLAT).a
diff --git a/CBLAS/caxpy.c b/CBLAS/caxpy.c
new file mode 100644
index 0000000..27d4bd5
--- /dev/null
+++ b/CBLAS/caxpy.c
@@ -0,0 +1,90 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int caxpy_(integer *n, complex *ca, complex *cx, integer *
+ incx, complex *cy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4;
+ real r__1, r__2;
+ complex q__1, q__2;
+
+ /* Builtin functions */
+ double r_imag(complex *);
+
+ /* Local variables */
+ static integer i, ix, iy;
+
+
+/* constant times a vector plus a vector.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define CY(I) cy[(I)-1]
+#define CX(I) cx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if ((r__1 = ca->r, dabs(r__1)) + (r__2 = r_imag(ca), dabs(r__2)) == 0.f) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ i__4 = ix;
+ q__2.r = ca->r * CX(ix).r - ca->i * CX(ix).i, q__2.i = ca->r * CX(
+ ix).i + ca->i * CX(ix).r;
+ q__1.r = CY(iy).r + q__2.r, q__1.i = CY(iy).i + q__2.i;
+ CY(iy).r = q__1.r, CY(iy).i = q__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ i__4 = i;
+ q__2.r = ca->r * CX(i).r - ca->i * CX(i).i, q__2.i = ca->r * CX(
+ i).i + ca->i * CX(i).r;
+ q__1.r = CY(i).r + q__2.r, q__1.i = CY(i).i + q__2.i;
+ CY(i).r = q__1.r, CY(i).i = q__1.i;
+/* L30: */
+ }
+ return 0;
+} /* caxpy_ */
+
diff --git a/CBLAS/ccopy.c b/CBLAS/ccopy.c
new file mode 100644
index 0000000..dbfd87b
--- /dev/null
+++ b/CBLAS/ccopy.c
@@ -0,0 +1,74 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int ccopy_(integer *n, complex *cx, integer *incx, complex *
+ cy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+
+ /* Local variables */
+ static integer i, ix, iy;
+
+
+/* copies a vector, x, to a vector, y.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define CY(I) cy[(I)-1]
+#define CX(I) cx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = ix;
+ CY(iy).r = CX(ix).r, CY(iy).i = CX(ix).i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ CY(i).r = CX(i).r, CY(i).i = CX(i).i;
+/* L30: */
+ }
+ return 0;
+} /* ccopy_ */
+
diff --git a/CBLAS/cdotc.c b/CBLAS/cdotc.c
new file mode 100644
index 0000000..c7a153f
--- /dev/null
+++ b/CBLAS/cdotc.c
@@ -0,0 +1,87 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Complex */ VOID cdotc_(complex * ret_val, integer *n, complex *cx, integer
+ *incx, complex *cy, integer *incy)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer i;
+ static complex ctemp;
+ static integer ix, iy;
+
+
+/* forms the dot product of two vectors, conjugating the first
+ vector.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments */
+ --cy;
+ --cx;
+
+ /* Function Body */
+ ctemp.r = 0.f, ctemp.i = 0.f;
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ if (*n <= 0) {
+ return ;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ r_cnjg(&q__3, &cx[ix]);
+ i__2 = iy;
+ q__2.r = q__3.r * cy[iy].r - q__3.i * cy[iy].i, q__2.i = q__3.r *
+ cy[iy].i + q__3.i * cy[iy].r;
+ q__1.r = ctemp.r + q__2.r, q__1.i = ctemp.i + q__2.i;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ r_cnjg(&q__3, &cx[i]);
+ i__2 = i;
+ q__2.r = q__3.r * cy[i].r - q__3.i * cy[i].i, q__2.i = q__3.r *
+ cy[i].i + q__3.i * cy[i].r;
+ q__1.r = ctemp.r + q__2.r, q__1.i = ctemp.i + q__2.i;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+/* L30: */
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+} /* cdotc_ */
+
diff --git a/CBLAS/cgemv.c b/CBLAS/cgemv.c
new file mode 100644
index 0000000..086228f
--- /dev/null
+++ b/CBLAS/cgemv.c
@@ -0,0 +1,399 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int cgemv_(char *trans, integer *m, integer *n, complex *
+ alpha, complex *a, integer *lda, complex *x, integer *incx, complex *
+ beta, complex *y, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer info;
+ static complex temp;
+ static integer lenx, leny, i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical noconj;
+
+
+/* Purpose
+ =======
+
+ CGEMV performs one of the matrix-vector operations
+
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, or
+
+ y := alpha*conjg( A' )*x + beta*y,
+
+ where alpha and beta are scalars, x and y are vectors and A is an
+ m by n matrix.
+
+ Parameters
+ ==========
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+
+ TRANS = 'C' or 'c' y := alpha*conjg( A' )*x + beta*y.
+
+ Unchanged on exit.
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - COMPLEX array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+ X - COMPLEX array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - COMPLEX .
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - COMPLEX array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+
+ updated vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(trans, "N") && ! lsame_(trans, "T") && !
+ lsame_(trans, "C")) {
+ info = 1;
+ } else if (*m < 0) {
+ info = 2;
+ } else if (*n < 0) {
+ info = 3;
+ } else if (*lda < max(1,*m)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ } else if (*incy == 0) {
+ info = 11;
+ }
+ if (info != 0) {
+ xerbla_("CGEMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || alpha->r == 0.f && alpha->i == 0.f && (beta->r
+ == 1.f && beta->i == 0.f)) {
+ return 0;
+ }
+
+ noconj = lsame_(trans, "T");
+
+/* Set LENX and LENY, the lengths of the vectors x and y, and set
+
+ up the start points in X and Y. */
+
+ if (lsame_(trans, "N")) {
+ lenx = *n;
+ leny = *m;
+ } else {
+ lenx = *m;
+ leny = *n;
+ }
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (lenx - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (leny - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A.
+
+ First form y := beta*y. */
+
+ if (beta->r != 1.f || beta->i != 0.f) {
+ if (*incy == 1) {
+ if (beta->r == 0.f && beta->i == 0.f) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = i;
+ Y(i).r = 0.f, Y(i).i = 0.f;
+/* L10: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = i;
+ i__3 = i;
+ q__1.r = beta->r * Y(i).r - beta->i * Y(i).i,
+ q__1.i = beta->r * Y(i).i + beta->i * Y(i)
+ .r;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (beta->r == 0.f && beta->i == 0.f) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = iy;
+ Y(iy).r = 0.f, Y(iy).i = 0.f;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ q__1.r = beta->r * Y(iy).r - beta->i * Y(iy).i,
+ q__1.i = beta->r * Y(iy).i + beta->i * Y(iy)
+ .r;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (alpha->r == 0.f && alpha->i == 0.f) {
+ return 0;
+ }
+ if (lsame_(trans, "N")) {
+
+/* Form y := alpha*A*x + y. */
+
+ jx = kx;
+ if (*incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ if (X(jx).r != 0.f || X(jx).i != 0.f) {
+ i__2 = jx;
+ q__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ q__1.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ temp.r = q__1.r, temp.i = q__1.i;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ q__2.i = temp.r * A(i,j).i + temp.i * A(i,j)
+ .r;
+ q__1.r = Y(i).r + q__2.r, q__1.i = Y(i).i +
+ q__2.i;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+/* L50: */
+ }
+ }
+ jx += *incx;
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ if (X(jx).r != 0.f || X(jx).i != 0.f) {
+ i__2 = jx;
+ q__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ q__1.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ temp.r = q__1.r, temp.i = q__1.i;
+ iy = ky;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ q__2.i = temp.r * A(i,j).i + temp.i * A(i,j)
+ .r;
+ q__1.r = Y(iy).r + q__2.r, q__1.i = Y(iy).i +
+ q__2.i;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ iy += *incy;
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y := alpha*A'*x + y or y := alpha*conjg( A' )*x + y.
+ */
+
+ jy = ky;
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp.r = 0.f, temp.i = 0.f;
+ if (noconj) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ q__2.r = A(i,j).r * X(i).r - A(i,j).i * X(i)
+ .i, q__2.i = A(i,j).r * X(i).i + A(i,j)
+ .i * X(i).r;
+ q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+/* L90: */
+ }
+ } else {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = i;
+ q__2.r = q__3.r * X(i).r - q__3.i * X(i).i,
+ q__2.i = q__3.r * X(i).i + q__3.i * X(i)
+ .r;
+ q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+/* L100: */
+ }
+ }
+ i__2 = jy;
+ i__3 = jy;
+ q__2.r = alpha->r * temp.r - alpha->i * temp.i, q__2.i =
+ alpha->r * temp.i + alpha->i * temp.r;
+ q__1.r = Y(jy).r + q__2.r, q__1.i = Y(jy).i + q__2.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ jy += *incy;
+/* L110: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp.r = 0.f, temp.i = 0.f;
+ ix = kx;
+ if (noconj) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ q__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(ix)
+ .i, q__2.i = A(i,j).r * X(ix).i + A(i,j)
+ .i * X(ix).r;
+ q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix += *incx;
+/* L120: */
+ }
+ } else {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = ix;
+ q__2.r = q__3.r * X(ix).r - q__3.i * X(ix).i,
+ q__2.i = q__3.r * X(ix).i + q__3.i * X(ix)
+ .r;
+ q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix += *incx;
+/* L130: */
+ }
+ }
+ i__2 = jy;
+ i__3 = jy;
+ q__2.r = alpha->r * temp.r - alpha->i * temp.i, q__2.i =
+ alpha->r * temp.i + alpha->i * temp.r;
+ q__1.r = Y(jy).r + q__2.r, q__1.i = Y(jy).i + q__2.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ jy += *incy;
+/* L140: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CGEMV . */
+
+} /* cgemv_ */
+
diff --git a/CBLAS/cgerc.c b/CBLAS/cgerc.c
new file mode 100644
index 0000000..6c317b2
--- /dev/null
+++ b/CBLAS/cgerc.c
@@ -0,0 +1,205 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int cgerc_(integer *m, integer *n, complex *alpha, complex *
+ x, integer *incx, complex *y, integer *incy, complex *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ complex q__1, q__2;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer info;
+ static complex temp;
+ static integer i, j, ix, jy, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ CGERC performs the rank 1 operation
+
+ A := alpha*x*conjg( y' ) + A,
+
+ where alpha is a scalar, x is an m element vector, y is an n element
+
+ vector and A is an m by n matrix.
+
+ Parameters
+ ==========
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - COMPLEX array of dimension at least
+ ( 1 + ( m - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the m
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - COMPLEX array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - COMPLEX array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients. On exit, A is
+ overwritten by the updated matrix.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (*m < 0) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*m)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("CGERC ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || alpha->r == 0.f && alpha->i == 0.f) {
+ return 0;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (*incy > 0) {
+ jy = 1;
+ } else {
+ jy = 1 - (*n - 1) * *incy;
+ }
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jy;
+ if (Y(jy).r != 0.f || Y(jy).i != 0.f) {
+ r_cnjg(&q__2, &Y(jy));
+ q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
+ alpha->r * q__2.i + alpha->i * q__2.r;
+ temp.r = q__1.r, temp.i = q__1.i;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = i;
+ q__2.r = X(i).r * temp.r - X(i).i * temp.i, q__2.i =
+ X(i).r * temp.i + X(i).i * temp.r;
+ q__1.r = A(i,j).r + q__2.r, q__1.i = A(i,j).i + q__2.i;
+ A(i,j).r = q__1.r, A(i,j).i = q__1.i;
+/* L10: */
+ }
+ }
+ jy += *incy;
+/* L20: */
+ }
+ } else {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*m - 1) * *incx;
+ }
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jy;
+ if (Y(jy).r != 0.f || Y(jy).i != 0.f) {
+ r_cnjg(&q__2, &Y(jy));
+ q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
+ alpha->r * q__2.i + alpha->i * q__2.r;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix = kx;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = ix;
+ q__2.r = X(ix).r * temp.r - X(ix).i * temp.i, q__2.i =
+ X(ix).r * temp.i + X(ix).i * temp.r;
+ q__1.r = A(i,j).r + q__2.r, q__1.i = A(i,j).i + q__2.i;
+ A(i,j).r = q__1.r, A(i,j).i = q__1.i;
+ ix += *incx;
+/* L30: */
+ }
+ }
+ jy += *incy;
+/* L40: */
+ }
+ }
+
+ return 0;
+
+/* End of CGERC . */
+
+} /* cgerc_ */
+
diff --git a/CBLAS/chemv.c b/CBLAS/chemv.c
new file mode 100644
index 0000000..2299694
--- /dev/null
+++ b/CBLAS/chemv.c
@@ -0,0 +1,421 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int chemv_(char *uplo, integer *n, complex *alpha, complex *
+ a, integer *lda, complex *x, integer *incx, complex *beta, complex *y,
+ integer *incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ doublereal d__1;
+ complex q__1, q__2, q__3, q__4;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer info;
+ static complex temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ CHEMV performs the matrix-vector operation
+
+ y := alpha*A*x + beta*y,
+
+ where alpha and beta are scalars, x and y are n element vectors and
+ A is an n by n hermitian matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - COMPLEX array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the hermitian matrix and the strictly
+ lower triangular part of A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the hermitian matrix and the strictly
+ upper triangular part of A is not referenced.
+ Note that the imaginary parts of the diagonal elements need
+
+ not be set and are assumed to be zero.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - COMPLEX array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - COMPLEX .
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - COMPLEX array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y. On exit, Y is overwritten by the updated
+ vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*lda < max(1,*n)) {
+ info = 5;
+ } else if (*incx == 0) {
+ info = 7;
+ } else if (*incy == 0) {
+ info = 10;
+ }
+ if (info != 0) {
+ xerbla_("CHEMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || alpha->r == 0.f && alpha->i == 0.f && (beta->r == 1.f &&
+ beta->i == 0.f)) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y. */
+
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A.
+
+ First form y := beta*y. */
+
+ if (beta->r != 1.f || beta->i != 0.f) {
+ if (*incy == 1) {
+ if (beta->r == 0.f && beta->i == 0.f) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ Y(i).r = 0.f, Y(i).i = 0.f;
+/* L10: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ q__1.r = beta->r * Y(i).r - beta->i * Y(i).i,
+ q__1.i = beta->r * Y(i).i + beta->i * Y(i)
+ .r;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (beta->r == 0.f && beta->i == 0.f) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ Y(iy).r = 0.f, Y(iy).i = 0.f;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ q__1.r = beta->r * Y(iy).r - beta->i * Y(iy).i,
+ q__1.i = beta->r * Y(iy).i + beta->i * Y(iy)
+ .r;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (alpha->r == 0.f && alpha->i == 0.f) {
+ return 0;
+ }
+ if (lsame_(uplo, "U")) {
+
+/* Form y when A is stored in upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ q__1.r = alpha->r * X(j).r - alpha->i * X(j).i, q__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(i).r + q__2.r, q__1.i = Y(i).i + q__2.i;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = i;
+ q__2.r = q__3.r * X(i).r - q__3.i * X(i).i, q__2.i =
+ q__3.r * X(i).i + q__3.i * X(i).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+/* L50: */
+ }
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ q__3.r = d__1 * temp1.r, q__3.i = d__1 * temp1.i;
+ q__2.r = Y(j).r + q__3.r, q__2.i = Y(j).i + q__3.i;
+ q__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ Y(j).r = q__1.r, Y(j).i = q__1.i;
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ q__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, q__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(iy).r + q__2.r, q__1.i = Y(iy).i + q__2.i;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = ix;
+ q__2.r = q__3.r * X(ix).r - q__3.i * X(ix).i, q__2.i =
+ q__3.r * X(ix).i + q__3.i * X(ix).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ q__3.r = d__1 * temp1.r, q__3.i = d__1 * temp1.i;
+ q__2.r = Y(jy).r + q__3.r, q__2.i = Y(jy).i + q__3.i;
+ q__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y when A is stored in lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ q__1.r = alpha->r * X(j).r - alpha->i * X(j).i, q__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ q__2.r = d__1 * temp1.r, q__2.i = d__1 * temp1.i;
+ q__1.r = Y(j).r + q__2.r, q__1.i = Y(j).i + q__2.i;
+ Y(j).r = q__1.r, Y(j).i = q__1.i;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(i).r + q__2.r, q__1.i = Y(i).i + q__2.i;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = i;
+ q__2.r = q__3.r * X(i).r - q__3.i * X(i).i, q__2.i =
+ q__3.r * X(i).i + q__3.i * X(i).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+/* L90: */
+ }
+ i__2 = j;
+ i__3 = j;
+ q__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = Y(j).r + q__2.r, q__1.i = Y(j).i + q__2.i;
+ Y(j).r = q__1.r, Y(j).i = q__1.i;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ q__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, q__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ q__2.r = d__1 * temp1.r, q__2.i = d__1 * temp1.i;
+ q__1.r = Y(jy).r + q__2.r, q__1.i = Y(jy).i + q__2.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(iy).r + q__2.r, q__1.i = Y(iy).i + q__2.i;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = ix;
+ q__2.r = q__3.r * X(ix).r - q__3.i * X(ix).i, q__2.i =
+ q__3.r * X(ix).i + q__3.i * X(ix).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+/* L110: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ q__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = Y(jy).r + q__2.r, q__1.i = Y(jy).i + q__2.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CHEMV . */
+
+} /* chemv_ */
+
diff --git a/CBLAS/cher2.c b/CBLAS/cher2.c
new file mode 100644
index 0000000..0b52d2e
--- /dev/null
+++ b/CBLAS/cher2.c
@@ -0,0 +1,436 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int cher2_(char *uplo, integer *n, complex *alpha, complex *
+ x, integer *incx, complex *y, integer *incy, complex *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+ doublereal d__1;
+ complex q__1, q__2, q__3, q__4;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer info;
+ static complex temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ CHER2 performs the hermitian rank 2 operation
+
+ A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,
+
+ where alpha is a scalar, x and y are n element vectors and A is an n
+
+ by n hermitian matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - COMPLEX array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - COMPLEX array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - COMPLEX array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the hermitian matrix and the strictly
+ lower triangular part of A is not referenced. On exit, the
+ upper triangular part of the array A is overwritten by the
+ upper triangular part of the updated matrix.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the hermitian matrix and the strictly
+ upper triangular part of A is not referenced. On exit, the
+ lower triangular part of the array A is overwritten by the
+ lower triangular part of the updated matrix.
+ Note that the imaginary parts of the diagonal elements need
+
+ not be set, they are assumed to be zero, and on exit they
+ are set to zero.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*n)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("CHER2 ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || alpha->r == 0.f && alpha->i == 0.f) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y if the increments are not both
+
+ unity. */
+
+ if (*incx != 1 || *incy != 1) {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+ jx = kx;
+ jy = ky;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A. */
+
+ if (lsame_(uplo, "U")) {
+
+/* Form A when A is stored in the upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ i__3 = j;
+ if (X(j).r != 0.f || X(j).i != 0.f || (Y(j).r != 0.f
+ || Y(j).i != 0.f)) {
+ r_cnjg(&q__2, &Y(j));
+ q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
+ alpha->r * q__2.i + alpha->i * q__2.r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ i__2 = j;
+ q__2.r = alpha->r * X(j).r - alpha->i * X(j).i,
+ q__2.i = alpha->r * X(j).i + alpha->i * X(j)
+ .r;
+ r_cnjg(&q__1, &q__2);
+ temp2.r = q__1.r, temp2.i = q__1.i;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = i;
+ q__3.r = X(i).r * temp1.r - X(i).i * temp1.i,
+ q__3.i = X(i).r * temp1.i + X(i).i *
+ temp1.r;
+ q__2.r = A(i,j).r + q__3.r, q__2.i = A(i,j).i +
+ q__3.i;
+ i__6 = i;
+ q__4.r = Y(i).r * temp2.r - Y(i).i * temp2.i,
+ q__4.i = Y(i).r * temp2.i + Y(i).i *
+ temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ A(i,j).r = q__1.r, A(i,j).i = q__1.i;
+/* L10: */
+ }
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = j;
+ q__2.r = X(j).r * temp1.r - X(j).i * temp1.i,
+ q__2.i = X(j).r * temp1.i + X(j).i *
+ temp1.r;
+ i__5 = j;
+ q__3.r = Y(j).r * temp2.r - Y(j).i * temp2.i,
+ q__3.i = Y(j).r * temp2.i + Y(j).i *
+ temp2.r;
+ q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
+ d__1 = A(j,j).r + q__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ }
+/* L20: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ i__3 = jy;
+ if (X(jx).r != 0.f || X(jx).i != 0.f || (Y(jy).r != 0.f
+ || Y(jy).i != 0.f)) {
+ r_cnjg(&q__2, &Y(jy));
+ q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
+ alpha->r * q__2.i + alpha->i * q__2.r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ i__2 = jx;
+ q__2.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ q__2.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ r_cnjg(&q__1, &q__2);
+ temp2.r = q__1.r, temp2.i = q__1.i;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = ix;
+ q__3.r = X(ix).r * temp1.r - X(ix).i * temp1.i,
+ q__3.i = X(ix).r * temp1.i + X(ix).i *
+ temp1.r;
+ q__2.r = A(i,j).r + q__3.r, q__2.i = A(i,j).i +
+ q__3.i;
+ i__6 = iy;
+ q__4.r = Y(iy).r * temp2.r - Y(iy).i * temp2.i,
+ q__4.i = Y(iy).r * temp2.i + Y(iy).i *
+ temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ A(i,j).r = q__1.r, A(i,j).i = q__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L30: */
+ }
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = jx;
+ q__2.r = X(jx).r * temp1.r - X(jx).i * temp1.i,
+ q__2.i = X(jx).r * temp1.i + X(jx).i *
+ temp1.r;
+ i__5 = jy;
+ q__3.r = Y(jy).r * temp2.r - Y(jy).i * temp2.i,
+ q__3.i = Y(jy).r * temp2.i + Y(jy).i *
+ temp2.r;
+ q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
+ d__1 = A(j,j).r + q__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ }
+ jx += *incx;
+ jy += *incy;
+/* L40: */
+ }
+ }
+ } else {
+
+/* Form A when A is stored in the lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ i__3 = j;
+ if (X(j).r != 0.f || X(j).i != 0.f || (Y(j).r != 0.f
+ || Y(j).i != 0.f)) {
+ r_cnjg(&q__2, &Y(j));
+ q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
+ alpha->r * q__2.i + alpha->i * q__2.r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ i__2 = j;
+ q__2.r = alpha->r * X(j).r - alpha->i * X(j).i,
+ q__2.i = alpha->r * X(j).i + alpha->i * X(j)
+ .r;
+ r_cnjg(&q__1, &q__2);
+ temp2.r = q__1.r, temp2.i = q__1.i;
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = j;
+ q__2.r = X(j).r * temp1.r - X(j).i * temp1.i,
+ q__2.i = X(j).r * temp1.i + X(j).i *
+ temp1.r;
+ i__5 = j;
+ q__3.r = Y(j).r * temp2.r - Y(j).i * temp2.i,
+ q__3.i = Y(j).r * temp2.i + Y(j).i *
+ temp2.r;
+ q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
+ d__1 = A(j,j).r + q__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = i;
+ q__3.r = X(i).r * temp1.r - X(i).i * temp1.i,
+ q__3.i = X(i).r * temp1.i + X(i).i *
+ temp1.r;
+ q__2.r = A(i,j).r + q__3.r, q__2.i = A(i,j).i +
+ q__3.i;
+ i__6 = i;
+ q__4.r = Y(i).r * temp2.r - Y(i).i * temp2.i,
+ q__4.i = Y(i).r * temp2.i + Y(i).i *
+ temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ A(i,j).r = q__1.r, A(i,j).i = q__1.i;
+/* L50: */
+ }
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ }
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ i__3 = jy;
+ if (X(jx).r != 0.f || X(jx).i != 0.f || (Y(jy).r != 0.f
+ || Y(jy).i != 0.f)) {
+ r_cnjg(&q__2, &Y(jy));
+ q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
+ alpha->r * q__2.i + alpha->i * q__2.r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ i__2 = jx;
+ q__2.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ q__2.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ r_cnjg(&q__1, &q__2);
+ temp2.r = q__1.r, temp2.i = q__1.i;
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = jx;
+ q__2.r = X(jx).r * temp1.r - X(jx).i * temp1.i,
+ q__2.i = X(jx).r * temp1.i + X(jx).i *
+ temp1.r;
+ i__5 = jy;
+ q__3.r = Y(jy).r * temp2.r - Y(jy).i * temp2.i,
+ q__3.i = Y(jy).r * temp2.i + Y(jy).i *
+ temp2.r;
+ q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
+ d__1 = A(j,j).r + q__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = ix;
+ q__3.r = X(ix).r * temp1.r - X(ix).i * temp1.i,
+ q__3.i = X(ix).r * temp1.i + X(ix).i *
+ temp1.r;
+ q__2.r = A(i,j).r + q__3.r, q__2.i = A(i,j).i +
+ q__3.i;
+ i__6 = iy;
+ q__4.r = Y(iy).r * temp2.r - Y(iy).i * temp2.i,
+ q__4.i = Y(iy).r * temp2.i + Y(iy).i *
+ temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ A(i,j).r = q__1.r, A(i,j).i = q__1.i;
+/* L70: */
+ }
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.f;
+ }
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CHER2 . */
+
+} /* cher2_ */
+
diff --git a/CBLAS/cmyblas2.c b/CBLAS/cmyblas2.c
new file mode 100644
index 0000000..74fdbca
--- /dev/null
+++ b/CBLAS/cmyblas2.c
@@ -0,0 +1,183 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: cmyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+#include "scomplex.h"
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void clsolve ( int ldm, int ncol, complex *M, complex *rhs )
+{
+ int k;
+ complex x0, x1, x2, x3, temp;
+ complex *M0;
+ complex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x1, &rhs[firstcol+1], &temp);
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x2, &rhs[firstcol+2], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&x2, &x2, &temp);
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x3, &rhs[firstcol+3], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&x3, &x3, &temp);
+ cc_mult(&temp, &x2, Mki2); Mki2++;
+ c_sub(&x3, &x3, &temp);
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x2, Mki2); Mki2++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x3, Mki3); Mki3++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ }
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x1, &rhs[firstcol+1], &temp);
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ }
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+cusolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+complex *M; /* in */
+complex *rhs; /* modified */
+{
+ complex xj, temp;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ c_div(&xj, &rhs[jcol], &M[jcol + jcol*ldm]); /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++) {
+ cc_mult(&temp, &xj, &M[irow+jcol*ldm]); /* M(irow, jcol) */
+ c_sub(&rhs[irow], &rhs[irow], &temp);
+ }
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void cmatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+complex *M; /* in */
+complex *vec; /* in */
+complex *Mxvec; /* in/out */
+{
+ complex vi0, vi1, vi2, vi3;
+ complex *M0, temp;
+ complex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ cc_mult(&temp, &vi0, Mki0); Mki0++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ cc_mult(&temp, &vi1, Mki1); Mki1++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ cc_mult(&temp, &vi2, Mki2); Mki2++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ cc_mult(&temp, &vi3, Mki3); Mki3++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ cc_mult(&temp, &vi0, Mki0); Mki0++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+ M0 += ldm;
+ }
+
+}
+
diff --git a/CBLAS/cscal.c b/CBLAS/cscal.c
new file mode 100644
index 0000000..8cc5173
--- /dev/null
+++ b/CBLAS/cscal.c
@@ -0,0 +1,70 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int cscal_(integer *n, complex *ca, complex *cx, integer *
+ incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4;
+ complex q__1;
+
+ /* Local variables */
+ static integer i, nincx;
+
+
+/* scales a vector by a constant.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define CX(I) cx[(I)-1]
+
+
+ if (*n <= 0 || *incx <= 0) {
+ return 0;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+ i__3 = i;
+ i__4 = i;
+ q__1.r = ca->r * CX(i).r - ca->i * CX(i).i, q__1.i = ca->r * CX(
+ i).i + ca->i * CX(i).r;
+ CX(i).r = q__1.r, CX(i).i = q__1.i;
+/* L10: */
+ }
+ return 0;
+
+/* code for increment equal to 1 */
+
+L20:
+ i__2 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__1 = i;
+ i__3 = i;
+ q__1.r = ca->r * CX(i).r - ca->i * CX(i).i, q__1.i = ca->r * CX(
+ i).i + ca->i * CX(i).r;
+ CX(i).r = q__1.r, CX(i).i = q__1.i;
+/* L30: */
+ }
+ return 0;
+} /* cscal_ */
+
diff --git a/CBLAS/ctrsv.c b/CBLAS/ctrsv.c
new file mode 100644
index 0000000..9280ec9
--- /dev/null
+++ b/CBLAS/ctrsv.c
@@ -0,0 +1,509 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int ctrsv_(char *uplo, char *trans, char *diag, integer *n,
+ complex *a, integer *lda, complex *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ void c_div(complex *, complex *, complex *), r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer info;
+ static complex temp;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, jx, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical noconj, nounit;
+
+
+/* Purpose
+ =======
+
+ CTRSV solves one of the systems of equations
+
+ A*x = b, or A'*x = b, or conjg( A' )*x = b,
+
+ where b and x are n element vectors and A is an n by n unit, or
+ non-unit, upper or lower triangular matrix.
+
+ No test for singularity or near-singularity is included in this
+ routine. Such tests must be performed before calling this routine.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the matrix is an upper or
+ lower triangular matrix as follows:
+
+ UPLO = 'U' or 'u' A is an upper triangular matrix.
+
+ UPLO = 'L' or 'l' A is a lower triangular matrix.
+
+ Unchanged on exit.
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the equations to be solved as
+ follows:
+
+ TRANS = 'N' or 'n' A*x = b.
+
+ TRANS = 'T' or 't' A'*x = b.
+
+ TRANS = 'C' or 'c' conjg( A' )*x = b.
+
+ Unchanged on exit.
+
+ DIAG - CHARACTER*1.
+ On entry, DIAG specifies whether or not A is unit
+ triangular as follows:
+
+ DIAG = 'U' or 'u' A is assumed to be unit triangular.
+
+ DIAG = 'N' or 'n' A is not assumed to be unit
+ triangular.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ A - COMPLEX array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular matrix and the strictly lower triangular part of
+
+ A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular matrix and the strictly upper triangular part of
+
+ A is not referenced.
+ Note that when DIAG = 'U' or 'u', the diagonal elements of
+
+ A are not referenced either, but are assumed to be unity.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - COMPLEX array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element right-hand side vector b. On exit, X is overwritten
+
+ with the solution vector x.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (! lsame_(trans, "N") && ! lsame_(trans, "T") &&
+ ! lsame_(trans, "C")) {
+ info = 2;
+ } else if (! lsame_(diag, "U") && ! lsame_(diag, "N")) {
+ info = 3;
+ } else if (*n < 0) {
+ info = 4;
+ } else if (*lda < max(1,*n)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ }
+ if (info != 0) {
+ xerbla_("CTRSV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+ noconj = lsame_(trans, "T");
+ nounit = lsame_(diag, "N");
+
+/* Set up the start point in X if the increment is not unity. This
+ will be ( N - 1 )*INCX too small for descending loops. */
+
+ if (*incx <= 0) {
+ kx = 1 - (*n - 1) * *incx;
+ } else if (*incx != 1) {
+ kx = 1;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (lsame_(trans, "N")) {
+
+/* Form x := inv( A )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ i__1 = j;
+ if (X(j).r != 0.f || X(j).i != 0.f) {
+ if (nounit) {
+ i__1 = j;
+ c_div(&q__1, &X(j), &A(j,j));
+ X(j).r = q__1.r, X(j).i = q__1.i;
+ }
+ i__1 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ for (i = j - 1; i >= 1; --i) {
+ i__1 = i;
+ i__2 = i;
+ i__3 = i + j * a_dim1;
+ q__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ q__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ q__1.r = X(i).r - q__2.r, q__1.i = X(i).i -
+ q__2.i;
+ X(i).r = q__1.r, X(i).i = q__1.i;
+/* L10: */
+ }
+ }
+/* L20: */
+ }
+ } else {
+ jx = kx + (*n - 1) * *incx;
+ for (j = *n; j >= 1; --j) {
+ i__1 = jx;
+ if (X(jx).r != 0.f || X(jx).i != 0.f) {
+ if (nounit) {
+ i__1 = jx;
+ c_div(&q__1, &X(jx), &A(j,j));
+ X(jx).r = q__1.r, X(jx).i = q__1.i;
+ }
+ i__1 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ ix = jx;
+ for (i = j - 1; i >= 1; --i) {
+ ix -= *incx;
+ i__1 = ix;
+ i__2 = ix;
+ i__3 = i + j * a_dim1;
+ q__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ q__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ q__1.r = X(ix).r - q__2.r, q__1.i = X(ix).i -
+ q__2.i;
+ X(ix).r = q__1.r, X(ix).i = q__1.i;
+/* L30: */
+ }
+ }
+ jx -= *incx;
+/* L40: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ if (X(j).r != 0.f || X(j).i != 0.f) {
+ if (nounit) {
+ i__2 = j;
+ c_div(&q__1, &X(j), &A(j,j));
+ X(j).r = q__1.r, X(j).i = q__1.i;
+ }
+ i__2 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ q__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ q__1.r = X(i).r - q__2.r, q__1.i = X(i).i -
+ q__2.i;
+ X(i).r = q__1.r, X(i).i = q__1.i;
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ if (X(jx).r != 0.f || X(jx).i != 0.f) {
+ if (nounit) {
+ i__2 = jx;
+ c_div(&q__1, &X(jx), &A(j,j));
+ X(jx).r = q__1.r, X(jx).i = q__1.i;
+ }
+ i__2 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ ix = jx;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ i__3 = ix;
+ i__4 = ix;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ q__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ q__1.r = X(ix).r - q__2.r, q__1.i = X(ix).i -
+ q__2.i;
+ X(ix).r = q__1.r, X(ix).i = q__1.i;
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ }
+ } else {
+
+/* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ if (noconj) {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ q__2.r = A(i,j).r * X(i).r - A(i,j).i * X(
+ i).i, q__2.i = A(i,j).r * X(i).i +
+ A(i,j).i * X(i).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+/* L90: */
+ }
+ if (nounit) {
+ c_div(&q__1, &temp, &A(j,j));
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ } else {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = i;
+ q__2.r = q__3.r * X(i).r - q__3.i * X(i).i,
+ q__2.i = q__3.r * X(i).i + q__3.i * X(
+ i).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+/* L100: */
+ }
+ if (nounit) {
+ r_cnjg(&q__2, &A(j,j));
+ c_div(&q__1, &temp, &q__2);
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ }
+ i__2 = j;
+ X(j).r = temp.r, X(j).i = temp.i;
+/* L110: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ ix = kx;
+ i__2 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ if (noconj) {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ q__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(
+ ix).i, q__2.i = A(i,j).r * X(ix).i +
+ A(i,j).i * X(ix).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix += *incx;
+/* L120: */
+ }
+ if (nounit) {
+ c_div(&q__1, &temp, &A(j,j));
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ } else {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ r_cnjg(&q__3, &A(i,j));
+ i__3 = ix;
+ q__2.r = q__3.r * X(ix).r - q__3.i * X(ix).i,
+ q__2.i = q__3.r * X(ix).i + q__3.i * X(
+ ix).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix += *incx;
+/* L130: */
+ }
+ if (nounit) {
+ r_cnjg(&q__2, &A(j,j));
+ c_div(&q__1, &temp, &q__2);
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ }
+ i__2 = jx;
+ X(jx).r = temp.r, X(jx).i = temp.i;
+ jx += *incx;
+/* L140: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ i__1 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ if (noconj) {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ i__2 = i + j * a_dim1;
+ i__3 = i;
+ q__2.r = A(i,j).r * X(i).r - A(i,j).i * X(
+ i).i, q__2.i = A(i,j).r * X(i).i +
+ A(i,j).i * X(i).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+/* L150: */
+ }
+ if (nounit) {
+ c_div(&q__1, &temp, &A(j,j));
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ } else {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ r_cnjg(&q__3, &A(i,j));
+ i__2 = i;
+ q__2.r = q__3.r * X(i).r - q__3.i * X(i).i,
+ q__2.i = q__3.r * X(i).i + q__3.i * X(
+ i).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+/* L160: */
+ }
+ if (nounit) {
+ r_cnjg(&q__2, &A(j,j));
+ c_div(&q__1, &temp, &q__2);
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ }
+ i__1 = j;
+ X(j).r = temp.r, X(j).i = temp.i;
+/* L170: */
+ }
+ } else {
+ kx += (*n - 1) * *incx;
+ jx = kx;
+ for (j = *n; j >= 1; --j) {
+ ix = kx;
+ i__1 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ if (noconj) {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ i__2 = i + j * a_dim1;
+ i__3 = ix;
+ q__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(
+ ix).i, q__2.i = A(i,j).r * X(ix).i +
+ A(i,j).i * X(ix).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix -= *incx;
+/* L180: */
+ }
+ if (nounit) {
+ c_div(&q__1, &temp, &A(j,j));
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ } else {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ r_cnjg(&q__3, &A(i,j));
+ i__2 = ix;
+ q__2.r = q__3.r * X(ix).r - q__3.i * X(ix).i,
+ q__2.i = q__3.r * X(ix).i + q__3.i * X(
+ ix).r;
+ q__1.r = temp.r - q__2.r, q__1.i = temp.i -
+ q__2.i;
+ temp.r = q__1.r, temp.i = q__1.i;
+ ix -= *incx;
+/* L190: */
+ }
+ if (nounit) {
+ r_cnjg(&q__2, &A(j,j));
+ c_div(&q__1, &temp, &q__2);
+ temp.r = q__1.r, temp.i = q__1.i;
+ }
+ }
+ i__1 = jx;
+ X(jx).r = temp.r, X(jx).i = temp.i;
+ jx -= *incx;
+/* L200: */
+ }
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CTRSV . */
+
+} /* ctrsv_ */
+
diff --git a/CBLAS/dasum.c b/CBLAS/dasum.c
new file mode 100644
index 0000000..42d1c74
--- /dev/null
+++ b/CBLAS/dasum.c
@@ -0,0 +1,88 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dasum_(integer *n, doublereal *dx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2;
+ doublereal ret_val, d__1, d__2, d__3, d__4, d__5, d__6;
+
+ /* Local variables */
+ static integer i, m;
+ static doublereal dtemp;
+ static integer nincx, mp1;
+
+
+/* takes the sum of the absolute values.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DX(I) dx[(I)-1]
+
+
+ ret_val = 0.;
+ dtemp = 0.;
+ if (*n <= 0 || *incx <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+ dtemp += (d__1 = DX(i), abs(d__1));
+/* L10: */
+ }
+ ret_val = dtemp;
+ return ret_val;
+
+/* code for increment equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 6;
+ if (m == 0) {
+ goto L40;
+ }
+ i__2 = m;
+ for (i = 1; i <= m; ++i) {
+ dtemp += (d__1 = DX(i), abs(d__1));
+/* L30: */
+ }
+ if (*n < 6) {
+ goto L60;
+ }
+L40:
+ mp1 = m + 1;
+ i__2 = *n;
+ for (i = mp1; i <= *n; i += 6) {
+ dtemp = dtemp + (d__1 = DX(i), abs(d__1)) + (d__2 = DX(i + 1), abs(
+ d__2)) + (d__3 = DX(i + 2), abs(d__3)) + (d__4 = DX(i + 3),
+ abs(d__4)) + (d__5 = DX(i + 4), abs(d__5)) + (d__6 = DX(i + 5)
+ , abs(d__6));
+/* L50: */
+ }
+L60:
+ ret_val = dtemp;
+ return ret_val;
+} /* dasum_ */
+
diff --git a/CBLAS/daxpy.c b/CBLAS/daxpy.c
new file mode 100644
index 0000000..953ae62
--- /dev/null
+++ b/CBLAS/daxpy.c
@@ -0,0 +1,94 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int daxpy_(integer *n, doublereal *da, doublereal *dx,
+ integer *incx, doublereal *dy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer i, m, ix, iy, mp1;
+
+
+/* constant times a vector plus a vector.
+ uses unrolled loops for increments equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DY(I) dy[(I)-1]
+#define DX(I) dx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*da == 0.) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ DY(iy) += *da * DX(ix);
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 4;
+ if (m == 0) {
+ goto L40;
+ }
+ i__1 = m;
+ for (i = 1; i <= m; ++i) {
+ DY(i) += *da * DX(i);
+/* L30: */
+ }
+ if (*n < 4) {
+ return 0;
+ }
+L40:
+ mp1 = m + 1;
+ i__1 = *n;
+ for (i = mp1; i <= *n; i += 4) {
+ DY(i) += *da * DX(i);
+ DY(i + 1) += *da * DX(i + 1);
+ DY(i + 2) += *da * DX(i + 2);
+ DY(i + 3) += *da * DX(i + 3);
+/* L50: */
+ }
+ return 0;
+} /* daxpy_ */
+
diff --git a/CBLAS/dcabs1.c b/CBLAS/dcabs1.c
new file mode 100644
index 0000000..f4f9f77
--- /dev/null
+++ b/CBLAS/dcabs1.c
@@ -0,0 +1,28 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dcabs1_(doublecomplex *z)
+{
+/* >>Start of File<<
+
+ System generated locals */
+ doublereal ret_val;
+ static doublecomplex equiv_0[1];
+
+ /* Local variables */
+#define t ((doublereal *)equiv_0)
+#define zz (equiv_0)
+
+ zz->r = z->r, zz->i = z->i;
+ ret_val = abs(t[0]) + abs(t[1]);
+ return ret_val;
+} /* dcabs1_ */
+
+#undef zz
+#undef t
+
+
diff --git a/CBLAS/dcopy.c b/CBLAS/dcopy.c
new file mode 100644
index 0000000..a428b8f
--- /dev/null
+++ b/CBLAS/dcopy.c
@@ -0,0 +1,94 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dcopy_(integer *n, doublereal *dx, integer *incx,
+ doublereal *dy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer i, m, ix, iy, mp1;
+
+
+/* copies a vector, x, to a vector, y.
+ uses unrolled loops for increments equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DY(I) dy[(I)-1]
+#define DX(I) dx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ DY(iy) = DX(ix);
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 7;
+ if (m == 0) {
+ goto L40;
+ }
+ i__1 = m;
+ for (i = 1; i <= m; ++i) {
+ DY(i) = DX(i);
+/* L30: */
+ }
+ if (*n < 7) {
+ return 0;
+ }
+L40:
+ mp1 = m + 1;
+ i__1 = *n;
+ for (i = mp1; i <= *n; i += 7) {
+ DY(i) = DX(i);
+ DY(i + 1) = DX(i + 1);
+ DY(i + 2) = DX(i + 2);
+ DY(i + 3) = DX(i + 3);
+ DY(i + 4) = DX(i + 4);
+ DY(i + 5) = DX(i + 5);
+ DY(i + 6) = DX(i + 6);
+/* L50: */
+ }
+ return 0;
+} /* dcopy_ */
+
diff --git a/CBLAS/ddot.c b/CBLAS/ddot.c
new file mode 100644
index 0000000..10ed2b6
--- /dev/null
+++ b/CBLAS/ddot.c
@@ -0,0 +1,97 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal ddot_(integer *n, doublereal *dx, integer *incx, doublereal *dy,
+ integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+ doublereal ret_val;
+
+ /* Local variables */
+ static integer i, m;
+ static doublereal dtemp;
+ static integer ix, iy, mp1;
+
+
+/* forms the dot product of two vectors.
+ uses unrolled loops for increments equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DY(I) dy[(I)-1]
+#define DX(I) dx[(I)-1]
+
+
+ ret_val = 0.;
+ dtemp = 0.;
+ if (*n <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ dtemp += DX(ix) * DY(iy);
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ ret_val = dtemp;
+ return ret_val;
+
+/* code for both increments equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 5;
+ if (m == 0) {
+ goto L40;
+ }
+ i__1 = m;
+ for (i = 1; i <= m; ++i) {
+ dtemp += DX(i) * DY(i);
+/* L30: */
+ }
+ if (*n < 5) {
+ goto L60;
+ }
+L40:
+ mp1 = m + 1;
+ i__1 = *n;
+ for (i = mp1; i <= *n; i += 5) {
+ dtemp = dtemp + DX(i) * DY(i) + DX(i + 1) * DY(i + 1) + DX(i + 2) *
+ DY(i + 2) + DX(i + 3) * DY(i + 3) + DX(i + 4) * DY(i + 4);
+/* L50: */
+ }
+L60:
+ ret_val = dtemp;
+ return ret_val;
+} /* ddot_ */
+
diff --git a/CBLAS/dgemv.c b/CBLAS/dgemv.c
new file mode 100644
index 0000000..e82bb65
--- /dev/null
+++ b/CBLAS/dgemv.c
@@ -0,0 +1,299 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dgemv_(char *trans, integer *m, integer *n, doublereal *
+ alpha, doublereal *a, integer *lda, doublereal *x, integer *incx,
+ doublereal *beta, doublereal *y, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static doublereal temp;
+ static integer lenx, leny, i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ DGEMV performs one of the matrix-vector operations
+
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+
+ where alpha and beta are scalars, x and y are vectors and A is an
+ m by n matrix.
+
+ Parameters
+ ==========
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ Unchanged on exit.
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - DOUBLE PRECISION.
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+ X - DOUBLE PRECISION array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - DOUBLE PRECISION.
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - DOUBLE PRECISION array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+
+ updated vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(trans, "N") && ! lsame_(trans, "T") && !
+ lsame_(trans, "C")) {
+ info = 1;
+ } else if (*m < 0) {
+ info = 2;
+ } else if (*n < 0) {
+ info = 3;
+ } else if (*lda < max(1,*m)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ } else if (*incy == 0) {
+ info = 11;
+ }
+ if (info != 0) {
+ xerbla_("DGEMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || *alpha == 0. && *beta == 1.) {
+ return 0;
+ }
+
+/* Set LENX and LENY, the lengths of the vectors x and y, and set
+
+ up the start points in X and Y. */
+
+ if (lsame_(trans, "N")) {
+ lenx = *n;
+ leny = *m;
+ } else {
+ lenx = *m;
+ leny = *n;
+ }
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (lenx - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (leny - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A.
+
+ First form y := beta*y. */
+
+ if (*beta != 1.) {
+ if (*incy == 1) {
+ if (*beta == 0.) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(i) = 0.;
+/* L10: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(i) = *beta * Y(i);
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (*beta == 0.) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(iy) = 0.;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(iy) = *beta * Y(iy);
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (*alpha == 0.) {
+ return 0;
+ }
+ if (lsame_(trans, "N")) {
+
+/* Form y := alpha*A*x + y. */
+
+ jx = kx;
+ if (*incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.) {
+ temp = *alpha * X(jx);
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ Y(i) += temp * A(i,j);
+/* L50: */
+ }
+ }
+ jx += *incx;
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.) {
+ temp = *alpha * X(jx);
+ iy = ky;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ Y(iy) += temp * A(i,j);
+ iy += *incy;
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y := alpha*A'*x + y. */
+
+ jy = ky;
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = 0.;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ temp += A(i,j) * X(i);
+/* L90: */
+ }
+ Y(jy) += *alpha * temp;
+ jy += *incy;
+/* L100: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = 0.;
+ ix = kx;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ temp += A(i,j) * X(ix);
+ ix += *incx;
+/* L110: */
+ }
+ Y(jy) += *alpha * temp;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of DGEMV . */
+
+} /* dgemv_ */
+
diff --git a/CBLAS/dger.c b/CBLAS/dger.c
new file mode 100644
index 0000000..1e85eb0
--- /dev/null
+++ b/CBLAS/dger.c
@@ -0,0 +1,182 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dger_(integer *m, integer *n, doublereal *alpha,
+ doublereal *x, integer *incx, doublereal *y, integer *incy,
+ doublereal *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static doublereal temp;
+ static integer i, j, ix, jy, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ DGER performs the rank 1 operation
+
+ A := alpha*x*y' + A,
+
+ where alpha is a scalar, x is an m element vector, y is an n element
+
+ vector and A is an m by n matrix.
+
+ Parameters
+ ==========
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - DOUBLE PRECISION.
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( m - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the m
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients. On exit, A is
+ overwritten by the updated matrix.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (*m < 0) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*m)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("DGER ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || *alpha == 0.) {
+ return 0;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (*incy > 0) {
+ jy = 1;
+ } else {
+ jy = 1 - (*n - 1) * *incy;
+ }
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (Y(jy) != 0.) {
+ temp = *alpha * Y(jy);
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ A(i,j) += X(i) * temp;
+/* L10: */
+ }
+ }
+ jy += *incy;
+/* L20: */
+ }
+ } else {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*m - 1) * *incx;
+ }
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (Y(jy) != 0.) {
+ temp = *alpha * Y(jy);
+ ix = kx;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ A(i,j) += X(ix) * temp;
+ ix += *incx;
+/* L30: */
+ }
+ }
+ jy += *incy;
+/* L40: */
+ }
+ }
+
+ return 0;
+
+/* End of DGER . */
+
+} /* dger_ */
+
diff --git a/CBLAS/dmyblas2.c b/CBLAS/dmyblas2.c
new file mode 100644
index 0000000..e6bbdd1
--- /dev/null
+++ b/CBLAS/dmyblas2.c
@@ -0,0 +1,225 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: dmyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void dlsolve ( int ldm, int ncol, double *M, double *rhs )
+{
+ int k;
+ double x0, x1, x2, x3, x4, x5, x6, x7;
+ double *M0;
+ register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+ Mki4 = Mki3 + ldm + 1;
+ Mki5 = Mki4 + ldm + 1;
+ Mki6 = Mki5 + ldm + 1;
+ Mki7 = Mki6 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+ x4 = rhs[firstcol+4] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++;
+ x5 = rhs[firstcol+5] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++;
+ x6 = rhs[firstcol+6] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++;
+ x7 = rhs[firstcol+7] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ rhs[++firstcol] = x4;
+ rhs[++firstcol] = x5;
+ rhs[++firstcol] = x6;
+ rhs[++firstcol] = x7;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++
+ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++ - x7 * *Mki7++;
+
+ M0 += 8 * ldm + 8;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++;
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++;
+
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+dusolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+double *M; /* in */
+double *rhs; /* modified */
+{
+ double xj;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ xj = rhs[jcol] / M[jcol + jcol*ldm]; /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++)
+ rhs[irow] -= xj * M[irow + jcol*ldm]; /* M(irow, jcol) */
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void dmatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+double *M; /* in */
+double *vec; /* in */
+double *Mxvec; /* in/out */
+
+{
+ double vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7;
+ double *M0;
+ register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+ Mki4 = Mki3 + ldm;
+ Mki5 = Mki4 + ldm;
+ Mki6 = Mki5 + ldm;
+ Mki7 = Mki6 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ vi4 = vec[firstcol++];
+ vi5 = vec[firstcol++];
+ vi6 = vec[firstcol++];
+ vi7 = vec[firstcol++];
+
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++
+ + vi4 * *Mki4++ + vi5 * *Mki5++
+ + vi6 * *Mki6++ + vi7 * *Mki7++;
+
+ M0 += 8 * ldm;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++ ;
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++;
+
+ M0 += ldm;
+ }
+
+}
+
diff --git a/CBLAS/dnrm2.c b/CBLAS/dnrm2.c
new file mode 100644
index 0000000..602813b
--- /dev/null
+++ b/CBLAS/dnrm2.c
@@ -0,0 +1,83 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dnrm2_(integer *n, doublereal *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2;
+ doublereal ret_val, d__1;
+
+ /* Builtin functions */
+ double sqrt(doublereal);
+
+ /* Local variables */
+ static doublereal norm, scale, absxi;
+ static integer ix;
+ static doublereal ssq;
+
+
+/* DNRM2 returns the euclidean norm of a vector via the function
+ name, so that
+
+ DNRM2 := sqrt( x'*x )
+
+
+
+ -- This version written on 25-October-1982.
+ Modified on 14-October-1993 to inline the call to DLASSQ.
+ Sven Hammarling, Nag Ltd.
+
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+
+ if (*n < 1 || *incx < 1) {
+ norm = 0.;
+ } else if (*n == 1) {
+ norm = abs(X(1));
+ } else {
+ scale = 0.;
+ ssq = 1.;
+/* The following loop is equivalent to this call to the LAPACK
+
+ auxiliary routine:
+ CALL DLASSQ( N, X, INCX, SCALE, SSQ ) */
+
+ i__1 = (*n - 1) * *incx + 1;
+ i__2 = *incx;
+ for (ix = 1; *incx < 0 ? ix >= (*n-1)**incx+1 : ix <= (*n-1)**incx+1; ix += *incx) {
+ if (X(ix) != 0.) {
+ absxi = (d__1 = X(ix), abs(d__1));
+ if (scale < absxi) {
+/* Computing 2nd power */
+ d__1 = scale / absxi;
+ ssq = ssq * (d__1 * d__1) + 1.;
+ scale = absxi;
+ } else {
+/* Computing 2nd power */
+ d__1 = absxi / scale;
+ ssq += d__1 * d__1;
+ }
+ }
+/* L10: */
+ }
+ norm = scale * sqrt(ssq);
+ }
+
+ ret_val = norm;
+ return ret_val;
+
+/* End of DNRM2. */
+
+} /* dnrm2_ */
+
diff --git a/CBLAS/drot.c b/CBLAS/drot.c
new file mode 100644
index 0000000..bc5264b
--- /dev/null
+++ b/CBLAS/drot.c
@@ -0,0 +1,76 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int drot_(integer *n, doublereal *dx, integer *incx,
+ doublereal *dy, integer *incy, doublereal *c, doublereal *s)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer i;
+ static doublereal dtemp;
+ static integer ix, iy;
+
+
+/* applies a plane rotation.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DY(I) dy[(I)-1]
+#define DX(I) dx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments not equal
+ to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ dtemp = *c * DX(ix) + *s * DY(iy);
+ DY(iy) = *c * DY(iy) - *s * DX(ix);
+ DX(ix) = dtemp;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ dtemp = *c * DX(i) + *s * DY(i);
+ DY(i) = *c * DY(i) - *s * DX(i);
+ DX(i) = dtemp;
+/* L30: */
+ }
+ return 0;
+} /* drot_ */
+
diff --git a/CBLAS/dscal.c b/CBLAS/dscal.c
new file mode 100644
index 0000000..2444740
--- /dev/null
+++ b/CBLAS/dscal.c
@@ -0,0 +1,83 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dscal_(integer *n, doublereal *da, doublereal *dx,
+ integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2;
+
+ /* Local variables */
+ static integer i, m, nincx, mp1;
+
+
+/* scales a vector by a constant.
+ uses unrolled loops for increment equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DX(I) dx[(I)-1]
+
+
+ if (*n <= 0 || *incx <= 0) {
+ return 0;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+ DX(i) = *da * DX(i);
+/* L10: */
+ }
+ return 0;
+
+/* code for increment equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 5;
+ if (m == 0) {
+ goto L40;
+ }
+ i__2 = m;
+ for (i = 1; i <= m; ++i) {
+ DX(i) = *da * DX(i);
+/* L30: */
+ }
+ if (*n < 5) {
+ return 0;
+ }
+L40:
+ mp1 = m + 1;
+ i__2 = *n;
+ for (i = mp1; i <= *n; i += 5) {
+ DX(i) = *da * DX(i);
+ DX(i + 1) = *da * DX(i + 1);
+ DX(i + 2) = *da * DX(i + 2);
+ DX(i + 3) = *da * DX(i + 3);
+ DX(i + 4) = *da * DX(i + 4);
+/* L50: */
+ }
+ return 0;
+} /* dscal_ */
+
diff --git a/CBLAS/dsymv.c b/CBLAS/dsymv.c
new file mode 100644
index 0000000..e7416b5
--- /dev/null
+++ b/CBLAS/dsymv.c
@@ -0,0 +1,300 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dsymv_(char *uplo, integer *n, doublereal *alpha,
+ doublereal *a, integer *lda, doublereal *x, integer *incx, doublereal
+ *beta, doublereal *y, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static doublereal temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ DSYMV performs the matrix-vector operation
+
+ y := alpha*A*x + beta*y,
+
+ where alpha and beta are scalars, x and y are n element vectors and
+ A is an n by n symmetric matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - DOUBLE PRECISION.
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the symmetric matrix and the strictly
+ lower triangular part of A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the symmetric matrix and the strictly
+ upper triangular part of A is not referenced.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - DOUBLE PRECISION.
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y. On exit, Y is overwritten by the updated
+ vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*lda < max(1,*n)) {
+ info = 5;
+ } else if (*incx == 0) {
+ info = 7;
+ } else if (*incy == 0) {
+ info = 10;
+ }
+ if (info != 0) {
+ xerbla_("DSYMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || *alpha == 0. && *beta == 1.) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y. */
+
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A.
+
+ First form y := beta*y. */
+
+ if (*beta != 1.) {
+ if (*incy == 1) {
+ if (*beta == 0.) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(i) = 0.;
+/* L10: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(i) = *beta * Y(i);
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (*beta == 0.) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(iy) = 0.;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(iy) = *beta * Y(iy);
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (*alpha == 0.) {
+ return 0;
+ }
+ if (lsame_(uplo, "U")) {
+
+/* Form y when A is stored in upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(j);
+ temp2 = 0.;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ Y(i) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(i);
+/* L50: */
+ }
+ Y(j) = Y(j) + temp1 * A(j,j) + *alpha * temp2;
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(jx);
+ temp2 = 0.;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ Y(iy) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(ix);
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ Y(jy) = Y(jy) + temp1 * A(j,j) + *alpha * temp2;
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y when A is stored in lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(j);
+ temp2 = 0.;
+ Y(j) += temp1 * A(j,j);
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ Y(i) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(i);
+/* L90: */
+ }
+ Y(j) += *alpha * temp2;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(jx);
+ temp2 = 0.;
+ Y(jy) += temp1 * A(j,j);
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ Y(iy) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(ix);
+/* L110: */
+ }
+ Y(jy) += *alpha * temp2;
+ jx += *incx;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of DSYMV . */
+
+} /* dsymv_ */
+
diff --git a/CBLAS/dsyr2.c b/CBLAS/dsyr2.c
new file mode 100644
index 0000000..8e6fabe
--- /dev/null
+++ b/CBLAS/dsyr2.c
@@ -0,0 +1,264 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dsyr2_(char *uplo, integer *n, doublereal *alpha,
+ doublereal *x, integer *incx, doublereal *y, integer *incy,
+ doublereal *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static doublereal temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ DSYR2 performs the symmetric rank 2 operation
+
+ A := alpha*x*y' + alpha*y*x' + A,
+
+ where alpha is a scalar, x and y are n element vectors and A is an n
+
+ by n symmetric matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - DOUBLE PRECISION.
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the symmetric matrix and the strictly
+ lower triangular part of A is not referenced. On exit, the
+ upper triangular part of the array A is overwritten by the
+ upper triangular part of the updated matrix.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the symmetric matrix and the strictly
+ upper triangular part of A is not referenced. On exit, the
+ lower triangular part of the array A is overwritten by the
+ lower triangular part of the updated matrix.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*n)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("DSYR2 ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || *alpha == 0.) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y if the increments are not both
+
+ unity. */
+
+ if (*incx != 1 || *incy != 1) {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+ jx = kx;
+ jy = ky;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A. */
+
+ if (lsame_(uplo, "U")) {
+
+/* Form A when A is stored in the upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(j) != 0. || Y(j) != 0.) {
+ temp1 = *alpha * Y(j);
+ temp2 = *alpha * X(j);
+ i__2 = j;
+ for (i = 1; i <= j; ++i) {
+ A(i,j) = A(i,j) + X(i) * temp1
+ + Y(i) * temp2;
+/* L10: */
+ }
+ }
+/* L20: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0. || Y(jy) != 0.) {
+ temp1 = *alpha * Y(jy);
+ temp2 = *alpha * X(jx);
+ ix = kx;
+ iy = ky;
+ i__2 = j;
+ for (i = 1; i <= j; ++i) {
+ A(i,j) = A(i,j) + X(ix) * temp1
+ + Y(iy) * temp2;
+ ix += *incx;
+ iy += *incy;
+/* L30: */
+ }
+ }
+ jx += *incx;
+ jy += *incy;
+/* L40: */
+ }
+ }
+ } else {
+
+/* Form A when A is stored in the lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(j) != 0. || Y(j) != 0.) {
+ temp1 = *alpha * Y(j);
+ temp2 = *alpha * X(j);
+ i__2 = *n;
+ for (i = j; i <= *n; ++i) {
+ A(i,j) = A(i,j) + X(i) * temp1
+ + Y(i) * temp2;
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0. || Y(jy) != 0.) {
+ temp1 = *alpha * Y(jy);
+ temp2 = *alpha * X(jx);
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j; i <= *n; ++i) {
+ A(i,j) = A(i,j) + X(ix) * temp1
+ + Y(iy) * temp2;
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ }
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of DSYR2 . */
+
+} /* dsyr2_ */
+
diff --git a/CBLAS/dtrsv.c b/CBLAS/dtrsv.c
new file mode 100644
index 0000000..b0b8bb3
--- /dev/null
+++ b/CBLAS/dtrsv.c
@@ -0,0 +1,338 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dtrsv_(char *uplo, char *trans, char *diag, integer *n,
+ doublereal *a, integer *lda, doublereal *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static doublereal temp;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, jx, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical nounit;
+
+
+/* Purpose
+ =======
+
+ DTRSV solves one of the systems of equations
+
+ A*x = b, or A'*x = b,
+
+ where b and x are n element vectors and A is an n by n unit, or
+ non-unit, upper or lower triangular matrix.
+
+ No test for singularity or near-singularity is included in this
+ routine. Such tests must be performed before calling this routine.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the matrix is an upper or
+ lower triangular matrix as follows:
+
+ UPLO = 'U' or 'u' A is an upper triangular matrix.
+
+ UPLO = 'L' or 'l' A is a lower triangular matrix.
+
+ Unchanged on exit.
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the equations to be solved as
+ follows:
+
+ TRANS = 'N' or 'n' A*x = b.
+
+ TRANS = 'T' or 't' A'*x = b.
+
+ TRANS = 'C' or 'c' A'*x = b.
+
+ Unchanged on exit.
+
+ DIAG - CHARACTER*1.
+ On entry, DIAG specifies whether or not A is unit
+ triangular as follows:
+
+ DIAG = 'U' or 'u' A is assumed to be unit triangular.
+
+ DIAG = 'N' or 'n' A is not assumed to be unit
+ triangular.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular matrix and the strictly lower triangular part of
+
+ A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular matrix and the strictly upper triangular part of
+
+ A is not referenced.
+ Note that when DIAG = 'U' or 'u', the diagonal elements of
+
+ A are not referenced either, but are assumed to be unity.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - DOUBLE PRECISION array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element right-hand side vector b. On exit, X is overwritten
+
+ with the solution vector x.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (! lsame_(trans, "N") && ! lsame_(trans, "T") &&
+ ! lsame_(trans, "C")) {
+ info = 2;
+ } else if (! lsame_(diag, "U") && ! lsame_(diag, "N")) {
+ info = 3;
+ } else if (*n < 0) {
+ info = 4;
+ } else if (*lda < max(1,*n)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ }
+ if (info != 0) {
+ xerbla_("DTRSV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+ nounit = lsame_(diag, "N");
+
+/* Set up the start point in X if the increment is not unity. This
+ will be ( N - 1 )*INCX too small for descending loops. */
+
+ if (*incx <= 0) {
+ kx = 1 - (*n - 1) * *incx;
+ } else if (*incx != 1) {
+ kx = 1;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (lsame_(trans, "N")) {
+
+/* Form x := inv( A )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ if (X(j) != 0.) {
+ if (nounit) {
+ X(j) /= A(j,j);
+ }
+ temp = X(j);
+ for (i = j - 1; i >= 1; --i) {
+ X(i) -= temp * A(i,j);
+/* L10: */
+ }
+ }
+/* L20: */
+ }
+ } else {
+ jx = kx + (*n - 1) * *incx;
+ for (j = *n; j >= 1; --j) {
+ if (X(jx) != 0.) {
+ if (nounit) {
+ X(jx) /= A(j,j);
+ }
+ temp = X(jx);
+ ix = jx;
+ for (i = j - 1; i >= 1; --i) {
+ ix -= *incx;
+ X(ix) -= temp * A(i,j);
+/* L30: */
+ }
+ }
+ jx -= *incx;
+/* L40: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(j) != 0.) {
+ if (nounit) {
+ X(j) /= A(j,j);
+ }
+ temp = X(j);
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ X(i) -= temp * A(i,j);
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.) {
+ if (nounit) {
+ X(jx) /= A(j,j);
+ }
+ temp = X(jx);
+ ix = jx;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ X(ix) -= temp * A(i,j);
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ }
+ } else {
+
+/* Form x := inv( A' )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = X(j);
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ temp -= A(i,j) * X(i);
+/* L90: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(j) = temp;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = X(jx);
+ ix = kx;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ temp -= A(i,j) * X(ix);
+ ix += *incx;
+/* L110: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(jx) = temp;
+ jx += *incx;
+/* L120: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ temp = X(j);
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ temp -= A(i,j) * X(i);
+/* L130: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(j) = temp;
+/* L140: */
+ }
+ } else {
+ kx += (*n - 1) * *incx;
+ jx = kx;
+ for (j = *n; j >= 1; --j) {
+ temp = X(jx);
+ ix = kx;
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ temp -= A(i,j) * X(ix);
+ ix -= *incx;
+/* L150: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(jx) = temp;
+ jx -= *incx;
+/* L160: */
+ }
+ }
+ }
+ }
+
+ return 0;
+
+/* End of DTRSV . */
+
+} /* dtrsv_ */
+
diff --git a/CBLAS/dzasum.c b/CBLAS/dzasum.c
new file mode 100644
index 0000000..5605d1e
--- /dev/null
+++ b/CBLAS/dzasum.c
@@ -0,0 +1,68 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dzasum_(integer *n, doublecomplex *zx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+ doublereal ret_val;
+
+ /* Local variables */
+ static integer i;
+ static doublereal stemp;
+ extern doublereal dcabs1_(doublecomplex *);
+ static integer ix;
+
+
+/* takes the sum of the absolute values.
+ jack dongarra, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define ZX(I) zx[(I)-1]
+
+
+ ret_val = 0.;
+ stemp = 0.;
+ if (*n <= 0 || *incx <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ ix = 1;
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ stemp += dcabs1_(&ZX(ix));
+ ix += *incx;
+/* L10: */
+ }
+ ret_val = stemp;
+ return ret_val;
+
+/* code for increment equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ stemp += dcabs1_(&ZX(i));
+/* L30: */
+ }
+ ret_val = stemp;
+ return ret_val;
+} /* dzasum_ */
+
diff --git a/CBLAS/dznrm2.c b/CBLAS/dznrm2.c
new file mode 100644
index 0000000..d0318b7
--- /dev/null
+++ b/CBLAS/dznrm2.c
@@ -0,0 +1,96 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dznrm2_(integer *n, doublecomplex *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ doublereal ret_val, d__1;
+
+ /* Builtin functions */
+ double d_imag(doublecomplex *), sqrt(doublereal);
+
+ /* Local variables */
+ static doublereal temp, norm, scale;
+ static integer ix;
+ static doublereal ssq;
+
+
+/* DZNRM2 returns the euclidean norm of a vector via the function
+ name, so that
+
+ DZNRM2 := sqrt( conjg( x' )*x )
+
+
+
+ -- This version written on 25-October-1982.
+ Modified on 14-October-1993 to inline the call to ZLASSQ.
+ Sven Hammarling, Nag Ltd.
+
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+
+ if (*n < 1 || *incx < 1) {
+ norm = 0.;
+ } else {
+ scale = 0.;
+ ssq = 1.;
+/* The following loop is equivalent to this call to the LAPACK
+
+ auxiliary routine:
+ CALL ZLASSQ( N, X, INCX, SCALE, SSQ ) */
+
+ i__1 = (*n - 1) * *incx + 1;
+ i__2 = *incx;
+ for (ix = 1; *incx < 0 ? ix >= (*n-1)**incx+1 : ix <= (*n-1)**incx+1; ix += *incx) {
+ i__3 = ix;
+ if (X(ix).r != 0.) {
+ i__3 = ix;
+ temp = (d__1 = X(ix).r, abs(d__1));
+ if (scale < temp) {
+/* Computing 2nd power */
+ d__1 = scale / temp;
+ ssq = ssq * (d__1 * d__1) + 1.;
+ scale = temp;
+ } else {
+/* Computing 2nd power */
+ d__1 = temp / scale;
+ ssq += d__1 * d__1;
+ }
+ }
+ if (d_imag(&X(ix)) != 0.) {
+ temp = (d__1 = d_imag(&X(ix)), abs(d__1));
+ if (scale < temp) {
+/* Computing 2nd power */
+ d__1 = scale / temp;
+ ssq = ssq * (d__1 * d__1) + 1.;
+ scale = temp;
+ } else {
+/* Computing 2nd power */
+ d__1 = temp / scale;
+ ssq += d__1 * d__1;
+ }
+ }
+/* L10: */
+ }
+ norm = scale * sqrt(ssq);
+ }
+
+ ret_val = norm;
+ return ret_val;
+
+/* End of DZNRM2. */
+
+} /* dznrm2_ */
+
diff --git a/CBLAS/f2c.h b/CBLAS/f2c.h
new file mode 100644
index 0000000..caa33e1
--- /dev/null
+++ b/CBLAS/f2c.h
@@ -0,0 +1,48 @@
+/* f2c.h -- Standard Fortran to C header file */
+
+/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
+
+ - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
+
+#include "Cnames.h"
+
+#ifndef F2C_INCLUDE
+#define F2C_INCLUDE
+
+#if 0
+typedef long int integer; /* 64 on 64-bit machine */
+typedef long int logical;
+#endif
+
+typedef int integer;
+typedef int logical;
+
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
+typedef short int shortlogical;
+typedef char logical1;
+typedef char integer1;
+/* typedef long long longint; */ /* system-dependent */
+
+#define TRUE_ (1)
+#define FALSE_ (0)
+
+/* Extern is for use with -E */
+#ifndef Extern
+#define Extern extern
+#endif
+
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define dabs(x) (doublereal)abs(x)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#define dmin(a,b) (doublereal)min(a,b)
+#define dmax(a,b) (doublereal)max(a,b)
+
+#define VOID void
+
+#endif
diff --git a/CBLAS/icamax.c b/CBLAS/icamax.c
new file mode 100644
index 0000000..9ff4786
--- /dev/null
+++ b/CBLAS/icamax.c
@@ -0,0 +1,72 @@
+#include "f2c.h"
+
+integer icamax_(integer *n, complex *cx, integer *incx)
+{
+ /* System generated locals */
+ integer ret_val, i__1, i__2;
+ real r__1, r__2;
+ /* Builtin functions */
+ double r_imag(complex *);
+ /* Local variables */
+ static real smax;
+ static integer i, ix;
+/* finds the index of element having max. absolute value.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+ Parameter adjustments
+ Function Body */
+#define CX(I) cx[(I)-1]
+ ret_val = 0;
+ if (*n < 1 || *incx <= 0) {
+ return ret_val;
+ }
+ ret_val = 1;
+ if (*n == 1) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+/* code for increment not equal to 1 */
+ ix = 1;
+ smax = (r__1 = CX(1).r, dabs(r__1)) + (r__2 = r_imag(&CX(1)), dabs(r__2));
+ ix += *incx;
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ i__2 = ix;
+ if ((r__1 = CX(ix).r, dabs(r__1)) + (r__2 = r_imag(&CX(ix)), dabs(
+ r__2)) <= smax) {
+ goto L5;
+ }
+ ret_val = i;
+ i__2 = ix;
+ smax = (r__1 = CX(ix).r, dabs(r__1)) + (r__2 = r_imag(&CX(ix)),
+ dabs(r__2));
+L5:
+ ix += *incx;
+/* L10: */
+ }
+ return ret_val;
+/* code for increment equal to 1 */
+L20:
+ smax = (r__1 = CX(1).r, dabs(r__1)) + (r__2 = r_imag(&CX(1)), dabs(r__2));
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ i__2 = i;
+ if ((r__1 = CX(i).r, dabs(r__1)) + (r__2 = r_imag(&CX(i)), dabs(
+ r__2)) <= smax) {
+ goto L30;
+ }
+ ret_val = i;
+ i__2 = i;
+ smax = (r__1 = CX(i).r, dabs(r__1)) + (r__2 = r_imag(&CX(i)), dabs(
+ r__2));
+L30:
+ ;
+ }
+ return ret_val;
+} /* icamax_ */
+
+
diff --git a/CBLAS/idamax.c b/CBLAS/idamax.c
new file mode 100644
index 0000000..00ebc23
--- /dev/null
+++ b/CBLAS/idamax.c
@@ -0,0 +1,80 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+integer idamax_(integer *n, doublereal *dx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer ret_val, i__1;
+ doublereal d__1;
+
+ /* Local variables */
+ static doublereal dmax__;
+ static integer i, ix;
+
+
+/* finds the index of element having max. absolute value.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define DX(I) dx[(I)-1]
+
+
+ ret_val = 0;
+ if (*n < 1 || *incx <= 0) {
+ return ret_val;
+ }
+ ret_val = 1;
+ if (*n == 1) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ ix = 1;
+ dmax__ = abs(DX(1));
+ ix += *incx;
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ if ((d__1 = DX(ix), abs(d__1)) <= dmax__) {
+ goto L5;
+ }
+ ret_val = i;
+ dmax__ = (d__1 = DX(ix), abs(d__1));
+L5:
+ ix += *incx;
+/* L10: */
+ }
+ return ret_val;
+
+/* code for increment equal to 1 */
+
+L20:
+ dmax__ = abs(DX(1));
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ if ((d__1 = DX(i), abs(d__1)) <= dmax__) {
+ goto L30;
+ }
+ ret_val = i;
+ dmax__ = (d__1 = DX(i), abs(d__1));
+L30:
+ ;
+ }
+ return ret_val;
+} /* idamax_ */
+
diff --git a/CBLAS/isamax.c b/CBLAS/isamax.c
new file mode 100644
index 0000000..b1ad475
--- /dev/null
+++ b/CBLAS/isamax.c
@@ -0,0 +1,80 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+integer isamax_(integer *n, real *sx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer ret_val, i__1;
+ real r__1;
+
+ /* Local variables */
+ static real smax;
+ static integer i, ix;
+
+
+/* finds the index of element having max. absolute value.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SX(I) sx[(I)-1]
+
+
+ ret_val = 0;
+ if (*n < 1 || *incx <= 0) {
+ return ret_val;
+ }
+ ret_val = 1;
+ if (*n == 1) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ ix = 1;
+ smax = dabs(SX(1));
+ ix += *incx;
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ if ((r__1 = SX(ix), dabs(r__1)) <= smax) {
+ goto L5;
+ }
+ ret_val = i;
+ smax = (r__1 = SX(ix), dabs(r__1));
+L5:
+ ix += *incx;
+/* L10: */
+ }
+ return ret_val;
+
+/* code for increment equal to 1 */
+
+L20:
+ smax = dabs(SX(1));
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ if ((r__1 = SX(i), dabs(r__1)) <= smax) {
+ goto L30;
+ }
+ ret_val = i;
+ smax = (r__1 = SX(i), dabs(r__1));
+L30:
+ ;
+ }
+ return ret_val;
+} /* isamax_ */
+
diff --git a/CBLAS/izamax.c b/CBLAS/izamax.c
new file mode 100644
index 0000000..44959d0
--- /dev/null
+++ b/CBLAS/izamax.c
@@ -0,0 +1,81 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+integer izamax_(integer *n, doublecomplex *zx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer ret_val, i__1;
+
+ /* Local variables */
+ static doublereal smax;
+ static integer i;
+ extern doublereal dcabs1_(doublecomplex *);
+ static integer ix;
+
+
+/* finds the index of element having max. absolute value.
+ jack dongarra, 1/15/85.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define ZX(I) zx[(I)-1]
+
+
+ ret_val = 0;
+ if (*n < 1 || *incx <= 0) {
+ return ret_val;
+ }
+ ret_val = 1;
+ if (*n == 1) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ ix = 1;
+ smax = dcabs1_(&ZX(1));
+ ix += *incx;
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ if (dcabs1_(&ZX(ix)) <= smax) {
+ goto L5;
+ }
+ ret_val = i;
+ smax = dcabs1_(&ZX(ix));
+L5:
+ ix += *incx;
+/* L10: */
+ }
+ return ret_val;
+
+/* code for increment equal to 1 */
+
+L20:
+ smax = dcabs1_(&ZX(1));
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ if (dcabs1_(&ZX(i)) <= smax) {
+ goto L30;
+ }
+ ret_val = i;
+ smax = dcabs1_(&ZX(i));
+L30:
+ ;
+ }
+ return ret_val;
+} /* izamax_ */
+
diff --git a/CBLAS/sasum.c b/CBLAS/sasum.c
new file mode 100644
index 0000000..29eafe4
--- /dev/null
+++ b/CBLAS/sasum.c
@@ -0,0 +1,89 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+real sasum_(integer *n, real *sx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2;
+ real ret_val, r__1, r__2, r__3, r__4, r__5, r__6;
+
+ /* Local variables */
+ static integer i, m, nincx;
+ static real stemp;
+ static integer mp1;
+
+
+/* takes the sum of the absolute values.
+ uses unrolled loops for increment equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SX(I) sx[(I)-1]
+
+
+ ret_val = 0.f;
+ stemp = 0.f;
+ if (*n <= 0 || *incx <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+ stemp += (r__1 = SX(i), dabs(r__1));
+/* L10: */
+ }
+ ret_val = stemp;
+ return ret_val;
+
+/* code for increment equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 6;
+ if (m == 0) {
+ goto L40;
+ }
+ i__2 = m;
+ for (i = 1; i <= m; ++i) {
+ stemp += (r__1 = SX(i), dabs(r__1));
+/* L30: */
+ }
+ if (*n < 6) {
+ goto L60;
+ }
+L40:
+ mp1 = m + 1;
+ i__2 = *n;
+ for (i = mp1; i <= *n; i += 6) {
+ stemp = stemp + (r__1 = SX(i), dabs(r__1)) + (r__2 = SX(i + 1), dabs(
+ r__2)) + (r__3 = SX(i + 2), dabs(r__3)) + (r__4 = SX(i + 3),
+ dabs(r__4)) + (r__5 = SX(i + 4), dabs(r__5)) + (r__6 = SX(i +
+ 5), dabs(r__6));
+/* L50: */
+ }
+L60:
+ ret_val = stemp;
+ return ret_val;
+} /* sasum_ */
+
diff --git a/CBLAS/saxpy.c b/CBLAS/saxpy.c
new file mode 100644
index 0000000..06c26f3
--- /dev/null
+++ b/CBLAS/saxpy.c
@@ -0,0 +1,94 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int saxpy_(integer *n, real *sa, real *sx, integer *incx,
+ real *sy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer i, m, ix, iy, mp1;
+
+
+/* constant times a vector plus a vector.
+ uses unrolled loop for increments equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SY(I) sy[(I)-1]
+#define SX(I) sx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*sa == 0.f) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ SY(iy) += *sa * SX(ix);
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 4;
+ if (m == 0) {
+ goto L40;
+ }
+ i__1 = m;
+ for (i = 1; i <= m; ++i) {
+ SY(i) += *sa * SX(i);
+/* L30: */
+ }
+ if (*n < 4) {
+ return 0;
+ }
+L40:
+ mp1 = m + 1;
+ i__1 = *n;
+ for (i = mp1; i <= *n; i += 4) {
+ SY(i) += *sa * SX(i);
+ SY(i + 1) += *sa * SX(i + 1);
+ SY(i + 2) += *sa * SX(i + 2);
+ SY(i + 3) += *sa * SX(i + 3);
+/* L50: */
+ }
+ return 0;
+} /* saxpy_ */
+
diff --git a/CBLAS/scasum.c b/CBLAS/scasum.c
new file mode 100644
index 0000000..5c3d351
--- /dev/null
+++ b/CBLAS/scasum.c
@@ -0,0 +1,74 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+real scasum_(integer *n, complex *cx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ real ret_val, r__1, r__2;
+
+ /* Builtin functions */
+ double r_imag(complex *);
+
+ /* Local variables */
+ static integer i, nincx;
+ static real stemp;
+
+
+/* takes the sum of the absolute values of a complex vector and
+ returns a single precision result.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define CX(I) cx[(I)-1]
+
+
+ ret_val = 0.f;
+ stemp = 0.f;
+ if (*n <= 0 || *incx <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+ i__3 = i;
+ stemp = stemp + (r__1 = CX(i).r, dabs(r__1)) + (r__2 = r_imag(&CX(
+ i)), dabs(r__2));
+/* L10: */
+ }
+ ret_val = stemp;
+ return ret_val;
+
+/* code for increment equal to 1 */
+
+L20:
+ i__2 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__1 = i;
+ stemp = stemp + (r__1 = CX(i).r, dabs(r__1)) + (r__2 = r_imag(&CX(
+ i)), dabs(r__2));
+/* L30: */
+ }
+ ret_val = stemp;
+ return ret_val;
+} /* scasum_ */
+
diff --git a/CBLAS/scnrm2.c b/CBLAS/scnrm2.c
new file mode 100644
index 0000000..8325b3d
--- /dev/null
+++ b/CBLAS/scnrm2.c
@@ -0,0 +1,96 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+real scnrm2_(integer *n, complex *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ real ret_val, r__1;
+
+ /* Builtin functions */
+ double r_imag(complex *), sqrt(doublereal);
+
+ /* Local variables */
+ static real temp, norm, scale;
+ static integer ix;
+ static real ssq;
+
+
+/* SCNRM2 returns the euclidean norm of a vector via the function
+ name, so that
+
+ SCNRM2 := sqrt( conjg( x' )*x )
+
+
+
+ -- This version written on 25-October-1982.
+ Modified on 14-October-1993 to inline the call to CLASSQ.
+ Sven Hammarling, Nag Ltd.
+
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+
+ if (*n < 1 || *incx < 1) {
+ norm = 0.f;
+ } else {
+ scale = 0.f;
+ ssq = 1.f;
+/* The following loop is equivalent to this call to the LAPACK
+
+ auxiliary routine:
+ CALL CLASSQ( N, X, INCX, SCALE, SSQ ) */
+
+ i__1 = (*n - 1) * *incx + 1;
+ i__2 = *incx;
+ for (ix = 1; *incx < 0 ? ix >= (*n-1)**incx+1 : ix <= (*n-1)**incx+1; ix += *incx) {
+ i__3 = ix;
+ if (X(ix).r != 0.f) {
+ i__3 = ix;
+ temp = (r__1 = X(ix).r, dabs(r__1));
+ if (scale < temp) {
+/* Computing 2nd power */
+ r__1 = scale / temp;
+ ssq = ssq * (r__1 * r__1) + 1.f;
+ scale = temp;
+ } else {
+/* Computing 2nd power */
+ r__1 = temp / scale;
+ ssq += r__1 * r__1;
+ }
+ }
+ if (r_imag(&X(ix)) != 0.f) {
+ temp = (r__1 = r_imag(&X(ix)), dabs(r__1));
+ if (scale < temp) {
+/* Computing 2nd power */
+ r__1 = scale / temp;
+ ssq = ssq * (r__1 * r__1) + 1.f;
+ scale = temp;
+ } else {
+/* Computing 2nd power */
+ r__1 = temp / scale;
+ ssq += r__1 * r__1;
+ }
+ }
+/* L10: */
+ }
+ norm = scale * sqrt(ssq);
+ }
+
+ ret_val = norm;
+ return ret_val;
+
+/* End of SCNRM2. */
+
+} /* scnrm2_ */
+
diff --git a/CBLAS/scopy.c b/CBLAS/scopy.c
new file mode 100644
index 0000000..4e7a238
--- /dev/null
+++ b/CBLAS/scopy.c
@@ -0,0 +1,94 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int scopy_(integer *n, real *sx, integer *incx, real *sy,
+ integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer i, m, ix, iy, mp1;
+
+
+/* copies a vector, x, to a vector, y.
+ uses unrolled loops for increments equal to 1.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SY(I) sy[(I)-1]
+#define SX(I) sx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ SY(iy) = SX(ix);
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 7;
+ if (m == 0) {
+ goto L40;
+ }
+ i__1 = m;
+ for (i = 1; i <= m; ++i) {
+ SY(i) = SX(i);
+/* L30: */
+ }
+ if (*n < 7) {
+ return 0;
+ }
+L40:
+ mp1 = m + 1;
+ i__1 = *n;
+ for (i = mp1; i <= *n; i += 7) {
+ SY(i) = SX(i);
+ SY(i + 1) = SX(i + 1);
+ SY(i + 2) = SX(i + 2);
+ SY(i + 3) = SX(i + 3);
+ SY(i + 4) = SX(i + 4);
+ SY(i + 5) = SX(i + 5);
+ SY(i + 6) = SX(i + 6);
+/* L50: */
+ }
+ return 0;
+} /* scopy_ */
+
diff --git a/CBLAS/sdot.c b/CBLAS/sdot.c
new file mode 100644
index 0000000..b553937
--- /dev/null
+++ b/CBLAS/sdot.c
@@ -0,0 +1,96 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+real sdot_(integer *n, real *sx, integer *incx, real *sy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+ real ret_val;
+
+ /* Local variables */
+ static integer i, m;
+ static real stemp;
+ static integer ix, iy, mp1;
+
+
+/* forms the dot product of two vectors.
+ uses unrolled loops for increments equal to one.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SY(I) sy[(I)-1]
+#define SX(I) sx[(I)-1]
+
+
+ stemp = 0.f;
+ ret_val = 0.f;
+ if (*n <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ stemp += SX(ix) * SY(iy);
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ ret_val = stemp;
+ return ret_val;
+
+/* code for both increments equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 5;
+ if (m == 0) {
+ goto L40;
+ }
+ i__1 = m;
+ for (i = 1; i <= m; ++i) {
+ stemp += SX(i) * SY(i);
+/* L30: */
+ }
+ if (*n < 5) {
+ goto L60;
+ }
+L40:
+ mp1 = m + 1;
+ i__1 = *n;
+ for (i = mp1; i <= *n; i += 5) {
+ stemp = stemp + SX(i) * SY(i) + SX(i + 1) * SY(i + 1) + SX(i + 2) *
+ SY(i + 2) + SX(i + 3) * SY(i + 3) + SX(i + 4) * SY(i + 4);
+/* L50: */
+ }
+L60:
+ ret_val = stemp;
+ return ret_val;
+} /* sdot_ */
+
diff --git a/CBLAS/sgemv.c b/CBLAS/sgemv.c
new file mode 100644
index 0000000..9910c18
--- /dev/null
+++ b/CBLAS/sgemv.c
@@ -0,0 +1,299 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int sgemv_(char *trans, integer *m, integer *n, real *alpha,
+ real *a, integer *lda, real *x, integer *incx, real *beta, real *y,
+ integer *incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static real temp;
+ static integer lenx, leny, i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ SGEMV performs one of the matrix-vector operations
+
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+
+ where alpha and beta are scalars, x and y are vectors and A is an
+ m by n matrix.
+
+ Parameters
+ ==========
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ Unchanged on exit.
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - REAL .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - REAL array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+ X - REAL array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - REAL .
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - REAL array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+
+ updated vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(trans, "N") && ! lsame_(trans, "T") && !
+ lsame_(trans, "C")) {
+ info = 1;
+ } else if (*m < 0) {
+ info = 2;
+ } else if (*n < 0) {
+ info = 3;
+ } else if (*lda < max(1,*m)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ } else if (*incy == 0) {
+ info = 11;
+ }
+ if (info != 0) {
+ xerbla_("SGEMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || *alpha == 0.f && *beta == 1.f) {
+ return 0;
+ }
+
+/* Set LENX and LENY, the lengths of the vectors x and y, and set
+
+ up the start points in X and Y. */
+
+ if (lsame_(trans, "N")) {
+ lenx = *n;
+ leny = *m;
+ } else {
+ lenx = *m;
+ leny = *n;
+ }
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (lenx - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (leny - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A.
+
+ First form y := beta*y. */
+
+ if (*beta != 1.f) {
+ if (*incy == 1) {
+ if (*beta == 0.f) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(i) = 0.f;
+/* L10: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(i) = *beta * Y(i);
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (*beta == 0.f) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(iy) = 0.f;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ Y(iy) = *beta * Y(iy);
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (*alpha == 0.f) {
+ return 0;
+ }
+ if (lsame_(trans, "N")) {
+
+/* Form y := alpha*A*x + y. */
+
+ jx = kx;
+ if (*incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.f) {
+ temp = *alpha * X(jx);
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ Y(i) += temp * A(i,j);
+/* L50: */
+ }
+ }
+ jx += *incx;
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.f) {
+ temp = *alpha * X(jx);
+ iy = ky;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ Y(iy) += temp * A(i,j);
+ iy += *incy;
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y := alpha*A'*x + y. */
+
+ jy = ky;
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = 0.f;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ temp += A(i,j) * X(i);
+/* L90: */
+ }
+ Y(jy) += *alpha * temp;
+ jy += *incy;
+/* L100: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = 0.f;
+ ix = kx;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ temp += A(i,j) * X(ix);
+ ix += *incx;
+/* L110: */
+ }
+ Y(jy) += *alpha * temp;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of SGEMV . */
+
+} /* sgemv_ */
+
diff --git a/CBLAS/sger.c b/CBLAS/sger.c
new file mode 100644
index 0000000..d73fd6c
--- /dev/null
+++ b/CBLAS/sger.c
@@ -0,0 +1,181 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int sger_(integer *m, integer *n, real *alpha, real *x,
+ integer *incx, real *y, integer *incy, real *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static real temp;
+ static integer i, j, ix, jy, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ SGER performs the rank 1 operation
+
+ A := alpha*x*y' + A,
+
+ where alpha is a scalar, x is an m element vector, y is an n element
+
+ vector and A is an m by n matrix.
+
+ Parameters
+ ==========
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - REAL .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - REAL array of dimension at least
+ ( 1 + ( m - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the m
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - REAL array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - REAL array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients. On exit, A is
+ overwritten by the updated matrix.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (*m < 0) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*m)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("SGER ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || *alpha == 0.f) {
+ return 0;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (*incy > 0) {
+ jy = 1;
+ } else {
+ jy = 1 - (*n - 1) * *incy;
+ }
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (Y(jy) != 0.f) {
+ temp = *alpha * Y(jy);
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ A(i,j) += X(i) * temp;
+/* L10: */
+ }
+ }
+ jy += *incy;
+/* L20: */
+ }
+ } else {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*m - 1) * *incx;
+ }
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (Y(jy) != 0.f) {
+ temp = *alpha * Y(jy);
+ ix = kx;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ A(i,j) += X(ix) * temp;
+ ix += *incx;
+/* L30: */
+ }
+ }
+ jy += *incy;
+/* L40: */
+ }
+ }
+
+ return 0;
+
+/* End of SGER . */
+
+} /* sger_ */
+
diff --git a/CBLAS/smyblas2.c b/CBLAS/smyblas2.c
new file mode 100644
index 0000000..729e17f
--- /dev/null
+++ b/CBLAS/smyblas2.c
@@ -0,0 +1,225 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: smyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void slsolve ( int ldm, int ncol, float *M, float *rhs )
+{
+ int k;
+ float x0, x1, x2, x3, x4, x5, x6, x7;
+ float *M0;
+ register float *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+ Mki4 = Mki3 + ldm + 1;
+ Mki5 = Mki4 + ldm + 1;
+ Mki6 = Mki5 + ldm + 1;
+ Mki7 = Mki6 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+ x4 = rhs[firstcol+4] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++;
+ x5 = rhs[firstcol+5] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++;
+ x6 = rhs[firstcol+6] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++;
+ x7 = rhs[firstcol+7] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ rhs[++firstcol] = x4;
+ rhs[++firstcol] = x5;
+ rhs[++firstcol] = x6;
+ rhs[++firstcol] = x7;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++
+ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++ - x7 * *Mki7++;
+
+ M0 += 8 * ldm + 8;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++;
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++;
+
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+susolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+float *M; /* in */
+float *rhs; /* modified */
+{
+ float xj;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ xj = rhs[jcol] / M[jcol + jcol*ldm]; /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++)
+ rhs[irow] -= xj * M[irow + jcol*ldm]; /* M(irow, jcol) */
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void smatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+float *M; /* in */
+float *vec; /* in */
+float *Mxvec; /* in/out */
+
+{
+ float vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7;
+ float *M0;
+ register float *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+ Mki4 = Mki3 + ldm;
+ Mki5 = Mki4 + ldm;
+ Mki6 = Mki5 + ldm;
+ Mki7 = Mki6 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ vi4 = vec[firstcol++];
+ vi5 = vec[firstcol++];
+ vi6 = vec[firstcol++];
+ vi7 = vec[firstcol++];
+
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++
+ + vi4 * *Mki4++ + vi5 * *Mki5++
+ + vi6 * *Mki6++ + vi7 * *Mki7++;
+
+ M0 += 8 * ldm;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++ ;
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++;
+
+ M0 += ldm;
+ }
+
+}
+
diff --git a/CBLAS/snrm2.c b/CBLAS/snrm2.c
new file mode 100644
index 0000000..99b4003
--- /dev/null
+++ b/CBLAS/snrm2.c
@@ -0,0 +1,83 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+real snrm2_(integer *n, real *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2;
+ real ret_val, r__1;
+
+ /* Builtin functions */
+ double sqrt(doublereal);
+
+ /* Local variables */
+ static real norm, scale, absxi;
+ static integer ix;
+ static real ssq;
+
+
+/* SNRM2 returns the euclidean norm of a vector via the function
+ name, so that
+
+ SNRM2 := sqrt( x'*x )
+
+
+
+ -- This version written on 25-October-1982.
+ Modified on 14-October-1993 to inline the call to SLASSQ.
+ Sven Hammarling, Nag Ltd.
+
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+
+ if (*n < 1 || *incx < 1) {
+ norm = 0.f;
+ } else if (*n == 1) {
+ norm = dabs(X(1));
+ } else {
+ scale = 0.f;
+ ssq = 1.f;
+/* The following loop is equivalent to this call to the LAPACK
+
+ auxiliary routine:
+ CALL SLASSQ( N, X, INCX, SCALE, SSQ ) */
+
+ i__1 = (*n - 1) * *incx + 1;
+ i__2 = *incx;
+ for (ix = 1; *incx < 0 ? ix >= (*n-1)**incx+1 : ix <= (*n-1)**incx+1; ix += *incx) {
+ if (X(ix) != 0.f) {
+ absxi = (r__1 = X(ix), dabs(r__1));
+ if (scale < absxi) {
+/* Computing 2nd power */
+ r__1 = scale / absxi;
+ ssq = ssq * (r__1 * r__1) + 1.f;
+ scale = absxi;
+ } else {
+/* Computing 2nd power */
+ r__1 = absxi / scale;
+ ssq += r__1 * r__1;
+ }
+ }
+/* L10: */
+ }
+ norm = scale * sqrt(ssq);
+ }
+
+ ret_val = norm;
+ return ret_val;
+
+/* End of SNRM2. */
+
+} /* snrm2_ */
+
diff --git a/CBLAS/srot.c b/CBLAS/srot.c
new file mode 100644
index 0000000..bdbb234
--- /dev/null
+++ b/CBLAS/srot.c
@@ -0,0 +1,76 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int srot_(integer *n, real *sx, integer *incx, real *sy,
+ integer *incy, real *c, real *s)
+{
+
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer i;
+ static real stemp;
+ static integer ix, iy;
+
+
+/* applies a plane rotation.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SY(I) sy[(I)-1]
+#define SX(I) sx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments not equal
+ to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ stemp = *c * SX(ix) + *s * SY(iy);
+ SY(iy) = *c * SY(iy) - *s * SX(ix);
+ SX(ix) = stemp;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ stemp = *c * SX(i) + *s * SY(i);
+ SY(i) = *c * SY(i) - *s * SX(i);
+ SX(i) = stemp;
+/* L30: */
+ }
+ return 0;
+} /* srot_ */
+
diff --git a/CBLAS/sscal.c b/CBLAS/sscal.c
new file mode 100644
index 0000000..a21ad4e
--- /dev/null
+++ b/CBLAS/sscal.c
@@ -0,0 +1,82 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int sscal_(integer *n, real *sa, real *sx, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2;
+
+ /* Local variables */
+ static integer i, m, nincx, mp1;
+
+
+/* scales a vector by a constant.
+ uses unrolled loops for increment equal to 1.
+ jack dongarra, linpack, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define SX(I) sx[(I)-1]
+
+
+ if (*n <= 0 || *incx <= 0) {
+ return 0;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+ SX(i) = *sa * SX(i);
+/* L10: */
+ }
+ return 0;
+
+/* code for increment equal to 1
+
+
+ clean-up loop */
+
+L20:
+ m = *n % 5;
+ if (m == 0) {
+ goto L40;
+ }
+ i__2 = m;
+ for (i = 1; i <= m; ++i) {
+ SX(i) = *sa * SX(i);
+/* L30: */
+ }
+ if (*n < 5) {
+ return 0;
+ }
+L40:
+ mp1 = m + 1;
+ i__2 = *n;
+ for (i = mp1; i <= *n; i += 5) {
+ SX(i) = *sa * SX(i);
+ SX(i + 1) = *sa * SX(i + 1);
+ SX(i + 2) = *sa * SX(i + 2);
+ SX(i + 3) = *sa * SX(i + 3);
+ SX(i + 4) = *sa * SX(i + 4);
+/* L50: */
+ }
+ return 0;
+} /* sscal_ */
+
diff --git a/CBLAS/ssymv.c b/CBLAS/ssymv.c
new file mode 100644
index 0000000..1f7418b
--- /dev/null
+++ b/CBLAS/ssymv.c
@@ -0,0 +1,300 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int ssymv_(char *uplo, integer *n, real *alpha, real *a,
+ integer *lda, real *x, integer *incx, real *beta, real *y, integer *
+ incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static real temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ SSYMV performs the matrix-vector operation
+
+ y := alpha*A*x + beta*y,
+
+ where alpha and beta are scalars, x and y are n element vectors and
+ A is an n by n symmetric matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - REAL .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - REAL array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the symmetric matrix and the strictly
+ lower triangular part of A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the symmetric matrix and the strictly
+ upper triangular part of A is not referenced.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - REAL array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - REAL .
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - REAL array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y. On exit, Y is overwritten by the updated
+ vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*lda < max(1,*n)) {
+ info = 5;
+ } else if (*incx == 0) {
+ info = 7;
+ } else if (*incy == 0) {
+ info = 10;
+ }
+ if (info != 0) {
+ xerbla_("SSYMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || *alpha == 0.f && *beta == 1.f) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y. */
+
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A.
+
+ First form y := beta*y. */
+
+ if (*beta != 1.f) {
+ if (*incy == 1) {
+ if (*beta == 0.f) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(i) = 0.f;
+/* L10: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(i) = *beta * Y(i);
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (*beta == 0.f) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(iy) = 0.f;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ Y(iy) = *beta * Y(iy);
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (*alpha == 0.f) {
+ return 0;
+ }
+ if (lsame_(uplo, "U")) {
+
+/* Form y when A is stored in upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(j);
+ temp2 = 0.f;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ Y(i) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(i);
+/* L50: */
+ }
+ Y(j) = Y(j) + temp1 * A(j,j) + *alpha * temp2;
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(jx);
+ temp2 = 0.f;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ Y(iy) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(ix);
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ Y(jy) = Y(jy) + temp1 * A(j,j) + *alpha * temp2;
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y when A is stored in lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(j);
+ temp2 = 0.f;
+ Y(j) += temp1 * A(j,j);
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ Y(i) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(i);
+/* L90: */
+ }
+ Y(j) += *alpha * temp2;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp1 = *alpha * X(jx);
+ temp2 = 0.f;
+ Y(jy) += temp1 * A(j,j);
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ Y(iy) += temp1 * A(i,j);
+ temp2 += A(i,j) * X(ix);
+/* L110: */
+ }
+ Y(jy) += *alpha * temp2;
+ jx += *incx;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of SSYMV . */
+
+} /* ssymv_ */
+
diff --git a/CBLAS/ssyr2.c b/CBLAS/ssyr2.c
new file mode 100644
index 0000000..be43dfa
--- /dev/null
+++ b/CBLAS/ssyr2.c
@@ -0,0 +1,263 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int ssyr2_(char *uplo, integer *n, real *alpha, real *x,
+ integer *incx, real *y, integer *incy, real *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static real temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ SSYR2 performs the symmetric rank 2 operation
+
+ A := alpha*x*y' + alpha*y*x' + A,
+
+ where alpha is a scalar, x and y are n element vectors and A is an n
+
+ by n symmetric matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - REAL .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - REAL array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - REAL array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - REAL array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the symmetric matrix and the strictly
+ lower triangular part of A is not referenced. On exit, the
+ upper triangular part of the array A is overwritten by the
+ upper triangular part of the updated matrix.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the symmetric matrix and the strictly
+ upper triangular part of A is not referenced. On exit, the
+ lower triangular part of the array A is overwritten by the
+ lower triangular part of the updated matrix.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*n)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("SSYR2 ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || *alpha == 0.f) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y if the increments are not both
+
+ unity. */
+
+ if (*incx != 1 || *incy != 1) {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+ jx = kx;
+ jy = ky;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A. */
+
+ if (lsame_(uplo, "U")) {
+
+/* Form A when A is stored in the upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(j) != 0.f || Y(j) != 0.f) {
+ temp1 = *alpha * Y(j);
+ temp2 = *alpha * X(j);
+ i__2 = j;
+ for (i = 1; i <= j; ++i) {
+ A(i,j) = A(i,j) + X(i) * temp1
+ + Y(i) * temp2;
+/* L10: */
+ }
+ }
+/* L20: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.f || Y(jy) != 0.f) {
+ temp1 = *alpha * Y(jy);
+ temp2 = *alpha * X(jx);
+ ix = kx;
+ iy = ky;
+ i__2 = j;
+ for (i = 1; i <= j; ++i) {
+ A(i,j) = A(i,j) + X(ix) * temp1
+ + Y(iy) * temp2;
+ ix += *incx;
+ iy += *incy;
+/* L30: */
+ }
+ }
+ jx += *incx;
+ jy += *incy;
+/* L40: */
+ }
+ }
+ } else {
+
+/* Form A when A is stored in the lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(j) != 0.f || Y(j) != 0.f) {
+ temp1 = *alpha * Y(j);
+ temp2 = *alpha * X(j);
+ i__2 = *n;
+ for (i = j; i <= *n; ++i) {
+ A(i,j) = A(i,j) + X(i) * temp1
+ + Y(i) * temp2;
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.f || Y(jy) != 0.f) {
+ temp1 = *alpha * Y(jy);
+ temp2 = *alpha * X(jx);
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j; i <= *n; ++i) {
+ A(i,j) = A(i,j) + X(ix) * temp1
+ + Y(iy) * temp2;
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ }
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of SSYR2 . */
+
+} /* ssyr2_ */
+
diff --git a/CBLAS/strsv.c b/CBLAS/strsv.c
new file mode 100644
index 0000000..39da363
--- /dev/null
+++ b/CBLAS/strsv.c
@@ -0,0 +1,338 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int strsv_(char *uplo, char *trans, char *diag, integer *n,
+ real *a, integer *lda, real *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+
+ /* Local variables */
+ static integer info;
+ static real temp;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, jx, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical nounit;
+
+
+/* Purpose
+ =======
+
+ STRSV solves one of the systems of equations
+
+ A*x = b, or A'*x = b,
+
+ where b and x are n element vectors and A is an n by n unit, or
+ non-unit, upper or lower triangular matrix.
+
+ No test for singularity or near-singularity is included in this
+ routine. Such tests must be performed before calling this routine.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the matrix is an upper or
+ lower triangular matrix as follows:
+
+ UPLO = 'U' or 'u' A is an upper triangular matrix.
+
+ UPLO = 'L' or 'l' A is a lower triangular matrix.
+
+ Unchanged on exit.
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the equations to be solved as
+ follows:
+
+ TRANS = 'N' or 'n' A*x = b.
+
+ TRANS = 'T' or 't' A'*x = b.
+
+ TRANS = 'C' or 'c' A'*x = b.
+
+ Unchanged on exit.
+
+ DIAG - CHARACTER*1.
+ On entry, DIAG specifies whether or not A is unit
+ triangular as follows:
+
+ DIAG = 'U' or 'u' A is assumed to be unit triangular.
+
+ DIAG = 'N' or 'n' A is not assumed to be unit
+ triangular.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ A - REAL array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular matrix and the strictly lower triangular part of
+
+ A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular matrix and the strictly upper triangular part of
+
+ A is not referenced.
+ Note that when DIAG = 'U' or 'u', the diagonal elements of
+
+ A are not referenced either, but are assumed to be unity.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - REAL array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element right-hand side vector b. On exit, X is overwritten
+
+ with the solution vector x.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (! lsame_(trans, "N") && ! lsame_(trans, "T") &&
+ ! lsame_(trans, "C")) {
+ info = 2;
+ } else if (! lsame_(diag, "U") && ! lsame_(diag, "N")) {
+ info = 3;
+ } else if (*n < 0) {
+ info = 4;
+ } else if (*lda < max(1,*n)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ }
+ if (info != 0) {
+ xerbla_("STRSV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+ nounit = lsame_(diag, "N");
+
+/* Set up the start point in X if the increment is not unity. This
+ will be ( N - 1 )*INCX too small for descending loops. */
+
+ if (*incx <= 0) {
+ kx = 1 - (*n - 1) * *incx;
+ } else if (*incx != 1) {
+ kx = 1;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (lsame_(trans, "N")) {
+
+/* Form x := inv( A )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ if (X(j) != 0.f) {
+ if (nounit) {
+ X(j) /= A(j,j);
+ }
+ temp = X(j);
+ for (i = j - 1; i >= 1; --i) {
+ X(i) -= temp * A(i,j);
+/* L10: */
+ }
+ }
+/* L20: */
+ }
+ } else {
+ jx = kx + (*n - 1) * *incx;
+ for (j = *n; j >= 1; --j) {
+ if (X(jx) != 0.f) {
+ if (nounit) {
+ X(jx) /= A(j,j);
+ }
+ temp = X(jx);
+ ix = jx;
+ for (i = j - 1; i >= 1; --i) {
+ ix -= *incx;
+ X(ix) -= temp * A(i,j);
+/* L30: */
+ }
+ }
+ jx -= *incx;
+/* L40: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(j) != 0.f) {
+ if (nounit) {
+ X(j) /= A(j,j);
+ }
+ temp = X(j);
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ X(i) -= temp * A(i,j);
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ if (X(jx) != 0.f) {
+ if (nounit) {
+ X(jx) /= A(j,j);
+ }
+ temp = X(jx);
+ ix = jx;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ X(ix) -= temp * A(i,j);
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ }
+ } else {
+
+/* Form x := inv( A' )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = X(j);
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ temp -= A(i,j) * X(i);
+/* L90: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(j) = temp;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp = X(jx);
+ ix = kx;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ temp -= A(i,j) * X(ix);
+ ix += *incx;
+/* L110: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(jx) = temp;
+ jx += *incx;
+/* L120: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ temp = X(j);
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ temp -= A(i,j) * X(i);
+/* L130: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(j) = temp;
+/* L140: */
+ }
+ } else {
+ kx += (*n - 1) * *incx;
+ jx = kx;
+ for (j = *n; j >= 1; --j) {
+ temp = X(jx);
+ ix = kx;
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ temp -= A(i,j) * X(ix);
+ ix -= *incx;
+/* L150: */
+ }
+ if (nounit) {
+ temp /= A(j,j);
+ }
+ X(jx) = temp;
+ jx -= *incx;
+/* L160: */
+ }
+ }
+ }
+ }
+
+ return 0;
+
+/* End of STRSV . */
+
+} /* strsv_ */
+
diff --git a/CBLAS/superlu_f2c.h b/CBLAS/superlu_f2c.h
new file mode 100644
index 0000000..caa33e1
--- /dev/null
+++ b/CBLAS/superlu_f2c.h
@@ -0,0 +1,48 @@
+/* f2c.h -- Standard Fortran to C header file */
+
+/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
+
+ - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
+
+#include "Cnames.h"
+
+#ifndef F2C_INCLUDE
+#define F2C_INCLUDE
+
+#if 0
+typedef long int integer; /* 64 on 64-bit machine */
+typedef long int logical;
+#endif
+
+typedef int integer;
+typedef int logical;
+
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
+typedef short int shortlogical;
+typedef char logical1;
+typedef char integer1;
+/* typedef long long longint; */ /* system-dependent */
+
+#define TRUE_ (1)
+#define FALSE_ (0)
+
+/* Extern is for use with -E */
+#ifndef Extern
+#define Extern extern
+#endif
+
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define dabs(x) (doublereal)abs(x)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#define dmin(a,b) (doublereal)min(a,b)
+#define dmax(a,b) (doublereal)max(a,b)
+
+#define VOID void
+
+#endif
diff --git a/CBLAS/zaxpy.c b/CBLAS/zaxpy.c
new file mode 100644
index 0000000..37d4f32
--- /dev/null
+++ b/CBLAS/zaxpy.c
@@ -0,0 +1,87 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zaxpy_(integer *n, doublecomplex *za, doublecomplex *zx,
+ integer *incx, doublecomplex *zy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4;
+ doublecomplex z__1, z__2;
+
+ /* Local variables */
+ static integer i;
+ extern doublereal dcabs1_(doublecomplex *);
+ static integer ix, iy;
+
+
+/* constant times a vector plus a vector.
+ jack dongarra, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+ Parameter adjustments
+ Function Body */
+#define ZY(I) zy[(I)-1]
+#define ZX(I) zx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (dcabs1_(za) == 0.) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ i__4 = ix;
+ z__2.r = za->r * ZX(ix).r - za->i * ZX(ix).i, z__2.i = za->r * ZX(
+ ix).i + za->i * ZX(ix).r;
+ z__1.r = ZY(iy).r + z__2.r, z__1.i = ZY(iy).i + z__2.i;
+ ZY(iy).r = z__1.r, ZY(iy).i = z__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ i__4 = i;
+ z__2.r = za->r * ZX(i).r - za->i * ZX(i).i, z__2.i = za->r * ZX(
+ i).i + za->i * ZX(i).r;
+ z__1.r = ZY(i).r + z__2.r, z__1.i = ZY(i).i + z__2.i;
+ ZY(i).r = z__1.r, ZY(i).i = z__1.i;
+/* L30: */
+ }
+ return 0;
+} /* zaxpy_ */
+
diff --git a/CBLAS/zcopy.c b/CBLAS/zcopy.c
new file mode 100644
index 0000000..4cec89c
--- /dev/null
+++ b/CBLAS/zcopy.c
@@ -0,0 +1,74 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zcopy_(integer *n, doublecomplex *zx, integer *incx,
+ doublecomplex *zy, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+
+ /* Local variables */
+ static integer i, ix, iy;
+
+
+/* copies a vector, x, to a vector, y.
+ jack dongarra, linpack, 4/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define ZY(I) zy[(I)-1]
+#define ZX(I) zx[(I)-1]
+
+
+ if (*n <= 0) {
+ return 0;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = ix;
+ ZY(iy).r = ZX(ix).r, ZY(iy).i = ZX(ix).i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ return 0;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ ZY(i).r = ZX(i).r, ZY(i).i = ZX(i).i;
+/* L30: */
+ }
+ return 0;
+} /* zcopy_ */
+
diff --git a/CBLAS/zdotc.c b/CBLAS/zdotc.c
new file mode 100644
index 0000000..63ba4fb
--- /dev/null
+++ b/CBLAS/zdotc.c
@@ -0,0 +1,85 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Double Complex */ VOID zdotc_(doublecomplex * ret_val, integer *n,
+ doublecomplex *zx, integer *incx, doublecomplex *zy, integer *incy)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer i;
+ static doublecomplex ztemp;
+ static integer ix, iy;
+
+
+/* forms the dot product of a vector.
+ jack dongarra, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+ Parameter adjustments */
+ --zy;
+ --zx;
+
+ /* Function Body */
+ ztemp.r = 0., ztemp.i = 0.;
+ ret_val->r = 0., ret_val->i = 0.;
+ if (*n <= 0) {
+ return ;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ d_cnjg(&z__3, &zx[ix]);
+ i__2 = iy;
+ z__2.r = z__3.r * zy[iy].r - z__3.i * zy[iy].i, z__2.i = z__3.r *
+ zy[iy].i + z__3.i * zy[iy].r;
+ z__1.r = ztemp.r + z__2.r, z__1.i = ztemp.i + z__2.i;
+ ztemp.r = z__1.r, ztemp.i = z__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ ret_val->r = ztemp.r, ret_val->i = ztemp.i;
+ return ;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ d_cnjg(&z__3, &zx[i]);
+ i__2 = i;
+ z__2.r = z__3.r * zy[i].r - z__3.i * zy[i].i, z__2.i = z__3.r *
+ zy[i].i + z__3.i * zy[i].r;
+ z__1.r = ztemp.r + z__2.r, z__1.i = ztemp.i + z__2.i;
+ ztemp.r = z__1.r, ztemp.i = z__1.i;
+/* L30: */
+ }
+ ret_val->r = ztemp.r, ret_val->i = ztemp.i;
+ return ;
+} /* zdotc_ */
+
diff --git a/CBLAS/zgemv.c b/CBLAS/zgemv.c
new file mode 100644
index 0000000..18e12bf
--- /dev/null
+++ b/CBLAS/zgemv.c
@@ -0,0 +1,400 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zgemv_(char *trans, integer *m, integer *n,
+ doublecomplex *alpha, doublecomplex *a, integer *lda, doublecomplex *
+ x, integer *incx, doublecomplex *beta, doublecomplex *y, integer *
+ incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer info;
+ static doublecomplex temp;
+ static integer lenx, leny, i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical noconj;
+
+
+/* Purpose
+ =======
+
+ ZGEMV performs one of the matrix-vector operations
+
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, or
+
+ y := alpha*conjg( A' )*x + beta*y,
+
+ where alpha and beta are scalars, x and y are vectors and A is an
+ m by n matrix.
+
+ Parameters
+ ==========
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+
+ TRANS = 'C' or 'c' y := alpha*conjg( A' )*x + beta*y.
+
+ Unchanged on exit.
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX*16 .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - COMPLEX*16 array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+ X - COMPLEX*16 array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - COMPLEX*16 .
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - COMPLEX*16 array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+
+ updated vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(trans, "N") && ! lsame_(trans, "T") && !
+ lsame_(trans, "C")) {
+ info = 1;
+ } else if (*m < 0) {
+ info = 2;
+ } else if (*n < 0) {
+ info = 3;
+ } else if (*lda < max(1,*m)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ } else if (*incy == 0) {
+ info = 11;
+ }
+ if (info != 0) {
+ xerbla_("ZGEMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || alpha->r == 0. && alpha->i == 0. && (beta->r ==
+ 1. && beta->i == 0.)) {
+ return 0;
+ }
+
+ noconj = lsame_(trans, "T");
+
+/* Set LENX and LENY, the lengths of the vectors x and y, and set
+
+ up the start points in X and Y. */
+
+ if (lsame_(trans, "N")) {
+ lenx = *n;
+ leny = *m;
+ } else {
+ lenx = *m;
+ leny = *n;
+ }
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (lenx - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (leny - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A.
+
+ First form y := beta*y. */
+
+ if (beta->r != 1. || beta->i != 0.) {
+ if (*incy == 1) {
+ if (beta->r == 0. && beta->i == 0.) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = i;
+ Y(i).r = 0., Y(i).i = 0.;
+/* L10: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = i;
+ i__3 = i;
+ z__1.r = beta->r * Y(i).r - beta->i * Y(i).i,
+ z__1.i = beta->r * Y(i).i + beta->i * Y(i)
+ .r;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (beta->r == 0. && beta->i == 0.) {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = iy;
+ Y(iy).r = 0., Y(iy).i = 0.;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = leny;
+ for (i = 1; i <= leny; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ z__1.r = beta->r * Y(iy).r - beta->i * Y(iy).i,
+ z__1.i = beta->r * Y(iy).i + beta->i * Y(iy)
+ .r;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (alpha->r == 0. && alpha->i == 0.) {
+ return 0;
+ }
+ if (lsame_(trans, "N")) {
+
+/* Form y := alpha*A*x + y. */
+
+ jx = kx;
+ if (*incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ if (X(jx).r != 0. || X(jx).i != 0.) {
+ i__2 = jx;
+ z__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ z__1.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ temp.r = z__1.r, temp.i = z__1.i;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ z__2.i = temp.r * A(i,j).i + temp.i * A(i,j)
+ .r;
+ z__1.r = Y(i).r + z__2.r, z__1.i = Y(i).i +
+ z__2.i;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+/* L50: */
+ }
+ }
+ jx += *incx;
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ if (X(jx).r != 0. || X(jx).i != 0.) {
+ i__2 = jx;
+ z__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ z__1.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ temp.r = z__1.r, temp.i = z__1.i;
+ iy = ky;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ z__2.i = temp.r * A(i,j).i + temp.i * A(i,j)
+ .r;
+ z__1.r = Y(iy).r + z__2.r, z__1.i = Y(iy).i +
+ z__2.i;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ iy += *incy;
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y := alpha*A'*x + y or y := alpha*conjg( A' )*x + y.
+ */
+
+ jy = ky;
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp.r = 0., temp.i = 0.;
+ if (noconj) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ z__2.r = A(i,j).r * X(i).r - A(i,j).i * X(i)
+ .i, z__2.i = A(i,j).r * X(i).i + A(i,j)
+ .i * X(i).r;
+ z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+/* L90: */
+ }
+ } else {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = i;
+ z__2.r = z__3.r * X(i).r - z__3.i * X(i).i,
+ z__2.i = z__3.r * X(i).i + z__3.i * X(i)
+ .r;
+ z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+/* L100: */
+ }
+ }
+ i__2 = jy;
+ i__3 = jy;
+ z__2.r = alpha->r * temp.r - alpha->i * temp.i, z__2.i =
+ alpha->r * temp.i + alpha->i * temp.r;
+ z__1.r = Y(jy).r + z__2.r, z__1.i = Y(jy).i + z__2.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ jy += *incy;
+/* L110: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ temp.r = 0., temp.i = 0.;
+ ix = kx;
+ if (noconj) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ z__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(ix)
+ .i, z__2.i = A(i,j).r * X(ix).i + A(i,j)
+ .i * X(ix).r;
+ z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix += *incx;
+/* L120: */
+ }
+ } else {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = ix;
+ z__2.r = z__3.r * X(ix).r - z__3.i * X(ix).i,
+ z__2.i = z__3.r * X(ix).i + z__3.i * X(ix)
+ .r;
+ z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix += *incx;
+/* L130: */
+ }
+ }
+ i__2 = jy;
+ i__3 = jy;
+ z__2.r = alpha->r * temp.r - alpha->i * temp.i, z__2.i =
+ alpha->r * temp.i + alpha->i * temp.r;
+ z__1.r = Y(jy).r + z__2.r, z__1.i = Y(jy).i + z__2.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ jy += *incy;
+/* L140: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZGEMV . */
+
+} /* zgemv_ */
+
diff --git a/CBLAS/zgerc.c b/CBLAS/zgerc.c
new file mode 100644
index 0000000..2fcd218
--- /dev/null
+++ b/CBLAS/zgerc.c
@@ -0,0 +1,206 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zgerc_(integer *m, integer *n, doublecomplex *alpha,
+ doublecomplex *x, integer *incx, doublecomplex *y, integer *incy,
+ doublecomplex *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ doublecomplex z__1, z__2;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer info;
+ static doublecomplex temp;
+ static integer i, j, ix, jy, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ ZGERC performs the rank 1 operation
+
+ A := alpha*x*conjg( y' ) + A,
+
+ where alpha is a scalar, x is an m element vector, y is an n element
+
+ vector and A is an m by n matrix.
+
+ Parameters
+ ==========
+
+ M - INTEGER.
+ On entry, M specifies the number of rows of the matrix A.
+ M must be at least zero.
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the number of columns of the matrix A.
+
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX*16 .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - COMPLEX*16 array of dimension at least
+ ( 1 + ( m - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the m
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - COMPLEX*16 array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - COMPLEX*16 array of DIMENSION ( LDA, n ).
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients. On exit, A is
+ overwritten by the updated matrix.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, m ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (*m < 0) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*m)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("ZGERC ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*m == 0 || *n == 0 || alpha->r == 0. && alpha->i == 0.) {
+ return 0;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (*incy > 0) {
+ jy = 1;
+ } else {
+ jy = 1 - (*n - 1) * *incy;
+ }
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jy;
+ if (Y(jy).r != 0. || Y(jy).i != 0.) {
+ d_cnjg(&z__2, &Y(jy));
+ z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
+ alpha->r * z__2.i + alpha->i * z__2.r;
+ temp.r = z__1.r, temp.i = z__1.i;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = i;
+ z__2.r = X(i).r * temp.r - X(i).i * temp.i, z__2.i =
+ X(i).r * temp.i + X(i).i * temp.r;
+ z__1.r = A(i,j).r + z__2.r, z__1.i = A(i,j).i + z__2.i;
+ A(i,j).r = z__1.r, A(i,j).i = z__1.i;
+/* L10: */
+ }
+ }
+ jy += *incy;
+/* L20: */
+ }
+ } else {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*m - 1) * *incx;
+ }
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jy;
+ if (Y(jy).r != 0. || Y(jy).i != 0.) {
+ d_cnjg(&z__2, &Y(jy));
+ z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
+ alpha->r * z__2.i + alpha->i * z__2.r;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix = kx;
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = ix;
+ z__2.r = X(ix).r * temp.r - X(ix).i * temp.i, z__2.i =
+ X(ix).r * temp.i + X(ix).i * temp.r;
+ z__1.r = A(i,j).r + z__2.r, z__1.i = A(i,j).i + z__2.i;
+ A(i,j).r = z__1.r, A(i,j).i = z__1.i;
+ ix += *incx;
+/* L30: */
+ }
+ }
+ jy += *incy;
+/* L40: */
+ }
+ }
+
+ return 0;
+
+/* End of ZGERC . */
+
+} /* zgerc_ */
+
diff --git a/CBLAS/zhemv.c b/CBLAS/zhemv.c
new file mode 100644
index 0000000..848f9db
--- /dev/null
+++ b/CBLAS/zhemv.c
@@ -0,0 +1,421 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zhemv_(char *uplo, integer *n, doublecomplex *alpha,
+ doublecomplex *a, integer *lda, doublecomplex *x, integer *incx,
+ doublecomplex *beta, doublecomplex *y, integer *incy)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ doublereal d__1;
+ doublecomplex z__1, z__2, z__3, z__4;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer info;
+ static doublecomplex temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ ZHEMV performs the matrix-vector operation
+
+ y := alpha*A*x + beta*y,
+
+ where alpha and beta are scalars, x and y are n element vectors and
+ A is an n by n hermitian matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX*16 .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - COMPLEX*16 array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the hermitian matrix and the strictly
+ lower triangular part of A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the hermitian matrix and the strictly
+ upper triangular part of A is not referenced.
+ Note that the imaginary parts of the diagonal elements need
+
+ not be set and are assumed to be zero.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - COMPLEX*16 array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - COMPLEX*16 .
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - COMPLEX*16 array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y. On exit, Y is overwritten by the updated
+ vector y.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*lda < max(1,*n)) {
+ info = 5;
+ } else if (*incx == 0) {
+ info = 7;
+ } else if (*incy == 0) {
+ info = 10;
+ }
+ if (info != 0) {
+ xerbla_("ZHEMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || alpha->r == 0. && alpha->i == 0. && (beta->r == 1. &&
+ beta->i == 0.)) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y. */
+
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A.
+
+ First form y := beta*y. */
+
+ if (beta->r != 1. || beta->i != 0.) {
+ if (*incy == 1) {
+ if (beta->r == 0. && beta->i == 0.) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ Y(i).r = 0., Y(i).i = 0.;
+/* L10: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ z__1.r = beta->r * Y(i).r - beta->i * Y(i).i,
+ z__1.i = beta->r * Y(i).i + beta->i * Y(i)
+ .r;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (beta->r == 0. && beta->i == 0.) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ Y(iy).r = 0., Y(iy).i = 0.;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ z__1.r = beta->r * Y(iy).r - beta->i * Y(iy).i,
+ z__1.i = beta->r * Y(iy).i + beta->i * Y(iy)
+ .r;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (alpha->r == 0. && alpha->i == 0.) {
+ return 0;
+ }
+ if (lsame_(uplo, "U")) {
+
+/* Form y when A is stored in upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ z__1.r = alpha->r * X(j).r - alpha->i * X(j).i, z__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(i).r + z__2.r, z__1.i = Y(i).i + z__2.i;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = i;
+ z__2.r = z__3.r * X(i).r - z__3.i * X(i).i, z__2.i =
+ z__3.r * X(i).i + z__3.i * X(i).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+/* L50: */
+ }
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ z__3.r = d__1 * temp1.r, z__3.i = d__1 * temp1.i;
+ z__2.r = Y(j).r + z__3.r, z__2.i = Y(j).i + z__3.i;
+ z__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ Y(j).r = z__1.r, Y(j).i = z__1.i;
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ z__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, z__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(iy).r + z__2.r, z__1.i = Y(iy).i + z__2.i;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = ix;
+ z__2.r = z__3.r * X(ix).r - z__3.i * X(ix).i, z__2.i =
+ z__3.r * X(ix).i + z__3.i * X(ix).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ z__3.r = d__1 * temp1.r, z__3.i = d__1 * temp1.i;
+ z__2.r = Y(jy).r + z__3.r, z__2.i = Y(jy).i + z__3.i;
+ z__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y when A is stored in lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ z__1.r = alpha->r * X(j).r - alpha->i * X(j).i, z__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ z__2.r = d__1 * temp1.r, z__2.i = d__1 * temp1.i;
+ z__1.r = Y(j).r + z__2.r, z__1.i = Y(j).i + z__2.i;
+ Y(j).r = z__1.r, Y(j).i = z__1.i;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(i).r + z__2.r, z__1.i = Y(i).i + z__2.i;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = i;
+ z__2.r = z__3.r * X(i).r - z__3.i * X(i).i, z__2.i =
+ z__3.r * X(i).i + z__3.i * X(i).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+/* L90: */
+ }
+ i__2 = j;
+ i__3 = j;
+ z__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = Y(j).r + z__2.r, z__1.i = Y(j).i + z__2.i;
+ Y(j).r = z__1.r, Y(j).i = z__1.i;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ z__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, z__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ z__2.r = d__1 * temp1.r, z__2.i = d__1 * temp1.i;
+ z__1.r = Y(jy).r + z__2.r, z__1.i = Y(jy).i + z__2.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(iy).r + z__2.r, z__1.i = Y(iy).i + z__2.i;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = ix;
+ z__2.r = z__3.r * X(ix).r - z__3.i * X(ix).i, z__2.i =
+ z__3.r * X(ix).i + z__3.i * X(ix).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+/* L110: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ z__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = Y(jy).r + z__2.r, z__1.i = Y(jy).i + z__2.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZHEMV . */
+
+} /* zhemv_ */
+
diff --git a/CBLAS/zher2.c b/CBLAS/zher2.c
new file mode 100644
index 0000000..ab1ceb7
--- /dev/null
+++ b/CBLAS/zher2.c
@@ -0,0 +1,437 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zher2_(char *uplo, integer *n, doublecomplex *alpha,
+ doublecomplex *x, integer *incx, doublecomplex *y, integer *incy,
+ doublecomplex *a, integer *lda)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+ doublereal d__1;
+ doublecomplex z__1, z__2, z__3, z__4;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer info;
+ static doublecomplex temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+/* Purpose
+ =======
+
+ ZHER2 performs the hermitian rank 2 operation
+
+ A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,
+
+ where alpha is a scalar, x and y are n element vectors and A is an n
+
+ by n hermitian matrix.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX*16 .
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ X - COMPLEX*16 array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ Y - COMPLEX*16 array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y.
+ Unchanged on exit.
+
+ INCY - INTEGER.
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ A - COMPLEX*16 array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the hermitian matrix and the strictly
+ lower triangular part of A is not referenced. On exit, the
+ upper triangular part of the array A is overwritten by the
+ upper triangular part of the updated matrix.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the hermitian matrix and the strictly
+ upper triangular part of A is not referenced. On exit, the
+ lower triangular part of the array A is overwritten by the
+ lower triangular part of the updated matrix.
+ Note that the imaginary parts of the diagonal elements need
+
+ not be set, they are assumed to be zero, and on exit they
+ are set to zero.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*incx == 0) {
+ info = 5;
+ } else if (*incy == 0) {
+ info = 7;
+ } else if (*lda < max(1,*n)) {
+ info = 9;
+ }
+ if (info != 0) {
+ xerbla_("ZHER2 ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || alpha->r == 0. && alpha->i == 0.) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y if the increments are not both
+
+ unity. */
+
+ if (*incx != 1 || *incy != 1) {
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+ jx = kx;
+ jy = ky;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A. */
+
+ if (lsame_(uplo, "U")) {
+
+/* Form A when A is stored in the upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ i__3 = j;
+ if (X(j).r != 0. || X(j).i != 0. || (Y(j).r != 0. ||
+ Y(j).i != 0.)) {
+ d_cnjg(&z__2, &Y(j));
+ z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
+ alpha->r * z__2.i + alpha->i * z__2.r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ i__2 = j;
+ z__2.r = alpha->r * X(j).r - alpha->i * X(j).i,
+ z__2.i = alpha->r * X(j).i + alpha->i * X(j)
+ .r;
+ d_cnjg(&z__1, &z__2);
+ temp2.r = z__1.r, temp2.i = z__1.i;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = i;
+ z__3.r = X(i).r * temp1.r - X(i).i * temp1.i,
+ z__3.i = X(i).r * temp1.i + X(i).i *
+ temp1.r;
+ z__2.r = A(i,j).r + z__3.r, z__2.i = A(i,j).i +
+ z__3.i;
+ i__6 = i;
+ z__4.r = Y(i).r * temp2.r - Y(i).i * temp2.i,
+ z__4.i = Y(i).r * temp2.i + Y(i).i *
+ temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ A(i,j).r = z__1.r, A(i,j).i = z__1.i;
+/* L10: */
+ }
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = j;
+ z__2.r = X(j).r * temp1.r - X(j).i * temp1.i,
+ z__2.i = X(j).r * temp1.i + X(j).i *
+ temp1.r;
+ i__5 = j;
+ z__3.r = Y(j).r * temp2.r - Y(j).i * temp2.i,
+ z__3.i = Y(j).r * temp2.i + Y(j).i *
+ temp2.r;
+ z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
+ d__1 = A(j,j).r + z__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ }
+/* L20: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ i__3 = jy;
+ if (X(jx).r != 0. || X(jx).i != 0. || (Y(jy).r != 0. ||
+ Y(jy).i != 0.)) {
+ d_cnjg(&z__2, &Y(jy));
+ z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
+ alpha->r * z__2.i + alpha->i * z__2.r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ i__2 = jx;
+ z__2.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ z__2.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ d_cnjg(&z__1, &z__2);
+ temp2.r = z__1.r, temp2.i = z__1.i;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = ix;
+ z__3.r = X(ix).r * temp1.r - X(ix).i * temp1.i,
+ z__3.i = X(ix).r * temp1.i + X(ix).i *
+ temp1.r;
+ z__2.r = A(i,j).r + z__3.r, z__2.i = A(i,j).i +
+ z__3.i;
+ i__6 = iy;
+ z__4.r = Y(iy).r * temp2.r - Y(iy).i * temp2.i,
+ z__4.i = Y(iy).r * temp2.i + Y(iy).i *
+ temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ A(i,j).r = z__1.r, A(i,j).i = z__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L30: */
+ }
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = jx;
+ z__2.r = X(jx).r * temp1.r - X(jx).i * temp1.i,
+ z__2.i = X(jx).r * temp1.i + X(jx).i *
+ temp1.r;
+ i__5 = jy;
+ z__3.r = Y(jy).r * temp2.r - Y(jy).i * temp2.i,
+ z__3.i = Y(jy).r * temp2.i + Y(jy).i *
+ temp2.r;
+ z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
+ d__1 = A(j,j).r + z__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ }
+ jx += *incx;
+ jy += *incy;
+/* L40: */
+ }
+ }
+ } else {
+
+/* Form A when A is stored in the lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ i__3 = j;
+ if (X(j).r != 0. || X(j).i != 0. || (Y(j).r != 0. ||
+ Y(j).i != 0.)) {
+ d_cnjg(&z__2, &Y(j));
+ z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
+ alpha->r * z__2.i + alpha->i * z__2.r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ i__2 = j;
+ z__2.r = alpha->r * X(j).r - alpha->i * X(j).i,
+ z__2.i = alpha->r * X(j).i + alpha->i * X(j)
+ .r;
+ d_cnjg(&z__1, &z__2);
+ temp2.r = z__1.r, temp2.i = z__1.i;
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = j;
+ z__2.r = X(j).r * temp1.r - X(j).i * temp1.i,
+ z__2.i = X(j).r * temp1.i + X(j).i *
+ temp1.r;
+ i__5 = j;
+ z__3.r = Y(j).r * temp2.r - Y(j).i * temp2.i,
+ z__3.i = Y(j).r * temp2.i + Y(j).i *
+ temp2.r;
+ z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
+ d__1 = A(j,j).r + z__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = i;
+ z__3.r = X(i).r * temp1.r - X(i).i * temp1.i,
+ z__3.i = X(i).r * temp1.i + X(i).i *
+ temp1.r;
+ z__2.r = A(i,j).r + z__3.r, z__2.i = A(i,j).i +
+ z__3.i;
+ i__6 = i;
+ z__4.r = Y(i).r * temp2.r - Y(i).i * temp2.i,
+ z__4.i = Y(i).r * temp2.i + Y(i).i *
+ temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ A(i,j).r = z__1.r, A(i,j).i = z__1.i;
+/* L50: */
+ }
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ }
+/* L60: */
+ }
+ } else {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ i__3 = jy;
+ if (X(jx).r != 0. || X(jx).i != 0. || (Y(jy).r != 0. ||
+ Y(jy).i != 0.)) {
+ d_cnjg(&z__2, &Y(jy));
+ z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
+ alpha->r * z__2.i + alpha->i * z__2.r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ i__2 = jx;
+ z__2.r = alpha->r * X(jx).r - alpha->i * X(jx).i,
+ z__2.i = alpha->r * X(jx).i + alpha->i * X(jx)
+ .r;
+ d_cnjg(&z__1, &z__2);
+ temp2.r = z__1.r, temp2.i = z__1.i;
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ i__4 = jx;
+ z__2.r = X(jx).r * temp1.r - X(jx).i * temp1.i,
+ z__2.i = X(jx).r * temp1.i + X(jx).i *
+ temp1.r;
+ i__5 = jy;
+ z__3.r = Y(jy).r * temp2.r - Y(jy).i * temp2.i,
+ z__3.i = Y(jy).r * temp2.i + Y(jy).i *
+ temp2.r;
+ z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
+ d__1 = A(j,j).r + z__1.r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ i__3 = i + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ i__5 = ix;
+ z__3.r = X(ix).r * temp1.r - X(ix).i * temp1.i,
+ z__3.i = X(ix).r * temp1.i + X(ix).i *
+ temp1.r;
+ z__2.r = A(i,j).r + z__3.r, z__2.i = A(i,j).i +
+ z__3.i;
+ i__6 = iy;
+ z__4.r = Y(iy).r * temp2.r - Y(iy).i * temp2.i,
+ z__4.i = Y(iy).r * temp2.i + Y(iy).i *
+ temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ A(i,j).r = z__1.r, A(i,j).i = z__1.i;
+/* L70: */
+ }
+ } else {
+ i__2 = j + j * a_dim1;
+ i__3 = j + j * a_dim1;
+ d__1 = A(j,j).r;
+ A(j,j).r = d__1, A(j,j).i = 0.;
+ }
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZHER2 . */
+
+} /* zher2_ */
+
diff --git a/CBLAS/zmyblas2.c b/CBLAS/zmyblas2.c
new file mode 100644
index 0000000..59450cd
--- /dev/null
+++ b/CBLAS/zmyblas2.c
@@ -0,0 +1,183 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: zmyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+#include "dcomplex.h"
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void zlsolve ( int ldm, int ncol, doublecomplex *M, doublecomplex *rhs )
+{
+ int k;
+ doublecomplex x0, x1, x2, x3, temp;
+ doublecomplex *M0;
+ doublecomplex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x1, &rhs[firstcol+1], &temp);
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x2, &rhs[firstcol+2], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&x2, &x2, &temp);
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x3, &rhs[firstcol+3], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&x3, &x3, &temp);
+ zz_mult(&temp, &x2, Mki2); Mki2++;
+ z_sub(&x3, &x3, &temp);
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x2, Mki2); Mki2++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x3, Mki3); Mki3++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ }
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x1, &rhs[firstcol+1], &temp);
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ }
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+zusolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+doublecomplex *M; /* in */
+doublecomplex *rhs; /* modified */
+{
+ doublecomplex xj, temp;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ z_div(&xj, &rhs[jcol], &M[jcol + jcol*ldm]); /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++) {
+ zz_mult(&temp, &xj, &M[irow+jcol*ldm]); /* M(irow, jcol) */
+ z_sub(&rhs[irow], &rhs[irow], &temp);
+ }
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void zmatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+doublecomplex *M; /* in */
+doublecomplex *vec; /* in */
+doublecomplex *Mxvec; /* in/out */
+{
+ doublecomplex vi0, vi1, vi2, vi3;
+ doublecomplex *M0, temp;
+ doublecomplex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ zz_mult(&temp, &vi0, Mki0); Mki0++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ zz_mult(&temp, &vi1, Mki1); Mki1++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ zz_mult(&temp, &vi2, Mki2); Mki2++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ zz_mult(&temp, &vi3, Mki3); Mki3++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ zz_mult(&temp, &vi0, Mki0); Mki0++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+ M0 += ldm;
+ }
+
+}
+
diff --git a/CBLAS/zscal.c b/CBLAS/zscal.c
new file mode 100644
index 0000000..b3d88bb
--- /dev/null
+++ b/CBLAS/zscal.c
@@ -0,0 +1,70 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int zscal_(integer *n, doublecomplex *za, doublecomplex *zx,
+ integer *incx)
+{
+
+
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ doublecomplex z__1;
+
+ /* Local variables */
+ static integer i, ix;
+
+
+/* scales a vector by a constant.
+ jack dongarra, 3/11/78.
+ modified 3/93 to return if incx .le. 0.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments
+ Function Body */
+#define ZX(I) zx[(I)-1]
+
+
+ if (*n <= 0 || *incx <= 0) {
+ return 0;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* code for increment not equal to 1 */
+
+ ix = 1;
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = ix;
+ i__3 = ix;
+ z__1.r = za->r * ZX(ix).r - za->i * ZX(ix).i, z__1.i = za->r * ZX(
+ ix).i + za->i * ZX(ix).r;
+ ZX(ix).r = z__1.r, ZX(ix).i = z__1.i;
+ ix += *incx;
+/* L10: */
+ }
+ return 0;
+
+/* code for increment equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ z__1.r = za->r * ZX(i).r - za->i * ZX(i).i, z__1.i = za->r * ZX(
+ i).i + za->i * ZX(i).r;
+ ZX(i).r = z__1.r, ZX(i).i = z__1.i;
+/* L30: */
+ }
+ return 0;
+} /* zscal_ */
+
diff --git a/CBLAS/ztrsv.c b/CBLAS/ztrsv.c
new file mode 100644
index 0000000..97b9d41
--- /dev/null
+++ b/CBLAS/ztrsv.c
@@ -0,0 +1,510 @@
+
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int ztrsv_(char *uplo, char *trans, char *diag, integer *n,
+ doublecomplex *a, integer *lda, doublecomplex *x, integer *incx)
+{
+
+
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *), d_cnjg(
+ doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer info;
+ static doublecomplex temp;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, jx, kx;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical noconj, nounit;
+
+
+/* Purpose
+ =======
+
+ ZTRSV solves one of the systems of equations
+
+ A*x = b, or A'*x = b, or conjg( A' )*x = b,
+
+ where b and x are n element vectors and A is an n by n unit, or
+ non-unit, upper or lower triangular matrix.
+
+ No test for singularity or near-singularity is included in this
+ routine. Such tests must be performed before calling this routine.
+
+ Parameters
+ ==========
+
+ UPLO - CHARACTER*1.
+ On entry, UPLO specifies whether the matrix is an upper or
+ lower triangular matrix as follows:
+
+ UPLO = 'U' or 'u' A is an upper triangular matrix.
+
+ UPLO = 'L' or 'l' A is a lower triangular matrix.
+
+ Unchanged on exit.
+
+ TRANS - CHARACTER*1.
+ On entry, TRANS specifies the equations to be solved as
+ follows:
+
+ TRANS = 'N' or 'n' A*x = b.
+
+ TRANS = 'T' or 't' A'*x = b.
+
+ TRANS = 'C' or 'c' conjg( A' )*x = b.
+
+ Unchanged on exit.
+
+ DIAG - CHARACTER*1.
+ On entry, DIAG specifies whether or not A is unit
+ triangular as follows:
+
+ DIAG = 'U' or 'u' A is assumed to be unit triangular.
+
+ DIAG = 'N' or 'n' A is not assumed to be unit
+ triangular.
+
+ Unchanged on exit.
+
+ N - INTEGER.
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ A - COMPLEX*16 array of DIMENSION ( LDA, n ).
+ Before entry with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular matrix and the strictly lower triangular part of
+
+ A is not referenced.
+ Before entry with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular matrix and the strictly upper triangular part of
+
+ A is not referenced.
+ Note that when DIAG = 'U' or 'u', the diagonal elements of
+
+ A are not referenced either, but are assumed to be unity.
+ Unchanged on exit.
+
+ LDA - INTEGER.
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, n ).
+ Unchanged on exit.
+
+ X - COMPLEX*16 array of dimension at least
+ ( 1 + ( n - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the n
+ element right-hand side vector b. On exit, X is overwritten
+
+ with the solution vector x.
+
+ INCX - INTEGER.
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+
+ Level 2 Blas routine.
+
+ -- Written on 22-October-1986.
+ Jack Dongarra, Argonne National Lab.
+ Jeremy Du Croz, Nag Central Office.
+ Sven Hammarling, Nag Central Office.
+ Richard Hanson, Sandia National Labs.
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+#define X(I) x[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (! lsame_(trans, "N") && ! lsame_(trans, "T") &&
+ ! lsame_(trans, "C")) {
+ info = 2;
+ } else if (! lsame_(diag, "U") && ! lsame_(diag, "N")) {
+ info = 3;
+ } else if (*n < 0) {
+ info = 4;
+ } else if (*lda < max(1,*n)) {
+ info = 6;
+ } else if (*incx == 0) {
+ info = 8;
+ }
+ if (info != 0) {
+ xerbla_("ZTRSV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+ noconj = lsame_(trans, "T");
+ nounit = lsame_(diag, "N");
+
+/* Set up the start point in X if the increment is not unity. This
+ will be ( N - 1 )*INCX too small for descending loops. */
+
+ if (*incx <= 0) {
+ kx = 1 - (*n - 1) * *incx;
+ } else if (*incx != 1) {
+ kx = 1;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+
+ if (lsame_(trans, "N")) {
+
+/* Form x := inv( A )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ i__1 = j;
+ if (X(j).r != 0. || X(j).i != 0.) {
+ if (nounit) {
+ i__1 = j;
+ z_div(&z__1, &X(j), &A(j,j));
+ X(j).r = z__1.r, X(j).i = z__1.i;
+ }
+ i__1 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ for (i = j - 1; i >= 1; --i) {
+ i__1 = i;
+ i__2 = i;
+ i__3 = i + j * a_dim1;
+ z__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ z__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ z__1.r = X(i).r - z__2.r, z__1.i = X(i).i -
+ z__2.i;
+ X(i).r = z__1.r, X(i).i = z__1.i;
+/* L10: */
+ }
+ }
+/* L20: */
+ }
+ } else {
+ jx = kx + (*n - 1) * *incx;
+ for (j = *n; j >= 1; --j) {
+ i__1 = jx;
+ if (X(jx).r != 0. || X(jx).i != 0.) {
+ if (nounit) {
+ i__1 = jx;
+ z_div(&z__1, &X(jx), &A(j,j));
+ X(jx).r = z__1.r, X(jx).i = z__1.i;
+ }
+ i__1 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ ix = jx;
+ for (i = j - 1; i >= 1; --i) {
+ ix -= *incx;
+ i__1 = ix;
+ i__2 = ix;
+ i__3 = i + j * a_dim1;
+ z__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ z__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ z__1.r = X(ix).r - z__2.r, z__1.i = X(ix).i -
+ z__2.i;
+ X(ix).r = z__1.r, X(ix).i = z__1.i;
+/* L30: */
+ }
+ }
+ jx -= *incx;
+/* L40: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ if (X(j).r != 0. || X(j).i != 0.) {
+ if (nounit) {
+ i__2 = j;
+ z_div(&z__1, &X(j), &A(j,j));
+ X(j).r = z__1.r, X(j).i = z__1.i;
+ }
+ i__2 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ z__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ z__1.r = X(i).r - z__2.r, z__1.i = X(i).i -
+ z__2.i;
+ X(i).r = z__1.r, X(i).i = z__1.i;
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ if (X(jx).r != 0. || X(jx).i != 0.) {
+ if (nounit) {
+ i__2 = jx;
+ z_div(&z__1, &X(jx), &A(j,j));
+ X(jx).r = z__1.r, X(jx).i = z__1.i;
+ }
+ i__2 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ ix = jx;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ i__3 = ix;
+ i__4 = ix;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp.r * A(i,j).r - temp.i * A(i,j).i,
+ z__2.i = temp.r * A(i,j).i + temp.i * A(i,j).r;
+ z__1.r = X(ix).r - z__2.r, z__1.i = X(ix).i -
+ z__2.i;
+ X(ix).r = z__1.r, X(ix).i = z__1.i;
+/* L70: */
+ }
+ }
+ jx += *incx;
+/* L80: */
+ }
+ }
+ }
+ } else {
+
+/* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x. */
+
+ if (lsame_(uplo, "U")) {
+ if (*incx == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ if (noconj) {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ z__2.r = A(i,j).r * X(i).r - A(i,j).i * X(
+ i).i, z__2.i = A(i,j).r * X(i).i +
+ A(i,j).i * X(i).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+/* L90: */
+ }
+ if (nounit) {
+ z_div(&z__1, &temp, &A(j,j));
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ } else {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = i;
+ z__2.r = z__3.r * X(i).r - z__3.i * X(i).i,
+ z__2.i = z__3.r * X(i).i + z__3.i * X(
+ i).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+/* L100: */
+ }
+ if (nounit) {
+ d_cnjg(&z__2, &A(j,j));
+ z_div(&z__1, &temp, &z__2);
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ }
+ i__2 = j;
+ X(j).r = temp.r, X(j).i = temp.i;
+/* L110: */
+ }
+ } else {
+ jx = kx;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ ix = kx;
+ i__2 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ if (noconj) {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ z__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(
+ ix).i, z__2.i = A(i,j).r * X(ix).i +
+ A(i,j).i * X(ix).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix += *incx;
+/* L120: */
+ }
+ if (nounit) {
+ z_div(&z__1, &temp, &A(j,j));
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ } else {
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ d_cnjg(&z__3, &A(i,j));
+ i__3 = ix;
+ z__2.r = z__3.r * X(ix).r - z__3.i * X(ix).i,
+ z__2.i = z__3.r * X(ix).i + z__3.i * X(
+ ix).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix += *incx;
+/* L130: */
+ }
+ if (nounit) {
+ d_cnjg(&z__2, &A(j,j));
+ z_div(&z__1, &temp, &z__2);
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ }
+ i__2 = jx;
+ X(jx).r = temp.r, X(jx).i = temp.i;
+ jx += *incx;
+/* L140: */
+ }
+ }
+ } else {
+ if (*incx == 1) {
+ for (j = *n; j >= 1; --j) {
+ i__1 = j;
+ temp.r = X(j).r, temp.i = X(j).i;
+ if (noconj) {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ i__2 = i + j * a_dim1;
+ i__3 = i;
+ z__2.r = A(i,j).r * X(i).r - A(i,j).i * X(
+ i).i, z__2.i = A(i,j).r * X(i).i +
+ A(i,j).i * X(i).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+/* L150: */
+ }
+ if (nounit) {
+ z_div(&z__1, &temp, &A(j,j));
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ } else {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ d_cnjg(&z__3, &A(i,j));
+ i__2 = i;
+ z__2.r = z__3.r * X(i).r - z__3.i * X(i).i,
+ z__2.i = z__3.r * X(i).i + z__3.i * X(
+ i).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+/* L160: */
+ }
+ if (nounit) {
+ d_cnjg(&z__2, &A(j,j));
+ z_div(&z__1, &temp, &z__2);
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ }
+ i__1 = j;
+ X(j).r = temp.r, X(j).i = temp.i;
+/* L170: */
+ }
+ } else {
+ kx += (*n - 1) * *incx;
+ jx = kx;
+ for (j = *n; j >= 1; --j) {
+ ix = kx;
+ i__1 = jx;
+ temp.r = X(jx).r, temp.i = X(jx).i;
+ if (noconj) {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ i__2 = i + j * a_dim1;
+ i__3 = ix;
+ z__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(
+ ix).i, z__2.i = A(i,j).r * X(ix).i +
+ A(i,j).i * X(ix).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix -= *incx;
+/* L180: */
+ }
+ if (nounit) {
+ z_div(&z__1, &temp, &A(j,j));
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ } else {
+ i__1 = j + 1;
+ for (i = *n; i >= j+1; --i) {
+ d_cnjg(&z__3, &A(i,j));
+ i__2 = ix;
+ z__2.r = z__3.r * X(ix).r - z__3.i * X(ix).i,
+ z__2.i = z__3.r * X(ix).i + z__3.i * X(
+ ix).r;
+ z__1.r = temp.r - z__2.r, z__1.i = temp.i -
+ z__2.i;
+ temp.r = z__1.r, temp.i = z__1.i;
+ ix -= *incx;
+/* L190: */
+ }
+ if (nounit) {
+ d_cnjg(&z__2, &A(j,j));
+ z_div(&z__1, &temp, &z__2);
+ temp.r = z__1.r, temp.i = z__1.i;
+ }
+ }
+ i__1 = jx;
+ X(jx).r = temp.r, X(jx).i = temp.i;
+ jx -= *incx;
+/* L200: */
+ }
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZTRSV . */
+
+} /* ztrsv_ */
+
diff --git a/EXAMPLE/Makefile b/EXAMPLE/Makefile
new file mode 100644
index 0000000..f3275cc
--- /dev/null
+++ b/EXAMPLE/Makefile
@@ -0,0 +1,161 @@
+include ../make.inc
+
+#######################################################################
+# This makefile creates the example programs for the linear equation
+# routines in SuperLU. The files are grouped as follows:
+#
+# SLINEXM -- Single precision real example routines
+# DLINEXM -- Double precision real example routines
+# CLINEXM -- Double precision complex example routines
+# ZLINEXM -- Double precision complex example routines
+#
+# Example programs can be generated for all or some of the four different
+# precisions. Enter make followed by one or more of the data types
+# desired. Some examples:
+# make single
+# make single double
+# Alternatively, the command
+# make
+# without any arguments creates all four example programs.
+# The executable files are called
+# slinsol slinsolx
+# dlinsol dlinsolx
+# clinsol clinsolx
+# zlinsol zlinsolx
+#
+# To remove the object files after the executable files have been
+# created, enter
+# make clean
+# On some systems, you can force the source files to be recompiled by
+# entering (for example)
+# make single FRC=FRC
+#
+#######################################################################
+
+HEADER = ../SRC
+
+SLINEXM = slinsol.o
+SLINEXM1 = slinsol1.o
+SLINXEXM = slinsolx.o
+SLINXEXM1 = slinsolx1.o
+SLINXEXM2 = slinsolx2.o
+
+DLINEXM = dlinsol.o
+DLINEXM1 = dlinsol1.o
+DLINXEXM = dlinsolx.o
+DLINXEXM1 = dlinsolx1.o
+DLINXEXM2 = dlinsolx2.o
+SUPERLUEXM = superlu.o sp_ienv.o
+
+CLINEXM = clinsol.o
+CLINEXM1 = clinsol1.o
+CLINXEXM = clinsolx.o
+CLINXEXM1 = clinsolx1.o
+CLINXEXM2 = clinsolx2.o
+
+ZLINEXM = zlinsol.o
+ZLINEXM1 = zlinsol1.o
+ZLINXEXM = zlinsolx.o
+ZLINXEXM1 = zlinsolx1.o
+ZLINXEXM2 = zlinsolx2.o
+
+
+all: single double complex complex16
+
+single: slinsol slinsol1 slinsolx slinsolx1 slinsolx2
+double: dlinsol dlinsol1 dlinsolx dlinsolx1 dlinsolx2 superlu
+complex: clinsol clinsol1 clinsolx clinsolx1 clinsolx2
+complex16: zlinsol zlinsol1 zlinsolx zlinsolx1 zlinsolx2
+
+slinsol: $(SLINEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(SLINEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+slinsol1: $(SLINEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(SLINEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+slinsolx: $(SLINXEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(SLINXEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+slinsolx1: $(SLINXEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(SLINXEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+slinsolx2: $(SLINXEXM2) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(SLINXEXM2) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+dlinsol: $(DLINEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(DLINEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+dlinsol1: $(DLINEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(DLINEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+dlinsolx: $(DLINXEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(DLINXEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+dlinsolx1: $(DLINXEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(DLINXEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+dlinsolx2: $(DLINXEXM2) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(DLINXEXM2) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+superlu: $(SUPERLUEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(SUPERLUEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+clinsol: $(CLINEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(CLINEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+clinsol1: $(CLINEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(CLINEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+clinsolx: $(CLINXEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(CLINXEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+clinsolx1: $(CLINXEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(CLINXEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+clinsolx2: $(CLINXEXM2) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(CLINXEXM2) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+zlinsol: $(ZLINEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(ZLINEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+zlinsol1: $(ZLINEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(ZLINEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+zlinsolx: $(ZLINXEXM) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(ZLINXEXM) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+zlinsolx1: $(ZLINXEXM1) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(ZLINXEXM1) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+zlinsolx2: $(ZLINXEXM2) ../$(SUPERLULIB)
+ $(LOADER) $(LOADOPTS) $(ZLINXEXM2) \
+ ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+.c.o:
+ $(CC) $(CFLAGS) -I$(HEADER) -c $< $(VERBOSE)
+
+.f.o:
+ $(FORTRAN) $(FFLAGS) -c $< $(VERBOSE)
+
+clean:
+ rm -f *.o *linsol *linsol1 *linsolx *linsolx1 *linsolx2 superlu
diff --git a/EXAMPLE/README b/EXAMPLE/README
new file mode 100644
index 0000000..88d993b
--- /dev/null
+++ b/EXAMPLE/README
@@ -0,0 +1,34 @@
+ SuperLU EXAMPLES
+
+This directory contains sample programs to illustrate how to use
+various functions provded in SuperLU. You can modify these
+examples to suit your applications.
+
+Here are the descriptions of the double precision examples:
+ dlinsol : use simple driver DGSSV to solve a linear system one time.
+ dlinsol1: use simple driver DGSSV in the symmetric mode.
+ dlinsolx: use DGSSVX with the full (default) options to solve a
+ linear system.
+ dlinsolx1: use DGSSVX to factorize A first, then solve the system later.
+ dlinsolx2: use DGSSVX to solve systems repeatedly with the same sparsity
+ pattern of matrix A.
+ superlu : the small 5x5 sample program in Section 2 of the Users' Guide.
+
+To compile all the examples, type:
+ % make
+
+To run the small 5x5 sample program in Section 1 of the Users' Guide, type:
+ % superlu
+
+To run the real version examples, type:
+ % dlinsol < g10 (or, % slinsol < g10)
+ % dlinsolx < g10 (or, % slinsolx < g10)
+ % dlinsolx1 < g10 (or, % slinsolx1 < g10)
+ % dlinsolx2 < g10 (or, % slinsolx2 < g10)
+
+To run the complex version examples, type:
+ % zlinsol < cmat (or, % clinsol < cmat)
+ % zlinsolx < cmat (or, % clinsolx < cmat)
+ % zlinsolx1 < cmat (or, % clinsolx1 < cmat)
+ % zlinsolx2 < cmat (or, % clinsolx2 < cmat)
+
diff --git a/EXAMPLE/clinsol.c b/EXAMPLE/clinsol.c
new file mode 100644
index 0000000..567bffe
--- /dev/null
+++ b/EXAMPLE/clinsol.c
@@ -0,0 +1,116 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ complex *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ complex *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Read the matrix in Harwell-Boeing format. */
+ creadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ cCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_C, SLU_GE);
+ xact = complexMalloc(n * nrhs);
+ ldx = n;
+ cGenXtrue(n, nrhs, xact, ldx);
+ cFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ cgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ complex *sol = (complex*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ cinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ cQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("cgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ cQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/clinsol1.c b/EXAMPLE/clinsol1.c
new file mode 100644
index 0000000..f72c9c8
--- /dev/null
+++ b/EXAMPLE/clinsol1.c
@@ -0,0 +1,121 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ complex *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ complex *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Now we modify the default options to use the symmetric mode. */
+ options.SymmetricMode = YES;
+ options.ColPerm = MMD_AT_PLUS_A;
+ options.DiagPivotThresh = 0.001;
+
+ /* Read the matrix in Harwell-Boeing format. */
+ creadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ cCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_C, SLU_GE);
+ xact = complexMalloc(n * nrhs);
+ ldx = n;
+ cGenXtrue(n, nrhs, xact, ldx);
+ cFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ cgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ complex *sol = (complex*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ cinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ cQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("cgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ cQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/clinsolx.c b/EXAMPLE/clinsolx.c
new file mode 100644
index 0000000..340cf9d
--- /dev/null
+++ b/EXAMPLE/clinsolx.c
@@ -0,0 +1,209 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+main(int argc, char *argv[])
+{
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ complex *a;
+ int *asub, *xa;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ complex *rhsb, *rhsx, *xact;
+ float *R, *C;
+ float *ferr, *berr;
+ float u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ /* Add more functionalities that the defaults. */
+ options.PivotGrowth = YES; /* Compute reciprocal pivot growth */
+ options.ConditionNumber = YES;/* Compute reciprocal condition number */
+ options.IterRefine = SINGLE; /* Perform single-precision refinement */
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("CLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ creadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ cCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_C, SLU_GE);
+ cCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_C, SLU_GE);
+ xact = complexMalloc(n * nrhs);
+ ldx = n;
+ cGenXtrue(n, nrhs, xact, ldx);
+ cFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (float *) SUPERLU_MALLOC(A.nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (float *) SUPERLU_MALLOC(A.ncol * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Solve the system and compute the condition number
+ and error bounds using dgssvx. */
+
+ cgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("cgssvx(): info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ complex *sol = (complex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth == YES )
+ printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber == YES )
+ printf("Recip. condition number = %e\n", rcond);
+ if ( options.IterRefine != NOREFINE ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+
+/*
+ * Parse command line inputs.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ float *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/clinsolx1.c b/EXAMPLE/clinsolx1.c
new file mode 100644
index 0000000..f5283dd
--- /dev/null
+++ b/EXAMPLE/clinsolx1.c
@@ -0,0 +1,237 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program CLINSOLX1.
+ *
+ * This example illustrates how to use CGSSVX to solve systems with the same
+ * A but different right-hand side.
+ * In this case, we factorize A only once in the first call to DGSSVX,
+ * and reuse the following data structures in the subsequent call to CGSSVX:
+ * perm_c, perm_r, R, C, L, U.
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ complex *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ complex *rhsb, *rhsx, *xact;
+ float *R, *C;
+ float *ferr, *berr;
+ float u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default values for options argument:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("CLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ creadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ cCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_C, SLU_GE);
+ cCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_C, SLU_GE);
+ xact = complexMalloc(n * nrhs);
+ ldx = n;
+ cGenXtrue(n, nrhs, xact, ldx);
+ cFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (float *) SUPERLU_MALLOC(A.nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (float *) SUPERLU_MALLOC(A.ncol * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ B.ncol = 0; /* Indicate not to solve the system */
+ cgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("LU factorization: cgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE THE LINEAR SYSTEM USING THE FACTORED FORM OF A.
+ ------------------------------------------------------------*/
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ B.ncol = nrhs; /* Set the number of right-hand side */
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ cgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("Triangular solve: cgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ complex *sol = (complex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ float *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/clinsolx2.c b/EXAMPLE/clinsolx2.c
new file mode 100644
index 0000000..522f2d5
--- /dev/null
+++ b/EXAMPLE/clinsolx2.c
@@ -0,0 +1,275 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program CLINSOLX2.
+ *
+ * This example illustrates how to use CGSSVX to solve systems repeatedly
+ * with the same sparsity pattern of matrix A.
+ * In this case, the column permutation vector perm_c is computed once.
+ * The following data structures will be reused in the subsequent call to
+ * CGSSVX: perm_c, etree
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, A1, L, U;
+ SuperMatrix B, B1, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ complex *a, *a1;
+ int *asub, *xa, *asub1, *xa1;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, j, m, n, nnz;
+ complex *rhsb, *rhsb1, *rhsx, *xact;
+ float *R, *C;
+ float *ferr, *berr;
+ float u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("DLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ creadhb(&m, &n, &nnz, &a, &asub, &xa);
+ if ( !(a1 = complexMalloc(nnz)) ) ABORT("Malloc fails for a1[].");
+ if ( !(asub1 = intMalloc(nnz)) ) ABORT("Malloc fails for asub1[].");
+ if ( !(xa1 = intMalloc(n+1)) ) ABORT("Malloc fails for xa1[].");
+ for (i = 0; i < nnz; ++i) {
+ a1[i] = a[i];
+ asub1[i] = asub[i];
+ }
+ for (i = 0; i < n+1; ++i) xa1[i] = xa[i];
+
+ cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsb1 = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb1[].");
+ if ( !(rhsx = complexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ cCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_C, SLU_GE);
+ cCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_C, SLU_GE);
+ xact = complexMalloc(n * nrhs);
+ ldx = n;
+ cGenXtrue(n, nrhs, xact, ldx);
+ cFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < m; ++i) rhsb1[i+j*m] = rhsb[i+j*m];
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(R = (float *) SUPERLU_MALLOC(A.nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (float *) SUPERLU_MALLOC(A.ncol * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ------------------------------------------------------------
+ WE SOLVE THE LINEAR SYSTEM FOR THE FIRST TIME: AX = B
+ ------------------------------------------------------------*/
+ cgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("First system: cgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ complex *sol = (complex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_Dense_Matrix(&B);
+ if ( lwork >= 0 ) { /* Deallocate storage associated with L and U. */
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE ANOTHER LINEAR SYSTEM: A1*X = B1
+ ONLY THE SPARSITY PATTERN OF A1 IS THE SAME AS THAT OF A.
+ ------------------------------------------------------------*/
+ options.Fact = SamePattern;
+ StatInit(&stat); /* Initialize the statistics variables. */
+
+ cCreate_CompCol_Matrix(&A1, m, n, nnz, a1, asub1, xa1,
+ SLU_NC, SLU_C, SLU_GE);
+ cCreate_Dense_Matrix(&B1, m, nrhs, rhsb1, m, SLU_DN, SLU_C, SLU_GE);
+
+ cgssvx(&options, &A1, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B1, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("\nSecond system: cgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ complex *sol = (complex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A1);
+ Destroy_Dense_Matrix(&B1);
+ Destroy_Dense_Matrix(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/cmat b/EXAMPLE/cmat
new file mode 100644
index 0000000..cad51d0
--- /dev/null
+++ b/EXAMPLE/cmat
@@ -0,0 +1,10968 @@
+Complex key
+ 10964 99 1753 9112 0
+CUA 1280 1280 22778 0
+(13I6) (13I6) (5E15.8) (5E15.8)
+ 1 2 3 4 5 6 7 8 9 10 11 12 13
+ 14 15 19 23 29 35 41 47 53 59 65 71 77
+ 83 89 95 101 107 113 119 125 131 137 143 149 155
+ 161 167 173 179 185 191 197 203 209 215 221 227 233
+ 239 243 247 253 259 265 271 277 283 289 295 301 307
+ 313 319 325 331 337 343 349 355 361 367 373 379 385
+ 391 397 403 409 415 421 427 433 439 445 451 457 463
+ 469 475 481 487 491 495 501 507 513 519 525 531 537
+ 543 549 555 561 567 573 579 585 591 597 603 609 615
+ 621 627 633 639 645 651 657 663 669 675 681 687 693
+ 699 705 711 715 719 725 731 737 743 749 755 761 767
+ 773 779 785 791 797 803 809 815 821 827 833 839 845
+ 851 857 863 869 875 881 887 893 899 905 911 917 923
+ 929 935 941 947 953 959 965 971 977 983 989 999 1009
+ 1015 1021 1031 1041 1047 1053 1063 1073 1079 1085 1095 1105 1111
+ 1117 1127 1137 1143 1149 1159 1169 1175 1181 1191 1201 1207 1217
+ 1223 1229 1239 1245 1255 1265 1271 1281 1291 1297 1303 1313 1319
+ 1325 1335 1341 1351 1361 1367 1377 1387 1393 1399 1409 1415 1421
+ 1431 1437 1447 1457 1463 1473 1483 1489 1495 1505 1511 1517 1527
+ 1533 1543 1553 1559 1565 1571 1577 1583 1593 1599 1609 1615 1621
+ 1631 1641 1647 1653 1663 1673 1679 1685 1695 1705 1711 1717 1727
+ 1737 1743 1749 1759 1769 1775 1781 1791 1801 1807 1817 1823 1829
+ 1839 1845 1855 1865 1871 1881 1891 1897 1903 1913 1919 1925 1935
+ 1941 1951 1961 1967 1977 1987 1993 1999 2009 2015 2021 2031 2037
+ 2047 2057 2063 2073 2083 2089 2095 2105 2111 2117 2127 2133 2143
+ 2153 2159 2169 2179 2189 2199 2205 2211 2217 2223 2229 2235 2241
+ 2251 2261 2267 2273 2283 2293 2299 2305 2315 2325 2331 2337 2347
+ 2357 2363 2369 2379 2389 2395 2401 2411 2421 2427 2433 2443 2453
+ 2459 2469 2475 2481 2491 2497 2507 2517 2523 2533 2543 2549 2555
+ 2565 2571 2577 2587 2593 2603 2613 2619 2629 2639 2645 2651 2661
+ 2667 2673 2683 2689 2699 2709 2715 2725 2735 2741 2747 2757 2763
+ 2769 2779 2785 2795 2805 2811 2817 2823 2829 2835 2845 2851 2861
+ 2867 2873 2883 2893 2899 2905 2915 2925 2931 2937 2947 2957 2963
+ 2969 2979 2989 2995 3001 3011 3021 3027 3033 3043 3053 3059 3069
+ 3075 3081 3091 3097 3107 3117 3123 3133 3143 3149 3155 3165 3171
+ 3177 3187 3193 3203 3213 3219 3229 3239 3245 3251 3261 3267 3273
+ 3283 3289 3299 3309 3315 3325 3335 3341 3347 3357 3363 3369 3379
+ 3385 3395 3405 3411 3421 3431 3441 3451 3457 3463 3475 3487 3499
+ 3511 3523 3535 3549 3569 3589 3609 3629 3649 3669 3683 3697 3719
+ 3741 3763 3785 3807 3829 3843 3857 3879 3901 3923 3945 3967 3989
+ 4003 4017 4039 4061 4083 4105 4127 4149 4163 4177 4199 4221 4243
+ 4265 4287 4309 4323 4337 4359 4381 4403 4425 4447 4469 4483 4497
+ 4519 4541 4563 4585 4607 4629 4643 4657 4679 4701 4723 4745 4767
+ 4789 4803 4817 4839 4861 4883 4905 4927 4949 4963 4977 4999 5021
+ 5043 5065 5087 5109 5123 5137 5159 5181 5203 5225 5247 5269 5283
+ 5297 5319 5341 5363 5385 5407 5429 5443 5465 5487 5509 5531 5553
+ 5575 5589 5603 5625 5639 5653 5675 5697 5719 5741 5763 5777 5799
+ 5821 5843 5865 5887 5909 5923 5945 5967 5989 6011 6033 6055 6069
+ 6083 6105 6119 6133 6155 6177 6199 6221 6243 6257 6279 6301 6323
+ 6345 6367 6389 6403 6417 6431 6445 6459 6473 6487 6501 6515 6537
+ 6551 6573 6587 6609 6631 6653 6675 6689 6711 6733 6755 6777 6799
+ 6821 6835 6849 6871 6893 6915 6937 6959 6981 6995 7009 7031 7053
+ 7075 7097 7119 7141 7155 7169 7191 7213 7235 7257 7279 7301 7315
+ 7329 7351 7373 7395 7417 7439 7461 7475 7489 7511 7533 7555 7577
+ 7599 7621 7635 7649 7671 7693 7715 7737 7759 7781 7795 7809 7831
+ 7853 7875 7897 7919 7941 7955 7969 7991 8013 8035 8057 8079 8101
+ 8115 8129 8151 8173 8195 8217 8239 8261 8275 8289 8311 8333 8355
+ 8377 8399 8421 8435 8457 8479 8501 8523 8545 8567 8581 8595 8617
+ 8631 8645 8667 8689 8711 8733 8755 8769 8791 8813 8835 8857 8879
+ 8901 8915 8937 8959 8981 9003 9025 9047 9061 9075 9097 9111 9125
+ 9147 9169 9191 9213 9235 9249 9271 9293 9315 9337 9359 9381 9395
+ 9417 9439 9461 9483 9505 9527 9549 9571 9593 9615 9637 9659 9673
+ 9687 9705 9723 9741 9759 9777 9795 9813 9831 9849 9867 9887 9917
+ 9947 9977 10007 10037 10067 10097 10127 10147 10167 10187 10207 10239 10271
+ 10303 10335 10367 10399 10431 10463 10483 10503 10523 10543 10575 10607 10639
+ 10671 10703 10735 10767 10799 10819 10839 10859 10879 10911 10943 10975 11007
+ 11039 11071 11103 11135 11155 11175 11195 11215 11247 11279 11311 11343 11375
+ 11407 11439 11471 11491 11511 11531 11551 11583 11615 11647 11679 11711 11743
+ 11775 11807 11827 11847 11867 11887 11919 11951 11983 12015 12047 12079 12111
+ 12143 12163 12183 12203 12223 12255 12287 12319 12351 12383 12415 12447 12479
+ 12499 12519 12539 12559 12591 12623 12655 12687 12719 12751 12783 12815 12835
+ 12855 12875 12895 12927 12959 12991 13023 13055 13087 13119 13151 13171 13191
+ 13211 13231 13263 13295 13327 13359 13391 13423 13455 13487 13507 13527 13547
+ 13567 13587 13607 13627 13659 13691 13723 13755 13787 13819 13851 13883 13903
+ 13923 13943 13975 14007 14039 14071 14103 14135 14167 14199 14219 14239 14259
+ 14291 14323 14355 14387 14419 14451 14483 14515 14535 14555 14575 14607 14639
+ 14671 14703 14735 14767 14799 14831 14851 14871 14891 14923 14955 14987 15019
+ 15051 15083 15115 15147 15167 15187 15207 15227 15247 15267 15287 15307 15327
+ 15359 15391 15423 15455 15487 15519 15551 15583 15615 15647 15679 15711 15743
+ 15775 15807 15839 15859 15879 15899 15919 15939 15959 15979 15999 16019 16039
+ 16059 16079 16099 16119 16139 16171 16203 16235 16267 16299 16319 16351 16371
+ 16403 16423 16455 16475 16495 16527 16559 16591 16623 16655 16687 16719 16751
+ 16771 16791 16811 16831 16863 16895 16927 16959 16991 17023 17055 17087 17107
+ 17127 17147 17167 17199 17231 17263 17295 17327 17359 17391 17423 17443 17463
+ 17483 17503 17535 17567 17599 17631 17663 17695 17727 17759 17779 17799 17819
+ 17839 17871 17903 17935 17967 17999 18031 18063 18095 18115 18135 18155 18175
+ 18207 18239 18271 18303 18335 18367 18399 18431 18451 18471 18491 18511 18543
+ 18575 18607 18639 18671 18703 18735 18767 18787 18807 18827 18847 18879 18911
+ 18943 18975 19007 19039 19071 19103 19123 19143 19163 19183 19215 19247 19279
+ 19311 19343 19375 19407 19439 19459 19479 19499 19519 19551 19583 19615 19647
+ 19679 19711 19743 19775 19795 19815 19835 19855 19887 19919 19951 19983 20015
+ 20047 20079 20111 20131 20151 20171 20191 20223 20255 20287 20319 20351 20383
+ 20415 20447 20467 20487 20507 20527 20559 20591 20623 20655 20687 20719 20751
+ 20783 20803 20823 20843 20863 20895 20927 20959 20991 21023 21055 21087 21119
+ 21139 21159 21179 21211 21243 21275 21307 21339 21371 21403 21435 21455 21475
+ 21495 21515 21547 21567 21587 21607 21627 21659 21691 21723 21755 21787 21819
+ 21851 21871 21903 21935 21967 21999 22031 22063 22095 22127 22147 22167 22187
+ 22219 22251 22283 22315 22347 22379 22411 22443 22475 22507 22539 22571 22603
+ 22635 22667 22699 22719 22739 22759 22779
+ 1 3 5 7 9 11 13 15 17 19 21 23 25
+ 27 29 30 61 62 29 30 61 62 29 30 61 62
+ 93 94 29 30 61 62 93 94 61 62 93 94 125
+ 126 61 62 93 94 125 126 93 94 125 126 157 158
+ 93 94 125 126 157 158 125 126 157 158 189 190 125
+ 126 157 158 189 190 157 158 189 190 221 222 157 158
+ 189 190 221 222 189 190 221 222 253 254 189 190 221
+ 222 253 254 221 222 253 254 285 286 221 222 253 254
+ 285 286 253 254 285 286 317 318 253 254 285 286 317
+ 318 285 286 317 318 349 350 285 286 317 318 349 350
+ 317 318 349 350 381 382 317 318 349 350 381 382 349
+ 350 381 382 413 414 349 350 381 382 413 414 381 382
+ 413 414 445 446 381 382 413 414 445 446 413 414 445
+ 446 477 478 413 414 445 446 477 478 445 446 477 478
+ 509 510 445 446 477 478 509 510 477 478 509 510 541
+ 542 477 478 509 510 541 542 509 510 541 542 573 574
+ 509 510 541 542 573 574 541 542 573 574 605 606 541
+ 542 573 574 605 606 573 574 605 606 637 638 573 574
+ 605 606 637 638 1245 1246 1277 1278 1245 1246 1277 1278 1213
+ 1214 1245 1246 1277 1278 1213 1214 1245 1246 1277 1278 1181 1182
+ 1213 1214 1245 1246 1181 1182 1213 1214 1245 1246 1149 1150 1181
+ 1182 1213 1214 1149 1150 1181 1182 1213 1214 1117 1118 1149 1150
+ 1181 1182 1117 1118 1149 1150 1181 1182 1085 1086 1117 1118 1149
+ 1150 1085 1086 1117 1118 1149 1150 1053 1054 1085 1086 1117 1118
+ 1053 1054 1085 1086 1117 1118 1021 1022 1053 1054 1085 1086 1021
+ 1022 1053 1054 1085 1086 989 990 1021 1022 1053 1054 989 990
+ 1021 1022 1053 1054 957 958 989 990 1021 1022 957 958 989
+ 990 1021 1022 925 926 957 958 989 990 925 926 957 958
+ 989 990 893 894 925 926 957 958 893 894 925 926 957
+ 958 861 862 893 894 925 926 861 862 893 894 925 926
+ 829 830 861 862 893 894 829 830 861 862 893 894 797
+ 798 829 830 861 862 797 798 829 830 861 862 765 766
+ 797 798 829 830 765 766 797 798 829 830 733 734 765
+ 766 797 798 733 734 765 766 797 798 701 702 733 734
+ 765 766 701 702 733 734 765 766 669 670 701 702 733
+ 734 669 670 701 702 733 734 637 638 669 670 701 702
+ 605 606 637 638 669 670 605 606 637 638 669 670 637
+ 638 669 670 701 702 31 32 63 64 31 32 63 64
+ 31 32 63 64 95 96 31 32 63 64 95 96 63
+ 64 95 96 127 128 63 64 95 96 127 128 95 96
+ 127 128 159 160 95 96 127 128 159 160 127 128 159
+ 160 191 192 127 128 159 160 191 192 159 160 191 192
+ 223 224 159 160 191 192 223 224 191 192 223 224 255
+ 256 191 192 223 224 255 256 223 224 255 256 287 288
+ 223 224 255 256 287 288 255 256 287 288 319 320 255
+ 256 287 288 319 320 287 288 319 320 351 352 287 288
+ 319 320 351 352 319 320 351 352 383 384 319 320 351
+ 352 383 384 351 352 383 384 415 416 351 352 383 384
+ 415 416 383 384 415 416 447 448 383 384 415 416 447
+ 448 415 416 447 448 479 480 415 416 447 448 479 480
+ 447 448 479 480 511 512 447 448 479 480 511 512 479
+ 480 511 512 543 544 479 480 511 512 543 544 511 512
+ 543 544 575 576 511 512 543 544 575 576 543 544 575
+ 576 607 608 543 544 575 576 607 608 575 576 607 608
+ 639 640 575 576 607 608 639 640 1247 1248 1279 1280 1247
+ 1248 1279 1280 1215 1216 1247 1248 1279 1280 1215 1216 1247 1248
+ 1279 1280 1183 1184 1215 1216 1247 1248 1183 1184 1215 1216 1247
+ 1248 1151 1152 1183 1184 1215 1216 1151 1152 1183 1184 1215 1216
+ 1119 1120 1151 1152 1183 1184 1119 1120 1151 1152 1183 1184 1087
+ 1088 1119 1120 1151 1152 1087 1088 1119 1120 1151 1152 1055 1056
+ 1087 1088 1119 1120 1055 1056 1087 1088 1119 1120 1023 1024 1055
+ 1056 1087 1088 1023 1024 1055 1056 1087 1088 991 992 1023 1024
+ 1055 1056 991 992 1023 1024 1055 1056 959 960 991 992 1023
+ 1024 959 960 991 992 1023 1024 927 928 959 960 991 992
+ 927 928 959 960 991 992 895 896 927 928 959 960 895
+ 896 927 928 959 960 863 864 895 896 927 928 863 864
+ 895 896 927 928 831 832 863 864 895 896 831 832 863
+ 864 895 896 799 800 831 832 863 864 799 800 831 832
+ 863 864 767 768 799 800 831 832 767 768 799 800 831
+ 832 735 736 767 768 799 800 735 736 767 768 799 800
+ 703 704 735 736 767 768 703 704 735 736 767 768 671
+ 672 703 704 735 736 671 672 703 704 735 736 639 640
+ 671 672 703 704 607 608 639 640 671 672 607 608 639
+ 640 671 672 639 640 671 672 703 704 2 4 33 34
+ 35 36 2 4 33 34 35 36 2 4 33 34 35
+ 36 2 4 33 34 35 36 34 36 65 66 67 68
+ 2 4 33 34 35 36 65 66 67 68 2 4 33
+ 34 35 36 65 66 67 68 34 36 65 66 67 68
+ 66 68 97 98 99 100 34 36 65 66 67 68 97
+ 98 99 100 34 36 65 66 67 68 97 98 99 100
+ 66 68 97 98 99 100 98 100 129 130 131 132 66
+ 68 97 98 99 100 129 130 131 132 66 68 97 98
+ 99 100 129 130 131 132 98 100 129 130 131 132 130
+ 132 161 162 163 164 98 100 129 130 131 132 161 162
+ 163 164 98 100 129 130 131 132 161 162 163 164 130
+ 132 161 162 163 164 162 164 193 194 195 196 130 132
+ 161 162 163 164 193 194 195 196 130 132 161 162 163
+ 164 193 194 195 196 162 164 193 194 195 196 194 196
+ 225 226 227 228 162 164 193 194 195 196 225 226 227
+ 228 162 164 193 194 195 196 225 226 227 228 194 196
+ 225 226 227 228 226 228 257 258 259 260 194 196 225
+ 226 227 228 257 258 259 260 194 196 225 226 227 228
+ 257 258 259 260 226 228 257 258 259 260 226 228 257
+ 258 259 260 289 290 291 292 258 260 289 290 291 292
+ 258 260 289 290 291 292 226 228 257 258 259 260 289
+ 290 291 292 290 292 321 322 323 324 258 260 289 290
+ 291 292 321 322 323 324 258 260 289 290 291 292 321
+ 322 323 324 290 292 321 322 323 324 290 292 321 322
+ 323 324 353 354 355 356 290 292 321 322 323 324 353
+ 354 355 356 322 324 353 354 355 356 322 324 353 354
+ 355 356 322 324 353 354 355 356 385 386 387 388 354
+ 356 385 386 387 388 354 356 385 386 387 388 322 324
+ 353 354 355 356 385 386 387 388 386 388 417 418 419
+ 420 354 356 385 386 387 388 417 418 419 420 354 356
+ 385 386 387 388 417 418 419 420 386 388 417 418 419
+ 420 386 388 417 418 419 420 449 450 451 452 386 388
+ 417 418 419 420 449 450 451 452 418 420 449 450 451
+ 452 418 420 449 450 451 452 418 420 449 450 451 452
+ 481 482 483 484 450 452 481 482 483 484 450 452 481
+ 482 483 484 418 420 449 450 451 452 481 482 483 484
+ 482 484 513 514 515 516 450 452 481 482 483 484 513
+ 514 515 516 450 452 481 482 483 484 513 514 515 516
+ 482 484 513 514 515 516 482 484 513 514 515 516 545
+ 546 547 548 482 484 513 514 515 516 545 546 547 548
+ 514 516 545 546 547 548 514 516 545 546 547 548 514
+ 516 545 546 547 548 577 578 579 580 546 548 577 578
+ 579 580 546 548 577 578 579 580 514 516 545 546 547
+ 548 577 578 579 580 578 580 609 610 611 612 546 548
+ 577 578 579 580 609 610 611 612 546 548 577 578 579
+ 580 609 610 611 612 578 580 609 610 611 612 1218 1220
+ 1249 1250 1251 1252 1218 1220 1249 1250 1251 1252 1218 1220 1249
+ 1250 1251 1252 1218 1220 1249 1250 1251 1252 1186 1188 1217 1218
+ 1219 1220 1249 1250 1251 1252 1186 1188 1217 1218 1219 1220 1186
+ 1188 1217 1218 1219 1220 1249 1250 1251 1252 1186 1188 1217 1218
+ 1219 1220 1154 1156 1185 1186 1187 1188 1154 1156 1185 1186 1187
+ 1188 1217 1218 1219 1220 1154 1156 1185 1186 1187 1188 1217 1218
+ 1219 1220 1154 1156 1185 1186 1187 1188 1122 1124 1153 1154 1155
+ 1156 1122 1124 1153 1154 1155 1156 1185 1186 1187 1188 1122 1124
+ 1153 1154 1155 1156 1185 1186 1187 1188 1122 1124 1153 1154 1155
+ 1156 1090 1092 1121 1122 1123 1124 1090 1092 1121 1122 1123 1124
+ 1153 1154 1155 1156 1090 1092 1121 1122 1123 1124 1153 1154 1155
+ 1156 1090 1092 1121 1122 1123 1124 1058 1060 1089 1090 1091 1092
+ 1058 1060 1089 1090 1091 1092 1121 1122 1123 1124 1058 1060 1089
+ 1090 1091 1092 1121 1122 1123 1124 1058 1060 1089 1090 1091 1092
+ 1026 1028 1057 1058 1059 1060 1026 1028 1057 1058 1059 1060 1089
+ 1090 1091 1092 1026 1028 1057 1058 1059 1060 1089 1090 1091 1092
+ 1026 1028 1057 1058 1059 1060 994 996 1025 1026 1027 1028 994
+ 996 1025 1026 1027 1028 1057 1058 1059 1060 994 996 1025 1026
+ 1027 1028 1057 1058 1059 1060 994 996 1025 1026 1027 1028 962
+ 964 993 994 995 996 1025 1026 1027 1028 962 964 993 994
+ 995 996 962 964 993 994 995 996 962 964 993 994 995
+ 996 1025 1026 1027 1028 930 932 961 962 963 964 930 932
+ 961 962 963 964 993 994 995 996 930 932 961 962 963
+ 964 993 994 995 996 930 932 961 962 963 964 898 900
+ 929 930 931 932 961 962 963 964 898 900 929 930 931
+ 932 961 962 963 964 898 900 929 930 931 932 898 900
+ 929 930 931 932 866 868 897 898 899 900 929 930 931
+ 932 866 868 897 898 899 900 866 868 897 898 899 900
+ 866 868 897 898 899 900 929 930 931 932 834 836 865
+ 866 867 868 834 836 865 866 867 868 897 898 899 900
+ 834 836 865 866 867 868 897 898 899 900 834 836 865
+ 866 867 868 802 804 833 834 835 836 865 866 867 868
+ 802 804 833 834 835 836 865 866 867 868 802 804 833
+ 834 835 836 802 804 833 834 835 836 770 772 801 802
+ 803 804 833 834 835 836 770 772 801 802 803 804 770
+ 772 801 802 803 804 770 772 801 802 803 804 833 834
+ 835 836 738 740 769 770 771 772 738 740 769 770 771
+ 772 801 802 803 804 738 740 769 770 771 772 801 802
+ 803 804 738 740 769 770 771 772 706 708 737 738 739
+ 740 769 770 771 772 706 708 737 738 739 740 769 770
+ 771 772 706 708 737 738 739 740 706 708 737 738 739
+ 740 674 676 705 706 707 708 737 738 739 740 674 676
+ 705 706 707 708 674 676 705 706 707 708 674 676 705
+ 706 707 708 737 738 739 740 642 644 673 674 675 676
+ 642 644 673 674 675 676 705 706 707 708 642 644 673
+ 674 675 676 705 706 707 708 642 644 673 674 675 676
+ 578 580 609 610 611 612 641 642 643 644 578 580 609
+ 610 611 612 641 642 643 644 610 612 641 642 643 644
+ 673 674 675 676 610 612 641 642 643 644 673 674 675
+ 676 610 612 641 642 643 644 610 612 641 642 643 644
+ 18 20 49 50 51 52 18 20 49 50 51 52 18
+ 20 49 50 51 52 18 20 49 50 51 52 50 52
+ 81 82 83 84 18 20 49 50 51 52 81 82 83
+ 84 18 20 49 50 51 52 81 82 83 84 50 52
+ 81 82 83 84 82 84 113 114 115 116 50 52 81
+ 82 83 84 113 114 115 116 50 52 81 82 83 84
+ 113 114 115 116 82 84 113 114 115 116 114 116 145
+ 146 147 148 82 84 113 114 115 116 145 146 147 148
+ 82 84 113 114 115 116 145 146 147 148 114 116 145
+ 146 147 148 146 148 177 178 179 180 114 116 145 146
+ 147 148 177 178 179 180 114 116 145 146 147 148 177
+ 178 179 180 146 148 177 178 179 180 178 180 209 210
+ 211 212 146 148 177 178 179 180 209 210 211 212 146
+ 148 177 178 179 180 209 210 211 212 178 180 209 210
+ 211 212 210 212 241 242 243 244 178 180 209 210 211
+ 212 241 242 243 244 178 180 209 210 211 212 241 242
+ 243 244 210 212 241 242 243 244 242 244 273 274 275
+ 276 210 212 241 242 243 244 273 274 275 276 210 212
+ 241 242 243 244 273 274 275 276 242 244 273 274 275
+ 276 242 244 273 274 275 276 305 306 307 308 274 276
+ 305 306 307 308 274 276 305 306 307 308 242 244 273
+ 274 275 276 305 306 307 308 306 308 337 338 339 340
+ 274 276 305 306 307 308 337 338 339 340 274 276 305
+ 306 307 308 337 338 339 340 306 308 337 338 339 340
+ 306 308 337 338 339 340 369 370 371 372 306 308 337
+ 338 339 340 369 370 371 372 338 340 369 370 371 372
+ 338 340 369 370 371 372 338 340 369 370 371 372 401
+ 402 403 404 370 372 401 402 403 404 370 372 401 402
+ 403 404 338 340 369 370 371 372 401 402 403 404 402
+ 404 433 434 435 436 370 372 401 402 403 404 433 434
+ 435 436 370 372 401 402 403 404 433 434 435 436 402
+ 404 433 434 435 436 402 404 433 434 435 436 465 466
+ 467 468 402 404 433 434 435 436 465 466 467 468 434
+ 436 465 466 467 468 434 436 465 466 467 468 434 436
+ 465 466 467 468 497 498 499 500 466 468 497 498 499
+ 500 466 468 497 498 499 500 434 436 465 466 467 468
+ 497 498 499 500 498 500 529 530 531 532 466 468 497
+ 498 499 500 529 530 531 532 466 468 497 498 499 500
+ 529 530 531 532 498 500 529 530 531 532 498 500 529
+ 530 531 532 561 562 563 564 498 500 529 530 531 532
+ 561 562 563 564 530 532 561 562 563 564 530 532 561
+ 562 563 564 530 532 561 562 563 564 593 594 595 596
+ 562 564 593 594 595 596 562 564 593 594 595 596 530
+ 532 561 562 563 564 593 594 595 596 594 596 625 626
+ 627 628 562 564 593 594 595 596 625 626 627 628 562
+ 564 593 594 595 596 625 626 627 628 594 596 625 626
+ 627 628 1234 1236 1265 1266 1267 1268 1234 1236 1265 1266 1267
+ 1268 1234 1236 1265 1266 1267 1268 1234 1236 1265 1266 1267 1268
+ 1202 1204 1233 1234 1235 1236 1265 1266 1267 1268 1202 1204 1233
+ 1234 1235 1236 1202 1204 1233 1234 1235 1236 1265 1266 1267 1268
+ 1202 1204 1233 1234 1235 1236 1170 1172 1201 1202 1203 1204 1170
+ 1172 1201 1202 1203 1204 1233 1234 1235 1236 1170 1172 1201 1202
+ 1203 1204 1233 1234 1235 1236 1170 1172 1201 1202 1203 1204 1138
+ 1140 1169 1170 1171 1172 1138 1140 1169 1170 1171 1172 1201 1202
+ 1203 1204 1138 1140 1169 1170 1171 1172 1201 1202 1203 1204 1138
+ 1140 1169 1170 1171 1172 1106 1108 1137 1138 1139 1140 1106 1108
+ 1137 1138 1139 1140 1169 1170 1171 1172 1106 1108 1137 1138 1139
+ 1140 1169 1170 1171 1172 1106 1108 1137 1138 1139 1140 1074 1076
+ 1105 1106 1107 1108 1074 1076 1105 1106 1107 1108 1137 1138 1139
+ 1140 1074 1076 1105 1106 1107 1108 1137 1138 1139 1140 1074 1076
+ 1105 1106 1107 1108 1042 1044 1073 1074 1075 1076 1042 1044 1073
+ 1074 1075 1076 1105 1106 1107 1108 1042 1044 1073 1074 1075 1076
+ 1105 1106 1107 1108 1042 1044 1073 1074 1075 1076 1010 1012 1041
+ 1042 1043 1044 1010 1012 1041 1042 1043 1044 1073 1074 1075 1076
+ 1010 1012 1041 1042 1043 1044 1073 1074 1075 1076 1010 1012 1041
+ 1042 1043 1044 978 980 1009 1010 1011 1012 1041 1042 1043 1044
+ 978 980 1009 1010 1011 1012 978 980 1009 1010 1011 1012 978
+ 980 1009 1010 1011 1012 1041 1042 1043 1044 946 948 977 978
+ 979 980 946 948 977 978 979 980 1009 1010 1011 1012 946
+ 948 977 978 979 980 1009 1010 1011 1012 946 948 977 978
+ 979 980 914 916 945 946 947 948 977 978 979 980 914
+ 916 945 946 947 948 977 978 979 980 914 916 945 946
+ 947 948 914 916 945 946 947 948 882 884 913 914 915
+ 916 945 946 947 948 882 884 913 914 915 916 882 884
+ 913 914 915 916 882 884 913 914 915 916 945 946 947
+ 948 850 852 881 882 883 884 850 852 881 882 883 884
+ 913 914 915 916 850 852 881 882 883 884 913 914 915
+ 916 850 852 881 882 883 884 818 820 849 850 851 852
+ 881 882 883 884 818 820 849 850 851 852 881 882 883
+ 884 818 820 849 850 851 852 818 820 849 850 851 852
+ 786 788 817 818 819 820 849 850 851 852 786 788 817
+ 818 819 820 786 788 817 818 819 820 786 788 817 818
+ 819 820 849 850 851 852 754 756 785 786 787 788 754
+ 756 785 786 787 788 817 818 819 820 754 756 785 786
+ 787 788 817 818 819 820 754 756 785 786 787 788 722
+ 724 753 754 755 756 785 786 787 788 722 724 753 754
+ 755 756 785 786 787 788 722 724 753 754 755 756 722
+ 724 753 754 755 756 690 692 721 722 723 724 753 754
+ 755 756 690 692 721 722 723 724 690 692 721 722 723
+ 724 690 692 721 722 723 724 753 754 755 756 658 660
+ 689 690 691 692 658 660 689 690 691 692 721 722 723
+ 724 658 660 689 690 691 692 721 722 723 724 658 660
+ 689 690 691 692 594 596 625 626 627 628 657 658 659
+ 660 594 596 625 626 627 628 657 658 659 660 626 628
+ 657 658 659 660 689 690 691 692 626 628 657 658 659
+ 660 689 690 691 692 626 628 657 658 659 660 626 628
+ 657 658 659 660 22 24 26 28 53 54 55 56 57
+ 58 59 60 22 24 26 28 53 54 55 56 57 58
+ 59 60 22 24 26 28 53 54 55 56 57 58 59
+ 60 22 24 26 28 53 54 55 56 57 58 59 60
+ 22 24 26 28 53 54 55 56 57 58 59 60 22
+ 24 26 28 53 54 55 56 57 58 59 60 54 56
+ 57 58 59 60 85 86 87 88 89 90 91 92 22
+ 24 26 28 53 54 55 56 57 58 59 60 85 86
+ 87 88 89 90 91 92 22 24 26 28 53 54 55
+ 56 57 58 59 60 85 86 87 88 89 90 91 92
+ 22 24 26 28 53 54 55 56 57 58 59 60 85
+ 86 87 88 89 90 91 92 22 24 26 28 53 54
+ 55 56 57 58 59 60 85 86 87 88 89 90 91
+ 92 22 24 26 28 53 54 55 56 57 58 59 60
+ 85 86 87 88 89 90 91 92 22 24 26 28 53
+ 54 55 56 57 58 59 60 85 86 87 88 89 90
+ 91 92 54 56 57 58 59 60 85 86 87 88 89
+ 90 91 92 86 88 89 90 91 92 117 118 119 120
+ 121 122 123 124 54 56 57 58 59 60 85 86 87
+ 88 89 90 91 92 117 118 119 120 121 122 123 124
+ 54 56 57 58 59 60 85 86 87 88 89 90 91
+ 92 117 118 119 120 121 122 123 124 54 56 57 58
+ 59 60 85 86 87 88 89 90 91 92 117 118 119
+ 120 121 122 123 124 54 56 57 58 59 60 85 86
+ 87 88 89 90 91 92 117 118 119 120 121 122 123
+ 124 54 56 57 58 59 60 85 86 87 88 89 90
+ 91 92 117 118 119 120 121 122 123 124 54 56 57
+ 58 59 60 85 86 87 88 89 90 91 92 117 118
+ 119 120 121 122 123 124 86 88 89 90 91 92 117
+ 118 119 120 121 122 123 124 118 120 121 122 123 124
+ 149 150 151 152 153 154 155 156 86 88 89 90 91
+ 92 117 118 119 120 121 122 123 124 149 150 151 152
+ 153 154 155 156 86 88 89 90 91 92 117 118 119
+ 120 121 122 123 124 149 150 151 152 153 154 155 156
+ 86 88 89 90 91 92 117 118 119 120 121 122 123
+ 124 149 150 151 152 153 154 155 156 86 88 89 90
+ 91 92 117 118 119 120 121 122 123 124 149 150 151
+ 152 153 154 155 156 86 88 89 90 91 92 117 118
+ 119 120 121 122 123 124 149 150 151 152 153 154 155
+ 156 86 88 89 90 91 92 117 118 119 120 121 122
+ 123 124 149 150 151 152 153 154 155 156 118 120 121
+ 122 123 124 149 150 151 152 153 154 155 156 150 152
+ 153 154 155 156 181 182 183 184 185 186 187 188 118
+ 120 121 122 123 124 149 150 151 152 153 154 155 156
+ 181 182 183 184 185 186 187 188 118 120 121 122 123
+ 124 149 150 151 152 153 154 155 156 181 182 183 184
+ 185 186 187 188 118 120 121 122 123 124 149 150 151
+ 152 153 154 155 156 181 182 183 184 185 186 187 188
+ 118 120 121 122 123 124 149 150 151 152 153 154 155
+ 156 181 182 183 184 185 186 187 188 118 120 121 122
+ 123 124 149 150 151 152 153 154 155 156 181 182 183
+ 184 185 186 187 188 118 120 121 122 123 124 149 150
+ 151 152 153 154 155 156 181 182 183 184 185 186 187
+ 188 150 152 153 154 155 156 181 182 183 184 185 186
+ 187 188 182 184 185 186 187 188 213 214 215 216 217
+ 218 219 220 150 152 153 154 155 156 181 182 183 184
+ 185 186 187 188 213 214 215 216 217 218 219 220 150
+ 152 153 154 155 156 181 182 183 184 185 186 187 188
+ 213 214 215 216 217 218 219 220 150 152 153 154 155
+ 156 181 182 183 184 185 186 187 188 213 214 215 216
+ 217 218 219 220 150 152 153 154 155 156 181 182 183
+ 184 185 186 187 188 213 214 215 216 217 218 219 220
+ 150 152 153 154 155 156 181 182 183 184 185 186 187
+ 188 213 214 215 216 217 218 219 220 150 152 153 154
+ 155 156 181 182 183 184 185 186 187 188 213 214 215
+ 216 217 218 219 220 182 184 185 186 187 188 213 214
+ 215 216 217 218 219 220 214 216 217 218 219 220 245
+ 246 247 248 249 250 251 252 182 184 185 186 187 188
+ 213 214 215 216 217 218 219 220 245 246 247 248 249
+ 250 251 252 182 184 185 186 187 188 213 214 215 216
+ 217 218 219 220 245 246 247 248 249 250 251 252 182
+ 184 185 186 187 188 213 214 215 216 217 218 219 220
+ 245 246 247 248 249 250 251 252 182 184 185 186 187
+ 188 213 214 215 216 217 218 219 220 245 246 247 248
+ 249 250 251 252 182 184 185 186 187 188 213 214 215
+ 216 217 218 219 220 245 246 247 248 249 250 251 252
+ 182 184 185 186 187 188 213 214 215 216 217 218 219
+ 220 245 246 247 248 249 250 251 252 214 216 217 218
+ 219 220 245 246 247 248 249 250 251 252 246 248 249
+ 250 251 252 277 278 279 280 281 282 283 284 214 216
+ 217 218 219 220 245 246 247 248 249 250 251 252 277
+ 278 279 280 281 282 283 284 214 216 217 218 219 220
+ 245 246 247 248 249 250 251 252 277 278 279 280 281
+ 282 283 284 214 216 217 218 219 220 245 246 247 248
+ 249 250 251 252 277 278 279 280 281 282 283 284 214
+ 216 217 218 219 220 245 246 247 248 249 250 251 252
+ 277 278 279 280 281 282 283 284 214 216 217 218 219
+ 220 245 246 247 248 249 250 251 252 277 278 279 280
+ 281 282 283 284 214 216 217 218 219 220 245 246 247
+ 248 249 250 251 252 277 278 279 280 281 282 283 284
+ 246 248 249 250 251 252 277 278 279 280 281 282 283
+ 284 278 280 281 282 283 284 309 310 311 312 313 314
+ 315 316 246 248 249 250 251 252 277 278 279 280 281
+ 282 283 284 309 310 311 312 313 314 315 316 246 248
+ 249 250 251 252 277 278 279 280 281 282 283 284 309
+ 310 311 312 313 314 315 316 246 248 249 250 251 252
+ 277 278 279 280 281 282 283 284 309 310 311 312 313
+ 314 315 316 246 248 249 250 251 252 277 278 279 280
+ 281 282 283 284 309 310 311 312 313 314 315 316 246
+ 248 249 250 251 252 277 278 279 280 281 282 283 284
+ 309 310 311 312 313 314 315 316 246 248 249 250 251
+ 252 277 278 279 280 281 282 283 284 309 310 311 312
+ 313 314 315 316 278 280 281 282 283 284 309 310 311
+ 312 313 314 315 316 310 312 313 314 315 316 341 342
+ 343 344 345 346 347 348 278 280 281 282 283 284 309
+ 310 311 312 313 314 315 316 341 342 343 344 345 346
+ 347 348 278 280 281 282 283 284 309 310 311 312 313
+ 314 315 316 341 342 343 344 345 346 347 348 278 280
+ 281 282 283 284 309 310 311 312 313 314 315 316 341
+ 342 343 344 345 346 347 348 278 280 281 282 283 284
+ 309 310 311 312 313 314 315 316 341 342 343 344 345
+ 346 347 348 278 280 281 282 283 284 309 310 311 312
+ 313 314 315 316 341 342 343 344 345 346 347 348 278
+ 280 281 282 283 284 309 310 311 312 313 314 315 316
+ 341 342 343 344 345 346 347 348 310 312 313 314 315
+ 316 341 342 343 344 345 346 347 348 342 344 345 346
+ 347 348 373 374 375 376 377 378 379 380 310 312 313
+ 314 315 316 341 342 343 344 345 346 347 348 373 374
+ 375 376 377 378 379 380 310 312 313 314 315 316 341
+ 342 343 344 345 346 347 348 373 374 375 376 377 378
+ 379 380 310 312 313 314 315 316 341 342 343 344 345
+ 346 347 348 373 374 375 376 377 378 379 380 310 312
+ 313 314 315 316 341 342 343 344 345 346 347 348 373
+ 374 375 376 377 378 379 380 310 312 313 314 315 316
+ 341 342 343 344 345 346 347 348 373 374 375 376 377
+ 378 379 380 310 312 313 314 315 316 341 342 343 344
+ 345 346 347 348 373 374 375 376 377 378 379 380 342
+ 344 345 346 347 348 373 374 375 376 377 378 379 380
+ 374 376 377 378 379 380 405 406 407 408 409 410 411
+ 412 342 344 345 346 347 348 373 374 375 376 377 378
+ 379 380 405 406 407 408 409 410 411 412 342 344 345
+ 346 347 348 373 374 375 376 377 378 379 380 405 406
+ 407 408 409 410 411 412 342 344 345 346 347 348 373
+ 374 375 376 377 378 379 380 405 406 407 408 409 410
+ 411 412 342 344 345 346 347 348 373 374 375 376 377
+ 378 379 380 405 406 407 408 409 410 411 412 342 344
+ 345 346 347 348 373 374 375 376 377 378 379 380 405
+ 406 407 408 409 410 411 412 342 344 345 346 347 348
+ 373 374 375 376 377 378 379 380 405 406 407 408 409
+ 410 411 412 374 376 377 378 379 380 405 406 407 408
+ 409 410 411 412 406 408 409 410 411 412 437 438 439
+ 440 441 442 443 444 374 376 377 378 379 380 405 406
+ 407 408 409 410 411 412 437 438 439 440 441 442 443
+ 444 374 376 377 378 379 380 405 406 407 408 409 410
+ 411 412 437 438 439 440 441 442 443 444 374 376 377
+ 378 379 380 405 406 407 408 409 410 411 412 437 438
+ 439 440 441 442 443 444 374 376 377 378 379 380 405
+ 406 407 408 409 410 411 412 437 438 439 440 441 442
+ 443 444 374 376 377 378 379 380 405 406 407 408 409
+ 410 411 412 437 438 439 440 441 442 443 444 374 376
+ 377 378 379 380 405 406 407 408 409 410 411 412 437
+ 438 439 440 441 442 443 444 406 408 409 410 411 412
+ 437 438 439 440 441 442 443 444 406 408 409 410 411
+ 412 437 438 439 440 441 442 443 444 469 470 471 472
+ 473 474 475 476 406 408 409 410 411 412 437 438 439
+ 440 441 442 443 444 469 470 471 472 473 474 475 476
+ 406 408 409 410 411 412 437 438 439 440 441 442 443
+ 444 469 470 471 472 473 474 475 476 406 408 409 410
+ 411 412 437 438 439 440 441 442 443 444 469 470 471
+ 472 473 474 475 476 406 408 409 410 411 412 437 438
+ 439 440 441 442 443 444 469 470 471 472 473 474 475
+ 476 406 408 409 410 411 412 437 438 439 440 441 442
+ 443 444 469 470 471 472 473 474 475 476 438 440 441
+ 442 443 444 469 470 471 472 473 474 475 476 438 440
+ 441 442 443 444 469 470 471 472 473 474 475 476 438
+ 440 441 442 443 444 469 470 471 472 473 474 475 476
+ 501 502 503 504 505 506 507 508 470 472 473 474 475
+ 476 501 502 503 504 505 506 507 508 470 472 473 474
+ 475 476 501 502 503 504 505 506 507 508 438 440 441
+ 442 443 444 469 470 471 472 473 474 475 476 501 502
+ 503 504 505 506 507 508 438 440 441 442 443 444 469
+ 470 471 472 473 474 475 476 501 502 503 504 505 506
+ 507 508 438 440 441 442 443 444 469 470 471 472 473
+ 474 475 476 501 502 503 504 505 506 507 508 438 440
+ 441 442 443 444 469 470 471 472 473 474 475 476 501
+ 502 503 504 505 506 507 508 438 440 441 442 443 444
+ 469 470 471 472 473 474 475 476 501 502 503 504 505
+ 506 507 508 502 504 505 506 507 508 533 534 535 536
+ 537 538 539 540 470 472 473 474 475 476 501 502 503
+ 504 505 506 507 508 533 534 535 536 537 538 539 540
+ 470 472 473 474 475 476 501 502 503 504 505 506 507
+ 508 533 534 535 536 537 538 539 540 470 472 473 474
+ 475 476 501 502 503 504 505 506 507 508 533 534 535
+ 536 537 538 539 540 470 472 473 474 475 476 501 502
+ 503 504 505 506 507 508 533 534 535 536 537 538 539
+ 540 470 472 473 474 475 476 501 502 503 504 505 506
+ 507 508 533 534 535 536 537 538 539 540 470 472 473
+ 474 475 476 501 502 503 504 505 506 507 508 533 534
+ 535 536 537 538 539 540 502 504 505 506 507 508 533
+ 534 535 536 537 538 539 540 502 504 505 506 507 508
+ 533 534 535 536 537 538 539 540 565 566 567 568 569
+ 570 571 572 502 504 505 506 507 508 533 534 535 536
+ 537 538 539 540 565 566 567 568 569 570 571 572 502
+ 504 505 506 507 508 533 534 535 536 537 538 539 540
+ 565 566 567 568 569 570 571 572 502 504 505 506 507
+ 508 533 534 535 536 537 538 539 540 565 566 567 568
+ 569 570 571 572 502 504 505 506 507 508 533 534 535
+ 536 537 538 539 540 565 566 567 568 569 570 571 572
+ 502 504 505 506 507 508 533 534 535 536 537 538 539
+ 540 565 566 567 568 569 570 571 572 534 536 537 538
+ 539 540 565 566 567 568 569 570 571 572 534 536 537
+ 538 539 540 565 566 567 568 569 570 571 572 534 536
+ 537 538 539 540 565 566 567 568 569 570 571 572 597
+ 598 599 600 601 602 603 604 566 568 569 570 571 572
+ 597 598 599 600 601 602 603 604 566 568 569 570 571
+ 572 597 598 599 600 601 602 603 604 534 536 537 538
+ 539 540 565 566 567 568 569 570 571 572 597 598 599
+ 600 601 602 603 604 534 536 537 538 539 540 565 566
+ 567 568 569 570 571 572 597 598 599 600 601 602 603
+ 604 534 536 537 538 539 540 565 566 567 568 569 570
+ 571 572 597 598 599 600 601 602 603 604 534 536 537
+ 538 539 540 565 566 567 568 569 570 571 572 597 598
+ 599 600 601 602 603 604 534 536 537 538 539 540 565
+ 566 567 568 569 570 571 572 597 598 599 600 601 602
+ 603 604 598 600 601 602 603 604 629 630 631 632 633
+ 634 635 636 566 568 569 570 571 572 597 598 599 600
+ 601 602 603 604 629 630 631 632 633 634 635 636 566
+ 568 569 570 571 572 597 598 599 600 601 602 603 604
+ 629 630 631 632 633 634 635 636 566 568 569 570 571
+ 572 597 598 599 600 601 602 603 604 629 630 631 632
+ 633 634 635 636 566 568 569 570 571 572 597 598 599
+ 600 601 602 603 604 629 630 631 632 633 634 635 636
+ 566 568 569 570 571 572 597 598 599 600 601 602 603
+ 604 629 630 631 632 633 634 635 636 566 568 569 570
+ 571 572 597 598 599 600 601 602 603 604 629 630 631
+ 632 633 634 635 636 598 600 601 602 603 604 629 630
+ 631 632 633 634 635 636 1238 1240 1241 1242 1243 1244 1269
+ 1270 1271 1272 1273 1274 1275 1276 1238 1240 1241 1242 1243 1244
+ 1269 1270 1271 1272 1273 1274 1275 1276 1238 1240 1241 1242 1243
+ 1244 1269 1270 1271 1272 1273 1274 1275 1276 1238 1240 1241 1242
+ 1243 1244 1269 1270 1271 1272 1273 1274 1275 1276 1238 1240 1241
+ 1242 1243 1244 1269 1270 1271 1272 1273 1274 1275 1276 1238 1240
+ 1241 1242 1243 1244 1269 1270 1271 1272 1273 1274 1275 1276 1238
+ 1240 1241 1242 1243 1244 1269 1270 1271 1272 1273 1274 1275 1276
+ 1238 1240 1241 1242 1243 1244 1269 1270 1271 1272 1273 1274 1275
+ 1276 1206 1208 1209 1210 1211 1212 1237 1238 1239 1240 1241 1242
+ 1243 1244 1269 1270 1271 1272 1273 1274 1275 1276 1206 1208 1209
+ 1210 1211 1212 1237 1238 1239 1240 1241 1242 1243 1244 1206 1208
+ 1209 1210 1211 1212 1237 1238 1239 1240 1241 1242 1243 1244 1269
+ 1270 1271 1272 1273 1274 1275 1276 1206 1208 1209 1210 1211 1212
+ 1237 1238 1239 1240 1241 1242 1243 1244 1206 1208 1209 1210 1211
+ 1212 1237 1238 1239 1240 1241 1242 1243 1244 1269 1270 1271 1272
+ 1273 1274 1275 1276 1206 1208 1209 1210 1211 1212 1237 1238 1239
+ 1240 1241 1242 1243 1244 1269 1270 1271 1272 1273 1274 1275 1276
+ 1206 1208 1209 1210 1211 1212 1237 1238 1239 1240 1241 1242 1243
+ 1244 1269 1270 1271 1272 1273 1274 1275 1276 1206 1208 1209 1210
+ 1211 1212 1237 1238 1239 1240 1241 1242 1243 1244 1269 1270 1271
+ 1272 1273 1274 1275 1276 1174 1176 1177 1178 1179 1180 1205 1206
+ 1207 1208 1209 1210 1211 1212 1174 1176 1177 1178 1179 1180 1205
+ 1206 1207 1208 1209 1210 1211 1212 1237 1238 1239 1240 1241 1242
+ 1243 1244 1174 1176 1177 1178 1179 1180 1205 1206 1207 1208 1209
+ 1210 1211 1212 1237 1238 1239 1240 1241 1242 1243 1244 1174 1176
+ 1177 1178 1179 1180 1205 1206 1207 1208 1209 1210 1211 1212 1237
+ 1238 1239 1240 1241 1242 1243 1244 1174 1176 1177 1178 1179 1180
+ 1205 1206 1207 1208 1209 1210 1211 1212 1237 1238 1239 1240 1241
+ 1242 1243 1244 1174 1176 1177 1178 1179 1180 1205 1206 1207 1208
+ 1209 1210 1211 1212 1237 1238 1239 1240 1241 1242 1243 1244 1174
+ 1176 1177 1178 1179 1180 1205 1206 1207 1208 1209 1210 1211 1212
+ 1237 1238 1239 1240 1241 1242 1243 1244 1174 1176 1177 1178 1179
+ 1180 1205 1206 1207 1208 1209 1210 1211 1212 1142 1144 1145 1146
+ 1147 1148 1173 1174 1175 1176 1177 1178 1179 1180 1142 1144 1145
+ 1146 1147 1148 1173 1174 1175 1176 1177 1178 1179 1180 1205 1206
+ 1207 1208 1209 1210 1211 1212 1142 1144 1145 1146 1147 1148 1173
+ 1174 1175 1176 1177 1178 1179 1180 1205 1206 1207 1208 1209 1210
+ 1211 1212 1142 1144 1145 1146 1147 1148 1173 1174 1175 1176 1177
+ 1178 1179 1180 1205 1206 1207 1208 1209 1210 1211 1212 1142 1144
+ 1145 1146 1147 1148 1173 1174 1175 1176 1177 1178 1179 1180 1205
+ 1206 1207 1208 1209 1210 1211 1212 1142 1144 1145 1146 1147 1148
+ 1173 1174 1175 1176 1177 1178 1179 1180 1205 1206 1207 1208 1209
+ 1210 1211 1212 1142 1144 1145 1146 1147 1148 1173 1174 1175 1176
+ 1177 1178 1179 1180 1205 1206 1207 1208 1209 1210 1211 1212 1142
+ 1144 1145 1146 1147 1148 1173 1174 1175 1176 1177 1178 1179 1180
+ 1110 1112 1113 1114 1115 1116 1141 1142 1143 1144 1145 1146 1147
+ 1148 1110 1112 1113 1114 1115 1116 1141 1142 1143 1144 1145 1146
+ 1147 1148 1173 1174 1175 1176 1177 1178 1179 1180 1110 1112 1113
+ 1114 1115 1116 1141 1142 1143 1144 1145 1146 1147 1148 1173 1174
+ 1175 1176 1177 1178 1179 1180 1110 1112 1113 1114 1115 1116 1141
+ 1142 1143 1144 1145 1146 1147 1148 1173 1174 1175 1176 1177 1178
+ 1179 1180 1110 1112 1113 1114 1115 1116 1141 1142 1143 1144 1145
+ 1146 1147 1148 1173 1174 1175 1176 1177 1178 1179 1180 1110 1112
+ 1113 1114 1115 1116 1141 1142 1143 1144 1145 1146 1147 1148 1173
+ 1174 1175 1176 1177 1178 1179 1180 1110 1112 1113 1114 1115 1116
+ 1141 1142 1143 1144 1145 1146 1147 1148 1173 1174 1175 1176 1177
+ 1178 1179 1180 1110 1112 1113 1114 1115 1116 1141 1142 1143 1144
+ 1145 1146 1147 1148 1078 1080 1081 1082 1083 1084 1109 1110 1111
+ 1112 1113 1114 1115 1116 1078 1080 1081 1082 1083 1084 1109 1110
+ 1111 1112 1113 1114 1115 1116 1141 1142 1143 1144 1145 1146 1147
+ 1148 1078 1080 1081 1082 1083 1084 1109 1110 1111 1112 1113 1114
+ 1115 1116 1141 1142 1143 1144 1145 1146 1147 1148 1078 1080 1081
+ 1082 1083 1084 1109 1110 1111 1112 1113 1114 1115 1116 1141 1142
+ 1143 1144 1145 1146 1147 1148 1078 1080 1081 1082 1083 1084 1109
+ 1110 1111 1112 1113 1114 1115 1116 1141 1142 1143 1144 1145 1146
+ 1147 1148 1078 1080 1081 1082 1083 1084 1109 1110 1111 1112 1113
+ 1114 1115 1116 1141 1142 1143 1144 1145 1146 1147 1148 1078 1080
+ 1081 1082 1083 1084 1109 1110 1111 1112 1113 1114 1115 1116 1141
+ 1142 1143 1144 1145 1146 1147 1148 1078 1080 1081 1082 1083 1084
+ 1109 1110 1111 1112 1113 1114 1115 1116 1046 1048 1049 1050 1051
+ 1052 1077 1078 1079 1080 1081 1082 1083 1084 1046 1048 1049 1050
+ 1051 1052 1077 1078 1079 1080 1081 1082 1083 1084 1109 1110 1111
+ 1112 1113 1114 1115 1116 1046 1048 1049 1050 1051 1052 1077 1078
+ 1079 1080 1081 1082 1083 1084 1109 1110 1111 1112 1113 1114 1115
+ 1116 1046 1048 1049 1050 1051 1052 1077 1078 1079 1080 1081 1082
+ 1083 1084 1109 1110 1111 1112 1113 1114 1115 1116 1046 1048 1049
+ 1050 1051 1052 1077 1078 1079 1080 1081 1082 1083 1084 1109 1110
+ 1111 1112 1113 1114 1115 1116 1046 1048 1049 1050 1051 1052 1077
+ 1078 1079 1080 1081 1082 1083 1084 1109 1110 1111 1112 1113 1114
+ 1115 1116 1046 1048 1049 1050 1051 1052 1077 1078 1079 1080 1081
+ 1082 1083 1084 1109 1110 1111 1112 1113 1114 1115 1116 1046 1048
+ 1049 1050 1051 1052 1077 1078 1079 1080 1081 1082 1083 1084 1014
+ 1016 1017 1018 1019 1020 1045 1046 1047 1048 1049 1050 1051 1052
+ 1014 1016 1017 1018 1019 1020 1045 1046 1047 1048 1049 1050 1051
+ 1052 1077 1078 1079 1080 1081 1082 1083 1084 1014 1016 1017 1018
+ 1019 1020 1045 1046 1047 1048 1049 1050 1051 1052 1077 1078 1079
+ 1080 1081 1082 1083 1084 1014 1016 1017 1018 1019 1020 1045 1046
+ 1047 1048 1049 1050 1051 1052 1077 1078 1079 1080 1081 1082 1083
+ 1084 1014 1016 1017 1018 1019 1020 1045 1046 1047 1048 1049 1050
+ 1051 1052 1077 1078 1079 1080 1081 1082 1083 1084 1014 1016 1017
+ 1018 1019 1020 1045 1046 1047 1048 1049 1050 1051 1052 1077 1078
+ 1079 1080 1081 1082 1083 1084 1014 1016 1017 1018 1019 1020 1045
+ 1046 1047 1048 1049 1050 1051 1052 1077 1078 1079 1080 1081 1082
+ 1083 1084 1014 1016 1017 1018 1019 1020 1045 1046 1047 1048 1049
+ 1050 1051 1052 982 984 985 986 987 988 1013 1014 1015 1016
+ 1017 1018 1019 1020 982 984 985 986 987 988 1013 1014 1015
+ 1016 1017 1018 1019 1020 1045 1046 1047 1048 1049 1050 1051 1052
+ 982 984 985 986 987 988 1013 1014 1015 1016 1017 1018 1019
+ 1020 1045 1046 1047 1048 1049 1050 1051 1052 982 984 985 986
+ 987 988 1013 1014 1015 1016 1017 1018 1019 1020 1045 1046 1047
+ 1048 1049 1050 1051 1052 982 984 985 986 987 988 1013 1014
+ 1015 1016 1017 1018 1019 1020 1045 1046 1047 1048 1049 1050 1051
+ 1052 982 984 985 986 987 988 1013 1014 1015 1016 1017 1018
+ 1019 1020 1045 1046 1047 1048 1049 1050 1051 1052 982 984 985
+ 986 987 988 1013 1014 1015 1016 1017 1018 1019 1020 1045 1046
+ 1047 1048 1049 1050 1051 1052 982 984 985 986 987 988 1013
+ 1014 1015 1016 1017 1018 1019 1020 950 952 953 954 955 956
+ 981 982 983 984 985 986 987 988 950 952 953 954 955
+ 956 981 982 983 984 985 986 987 988 1013 1014 1015 1016
+ 1017 1018 1019 1020 950 952 953 954 955 956 981 982 983
+ 984 985 986 987 988 1013 1014 1015 1016 1017 1018 1019 1020
+ 950 952 953 954 955 956 981 982 983 984 985 986 987
+ 988 1013 1014 1015 1016 1017 1018 1019 1020 950 952 953 954
+ 955 956 981 982 983 984 985 986 987 988 1013 1014 1015
+ 1016 1017 1018 1019 1020 950 952 953 954 955 956 981 982
+ 983 984 985 986 987 988 1013 1014 1015 1016 1017 1018 1019
+ 1020 950 952 953 954 955 956 981 982 983 984 985 986
+ 987 988 1013 1014 1015 1016 1017 1018 1019 1020 950 952 953
+ 954 955 956 981 982 983 984 985 986 987 988 918 920
+ 921 922 923 924 949 950 951 952 953 954 955 956 918
+ 920 921 922 923 924 949 950 951 952 953 954 955 956
+ 981 982 983 984 985 986 987 988 918 920 921 922 923
+ 924 949 950 951 952 953 954 955 956 981 982 983 984
+ 985 986 987 988 918 920 921 922 923 924 949 950 951
+ 952 953 954 955 956 981 982 983 984 985 986 987 988
+ 918 920 921 922 923 924 949 950 951 952 953 954 955
+ 956 981 982 983 984 985 986 987 988 918 920 921 922
+ 923 924 949 950 951 952 953 954 955 956 981 982 983
+ 984 985 986 987 988 918 920 921 922 923 924 949 950
+ 951 952 953 954 955 956 981 982 983 984 985 986 987
+ 988 918 920 921 922 923 924 949 950 951 952 953 954
+ 955 956 886 888 889 890 891 892 917 918 919 920 921
+ 922 923 924 886 888 889 890 891 892 917 918 919 920
+ 921 922 923 924 949 950 951 952 953 954 955 956 886
+ 888 889 890 891 892 917 918 919 920 921 922 923 924
+ 949 950 951 952 953 954 955 956 886 888 889 890 891
+ 892 917 918 919 920 921 922 923 924 949 950 951 952
+ 953 954 955 956 886 888 889 890 891 892 917 918 919
+ 920 921 922 923 924 949 950 951 952 953 954 955 956
+ 886 888 889 890 891 892 917 918 919 920 921 922 923
+ 924 949 950 951 952 953 954 955 956 886 888 889 890
+ 891 892 917 918 919 920 921 922 923 924 949 950 951
+ 952 953 954 955 956 886 888 889 890 891 892 917 918
+ 919 920 921 922 923 924 854 856 857 858 859 860 885
+ 886 887 888 889 890 891 892 854 856 857 858 859 860
+ 885 886 887 888 889 890 891 892 917 918 919 920 921
+ 922 923 924 854 856 857 858 859 860 885 886 887 888
+ 889 890 891 892 917 918 919 920 921 922 923 924 854
+ 856 857 858 859 860 885 886 887 888 889 890 891 892
+ 917 918 919 920 921 922 923 924 854 856 857 858 859
+ 860 885 886 887 888 889 890 891 892 917 918 919 920
+ 921 922 923 924 854 856 857 858 859 860 885 886 887
+ 888 889 890 891 892 917 918 919 920 921 922 923 924
+ 854 856 857 858 859 860 885 886 887 888 889 890 891
+ 892 917 918 919 920 921 922 923 924 854 856 857 858
+ 859 860 885 886 887 888 889 890 891 892 822 824 825
+ 826 827 828 853 854 855 856 857 858 859 860 885 886
+ 887 888 889 890 891 892 822 824 825 826 827 828 853
+ 854 855 856 857 858 859 860 885 886 887 888 889 890
+ 891 892 822 824 825 826 827 828 853 854 855 856 857
+ 858 859 860 885 886 887 888 889 890 891 892 822 824
+ 825 826 827 828 853 854 855 856 857 858 859 860 885
+ 886 887 888 889 890 891 892 822 824 825 826 827 828
+ 853 854 855 856 857 858 859 860 885 886 887 888 889
+ 890 891 892 822 824 825 826 827 828 853 854 855 856
+ 857 858 859 860 885 886 887 888 889 890 891 892 822
+ 824 825 826 827 828 853 854 855 856 857 858 859 860
+ 822 824 825 826 827 828 853 854 855 856 857 858 859
+ 860 790 792 793 794 795 796 821 822 823 824 825 826
+ 827 828 853 854 855 856 857 858 859 860 790 792 793
+ 794 795 796 821 822 823 824 825 826 827 828 790 792
+ 793 794 795 796 821 822 823 824 825 826 827 828 790
+ 792 793 794 795 796 821 822 823 824 825 826 827 828
+ 853 854 855 856 857 858 859 860 790 792 793 794 795
+ 796 821 822 823 824 825 826 827 828 853 854 855 856
+ 857 858 859 860 790 792 793 794 795 796 821 822 823
+ 824 825 826 827 828 853 854 855 856 857 858 859 860
+ 790 792 793 794 795 796 821 822 823 824 825 826 827
+ 828 853 854 855 856 857 858 859 860 790 792 793 794
+ 795 796 821 822 823 824 825 826 827 828 853 854 855
+ 856 857 858 859 860 758 760 761 762 763 764 789 790
+ 791 792 793 794 795 796 758 760 761 762 763 764 789
+ 790 791 792 793 794 795 796 821 822 823 824 825 826
+ 827 828 758 760 761 762 763 764 789 790 791 792 793
+ 794 795 796 821 822 823 824 825 826 827 828 758 760
+ 761 762 763 764 789 790 791 792 793 794 795 796 821
+ 822 823 824 825 826 827 828 758 760 761 762 763 764
+ 789 790 791 792 793 794 795 796 821 822 823 824 825
+ 826 827 828 758 760 761 762 763 764 789 790 791 792
+ 793 794 795 796 821 822 823 824 825 826 827 828 758
+ 760 761 762 763 764 789 790 791 792 793 794 795 796
+ 821 822 823 824 825 826 827 828 758 760 761 762 763
+ 764 789 790 791 792 793 794 795 796 726 728 729 730
+ 731 732 757 758 759 760 761 762 763 764 789 790 791
+ 792 793 794 795 796 726 728 729 730 731 732 757 758
+ 759 760 761 762 763 764 789 790 791 792 793 794 795
+ 796 726 728 729 730 731 732 757 758 759 760 761 762
+ 763 764 789 790 791 792 793 794 795 796 726 728 729
+ 730 731 732 757 758 759 760 761 762 763 764 789 790
+ 791 792 793 794 795 796 726 728 729 730 731 732 757
+ 758 759 760 761 762 763 764 789 790 791 792 793 794
+ 795 796 726 728 729 730 731 732 757 758 759 760 761
+ 762 763 764 789 790 791 792 793 794 795 796 726 728
+ 729 730 731 732 757 758 759 760 761 762 763 764 726
+ 728 729 730 731 732 757 758 759 760 761 762 763 764
+ 694 696 697 698 699 700 725 726 727 728 729 730 731
+ 732 757 758 759 760 761 762 763 764 694 696 697 698
+ 699 700 725 726 727 728 729 730 731 732 694 696 697
+ 698 699 700 725 726 727 728 729 730 731 732 694 696
+ 697 698 699 700 725 726 727 728 729 730 731 732 757
+ 758 759 760 761 762 763 764 694 696 697 698 699 700
+ 725 726 727 728 729 730 731 732 757 758 759 760 761
+ 762 763 764 694 696 697 698 699 700 725 726 727 728
+ 729 730 731 732 757 758 759 760 761 762 763 764 694
+ 696 697 698 699 700 725 726 727 728 729 730 731 732
+ 757 758 759 760 761 762 763 764 694 696 697 698 699
+ 700 725 726 727 728 729 730 731 732 757 758 759 760
+ 761 762 763 764 662 664 665 666 667 668 693 694 695
+ 696 697 698 699 700 662 664 665 666 667 668 693 694
+ 695 696 697 698 699 700 725 726 727 728 729 730 731
+ 732 662 664 665 666 667 668 693 694 695 696 697 698
+ 699 700 725 726 727 728 729 730 731 732 662 664 665
+ 666 667 668 693 694 695 696 697 698 699 700 725 726
+ 727 728 729 730 731 732 662 664 665 666 667 668 693
+ 694 695 696 697 698 699 700 725 726 727 728 729 730
+ 731 732 662 664 665 666 667 668 693 694 695 696 697
+ 698 699 700 725 726 727 728 729 730 731 732 662 664
+ 665 666 667 668 693 694 695 696 697 698 699 700 725
+ 726 727 728 729 730 731 732 662 664 665 666 667 668
+ 693 694 695 696 697 698 699 700 598 600 601 602 603
+ 604 629 630 631 632 633 634 635 636 661 662 663 664
+ 665 666 667 668 598 600 601 602 603 604 629 630 631
+ 632 633 634 635 636 661 662 663 664 665 666 667 668
+ 598 600 601 602 603 604 629 630 631 632 633 634 635
+ 636 661 662 663 664 665 666 667 668 598 600 601 602
+ 603 604 629 630 631 632 633 634 635 636 661 662 663
+ 664 665 666 667 668 598 600 601 602 603 604 629 630
+ 631 632 633 634 635 636 661 662 663 664 665 666 667
+ 668 598 600 601 602 603 604 629 630 631 632 633 634
+ 635 636 661 662 663 664 665 666 667 668 630 632 633
+ 634 635 636 661 662 663 664 665 666 667 668 693 694
+ 695 696 697 698 699 700 630 632 633 634 635 636 661
+ 662 663 664 665 666 667 668 693 694 695 696 697 698
+ 699 700 630 632 633 634 635 636 661 662 663 664 665
+ 666 667 668 693 694 695 696 697 698 699 700 630 632
+ 633 634 635 636 661 662 663 664 665 666 667 668 693
+ 694 695 696 697 698 699 700 630 632 633 634 635 636
+ 661 662 663 664 665 666 667 668 693 694 695 696 697
+ 698 699 700 630 632 633 634 635 636 661 662 663 664
+ 665 666 667 668 693 694 695 696 697 698 699 700 630
+ 632 633 634 635 636 661 662 663 664 665 666 667 668
+ 630 632 633 634 635 636 661 662 663 664 665 666 667
+ 668 6 8 10 12 14 16 37 38 39 40 41 42
+ 43 44 45 46 47 48 6 8 10 12 14 16 37
+ 38 39 40 41 42 43 44 45 46 47 48 6 8
+ 10 12 14 16 37 38 39 40 41 42 43 44 45
+ 46 47 48 6 8 10 12 14 16 37 38 39 40
+ 41 42 43 44 45 46 47 48 6 8 10 12 14
+ 16 37 38 39 40 41 42 43 44 45 46 47 48
+ 6 8 10 12 14 16 37 38 39 40 41 42 43
+ 44 45 46 47 48 6 8 10 12 14 16 37 38
+ 39 40 41 42 43 44 45 46 47 48 6 8 10
+ 12 14 16 37 38 39 40 41 42 43 44 45 46
+ 47 48 6 8 10 12 14 16 37 38 39 40 41
+ 42 43 44 45 46 47 48 6 8 10 12 14 16
+ 37 38 39 40 41 42 43 44 45 46 47 48 37
+ 38 39 40 42 44 46 48 69 70 71 72 73 74
+ 75 76 77 78 79 80 6 8 10 12 14 16 37
+ 38 39 40 41 42 43 44 45 46 47 48 69 70
+ 71 72 73 74 75 76 77 78 79 80 6 8 10
+ 12 14 16 37 38 39 40 41 42 43 44 45 46
+ 47 48 69 70 71 72 73 74 75 76 77 78 79
+ 80 6 8 10 12 14 16 37 38 39 40 41 42
+ 43 44 45 46 47 48 69 70 71 72 73 74 75
+ 76 77 78 79 80 6 8 10 12 14 16 37 38
+ 39 40 41 42 43 44 45 46 47 48 69 70 71
+ 72 73 74 75 76 77 78 79 80 6 8 10 12
+ 14 16 37 38 39 40 41 42 43 44 45 46 47
+ 48 69 70 71 72 73 74 75 76 77 78 79 80
+ 6 8 10 12 14 16 37 38 39 40 41 42 43
+ 44 45 46 47 48 69 70 71 72 73 74 75 76
+ 77 78 79 80 6 8 10 12 14 16 37 38 39
+ 40 41 42 43 44 45 46 47 48 69 70 71 72
+ 73 74 75 76 77 78 79 80 6 8 10 12 14
+ 16 37 38 39 40 41 42 43 44 45 46 47 48
+ 69 70 71 72 73 74 75 76 77 78 79 80 37
+ 38 39 40 42 44 46 48 69 70 71 72 73 74
+ 75 76 77 78 79 80 37 38 39 40 42 44 46
+ 48 69 70 71 72 73 74 75 76 77 78 79 80
+ 37 38 39 40 42 44 46 48 69 70 71 72 73
+ 74 75 76 77 78 79 80 69 70 71 72 74 76
+ 78 80 101 102 103 104 105 106 107 108 109 110 111
+ 112 37 38 39 40 42 44 46 48 69 70 71 72
+ 73 74 75 76 77 78 79 80 101 102 103 104 105
+ 106 107 108 109 110 111 112 37 38 39 40 42 44
+ 46 48 69 70 71 72 73 74 75 76 77 78 79
+ 80 101 102 103 104 105 106 107 108 109 110 111 112
+ 37 38 39 40 42 44 46 48 69 70 71 72 73
+ 74 75 76 77 78 79 80 101 102 103 104 105 106
+ 107 108 109 110 111 112 37 38 39 40 42 44 46
+ 48 69 70 71 72 73 74 75 76 77 78 79 80
+ 101 102 103 104 105 106 107 108 109 110 111 112 37
+ 38 39 40 42 44 46 48 69 70 71 72 73 74
+ 75 76 77 78 79 80 101 102 103 104 105 106 107
+ 108 109 110 111 112 37 38 39 40 42 44 46 48
+ 69 70 71 72 73 74 75 76 77 78 79 80 101
+ 102 103 104 105 106 107 108 109 110 111 112 37 38
+ 39 40 42 44 46 48 69 70 71 72 73 74 75
+ 76 77 78 79 80 101 102 103 104 105 106 107 108
+ 109 110 111 112 37 38 39 40 42 44 46 48 69
+ 70 71 72 73 74 75 76 77 78 79 80 101 102
+ 103 104 105 106 107 108 109 110 111 112 69 70 71
+ 72 74 76 78 80 101 102 103 104 105 106 107 108
+ 109 110 111 112 69 70 71 72 74 76 78 80 101
+ 102 103 104 105 106 107 108 109 110 111 112 69 70
+ 71 72 74 76 78 80 101 102 103 104 105 106 107
+ 108 109 110 111 112 101 102 103 104 106 108 110 112
+ 133 134 135 136 137 138 139 140 141 142 143 144 69
+ 70 71 72 74 76 78 80 101 102 103 104 105 106
+ 107 108 109 110 111 112 133 134 135 136 137 138 139
+ 140 141 142 143 144 69 70 71 72 74 76 78 80
+ 101 102 103 104 105 106 107 108 109 110 111 112 133
+ 134 135 136 137 138 139 140 141 142 143 144 69 70
+ 71 72 74 76 78 80 101 102 103 104 105 106 107
+ 108 109 110 111 112 133 134 135 136 137 138 139 140
+ 141 142 143 144 69 70 71 72 74 76 78 80 101
+ 102 103 104 105 106 107 108 109 110 111 112 133 134
+ 135 136 137 138 139 140 141 142 143 144 69 70 71
+ 72 74 76 78 80 101 102 103 104 105 106 107 108
+ 109 110 111 112 133 134 135 136 137 138 139 140 141
+ 142 143 144 69 70 71 72 74 76 78 80 101 102
+ 103 104 105 106 107 108 109 110 111 112 133 134 135
+ 136 137 138 139 140 141 142 143 144 69 70 71 72
+ 74 76 78 80 101 102 103 104 105 106 107 108 109
+ 110 111 112 133 134 135 136 137 138 139 140 141 142
+ 143 144 69 70 71 72 74 76 78 80 101 102 103
+ 104 105 106 107 108 109 110 111 112 133 134 135 136
+ 137 138 139 140 141 142 143 144 101 102 103 104 106
+ 108 110 112 133 134 135 136 137 138 139 140 141 142
+ 143 144 101 102 103 104 106 108 110 112 133 134 135
+ 136 137 138 139 140 141 142 143 144 101 102 103 104
+ 106 108 110 112 133 134 135 136 137 138 139 140 141
+ 142 143 144 133 134 135 136 138 140 142 144 165 166
+ 167 168 169 170 171 172 173 174 175 176 101 102 103
+ 104 106 108 110 112 133 134 135 136 137 138 139 140
+ 141 142 143 144 165 166 167 168 169 170 171 172 173
+ 174 175 176 101 102 103 104 106 108 110 112 133 134
+ 135 136 137 138 139 140 141 142 143 144 165 166 167
+ 168 169 170 171 172 173 174 175 176 101 102 103 104
+ 106 108 110 112 133 134 135 136 137 138 139 140 141
+ 142 143 144 165 166 167 168 169 170 171 172 173 174
+ 175 176 101 102 103 104 106 108 110 112 133 134 135
+ 136 137 138 139 140 141 142 143 144 165 166 167 168
+ 169 170 171 172 173 174 175 176 101 102 103 104 106
+ 108 110 112 133 134 135 136 137 138 139 140 141 142
+ 143 144 165 166 167 168 169 170 171 172 173 174 175
+ 176 101 102 103 104 106 108 110 112 133 134 135 136
+ 137 138 139 140 141 142 143 144 165 166 167 168 169
+ 170 171 172 173 174 175 176 101 102 103 104 106 108
+ 110 112 133 134 135 136 137 138 139 140 141 142 143
+ 144 165 166 167 168 169 170 171 172 173 174 175 176
+ 101 102 103 104 106 108 110 112 133 134 135 136 137
+ 138 139 140 141 142 143 144 165 166 167 168 169 170
+ 171 172 173 174 175 176 133 134 135 136 138 140 142
+ 144 165 166 167 168 169 170 171 172 173 174 175 176
+ 133 134 135 136 138 140 142 144 165 166 167 168 169
+ 170 171 172 173 174 175 176 133 134 135 136 138 140
+ 142 144 165 166 167 168 169 170 171 172 173 174 175
+ 176 165 166 167 168 170 172 174 176 197 198 199 200
+ 201 202 203 204 205 206 207 208 133 134 135 136 138
+ 140 142 144 165 166 167 168 169 170 171 172 173 174
+ 175 176 197 198 199 200 201 202 203 204 205 206 207
+ 208 133 134 135 136 138 140 142 144 165 166 167 168
+ 169 170 171 172 173 174 175 176 197 198 199 200 201
+ 202 203 204 205 206 207 208 133 134 135 136 138 140
+ 142 144 165 166 167 168 169 170 171 172 173 174 175
+ 176 197 198 199 200 201 202 203 204 205 206 207 208
+ 133 134 135 136 138 140 142 144 165 166 167 168 169
+ 170 171 172 173 174 175 176 197 198 199 200 201 202
+ 203 204 205 206 207 208 133 134 135 136 138 140 142
+ 144 165 166 167 168 169 170 171 172 173 174 175 176
+ 197 198 199 200 201 202 203 204 205 206 207 208 133
+ 134 135 136 138 140 142 144 165 166 167 168 169 170
+ 171 172 173 174 175 176 197 198 199 200 201 202 203
+ 204 205 206 207 208 133 134 135 136 138 140 142 144
+ 165 166 167 168 169 170 171 172 173 174 175 176 197
+ 198 199 200 201 202 203 204 205 206 207 208 133 134
+ 135 136 138 140 142 144 165 166 167 168 169 170 171
+ 172 173 174 175 176 197 198 199 200 201 202 203 204
+ 205 206 207 208 165 166 167 168 170 172 174 176 197
+ 198 199 200 201 202 203 204 205 206 207 208 165 166
+ 167 168 170 172 174 176 197 198 199 200 201 202 203
+ 204 205 206 207 208 165 166 167 168 170 172 174 176
+ 197 198 199 200 201 202 203 204 205 206 207 208 197
+ 198 199 200 202 204 206 208 229 230 231 232 233 234
+ 235 236 237 238 239 240 165 166 167 168 170 172 174
+ 176 197 198 199 200 201 202 203 204 205 206 207 208
+ 229 230 231 232 233 234 235 236 237 238 239 240 165
+ 166 167 168 170 172 174 176 197 198 199 200 201 202
+ 203 204 205 206 207 208 229 230 231 232 233 234 235
+ 236 237 238 239 240 165 166 167 168 170 172 174 176
+ 197 198 199 200 201 202 203 204 205 206 207 208 229
+ 230 231 232 233 234 235 236 237 238 239 240 165 166
+ 167 168 170 172 174 176 197 198 199 200 201 202 203
+ 204 205 206 207 208 229 230 231 232 233 234 235 236
+ 237 238 239 240 165 166 167 168 170 172 174 176 197
+ 198 199 200 201 202 203 204 205 206 207 208 229 230
+ 231 232 233 234 235 236 237 238 239 240 165 166 167
+ 168 170 172 174 176 197 198 199 200 201 202 203 204
+ 205 206 207 208 229 230 231 232 233 234 235 236 237
+ 238 239 240 165 166 167 168 170 172 174 176 197 198
+ 199 200 201 202 203 204 205 206 207 208 229 230 231
+ 232 233 234 235 236 237 238 239 240 165 166 167 168
+ 170 172 174 176 197 198 199 200 201 202 203 204 205
+ 206 207 208 229 230 231 232 233 234 235 236 237 238
+ 239 240 197 198 199 200 202 204 206 208 229 230 231
+ 232 233 234 235 236 237 238 239 240 197 198 199 200
+ 202 204 206 208 229 230 231 232 233 234 235 236 237
+ 238 239 240 197 198 199 200 202 204 206 208 229 230
+ 231 232 233 234 235 236 237 238 239 240 229 230 231
+ 232 234 236 238 240 261 262 263 264 265 266 267 268
+ 269 270 271 272 197 198 199 200 202 204 206 208 229
+ 230 231 232 233 234 235 236 237 238 239 240 261 262
+ 263 264 265 266 267 268 269 270 271 272 197 198 199
+ 200 202 204 206 208 229 230 231 232 233 234 235 236
+ 237 238 239 240 261 262 263 264 265 266 267 268 269
+ 270 271 272 197 198 199 200 202 204 206 208 229 230
+ 231 232 233 234 235 236 237 238 239 240 261 262 263
+ 264 265 266 267 268 269 270 271 272 197 198 199 200
+ 202 204 206 208 229 230 231 232 233 234 235 236 237
+ 238 239 240 261 262 263 264 265 266 267 268 269 270
+ 271 272 197 198 199 200 202 204 206 208 229 230 231
+ 232 233 234 235 236 237 238 239 240 261 262 263 264
+ 265 266 267 268 269 270 271 272 197 198 199 200 202
+ 204 206 208 229 230 231 232 233 234 235 236 237 238
+ 239 240 261 262 263 264 265 266 267 268 269 270 271
+ 272 197 198 199 200 202 204 206 208 229 230 231 232
+ 233 234 235 236 237 238 239 240 261 262 263 264 265
+ 266 267 268 269 270 271 272 197 198 199 200 202 204
+ 206 208 229 230 231 232 233 234 235 236 237 238 239
+ 240 261 262 263 264 265 266 267 268 269 270 271 272
+ 229 230 231 232 234 236 238 240 261 262 263 264 265
+ 266 267 268 269 270 271 272 229 230 231 232 234 236
+ 238 240 261 262 263 264 265 266 267 268 269 270 271
+ 272 229 230 231 232 234 236 238 240 261 262 263 264
+ 265 266 267 268 269 270 271 272 261 262 263 264 266
+ 268 270 272 293 294 295 296 297 298 299 300 301 302
+ 303 304 229 230 231 232 234 236 238 240 261 262 263
+ 264 265 266 267 268 269 270 271 272 293 294 295 296
+ 297 298 299 300 301 302 303 304 229 230 231 232 234
+ 236 238 240 261 262 263 264 265 266 267 268 269 270
+ 271 272 293 294 295 296 297 298 299 300 301 302 303
+ 304 229 230 231 232 234 236 238 240 261 262 263 264
+ 265 266 267 268 269 270 271 272 293 294 295 296 297
+ 298 299 300 301 302 303 304 229 230 231 232 234 236
+ 238 240 261 262 263 264 265 266 267 268 269 270 271
+ 272 293 294 295 296 297 298 299 300 301 302 303 304
+ 229 230 231 232 234 236 238 240 261 262 263 264 265
+ 266 267 268 269 270 271 272 293 294 295 296 297 298
+ 299 300 301 302 303 304 229 230 231 232 234 236 238
+ 240 261 262 263 264 265 266 267 268 269 270 271 272
+ 293 294 295 296 297 298 299 300 301 302 303 304 229
+ 230 231 232 234 236 238 240 261 262 263 264 265 266
+ 267 268 269 270 271 272 293 294 295 296 297 298 299
+ 300 301 302 303 304 229 230 231 232 234 236 238 240
+ 261 262 263 264 265 266 267 268 269 270 271 272 293
+ 294 295 296 297 298 299 300 301 302 303 304 261 262
+ 263 264 266 268 270 272 293 294 295 296 297 298 299
+ 300 301 302 303 304 261 262 263 264 266 268 270 272
+ 293 294 295 296 297 298 299 300 301 302 303 304 261
+ 262 263 264 266 268 270 272 293 294 295 296 297 298
+ 299 300 301 302 303 304 293 294 295 296 298 300 302
+ 304 325 326 327 328 329 330 331 332 333 334 335 336
+ 261 262 263 264 266 268 270 272 293 294 295 296 297
+ 298 299 300 301 302 303 304 325 326 327 328 329 330
+ 331 332 333 334 335 336 261 262 263 264 266 268 270
+ 272 293 294 295 296 297 298 299 300 301 302 303 304
+ 325 326 327 328 329 330 331 332 333 334 335 336 261
+ 262 263 264 266 268 270 272 293 294 295 296 297 298
+ 299 300 301 302 303 304 325 326 327 328 329 330 331
+ 332 333 334 335 336 261 262 263 264 266 268 270 272
+ 293 294 295 296 297 298 299 300 301 302 303 304 325
+ 326 327 328 329 330 331 332 333 334 335 336 261 262
+ 263 264 266 268 270 272 293 294 295 296 297 298 299
+ 300 301 302 303 304 325 326 327 328 329 330 331 332
+ 333 334 335 336 261 262 263 264 266 268 270 272 293
+ 294 295 296 297 298 299 300 301 302 303 304 325 326
+ 327 328 329 330 331 332 333 334 335 336 261 262 263
+ 264 266 268 270 272 293 294 295 296 297 298 299 300
+ 301 302 303 304 325 326 327 328 329 330 331 332 333
+ 334 335 336 261 262 263 264 266 268 270 272 293 294
+ 295 296 297 298 299 300 301 302 303 304 325 326 327
+ 328 329 330 331 332 333 334 335 336 293 294 295 296
+ 298 300 302 304 325 326 327 328 329 330 331 332 333
+ 334 335 336 293 294 295 296 298 300 302 304 325 326
+ 327 328 329 330 331 332 333 334 335 336 293 294 295
+ 296 298 300 302 304 325 326 327 328 329 330 331 332
+ 333 334 335 336 325 326 327 328 330 332 334 336 357
+ 358 359 360 361 362 363 364 365 366 367 368 293 294
+ 295 296 298 300 302 304 325 326 327 328 329 330 331
+ 332 333 334 335 336 357 358 359 360 361 362 363 364
+ 365 366 367 368 293 294 295 296 298 300 302 304 325
+ 326 327 328 329 330 331 332 333 334 335 336 357 358
+ 359 360 361 362 363 364 365 366 367 368 293 294 295
+ 296 298 300 302 304 325 326 327 328 329 330 331 332
+ 333 334 335 336 357 358 359 360 361 362 363 364 365
+ 366 367 368 293 294 295 296 298 300 302 304 325 326
+ 327 328 329 330 331 332 333 334 335 336 357 358 359
+ 360 361 362 363 364 365 366 367 368 293 294 295 296
+ 298 300 302 304 325 326 327 328 329 330 331 332 333
+ 334 335 336 357 358 359 360 361 362 363 364 365 366
+ 367 368 293 294 295 296 298 300 302 304 325 326 327
+ 328 329 330 331 332 333 334 335 336 357 358 359 360
+ 361 362 363 364 365 366 367 368 293 294 295 296 298
+ 300 302 304 325 326 327 328 329 330 331 332 333 334
+ 335 336 357 358 359 360 361 362 363 364 365 366 367
+ 368 293 294 295 296 298 300 302 304 325 326 327 328
+ 329 330 331 332 333 334 335 336 357 358 359 360 361
+ 362 363 364 365 366 367 368 325 326 327 328 330 332
+ 334 336 357 358 359 360 361 362 363 364 365 366 367
+ 368 325 326 327 328 330 332 334 336 357 358 359 360
+ 361 362 363 364 365 366 367 368 325 326 327 328 330
+ 332 334 336 357 358 359 360 361 362 363 364 365 366
+ 367 368 357 358 359 360 362 364 366 368 389 390 391
+ 392 393 394 395 396 397 398 399 400 325 326 327 328
+ 330 332 334 336 357 358 359 360 361 362 363 364 365
+ 366 367 368 389 390 391 392 393 394 395 396 397 398
+ 399 400 325 326 327 328 330 332 334 336 357 358 359
+ 360 361 362 363 364 365 366 367 368 389 390 391 392
+ 393 394 395 396 397 398 399 400 325 326 327 328 330
+ 332 334 336 357 358 359 360 361 362 363 364 365 366
+ 367 368 389 390 391 392 393 394 395 396 397 398 399
+ 400 325 326 327 328 330 332 334 336 357 358 359 360
+ 361 362 363 364 365 366 367 368 389 390 391 392 393
+ 394 395 396 397 398 399 400 325 326 327 328 330 332
+ 334 336 357 358 359 360 361 362 363 364 365 366 367
+ 368 389 390 391 392 393 394 395 396 397 398 399 400
+ 325 326 327 328 330 332 334 336 357 358 359 360 361
+ 362 363 364 365 366 367 368 389 390 391 392 393 394
+ 395 396 397 398 399 400 325 326 327 328 330 332 334
+ 336 357 358 359 360 361 362 363 364 365 366 367 368
+ 389 390 391 392 393 394 395 396 397 398 399 400 325
+ 326 327 328 330 332 334 336 357 358 359 360 361 362
+ 363 364 365 366 367 368 389 390 391 392 393 394 395
+ 396 397 398 399 400 357 358 359 360 362 364 366 368
+ 389 390 391 392 393 394 395 396 397 398 399 400 357
+ 358 359 360 362 364 366 368 389 390 391 392 393 394
+ 395 396 397 398 399 400 357 358 359 360 362 364 366
+ 368 389 390 391 392 393 394 395 396 397 398 399 400
+ 485 486 487 488 490 492 494 496 517 518 519 520 521
+ 522 523 524 525 526 527 528 453 454 455 456 458 460
+ 462 464 485 486 487 488 489 490 491 492 493 494 495
+ 496 421 422 423 424 426 428 430 432 453 454 455 456
+ 457 458 459 460 461 462 463 464 389 390 391 392 394
+ 396 398 400 421 422 423 424 425 426 427 428 429 430
+ 431 432 357 358 359 360 362 364 366 368 389 390 391
+ 392 393 394 395 396 397 398 399 400 421 422 423 424
+ 425 426 427 428 429 430 431 432 357 358 359 360 362
+ 364 366 368 389 390 391 392 393 394 395 396 397 398
+ 399 400 421 422 423 424 425 426 427 428 429 430 431
+ 432 357 358 359 360 362 364 366 368 389 390 391 392
+ 393 394 395 396 397 398 399 400 421 422 423 424 425
+ 426 427 428 429 430 431 432 357 358 359 360 362 364
+ 366 368 389 390 391 392 393 394 395 396 397 398 399
+ 400 421 422 423 424 425 426 427 428 429 430 431 432
+ 357 358 359 360 362 364 366 368 389 390 391 392 393
+ 394 395 396 397 398 399 400 421 422 423 424 425 426
+ 427 428 429 430 431 432 357 358 359 360 362 364 366
+ 368 389 390 391 392 393 394 395 396 397 398 399 400
+ 421 422 423 424 425 426 427 428 429 430 431 432 357
+ 358 359 360 362 364 366 368 389 390 391 392 393 394
+ 395 396 397 398 399 400 421 422 423 424 425 426 427
+ 428 429 430 431 432 357 358 359 360 362 364 366 368
+ 389 390 391 392 393 394 395 396 397 398 399 400 421
+ 422 423 424 425 426 427 428 429 430 431 432 389 390
+ 391 392 394 396 398 400 421 422 423 424 425 426 427
+ 428 429 430 431 432 389 390 391 392 394 396 398 400
+ 421 422 423 424 425 426 427 428 429 430 431 432 389
+ 390 391 392 394 396 398 400 421 422 423 424 425 426
+ 427 428 429 430 431 432 389 390 391 392 394 396 398
+ 400 421 422 423 424 425 426 427 428 429 430 431 432
+ 453 454 455 456 457 458 459 460 461 462 463 464 389
+ 390 391 392 394 396 398 400 421 422 423 424 425 426
+ 427 428 429 430 431 432 453 454 455 456 457 458 459
+ 460 461 462 463 464 389 390 391 392 394 396 398 400
+ 421 422 423 424 425 426 427 428 429 430 431 432 453
+ 454 455 456 457 458 459 460 461 462 463 464 389 390
+ 391 392 394 396 398 400 421 422 423 424 425 426 427
+ 428 429 430 431 432 453 454 455 456 457 458 459 460
+ 461 462 463 464 389 390 391 392 394 396 398 400 421
+ 422 423 424 425 426 427 428 429 430 431 432 453 454
+ 455 456 457 458 459 460 461 462 463 464 389 390 391
+ 392 394 396 398 400 421 422 423 424 425 426 427 428
+ 429 430 431 432 453 454 455 456 457 458 459 460 461
+ 462 463 464 389 390 391 392 394 396 398 400 421 422
+ 423 424 425 426 427 428 429 430 431 432 453 454 455
+ 456 457 458 459 460 461 462 463 464 389 390 391 392
+ 394 396 398 400 421 422 423 424 425 426 427 428 429
+ 430 431 432 453 454 455 456 457 458 459 460 461 462
+ 463 464 421 422 423 424 426 428 430 432 453 454 455
+ 456 457 458 459 460 461 462 463 464 421 422 423 424
+ 426 428 430 432 453 454 455 456 457 458 459 460 461
+ 462 463 464 421 422 423 424 426 428 430 432 453 454
+ 455 456 457 458 459 460 461 462 463 464 421 422 423
+ 424 426 428 430 432 453 454 455 456 457 458 459 460
+ 461 462 463 464 485 486 487 488 489 490 491 492 493
+ 494 495 496 421 422 423 424 426 428 430 432 453 454
+ 455 456 457 458 459 460 461 462 463 464 485 486 487
+ 488 489 490 491 492 493 494 495 496 421 422 423 424
+ 426 428 430 432 453 454 455 456 457 458 459 460 461
+ 462 463 464 485 486 487 488 489 490 491 492 493 494
+ 495 496 421 422 423 424 426 428 430 432 453 454 455
+ 456 457 458 459 460 461 462 463 464 485 486 487 488
+ 489 490 491 492 493 494 495 496 421 422 423 424 426
+ 428 430 432 453 454 455 456 457 458 459 460 461 462
+ 463 464 485 486 487 488 489 490 491 492 493 494 495
+ 496 421 422 423 424 426 428 430 432 453 454 455 456
+ 457 458 459 460 461 462 463 464 485 486 487 488 489
+ 490 491 492 493 494 495 496 421 422 423 424 426 428
+ 430 432 453 454 455 456 457 458 459 460 461 462 463
+ 464 485 486 487 488 489 490 491 492 493 494 495 496
+ 421 422 423 424 426 428 430 432 453 454 455 456 457
+ 458 459 460 461 462 463 464 485 486 487 488 489 490
+ 491 492 493 494 495 496 453 454 455 456 458 460 462
+ 464 485 486 487 488 489 490 491 492 493 494 495 496
+ 453 454 455 456 458 460 462 464 485 486 487 488 489
+ 490 491 492 493 494 495 496 453 454 455 456 458 460
+ 462 464 485 486 487 488 489 490 491 492 493 494 495
+ 496 453 454 455 456 458 460 462 464 485 486 487 488
+ 489 490 491 492 493 494 495 496 517 518 519 520 521
+ 522 523 524 525 526 527 528 453 454 455 456 458 460
+ 462 464 485 486 487 488 489 490 491 492 493 494 495
+ 496 517 518 519 520 521 522 523 524 525 526 527 528
+ 453 454 455 456 458 460 462 464 485 486 487 488 489
+ 490 491 492 493 494 495 496 517 518 519 520 521 522
+ 523 524 525 526 527 528 453 454 455 456 458 460 462
+ 464 485 486 487 488 489 490 491 492 493 494 495 496
+ 517 518 519 520 521 522 523 524 525 526 527 528 453
+ 454 455 456 458 460 462 464 485 486 487 488 489 490
+ 491 492 493 494 495 496 517 518 519 520 521 522 523
+ 524 525 526 527 528 453 454 455 456 458 460 462 464
+ 485 486 487 488 489 490 491 492 493 494 495 496 517
+ 518 519 520 521 522 523 524 525 526 527 528 453 454
+ 455 456 458 460 462 464 485 486 487 488 489 490 491
+ 492 493 494 495 496 517 518 519 520 521 522 523 524
+ 525 526 527 528 453 454 455 456 458 460 462 464 485
+ 486 487 488 489 490 491 492 493 494 495 496 517 518
+ 519 520 521 522 523 524 525 526 527 528 485 486 487
+ 488 490 492 494 496 517 518 519 520 521 522 523 524
+ 525 526 527 528 485 486 487 488 490 492 494 496 517
+ 518 519 520 521 522 523 524 525 526 527 528 485 486
+ 487 488 490 492 494 496 517 518 519 520 521 522 523
+ 524 525 526 527 528 485 486 487 488 490 492 494 496
+ 517 518 519 520 521 522 523 524 525 526 527 528 549
+ 550 551 552 553 554 555 556 557 558 559 560 485 486
+ 487 488 490 492 494 496 517 518 519 520 521 522 523
+ 524 525 526 527 528 549 550 551 552 553 554 555 556
+ 557 558 559 560 485 486 487 488 490 492 494 496 517
+ 518 519 520 521 522 523 524 525 526 527 528 549 550
+ 551 552 553 554 555 556 557 558 559 560 485 486 487
+ 488 490 492 494 496 517 518 519 520 521 522 523 524
+ 525 526 527 528 549 550 551 552 553 554 555 556 557
+ 558 559 560 485 486 487 488 490 492 494 496 517 518
+ 519 520 521 522 523 524 525 526 527 528 549 550 551
+ 552 553 554 555 556 557 558 559 560 485 486 487 488
+ 490 492 494 496 517 518 519 520 521 522 523 524 525
+ 526 527 528 549 550 551 552 553 554 555 556 557 558
+ 559 560 485 486 487 488 490 492 494 496 517 518 519
+ 520 521 522 523 524 525 526 527 528 549 550 551 552
+ 553 554 555 556 557 558 559 560 485 486 487 488 490
+ 492 494 496 517 518 519 520 521 522 523 524 525 526
+ 527 528 549 550 551 552 553 554 555 556 557 558 559
+ 560 517 518 519 520 522 524 526 528 549 550 551 552
+ 553 554 555 556 557 558 559 560 517 518 519 520 522
+ 524 526 528 549 550 551 552 553 554 555 556 557 558
+ 559 560 517 518 519 520 522 524 526 528 549 550 551
+ 552 553 554 555 556 557 558 559 560 517 518 519 520
+ 522 524 526 528 549 550 551 552 553 554 555 556 557
+ 558 559 560 581 582 583 584 586 588 590 592 613 614
+ 615 616 617 618 619 620 621 622 623 624 549 550 551
+ 552 554 556 558 560 581 582 583 584 585 586 587 588
+ 589 590 591 592 549 550 551 552 554 556 558 560 581
+ 582 583 584 585 586 587 588 589 590 591 592 549 550
+ 551 552 554 556 558 560 581 582 583 584 585 586 587
+ 588 589 590 591 592 549 550 551 552 554 556 558 560
+ 581 582 583 584 585 586 587 588 589 590 591 592 517
+ 518 519 520 522 524 526 528 549 550 551 552 553 554
+ 555 556 557 558 559 560 581 582 583 584 585 586 587
+ 588 589 590 591 592 517 518 519 520 522 524 526 528
+ 549 550 551 552 553 554 555 556 557 558 559 560 581
+ 582 583 584 585 586 587 588 589 590 591 592 517 518
+ 519 520 522 524 526 528 549 550 551 552 553 554 555
+ 556 557 558 559 560 581 582 583 584 585 586 587 588
+ 589 590 591 592 517 518 519 520 522 524 526 528 549
+ 550 551 552 553 554 555 556 557 558 559 560 581 582
+ 583 584 585 586 587 588 589 590 591 592 517 518 519
+ 520 522 524 526 528 549 550 551 552 553 554 555 556
+ 557 558 559 560 581 582 583 584 585 586 587 588 589
+ 590 591 592 517 518 519 520 522 524 526 528 549 550
+ 551 552 553 554 555 556 557 558 559 560 581 582 583
+ 584 585 586 587 588 589 590 591 592 517 518 519 520
+ 522 524 526 528 549 550 551 552 553 554 555 556 557
+ 558 559 560 581 582 583 584 585 586 587 588 589 590
+ 591 592 517 518 519 520 522 524 526 528 549 550 551
+ 552 553 554 555 556 557 558 559 560 581 582 583 584
+ 585 586 587 588 589 590 591 592 549 550 551 552 554
+ 556 558 560 581 582 583 584 585 586 587 588 589 590
+ 591 592 613 614 615 616 617 618 619 620 621 622 623
+ 624 549 550 551 552 554 556 558 560 581 582 583 584
+ 585 586 587 588 589 590 591 592 613 614 615 616 617
+ 618 619 620 621 622 623 624 549 550 551 552 554 556
+ 558 560 581 582 583 584 585 586 587 588 589 590 591
+ 592 613 614 615 616 617 618 619 620 621 622 623 624
+ 549 550 551 552 554 556 558 560 581 582 583 584 585
+ 586 587 588 589 590 591 592 613 614 615 616 617 618
+ 619 620 621 622 623 624 549 550 551 552 554 556 558
+ 560 581 582 583 584 585 586 587 588 589 590 591 592
+ 613 614 615 616 617 618 619 620 621 622 623 624 549
+ 550 551 552 554 556 558 560 581 582 583 584 585 586
+ 587 588 589 590 591 592 613 614 615 616 617 618 619
+ 620 621 622 623 624 549 550 551 552 554 556 558 560
+ 581 582 583 584 585 586 587 588 589 590 591 592 613
+ 614 615 616 617 618 619 620 621 622 623 624 549 550
+ 551 552 554 556 558 560 581 582 583 584 585 586 587
+ 588 589 590 591 592 613 614 615 616 617 618 619 620
+ 621 622 623 624 581 582 583 584 586 588 590 592 613
+ 614 615 616 617 618 619 620 621 622 623 624 581 582
+ 583 584 586 588 590 592 613 614 615 616 617 618 619
+ 620 621 622 623 624 581 582 583 584 586 588 590 592
+ 613 614 615 616 617 618 619 620 621 622 623 624 1221
+ 1222 1223 1224 1226 1228 1230 1232 1253 1254 1255 1256 1257 1258
+ 1259 1260 1261 1262 1263 1264 1221 1222 1223 1224 1226 1228 1230
+ 1232 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264
+ 1221 1222 1223 1224 1226 1228 1230 1232 1253 1254 1255 1256 1257
+ 1258 1259 1260 1261 1262 1263 1264 1221 1222 1223 1224 1226 1228
+ 1230 1232 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263
+ 1264 1221 1222 1223 1224 1226 1228 1230 1232 1253 1254 1255 1256
+ 1257 1258 1259 1260 1261 1262 1263 1264 1221 1222 1223 1224 1226
+ 1228 1230 1232 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
+ 1263 1264 1221 1222 1223 1224 1226 1228 1230 1232 1253 1254 1255
+ 1256 1257 1258 1259 1260 1261 1262 1263 1264 1221 1222 1223 1224
+ 1226 1228 1230 1232 1253 1254 1255 1256 1257 1258 1259 1260 1261
+ 1262 1263 1264 1221 1222 1223 1224 1226 1228 1230 1232 1253 1254
+ 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1221 1222 1223
+ 1224 1226 1228 1230 1232 1253 1254 1255 1256 1257 1258 1259 1260
+ 1261 1262 1263 1264 1221 1222 1223 1224 1226 1228 1230 1232 1253
+ 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1221 1222
+ 1223 1224 1226 1228 1230 1232 1253 1254 1255 1256 1257 1258 1259
+ 1260 1261 1262 1263 1264 1189 1190 1191 1192 1194 1196 1198 1200
+ 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1253
+ 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1189 1190
+ 1191 1192 1194 1196 1198 1200 1221 1222 1223 1224 1225 1226 1227
+ 1228 1229 1230 1231 1232 1253 1254 1255 1256 1257 1258 1259 1260
+ 1261 1262 1263 1264 1189 1190 1191 1192 1194 1196 1198 1200 1221
+ 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1253 1254
+ 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1189 1190 1191
+ 1192 1194 1196 1198 1200 1221 1222 1223 1224 1225 1226 1227 1228
+ 1229 1230 1231 1232 1253 1254 1255 1256 1257 1258 1259 1260 1261
+ 1262 1263 1264 1189 1190 1191 1192 1194 1196 1198 1200 1221 1222
+ 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1253 1254 1255
+ 1256 1257 1258 1259 1260 1261 1262 1263 1264 1189 1190 1191 1192
+ 1194 1196 1198 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229
+ 1230 1231 1232 1189 1190 1191 1192 1194 1196 1198 1200 1221 1222
+ 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1253 1254 1255
+ 1256 1257 1258 1259 1260 1261 1262 1263 1264 1189 1190 1191 1192
+ 1194 1196 1198 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229
+ 1230 1231 1232 1189 1190 1191 1192 1194 1196 1198 1200 1221 1222
+ 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1253 1254 1255
+ 1256 1257 1258 1259 1260 1261 1262 1263 1264 1189 1190 1191 1192
+ 1194 1196 1198 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229
+ 1230 1231 1232 1189 1190 1191 1192 1194 1196 1198 1200 1221 1222
+ 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1253 1254 1255
+ 1256 1257 1258 1259 1260 1261 1262 1263 1264 1189 1190 1191 1192
+ 1194 1196 1198 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229
+ 1230 1231 1232 1157 1158 1159 1160 1162 1164 1166 1168 1189 1190
+ 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1157 1158 1159
+ 1160 1162 1164 1166 1168 1189 1190 1191 1192 1193 1194 1195 1196
+ 1197 1198 1199 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229
+ 1230 1231 1232 1157 1158 1159 1160 1162 1164 1166 1168 1189 1190
+ 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1221 1222 1223
+ 1224 1225 1226 1227 1228 1229 1230 1231 1232 1157 1158 1159 1160
+ 1162 1164 1166 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197
+ 1198 1199 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230
+ 1231 1232 1157 1158 1159 1160 1162 1164 1166 1168 1189 1190 1191
+ 1192 1193 1194 1195 1196 1197 1198 1199 1200 1221 1222 1223 1224
+ 1225 1226 1227 1228 1229 1230 1231 1232 1157 1158 1159 1160 1162
+ 1164 1166 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198
+ 1199 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231
+ 1232 1157 1158 1159 1160 1162 1164 1166 1168 1189 1190 1191 1192
+ 1193 1194 1195 1196 1197 1198 1199 1200 1221 1222 1223 1224 1225
+ 1226 1227 1228 1229 1230 1231 1232 1157 1158 1159 1160 1162 1164
+ 1166 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
+ 1200 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232
+ 1157 1158 1159 1160 1162 1164 1166 1168 1189 1190 1191 1192 1193
+ 1194 1195 1196 1197 1198 1199 1200 1221 1222 1223 1224 1225 1226
+ 1227 1228 1229 1230 1231 1232 1157 1158 1159 1160 1162 1164 1166
+ 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200
+ 1157 1158 1159 1160 1162 1164 1166 1168 1189 1190 1191 1192 1193
+ 1194 1195 1196 1197 1198 1199 1200 1157 1158 1159 1160 1162 1164
+ 1166 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
+ 1200 1125 1126 1127 1128 1130 1132 1134 1136 1157 1158 1159 1160
+ 1161 1162 1163 1164 1165 1166 1167 1168 1125 1126 1127 1128 1130
+ 1132 1134 1136 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
+ 1167 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
+ 1200 1125 1126 1127 1128 1130 1132 1134 1136 1157 1158 1159 1160
+ 1161 1162 1163 1164 1165 1166 1167 1168 1189 1190 1191 1192 1193
+ 1194 1195 1196 1197 1198 1199 1200 1125 1126 1127 1128 1130 1132
+ 1134 1136 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
+ 1168 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200
+ 1125 1126 1127 1128 1130 1132 1134 1136 1157 1158 1159 1160 1161
+ 1162 1163 1164 1165 1166 1167 1168 1189 1190 1191 1192 1193 1194
+ 1195 1196 1197 1198 1199 1200 1125 1126 1127 1128 1130 1132 1134
+ 1136 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168
+ 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1125
+ 1126 1127 1128 1130 1132 1134 1136 1157 1158 1159 1160 1161 1162
+ 1163 1164 1165 1166 1167 1168 1189 1190 1191 1192 1193 1194 1195
+ 1196 1197 1198 1199 1200 1125 1126 1127 1128 1130 1132 1134 1136
+ 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1189
+ 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1125 1126
+ 1127 1128 1130 1132 1134 1136 1157 1158 1159 1160 1161 1162 1163
+ 1164 1165 1166 1167 1168 1189 1190 1191 1192 1193 1194 1195 1196
+ 1197 1198 1199 1200 1125 1126 1127 1128 1130 1132 1134 1136 1157
+ 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1125 1126
+ 1127 1128 1130 1132 1134 1136 1157 1158 1159 1160 1161 1162 1163
+ 1164 1165 1166 1167 1168 1125 1126 1127 1128 1130 1132 1134 1136
+ 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1093
+ 1094 1095 1096 1098 1100 1102 1104 1125 1126 1127 1128 1129 1130
+ 1131 1132 1133 1134 1135 1136 1093 1094 1095 1096 1098 1100 1102
+ 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
+ 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1093
+ 1094 1095 1096 1098 1100 1102 1104 1125 1126 1127 1128 1129 1130
+ 1131 1132 1133 1134 1135 1136 1157 1158 1159 1160 1161 1162 1163
+ 1164 1165 1166 1167 1168 1093 1094 1095 1096 1098 1100 1102 1104
+ 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1157
+ 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1093 1094
+ 1095 1096 1098 1100 1102 1104 1125 1126 1127 1128 1129 1130 1131
+ 1132 1133 1134 1135 1136 1157 1158 1159 1160 1161 1162 1163 1164
+ 1165 1166 1167 1168 1093 1094 1095 1096 1098 1100 1102 1104 1125
+ 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1157 1158
+ 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1093 1094 1095
+ 1096 1098 1100 1102 1104 1125 1126 1127 1128 1129 1130 1131 1132
+ 1133 1134 1135 1136 1157 1158 1159 1160 1161 1162 1163 1164 1165
+ 1166 1167 1168 1093 1094 1095 1096 1098 1100 1102 1104 1125 1126
+ 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1157 1158 1159
+ 1160 1161 1162 1163 1164 1165 1166 1167 1168 1093 1094 1095 1096
+ 1098 1100 1102 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133
+ 1134 1135 1136 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
+ 1167 1168 1093 1094 1095 1096 1098 1100 1102 1104 1125 1126 1127
+ 1128 1129 1130 1131 1132 1133 1134 1135 1136 1093 1094 1095 1096
+ 1098 1100 1102 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133
+ 1134 1135 1136 1093 1094 1095 1096 1098 1100 1102 1104 1125 1126
+ 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1061 1062 1063
+ 1064 1066 1068 1070 1072 1093 1094 1095 1096 1097 1098 1099 1100
+ 1101 1102 1103 1104 1061 1062 1063 1064 1066 1068 1070 1072 1093
+ 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1125 1126
+ 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1061 1062 1063
+ 1064 1066 1068 1070 1072 1093 1094 1095 1096 1097 1098 1099 1100
+ 1101 1102 1103 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133
+ 1134 1135 1136 1061 1062 1063 1064 1066 1068 1070 1072 1093 1094
+ 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1125 1126 1127
+ 1128 1129 1130 1131 1132 1133 1134 1135 1136 1061 1062 1063 1064
+ 1066 1068 1070 1072 1093 1094 1095 1096 1097 1098 1099 1100 1101
+ 1102 1103 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134
+ 1135 1136 1061 1062 1063 1064 1066 1068 1070 1072 1093 1094 1095
+ 1096 1097 1098 1099 1100 1101 1102 1103 1104 1125 1126 1127 1128
+ 1129 1130 1131 1132 1133 1134 1135 1136 1061 1062 1063 1064 1066
+ 1068 1070 1072 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102
+ 1103 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135
+ 1136 1061 1062 1063 1064 1066 1068 1070 1072 1093 1094 1095 1096
+ 1097 1098 1099 1100 1101 1102 1103 1104 1125 1126 1127 1128 1129
+ 1130 1131 1132 1133 1134 1135 1136 1061 1062 1063 1064 1066 1068
+ 1070 1072 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
+ 1104 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
+ 1061 1062 1063 1064 1066 1068 1070 1072 1093 1094 1095 1096 1097
+ 1098 1099 1100 1101 1102 1103 1104 1061 1062 1063 1064 1066 1068
+ 1070 1072 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
+ 1104 1061 1062 1063 1064 1066 1068 1070 1072 1093 1094 1095 1096
+ 1097 1098 1099 1100 1101 1102 1103 1104 1029 1030 1031 1032 1034
+ 1036 1038 1040 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070
+ 1071 1072 1029 1030 1031 1032 1034 1036 1038 1040 1061 1062 1063
+ 1064 1065 1066 1067 1068 1069 1070 1071 1072 1093 1094 1095 1096
+ 1097 1098 1099 1100 1101 1102 1103 1104 1029 1030 1031 1032 1034
+ 1036 1038 1040 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070
+ 1071 1072 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
+ 1104 1029 1030 1031 1032 1034 1036 1038 1040 1061 1062 1063 1064
+ 1065 1066 1067 1068 1069 1070 1071 1072 1093 1094 1095 1096 1097
+ 1098 1099 1100 1101 1102 1103 1104 1029 1030 1031 1032 1034 1036
+ 1038 1040 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071
+ 1072 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
+ 1029 1030 1031 1032 1034 1036 1038 1040 1061 1062 1063 1064 1065
+ 1066 1067 1068 1069 1070 1071 1072 1093 1094 1095 1096 1097 1098
+ 1099 1100 1101 1102 1103 1104 1029 1030 1031 1032 1034 1036 1038
+ 1040 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072
+ 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1029
+ 1030 1031 1032 1034 1036 1038 1040 1061 1062 1063 1064 1065 1066
+ 1067 1068 1069 1070 1071 1072 1093 1094 1095 1096 1097 1098 1099
+ 1100 1101 1102 1103 1104 1029 1030 1031 1032 1034 1036 1038 1040
+ 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1093
+ 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1029 1030
+ 1031 1032 1034 1036 1038 1040 1061 1062 1063 1064 1065 1066 1067
+ 1068 1069 1070 1071 1072 1029 1030 1031 1032 1034 1036 1038 1040
+ 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1029
+ 1030 1031 1032 1034 1036 1038 1040 1061 1062 1063 1064 1065 1066
+ 1067 1068 1069 1070 1071 1072 997 998 999 1000 1002 1004 1006
+ 1008 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
+ 997 998 999 1000 1002 1004 1006 1008 1029 1030 1031 1032 1033
+ 1034 1035 1036 1037 1038 1039 1040 1061 1062 1063 1064 1065 1066
+ 1067 1068 1069 1070 1071 1072 997 998 999 1000 1002 1004 1006
+ 1008 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
+ 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 997
+ 998 999 1000 1002 1004 1006 1008 1029 1030 1031 1032 1033 1034
+ 1035 1036 1037 1038 1039 1040 1061 1062 1063 1064 1065 1066 1067
+ 1068 1069 1070 1071 1072 997 998 999 1000 1002 1004 1006 1008
+ 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1061
+ 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 997 998
+ 999 1000 1002 1004 1006 1008 1029 1030 1031 1032 1033 1034 1035
+ 1036 1037 1038 1039 1040 1061 1062 1063 1064 1065 1066 1067 1068
+ 1069 1070 1071 1072 997 998 999 1000 1002 1004 1006 1008 1029
+ 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1061 1062
+ 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 997 998 999
+ 1000 1002 1004 1006 1008 1029 1030 1031 1032 1033 1034 1035 1036
+ 1037 1038 1039 1040 1061 1062 1063 1064 1065 1066 1067 1068 1069
+ 1070 1071 1072 997 998 999 1000 1002 1004 1006 1008 1029 1030
+ 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1061 1062 1063
+ 1064 1065 1066 1067 1068 1069 1070 1071 1072 997 998 999 1000
+ 1002 1004 1006 1008 1029 1030 1031 1032 1033 1034 1035 1036 1037
+ 1038 1039 1040 997 998 999 1000 1002 1004 1006 1008 1029 1030
+ 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 997 998 999
+ 1000 1002 1004 1006 1008 1029 1030 1031 1032 1033 1034 1035 1036
+ 1037 1038 1039 1040 965 966 967 968 970 972 974 976 997
+ 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 965 966
+ 967 968 970 972 974 976 997 998 999 1000 1001 1002 1003
+ 1004 1005 1006 1007 1008 1029 1030 1031 1032 1033 1034 1035 1036
+ 1037 1038 1039 1040 965 966 967 968 970 972 974 976 997
+ 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1029 1030
+ 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 965 966 967
+ 968 970 972 974 976 997 998 999 1000 1001 1002 1003 1004
+ 1005 1006 1007 1008 1029 1030 1031 1032 1033 1034 1035 1036 1037
+ 1038 1039 1040 965 966 967 968 970 972 974 976 997 998
+ 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1029 1030 1031
+ 1032 1033 1034 1035 1036 1037 1038 1039 1040 965 966 967 968
+ 970 972 974 976 997 998 999 1000 1001 1002 1003 1004 1005
+ 1006 1007 1008 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038
+ 1039 1040 965 966 967 968 970 972 974 976 997 998 999
+ 1000 1001 1002 1003 1004 1005 1006 1007 1008 1029 1030 1031 1032
+ 1033 1034 1035 1036 1037 1038 1039 1040 965 966 967 968 970
+ 972 974 976 997 998 999 1000 1001 1002 1003 1004 1005 1006
+ 1007 1008 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039
+ 1040 965 966 967 968 970 972 974 976 997 998 999 1000
+ 1001 1002 1003 1004 1005 1006 1007 1008 1029 1030 1031 1032 1033
+ 1034 1035 1036 1037 1038 1039 1040 965 966 967 968 970 972
+ 974 976 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
+ 1008 965 966 967 968 970 972 974 976 997 998 999 1000
+ 1001 1002 1003 1004 1005 1006 1007 1008 965 966 967 968 970
+ 972 974 976 997 998 999 1000 1001 1002 1003 1004 1005 1006
+ 1007 1008 933 934 935 936 938 940 942 944 965 966 967
+ 968 969 970 971 972 973 974 975 976 933 934 935 936
+ 938 940 942 944 965 966 967 968 969 970 971 972 973
+ 974 975 976 997 998 999 1000 1001 1002 1003 1004 1005 1006
+ 1007 1008 933 934 935 936 938 940 942 944 965 966 967
+ 968 969 970 971 972 973 974 975 976 997 998 999 1000
+ 1001 1002 1003 1004 1005 1006 1007 1008 933 934 935 936 938
+ 940 942 944 965 966 967 968 969 970 971 972 973 974
+ 975 976 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
+ 1008 933 934 935 936 938 940 942 944 965 966 967 968
+ 969 970 971 972 973 974 975 976 997 998 999 1000 1001
+ 1002 1003 1004 1005 1006 1007 1008 933 934 935 936 938 940
+ 942 944 965 966 967 968 969 970 971 972 973 974 975
+ 976 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
+ 933 934 935 936 938 940 942 944 965 966 967 968 969
+ 970 971 972 973 974 975 976 997 998 999 1000 1001 1002
+ 1003 1004 1005 1006 1007 1008 933 934 935 936 938 940 942
+ 944 965 966 967 968 969 970 971 972 973 974 975 976
+ 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 933
+ 934 935 936 938 940 942 944 965 966 967 968 969 970
+ 971 972 973 974 975 976 997 998 999 1000 1001 1002 1003
+ 1004 1005 1006 1007 1008 933 934 935 936 938 940 942 944
+ 965 966 967 968 969 970 971 972 973 974 975 976 933
+ 934 935 936 938 940 942 944 965 966 967 968 969 970
+ 971 972 973 974 975 976 933 934 935 936 938 940 942
+ 944 965 966 967 968 969 970 971 972 973 974 975 976
+ 901 902 903 904 906 908 910 912 933 934 935 936 937
+ 938 939 940 941 942 943 944 901 902 903 904 906 908
+ 910 912 933 934 935 936 937 938 939 940 941 942 943
+ 944 965 966 967 968 969 970 971 972 973 974 975 976
+ 901 902 903 904 906 908 910 912 933 934 935 936 937
+ 938 939 940 941 942 943 944 965 966 967 968 969 970
+ 971 972 973 974 975 976 901 902 903 904 906 908 910
+ 912 933 934 935 936 937 938 939 940 941 942 943 944
+ 965 966 967 968 969 970 971 972 973 974 975 976 901
+ 902 903 904 906 908 910 912 933 934 935 936 937 938
+ 939 940 941 942 943 944 965 966 967 968 969 970 971
+ 972 973 974 975 976 901 902 903 904 906 908 910 912
+ 933 934 935 936 937 938 939 940 941 942 943 944 965
+ 966 967 968 969 970 971 972 973 974 975 976 901 902
+ 903 904 906 908 910 912 933 934 935 936 937 938 939
+ 940 941 942 943 944 965 966 967 968 969 970 971 972
+ 973 974 975 976 901 902 903 904 906 908 910 912 933
+ 934 935 936 937 938 939 940 941 942 943 944 965 966
+ 967 968 969 970 971 972 973 974 975 976 901 902 903
+ 904 906 908 910 912 933 934 935 936 937 938 939 940
+ 941 942 943 944 965 966 967 968 969 970 971 972 973
+ 974 975 976 901 902 903 904 906 908 910 912 933 934
+ 935 936 937 938 939 940 941 942 943 944 901 902 903
+ 904 906 908 910 912 933 934 935 936 937 938 939 940
+ 941 942 943 944 901 902 903 904 906 908 910 912 933
+ 934 935 936 937 938 939 940 941 942 943 944 869 870
+ 871 872 874 876 878 880 901 902 903 904 905 906 907
+ 908 909 910 911 912 869 870 871 872 874 876 878 880
+ 901 902 903 904 905 906 907 908 909 910 911 912 933
+ 934 935 936 937 938 939 940 941 942 943 944 869 870
+ 871 872 874 876 878 880 901 902 903 904 905 906 907
+ 908 909 910 911 912 933 934 935 936 937 938 939 940
+ 941 942 943 944 869 870 871 872 874 876 878 880 901
+ 902 903 904 905 906 907 908 909 910 911 912 933 934
+ 935 936 937 938 939 940 941 942 943 944 869 870 871
+ 872 874 876 878 880 901 902 903 904 905 906 907 908
+ 909 910 911 912 933 934 935 936 937 938 939 940 941
+ 942 943 944 869 870 871 872 874 876 878 880 901 902
+ 903 904 905 906 907 908 909 910 911 912 933 934 935
+ 936 937 938 939 940 941 942 943 944 869 870 871 872
+ 874 876 878 880 901 902 903 904 905 906 907 908 909
+ 910 911 912 933 934 935 936 937 938 939 940 941 942
+ 943 944 869 870 871 872 874 876 878 880 901 902 903
+ 904 905 906 907 908 909 910 911 912 933 934 935 936
+ 937 938 939 940 941 942 943 944 869 870 871 872 874
+ 876 878 880 901 902 903 904 905 906 907 908 909 910
+ 911 912 933 934 935 936 937 938 939 940 941 942 943
+ 944 869 870 871 872 874 876 878 880 901 902 903 904
+ 905 906 907 908 909 910 911 912 869 870 871 872 874
+ 876 878 880 901 902 903 904 905 906 907 908 909 910
+ 911 912 869 870 871 872 874 876 878 880 901 902 903
+ 904 905 906 907 908 909 910 911 912 837 838 839 840
+ 842 844 846 848 869 870 871 872 873 874 875 876 877
+ 878 879 880 837 838 839 840 842 844 846 848 869 870
+ 871 872 873 874 875 876 877 878 879 880 901 902 903
+ 904 905 906 907 908 909 910 911 912 837 838 839 840
+ 842 844 846 848 869 870 871 872 873 874 875 876 877
+ 878 879 880 901 902 903 904 905 906 907 908 909 910
+ 911 912 837 838 839 840 842 844 846 848 869 870 871
+ 872 873 874 875 876 877 878 879 880 901 902 903 904
+ 905 906 907 908 909 910 911 912 837 838 839 840 842
+ 844 846 848 869 870 871 872 873 874 875 876 877 878
+ 879 880 901 902 903 904 905 906 907 908 909 910 911
+ 912 837 838 839 840 842 844 846 848 869 870 871 872
+ 873 874 875 876 877 878 879 880 901 902 903 904 905
+ 906 907 908 909 910 911 912 837 838 839 840 842 844
+ 846 848 869 870 871 872 873 874 875 876 877 878 879
+ 880 901 902 903 904 905 906 907 908 909 910 911 912
+ 837 838 839 840 842 844 846 848 869 870 871 872 873
+ 874 875 876 877 878 879 880 901 902 903 904 905 906
+ 907 908 909 910 911 912 837 838 839 840 842 844 846
+ 848 869 870 871 872 873 874 875 876 877 878 879 880
+ 901 902 903 904 905 906 907 908 909 910 911 912 837
+ 838 839 840 842 844 846 848 869 870 871 872 873 874
+ 875 876 877 878 879 880 837 838 839 840 842 844 846
+ 848 869 870 871 872 873 874 875 876 877 878 879 880
+ 837 838 839 840 842 844 846 848 869 870 871 872 873
+ 874 875 876 877 878 879 880 805 806 807 808 810 812
+ 814 816 837 838 839 840 841 842 843 844 845 846 847
+ 848 805 806 807 808 810 812 814 816 837 838 839 840
+ 841 842 843 844 845 846 847 848 869 870 871 872 873
+ 874 875 876 877 878 879 880 805 806 807 808 810 812
+ 814 816 837 838 839 840 841 842 843 844 845 846 847
+ 848 869 870 871 872 873 874 875 876 877 878 879 880
+ 805 806 807 808 810 812 814 816 837 838 839 840 841
+ 842 843 844 845 846 847 848 869 870 871 872 873 874
+ 875 876 877 878 879 880 805 806 807 808 810 812 814
+ 816 837 838 839 840 841 842 843 844 845 846 847 848
+ 869 870 871 872 873 874 875 876 877 878 879 880 805
+ 806 807 808 810 812 814 816 837 838 839 840 841 842
+ 843 844 845 846 847 848 869 870 871 872 873 874 875
+ 876 877 878 879 880 805 806 807 808 810 812 814 816
+ 837 838 839 840 841 842 843 844 845 846 847 848 869
+ 870 871 872 873 874 875 876 877 878 879 880 805 806
+ 807 808 810 812 814 816 837 838 839 840 841 842 843
+ 844 845 846 847 848 869 870 871 872 873 874 875 876
+ 877 878 879 880 805 806 807 808 810 812 814 816 837
+ 838 839 840 841 842 843 844 845 846 847 848 869 870
+ 871 872 873 874 875 876 877 878 879 880 805 806 807
+ 808 810 812 814 816 837 838 839 840 841 842 843 844
+ 845 846 847 848 805 806 807 808 810 812 814 816 837
+ 838 839 840 841 842 843 844 845 846 847 848 805 806
+ 807 808 810 812 814 816 837 838 839 840 841 842 843
+ 844 845 846 847 848 773 774 775 776 778 780 782 784
+ 805 806 807 808 809 810 811 812 813 814 815 816 773
+ 774 775 776 778 780 782 784 805 806 807 808 809 810
+ 811 812 813 814 815 816 837 838 839 840 841 842 843
+ 844 845 846 847 848 773 774 775 776 778 780 782 784
+ 805 806 807 808 809 810 811 812 813 814 815 816 837
+ 838 839 840 841 842 843 844 845 846 847 848 773 774
+ 775 776 778 780 782 784 805 806 807 808 809 810 811
+ 812 813 814 815 816 837 838 839 840 841 842 843 844
+ 845 846 847 848 773 774 775 776 778 780 782 784 805
+ 806 807 808 809 810 811 812 813 814 815 816 837 838
+ 839 840 841 842 843 844 845 846 847 848 773 774 775
+ 776 778 780 782 784 805 806 807 808 809 810 811 812
+ 813 814 815 816 837 838 839 840 841 842 843 844 845
+ 846 847 848 773 774 775 776 778 780 782 784 805 806
+ 807 808 809 810 811 812 813 814 815 816 837 838 839
+ 840 841 842 843 844 845 846 847 848 773 774 775 776
+ 778 780 782 784 805 806 807 808 809 810 811 812 813
+ 814 815 816 837 838 839 840 841 842 843 844 845 846
+ 847 848 773 774 775 776 778 780 782 784 805 806 807
+ 808 809 810 811 812 813 814 815 816 837 838 839 840
+ 841 842 843 844 845 846 847 848 773 774 775 776 778
+ 780 782 784 805 806 807 808 809 810 811 812 813 814
+ 815 816 773 774 775 776 778 780 782 784 805 806 807
+ 808 809 810 811 812 813 814 815 816 773 774 775 776
+ 778 780 782 784 805 806 807 808 809 810 811 812 813
+ 814 815 816 741 742 743 744 746 748 750 752 773 774
+ 775 776 777 778 779 780 781 782 783 784 741 742 743
+ 744 746 748 750 752 773 774 775 776 777 778 779 780
+ 781 782 783 784 805 806 807 808 809 810 811 812 813
+ 814 815 816 741 742 743 744 746 748 750 752 773 774
+ 775 776 777 778 779 780 781 782 783 784 805 806 807
+ 808 809 810 811 812 813 814 815 816 741 742 743 744
+ 746 748 750 752 773 774 775 776 777 778 779 780 781
+ 782 783 784 805 806 807 808 809 810 811 812 813 814
+ 815 816 741 742 743 744 746 748 750 752 773 774 775
+ 776 777 778 779 780 781 782 783 784 805 806 807 808
+ 809 810 811 812 813 814 815 816 741 742 743 744 746
+ 748 750 752 773 774 775 776 777 778 779 780 781 782
+ 783 784 805 806 807 808 809 810 811 812 813 814 815
+ 816 741 742 743 744 746 748 750 752 773 774 775 776
+ 777 778 779 780 781 782 783 784 805 806 807 808 809
+ 810 811 812 813 814 815 816 741 742 743 744 746 748
+ 750 752 773 774 775 776 777 778 779 780 781 782 783
+ 784 805 806 807 808 809 810 811 812 813 814 815 816
+ 741 742 743 744 746 748 750 752 773 774 775 776 777
+ 778 779 780 781 782 783 784 805 806 807 808 809 810
+ 811 812 813 814 815 816 741 742 743 744 746 748 750
+ 752 773 774 775 776 777 778 779 780 781 782 783 784
+ 741 742 743 744 746 748 750 752 773 774 775 776 777
+ 778 779 780 781 782 783 784 741 742 743 744 746 748
+ 750 752 773 774 775 776 777 778 779 780 781 782 783
+ 784 709 710 711 712 714 716 718 720 741 742 743 744
+ 745 746 747 748 749 750 751 752 773 774 775 776 777
+ 778 779 780 781 782 783 784 709 710 711 712 714 716
+ 718 720 741 742 743 744 745 746 747 748 749 750 751
+ 752 773 774 775 776 777 778 779 780 781 782 783 784
+ 709 710 711 712 714 716 718 720 741 742 743 744 745
+ 746 747 748 749 750 751 752 773 774 775 776 777 778
+ 779 780 781 782 783 784 709 710 711 712 714 716 718
+ 720 741 742 743 744 745 746 747 748 749 750 751 752
+ 773 774 775 776 777 778 779 780 781 782 783 784 709
+ 710 711 712 714 716 718 720 741 742 743 744 745 746
+ 747 748 749 750 751 752 773 774 775 776 777 778 779
+ 780 781 782 783 784 709 710 711 712 714 716 718 720
+ 741 742 743 744 745 746 747 748 749 750 751 752 773
+ 774 775 776 777 778 779 780 781 782 783 784 709 710
+ 711 712 714 716 718 720 741 742 743 744 745 746 747
+ 748 749 750 751 752 773 774 775 776 777 778 779 780
+ 781 782 783 784 709 710 711 712 714 716 718 720 741
+ 742 743 744 745 746 747 748 749 750 751 752 773 774
+ 775 776 777 778 779 780 781 782 783 784 709 710 711
+ 712 714 716 718 720 741 742 743 744 745 746 747 748
+ 749 750 751 752 709 710 711 712 714 716 718 720 741
+ 742 743 744 745 746 747 748 749 750 751 752 709 710
+ 711 712 714 716 718 720 741 742 743 744 745 746 747
+ 748 749 750 751 752 709 710 711 712 714 716 718 720
+ 741 742 743 744 745 746 747 748 749 750 751 752 677
+ 678 679 680 682 684 686 688 709 710 711 712 713 714
+ 715 716 717 718 719 720 741 742 743 744 745 746 747
+ 748 749 750 751 752 677 678 679 680 682 684 686 688
+ 709 710 711 712 713 714 715 716 717 718 719 720 677
+ 678 679 680 682 684 686 688 709 710 711 712 713 714
+ 715 716 717 718 719 720 677 678 679 680 682 684 686
+ 688 709 710 711 712 713 714 715 716 717 718 719 720
+ 677 678 679 680 682 684 686 688 709 710 711 712 713
+ 714 715 716 717 718 719 720 677 678 679 680 682 684
+ 686 688 709 710 711 712 713 714 715 716 717 718 719
+ 720 741 742 743 744 745 746 747 748 749 750 751 752
+ 677 678 679 680 682 684 686 688 709 710 711 712 713
+ 714 715 716 717 718 719 720 741 742 743 744 745 746
+ 747 748 749 750 751 752 677 678 679 680 682 684 686
+ 688 709 710 711 712 713 714 715 716 717 718 719 720
+ 741 742 743 744 745 746 747 748 749 750 751 752 677
+ 678 679 680 682 684 686 688 709 710 711 712 713 714
+ 715 716 717 718 719 720 741 742 743 744 745 746 747
+ 748 749 750 751 752 677 678 679 680 682 684 686 688
+ 709 710 711 712 713 714 715 716 717 718 719 720 741
+ 742 743 744 745 746 747 748 749 750 751 752 677 678
+ 679 680 682 684 686 688 709 710 711 712 713 714 715
+ 716 717 718 719 720 741 742 743 744 745 746 747 748
+ 749 750 751 752 677 678 679 680 682 684 686 688 709
+ 710 711 712 713 714 715 716 717 718 719 720 741 742
+ 743 744 745 746 747 748 749 750 751 752 645 646 647
+ 648 650 652 654 656 677 678 679 680 681 682 683 684
+ 685 686 687 688 645 646 647 648 650 652 654 656 677
+ 678 679 680 681 682 683 684 685 686 687 688 709 710
+ 711 712 713 714 715 716 717 718 719 720 645 646 647
+ 648 650 652 654 656 677 678 679 680 681 682 683 684
+ 685 686 687 688 709 710 711 712 713 714 715 716 717
+ 718 719 720 645 646 647 648 650 652 654 656 677 678
+ 679 680 681 682 683 684 685 686 687 688 709 710 711
+ 712 713 714 715 716 717 718 719 720 645 646 647 648
+ 650 652 654 656 677 678 679 680 681 682 683 684 685
+ 686 687 688 709 710 711 712 713 714 715 716 717 718
+ 719 720 645 646 647 648 650 652 654 656 677 678 679
+ 680 681 682 683 684 685 686 687 688 709 710 711 712
+ 713 714 715 716 717 718 719 720 645 646 647 648 650
+ 652 654 656 677 678 679 680 681 682 683 684 685 686
+ 687 688 709 710 711 712 713 714 715 716 717 718 719
+ 720 645 646 647 648 650 652 654 656 677 678 679 680
+ 681 682 683 684 685 686 687 688 709 710 711 712 713
+ 714 715 716 717 718 719 720 645 646 647 648 650 652
+ 654 656 677 678 679 680 681 682 683 684 685 686 687
+ 688 709 710 711 712 713 714 715 716 717 718 719 720
+ 645 646 647 648 650 652 654 656 677 678 679 680 681
+ 682 683 684 685 686 687 688 645 646 647 648 650 652
+ 654 656 677 678 679 680 681 682 683 684 685 686 687
+ 688 645 646 647 648 650 652 654 656 677 678 679 680
+ 681 682 683 684 685 686 687 688 581 582 583 584 586
+ 588 590 592 613 614 615 616 617 618 619 620 621 622
+ 623 624 645 646 647 648 649 650 651 652 653 654 655
+ 656 581 582 583 584 586 588 590 592 613 614 615 616
+ 617 618 619 620 621 622 623 624 645 646 647 648 649
+ 650 651 652 653 654 655 656 581 582 583 584 586 588
+ 590 592 613 614 615 616 617 618 619 620 621 622 623
+ 624 645 646 647 648 649 650 651 652 653 654 655 656
+ 581 582 583 584 586 588 590 592 613 614 615 616 617
+ 618 619 620 621 622 623 624 645 646 647 648 649 650
+ 651 652 653 654 655 656 581 582 583 584 586 588 590
+ 592 613 614 615 616 617 618 619 620 621 622 623 624
+ 645 646 647 648 649 650 651 652 653 654 655 656 581
+ 582 583 584 586 588 590 592 613 614 615 616 617 618
+ 619 620 621 622 623 624 645 646 647 648 649 650 651
+ 652 653 654 655 656 581 582 583 584 586 588 590 592
+ 613 614 615 616 617 618 619 620 621 622 623 624 645
+ 646 647 648 649 650 651 652 653 654 655 656 581 582
+ 583 584 586 588 590 592 613 614 615 616 617 618 619
+ 620 621 622 623 624 645 646 647 648 649 650 651 652
+ 653 654 655 656 613 614 615 616 618 620 622 624 645
+ 646 647 648 649 650 651 652 653 654 655 656 677 678
+ 679 680 681 682 683 684 685 686 687 688 613 614 615
+ 616 618 620 622 624 645 646 647 648 649 650 651 652
+ 653 654 655 656 677 678 679 680 681 682 683 684 685
+ 686 687 688 613 614 615 616 618 620 622 624 645 646
+ 647 648 649 650 651 652 653 654 655 656 677 678 679
+ 680 681 682 683 684 685 686 687 688 613 614 615 616
+ 618 620 622 624 645 646 647 648 649 650 651 652 653
+ 654 655 656 677 678 679 680 681 682 683 684 685 686
+ 687 688 613 614 615 616 618 620 622 624 645 646 647
+ 648 649 650 651 652 653 654 655 656 677 678 679 680
+ 681 682 683 684 685 686 687 688 613 614 615 616 618
+ 620 622 624 645 646 647 648 649 650 651 652 653 654
+ 655 656 677 678 679 680 681 682 683 684 685 686 687
+ 688 613 614 615 616 618 620 622 624 645 646 647 648
+ 649 650 651 652 653 654 655 656 677 678 679 680 681
+ 682 683 684 685 686 687 688 613 614 615 616 618 620
+ 622 624 645 646 647 648 649 650 651 652 653 654 655
+ 656 677 678 679 680 681 682 683 684 685 686 687 688
+ 613 614 615 616 618 620 622 624 645 646 647 648 649
+ 650 651 652 653 654 655 656 613 614 615 616 618 620
+ 622 624 645 646 647 648 649 650 651 652 653 654 655
+ 656 613 614 615 616 618 620 622 624 645 646 647 648
+ 649 650 651 652 653 654 655 656 613 614 615 616 618
+ 620 622 624 645 646 647 648 649 650 651 652 653 654
+ 655 656
+ 2.00000000E+00 0.00000000E+00 2.00000000E+00 0.00000000E+00 2.00000000E+00
+ 0.00000000E+00 2.00000000E+00 0.00000000E+00 2.00000000E+00 0.00000000E+00
+ 2.00000000E+00 0.00000000E+00 2.00000000E+00 0.00000000E+00 2.00000000E+00
+ 0.00000000E+00 2.00000000E+00 0.00000000E+00 2.00000000E+00 0.00000000E+00
+ 2.00000000E+00 0.00000000E+00 2.00000000E+00 0.00000000E+00 2.00000000E+00
+ 0.00000000E+00 2.00000000E+00 0.00000000E+00 8.75942750E-06 0.00000000E+00
+ 4.42350460E-08 0.00000000E+00 6.56981094E-06 0.00000000E+00-3.79165823E-08
+ 0.00000000E+00 4.42350460E-08 0.00000000E+00 2.46180794E-10 0.00000000E+00
+ 4.42365575E-08 0.00000000E+00-2.46186068E-10 0.00000000E+00-3.79165823E-08
+ 0.00000000E+00-2.46186068E-10 0.00000000E+00 8.85162345E-08 0.00000000E+00
+ 1.31325328E-09 0.00000000E+00 1.26437061E-07 0.00000000E+00-7.38818378E-10
+ 0.00000000E+00 6.56981094E-06 0.00000000E+00 4.42365575E-08 0.00000000E+00
+ 7.59294901E-05 0.00000000E+00 8.85162345E-08 0.00000000E+00 1.97164994E-05
+ 0.00000000E+00-1.20109968E-07 0.00000000E+00 1.97164994E-05 0.00000000E+00
+ 1.26437061E-07 0.00000000E+00 1.51945060E-04 0.00000000E+00 8.86702205E-08
+ 0.00000000E+00 3.28860902E-05 0.00000000E+00-2.02442283E-07 0.00000000E+00
+-1.20109968E-07 0.00000000E+00-7.38818378E-10 0.00000000E+00 8.86702205E-08
+ 0.00000000E+00 2.62798441E-09 0.00000000E+00 2.08784061E-07 0.00000000E+00
+-1.23230320E-09 0.00000000E+00 3.28860902E-05 0.00000000E+00 2.08784061E-07
+ 0.00000000E+00 2.28136664E-04 0.00000000E+00 8.89239278E-08 0.00000000E+00
+ 4.60935066E-05 0.00000000E+00-2.85007067E-07 0.00000000E+00-2.02442283E-07
+ 0.00000000E+00-1.23230320E-09 0.00000000E+00 8.89239278E-08 0.00000000E+00
+ 3.94574029E-09 0.00000000E+00 2.91370606E-07 0.00000000E+00-1.72719953E-09
+ 0.00000000E+00 4.60935066E-05 0.00000000E+00 2.91370606E-07 0.00000000E+00
+ 3.04590319E-04 0.00000000E+00 8.92807049E-08 0.00000000E+00 5.93540390E-05
+ 0.00000000E+00-3.67899663E-07 0.00000000E+00-2.85007067E-07 0.00000000E+00
+-1.72719953E-09 0.00000000E+00 8.92807049E-08 0.00000000E+00 5.26801771E-09
+ 0.00000000E+00 3.74292548E-07 0.00000000E+00-2.22408031E-09 0.00000000E+00
+ 5.93540390E-05 0.00000000E+00 3.74292548E-07 0.00000000E+00 3.81396330E-04
+ 0.00000000E+00 8.97431430E-08 0.00000000E+00 7.26833869E-05 0.00000000E+00
+-4.51218253E-07 0.00000000E+00-3.67899663E-07 0.00000000E+00-2.22408031E-09
+ 0.00000000E+00 8.97431430E-08 0.00000000E+00 6.59637223E-09 0.00000000E+00
+ 4.57648013E-07 0.00000000E+00-2.72353380E-09 0.00000000E+00 7.26833869E-05
+ 0.00000000E+00 4.57648013E-07 0.00000000E+00 4.58645576E-04 0.00000000E+00
+ 9.03126171E-08 0.00000000E+00 8.60974364E-05 0.00000000E+00-5.35062060E-07
+ 0.00000000E+00-4.51218253E-07 0.00000000E+00-2.72353380E-09 0.00000000E+00
+ 9.03126171E-08 0.00000000E+00 7.93237847E-09 0.00000000E+00 5.41536420E-07
+ 0.00000000E+00-3.22615523E-09 0.00000000E+00 8.60974364E-05 0.00000000E+00
+ 5.41536420E-07 0.00000000E+00 5.36430732E-04 0.00000000E+00 9.09908348E-08
+ 0.00000000E+00 9.96123693E-05 0.00000000E+00-6.19532152E-07 0.00000000E+00
+-5.35062060E-07 0.00000000E+00-3.22615523E-09 0.00000000E+00 9.09908348E-08
+ 0.00000000E+00 9.27763861E-09 0.00000000E+00 6.26059028E-07 0.00000000E+00
+-3.73255084E-09 0.00000000E+00 9.96123693E-05 0.00000000E+00 6.26059028E-07
+ 0.00000000E+00 6.14847001E-04 0.00000000E+00 9.17823250E-08 0.00000000E+00
+ 1.13244965E-04 0.00000000E+00-7.04733340E-07 0.00000000E+00-6.19532152E-07
+ 0.00000000E+00-3.73255084E-09 0.00000000E+00 9.17823250E-08 0.00000000E+00
+ 1.06337992E-08 0.00000000E+00 7.11320841E-07 0.00000000E+00-4.24334937E-09
+ 0.00000000E+00 1.13244965E-04 0.00000000E+00 7.11320841E-07 0.00000000E+00
+ 6.93991813E-04 0.00000000E+00 9.26876732E-08 0.00000000E+00 1.27012198E-04
+ 0.00000000E+00-7.90771604E-07 0.00000000E+00-7.04733340E-07 0.00000000E+00
+-4.24334937E-09 0.00000000E+00 9.26876732E-08 0.00000000E+00 1.20025454E-08
+ 0.00000000E+00 7.97428108E-07 0.00000000E+00-4.75918668E-09 0.00000000E+00
+ 1.27012198E-04 0.00000000E+00 7.97428108E-07 0.00000000E+00 7.73965837E-04
+ 0.00000000E+00 9.37138501E-08 0.00000000E+00 1.40931959E-04 0.00000000E+00
+-8.77758640E-07 0.00000000E+00-7.90771604E-07 0.00000000E+00-4.75918668E-09
+ 0.00000000E+00 9.37138501E-08 0.00000000E+00 1.33856185E-08 0.00000000E+00
+ 8.84492832E-07 0.00000000E+00-5.28073311E-09 0.00000000E+00 1.40931959E-04
+ 0.00000000E+00 8.84492832E-07 0.00000000E+00 8.54873478E-04 0.00000000E+00
+ 9.48625731E-08 0.00000000E+00 1.55022496E-04 0.00000000E+00-9.65808378E-07
+ 0.00000000E+00-8.77758640E-07 0.00000000E+00-5.28073311E-09 0.00000000E+00
+ 9.48625731E-08 0.00000000E+00 1.47848237E-08 0.00000000E+00 9.72629243E-07
+ 0.00000000E+00-5.80867227E-09 0.00000000E+00 1.55022496E-04 0.00000000E+00
+ 9.72629243E-07 0.00000000E+00 9.36822740E-04 0.00000000E+00 9.61406592E-08
+ 0.00000000E+00 1.69303005E-04 0.00000000E+00-1.05504060E-06 0.00000000E+00
+-9.65808378E-07 0.00000000E+00-5.80867227E-09 0.00000000E+00 9.61406592E-08
+ 0.00000000E+00 1.62020298E-08 0.00000000E+00 1.06195757E-06 0.00000000E+00
+-6.34372335E-09 0.00000000E+00 1.69303005E-04 0.00000000E+00 1.06195757E-06
+ 0.00000000E+00 1.01992683E-03 0.00000000E+00 9.75530157E-08 0.00000000E+00
+ 1.83793438E-04 0.00000000E+00-1.14557987E-06 0.00000000E+00-1.05504060E-06
+ 0.00000000E+00-6.34372335E-09 0.00000000E+00 9.75530157E-08 0.00000000E+00
+ 1.76391933E-08 0.00000000E+00 1.15260272E-06 0.00000000E+00-6.88663377E-09
+ 0.00000000E+00 1.83793438E-04 0.00000000E+00 1.15260272E-06 0.00000000E+00
+ 1.10430351E-03 0.00000000E+00 9.91060520E-08 0.00000000E+00 1.98514700E-04
+ 0.00000000E+00-1.23755658E-06 0.00000000E+00-1.14557987E-06 0.00000000E+00
+-6.88663377E-09 0.00000000E+00 9.91060520E-08 0.00000000E+00 1.90983523E-08
+ 0.00000000E+00 1.24469566E-06 0.00000000E+00-7.43818669E-09 0.00000000E+00
+ 1.98514700E-04 0.00000000E+00 1.24469566E-06 0.00000000E+00 1.19007687E-03
+ 0.00000000E+00 1.00807231E-07 0.00000000E+00 2.13488794E-04 0.00000000E+00
+-1.33110805E-06 0.00000000E+00-1.23755658E-06 0.00000000E+00-7.43818669E-09
+ 0.00000000E+00 1.00807231E-07 0.00000000E+00 2.05816515E-08 0.00000000E+00
+ 1.33837418E-06 0.00000000E+00-7.99920639E-09 0.00000000E+00 2.13488794E-04
+ 0.00000000E+00 1.33837418E-06 0.00000000E+00 1.27737718E-03 0.00000000E+00
+ 1.02664521E-07 0.00000000E+00 2.28738915E-04 0.00000000E+00-1.42637894E-06
+ 0.00000000E+00-1.33110805E-06 0.00000000E+00-7.99920639E-09 0.00000000E+00
+ 1.02664521E-07 0.00000000E+00 2.20913454E-08 0.00000000E+00 1.43378361E-06
+ 0.00000000E+00-8.57056173E-09 0.00000000E+00 2.28738915E-04 0.00000000E+00
+ 1.43378361E-06 0.00000000E+00 1.36634235E-03 0.00000000E+00 1.04686480E-07
+ 0.00000000E+00 2.44289530E-04 0.00000000E+00-1.52352193E-06 0.00000000E+00
+-1.42637894E-06 0.00000000E+00-8.57056173E-09 0.00000000E+00 1.04686480E-07
+ 0.00000000E+00 2.36298168E-08 0.00000000E+00 1.53107720E-06 0.00000000E+00
+-9.15316936E-09 0.00000000E+00 2.44289530E-04 0.00000000E+00 1.53107720E-06
+ 0.00000000E+00 1.45711769E-03 0.00000000E+00 1.06883448E-07 0.00000000E+00
+ 2.60166638E-04 0.00000000E+00-1.62269909E-06 0.00000000E+00-1.52352193E-06
+ 0.00000000E+00-9.15316936E-09 0.00000000E+00 1.06883448E-07 0.00000000E+00
+ 2.51995815E-08 0.00000000E+00 1.63041791E-06 0.00000000E+00-9.74800311E-09
+ 0.00000000E+00 5.25986919E-04 0.00000000E+00 2.48000500E-06 0.00000000E+00
+ 1.53411731E-03 0.00000000E+00-4.21835721E-06 0.00000000E+00-2.47322832E-06
+ 0.00000000E+00-1.11781679E-08 0.00000000E+00-4.21835721E-06 0.00000000E+00
+ 1.49705588E-08 0.00000000E+00-2.38685945E-06 0.00000000E+00-1.07877440E-08
+ 0.00000000E+00 9.31961136E-08 0.00000000E+00 2.92854760E-08 0.00000000E+00
+ 2.48000500E-06 0.00000000E+00-1.11781679E-08 0.00000000E+00 5.07616093E-04
+ 0.00000000E+00 2.39337383E-06 0.00000000E+00 2.98553404E-03 0.00000000E+00
+ 9.31961136E-08 0.00000000E+00 5.25986919E-04 0.00000000E+00-2.47322832E-06
+ 0.00000000E+00 6.46857518E-04 0.00000000E+00 4.05120307E-06 0.00000000E+00
+ 3.34490810E-03 0.00000000E+00-2.88314555E-06 0.00000000E+00 5.07616093E-04
+ 0.00000000E+00-2.38685945E-06 0.00000000E+00-4.03665185E-06 0.00000000E+00
+-2.42340321E-08 0.00000000E+00-2.88314555E-06 0.00000000E+00 4.68213371E-08
+ 0.00000000E+00 2.39337383E-06 0.00000000E+00-1.07877440E-08 0.00000000E+00
+ 6.17333390E-04 0.00000000E+00 3.86628975E-06 0.00000000E+00 3.65124957E-03
+ 0.00000000E+00 1.98736593E-07 0.00000000E+00 6.46857518E-04 0.00000000E+00
+-4.03665185E-06 0.00000000E+00-3.85243896E-06 0.00000000E+00-2.31280701E-08
+ 0.00000000E+00 1.98736593E-07 0.00000000E+00 6.31409811E-08 0.00000000E+00
+ 4.05120307E-06 0.00000000E+00-2.42340321E-08 0.00000000E+00 5.89216910E-04
+ 0.00000000E+00 3.69020238E-06 0.00000000E+00 3.48479812E-03 0.00000000E+00
+ 1.89244595E-07 0.00000000E+00 6.17333390E-04 0.00000000E+00-3.85243896E-06
+ 0.00000000E+00-3.67699874E-06 0.00000000E+00-2.20748365E-08 0.00000000E+00
+ 1.89244595E-07 0.00000000E+00 6.02627017E-08 0.00000000E+00 3.86628975E-06
+ 0.00000000E+00-2.31280701E-08 0.00000000E+00 5.62384798E-04 0.00000000E+00
+ 3.52217151E-06 0.00000000E+00 3.32612634E-03 0.00000000E+00 1.80606167E-07
+ 0.00000000E+00 5.89216910E-04 0.00000000E+00-3.67699874E-06 0.00000000E+00
+-3.50955873E-06 0.00000000E+00-2.10697072E-08 0.00000000E+00 1.80606167E-07
+ 0.00000000E+00 5.75188985E-08 0.00000000E+00 3.69020238E-06 0.00000000E+00
+-2.20748365E-08 0.00000000E+00 5.36730100E-04 0.00000000E+00 3.36152493E-06
+ 0.00000000E+00 3.17455768E-03 0.00000000E+00 1.72681764E-07 0.00000000E+00
+ 5.62384798E-04 0.00000000E+00-3.50955873E-06 0.00000000E+00-3.34945414E-06
+ 0.00000000E+00-2.01086777E-08 0.00000000E+00 1.72681764E-07 0.00000000E+00
+ 5.48979462E-08 0.00000000E+00 3.52217151E-06 0.00000000E+00-2.10697072E-08
+ 0.00000000E+00 5.12155628E-04 0.00000000E+00 3.20765279E-06 0.00000000E+00
+ 3.02950525E-03 0.00000000E+00 1.65412563E-07 0.00000000E+00 5.36730100E-04
+ 0.00000000E+00-3.34945414E-06 0.00000000E+00-3.19607976E-06 0.00000000E+00
+-1.91881074E-08 0.00000000E+00 1.65412563E-07 0.00000000E+00 5.23896820E-08
+ 0.00000000E+00 3.36152493E-06 0.00000000E+00-2.01086777E-08 0.00000000E+00
+ 4.88573983E-04 0.00000000E+00 3.06000664E-06 0.00000000E+00 2.89043658E-03
+ 0.00000000E+00 1.58731235E-07 0.00000000E+00 5.12155628E-04 0.00000000E+00
+-3.19607976E-06 0.00000000E+00-3.04889136E-06 0.00000000E+00-1.83047226E-08
+ 0.00000000E+00 1.58731235E-07 0.00000000E+00 4.99848936E-08 0.00000000E+00
+ 3.20765279E-06 0.00000000E+00-1.91881074E-08 0.00000000E+00 4.65906066E-04
+ 0.00000000E+00 2.91809008E-06 0.00000000E+00 2.75687088E-03 0.00000000E+00
+ 1.52582271E-07 0.00000000E+00 4.88573983E-04 0.00000000E+00-3.04889136E-06
+ 0.00000000E+00-2.90739645E-06 0.00000000E+00-1.74555605E-08 0.00000000E+00
+ 1.52582271E-07 0.00000000E+00 4.76752684E-08 0.00000000E+00 3.06000664E-06
+ 0.00000000E+00-1.83047226E-08 0.00000000E+00 4.44080279E-04 0.00000000E+00
+ 2.78145392E-06 0.00000000E+00 2.62837373E-03 0.00000000E+00 1.46915036E-07
+ 0.00000000E+00 4.65906066E-04 0.00000000E+00-2.90739645E-06 0.00000000E+00
+-2.77114908E-06 0.00000000E+00-1.66379394E-08 0.00000000E+00 1.46915036E-07
+ 0.00000000E+00 4.54532890E-08 0.00000000E+00 2.91809008E-06 0.00000000E+00
+-1.74555605E-08 0.00000000E+00 4.23031340E-04 0.00000000E+00 2.64968863E-06
+ 0.00000000E+00 2.50455006E-03 0.00000000E+00 1.41687169E-07 0.00000000E+00
+ 4.44080279E-04 0.00000000E+00-2.77114908E-06 0.00000000E+00-2.63974262E-06
+ 0.00000000E+00-1.58494138E-08 0.00000000E+00 1.41687169E-07 0.00000000E+00
+ 4.33121231E-08 0.00000000E+00 2.78145392E-06 0.00000000E+00-1.66379394E-08
+ 0.00000000E+00 4.02699720E-04 0.00000000E+00 2.52242079E-06 0.00000000E+00
+ 2.38503969E-03 0.00000000E+00 1.36859869E-07 0.00000000E+00 4.23031340E-04
+ 0.00000000E+00-2.63974262E-06 0.00000000E+00-2.51280625E-06 0.00000000E+00
+-1.50877542E-08 0.00000000E+00 1.36859869E-07 0.00000000E+00 4.12455409E-08
+ 0.00000000E+00 2.64968863E-06 0.00000000E+00-1.58494138E-08 0.00000000E+00
+ 3.83030945E-04 0.00000000E+00 2.39930873E-06 0.00000000E+00 2.26951365E-03
+ 0.00000000E+00 1.32399218E-07 0.00000000E+00 4.02699720E-04 0.00000000E+00
+-2.51280625E-06 0.00000000E+00-2.39000060E-06 0.00000000E+00-1.43509199E-08
+ 0.00000000E+00 1.32399218E-07 0.00000000E+00 3.92478526E-08 0.00000000E+00
+ 2.52242079E-06 0.00000000E+00-1.50877542E-08 0.00000000E+00 3.63975113E-04
+ 0.00000000E+00 2.28003948E-06 0.00000000E+00 2.15767072E-03 0.00000000E+00
+ 1.28274305E-07 0.00000000E+00 3.83030945E-04 0.00000000E+00-2.39000060E-06
+ 0.00000000E+00-2.27101475E-06 0.00000000E+00-1.36370418E-08 0.00000000E+00
+ 1.28274305E-07 0.00000000E+00 3.73138482E-08 0.00000000E+00 2.39930873E-06
+ 0.00000000E+00-1.43509199E-08 0.00000000E+00 3.45486210E-04 0.00000000E+00
+ 2.16432452E-06 0.00000000E+00 2.04923414E-03 0.00000000E+00 1.24459165E-07
+ 0.00000000E+00 3.63975113E-04 0.00000000E+00-2.27101475E-06 0.00000000E+00
+-2.15556195E-06 0.00000000E+00-1.29443962E-08 0.00000000E+00 1.24459165E-07
+ 0.00000000E+00 3.54387407E-08 0.00000000E+00 2.28003948E-06 0.00000000E+00
+-1.36370418E-08 0.00000000E+00 3.27521854E-04 0.00000000E+00 2.05189807E-06
+ 0.00000000E+00 1.94394868E-03 0.00000000E+00 1.20929194E-07 0.00000000E+00
+ 3.45486210E-04 0.00000000E+00-2.15556195E-06 0.00000000E+00-2.04337809E-06
+ 0.00000000E+00-1.22713958E-08 0.00000000E+00 1.20929194E-07 0.00000000E+00
+ 3.36181166E-08 0.00000000E+00 2.16432452E-06 0.00000000E+00-1.29443962E-08
+ 0.00000000E+00 3.10042837E-04 0.00000000E+00 1.94251433E-06 0.00000000E+00
+ 1.84157892E-03 0.00000000E+00 1.17663128E-07 0.00000000E+00 3.27521854E-04
+ 0.00000000E+00-2.04337809E-06 0.00000000E+00-1.93421879E-06 0.00000000E+00
+-1.16165717E-08 0.00000000E+00 1.17663128E-07 0.00000000E+00 3.18479038E-08
+ 0.00000000E+00 2.05189807E-06 0.00000000E+00-1.22713958E-08 0.00000000E+00
+ 2.93012800E-04 0.00000000E+00 1.83594536E-06 0.00000000E+00 1.74190672E-03
+ 0.00000000E+00 1.14641757E-07 0.00000000E+00 3.10042837E-04 0.00000000E+00
+-1.93421879E-06 0.00000000E+00-1.82785741E-06 0.00000000E+00-1.09785621E-08
+ 0.00000000E+00 1.14641757E-07 0.00000000E+00 3.01243298E-08 0.00000000E+00
+ 1.94251433E-06 0.00000000E+00-1.16165717E-08 0.00000000E+00 2.76397912E-04
+ 0.00000000E+00 1.73197911E-06 0.00000000E+00 1.64472947E-03 0.00000000E+00
+ 1.11848087E-07 0.00000000E+00 2.93012800E-04 0.00000000E+00-1.82785741E-06
+ 0.00000000E+00 2.60166638E-04 0.00000000E+00 1.63041791E-06 0.00000000E+00
+ 1.54985850E-03 0.00000000E+00 1.09266675E-07 0.00000000E+00 2.76397912E-04
+ 0.00000000E+00-1.72408305E-06 0.00000000E+00-1.62269909E-06 0.00000000E+00
+-9.74800311E-09 0.00000000E+00 1.09266675E-07 0.00000000E+00 2.68033229E-08
+ 0.00000000E+00 1.73197911E-06 0.00000000E+00-1.03560997E-08 0.00000000E+00
+-1.72408305E-06 0.00000000E+00-1.03560997E-08 0.00000000E+00 1.11848087E-07
+ 0.00000000E+00 2.84438906E-08 0.00000000E+00 1.83594536E-06 0.00000000E+00
+-1.09785621E-08 0.00000000E+00 8.75942750E-06 0.00000000E+00 4.42350460E-08
+ 0.00000000E+00 6.56981094E-06 0.00000000E+00-3.79165823E-08 0.00000000E+00
+ 4.42350460E-08 0.00000000E+00 2.46180794E-10 0.00000000E+00 4.42365575E-08
+ 0.00000000E+00-2.46186068E-10 0.00000000E+00-3.79165823E-08 0.00000000E+00
+-2.46186068E-10 0.00000000E+00 8.85162345E-08 0.00000000E+00 1.31325328E-09
+ 0.00000000E+00 1.26437061E-07 0.00000000E+00-7.38818378E-10 0.00000000E+00
+ 6.56981094E-06 0.00000000E+00 4.42365575E-08 0.00000000E+00 7.59294901E-05
+ 0.00000000E+00 8.85162345E-08 0.00000000E+00 1.97164994E-05 0.00000000E+00
+-1.20109968E-07 0.00000000E+00 1.97164994E-05 0.00000000E+00 1.26437061E-07
+ 0.00000000E+00 1.51945060E-04 0.00000000E+00 8.86702205E-08 0.00000000E+00
+ 3.28860902E-05 0.00000000E+00-2.02442283E-07 0.00000000E+00-1.20109968E-07
+ 0.00000000E+00-7.38818378E-10 0.00000000E+00 8.86702205E-08 0.00000000E+00
+ 2.62798441E-09 0.00000000E+00 2.08784061E-07 0.00000000E+00-1.23230320E-09
+ 0.00000000E+00 3.28860902E-05 0.00000000E+00 2.08784061E-07 0.00000000E+00
+ 2.28136664E-04 0.00000000E+00 8.89239278E-08 0.00000000E+00 4.60935066E-05
+ 0.00000000E+00-2.85007067E-07 0.00000000E+00-2.02442283E-07 0.00000000E+00
+-1.23230320E-09 0.00000000E+00 8.89239278E-08 0.00000000E+00 3.94574029E-09
+ 0.00000000E+00 2.91370606E-07 0.00000000E+00-1.72719953E-09 0.00000000E+00
+ 4.60935066E-05 0.00000000E+00 2.91370606E-07 0.00000000E+00 3.04590319E-04
+ 0.00000000E+00 8.92807049E-08 0.00000000E+00 5.93540390E-05 0.00000000E+00
+-3.67899663E-07 0.00000000E+00-2.85007067E-07 0.00000000E+00-1.72719953E-09
+ 0.00000000E+00 8.92807049E-08 0.00000000E+00 5.26801771E-09 0.00000000E+00
+ 3.74292548E-07 0.00000000E+00-2.22408031E-09 0.00000000E+00 5.93540390E-05
+ 0.00000000E+00 3.74292548E-07 0.00000000E+00 3.81396330E-04 0.00000000E+00
+ 8.97431430E-08 0.00000000E+00 7.26833869E-05 0.00000000E+00-4.51218253E-07
+ 0.00000000E+00-3.67899663E-07 0.00000000E+00-2.22408031E-09 0.00000000E+00
+ 8.97431430E-08 0.00000000E+00 6.59637223E-09 0.00000000E+00 4.57648013E-07
+ 0.00000000E+00-2.72353380E-09 0.00000000E+00 7.26833869E-05 0.00000000E+00
+ 4.57648013E-07 0.00000000E+00 4.58645576E-04 0.00000000E+00 9.03126171E-08
+ 0.00000000E+00 8.60974364E-05 0.00000000E+00-5.35062060E-07 0.00000000E+00
+-4.51218253E-07 0.00000000E+00-2.72353380E-09 0.00000000E+00 9.03126171E-08
+ 0.00000000E+00 7.93237847E-09 0.00000000E+00 5.41536420E-07 0.00000000E+00
+-3.22615523E-09 0.00000000E+00 8.60974364E-05 0.00000000E+00 5.41536420E-07
+ 0.00000000E+00 5.36430732E-04 0.00000000E+00 9.09908348E-08 0.00000000E+00
+ 9.96123693E-05 0.00000000E+00-6.19532152E-07 0.00000000E+00-5.35062060E-07
+ 0.00000000E+00-3.22615523E-09 0.00000000E+00 9.09908348E-08 0.00000000E+00
+ 9.27763861E-09 0.00000000E+00 6.26059028E-07 0.00000000E+00-3.73255084E-09
+ 0.00000000E+00 9.96123693E-05 0.00000000E+00 6.26059028E-07 0.00000000E+00
+ 6.14847001E-04 0.00000000E+00 9.17823250E-08 0.00000000E+00 1.13244965E-04
+ 0.00000000E+00-7.04733340E-07 0.00000000E+00-6.19532152E-07 0.00000000E+00
+-3.73255084E-09 0.00000000E+00 9.17823250E-08 0.00000000E+00 1.06337992E-08
+ 0.00000000E+00 7.11320841E-07 0.00000000E+00-4.24334937E-09 0.00000000E+00
+ 1.13244965E-04 0.00000000E+00 7.11320841E-07 0.00000000E+00 6.93991813E-04
+ 0.00000000E+00 9.26876732E-08 0.00000000E+00 1.27012198E-04 0.00000000E+00
+-7.90771604E-07 0.00000000E+00-7.04733340E-07 0.00000000E+00-4.24334937E-09
+ 0.00000000E+00 9.26876732E-08 0.00000000E+00 1.20025454E-08 0.00000000E+00
+ 7.97428108E-07 0.00000000E+00-4.75918668E-09 0.00000000E+00 1.27012198E-04
+ 0.00000000E+00 7.97428108E-07 0.00000000E+00 7.73965837E-04 0.00000000E+00
+ 9.37138501E-08 0.00000000E+00 1.40931959E-04 0.00000000E+00-8.77758640E-07
+ 0.00000000E+00-7.90771604E-07 0.00000000E+00-4.75918668E-09 0.00000000E+00
+ 9.37138501E-08 0.00000000E+00 1.33856185E-08 0.00000000E+00 8.84492832E-07
+ 0.00000000E+00-5.28073311E-09 0.00000000E+00 1.40931959E-04 0.00000000E+00
+ 8.84492832E-07 0.00000000E+00 8.54873478E-04 0.00000000E+00 9.48625731E-08
+ 0.00000000E+00 1.55022496E-04 0.00000000E+00-9.65808378E-07 0.00000000E+00
+-8.77758640E-07 0.00000000E+00-5.28073311E-09 0.00000000E+00 9.48625731E-08
+ 0.00000000E+00 1.47848237E-08 0.00000000E+00 9.72629243E-07 0.00000000E+00
+-5.80867227E-09 0.00000000E+00 1.55022496E-04 0.00000000E+00 9.72629243E-07
+ 0.00000000E+00 9.36822740E-04 0.00000000E+00 9.61406592E-08 0.00000000E+00
+ 1.69303005E-04 0.00000000E+00-1.05504060E-06 0.00000000E+00-9.65808378E-07
+ 0.00000000E+00-5.80867227E-09 0.00000000E+00 9.61406592E-08 0.00000000E+00
+ 1.62020298E-08 0.00000000E+00 1.06195757E-06 0.00000000E+00-6.34372335E-09
+ 0.00000000E+00 1.69303005E-04 0.00000000E+00 1.06195757E-06 0.00000000E+00
+ 1.01992683E-03 0.00000000E+00 9.75530157E-08 0.00000000E+00 1.83793438E-04
+ 0.00000000E+00-1.14557987E-06 0.00000000E+00-1.05504060E-06 0.00000000E+00
+-6.34372335E-09 0.00000000E+00 9.75530157E-08 0.00000000E+00 1.76391933E-08
+ 0.00000000E+00 1.15260272E-06 0.00000000E+00-6.88663377E-09 0.00000000E+00
+ 1.83793438E-04 0.00000000E+00 1.15260272E-06 0.00000000E+00 1.10430351E-03
+ 0.00000000E+00 9.91060520E-08 0.00000000E+00 1.98514700E-04 0.00000000E+00
+-1.23755658E-06 0.00000000E+00-1.14557987E-06 0.00000000E+00-6.88663377E-09
+ 0.00000000E+00 9.91060520E-08 0.00000000E+00 1.90983523E-08 0.00000000E+00
+ 1.24469566E-06 0.00000000E+00-7.43818669E-09 0.00000000E+00 1.98514700E-04
+ 0.00000000E+00 1.24469566E-06 0.00000000E+00 1.19007687E-03 0.00000000E+00
+ 1.00807231E-07 0.00000000E+00 2.13488794E-04 0.00000000E+00-1.33110805E-06
+ 0.00000000E+00-1.23755658E-06 0.00000000E+00-7.43818669E-09 0.00000000E+00
+ 1.00807231E-07 0.00000000E+00 2.05816515E-08 0.00000000E+00 1.33837418E-06
+ 0.00000000E+00-7.99920639E-09 0.00000000E+00 2.13488794E-04 0.00000000E+00
+ 1.33837418E-06 0.00000000E+00 1.27737718E-03 0.00000000E+00 1.02664521E-07
+ 0.00000000E+00 2.28738915E-04 0.00000000E+00-1.42637894E-06 0.00000000E+00
+-1.33110805E-06 0.00000000E+00-7.99920639E-09 0.00000000E+00 1.02664521E-07
+ 0.00000000E+00 2.20913454E-08 0.00000000E+00 1.43378361E-06 0.00000000E+00
+-8.57056173E-09 0.00000000E+00 2.28738915E-04 0.00000000E+00 1.43378361E-06
+ 0.00000000E+00 1.36634235E-03 0.00000000E+00 1.04686480E-07 0.00000000E+00
+ 2.44289530E-04 0.00000000E+00-1.52352193E-06 0.00000000E+00-1.42637894E-06
+ 0.00000000E+00-8.57056173E-09 0.00000000E+00 1.04686480E-07 0.00000000E+00
+ 2.36298168E-08 0.00000000E+00 1.53107720E-06 0.00000000E+00-9.15316936E-09
+ 0.00000000E+00 2.44289530E-04 0.00000000E+00 1.53107720E-06 0.00000000E+00
+ 1.45711769E-03 0.00000000E+00 1.06883448E-07 0.00000000E+00 2.60166638E-04
+ 0.00000000E+00-1.62269909E-06 0.00000000E+00-1.52352193E-06 0.00000000E+00
+-9.15316936E-09 0.00000000E+00 1.06883448E-07 0.00000000E+00 2.51995815E-08
+ 0.00000000E+00 1.63041791E-06 0.00000000E+00-9.74800311E-09 0.00000000E+00
+ 5.25986919E-04 0.00000000E+00 2.48000500E-06 0.00000000E+00 1.53411731E-03
+ 0.00000000E+00-4.21835721E-06 0.00000000E+00-2.47322832E-06 0.00000000E+00
+-1.11781679E-08 0.00000000E+00-4.21835721E-06 0.00000000E+00 1.49705588E-08
+ 0.00000000E+00-2.38685945E-06 0.00000000E+00-1.07877440E-08 0.00000000E+00
+ 9.31961136E-08 0.00000000E+00 2.92854760E-08 0.00000000E+00 2.48000500E-06
+ 0.00000000E+00-1.11781679E-08 0.00000000E+00 5.07616093E-04 0.00000000E+00
+ 2.39337383E-06 0.00000000E+00 2.98553404E-03 0.00000000E+00 9.31961136E-08
+ 0.00000000E+00 5.25986919E-04 0.00000000E+00-2.47322832E-06 0.00000000E+00
+ 6.46857518E-04 0.00000000E+00 4.05120307E-06 0.00000000E+00 3.34490810E-03
+ 0.00000000E+00-2.88314555E-06 0.00000000E+00 5.07616093E-04 0.00000000E+00
+-2.38685945E-06 0.00000000E+00-4.03665185E-06 0.00000000E+00-2.42340321E-08
+ 0.00000000E+00-2.88314555E-06 0.00000000E+00 4.68213371E-08 0.00000000E+00
+ 2.39337383E-06 0.00000000E+00-1.07877440E-08 0.00000000E+00 6.17333390E-04
+ 0.00000000E+00 3.86628975E-06 0.00000000E+00 3.65124957E-03 0.00000000E+00
+ 1.98736593E-07 0.00000000E+00 6.46857518E-04 0.00000000E+00-4.03665185E-06
+ 0.00000000E+00-3.85243896E-06 0.00000000E+00-2.31280701E-08 0.00000000E+00
+ 1.98736593E-07 0.00000000E+00 6.31409811E-08 0.00000000E+00 4.05120307E-06
+ 0.00000000E+00-2.42340321E-08 0.00000000E+00 5.89216910E-04 0.00000000E+00
+ 3.69020238E-06 0.00000000E+00 3.48479812E-03 0.00000000E+00 1.89244595E-07
+ 0.00000000E+00 6.17333390E-04 0.00000000E+00-3.85243896E-06 0.00000000E+00
+-3.67699874E-06 0.00000000E+00-2.20748365E-08 0.00000000E+00 1.89244595E-07
+ 0.00000000E+00 6.02627017E-08 0.00000000E+00 3.86628975E-06 0.00000000E+00
+-2.31280701E-08 0.00000000E+00 5.62384798E-04 0.00000000E+00 3.52217151E-06
+ 0.00000000E+00 3.32612634E-03 0.00000000E+00 1.80606167E-07 0.00000000E+00
+ 5.89216910E-04 0.00000000E+00-3.67699874E-06 0.00000000E+00-3.50955873E-06
+ 0.00000000E+00-2.10697072E-08 0.00000000E+00 1.80606167E-07 0.00000000E+00
+ 5.75188985E-08 0.00000000E+00 3.69020238E-06 0.00000000E+00-2.20748365E-08
+ 0.00000000E+00 5.36730100E-04 0.00000000E+00 3.36152493E-06 0.00000000E+00
+ 3.17455768E-03 0.00000000E+00 1.72681764E-07 0.00000000E+00 5.62384798E-04
+ 0.00000000E+00-3.50955873E-06 0.00000000E+00-3.34945414E-06 0.00000000E+00
+-2.01086777E-08 0.00000000E+00 1.72681764E-07 0.00000000E+00 5.48979462E-08
+ 0.00000000E+00 3.52217151E-06 0.00000000E+00-2.10697072E-08 0.00000000E+00
+ 5.12155628E-04 0.00000000E+00 3.20765279E-06 0.00000000E+00 3.02950525E-03
+ 0.00000000E+00 1.65412563E-07 0.00000000E+00 5.36730100E-04 0.00000000E+00
+-3.34945414E-06 0.00000000E+00-3.19607976E-06 0.00000000E+00-1.91881074E-08
+ 0.00000000E+00 1.65412563E-07 0.00000000E+00 5.23896820E-08 0.00000000E+00
+ 3.36152493E-06 0.00000000E+00-2.01086777E-08 0.00000000E+00 4.88573983E-04
+ 0.00000000E+00 3.06000664E-06 0.00000000E+00 2.89043658E-03 0.00000000E+00
+ 1.58731235E-07 0.00000000E+00 5.12155628E-04 0.00000000E+00-3.19607976E-06
+ 0.00000000E+00-3.04889136E-06 0.00000000E+00-1.83047226E-08 0.00000000E+00
+ 1.58731235E-07 0.00000000E+00 4.99848936E-08 0.00000000E+00 3.20765279E-06
+ 0.00000000E+00-1.91881074E-08 0.00000000E+00 4.65906066E-04 0.00000000E+00
+ 2.91809008E-06 0.00000000E+00 2.75687088E-03 0.00000000E+00 1.52582271E-07
+ 0.00000000E+00 4.88573983E-04 0.00000000E+00-3.04889136E-06 0.00000000E+00
+-2.90739645E-06 0.00000000E+00-1.74555605E-08 0.00000000E+00 1.52582271E-07
+ 0.00000000E+00 4.76752684E-08 0.00000000E+00 3.06000664E-06 0.00000000E+00
+-1.83047226E-08 0.00000000E+00 4.44080279E-04 0.00000000E+00 2.78145392E-06
+ 0.00000000E+00 2.62837373E-03 0.00000000E+00 1.46915036E-07 0.00000000E+00
+ 4.65906066E-04 0.00000000E+00-2.90739645E-06 0.00000000E+00-2.77114908E-06
+ 0.00000000E+00-1.66379394E-08 0.00000000E+00 1.46915036E-07 0.00000000E+00
+ 4.54532890E-08 0.00000000E+00 2.91809008E-06 0.00000000E+00-1.74555605E-08
+ 0.00000000E+00 4.23031340E-04 0.00000000E+00 2.64968863E-06 0.00000000E+00
+ 2.50455006E-03 0.00000000E+00 1.41687169E-07 0.00000000E+00 4.44080279E-04
+ 0.00000000E+00-2.77114908E-06 0.00000000E+00-2.63974262E-06 0.00000000E+00
+-1.58494138E-08 0.00000000E+00 1.41687169E-07 0.00000000E+00 4.33121231E-08
+ 0.00000000E+00 2.78145392E-06 0.00000000E+00-1.66379394E-08 0.00000000E+00
+ 4.02699720E-04 0.00000000E+00 2.52242079E-06 0.00000000E+00 2.38503969E-03
+ 0.00000000E+00 1.36859869E-07 0.00000000E+00 4.23031340E-04 0.00000000E+00
+-2.63974262E-06 0.00000000E+00-2.51280625E-06 0.00000000E+00-1.50877542E-08
+ 0.00000000E+00 1.36859869E-07 0.00000000E+00 4.12455409E-08 0.00000000E+00
+ 2.64968863E-06 0.00000000E+00-1.58494138E-08 0.00000000E+00 3.83030945E-04
+ 0.00000000E+00 2.39930873E-06 0.00000000E+00 2.26951365E-03 0.00000000E+00
+ 1.32399218E-07 0.00000000E+00 4.02699720E-04 0.00000000E+00-2.51280625E-06
+ 0.00000000E+00-2.39000060E-06 0.00000000E+00-1.43509199E-08 0.00000000E+00
+ 1.32399218E-07 0.00000000E+00 3.92478526E-08 0.00000000E+00 2.52242079E-06
+ 0.00000000E+00-1.50877542E-08 0.00000000E+00 3.63975113E-04 0.00000000E+00
+ 2.28003948E-06 0.00000000E+00 2.15767072E-03 0.00000000E+00 1.28274305E-07
+ 0.00000000E+00 3.83030945E-04 0.00000000E+00-2.39000060E-06 0.00000000E+00
+-2.27101475E-06 0.00000000E+00-1.36370418E-08 0.00000000E+00 1.28274305E-07
+ 0.00000000E+00 3.73138482E-08 0.00000000E+00 2.39930873E-06 0.00000000E+00
+-1.43509199E-08 0.00000000E+00 3.45486210E-04 0.00000000E+00 2.16432452E-06
+ 0.00000000E+00 2.04923414E-03 0.00000000E+00 1.24459165E-07 0.00000000E+00
+ 3.63975113E-04 0.00000000E+00-2.27101475E-06 0.00000000E+00-2.15556195E-06
+ 0.00000000E+00-1.29443962E-08 0.00000000E+00 1.24459165E-07 0.00000000E+00
+ 3.54387407E-08 0.00000000E+00 2.28003948E-06 0.00000000E+00-1.36370418E-08
+ 0.00000000E+00 3.27521854E-04 0.00000000E+00 2.05189807E-06 0.00000000E+00
+ 1.94394868E-03 0.00000000E+00 1.20929194E-07 0.00000000E+00 3.45486210E-04
+ 0.00000000E+00-2.15556195E-06 0.00000000E+00-2.04337809E-06 0.00000000E+00
+-1.22713958E-08 0.00000000E+00 1.20929194E-07 0.00000000E+00 3.36181166E-08
+ 0.00000000E+00 2.16432452E-06 0.00000000E+00-1.29443962E-08 0.00000000E+00
+ 3.10042837E-04 0.00000000E+00 1.94251433E-06 0.00000000E+00 1.84157892E-03
+ 0.00000000E+00 1.17663128E-07 0.00000000E+00 3.27521854E-04 0.00000000E+00
+-2.04337809E-06 0.00000000E+00-1.93421879E-06 0.00000000E+00-1.16165717E-08
+ 0.00000000E+00 1.17663128E-07 0.00000000E+00 3.18479038E-08 0.00000000E+00
+ 2.05189807E-06 0.00000000E+00-1.22713958E-08 0.00000000E+00 2.93012800E-04
+ 0.00000000E+00 1.83594536E-06 0.00000000E+00 1.74190672E-03 0.00000000E+00
+ 1.14641757E-07 0.00000000E+00 3.10042837E-04 0.00000000E+00-1.93421879E-06
+ 0.00000000E+00-1.82785741E-06 0.00000000E+00-1.09785621E-08 0.00000000E+00
+ 1.14641757E-07 0.00000000E+00 3.01243298E-08 0.00000000E+00 1.94251433E-06
+ 0.00000000E+00-1.16165717E-08 0.00000000E+00 2.76397912E-04 0.00000000E+00
+ 1.73197911E-06 0.00000000E+00 1.64472947E-03 0.00000000E+00 1.11848087E-07
+ 0.00000000E+00 2.93012800E-04 0.00000000E+00-1.82785741E-06 0.00000000E+00
+ 2.60166638E-04 0.00000000E+00 1.63041791E-06 0.00000000E+00 1.54985850E-03
+ 0.00000000E+00 1.09266675E-07 0.00000000E+00 2.76397912E-04 0.00000000E+00
+-1.72408305E-06 0.00000000E+00-1.62269909E-06 0.00000000E+00-9.74800311E-09
+ 0.00000000E+00 1.09266675E-07 0.00000000E+00 2.68033229E-08 0.00000000E+00
+ 1.73197911E-06 0.00000000E+00-1.03560997E-08 0.00000000E+00-1.72408305E-06
+ 0.00000000E+00-1.03560997E-08 0.00000000E+00 1.11848087E-07 0.00000000E+00
+ 2.84438906E-08 0.00000000E+00 1.83594536E-06 0.00000000E+00-1.09785621E-08
+ 0.00000000E+00 2.52505826E-01 0.00000000E+00 1.44380768E-04-1.11464849E-18
+ 1.01002561E-01 0.00000000E+00-2.52507036E-02 0.00000000E+00 7.21908598E-05
+-6.04225745E-19-3.60938437E-05 2.08311261E-19 7.21908598E-05 6.04225745E-19
+ 1.01002561E-01 0.00000000E+00 5.77496419E-04 3.33299100E-18 7.21845152E-05
+ 2.29019301E-19 2.02007605E-01 0.00000000E+00 2.53673071E-07 0.00000000E+00
+ 1.01002561E-01 0.00000000E+00 7.21908598E-05-6.04225745E-19 2.02007605E-01
+ 0.00000000E+00 2.53673071E-07 0.00000000E+00 5.77496419E-04-3.33299100E-18
+ 7.21845152E-05-2.29019301E-19 1.44380768E-04 1.11464849E-18 2.52505826E-01
+ 0.00000000E+00 7.21908598E-05 6.04225745E-19-3.60938437E-05-2.08311261E-19
+ 1.01002561E-01 0.00000000E+00-2.52507036E-02 0.00000000E+00 7.21848291E-05
+ 1.92005693E-19 9.43971392E-03 0.00000000E+00 5.77535624E-04 8.14182850E-19
+ 7.21999873E-05 5.51035468E-20 5.47526269E-02 0.00000000E+00 4.72042869E-03
+ 0.00000000E+00-2.52507036E-02 0.00000000E+00-3.60938437E-05 2.08311261E-19
+ 2.53673071E-07 0.00000000E+00 4.34227697E-02 0.00000000E+00 7.21845152E-05
+-2.29019301E-19 2.88746182E-04-9.30265833E-19 9.43971392E-03 0.00000000E+00
+-3.54003565E-03 0.00000000E+00 7.21848291E-05-1.92005693E-19-3.60962041E-05
+ 6.17773099E-20-3.60938437E-05-2.08311261E-19-2.52507036E-02 0.00000000E+00
+ 7.21845152E-05 2.29019301E-19 2.88746182E-04 9.30265833E-19 2.53673071E-07
+ 0.00000000E+00 4.34227697E-02 0.00000000E+00 7.21848291E-05 1.92005693E-19
+-3.60962041E-05-6.17773099E-20 9.43971392E-03 0.00000000E+00-3.54003565E-03
+ 0.00000000E+00 9.43971392E-03 0.00000000E+00 7.21848291E-05-1.92005693E-19
+ 5.47526269E-02 0.00000000E+00 4.72042869E-03 0.00000000E+00 5.77535624E-04
+-8.14182850E-19 7.21999873E-05-5.51035468E-20 7.21998374E-05 1.10659477E-19
+ 4.93416001E-03 0.00000000E+00 5.77693717E-04 1.64036732E-18 7.22242578E-05
+ 2.79151031E-19 3.25146790E-02 0.00000000E+00 3.29011431E-03 0.00000000E+00
+-3.54003565E-03 0.00000000E+00-3.60962041E-05 6.17773099E-20 4.72042869E-03
+ 0.00000000E+00 2.04000208E-02 0.00000000E+00 7.21999873E-05-5.51035468E-20
+ 2.88802971E-04-4.37747071E-19 4.93416001E-03 0.00000000E+00-2.05606858E-03
+ 0.00000000E+00 7.21998374E-05-1.10659477E-19-3.61060238E-05 9.74526269E-20
+-3.60962041E-05-6.17773099E-20-3.54003565E-03 0.00000000E+00 7.21999873E-05
+ 5.51035468E-20 2.88802971E-04 4.37747071E-19 4.72042869E-03 0.00000000E+00
+ 2.04000208E-02 0.00000000E+00 7.21998374E-05 1.10659477E-19-3.61060238E-05
+-9.74526269E-20 4.93416001E-03 0.00000000E+00-2.05606858E-03 0.00000000E+00
+ 4.93416001E-03 0.00000000E+00 7.21998374E-05-1.10659477E-19 3.25146790E-02
+ 0.00000000E+00 3.29011431E-03 0.00000000E+00 5.77693717E-04-1.64036732E-18
+ 7.22242578E-05-2.79151031E-19 7.22240354E-05 2.52104109E-19 3.32839305E-03
+ 0.00000000E+00 5.77925427E-04 1.71412575E-18 7.22580148E-05 1.81266360E-19
+ 2.31644755E-02 0.00000000E+00 2.49697619E-03 0.00000000E+00-2.05606858E-03
+ 0.00000000E+00-3.61060238E-05 9.74526269E-20 3.29011431E-03 0.00000000E+00
+ 1.35268909E-02 0.00000000E+00 7.22242578E-05-2.79151031E-19 2.88900003E-04
+-9.77664255E-19 3.32839305E-03 0.00000000E+00-1.45634231E-03 0.00000000E+00
+ 7.22240354E-05-2.52104109E-19-3.61205126E-05 1.08342617E-19-3.61060238E-05
+-9.74526269E-20-2.05606858E-03 0.00000000E+00 7.22242578E-05 2.79151031E-19
+ 2.88900003E-04 9.77664255E-19 3.29011431E-03 0.00000000E+00 1.35268909E-02
+ 0.00000000E+00 7.22240354E-05 2.52104109E-19-3.61205126E-05-1.08342617E-19
+ 3.32839305E-03 0.00000000E+00-1.45634231E-03 0.00000000E+00 3.32839305E-03
+ 0.00000000E+00 7.22240354E-05-2.52104109E-19 2.31644755E-02 0.00000000E+00
+ 2.49697619E-03 0.00000000E+00 5.77925427E-04-1.71412575E-18 7.22580148E-05
+-1.81266360E-19 7.22577994E-05 1.92214225E-19 2.50870136E-03 0.00000000E+00
+ 5.78234767E-04 1.55462165E-18 7.23015919E-05 1.93065849E-19 1.80014525E-02
+ 0.00000000E+00 2.00766466E-03 0.00000000E+00-1.45634231E-03 0.00000000E+00
+-3.61205126E-05 1.08342617E-19 2.49697619E-03 0.00000000E+00 1.01293045E-02
+ 0.00000000E+00 7.22580148E-05-1.81266360E-19 2.89035132E-04-7.72819711E-19
+ 2.50870136E-03 0.00000000E+00-1.12909150E-03 0.00000000E+00 7.22577994E-05
+-1.92214225E-19-3.61398478E-05 9.63200184E-20-3.61205126E-05-1.08342617E-19
+-1.45634231E-03 0.00000000E+00 7.22580148E-05 1.81266360E-19 2.89035132E-04
+ 7.72819711E-19 2.49697619E-03 0.00000000E+00 1.01293045E-02 0.00000000E+00
+ 7.22577994E-05 1.92214225E-19-3.61398478E-05-9.63200184E-20 2.50870136E-03
+ 0.00000000E+00-1.12909150E-03 0.00000000E+00 2.50870136E-03 0.00000000E+00
+ 7.22577994E-05-1.92214225E-19 1.80014525E-02 0.00000000E+00 2.00766466E-03
+ 0.00000000E+00 5.78234767E-04-1.55462165E-18 7.23015919E-05-1.93065849E-19
+ 7.23013690E-05 1.80471453E-19 2.01239456E-03 0.00000000E+00 5.78622637E-04
+ 1.49071301E-18 7.23549998E-05 2.01852945E-19 1.47254906E-02 0.00000000E+00
+ 1.67771234E-03 0.00000000E+00-1.12909150E-03 0.00000000E+00-3.61398478E-05
+ 9.63200184E-20 2.00766466E-03 0.00000000E+00 8.09952173E-03 0.00000000E+00
+ 7.23015919E-05-1.93065849E-19 2.89209436E-04-7.54041549E-19 2.01239456E-03
+ 0.00000000E+00-9.22526724E-04 0.00000000E+00 7.23013690E-05-1.80471453E-19
+-3.61640922E-05 9.55810994E-20-3.61398478E-05-9.63200184E-20-1.12909150E-03
+ 0.00000000E+00 7.23015919E-05 1.93065849E-19 2.89209436E-04 7.54041549E-19
+ 2.00766466E-03 0.00000000E+00 8.09952173E-03 0.00000000E+00 7.23013690E-05
+ 1.80471453E-19-3.61640922E-05-9.55810994E-20 2.01239456E-03 0.00000000E+00
+-9.22526724E-04 0.00000000E+00 2.01239456E-03 0.00000000E+00 7.23013690E-05
+-1.80471453E-19 1.47254906E-02 0.00000000E+00 1.67771234E-03 0.00000000E+00
+ 5.78622637E-04-1.49071301E-18 7.23549998E-05-2.01852945E-19 7.23547916E-05
+ 2.15314754E-19 1.67997372E-03 0.00000000E+00 5.79089697E-04 2.01231867E-18
+ 7.24183382E-05 2.83129479E-19 1.24615926E-02 0.00000000E+00 1.44070505E-03
+ 0.00000000E+00-9.22526724E-04 0.00000000E+00-3.61640922E-05 9.55810994E-20
+ 1.67771234E-03 0.00000000E+00 6.74944581E-03 0.00000000E+00 7.23549998E-05
+-2.01852945E-19 2.89423124E-04-8.51336740E-19 1.67997372E-03 0.00000000E+00
+-7.80169692E-04 0.00000000E+00 7.23547916E-05-2.15314754E-19-3.61932824E-05
+ 1.24611058E-19-3.61640922E-05-9.55810994E-20-9.22526724E-04 0.00000000E+00
+ 7.23549998E-05 2.01852945E-19 2.89423124E-04 8.51336740E-19 1.67771234E-03
+ 0.00000000E+00 6.74944581E-03 0.00000000E+00 7.23547916E-05 2.15314754E-19
+-3.61932824E-05-1.24611058E-19 1.67997372E-03 0.00000000E+00-7.80169692E-04
+ 0.00000000E+00 1.67997372E-03 0.00000000E+00 7.23547916E-05-2.15314754E-19
+ 1.24615926E-02 0.00000000E+00 1.44070505E-03 0.00000000E+00 5.79089697E-04
+-2.01231867E-18 7.24183382E-05-2.83129479E-19 7.24181029E-05 2.71573524E-19
+ 1.44191797E-03 0.00000000E+00 5.79636262E-04 2.49541719E-18 7.24916925E-05
+ 3.56645168E-19 1.08035988E-02 0.00000000E+00 1.26241515E-03 0.00000000E+00
+-7.80169692E-04 0.00000000E+00-3.61932824E-05 1.24611058E-19 1.44070505E-03
+ 0.00000000E+00 5.78659005E-03 0.00000000E+00 7.24183382E-05-2.83129479E-19
+ 2.89676469E-04-1.11602926E-18 1.44191797E-03 0.00000000E+00-6.76083280E-04
+ 0.00000000E+00 7.24181029E-05-2.71573524E-19-3.62274489E-05 1.57054673E-19
+-3.61932824E-05-1.24611058E-19-7.80169692E-04 0.00000000E+00 7.24183382E-05
+ 2.83129479E-19 2.89676469E-04 1.11602926E-18 1.44070505E-03 0.00000000E+00
+ 5.78659005E-03 0.00000000E+00 7.24181029E-05 2.71573524E-19-3.62274489E-05
+-1.57054673E-19 1.44191797E-03 0.00000000E+00-6.76083280E-04 0.00000000E+00
+ 1.44191797E-03 0.00000000E+00 7.24181029E-05-2.71573524E-19 1.08035988E-02
+ 0.00000000E+00 1.26241515E-03 0.00000000E+00 5.79636262E-04-2.49541719E-18
+ 7.24916925E-05-3.56645168E-19-6.76083280E-04 0.00000000E+00-3.62274489E-05
+ 1.57054673E-19 1.26241515E-03 0.00000000E+00 5.06532646E-03 0.00000000E+00
+ 7.24916925E-05-3.56645168E-19 2.89969984E-04-1.40162493E-18 1.26312319E-03
+ 0.00000000E+00-5.96661025E-04 0.00000000E+00 7.24914920E-05-3.91478435E-19
+-3.62666740E-05 1.51602465E-19 7.24914920E-05 3.91478435E-19 1.26312319E-03
+ 0.00000000E+00 5.80263915E-04 2.54809016E-18 7.25752041E-05 2.14931424E-19
+ 9.53715082E-03 0.00000000E+00 1.12352091E-03 0.00000000E+00 1.26312319E-03
+ 0.00000000E+00 7.24914920E-05-3.91478435E-19 9.53715082E-03 0.00000000E+00
+ 1.12352091E-03 0.00000000E+00 5.80263915E-04-2.54809016E-18 7.25752041E-05
+-2.14931424E-19-3.62274489E-05-1.57054673E-19-6.76083280E-04 0.00000000E+00
+ 7.24916925E-05 3.56645168E-19 2.89969984E-04 1.40162493E-18 1.26241515E-03
+ 0.00000000E+00 5.06532646E-03 0.00000000E+00 7.24914920E-05 3.91478435E-19
+-3.62666740E-05-1.51602465E-19 1.26312319E-03 0.00000000E+00-5.96661025E-04
+ 0.00000000E+00 7.25749664E-05 1.57829273E-19 1.12396061E-03 0.00000000E+00
+ 5.80972596E-04 9.27277926E-19 7.26689274E-05 1.08985416E-19 8.53835985E-03
+ 0.00000000E+00 1.01231648E-03 0.00000000E+00-5.96661025E-04 0.00000000E+00
+-3.62666740E-05 1.51602465E-19 1.12352091E-03 0.00000000E+00 4.50494786E-03
+ 0.00000000E+00 7.25752041E-05-2.14931424E-19 2.90304001E-04-7.91257512E-19
+ 1.12396061E-03 0.00000000E+00-5.34069271E-04 0.00000000E+00 7.25749664E-05
+-1.57829273E-19-3.63109735E-05 6.67036722E-20-3.62666740E-05-1.51602465E-19
+-5.96661025E-04 0.00000000E+00 7.25752041E-05 2.14931424E-19 2.90304001E-04
+ 7.91257512E-19 1.12352091E-03 0.00000000E+00 4.50494786E-03 0.00000000E+00
+ 7.25749664E-05 1.57829273E-19-3.63109735E-05-6.67036722E-20 1.12396061E-03
+ 0.00000000E+00-5.34069271E-04 0.00000000E+00 1.12396061E-03 0.00000000E+00
+ 7.25749664E-05-1.57829273E-19 8.53835985E-03 0.00000000E+00 1.01231648E-03
+ 0.00000000E+00 5.80972596E-04-9.27277926E-19 7.26689274E-05-1.08985416E-19
+-5.34069271E-04 0.00000000E+00-3.63109735E-05 6.67036722E-20 1.01231648E-03
+ 0.00000000E+00 4.05710802E-03 0.00000000E+00 7.26689274E-05-1.08985416E-19
+ 2.90679001E-04-5.58320476E-19 1.01260399E-03 0.00000000E+00-4.83478011E-04
+ 0.00000000E+00 7.26687164E-05-1.44702286E-19-3.63604477E-05 9.51964654E-20
+-3.63109735E-05-6.67036722E-20-5.34069271E-04 0.00000000E+00 7.26689274E-05
+ 1.08985416E-19 2.90679001E-04 5.58320476E-19 1.01231648E-03 0.00000000E+00
+ 4.05710802E-03 0.00000000E+00 7.26687164E-05 1.44702286E-19-3.63604477E-05
+-9.51964654E-20 1.01260399E-03 0.00000000E+00-4.83478011E-04 0.00000000E+00
+ 7.26687164E-05 1.44702286E-19 1.01260399E-03 0.00000000E+00 5.81764191E-04
+ 1.56241573E-18 7.27730743E-05 2.36083575E-19 7.73065242E-03 0.00000000E+00
+ 9.21308052E-04 0.00000000E+00 1.01260399E-03 0.00000000E+00 7.26687164E-05
+-1.44702286E-19 7.73065242E-03 0.00000000E+00 9.21308052E-04 0.00000000E+00
+ 5.81764191E-04-1.56241573E-18 7.27730743E-05-2.36083575E-19-4.83478011E-04
+ 0.00000000E+00-3.63604477E-05 9.51964654E-20 9.21308052E-04 0.00000000E+00
+ 3.69107618E-03 0.00000000E+00 7.27730743E-05-2.36083575E-19 2.91095602E-04
+-8.89589313E-19 9.21503391E-04 0.00000000E+00-4.41745080E-04 0.00000000E+00
+ 7.27728463E-05-2.32139380E-19-3.64151453E-05 1.06368428E-19 7.27728463E-05
+ 2.32139380E-19 9.21503391E-04 0.00000000E+00 5.82639281E-04 1.70368713E-18
+ 7.28877347E-05 1.93334334E-19 7.06411950E-03 0.00000000E+00 8.45476931E-04
+ 0.00000000E+00 9.21503391E-04 0.00000000E+00 7.27728463E-05-2.32139380E-19
+ 7.06411950E-03 0.00000000E+00 8.45476931E-04 0.00000000E+00 5.82639281E-04
+-1.70368713E-18 7.28877347E-05-1.93334334E-19-3.63604477E-05-9.51964654E-20
+-4.83478011E-04 0.00000000E+00 7.27730743E-05 2.36083575E-19 2.91095602E-04
+ 8.89589313E-19 9.21308052E-04 0.00000000E+00 3.69107618E-03 0.00000000E+00
+ 7.27728463E-05 2.32139380E-19-3.64151453E-05-1.06368428E-19 9.21503391E-04
+ 0.00000000E+00-4.41745080E-04 0.00000000E+00 7.28875110E-05 1.84190981E-19
+ 8.45614190E-04 0.00000000E+00 5.83599508E-04 2.03664784E-18 7.30131388E-05
+ 3.28617652E-19 6.50485425E-03 0.00000000E+00 7.81339357E-04 0.00000000E+00
+-4.41745080E-04 0.00000000E+00-3.64151453E-05 1.06368428E-19 8.45476931E-04
+ 0.00000000E+00 3.38637919E-03 0.00000000E+00 7.28877347E-05-1.93334334E-19
+ 2.91554327E-04-8.19125309E-19 8.45614190E-04 0.00000000E+00-4.06738387E-04
+ 0.00000000E+00 7.28875110E-05-1.84190981E-19-3.64751625E-05 1.28202158E-19
+-3.64151453E-05-1.06368428E-19-4.41745080E-04 0.00000000E+00 7.28877347E-05
+ 1.93334334E-19 2.91554327E-04 8.19125309E-19 8.45476931E-04 0.00000000E+00
+ 3.38637919E-03 0.00000000E+00 7.28875110E-05 1.84190981E-19-3.64751625E-05
+-1.28202158E-19 8.45614190E-04 0.00000000E+00-4.06738387E-04 0.00000000E+00
+ 8.45614190E-04 0.00000000E+00 7.28875110E-05-1.84190981E-19 6.50485425E-03
+ 0.00000000E+00 7.81339357E-04 0.00000000E+00 5.83599508E-04-2.03664784E-18
+ 7.30131388E-05-3.28617652E-19-4.06738387E-04 0.00000000E+00-3.64751625E-05
+ 1.28202158E-19 7.81339357E-04 0.00000000E+00 3.12885444E-03 0.00000000E+00
+ 7.30131388E-05-3.28617652E-19 2.92055999E-04-1.24460224E-18 7.81438457E-04
+ 0.00000000E+00-3.76959722E-04 0.00000000E+00 7.30129146E-05-3.46541010E-19
+-3.65405886E-05 1.32785705E-19-3.64751625E-05-1.28202158E-19-4.06738387E-04
+ 0.00000000E+00 7.30131388E-05 3.28617652E-19 2.92055999E-04 1.24460224E-18
+ 7.81339357E-04 0.00000000E+00 3.12885444E-03 0.00000000E+00 7.30129146E-05
+ 3.46541010E-19-3.65405886E-05-1.32785705E-19 7.81438457E-04 0.00000000E+00
+-3.76959722E-04 0.00000000E+00 7.30129146E-05 3.46541010E-19 7.81438457E-04
+ 0.00000000E+00 5.84646274E-04 2.18002859E-18 7.31494398E-05 1.84601809E-19
+ 6.02900608E-03 0.00000000E+00 7.26400430E-04 0.00000000E+00 7.81438457E-04
+ 0.00000000E+00 7.30129146E-05-3.46541010E-19 6.02900608E-03 0.00000000E+00
+ 7.26400430E-04 0.00000000E+00 5.84646274E-04-2.18002859E-18 7.31494398E-05
+-1.84601809E-19-3.76959722E-04 0.00000000E+00-3.65405886E-05 1.32785705E-19
+ 7.26400430E-04 0.00000000E+00 2.90838824E-03 0.00000000E+00 7.31494398E-05
+-1.84601809E-19 2.92601278E-04-7.63089717E-19 7.26473614E-04 0.00000000E+00
+-3.51325435E-04 0.00000000E+00 7.31492119E-05-1.63856052E-19-3.66115196E-05
+ 9.06397343E-20 7.31492119E-05 1.63856052E-19 7.26473614E-04 0.00000000E+00
+ 5.85781103E-04 1.39773764E-18 7.32968666E-05 1.98702885E-19 5.61931079E-03
+ 0.00000000E+00 6.78828125E-04 0.00000000E+00 7.26473614E-04 0.00000000E+00
+ 7.31492119E-05-1.63856052E-19 5.61931079E-03 0.00000000E+00 6.78828125E-04
+ 0.00000000E+00 5.85781103E-04-1.39773764E-18 7.32968666E-05-1.98702885E-19
+-3.65405886E-05-1.32785705E-19-3.76959722E-04 0.00000000E+00 7.31494398E-05
+ 1.84601809E-19 2.92601278E-04 7.63089717E-19 7.26400430E-04 0.00000000E+00
+ 2.90838824E-03 0.00000000E+00 7.31492119E-05 1.63856052E-19-3.66115196E-05
+-9.06397343E-20 7.26473614E-04 0.00000000E+00-3.51325435E-04 0.00000000E+00
+ 7.32966382E-05 2.06550202E-19 6.78883259E-04 0.00000000E+00 5.87005832E-04
+ 1.72765771E-18 7.34556401E-05 2.26930845E-19 5.26296537E-03 0.00000000E+00
+ 6.37246200E-04 0.00000000E+00-3.51325435E-04 0.00000000E+00-3.66115196E-05
+ 9.06397343E-20 6.78828125E-04 0.00000000E+00 2.71756861E-03 0.00000000E+00
+ 7.32968666E-05-1.98702885E-19 2.93191063E-04-8.08022071E-19 6.78883259E-04
+ 0.00000000E+00-3.29032365E-04 0.00000000E+00 7.32966382E-05-2.06550202E-19
+-3.66880696E-05 1.08370262E-19-3.66115196E-05-9.06397343E-20-3.51325435E-04
+ 0.00000000E+00 7.32968666E-05 1.98702885E-19 2.93191063E-04 8.08022071E-19
+ 6.78828125E-04 0.00000000E+00 2.71756861E-03 0.00000000E+00 7.32966382E-05
+ 2.06550202E-19-3.66880696E-05-1.08370262E-19 6.78883259E-04 0.00000000E+00
+-3.29032365E-04 0.00000000E+00 6.78883259E-04 0.00000000E+00 7.32966382E-05
+-2.06550202E-19 5.26296537E-03 0.00000000E+00 6.37246200E-04 0.00000000E+00
+ 5.87005832E-04-1.72765771E-18 7.34556401E-05-2.26930845E-19-3.29032365E-04
+ 0.00000000E+00-3.66880696E-05 1.08370262E-19 6.37246200E-04 0.00000000E+00
+ 2.55083722E-03 0.00000000E+00 7.34556401E-05-2.26930845E-19 2.93826253E-04
+-9.39821608E-19 6.37288447E-04 0.00000000E+00-3.09472527E-04 0.00000000E+00
+ 7.34554112E-05-2.36090296E-19-3.67703614E-05 1.34558776E-19-3.66880696E-05
+-1.08370262E-19-3.29032365E-04 0.00000000E+00 7.34556401E-05 2.26930845E-19
+ 2.93826253E-04 9.39821608E-19 6.37246200E-04 0.00000000E+00 2.55083722E-03
+ 0.00000000E+00 7.34554112E-05 2.36090296E-19-3.67703614E-05-1.34558776E-19
+ 6.37288447E-04 0.00000000E+00-3.09472527E-04 0.00000000E+00 7.34554112E-05
+ 2.36090296E-19 6.37288447E-04 0.00000000E+00 5.88322431E-04 2.19400249E-18
+ 7.36260344E-05 3.02144806E-19 4.95027334E-03 0.00000000E+00 6.00601663E-04
+ 0.00000000E+00 6.37288447E-04 0.00000000E+00 7.34554112E-05-2.36090296E-19
+ 4.95027334E-03 0.00000000E+00 6.00601663E-04 0.00000000E+00 5.88322431E-04
+-2.19400249E-18 7.36260344E-05-3.02144806E-19-3.09472527E-04 0.00000000E+00
+-3.67703614E-05 1.34558776E-19 6.00601663E-04 0.00000000E+00 2.40394604E-03
+ 0.00000000E+00 7.36260344E-05-3.02144806E-19 2.94507909E-04-1.11868878E-18
+ 6.00634481E-04 0.00000000E+00-2.92177181E-04 0.00000000E+00 7.36258017E-05
+-2.99382734E-19-3.68585216E-05 1.05757241E-19 7.36258017E-05 2.99382734E-19
+ 6.00634481E-04 0.00000000E+00 5.89732908E-04 1.73149361E-18 7.38082848E-05
+ 1.23646230E-19 4.67375581E-03 0.00000000E+00 5.68074243E-04 0.00000000E+00
+ 6.00634481E-04 0.00000000E+00 7.36258017E-05-2.99382734E-19 4.67375581E-03
+ 0.00000000E+00 5.68074243E-04 0.00000000E+00 5.89732908E-04-1.73149361E-18
+ 7.38082848E-05-1.23646230E-19-3.67703614E-05-1.34558776E-19-3.09472527E-04
+ 0.00000000E+00 7.36260344E-05 3.02144806E-19 2.94507909E-04 1.11868878E-18
+ 6.00601663E-04 0.00000000E+00 2.40394604E-03 0.00000000E+00 7.36258017E-05
+ 2.99382734E-19-3.68585216E-05-1.05757241E-19 6.00634481E-04 0.00000000E+00
+-2.92177181E-04 0.00000000E+00 7.38080520E-05 1.00957605E-19 5.68100086E-04
+ 0.00000000E+00 5.91239613E-04 3.46836424E-19 7.40027329E-05 8.82205679E-21
+ 4.42755351E-03 0.00000000E+00 5.39016708E-04 0.00000000E+00-2.92177181E-04
+ 0.00000000E+00-3.68585216E-05 1.05757241E-19 5.68074243E-04 0.00000000E+00
+ 2.27359037E-03 0.00000000E+00 7.38082848E-05-1.23646230E-19 2.95237030E-04
+-4.79358099E-19 5.68100086E-04 0.00000000E+00-2.76779198E-04 0.00000000E+00
+ 7.38080520E-05-1.00957605E-19-3.69526962E-05 2.74449154E-20-3.68585216E-05
+-1.05757241E-19-2.92177181E-04 0.00000000E+00 7.38082848E-05 1.23646230E-19
+ 2.95237030E-04 4.79358099E-19 5.68074243E-04 0.00000000E+00 2.27359037E-03
+ 0.00000000E+00 7.38080520E-05 1.00957605E-19-3.69526962E-05-2.74449154E-20
+ 5.68100086E-04 0.00000000E+00-2.76779198E-04 0.00000000E+00 5.68100086E-04
+ 0.00000000E+00 7.38080520E-05-1.00957605E-19 4.42755351E-03 0.00000000E+00
+ 5.39016708E-04 0.00000000E+00 5.91239613E-04-3.46836424E-19 7.40027329E-05
+-8.82205679E-21 2.14691448E-04 0.00000000E+00 6.06593275E-05-2.11915552E-19
+ 1.70326147E-03 0.00000000E+00 2.11129320E-04 0.00000000E+00 4.86530401E-04
+-1.45145463E-18 6.09723509E-05-1.44803072E-19-3.04079196E-05-8.91796561E-20
+-1.06455192E-04 0.00000000E+00 6.09723509E-05 1.44803072E-19 1.21865303E-04
+ 3.01782260E-19 2.11129320E-04 0.00000000E+00 4.23151561E-04 0.00000000E+00
+ 6.06593275E-05 2.11915552E-19 2.14691448E-04 0.00000000E+00 4.86530401E-04
+ 1.45145463E-18 6.09723509E-05 1.44803072E-19 1.70326147E-03 0.00000000E+00
+ 2.11129320E-04 0.00000000E+00-1.06455192E-04 0.00000000E+00-3.04079196E-05
+ 8.91796561E-20 2.11129320E-04 0.00000000E+00 4.23151561E-04 0.00000000E+00
+ 6.09723509E-05-1.44803072E-19 1.21865303E-04-3.01782260E-19-3.02528068E-05
+-1.02223430E-19-1.08272646E-04 0.00000000E+00 6.06574152E-05 2.10888680E-19
+ 2.42636849E-04 8.17041259E-19 2.14684023E-04 0.00000000E+00 8.58808235E-04
+ 0.00000000E+00 6.06593275E-05 2.11915552E-19-3.04079196E-05-8.91796561E-20
+ 2.14691448E-04 0.00000000E+00-1.06455192E-04 0.00000000E+00 2.18406560E-04
+ 0.00000000E+00 6.03538119E-05-1.98005039E-19 1.73230242E-03 0.00000000E+00
+ 2.14684023E-04 0.00000000E+00 4.84038793E-04-1.65072057E-18 6.06574152E-05
+-2.10888680E-19-1.08272646E-04 0.00000000E+00-3.02528068E-05 1.02223430E-19
+ 2.14684023E-04 0.00000000E+00 8.58808235E-04 0.00000000E+00 6.06574152E-05
+-2.10888680E-19 2.42636849E-04-8.17041259E-19 2.14691448E-04 0.00000000E+00
+-1.06455192E-04 0.00000000E+00 6.06593275E-05-2.11915552E-19-3.04079196E-05
+ 8.91796561E-20 6.03538119E-05 1.98005039E-19 2.18406560E-04 0.00000000E+00
+ 4.84038793E-04 1.65072057E-18 6.06574152E-05 2.10888680E-19 1.73230242E-03
+ 0.00000000E+00 2.14684023E-04 0.00000000E+00 7.96272581E-05 2.59421630E-19
+ 2.96926596E-04 0.00000000E+00 6.39039784E-04 2.00885375E-18 8.01341282E-05
+ 2.50716854E-19 2.34749116E-03 0.00000000E+00 2.89975775E-04 0.00000000E+00
+-1.46725593E-04 0.00000000E+00-3.99403466E-05 1.27534621E-19 2.89975775E-04
+ 0.00000000E+00 1.01760462E-03 0.00000000E+00 8.01341282E-05-2.50716854E-19
+ 2.80927199E-04-9.08863458E-19 2.18406560E-04 0.00000000E+00-1.08272646E-04
+ 0.00000000E+00 6.03538119E-05-1.98005039E-19-3.02528068E-05 1.02223430E-19
+-3.99403466E-05-1.27534621E-19-1.46725593E-04 0.00000000E+00 8.01341282E-05
+ 2.50716854E-19 2.80927199E-04 9.08863458E-19 2.89975775E-04 0.00000000E+00
+ 1.01760462E-03 0.00000000E+00 6.03538119E-05 1.98005039E-19-3.02528068E-05
+-1.02223430E-19 2.18406560E-04 0.00000000E+00-1.08272646E-04 0.00000000E+00
+ 2.96926596E-04 0.00000000E+00 7.96272581E-05-2.59421630E-19 2.34749116E-03
+ 0.00000000E+00 2.89975775E-04 0.00000000E+00 6.39039784E-04-2.00885375E-18
+ 8.01341282E-05-2.50716854E-19 7.91435571E-05 2.54346782E-19 3.04320363E-04
+ 0.00000000E+00 6.35075183E-04 2.13773822E-18 7.96270880E-05 2.73159155E-19
+ 2.40484179E-03 0.00000000E+00 2.96924047E-04 0.00000000E+00-1.50311103E-04
+ 0.00000000E+00-3.96926613E-05 1.31876484E-19 2.96924047E-04 0.00000000E+00
+ 1.18786032E-03 0.00000000E+00 7.96270880E-05-2.73159155E-19 3.18517009E-04
+-1.05524314E-18 2.96926596E-04 0.00000000E+00-1.46725593E-04 0.00000000E+00
+ 7.96272581E-05-2.59421630E-19-3.99403466E-05 1.27534621E-19-3.96926613E-05
+-1.31876484E-19-1.50311103E-04 0.00000000E+00 7.96270880E-05 2.73159155E-19
+ 3.18517009E-04 1.05524314E-18 2.96924047E-04 0.00000000E+00 1.18786032E-03
+ 0.00000000E+00 7.96272581E-05 2.59421630E-19-3.99403466E-05-1.27534621E-19
+ 2.96926596E-04 0.00000000E+00-1.46725593E-04 0.00000000E+00 3.04320363E-04
+ 0.00000000E+00 7.91435571E-05-2.54346782E-19 2.40484179E-03 0.00000000E+00
+ 2.96924047E-04 0.00000000E+00 6.35075183E-04-2.13773822E-18 7.96270880E-05
+-2.73159155E-19 7.86844880E-05 2.51702607E-19 3.12206384E-04 0.00000000E+00
+ 6.31307374E-04 1.94264770E-18 7.91439743E-05 2.42481483E-19 2.46596012E-03
+ 0.00000000E+00 3.04319873E-04 0.00000000E+00-1.54131564E-04 0.00000000E+00
+-3.94571156E-05 1.23546023E-19 3.04319873E-04 0.00000000E+00 1.21745555E-03
+ 0.00000000E+00 7.91439743E-05-2.42481483E-19 3.16583654E-04-1.00349649E-18
+ 3.04320363E-04 0.00000000E+00-1.50311103E-04 0.00000000E+00 7.91435571E-05
+-2.54346782E-19-3.96926613E-05 1.31876484E-19-3.94571156E-05-1.23546023E-19
+-1.54131564E-04 0.00000000E+00 7.91439743E-05 2.42481483E-19 3.16583654E-04
+ 1.00349649E-18 3.04319873E-04 0.00000000E+00 1.21745555E-03 0.00000000E+00
+ 7.91435571E-05 2.54346782E-19-3.96926613E-05-1.31876484E-19 3.04320363E-04
+ 0.00000000E+00-1.50311103E-04 0.00000000E+00 3.12206384E-04 0.00000000E+00
+ 7.86844880E-05-2.51702607E-19 2.46596012E-03 0.00000000E+00 3.04319873E-04
+ 0.00000000E+00 6.31307374E-04-1.94264770E-18 7.91439743E-05-2.42481483E-19
+ 7.82476655E-05 3.58714096E-19 3.20621826E-04 0.00000000E+00 6.27723377E-04
+ 2.48099194E-18 7.86847495E-05 2.57655201E-19 2.53114956E-03 0.00000000E+00
+ 3.12205094E-04 0.00000000E+00-1.58206730E-04 0.00000000E+00-3.92331038E-05
+ 1.54092324E-19 3.12205094E-04 0.00000000E+00 1.24901231E-03 0.00000000E+00
+ 7.86847495E-05-2.57655201E-19 3.14746475E-04-1.05101002E-18 3.12206384E-04
+ 0.00000000E+00-1.54131564E-04 0.00000000E+00 7.86844880E-05-2.51702607E-19
+-3.94571156E-05 1.23546023E-19-3.92331038E-05-1.54092324E-19-1.58206730E-04
+ 0.00000000E+00 7.86847495E-05 2.57655201E-19 3.14746475E-04 1.05101002E-18
+ 3.12205094E-04 0.00000000E+00 1.24901231E-03 0.00000000E+00 7.86844880E-05
+ 2.51702607E-19-3.94571156E-05-1.23546023E-19 3.12206384E-04 0.00000000E+00
+-1.54131564E-04 0.00000000E+00 3.20621826E-04 0.00000000E+00 7.82476655E-05
+-3.58714096E-19 2.53114956E-03 0.00000000E+00 3.12205094E-04 0.00000000E+00
+ 6.27723377E-04-2.48099194E-18 7.86847495E-05-2.57655201E-19 7.78322240E-05
+ 2.08933904E-19 3.29614774E-04 0.00000000E+00 6.24314774E-04 2.38290838E-18
+ 7.82479558E-05 3.70549476E-19 2.60076848E-03 0.00000000E+00 3.20620423E-04
+ 0.00000000E+00-1.62558799E-04 0.00000000E+00-3.90200449E-05 1.44870845E-19
+ 3.20620423E-04 0.00000000E+00 1.28269079E-03 0.00000000E+00 7.82479558E-05
+-3.70549476E-19 3.12998870E-04-1.36681858E-18 3.20621826E-04 0.00000000E+00
+-1.58206730E-04 0.00000000E+00 7.82476655E-05-3.58714096E-19-3.92331038E-05
+ 1.54092324E-19-3.90200449E-05-1.44870845E-19-1.62558799E-04 0.00000000E+00
+ 7.82479558E-05 3.70549476E-19 3.12998870E-04 1.36681858E-18 3.20620423E-04
+ 0.00000000E+00 1.28269079E-03 0.00000000E+00 7.82476655E-05 3.58714096E-19
+-3.92331038E-05-1.54092324E-19 3.20621826E-04 0.00000000E+00-1.58206730E-04
+ 0.00000000E+00 3.29614774E-04 0.00000000E+00 7.78322240E-05-2.08933904E-19
+ 2.60076848E-03 0.00000000E+00 3.20620423E-04 0.00000000E+00 6.24314774E-04
+-2.38290838E-18 7.82479558E-05-3.70549476E-19 7.74370958E-05 1.12123942E-19
+ 3.39238444E-04 0.00000000E+00 6.21072714E-04 1.02612150E-18 7.78325003E-05
+ 1.76745171E-19 2.67521734E-03 0.00000000E+00 3.29613039E-04 0.00000000E+00
+-1.67212871E-04 0.00000000E+00-3.88173990E-05 7.22172781E-20 3.29613039E-04
+ 0.00000000E+00 1.31868100E-03 0.00000000E+00 7.78325003E-05-1.76745171E-19
+ 3.11336709E-04-8.06254492E-19 3.29614774E-04 0.00000000E+00-1.62558799E-04
+ 0.00000000E+00 7.78322240E-05-2.08933904E-19-3.90200449E-05 1.44870845E-19
+-3.88173990E-05-7.22172781E-20-1.67212871E-04 0.00000000E+00 7.78325003E-05
+ 1.76745171E-19 3.11336709E-04 8.06254492E-19 3.29613039E-04 0.00000000E+00
+ 1.31868100E-03 0.00000000E+00 7.78322240E-05 2.08933904E-19-3.90200449E-05
+-1.44870845E-19 3.29614774E-04 0.00000000E+00-1.62558799E-04 0.00000000E+00
+ 3.39238444E-04 0.00000000E+00 7.74370958E-05-1.12123942E-19 2.67521734E-03
+ 0.00000000E+00 3.29613039E-04 0.00000000E+00 6.21072714E-04-1.02612150E-18
+ 7.78325003E-05-1.76745171E-19-1.72197455E-04 0.00000000E+00-3.86246740E-05
+ 1.55625796E-19 3.39236367E-04 0.00000000E+00 1.35719665E-03 0.00000000E+00
+ 7.74373684E-05-1.51479002E-19 3.09755846E-04-6.56074923E-19 3.39238444E-04
+ 0.00000000E+00-1.67212871E-04 0.00000000E+00 7.74370958E-05-1.12123942E-19
+-3.88173990E-05 7.22172781E-20 7.70613276E-05 4.71024180E-19 3.49553453E-04
+ 0.00000000E+00 6.17989374E-04 2.60308139E-18 7.74373684E-05 1.51479002E-19
+ 2.75495220E-03 0.00000000E+00 3.39236367E-04 0.00000000E+00 3.49553453E-04
+ 0.00000000E+00 7.70613276E-05-4.71024180E-19 2.75495220E-03 0.00000000E+00
+ 3.39236367E-04 0.00000000E+00 6.17989374E-04-2.60308139E-18 7.74373684E-05
+-1.51479002E-19-3.86246740E-05-1.55625796E-19-1.72197455E-04 0.00000000E+00
+ 7.74373684E-05 1.51479002E-19 3.09755846E-04 6.56074923E-19 3.39236367E-04
+ 0.00000000E+00 1.35719665E-03 0.00000000E+00 7.74370958E-05 1.12123942E-19
+-3.88173990E-05-7.22172781E-20 3.39238444E-04 0.00000000E+00-1.67212871E-04
+ 0.00000000E+00 7.67040762E-05 5.80547583E-20 3.60629146E-04 0.00000000E+00
+ 6.15057503E-04 1.89609337E-18 7.70615940E-05 4.33841430E-19 2.84049214E-03
+ 0.00000000E+00 3.49550957E-04 0.00000000E+00-1.77545026E-04 0.00000000E+00
+-3.84414176E-05 1.22974047E-19 3.49550957E-04 0.00000000E+00 1.39848064E-03
+ 0.00000000E+00 7.70615940E-05-4.33841430E-19 3.08252460E-04-1.57547897E-18
+ 3.49553453E-04 0.00000000E+00-1.72197455E-04 0.00000000E+00 7.70613276E-05
+-4.71024180E-19-3.86246740E-05 1.55625796E-19-3.84414176E-05-1.22974047E-19
+-1.77545026E-04 0.00000000E+00 7.70615940E-05 4.33841430E-19 3.08252460E-04
+ 1.57547897E-18 3.49550957E-04 0.00000000E+00 1.39848064E-03 0.00000000E+00
+ 7.70613276E-05 4.71024180E-19-3.86246740E-05-1.55625796E-19 3.49553453E-04
+ 0.00000000E+00-1.72197455E-04 0.00000000E+00 3.60629146E-04 0.00000000E+00
+ 7.67040762E-05-5.80547583E-20 2.84049214E-03 0.00000000E+00 3.49550957E-04
+ 0.00000000E+00 6.15057503E-04-1.89609337E-18 7.70615940E-05-4.33841430E-19
+-1.83292753E-04 0.00000000E+00-3.82672213E-05 1.27081310E-19 3.60626165E-04
+ 0.00000000E+00 1.44281079E-03 0.00000000E+00 7.67043391E-05-8.48884992E-20
+ 3.06823162E-04-5.29741474E-19 3.60629146E-04 0.00000000E+00-1.77545026E-04
+ 0.00000000E+00 7.67040762E-05-5.80547583E-20-3.84414176E-05 1.22974047E-19
+-3.82672213E-05-1.27081310E-19-1.83292753E-04 0.00000000E+00 7.67043391E-05
+ 8.48884992E-20 3.06823162E-04 5.29741474E-19 3.60626165E-04 0.00000000E+00
+ 1.44281079E-03 0.00000000E+00 7.67040762E-05 5.80547583E-20-3.84414176E-05
+-1.22974047E-19 3.60629146E-04 0.00000000E+00-1.77545026E-04 0.00000000E+00
+ 7.63645460E-05 4.23436741E-19 3.72544847E-04 0.00000000E+00 6.12270583E-04
+ 2.03875790E-18 7.67043391E-05 8.48884992E-20 2.93243150E-03 0.00000000E+00
+ 3.60626165E-04 0.00000000E+00 3.72544847E-04 0.00000000E+00 7.63645460E-05
+-4.23436741E-19 2.93243150E-03 0.00000000E+00 3.60626165E-04 0.00000000E+00
+ 6.12270583E-04-2.03875790E-18 7.67043391E-05-8.48884992E-20-1.89483264E-04
+ 0.00000000E+00-3.81017018E-05 1.74314816E-19 3.72541280E-04 0.00000000E+00
+ 1.49050504E-03 0.00000000E+00 7.63648045E-05-4.26180520E-19 3.05464770E-04
+-1.52681598E-18 3.72544847E-04 0.00000000E+00-1.83292753E-04 0.00000000E+00
+ 7.63645460E-05-4.23436741E-19-3.82672213E-05 1.27081310E-19 7.60420025E-05
+ 2.71078746E-19 3.85391775E-04 0.00000000E+00 6.09622471E-04 2.88074516E-18
+ 7.63648045E-05 4.26180520E-19 3.03145166E-03 0.00000000E+00 3.72541280E-04
+ 0.00000000E+00 3.85391775E-04 0.00000000E+00 7.60420025E-05-2.71078746E-19
+ 3.03145166E-03 0.00000000E+00 3.72541280E-04 0.00000000E+00 6.09622471E-04
+-2.88074516E-18 7.63648045E-05-4.26180520E-19-3.81017018E-05-1.74314816E-19
+-1.89483264E-04 0.00000000E+00 7.63648045E-05 4.26180520E-19 3.05464770E-04
+ 1.52681598E-18 3.72541280E-04 0.00000000E+00 1.49050504E-03 0.00000000E+00
+ 7.63645460E-05 4.23436741E-19-3.82672213E-05-1.27081310E-19 3.72544847E-04
+ 0.00000000E+00-1.83292753E-04 0.00000000E+00 7.57357700E-05 1.27061470E-19
+ 3.99275362E-04 0.00000000E+00 6.07107544E-04 1.36244647E-18 7.60422581E-05
+ 2.39031309E-19 3.13833852E-03 0.00000000E+00 3.85387511E-04 0.00000000E+00
+-1.96165718E-04 0.00000000E+00-3.79445070E-05 9.15231948E-20 3.85387511E-04
+ 0.00000000E+00 1.54192905E-03 0.00000000E+00 7.60422581E-05-2.39031309E-19
+ 3.04174348E-04-1.03595016E-18 3.85391775E-04 0.00000000E+00-1.89483264E-04
+ 0.00000000E+00 7.60420025E-05-2.71078746E-19-3.81017018E-05 1.74314816E-19
+-3.79445070E-05-9.15231948E-20-1.96165718E-04 0.00000000E+00 7.60422581E-05
+ 2.39031309E-19 3.04174348E-04 1.03595016E-18 3.85387511E-04 0.00000000E+00
+ 1.54192905E-03 0.00000000E+00 7.60420025E-05 2.71078746E-19-3.81017018E-05
+-1.74314816E-19 3.85391775E-04 0.00000000E+00-1.89483264E-04 0.00000000E+00
+ 3.99275362E-04 0.00000000E+00 7.57357700E-05-1.27061470E-19 3.13833852E-03
+ 0.00000000E+00 3.85387511E-04 0.00000000E+00 6.07107544E-04-1.36244647E-18
+ 7.60422581E-05-2.39031309E-19-2.03397069E-04 0.00000000E+00-3.77953126E-05
+ 9.16564431E-20 3.99270242E-04 0.00000000E+00 1.59750546E-03 0.00000000E+00
+ 7.57360200E-05-1.66253623E-19 3.02949187E-04-6.38816820E-19 3.99275362E-04
+ 0.00000000E+00-1.96165718E-04 0.00000000E+00 7.57357700E-05-1.27061470E-19
+-3.79445070E-05 9.15231948E-20-3.77953126E-05-9.16564431E-20-2.03397069E-04
+ 0.00000000E+00 7.57360200E-05 1.66253623E-19 3.02949187E-04 6.38816820E-19
+ 3.99270242E-04 0.00000000E+00 1.59750546E-03 0.00000000E+00 7.57357700E-05
+ 1.27061470E-19-3.79445070E-05-9.15231948E-20 3.99275362E-04 0.00000000E+00
+-1.96165718E-04 0.00000000E+00 7.54452306E-05 2.00372150E-19 4.14318035E-04
+ 0.00000000E+00 6.04720596E-04 1.54474102E-18 7.57360200E-05 1.66253623E-19
+ 3.25400233E-03 0.00000000E+00 3.99270242E-04 0.00000000E+00 4.14318035E-04
+ 0.00000000E+00 7.54452306E-05-2.00372150E-19 3.25400233E-03 0.00000000E+00
+ 3.99270242E-04 0.00000000E+00 6.04720596E-04-1.54474102E-18 7.57360200E-05
+-1.66253623E-19-2.11243682E-04 0.00000000E+00-3.76538272E-05 6.20176414E-20
+ 4.14311898E-04 0.00000000E+00 1.65772526E-03 0.00000000E+00 7.54454813E-05
+-1.65756107E-19 3.01786829E-04-6.89024582E-19 4.14318035E-04 0.00000000E+00
+-2.03397069E-04 0.00000000E+00 7.54452306E-05-2.00372150E-19-3.77953126E-05
+ 9.16564431E-20 7.51698276E-05 8.23144585E-20 4.30662828E-04 0.00000000E+00
+ 6.02456994E-04 9.23474648E-19 7.54454813E-05 1.65756107E-19 3.37950392E-03
+ 0.00000000E+00 4.14311898E-04 0.00000000E+00 4.30662828E-04 0.00000000E+00
+ 7.51698276E-05-8.23144585E-20 3.37950392E-03 0.00000000E+00 4.14311898E-04
+ 0.00000000E+00 6.02456994E-04-9.23474648E-19 7.54454813E-05-1.65756107E-19
+-3.76538272E-05-6.20176414E-20-2.11243682E-04 0.00000000E+00 7.54454813E-05
+ 1.65756107E-19 3.01786829E-04 6.89024582E-19 4.14311898E-04 0.00000000E+00
+ 1.65772526E-03 0.00000000E+00 7.54452306E-05 2.00372150E-19-3.77953126E-05
+-9.16564431E-20 4.14318035E-04 0.00000000E+00-2.03397069E-04 0.00000000E+00
+ 7.49090109E-05 2.82564308E-19 4.48477606E-04 0.00000000E+00 6.00312236E-04
+ 1.43597767E-18 7.51700730E-05 8.76795328E-20 3.51608496E-03 0.00000000E+00
+ 4.30655417E-04 0.00000000E+00-2.19783256E-04 0.00000000E+00-3.75197710E-05
+ 9.25609601E-20 4.30655417E-04 0.00000000E+00 1.72316193E-03 0.00000000E+00
+ 7.51700730E-05-8.76795328E-20 3.00685012E-04-4.41861034E-19 4.30662828E-04
+ 0.00000000E+00-2.11243682E-04 0.00000000E+00 7.51698276E-05-8.23144585E-20
+-3.76538272E-05 6.20176414E-20-3.75197710E-05-9.25609601E-20-2.19783256E-04
+ 0.00000000E+00 7.51700730E-05 8.76795328E-20 3.00685012E-04 4.41861034E-19
+ 4.30655417E-04 0.00000000E+00 1.72316193E-03 0.00000000E+00 7.51698276E-05
+ 8.23144585E-20-3.76538272E-05-6.20176414E-20 4.30662828E-04 0.00000000E+00
+-2.11243682E-04 0.00000000E+00 4.48477606E-04 0.00000000E+00 7.49090109E-05
+-2.82564308E-19 3.51608496E-03 0.00000000E+00 4.30655417E-04 0.00000000E+00
+ 6.00312236E-04-1.43597767E-18 7.51700730E-05-8.76795328E-20-2.29107412E-04
+ 0.00000000E+00-3.73928893E-05 1.33711675E-19 4.48468635E-04 0.00000000E+00
+ 1.79448896E-03 0.00000000E+00 7.49092552E-05-3.36018317E-19 2.99641571E-04
+-1.11531980E-18 4.48477606E-04 0.00000000E+00-2.19783256E-04 0.00000000E+00
+ 7.49090109E-05-2.82564308E-19-3.75197710E-05 9.25609601E-20-3.73928893E-05
+-1.33711675E-19-2.29107412E-04 0.00000000E+00 7.49092552E-05 3.36018317E-19
+ 2.99641571E-04 1.11531980E-18 4.48468635E-04 0.00000000E+00 1.79448896E-03
+ 0.00000000E+00 7.49090109E-05 2.82564308E-19-3.75197710E-05-9.25609601E-20
+ 4.48477606E-04 0.00000000E+00-2.19783256E-04 0.00000000E+00 7.46623019E-05
+ 1.98828385E-19 4.67961014E-04 0.00000000E+00 5.98282265E-04 2.32506205E-18
+ 7.49092552E-05 3.36018317E-19 3.66520960E-03 0.00000000E+00 4.48468635E-04
+ 0.00000000E+00 4.67961014E-04 0.00000000E+00 7.46623019E-05-1.98828385E-19
+ 3.66520960E-03 0.00000000E+00 4.48468635E-04 0.00000000E+00 5.98282265E-04
+-2.32506205E-18 7.49092552E-05-3.36018317E-19-2.39324912E-04 0.00000000E+00
+-3.72729483E-05 6.73834721E-20 4.67950087E-04 0.00000000E+00 1.87250329E-03
+ 0.00000000E+00 7.46625429E-05-1.02779359E-19 2.98654568E-04-6.77568961E-19
+ 4.67961014E-04 0.00000000E+00-2.29107412E-04 0.00000000E+00 7.46623019E-05
+-1.98828385E-19-3.73928893E-05 1.33711675E-19 7.44292501E-05 1.66754529E-19
+ 4.89349560E-04 0.00000000E+00 5.96363329E-04 8.45589705E-19 7.46625429E-05
+ 1.02779359E-19 3.82861564E-03 0.00000000E+00 4.67950087E-04 0.00000000E+00
+ 4.89349560E-04 0.00000000E+00 7.44292501E-05-1.66754529E-19 3.82861564E-03
+ 0.00000000E+00 4.67950087E-04 0.00000000E+00 5.96363329E-04-8.45589705E-19
+ 7.46625429E-05-1.02779359E-19-3.72729483E-05-6.73834721E-20-2.39324912E-04
+ 0.00000000E+00 7.46625429E-05 1.02779359E-19 2.98654568E-04 6.77568961E-19
+ 4.67950087E-04 0.00000000E+00 1.87250329E-03 0.00000000E+00 7.46623019E-05
+ 1.98828385E-19-3.73928893E-05-1.33711675E-19 4.67961014E-04 0.00000000E+00
+-2.29107412E-04 0.00000000E+00 7.42094428E-05 2.85146593E-19 5.12927099E-04
+ 0.00000000E+00 5.94552003E-04 2.36379438E-18 7.44294899E-05 2.58606043E-19
+ 4.00838103E-03 0.00000000E+00 4.89336176E-04 0.00000000E+00-2.50565819E-04
+ 0.00000000E+00-3.71597332E-05 1.35938159E-19 4.89336176E-04 0.00000000E+00
+ 1.95815412E-03 0.00000000E+00 7.44294899E-05-2.58606043E-19 2.97722210E-04
+-8.36905908E-19 4.89349560E-04 0.00000000E+00-2.39324912E-04 0.00000000E+00
+ 7.44292501E-05-1.66754529E-19-3.72729483E-05 6.73834721E-20-3.71597332E-05
+-1.35938159E-19-2.50565819E-04 0.00000000E+00 7.44294899E-05 2.58606043E-19
+ 2.97722210E-04 8.36905908E-19 4.89336176E-04 0.00000000E+00 1.95815412E-03
+ 0.00000000E+00 7.44292501E-05 1.66754529E-19-3.72729483E-05-6.73834721E-20
+ 4.89349560E-04 0.00000000E+00-2.39324912E-04 0.00000000E+00 5.12927099E-04
+ 0.00000000E+00 7.42094428E-05-2.85146593E-19 4.00838103E-03 0.00000000E+00
+ 4.89336176E-04 0.00000000E+00 5.94552003E-04-2.36379438E-18 7.44294899E-05
+-2.58606043E-19-2.76779198E-04 0.00000000E+00-3.69526962E-05 2.74449154E-20
+ 5.39016708E-04 0.00000000E+00 2.15716390E-03 0.00000000E+00 7.40027329E-05
+-8.82205679E-21 2.96014925E-04-1.70626753E-19 5.39037271E-04 0.00000000E+00
+-2.62986962E-04 0.00000000E+00 7.40024971E-05-2.08657907E-20-3.70530442E-05
+ 6.54360816E-20-3.69526962E-05-2.74449154E-20-2.76779198E-04 0.00000000E+00
+ 7.40027329E-05 8.82205679E-21 2.96014925E-04 1.70626753E-19 5.39016708E-04
+ 0.00000000E+00 2.15716390E-03 0.00000000E+00 7.40024971E-05 2.08657907E-20
+-3.70530442E-05-6.54360816E-20 5.39037271E-04 0.00000000E+00-2.62986962E-04
+ 0.00000000E+00-2.62986962E-04 0.00000000E+00-3.70530442E-05 6.54360816E-20
+ 5.12910576E-04 0.00000000E+00 2.05258097E-03 0.00000000E+00 7.42096798E-05
+-2.40878536E-19 2.96842840E-04-9.63050978E-19 5.12927099E-04 0.00000000E+00
+-2.50565819E-04 0.00000000E+00 7.42094428E-05-2.85146593E-19-3.71597332E-05
+ 1.35938159E-19-3.70530442E-05-6.54360816E-20-2.62986962E-04 0.00000000E+00
+ 7.42096798E-05 2.40878536E-19 2.96842840E-04 9.63050978E-19 5.12910576E-04
+ 0.00000000E+00 2.05258097E-03 0.00000000E+00 7.42094428E-05 2.85146593E-19
+-3.71597332E-05-1.35938159E-19 5.12927099E-04 0.00000000E+00-2.50565819E-04
+ 0.00000000E+00 7.40024971E-05 2.08657907E-20 5.39037271E-04 0.00000000E+00
+ 5.92845084E-04 1.00559325E-18 7.42096798E-05 2.40878536E-19 4.20701092E-03
+ 0.00000000E+00 5.12910576E-04 0.00000000E+00 5.39037271E-04 0.00000000E+00
+ 7.40024971E-05-2.08657907E-20 4.20701092E-03 0.00000000E+00 5.12910576E-04
+ 0.00000000E+00 5.92845084E-04-1.00559325E-18 7.42096798E-05-2.40878536E-19
+ 2.52505826E-01 0.00000000E+00 1.44380768E-04-1.11464849E-18 1.01002561E-01
+ 0.00000000E+00-2.52507036E-02 0.00000000E+00 7.21908598E-05-6.04225745E-19
+-3.60938437E-05 2.08311261E-19 7.21908598E-05 6.04225745E-19 1.01002561E-01
+ 0.00000000E+00 5.77496419E-04 3.33299100E-18 7.21845152E-05 2.29019301E-19
+ 2.02007605E-01 0.00000000E+00 2.53673071E-07 0.00000000E+00 1.01002561E-01
+ 0.00000000E+00 7.21908598E-05-6.04225745E-19 2.02007605E-01 0.00000000E+00
+ 2.53673071E-07 0.00000000E+00 5.77496419E-04-3.33299100E-18 7.21845152E-05
+-2.29019301E-19 1.44380768E-04 1.11464849E-18 2.52505826E-01 0.00000000E+00
+ 7.21908598E-05 6.04225745E-19-3.60938437E-05-2.08311261E-19 1.01002561E-01
+ 0.00000000E+00-2.52507036E-02 0.00000000E+00 7.21848291E-05 1.92005693E-19
+ 9.43971392E-03 0.00000000E+00 5.77535624E-04 8.14182850E-19 7.21999873E-05
+ 5.51035468E-20 5.47526269E-02 0.00000000E+00 4.72042869E-03 0.00000000E+00
+-2.52507036E-02 0.00000000E+00-3.60938437E-05 2.08311261E-19 2.53673071E-07
+ 0.00000000E+00 4.34227697E-02 0.00000000E+00 7.21845152E-05-2.29019301E-19
+ 2.88746182E-04-9.30265833E-19 9.43971392E-03 0.00000000E+00-3.54003565E-03
+ 0.00000000E+00 7.21848291E-05-1.92005693E-19-3.60962041E-05 6.17773099E-20
+-3.60938437E-05-2.08311261E-19-2.52507036E-02 0.00000000E+00 7.21845152E-05
+ 2.29019301E-19 2.88746182E-04 9.30265833E-19 2.53673071E-07 0.00000000E+00
+ 4.34227697E-02 0.00000000E+00 7.21848291E-05 1.92005693E-19-3.60962041E-05
+-6.17773099E-20 9.43971392E-03 0.00000000E+00-3.54003565E-03 0.00000000E+00
+ 9.43971392E-03 0.00000000E+00 7.21848291E-05-1.92005693E-19 5.47526269E-02
+ 0.00000000E+00 4.72042869E-03 0.00000000E+00 5.77535624E-04-8.14182850E-19
+ 7.21999873E-05-5.51035468E-20 7.21998374E-05 1.10659477E-19 4.93416001E-03
+ 0.00000000E+00 5.77693717E-04 1.64036732E-18 7.22242578E-05 2.79151031E-19
+ 3.25146790E-02 0.00000000E+00 3.29011431E-03 0.00000000E+00-3.54003565E-03
+ 0.00000000E+00-3.60962041E-05 6.17773099E-20 4.72042869E-03 0.00000000E+00
+ 2.04000208E-02 0.00000000E+00 7.21999873E-05-5.51035468E-20 2.88802971E-04
+-4.37747071E-19 4.93416001E-03 0.00000000E+00-2.05606858E-03 0.00000000E+00
+ 7.21998374E-05-1.10659477E-19-3.61060238E-05 9.74526269E-20-3.60962041E-05
+-6.17773099E-20-3.54003565E-03 0.00000000E+00 7.21999873E-05 5.51035468E-20
+ 2.88802971E-04 4.37747071E-19 4.72042869E-03 0.00000000E+00 2.04000208E-02
+ 0.00000000E+00 7.21998374E-05 1.10659477E-19-3.61060238E-05-9.74526269E-20
+ 4.93416001E-03 0.00000000E+00-2.05606858E-03 0.00000000E+00 4.93416001E-03
+ 0.00000000E+00 7.21998374E-05-1.10659477E-19 3.25146790E-02 0.00000000E+00
+ 3.29011431E-03 0.00000000E+00 5.77693717E-04-1.64036732E-18 7.22242578E-05
+-2.79151031E-19 7.22240354E-05 2.52104109E-19 3.32839305E-03 0.00000000E+00
+ 5.77925427E-04 1.71412575E-18 7.22580148E-05 1.81266360E-19 2.31644755E-02
+ 0.00000000E+00 2.49697619E-03 0.00000000E+00-2.05606858E-03 0.00000000E+00
+-3.61060238E-05 9.74526269E-20 3.29011431E-03 0.00000000E+00 1.35268909E-02
+ 0.00000000E+00 7.22242578E-05-2.79151031E-19 2.88900003E-04-9.77664255E-19
+ 3.32839305E-03 0.00000000E+00-1.45634231E-03 0.00000000E+00 7.22240354E-05
+-2.52104109E-19-3.61205126E-05 1.08342617E-19-3.61060238E-05-9.74526269E-20
+-2.05606858E-03 0.00000000E+00 7.22242578E-05 2.79151031E-19 2.88900003E-04
+ 9.77664255E-19 3.29011431E-03 0.00000000E+00 1.35268909E-02 0.00000000E+00
+ 7.22240354E-05 2.52104109E-19-3.61205126E-05-1.08342617E-19 3.32839305E-03
+ 0.00000000E+00-1.45634231E-03 0.00000000E+00 3.32839305E-03 0.00000000E+00
+ 7.22240354E-05-2.52104109E-19 2.31644755E-02 0.00000000E+00 2.49697619E-03
+ 0.00000000E+00 5.77925427E-04-1.71412575E-18 7.22580148E-05-1.81266360E-19
+ 7.22577994E-05 1.92214225E-19 2.50870136E-03 0.00000000E+00 5.78234767E-04
+ 1.55462165E-18 7.23015919E-05 1.93065849E-19 1.80014525E-02 0.00000000E+00
+ 2.00766466E-03 0.00000000E+00-1.45634231E-03 0.00000000E+00-3.61205126E-05
+ 1.08342617E-19 2.49697619E-03 0.00000000E+00 1.01293045E-02 0.00000000E+00
+ 7.22580148E-05-1.81266360E-19 2.89035132E-04-7.72819711E-19 2.50870136E-03
+ 0.00000000E+00-1.12909150E-03 0.00000000E+00 7.22577994E-05-1.92214225E-19
+-3.61398478E-05 9.63200184E-20-3.61205126E-05-1.08342617E-19-1.45634231E-03
+ 0.00000000E+00 7.22580148E-05 1.81266360E-19 2.89035132E-04 7.72819711E-19
+ 2.49697619E-03 0.00000000E+00 1.01293045E-02 0.00000000E+00 7.22577994E-05
+ 1.92214225E-19-3.61398478E-05-9.63200184E-20 2.50870136E-03 0.00000000E+00
+-1.12909150E-03 0.00000000E+00 2.50870136E-03 0.00000000E+00 7.22577994E-05
+-1.92214225E-19 1.80014525E-02 0.00000000E+00 2.00766466E-03 0.00000000E+00
+ 5.78234767E-04-1.55462165E-18 7.23015919E-05-1.93065849E-19 7.23013690E-05
+ 1.80471453E-19 2.01239456E-03 0.00000000E+00 5.78622637E-04 1.49071301E-18
+ 7.23549998E-05 2.01852945E-19 1.47254906E-02 0.00000000E+00 1.67771234E-03
+ 0.00000000E+00-1.12909150E-03 0.00000000E+00-3.61398478E-05 9.63200184E-20
+ 2.00766466E-03 0.00000000E+00 8.09952173E-03 0.00000000E+00 7.23015919E-05
+-1.93065849E-19 2.89209436E-04-7.54041549E-19 2.01239456E-03 0.00000000E+00
+-9.22526724E-04 0.00000000E+00 7.23013690E-05-1.80471453E-19-3.61640922E-05
+ 9.55810994E-20-3.61398478E-05-9.63200184E-20-1.12909150E-03 0.00000000E+00
+ 7.23015919E-05 1.93065849E-19 2.89209436E-04 7.54041549E-19 2.00766466E-03
+ 0.00000000E+00 8.09952173E-03 0.00000000E+00 7.23013690E-05 1.80471453E-19
+-3.61640922E-05-9.55810994E-20 2.01239456E-03 0.00000000E+00-9.22526724E-04
+ 0.00000000E+00 2.01239456E-03 0.00000000E+00 7.23013690E-05-1.80471453E-19
+ 1.47254906E-02 0.00000000E+00 1.67771234E-03 0.00000000E+00 5.78622637E-04
+-1.49071301E-18 7.23549998E-05-2.01852945E-19 7.23547916E-05 2.15314754E-19
+ 1.67997372E-03 0.00000000E+00 5.79089697E-04 2.01231867E-18 7.24183382E-05
+ 2.83129479E-19 1.24615926E-02 0.00000000E+00 1.44070505E-03 0.00000000E+00
+-9.22526724E-04 0.00000000E+00-3.61640922E-05 9.55810994E-20 1.67771234E-03
+ 0.00000000E+00 6.74944581E-03 0.00000000E+00 7.23549998E-05-2.01852945E-19
+ 2.89423124E-04-8.51336740E-19 1.67997372E-03 0.00000000E+00-7.80169692E-04
+ 0.00000000E+00 7.23547916E-05-2.15314754E-19-3.61932824E-05 1.24611058E-19
+-3.61640922E-05-9.55810994E-20-9.22526724E-04 0.00000000E+00 7.23549998E-05
+ 2.01852945E-19 2.89423124E-04 8.51336740E-19 1.67771234E-03 0.00000000E+00
+ 6.74944581E-03 0.00000000E+00 7.23547916E-05 2.15314754E-19-3.61932824E-05
+-1.24611058E-19 1.67997372E-03 0.00000000E+00-7.80169692E-04 0.00000000E+00
+ 1.67997372E-03 0.00000000E+00 7.23547916E-05-2.15314754E-19 1.24615926E-02
+ 0.00000000E+00 1.44070505E-03 0.00000000E+00 5.79089697E-04-2.01231867E-18
+ 7.24183382E-05-2.83129479E-19 7.24181029E-05 2.71573524E-19 1.44191797E-03
+ 0.00000000E+00 5.79636262E-04 2.49541719E-18 7.24916925E-05 3.56645168E-19
+ 1.08035988E-02 0.00000000E+00 1.26241515E-03 0.00000000E+00-7.80169692E-04
+ 0.00000000E+00-3.61932824E-05 1.24611058E-19 1.44070505E-03 0.00000000E+00
+ 5.78659005E-03 0.00000000E+00 7.24183382E-05-2.83129479E-19 2.89676469E-04
+-1.11602926E-18 1.44191797E-03 0.00000000E+00-6.76083280E-04 0.00000000E+00
+ 7.24181029E-05-2.71573524E-19-3.62274489E-05 1.57054673E-19-3.61932824E-05
+-1.24611058E-19-7.80169692E-04 0.00000000E+00 7.24183382E-05 2.83129479E-19
+ 2.89676469E-04 1.11602926E-18 1.44070505E-03 0.00000000E+00 5.78659005E-03
+ 0.00000000E+00 7.24181029E-05 2.71573524E-19-3.62274489E-05-1.57054673E-19
+ 1.44191797E-03 0.00000000E+00-6.76083280E-04 0.00000000E+00 1.44191797E-03
+ 0.00000000E+00 7.24181029E-05-2.71573524E-19 1.08035988E-02 0.00000000E+00
+ 1.26241515E-03 0.00000000E+00 5.79636262E-04-2.49541719E-18 7.24916925E-05
+-3.56645168E-19-6.76083280E-04 0.00000000E+00-3.62274489E-05 1.57054673E-19
+ 1.26241515E-03 0.00000000E+00 5.06532646E-03 0.00000000E+00 7.24916925E-05
+-3.56645168E-19 2.89969984E-04-1.40162493E-18 1.26312319E-03 0.00000000E+00
+-5.96661025E-04 0.00000000E+00 7.24914920E-05-3.91478435E-19-3.62666740E-05
+ 1.51602465E-19 7.24914920E-05 3.91478435E-19 1.26312319E-03 0.00000000E+00
+ 5.80263915E-04 2.54809016E-18 7.25752041E-05 2.14931424E-19 9.53715082E-03
+ 0.00000000E+00 1.12352091E-03 0.00000000E+00 1.26312319E-03 0.00000000E+00
+ 7.24914920E-05-3.91478435E-19 9.53715082E-03 0.00000000E+00 1.12352091E-03
+ 0.00000000E+00 5.80263915E-04-2.54809016E-18 7.25752041E-05-2.14931424E-19
+-3.62274489E-05-1.57054673E-19-6.76083280E-04 0.00000000E+00 7.24916925E-05
+ 3.56645168E-19 2.89969984E-04 1.40162493E-18 1.26241515E-03 0.00000000E+00
+ 5.06532646E-03 0.00000000E+00 7.24914920E-05 3.91478435E-19-3.62666740E-05
+-1.51602465E-19 1.26312319E-03 0.00000000E+00-5.96661025E-04 0.00000000E+00
+ 7.25749664E-05 1.57829273E-19 1.12396061E-03 0.00000000E+00 5.80972596E-04
+ 9.27277926E-19 7.26689274E-05 1.08985416E-19 8.53835985E-03 0.00000000E+00
+ 1.01231648E-03 0.00000000E+00-5.96661025E-04 0.00000000E+00-3.62666740E-05
+ 1.51602465E-19 1.12352091E-03 0.00000000E+00 4.50494786E-03 0.00000000E+00
+ 7.25752041E-05-2.14931424E-19 2.90304001E-04-7.91257512E-19 1.12396061E-03
+ 0.00000000E+00-5.34069271E-04 0.00000000E+00 7.25749664E-05-1.57829273E-19
+-3.63109735E-05 6.67036722E-20-3.62666740E-05-1.51602465E-19-5.96661025E-04
+ 0.00000000E+00 7.25752041E-05 2.14931424E-19 2.90304001E-04 7.91257512E-19
+ 1.12352091E-03 0.00000000E+00 4.50494786E-03 0.00000000E+00 7.25749664E-05
+ 1.57829273E-19-3.63109735E-05-6.67036722E-20 1.12396061E-03 0.00000000E+00
+-5.34069271E-04 0.00000000E+00 1.12396061E-03 0.00000000E+00 7.25749664E-05
+-1.57829273E-19 8.53835985E-03 0.00000000E+00 1.01231648E-03 0.00000000E+00
+ 5.80972596E-04-9.27277926E-19 7.26689274E-05-1.08985416E-19-5.34069271E-04
+ 0.00000000E+00-3.63109735E-05 6.67036722E-20 1.01231648E-03 0.00000000E+00
+ 4.05710802E-03 0.00000000E+00 7.26689274E-05-1.08985416E-19 2.90679001E-04
+-5.58320476E-19 1.01260399E-03 0.00000000E+00-4.83478011E-04 0.00000000E+00
+ 7.26687164E-05-1.44702286E-19-3.63604477E-05 9.51964654E-20-3.63109735E-05
+-6.67036722E-20-5.34069271E-04 0.00000000E+00 7.26689274E-05 1.08985416E-19
+ 2.90679001E-04 5.58320476E-19 1.01231648E-03 0.00000000E+00 4.05710802E-03
+ 0.00000000E+00 7.26687164E-05 1.44702286E-19-3.63604477E-05-9.51964654E-20
+ 1.01260399E-03 0.00000000E+00-4.83478011E-04 0.00000000E+00 7.26687164E-05
+ 1.44702286E-19 1.01260399E-03 0.00000000E+00 5.81764191E-04 1.56241573E-18
+ 7.27730743E-05 2.36083575E-19 7.73065242E-03 0.00000000E+00 9.21308052E-04
+ 0.00000000E+00 1.01260399E-03 0.00000000E+00 7.26687164E-05-1.44702286E-19
+ 7.73065242E-03 0.00000000E+00 9.21308052E-04 0.00000000E+00 5.81764191E-04
+-1.56241573E-18 7.27730743E-05-2.36083575E-19-4.83478011E-04 0.00000000E+00
+-3.63604477E-05 9.51964654E-20 9.21308052E-04 0.00000000E+00 3.69107618E-03
+ 0.00000000E+00 7.27730743E-05-2.36083575E-19 2.91095602E-04-8.89589313E-19
+ 9.21503391E-04 0.00000000E+00-4.41745080E-04 0.00000000E+00 7.27728463E-05
+-2.32139380E-19-3.64151453E-05 1.06368428E-19 7.27728463E-05 2.32139380E-19
+ 9.21503391E-04 0.00000000E+00 5.82639281E-04 1.70368713E-18 7.28877347E-05
+ 1.93334334E-19 7.06411950E-03 0.00000000E+00 8.45476931E-04 0.00000000E+00
+ 9.21503391E-04 0.00000000E+00 7.27728463E-05-2.32139380E-19 7.06411950E-03
+ 0.00000000E+00 8.45476931E-04 0.00000000E+00 5.82639281E-04-1.70368713E-18
+ 7.28877347E-05-1.93334334E-19-3.63604477E-05-9.51964654E-20-4.83478011E-04
+ 0.00000000E+00 7.27730743E-05 2.36083575E-19 2.91095602E-04 8.89589313E-19
+ 9.21308052E-04 0.00000000E+00 3.69107618E-03 0.00000000E+00 7.27728463E-05
+ 2.32139380E-19-3.64151453E-05-1.06368428E-19 9.21503391E-04 0.00000000E+00
+-4.41745080E-04 0.00000000E+00 7.28875110E-05 1.84190981E-19 8.45614190E-04
+ 0.00000000E+00 5.83599508E-04 2.03664784E-18 7.30131388E-05 3.28617652E-19
+ 6.50485425E-03 0.00000000E+00 7.81339357E-04 0.00000000E+00-4.41745080E-04
+ 0.00000000E+00-3.64151453E-05 1.06368428E-19 8.45476931E-04 0.00000000E+00
+ 3.38637919E-03 0.00000000E+00 7.28877347E-05-1.93334334E-19 2.91554327E-04
+-8.19125309E-19 8.45614190E-04 0.00000000E+00-4.06738387E-04 0.00000000E+00
+ 7.28875110E-05-1.84190981E-19-3.64751625E-05 1.28202158E-19-3.64151453E-05
+-1.06368428E-19-4.41745080E-04 0.00000000E+00 7.28877347E-05 1.93334334E-19
+ 2.91554327E-04 8.19125309E-19 8.45476931E-04 0.00000000E+00 3.38637919E-03
+ 0.00000000E+00 7.28875110E-05 1.84190981E-19-3.64751625E-05-1.28202158E-19
+ 8.45614190E-04 0.00000000E+00-4.06738387E-04 0.00000000E+00 8.45614190E-04
+ 0.00000000E+00 7.28875110E-05-1.84190981E-19 6.50485425E-03 0.00000000E+00
+ 7.81339357E-04 0.00000000E+00 5.83599508E-04-2.03664784E-18 7.30131388E-05
+-3.28617652E-19-4.06738387E-04 0.00000000E+00-3.64751625E-05 1.28202158E-19
+ 7.81339357E-04 0.00000000E+00 3.12885444E-03 0.00000000E+00 7.30131388E-05
+-3.28617652E-19 2.92055999E-04-1.24460224E-18 7.81438457E-04 0.00000000E+00
+-3.76959722E-04 0.00000000E+00 7.30129146E-05-3.46541010E-19-3.65405886E-05
+ 1.32785705E-19-3.64751625E-05-1.28202158E-19-4.06738387E-04 0.00000000E+00
+ 7.30131388E-05 3.28617652E-19 2.92055999E-04 1.24460224E-18 7.81339357E-04
+ 0.00000000E+00 3.12885444E-03 0.00000000E+00 7.30129146E-05 3.46541010E-19
+-3.65405886E-05-1.32785705E-19 7.81438457E-04 0.00000000E+00-3.76959722E-04
+ 0.00000000E+00 7.30129146E-05 3.46541010E-19 7.81438457E-04 0.00000000E+00
+ 5.84646274E-04 2.18002859E-18 7.31494398E-05 1.84601809E-19 6.02900608E-03
+ 0.00000000E+00 7.26400430E-04 0.00000000E+00 7.81438457E-04 0.00000000E+00
+ 7.30129146E-05-3.46541010E-19 6.02900608E-03 0.00000000E+00 7.26400430E-04
+ 0.00000000E+00 5.84646274E-04-2.18002859E-18 7.31494398E-05-1.84601809E-19
+-3.76959722E-04 0.00000000E+00-3.65405886E-05 1.32785705E-19 7.26400430E-04
+ 0.00000000E+00 2.90838824E-03 0.00000000E+00 7.31494398E-05-1.84601809E-19
+ 2.92601278E-04-7.63089717E-19 7.26473614E-04 0.00000000E+00-3.51325435E-04
+ 0.00000000E+00 7.31492119E-05-1.63856052E-19-3.66115196E-05 9.06397343E-20
+ 7.31492119E-05 1.63856052E-19 7.26473614E-04 0.00000000E+00 5.85781103E-04
+ 1.39773764E-18 7.32968666E-05 1.98702885E-19 5.61931079E-03 0.00000000E+00
+ 6.78828125E-04 0.00000000E+00 7.26473614E-04 0.00000000E+00 7.31492119E-05
+-1.63856052E-19 5.61931079E-03 0.00000000E+00 6.78828125E-04 0.00000000E+00
+ 5.85781103E-04-1.39773764E-18 7.32968666E-05-1.98702885E-19-3.65405886E-05
+-1.32785705E-19-3.76959722E-04 0.00000000E+00 7.31494398E-05 1.84601809E-19
+ 2.92601278E-04 7.63089717E-19 7.26400430E-04 0.00000000E+00 2.90838824E-03
+ 0.00000000E+00 7.31492119E-05 1.63856052E-19-3.66115196E-05-9.06397343E-20
+ 7.26473614E-04 0.00000000E+00-3.51325435E-04 0.00000000E+00 7.32966382E-05
+ 2.06550202E-19 6.78883259E-04 0.00000000E+00 5.87005832E-04 1.72765771E-18
+ 7.34556401E-05 2.26930845E-19 5.26296537E-03 0.00000000E+00 6.37246200E-04
+ 0.00000000E+00-3.51325435E-04 0.00000000E+00-3.66115196E-05 9.06397343E-20
+ 6.78828125E-04 0.00000000E+00 2.71756861E-03 0.00000000E+00 7.32968666E-05
+-1.98702885E-19 2.93191063E-04-8.08022071E-19 6.78883259E-04 0.00000000E+00
+-3.29032365E-04 0.00000000E+00 7.32966382E-05-2.06550202E-19-3.66880696E-05
+ 1.08370262E-19-3.66115196E-05-9.06397343E-20-3.51325435E-04 0.00000000E+00
+ 7.32968666E-05 1.98702885E-19 2.93191063E-04 8.08022071E-19 6.78828125E-04
+ 0.00000000E+00 2.71756861E-03 0.00000000E+00 7.32966382E-05 2.06550202E-19
+-3.66880696E-05-1.08370262E-19 6.78883259E-04 0.00000000E+00-3.29032365E-04
+ 0.00000000E+00 6.78883259E-04 0.00000000E+00 7.32966382E-05-2.06550202E-19
+ 5.26296537E-03 0.00000000E+00 6.37246200E-04 0.00000000E+00 5.87005832E-04
+-1.72765771E-18 7.34556401E-05-2.26930845E-19-3.29032365E-04 0.00000000E+00
+-3.66880696E-05 1.08370262E-19 6.37246200E-04 0.00000000E+00 2.55083722E-03
+ 0.00000000E+00 7.34556401E-05-2.26930845E-19 2.93826253E-04-9.39821608E-19
+ 6.37288447E-04 0.00000000E+00-3.09472527E-04 0.00000000E+00 7.34554112E-05
+-2.36090296E-19-3.67703614E-05 1.34558776E-19-3.66880696E-05-1.08370262E-19
+-3.29032365E-04 0.00000000E+00 7.34556401E-05 2.26930845E-19 2.93826253E-04
+ 9.39821608E-19 6.37246200E-04 0.00000000E+00 2.55083722E-03 0.00000000E+00
+ 7.34554112E-05 2.36090296E-19-3.67703614E-05-1.34558776E-19 6.37288447E-04
+ 0.00000000E+00-3.09472527E-04 0.00000000E+00 7.34554112E-05 2.36090296E-19
+ 6.37288447E-04 0.00000000E+00 5.88322431E-04 2.19400249E-18 7.36260344E-05
+ 3.02144806E-19 4.95027334E-03 0.00000000E+00 6.00601663E-04 0.00000000E+00
+ 6.37288447E-04 0.00000000E+00 7.34554112E-05-2.36090296E-19 4.95027334E-03
+ 0.00000000E+00 6.00601663E-04 0.00000000E+00 5.88322431E-04-2.19400249E-18
+ 7.36260344E-05-3.02144806E-19-3.09472527E-04 0.00000000E+00-3.67703614E-05
+ 1.34558776E-19 6.00601663E-04 0.00000000E+00 2.40394604E-03 0.00000000E+00
+ 7.36260344E-05-3.02144806E-19 2.94507909E-04-1.11868878E-18 6.00634481E-04
+ 0.00000000E+00-2.92177181E-04 0.00000000E+00 7.36258017E-05-2.99382734E-19
+-3.68585216E-05 1.05757241E-19 7.36258017E-05 2.99382734E-19 6.00634481E-04
+ 0.00000000E+00 5.89732908E-04 1.73149361E-18 7.38082848E-05 1.23646230E-19
+ 4.67375581E-03 0.00000000E+00 5.68074243E-04 0.00000000E+00 6.00634481E-04
+ 0.00000000E+00 7.36258017E-05-2.99382734E-19 4.67375581E-03 0.00000000E+00
+ 5.68074243E-04 0.00000000E+00 5.89732908E-04-1.73149361E-18 7.38082848E-05
+-1.23646230E-19-3.67703614E-05-1.34558776E-19-3.09472527E-04 0.00000000E+00
+ 7.36260344E-05 3.02144806E-19 2.94507909E-04 1.11868878E-18 6.00601663E-04
+ 0.00000000E+00 2.40394604E-03 0.00000000E+00 7.36258017E-05 2.99382734E-19
+-3.68585216E-05-1.05757241E-19 6.00634481E-04 0.00000000E+00-2.92177181E-04
+ 0.00000000E+00 7.38080520E-05 1.00957605E-19 5.68100086E-04 0.00000000E+00
+ 5.91239613E-04 3.46836424E-19 7.40027329E-05 8.82205679E-21 4.42755351E-03
+ 0.00000000E+00 5.39016708E-04 0.00000000E+00-2.92177181E-04 0.00000000E+00
+-3.68585216E-05 1.05757241E-19 5.68074243E-04 0.00000000E+00 2.27359037E-03
+ 0.00000000E+00 7.38082848E-05-1.23646230E-19 2.95237030E-04-4.79358099E-19
+ 5.68100086E-04 0.00000000E+00-2.76779198E-04 0.00000000E+00 7.38080520E-05
+-1.00957605E-19-3.69526962E-05 2.74449154E-20-3.68585216E-05-1.05757241E-19
+-2.92177181E-04 0.00000000E+00 7.38082848E-05 1.23646230E-19 2.95237030E-04
+ 4.79358099E-19 5.68074243E-04 0.00000000E+00 2.27359037E-03 0.00000000E+00
+ 7.38080520E-05 1.00957605E-19-3.69526962E-05-2.74449154E-20 5.68100086E-04
+ 0.00000000E+00-2.76779198E-04 0.00000000E+00 5.68100086E-04 0.00000000E+00
+ 7.38080520E-05-1.00957605E-19 4.42755351E-03 0.00000000E+00 5.39016708E-04
+ 0.00000000E+00 5.91239613E-04-3.46836424E-19 7.40027329E-05-8.82205679E-21
+ 2.14691448E-04 0.00000000E+00 6.06593275E-05-2.11915552E-19 1.70326147E-03
+ 0.00000000E+00 2.11129320E-04 0.00000000E+00 4.86530401E-04-1.45145463E-18
+ 6.09723509E-05-1.44803072E-19-3.04079196E-05-8.91796561E-20-1.06455192E-04
+ 0.00000000E+00 6.09723509E-05 1.44803072E-19 1.21865303E-04 3.01782260E-19
+ 2.11129320E-04 0.00000000E+00 4.23151561E-04 0.00000000E+00 6.06593275E-05
+ 2.11915552E-19 2.14691448E-04 0.00000000E+00 4.86530401E-04 1.45145463E-18
+ 6.09723509E-05 1.44803072E-19 1.70326147E-03 0.00000000E+00 2.11129320E-04
+ 0.00000000E+00-1.06455192E-04 0.00000000E+00-3.04079196E-05 8.91796561E-20
+ 2.11129320E-04 0.00000000E+00 4.23151561E-04 0.00000000E+00 6.09723509E-05
+-1.44803072E-19 1.21865303E-04-3.01782260E-19-3.02528068E-05-1.02223430E-19
+-1.08272646E-04 0.00000000E+00 6.06574152E-05 2.10888680E-19 2.42636849E-04
+ 8.17041259E-19 2.14684023E-04 0.00000000E+00 8.58808235E-04 0.00000000E+00
+ 6.06593275E-05 2.11915552E-19-3.04079196E-05-8.91796561E-20 2.14691448E-04
+ 0.00000000E+00-1.06455192E-04 0.00000000E+00 2.18406560E-04 0.00000000E+00
+ 6.03538119E-05-1.98005039E-19 1.73230242E-03 0.00000000E+00 2.14684023E-04
+ 0.00000000E+00 4.84038793E-04-1.65072057E-18 6.06574152E-05-2.10888680E-19
+-1.08272646E-04 0.00000000E+00-3.02528068E-05 1.02223430E-19 2.14684023E-04
+ 0.00000000E+00 8.58808235E-04 0.00000000E+00 6.06574152E-05-2.10888680E-19
+ 2.42636849E-04-8.17041259E-19 2.14691448E-04 0.00000000E+00-1.06455192E-04
+ 0.00000000E+00 6.06593275E-05-2.11915552E-19-3.04079196E-05 8.91796561E-20
+ 6.03538119E-05 1.98005039E-19 2.18406560E-04 0.00000000E+00 4.84038793E-04
+ 1.65072057E-18 6.06574152E-05 2.10888680E-19 1.73230242E-03 0.00000000E+00
+ 2.14684023E-04 0.00000000E+00 7.96272581E-05 2.59421630E-19 2.96926596E-04
+ 0.00000000E+00 6.39039784E-04 2.00885375E-18 8.01341282E-05 2.50716854E-19
+ 2.34749116E-03 0.00000000E+00 2.89975775E-04 0.00000000E+00-1.46725593E-04
+ 0.00000000E+00-3.99403466E-05 1.27534621E-19 2.89975775E-04 0.00000000E+00
+ 1.01760462E-03 0.00000000E+00 8.01341282E-05-2.50716854E-19 2.80927199E-04
+-9.08863458E-19 2.18406560E-04 0.00000000E+00-1.08272646E-04 0.00000000E+00
+ 6.03538119E-05-1.98005039E-19-3.02528068E-05 1.02223430E-19-3.99403466E-05
+-1.27534621E-19-1.46725593E-04 0.00000000E+00 8.01341282E-05 2.50716854E-19
+ 2.80927199E-04 9.08863458E-19 2.89975775E-04 0.00000000E+00 1.01760462E-03
+ 0.00000000E+00 6.03538119E-05 1.98005039E-19-3.02528068E-05-1.02223430E-19
+ 2.18406560E-04 0.00000000E+00-1.08272646E-04 0.00000000E+00 2.96926596E-04
+ 0.00000000E+00 7.96272581E-05-2.59421630E-19 2.34749116E-03 0.00000000E+00
+ 2.89975775E-04 0.00000000E+00 6.39039784E-04-2.00885375E-18 8.01341282E-05
+-2.50716854E-19 7.91435571E-05 2.54346782E-19 3.04320363E-04 0.00000000E+00
+ 6.35075183E-04 2.13773822E-18 7.96270880E-05 2.73159155E-19 2.40484179E-03
+ 0.00000000E+00 2.96924047E-04 0.00000000E+00-1.50311103E-04 0.00000000E+00
+-3.96926613E-05 1.31876484E-19 2.96924047E-04 0.00000000E+00 1.18786032E-03
+ 0.00000000E+00 7.96270880E-05-2.73159155E-19 3.18517009E-04-1.05524314E-18
+ 2.96926596E-04 0.00000000E+00-1.46725593E-04 0.00000000E+00 7.96272581E-05
+-2.59421630E-19-3.99403466E-05 1.27534621E-19-3.96926613E-05-1.31876484E-19
+-1.50311103E-04 0.00000000E+00 7.96270880E-05 2.73159155E-19 3.18517009E-04
+ 1.05524314E-18 2.96924047E-04 0.00000000E+00 1.18786032E-03 0.00000000E+00
+ 7.96272581E-05 2.59421630E-19-3.99403466E-05-1.27534621E-19 2.96926596E-04
+ 0.00000000E+00-1.46725593E-04 0.00000000E+00 3.04320363E-04 0.00000000E+00
+ 7.91435571E-05-2.54346782E-19 2.40484179E-03 0.00000000E+00 2.96924047E-04
+ 0.00000000E+00 6.35075183E-04-2.13773822E-18 7.96270880E-05-2.73159155E-19
+ 7.86844880E-05 2.51702607E-19 3.12206384E-04 0.00000000E+00 6.31307374E-04
+ 1.94264770E-18 7.91439743E-05 2.42481483E-19 2.46596012E-03 0.00000000E+00
+ 3.04319873E-04 0.00000000E+00-1.54131564E-04 0.00000000E+00-3.94571156E-05
+ 1.23546023E-19 3.04319873E-04 0.00000000E+00 1.21745555E-03 0.00000000E+00
+ 7.91439743E-05-2.42481483E-19 3.16583654E-04-1.00349649E-18 3.04320363E-04
+ 0.00000000E+00-1.50311103E-04 0.00000000E+00 7.91435571E-05-2.54346782E-19
+-3.96926613E-05 1.31876484E-19-3.94571156E-05-1.23546023E-19-1.54131564E-04
+ 0.00000000E+00 7.91439743E-05 2.42481483E-19 3.16583654E-04 1.00349649E-18
+ 3.04319873E-04 0.00000000E+00 1.21745555E-03 0.00000000E+00 7.91435571E-05
+ 2.54346782E-19-3.96926613E-05-1.31876484E-19 3.04320363E-04 0.00000000E+00
+-1.50311103E-04 0.00000000E+00 3.12206384E-04 0.00000000E+00 7.86844880E-05
+-2.51702607E-19 2.46596012E-03 0.00000000E+00 3.04319873E-04 0.00000000E+00
+ 6.31307374E-04-1.94264770E-18 7.91439743E-05-2.42481483E-19 7.82476655E-05
+ 3.58714096E-19 3.20621826E-04 0.00000000E+00 6.27723377E-04 2.48099194E-18
+ 7.86847495E-05 2.57655201E-19 2.53114956E-03 0.00000000E+00 3.12205094E-04
+ 0.00000000E+00-1.58206730E-04 0.00000000E+00-3.92331038E-05 1.54092324E-19
+ 3.12205094E-04 0.00000000E+00 1.24901231E-03 0.00000000E+00 7.86847495E-05
+-2.57655201E-19 3.14746475E-04-1.05101002E-18 3.12206384E-04 0.00000000E+00
+-1.54131564E-04 0.00000000E+00 7.86844880E-05-2.51702607E-19-3.94571156E-05
+ 1.23546023E-19-3.92331038E-05-1.54092324E-19-1.58206730E-04 0.00000000E+00
+ 7.86847495E-05 2.57655201E-19 3.14746475E-04 1.05101002E-18 3.12205094E-04
+ 0.00000000E+00 1.24901231E-03 0.00000000E+00 7.86844880E-05 2.51702607E-19
+-3.94571156E-05-1.23546023E-19 3.12206384E-04 0.00000000E+00-1.54131564E-04
+ 0.00000000E+00 3.20621826E-04 0.00000000E+00 7.82476655E-05-3.58714096E-19
+ 2.53114956E-03 0.00000000E+00 3.12205094E-04 0.00000000E+00 6.27723377E-04
+-2.48099194E-18 7.86847495E-05-2.57655201E-19 7.78322240E-05 2.08933904E-19
+ 3.29614774E-04 0.00000000E+00 6.24314774E-04 2.38290838E-18 7.82479558E-05
+ 3.70549476E-19 2.60076848E-03 0.00000000E+00 3.20620423E-04 0.00000000E+00
+-1.62558799E-04 0.00000000E+00-3.90200449E-05 1.44870845E-19 3.20620423E-04
+ 0.00000000E+00 1.28269079E-03 0.00000000E+00 7.82479558E-05-3.70549476E-19
+ 3.12998870E-04-1.36681858E-18 3.20621826E-04 0.00000000E+00-1.58206730E-04
+ 0.00000000E+00 7.82476655E-05-3.58714096E-19-3.92331038E-05 1.54092324E-19
+-3.90200449E-05-1.44870845E-19-1.62558799E-04 0.00000000E+00 7.82479558E-05
+ 3.70549476E-19 3.12998870E-04 1.36681858E-18 3.20620423E-04 0.00000000E+00
+ 1.28269079E-03 0.00000000E+00 7.82476655E-05 3.58714096E-19-3.92331038E-05
+-1.54092324E-19 3.20621826E-04 0.00000000E+00-1.58206730E-04 0.00000000E+00
+ 3.29614774E-04 0.00000000E+00 7.78322240E-05-2.08933904E-19 2.60076848E-03
+ 0.00000000E+00 3.20620423E-04 0.00000000E+00 6.24314774E-04-2.38290838E-18
+ 7.82479558E-05-3.70549476E-19 7.74370958E-05 1.12123942E-19 3.39238444E-04
+ 0.00000000E+00 6.21072714E-04 1.02612150E-18 7.78325003E-05 1.76745171E-19
+ 2.67521734E-03 0.00000000E+00 3.29613039E-04 0.00000000E+00-1.67212871E-04
+ 0.00000000E+00-3.88173990E-05 7.22172781E-20 3.29613039E-04 0.00000000E+00
+ 1.31868100E-03 0.00000000E+00 7.78325003E-05-1.76745171E-19 3.11336709E-04
+-8.06254492E-19 3.29614774E-04 0.00000000E+00-1.62558799E-04 0.00000000E+00
+ 7.78322240E-05-2.08933904E-19-3.90200449E-05 1.44870845E-19-3.88173990E-05
+-7.22172781E-20-1.67212871E-04 0.00000000E+00 7.78325003E-05 1.76745171E-19
+ 3.11336709E-04 8.06254492E-19 3.29613039E-04 0.00000000E+00 1.31868100E-03
+ 0.00000000E+00 7.78322240E-05 2.08933904E-19-3.90200449E-05-1.44870845E-19
+ 3.29614774E-04 0.00000000E+00-1.62558799E-04 0.00000000E+00 3.39238444E-04
+ 0.00000000E+00 7.74370958E-05-1.12123942E-19 2.67521734E-03 0.00000000E+00
+ 3.29613039E-04 0.00000000E+00 6.21072714E-04-1.02612150E-18 7.78325003E-05
+-1.76745171E-19-1.72197455E-04 0.00000000E+00-3.86246740E-05 1.55625796E-19
+ 3.39236367E-04 0.00000000E+00 1.35719665E-03 0.00000000E+00 7.74373684E-05
+-1.51479002E-19 3.09755846E-04-6.56074923E-19 3.39238444E-04 0.00000000E+00
+-1.67212871E-04 0.00000000E+00 7.74370958E-05-1.12123942E-19-3.88173990E-05
+ 7.22172781E-20 7.70613276E-05 4.71024180E-19 3.49553453E-04 0.00000000E+00
+ 6.17989374E-04 2.60308139E-18 7.74373684E-05 1.51479002E-19 2.75495220E-03
+ 0.00000000E+00 3.39236367E-04 0.00000000E+00 3.49553453E-04 0.00000000E+00
+ 7.70613276E-05-4.71024180E-19 2.75495220E-03 0.00000000E+00 3.39236367E-04
+ 0.00000000E+00 6.17989374E-04-2.60308139E-18 7.74373684E-05-1.51479002E-19
+-3.86246740E-05-1.55625796E-19-1.72197455E-04 0.00000000E+00 7.74373684E-05
+ 1.51479002E-19 3.09755846E-04 6.56074923E-19 3.39236367E-04 0.00000000E+00
+ 1.35719665E-03 0.00000000E+00 7.74370958E-05 1.12123942E-19-3.88173990E-05
+-7.22172781E-20 3.39238444E-04 0.00000000E+00-1.67212871E-04 0.00000000E+00
+ 7.67040762E-05 5.80547583E-20 3.60629146E-04 0.00000000E+00 6.15057503E-04
+ 1.89609337E-18 7.70615940E-05 4.33841430E-19 2.84049214E-03 0.00000000E+00
+ 3.49550957E-04 0.00000000E+00-1.77545026E-04 0.00000000E+00-3.84414176E-05
+ 1.22974047E-19 3.49550957E-04 0.00000000E+00 1.39848064E-03 0.00000000E+00
+ 7.70615940E-05-4.33841430E-19 3.08252460E-04-1.57547897E-18 3.49553453E-04
+ 0.00000000E+00-1.72197455E-04 0.00000000E+00 7.70613276E-05-4.71024180E-19
+-3.86246740E-05 1.55625796E-19-3.84414176E-05-1.22974047E-19-1.77545026E-04
+ 0.00000000E+00 7.70615940E-05 4.33841430E-19 3.08252460E-04 1.57547897E-18
+ 3.49550957E-04 0.00000000E+00 1.39848064E-03 0.00000000E+00 7.70613276E-05
+ 4.71024180E-19-3.86246740E-05-1.55625796E-19 3.49553453E-04 0.00000000E+00
+-1.72197455E-04 0.00000000E+00 3.60629146E-04 0.00000000E+00 7.67040762E-05
+-5.80547583E-20 2.84049214E-03 0.00000000E+00 3.49550957E-04 0.00000000E+00
+ 6.15057503E-04-1.89609337E-18 7.70615940E-05-4.33841430E-19-1.83292753E-04
+ 0.00000000E+00-3.82672213E-05 1.27081310E-19 3.60626165E-04 0.00000000E+00
+ 1.44281079E-03 0.00000000E+00 7.67043391E-05-8.48884992E-20 3.06823162E-04
+-5.29741474E-19 3.60629146E-04 0.00000000E+00-1.77545026E-04 0.00000000E+00
+ 7.67040762E-05-5.80547583E-20-3.84414176E-05 1.22974047E-19-3.82672213E-05
+-1.27081310E-19-1.83292753E-04 0.00000000E+00 7.67043391E-05 8.48884992E-20
+ 3.06823162E-04 5.29741474E-19 3.60626165E-04 0.00000000E+00 1.44281079E-03
+ 0.00000000E+00 7.67040762E-05 5.80547583E-20-3.84414176E-05-1.22974047E-19
+ 3.60629146E-04 0.00000000E+00-1.77545026E-04 0.00000000E+00 7.63645460E-05
+ 4.23436741E-19 3.72544847E-04 0.00000000E+00 6.12270583E-04 2.03875790E-18
+ 7.67043391E-05 8.48884992E-20 2.93243150E-03 0.00000000E+00 3.60626165E-04
+ 0.00000000E+00 3.72544847E-04 0.00000000E+00 7.63645460E-05-4.23436741E-19
+ 2.93243150E-03 0.00000000E+00 3.60626165E-04 0.00000000E+00 6.12270583E-04
+-2.03875790E-18 7.67043391E-05-8.48884992E-20-1.89483264E-04 0.00000000E+00
+-3.81017018E-05 1.74314816E-19 3.72541280E-04 0.00000000E+00 1.49050504E-03
+ 0.00000000E+00 7.63648045E-05-4.26180520E-19 3.05464770E-04-1.52681598E-18
+ 3.72544847E-04 0.00000000E+00-1.83292753E-04 0.00000000E+00 7.63645460E-05
+-4.23436741E-19-3.82672213E-05 1.27081310E-19 7.60420025E-05 2.71078746E-19
+ 3.85391775E-04 0.00000000E+00 6.09622471E-04 2.88074516E-18 7.63648045E-05
+ 4.26180520E-19 3.03145166E-03 0.00000000E+00 3.72541280E-04 0.00000000E+00
+ 3.85391775E-04 0.00000000E+00 7.60420025E-05-2.71078746E-19 3.03145166E-03
+ 0.00000000E+00 3.72541280E-04 0.00000000E+00 6.09622471E-04-2.88074516E-18
+ 7.63648045E-05-4.26180520E-19-3.81017018E-05-1.74314816E-19-1.89483264E-04
+ 0.00000000E+00 7.63648045E-05 4.26180520E-19 3.05464770E-04 1.52681598E-18
+ 3.72541280E-04 0.00000000E+00 1.49050504E-03 0.00000000E+00 7.63645460E-05
+ 4.23436741E-19-3.82672213E-05-1.27081310E-19 3.72544847E-04 0.00000000E+00
+-1.83292753E-04 0.00000000E+00 7.57357700E-05 1.27061470E-19 3.99275362E-04
+ 0.00000000E+00 6.07107544E-04 1.36244647E-18 7.60422581E-05 2.39031309E-19
+ 3.13833852E-03 0.00000000E+00 3.85387511E-04 0.00000000E+00-1.96165718E-04
+ 0.00000000E+00-3.79445070E-05 9.15231948E-20 3.85387511E-04 0.00000000E+00
+ 1.54192905E-03 0.00000000E+00 7.60422581E-05-2.39031309E-19 3.04174348E-04
+-1.03595016E-18 3.85391775E-04 0.00000000E+00-1.89483264E-04 0.00000000E+00
+ 7.60420025E-05-2.71078746E-19-3.81017018E-05 1.74314816E-19-3.79445070E-05
+-9.15231948E-20-1.96165718E-04 0.00000000E+00 7.60422581E-05 2.39031309E-19
+ 3.04174348E-04 1.03595016E-18 3.85387511E-04 0.00000000E+00 1.54192905E-03
+ 0.00000000E+00 7.60420025E-05 2.71078746E-19-3.81017018E-05-1.74314816E-19
+ 3.85391775E-04 0.00000000E+00-1.89483264E-04 0.00000000E+00 3.99275362E-04
+ 0.00000000E+00 7.57357700E-05-1.27061470E-19 3.13833852E-03 0.00000000E+00
+ 3.85387511E-04 0.00000000E+00 6.07107544E-04-1.36244647E-18 7.60422581E-05
+-2.39031309E-19-2.03397069E-04 0.00000000E+00-3.77953126E-05 9.16564431E-20
+ 3.99270242E-04 0.00000000E+00 1.59750546E-03 0.00000000E+00 7.57360200E-05
+-1.66253623E-19 3.02949187E-04-6.38816820E-19 3.99275362E-04 0.00000000E+00
+-1.96165718E-04 0.00000000E+00 7.57357700E-05-1.27061470E-19-3.79445070E-05
+ 9.15231948E-20-3.77953126E-05-9.16564431E-20-2.03397069E-04 0.00000000E+00
+ 7.57360200E-05 1.66253623E-19 3.02949187E-04 6.38816820E-19 3.99270242E-04
+ 0.00000000E+00 1.59750546E-03 0.00000000E+00 7.57357700E-05 1.27061470E-19
+-3.79445070E-05-9.15231948E-20 3.99275362E-04 0.00000000E+00-1.96165718E-04
+ 0.00000000E+00 7.54452306E-05 2.00372150E-19 4.14318035E-04 0.00000000E+00
+ 6.04720596E-04 1.54474102E-18 7.57360200E-05 1.66253623E-19 3.25400233E-03
+ 0.00000000E+00 3.99270242E-04 0.00000000E+00 4.14318035E-04 0.00000000E+00
+ 7.54452306E-05-2.00372150E-19 3.25400233E-03 0.00000000E+00 3.99270242E-04
+ 0.00000000E+00 6.04720596E-04-1.54474102E-18 7.57360200E-05-1.66253623E-19
+-2.11243682E-04 0.00000000E+00-3.76538272E-05 6.20176414E-20 4.14311898E-04
+ 0.00000000E+00 1.65772526E-03 0.00000000E+00 7.54454813E-05-1.65756107E-19
+ 3.01786829E-04-6.89024582E-19 4.14318035E-04 0.00000000E+00-2.03397069E-04
+ 0.00000000E+00 7.54452306E-05-2.00372150E-19-3.77953126E-05 9.16564431E-20
+ 7.51698276E-05 8.23144585E-20 4.30662828E-04 0.00000000E+00 6.02456994E-04
+ 9.23474648E-19 7.54454813E-05 1.65756107E-19 3.37950392E-03 0.00000000E+00
+ 4.14311898E-04 0.00000000E+00 4.30662828E-04 0.00000000E+00 7.51698276E-05
+-8.23144585E-20 3.37950392E-03 0.00000000E+00 4.14311898E-04 0.00000000E+00
+ 6.02456994E-04-9.23474648E-19 7.54454813E-05-1.65756107E-19-3.76538272E-05
+-6.20176414E-20-2.11243682E-04 0.00000000E+00 7.54454813E-05 1.65756107E-19
+ 3.01786829E-04 6.89024582E-19 4.14311898E-04 0.00000000E+00 1.65772526E-03
+ 0.00000000E+00 7.54452306E-05 2.00372150E-19-3.77953126E-05-9.16564431E-20
+ 4.14318035E-04 0.00000000E+00-2.03397069E-04 0.00000000E+00 7.49090109E-05
+ 2.82564308E-19 4.48477606E-04 0.00000000E+00 6.00312236E-04 1.43597767E-18
+ 7.51700730E-05 8.76795328E-20 3.51608496E-03 0.00000000E+00 4.30655417E-04
+ 0.00000000E+00-2.19783256E-04 0.00000000E+00-3.75197710E-05 9.25609601E-20
+ 4.30655417E-04 0.00000000E+00 1.72316193E-03 0.00000000E+00 7.51700730E-05
+-8.76795328E-20 3.00685012E-04-4.41861034E-19 4.30662828E-04 0.00000000E+00
+-2.11243682E-04 0.00000000E+00 7.51698276E-05-8.23144585E-20-3.76538272E-05
+ 6.20176414E-20-3.75197710E-05-9.25609601E-20-2.19783256E-04 0.00000000E+00
+ 7.51700730E-05 8.76795328E-20 3.00685012E-04 4.41861034E-19 4.30655417E-04
+ 0.00000000E+00 1.72316193E-03 0.00000000E+00 7.51698276E-05 8.23144585E-20
+-3.76538272E-05-6.20176414E-20 4.30662828E-04 0.00000000E+00-2.11243682E-04
+ 0.00000000E+00 4.48477606E-04 0.00000000E+00 7.49090109E-05-2.82564308E-19
+ 3.51608496E-03 0.00000000E+00 4.30655417E-04 0.00000000E+00 6.00312236E-04
+-1.43597767E-18 7.51700730E-05-8.76795328E-20-2.29107412E-04 0.00000000E+00
+-3.73928893E-05 1.33711675E-19 4.48468635E-04 0.00000000E+00 1.79448896E-03
+ 0.00000000E+00 7.49092552E-05-3.36018317E-19 2.99641571E-04-1.11531980E-18
+ 4.48477606E-04 0.00000000E+00-2.19783256E-04 0.00000000E+00 7.49090109E-05
+-2.82564308E-19-3.75197710E-05 9.25609601E-20-3.73928893E-05-1.33711675E-19
+-2.29107412E-04 0.00000000E+00 7.49092552E-05 3.36018317E-19 2.99641571E-04
+ 1.11531980E-18 4.48468635E-04 0.00000000E+00 1.79448896E-03 0.00000000E+00
+ 7.49090109E-05 2.82564308E-19-3.75197710E-05-9.25609601E-20 4.48477606E-04
+ 0.00000000E+00-2.19783256E-04 0.00000000E+00 7.46623019E-05 1.98828385E-19
+ 4.67961014E-04 0.00000000E+00 5.98282265E-04 2.32506205E-18 7.49092552E-05
+ 3.36018317E-19 3.66520960E-03 0.00000000E+00 4.48468635E-04 0.00000000E+00
+ 4.67961014E-04 0.00000000E+00 7.46623019E-05-1.98828385E-19 3.66520960E-03
+ 0.00000000E+00 4.48468635E-04 0.00000000E+00 5.98282265E-04-2.32506205E-18
+ 7.49092552E-05-3.36018317E-19-2.39324912E-04 0.00000000E+00-3.72729483E-05
+ 6.73834721E-20 4.67950087E-04 0.00000000E+00 1.87250329E-03 0.00000000E+00
+ 7.46625429E-05-1.02779359E-19 2.98654568E-04-6.77568961E-19 4.67961014E-04
+ 0.00000000E+00-2.29107412E-04 0.00000000E+00 7.46623019E-05-1.98828385E-19
+-3.73928893E-05 1.33711675E-19 7.44292501E-05 1.66754529E-19 4.89349560E-04
+ 0.00000000E+00 5.96363329E-04 8.45589705E-19 7.46625429E-05 1.02779359E-19
+ 3.82861564E-03 0.00000000E+00 4.67950087E-04 0.00000000E+00 4.89349560E-04
+ 0.00000000E+00 7.44292501E-05-1.66754529E-19 3.82861564E-03 0.00000000E+00
+ 4.67950087E-04 0.00000000E+00 5.96363329E-04-8.45589705E-19 7.46625429E-05
+-1.02779359E-19-3.72729483E-05-6.73834721E-20-2.39324912E-04 0.00000000E+00
+ 7.46625429E-05 1.02779359E-19 2.98654568E-04 6.77568961E-19 4.67950087E-04
+ 0.00000000E+00 1.87250329E-03 0.00000000E+00 7.46623019E-05 1.98828385E-19
+-3.73928893E-05-1.33711675E-19 4.67961014E-04 0.00000000E+00-2.29107412E-04
+ 0.00000000E+00 7.42094428E-05 2.85146593E-19 5.12927099E-04 0.00000000E+00
+ 5.94552003E-04 2.36379438E-18 7.44294899E-05 2.58606043E-19 4.00838103E-03
+ 0.00000000E+00 4.89336176E-04 0.00000000E+00-2.50565819E-04 0.00000000E+00
+-3.71597332E-05 1.35938159E-19 4.89336176E-04 0.00000000E+00 1.95815412E-03
+ 0.00000000E+00 7.44294899E-05-2.58606043E-19 2.97722210E-04-8.36905908E-19
+ 4.89349560E-04 0.00000000E+00-2.39324912E-04 0.00000000E+00 7.44292501E-05
+-1.66754529E-19-3.72729483E-05 6.73834721E-20-3.71597332E-05-1.35938159E-19
+-2.50565819E-04 0.00000000E+00 7.44294899E-05 2.58606043E-19 2.97722210E-04
+ 8.36905908E-19 4.89336176E-04 0.00000000E+00 1.95815412E-03 0.00000000E+00
+ 7.44292501E-05 1.66754529E-19-3.72729483E-05-6.73834721E-20 4.89349560E-04
+ 0.00000000E+00-2.39324912E-04 0.00000000E+00 5.12927099E-04 0.00000000E+00
+ 7.42094428E-05-2.85146593E-19 4.00838103E-03 0.00000000E+00 4.89336176E-04
+ 0.00000000E+00 5.94552003E-04-2.36379438E-18 7.44294899E-05-2.58606043E-19
+-2.76779198E-04 0.00000000E+00-3.69526962E-05 2.74449154E-20 5.39016708E-04
+ 0.00000000E+00 2.15716390E-03 0.00000000E+00 7.40027329E-05-8.82205679E-21
+ 2.96014925E-04-1.70626753E-19 5.39037271E-04 0.00000000E+00-2.62986962E-04
+ 0.00000000E+00 7.40024971E-05-2.08657907E-20-3.70530442E-05 6.54360816E-20
+-3.69526962E-05-2.74449154E-20-2.76779198E-04 0.00000000E+00 7.40027329E-05
+ 8.82205679E-21 2.96014925E-04 1.70626753E-19 5.39016708E-04 0.00000000E+00
+ 2.15716390E-03 0.00000000E+00 7.40024971E-05 2.08657907E-20-3.70530442E-05
+-6.54360816E-20 5.39037271E-04 0.00000000E+00-2.62986962E-04 0.00000000E+00
+-2.62986962E-04 0.00000000E+00-3.70530442E-05 6.54360816E-20 5.12910576E-04
+ 0.00000000E+00 2.05258097E-03 0.00000000E+00 7.42096798E-05-2.40878536E-19
+ 2.96842840E-04-9.63050978E-19 5.12927099E-04 0.00000000E+00-2.50565819E-04
+ 0.00000000E+00 7.42094428E-05-2.85146593E-19-3.71597332E-05 1.35938159E-19
+-3.70530442E-05-6.54360816E-20-2.62986962E-04 0.00000000E+00 7.42096798E-05
+ 2.40878536E-19 2.96842840E-04 9.63050978E-19 5.12910576E-04 0.00000000E+00
+ 2.05258097E-03 0.00000000E+00 7.42094428E-05 2.85146593E-19-3.71597332E-05
+-1.35938159E-19 5.12927099E-04 0.00000000E+00-2.50565819E-04 0.00000000E+00
+ 7.40024971E-05 2.08657907E-20 5.39037271E-04 0.00000000E+00 5.92845084E-04
+ 1.00559325E-18 7.42096798E-05 2.40878536E-19 4.20701092E-03 0.00000000E+00
+ 5.12910576E-04 0.00000000E+00 5.39037271E-04 0.00000000E+00 7.40024971E-05
+-2.08657907E-20 4.20701092E-03 0.00000000E+00 5.12910576E-04 0.00000000E+00
+ 5.92845084E-04-1.00559325E-18 7.42096798E-05-2.40878536E-19 2.25394106E-05
+ 0.00000000E+00-2.67589582E-06-4.89750120E-21 0.00000000E+00-1.37940565E-11
+ 4.11689936E-08-1.31006298E-10 3.18864756E-08 0.00000000E+00-2.24899751E-05
+ 0.00000000E+00-1.73927334E-06-2.10582022E-21 6.70278439E-08 1.73870336E-21
+ 0.00000000E+00 5.77058951E-10 0.00000000E+00-1.49100624E-13-1.39177137E-05
+ 1.92615125E-09 4.00360879E-08 1.01227467E-11-1.73927334E-06 2.10582022E-21
+ 3.18864756E-08 0.00000000E+00-4.84969212E-07-4.38176119E-10 0.00000000E+00
+-5.65788654E-11-1.07277955E-06 2.78187155E-20 1.47116196E-06 4.84899322E-21
+ 3.59826817E-04 0.00000000E+00 8.99280138E-05 0.00000000E+00-1.36530480E-04
+-7.36320070E-08 6.45113563E-07 3.97685132E-10 0.00000000E+00-1.10452945E-08
+ 0.00000000E+00 5.71752679E-11 3.18864756E-08 0.00000000E+00-1.73927334E-06
+-2.10582022E-21 0.00000000E+00-5.65788654E-11 4.84969212E-07-4.38176119E-10
+ 3.59826817E-04 0.00000000E+00 8.99280138E-05 0.00000000E+00-1.07277955E-06
+-2.78187155E-20 1.47116196E-06-4.84899322E-21 0.00000000E+00-1.10452945E-08
+ 0.00000000E+00 5.71752679E-11 1.36530480E-04-7.36320070E-08-6.45113563E-07
+ 3.97685132E-10 4.11689936E-08 1.31006298E-10 0.00000000E+00 1.37940565E-11
+-1.15557012E-07-7.81475425E-22 4.49393384E-05 0.00000000E+00 4.84969212E-07
+ 4.38176119E-10 4.00360879E-08-1.01227467E-11 0.00000000E+00 5.65788654E-11
+ 0.00000000E+00 1.49100624E-13-1.44067264E-05-8.14286976E-20 8.63877587E-08
+ 5.10993374E-22 3.46175643E-03 0.00000000E+00-2.24751703E-05 0.00000000E+00
+ 0.00000000E+00 1.37940565E-11-4.11689936E-08 1.31006298E-10 4.49393384E-05
+ 0.00000000E+00-1.15557012E-07 7.81475425E-22 0.00000000E+00 5.65788654E-11
+ 0.00000000E+00 1.49100624E-13-4.84969212E-07 4.38176119E-10-4.00360879E-08
+-1.01227467E-11 3.46175643E-03 0.00000000E+00-2.24751703E-05 0.00000000E+00
+-1.44067264E-05 8.14286976E-20 8.63877587E-08-5.10993374E-22-2.67589582E-06
+ 4.89750120E-21 2.25394106E-05 0.00000000E+00-4.11689936E-08-1.31006298E-10
+ 0.00000000E+00-1.37940565E-11-1.73927334E-06 2.10582022E-21 6.70278439E-08
+-1.73870336E-21 3.18864756E-08 0.00000000E+00-2.24899751E-05 0.00000000E+00
+ 1.39177137E-05 1.92615125E-09-4.00360879E-08 1.01227467E-11 0.00000000E+00
+ 5.77058951E-10 0.00000000E+00-1.49100624E-13 1.30904404E-06 3.02914454E-21
+ 8.99321598E-05 0.00000000E+00-2.96877452E-04-4.28416442E-08-1.60613057E-06
+-2.13146761E-10 0.00000000E+00-1.12549393E-08 0.00000000E+00-5.84557828E-11
+ 2.67330275E-05 7.35272761E-20 5.56528379E-06 1.74938089E-20 1.07918818E-03
+ 0.00000000E+00 1.79864261E-04 0.00000000E+00-3.52400914E-04-3.55563601E-08
+ 1.76635315E-06 1.92123858E-10 0.00000000E+00-1.12390890E-08 0.00000000E+00
+ 5.84037915E-11-2.24899751E-05 0.00000000E+00 6.70278439E-08 1.73870336E-21
+ 0.00000000E+00-1.49100624E-13 4.00360879E-08 1.01227467E-11 8.99280138E-05
+ 0.00000000E+00 3.59732256E-04 0.00000000E+00 1.47116196E-06-4.84899322E-21
+ 5.94746735E-06-2.00955888E-20 0.00000000E+00-1.23457263E-08 0.00000000E+00
+-8.04509373E-14 2.38364603E-04-6.17741630E-08 8.00779516E-08 1.53780889E-11
+ 8.99321598E-05 0.00000000E+00-6.74491053E-05 0.00000000E+00 1.30904404E-06
+-3.02914454E-21-1.71858196E-06 5.13073835E-21 0.00000000E+00 5.59473200E-10
+ 0.00000000E+00 1.29978248E-14-2.47149660E-05 8.84389392E-10 4.00556460E-08
+ 5.25572555E-12 6.70278439E-08-1.73870336E-21-2.24899751E-05 0.00000000E+00
+-4.00360879E-08 1.01227467E-11 0.00000000E+00-1.49100624E-13 1.47116196E-06
+ 4.84899322E-21 5.94746735E-06 2.00955888E-20 8.99280138E-05 0.00000000E+00
+ 3.59732256E-04 0.00000000E+00-2.38364603E-04-6.17741630E-08-8.00779516E-08
+ 1.53780889E-11 0.00000000E+00-1.23457263E-08 0.00000000E+00-8.04509373E-14
+ 1.30904404E-06 3.02914454E-21-1.71858196E-06-5.13073835E-21 8.99321598E-05
+ 0.00000000E+00-6.74491053E-05 0.00000000E+00 2.47149660E-05 8.84389392E-10
+-4.00556460E-08 5.25572555E-12 0.00000000E+00 5.59473200E-10 0.00000000E+00
+ 1.29978248E-14 0.00000000E+00-5.77058951E-10 1.39177137E-05-1.92615125E-09
+ 3.46175643E-03 0.00000000E+00-1.44067264E-05 8.14286976E-20 0.00000000E+00
+ 1.10452945E-08 0.00000000E+00 1.23457263E-08-1.36530480E-04 7.36320070E-08
+-2.38364603E-04 6.17741630E-08 1.64791001E+00 0.00000000E+00-2.23105181E-03
+ 0.00000000E+00-1.32736728E-02 3.53051191E-17 5.94060576E-08-9.25859891E-20
+ 0.00000000E+00 1.12549393E-08 0.00000000E+00-5.64436733E-10-2.96877452E-04
+ 4.28416442E-08 7.74947050E-06-3.11044660E-09 1.74331755E-01 0.00000000E+00
+-1.11767146E-03 0.00000000E+00-2.29416912E-03 1.06347697E-18 1.43448783E-05
+-7.24079001E-21 0.00000000E+00 1.49100624E-13-4.00360879E-08-1.01227467E-11
+-2.24751703E-05 0.00000000E+00 8.63877587E-08-5.10993374E-22 0.00000000E+00
+-5.71752679E-11 0.00000000E+00 8.04509373E-14 6.45113563E-07-3.97685132E-10
+-8.00779516E-08-1.53780889E-11-2.23105181E-03 0.00000000E+00 3.19448666E-05
+ 0.00000000E+00 5.94060576E-08-9.25859891E-20-2.29647159E-07 6.57272771E-22
+ 0.00000000E+00 5.84557828E-11 0.00000000E+00-1.29978248E-14-1.60613057E-06
+ 2.13146761E-10-4.00556460E-08-5.25572555E-12 1.06108141E-03 0.00000000E+00
+-6.52091892E-06 0.00000000E+00-1.43428033E-05 5.81959875E-21 8.59673429E-08
+-3.75330692E-23-1.39177137E-05-1.92615125E-09 0.00000000E+00-5.77058951E-10
+-1.44067264E-05-8.14286976E-20 3.46175643E-03 0.00000000E+00 1.36530480E-04
+ 7.36320070E-08 2.38364603E-04 6.17741630E-08 0.00000000E+00 1.10452945E-08
+ 0.00000000E+00 1.23457263E-08-1.32736728E-02-3.53051191E-17 5.94060576E-08
+ 9.25859891E-20 1.64791001E+00 0.00000000E+00-2.23105181E-03 0.00000000E+00
+ 2.96877452E-04 4.28416442E-08-7.74947050E-06-3.11044660E-09 0.00000000E+00
+ 1.12549393E-08 0.00000000E+00-5.64436733E-10-2.29416912E-03-1.06347697E-18
+ 1.43448783E-05 7.24079001E-21 1.74331755E-01 0.00000000E+00-1.11767146E-03
+ 0.00000000E+00 4.00360879E-08-1.01227467E-11 0.00000000E+00 1.49100624E-13
+ 8.63877587E-08 5.10993374E-22-2.24751703E-05 0.00000000E+00-6.45113563E-07
+-3.97685132E-10 8.00779516E-08-1.53780889E-11 0.00000000E+00-5.71752679E-11
+ 0.00000000E+00 8.04509373E-14 5.94060576E-08 9.25859891E-20-2.29647159E-07
+-6.57272771E-22-2.23105181E-03 0.00000000E+00 3.19448666E-05 0.00000000E+00
+ 1.60613057E-06 2.13146761E-10 4.00556460E-08-5.25572555E-12 0.00000000E+00
+ 5.84557828E-11 0.00000000E+00-1.29978248E-14-1.43428033E-05-5.81959875E-21
+ 8.59673429E-08 3.75330692E-23 1.06108141E-03 0.00000000E+00-6.52091892E-06
+ 0.00000000E+00 8.99321598E-05 0.00000000E+00 1.30904404E-06-3.02914454E-21
+ 0.00000000E+00-1.12549393E-08 0.00000000E+00-5.84557828E-11 2.96877452E-04
+-4.28416442E-08 1.60613057E-06-2.13146761E-10 1.07918818E-03 0.00000000E+00
+ 1.79864261E-04 0.00000000E+00 2.67330275E-05-7.35272761E-20 5.56528379E-06
+-1.74938089E-20 0.00000000E+00-1.12390890E-08 0.00000000E+00 5.84037915E-11
+ 3.52400914E-04-3.55563601E-08-1.76635315E-06 1.92123858E-10 5.56565485E-06
+ 2.29650515E-20 1.79863913E-04 0.00000000E+00-5.12877382E-04-2.34839158E-08
+-2.72813795E-06-1.19277363E-10 0.00000000E+00-1.12045574E-08 0.00000000E+00
+-5.82021977E-11 7.26660368E-05 2.44747131E-19 1.28088842E-05 3.38942009E-20
+ 1.79859350E-03 0.00000000E+00 2.69783831E-04 0.00000000E+00-5.68458816E-04
+-2.14969501E-08 2.88852736E-06 1.13653296E-10 0.00000000E+00-1.12099721E-08
+ 0.00000000E+00 5.82194154E-11-6.74491053E-05 0.00000000E+00-1.71858196E-06
+ 5.13073835E-21 0.00000000E+00 5.64436733E-10 0.00000000E+00 1.29978248E-14
+-7.74947050E-06 3.11044660E-09 4.00556460E-08 5.25572555E-12 1.79864261E-04
+ 0.00000000E+00 7.19451870E-04 0.00000000E+00 5.56528379E-06-1.74938089E-20
+ 2.33281703E-05-7.93754566E-20 0.00000000E+00-1.23308054E-08 0.00000000E+00
+ 2.28271294E-14 4.75883551E-04-3.05923725E-08 8.01437247E-08 5.53767826E-12
+ 1.79863913E-04 0.00000000E+00-1.12411936E-04 0.00000000E+00 5.56565485E-06
+-2.29650515E-20-4.59363476E-06 1.42148131E-20 0.00000000E+00 5.61285266E-10
+ 0.00000000E+00-4.30441273E-15-3.55254014E-05 8.35669366E-10 4.00973523E-08
+ 1.40601695E-12 4.00556460E-08-5.25572555E-12 0.00000000E+00-1.29978248E-14
+ 1.43448783E-05 7.24079001E-21 8.59673429E-08 3.75330692E-23-1.11767146E-03
+ 0.00000000E+00-6.52091892E-06 0.00000000E+00-1.76635315E-06-1.92123858E-10
+ 8.01437247E-08-5.53767826E-12 0.00000000E+00-5.84037915E-11 0.00000000E+00
+-2.28271294E-14 2.87743409E-08-7.20469794E-20-2.29031915E-07-4.59228377E-22
+-4.54185892E-04 0.00000000E+00 1.34401670E-05 0.00000000E+00 2.72813795E-06
+ 1.19277363E-10 4.00973523E-08-1.40601695E-12 0.00000000E+00 5.82021977E-11
+ 0.00000000E+00 4.30441273E-15-1.43150613E-05-5.94791759E-20 8.58024019E-08
+ 3.49521727E-22 6.38464092E-04 0.00000000E+00-3.88461866E-06 0.00000000E+00
+-2.47149660E-05-8.84389392E-10 0.00000000E+00-5.59473200E-10-2.29416912E-03
+-1.06347697E-18-1.43428033E-05-5.81959875E-21 1.74331755E-01 0.00000000E+00
+ 1.06108141E-03 0.00000000E+00 3.52400914E-04 3.55563601E-08 4.75883551E-04
+ 3.05923725E-08 0.00000000E+00 1.12390890E-08 0.00000000E+00 1.23308054E-08
+-1.32430655E-02-2.34874761E-17 2.87743409E-08-7.20469794E-20 7.60152437E-01
+ 0.00000000E+00-4.54185892E-04 0.00000000E+00 5.12877382E-04 2.34839158E-08
+-1.85421922E-05-1.44068655E-09 0.00000000E+00 1.12045574E-08 0.00000000E+00
+-5.59600115E-10-2.28977138E-03-9.25994732E-18 1.43175806E-05 5.65726722E-20
+ 1.03730500E-01 0.00000000E+00-6.58398978E-04 0.00000000E+00 0.00000000E+00
+-1.29978248E-14-4.00556460E-08-5.25572555E-12-1.11767146E-03 0.00000000E+00
+-6.52091892E-06 0.00000000E+00 1.43448783E-05-7.24079001E-21 8.59673429E-08
+-3.75330692E-23 0.00000000E+00-5.84037915E-11 0.00000000E+00-2.28271294E-14
+ 1.76635315E-06-1.92123858E-10-8.01437247E-08-5.53767826E-12-4.54185892E-04
+ 0.00000000E+00 1.34401670E-05 0.00000000E+00 2.87743409E-08 7.20469794E-20
+-2.29031915E-07 4.59228377E-22 0.00000000E+00 5.82021977E-11 0.00000000E+00
+ 4.30441273E-15-2.72813795E-06 1.19277363E-10-4.00973523E-08-1.40601695E-12
+ 6.38464092E-04 0.00000000E+00-3.88461866E-06 0.00000000E+00-1.43150613E-05
+ 5.94791759E-20 8.58024019E-08-3.49521727E-22 0.00000000E+00-5.59473200E-10
+ 2.47149660E-05-8.84389392E-10 1.74331755E-01 0.00000000E+00 1.06108141E-03
+ 0.00000000E+00-2.29416912E-03 1.06347697E-18-1.43428033E-05 5.81959875E-21
+ 0.00000000E+00 1.12390890E-08 0.00000000E+00 1.23308054E-08-3.52400914E-04
+ 3.55563601E-08-4.75883551E-04 3.05923725E-08 7.60152437E-01 0.00000000E+00
+-4.54185892E-04 0.00000000E+00-1.32430655E-02 2.34874761E-17 2.87743409E-08
+ 7.20469794E-20 0.00000000E+00 1.12045574E-08 0.00000000E+00-5.59600115E-10
+-5.12877382E-04 2.34839158E-08 1.85421922E-05-1.44068655E-09 1.03730500E-01
+ 0.00000000E+00-6.58398978E-04 0.00000000E+00-2.28977138E-03 9.25994732E-18
+ 1.43175806E-05-5.65726722E-20-1.71858196E-06-5.13073835E-21-6.74491053E-05
+ 0.00000000E+00 7.74947050E-06 3.11044660E-09-4.00556460E-08 5.25572555E-12
+ 0.00000000E+00 5.64436733E-10 0.00000000E+00 1.29978248E-14 5.56528379E-06
+ 1.74938089E-20 2.33281703E-05 7.93754566E-20 1.79864261E-04 0.00000000E+00
+ 7.19451870E-04 0.00000000E+00-4.75883551E-04-3.05923725E-08-8.01437247E-08
+ 5.53767826E-12 0.00000000E+00-1.23308054E-08 0.00000000E+00 2.28271294E-14
+ 5.56565485E-06 2.29650515E-20-4.59363476E-06-1.42148131E-20 1.79863913E-04
+ 0.00000000E+00-1.12411936E-04 0.00000000E+00 3.55254014E-05 8.35669366E-10
+-4.00973523E-08 1.40601695E-12 0.00000000E+00 5.61285266E-10 0.00000000E+00
+-4.30441273E-15 1.79863913E-04 0.00000000E+00 5.56565485E-06-2.29650515E-20
+ 0.00000000E+00-1.12045574E-08 0.00000000E+00-5.82021977E-11 5.12877382E-04
+-2.34839158E-08 2.72813795E-06-1.19277363E-10 1.79859350E-03 0.00000000E+00
+ 2.69783831E-04 0.00000000E+00 7.26660368E-05-2.44747131E-19 1.28088842E-05
+-3.38942009E-20 0.00000000E+00-1.12099721E-08 0.00000000E+00 5.82194154E-11
+ 5.68458816E-04-2.14969501E-08-2.88852736E-06 1.13653296E-10 1.28085178E-05
+ 2.73625613E-20 2.69783796E-04 0.00000000E+00-7.29077597E-04-1.73982443E-08
+-3.85112643E-06-8.89642472E-11 0.00000000E+00-1.12192998E-08 0.00000000E+00
+-5.82738132E-11 1.42103194E-04 1.39044929E-19 2.29234356E-05 1.03804859E-20
+ 2.51791576E-03 0.00000000E+00 3.59694243E-04 0.00000000E+00-7.84639382E-04
+-1.62527509E-08 4.01146490E-06 8.56509434E-11 0.00000000E+00-1.12169175E-08
+ 0.00000000E+00 5.82667048E-11-1.12411936E-04 0.00000000E+00-4.59363476E-06
+ 1.42148131E-20 0.00000000E+00 5.59600115E-10 0.00000000E+00-4.30441273E-15
+-1.85421922E-05 1.44068655E-09 4.00973523E-08 1.40601695E-12 2.69783831E-04
+ 0.00000000E+00 1.07913188E-03 0.00000000E+00 1.28088842E-05-3.38942009E-20
+ 5.22604536E-05-1.12664940E-19 0.00000000E+00-1.23399491E-08 0.00000000E+00
+-5.94873314E-15 7.13647459E-04-2.11857251E-08 8.02462213E-08 1.92320131E-12
+ 2.69783796E-04 0.00000000E+00-1.57369510E-04 0.00000000E+00 1.28085178E-05
+-2.73625613E-20-8.93298836E-06 9.43576181E-21 0.00000000E+00 5.60491634E-10
+ 0.00000000E+00 1.77710210E-15-4.63305669E-05 6.69554903E-10 4.00846181E-08
+ 8.28325962E-13 4.00973523E-08-1.40601695E-12 0.00000000E+00 4.30441273E-15
+ 1.43175806E-05 5.65726722E-20 8.58024019E-08 3.49521727E-22-6.58398978E-04
+ 0.00000000E+00-3.88461866E-06 0.00000000E+00-2.88852736E-06-1.13653296E-10
+ 8.02462213E-08-1.92320131E-12 0.00000000E+00-5.82194154E-11 0.00000000E+00
+ 5.94873314E-15 4.63975999E-08 7.54135274E-20-2.28481579E-07-5.94446546E-22
+-1.95715777E-04 0.00000000E+00 8.76228911E-06 0.00000000E+00 3.85112643E-06
+ 8.89642472E-11 4.00846181E-08-8.28325962E-13 0.00000000E+00 5.82738132E-11
+ 0.00000000E+00-1.77710210E-15-1.42715375E-05-4.04650056E-21 8.55455758E-08
+ 3.29828935E-23 4.58192075E-04 0.00000000E+00-2.77573680E-06 0.00000000E+00
+-3.55254014E-05-8.35669366E-10 0.00000000E+00-5.61285266E-10-2.28977138E-03
+-9.25994732E-18-1.43150613E-05-5.94791759E-20 1.03730500E-01 0.00000000E+00
+ 6.38464092E-04 0.00000000E+00 5.68458816E-04 2.14969501E-08 7.13647459E-04
+ 2.11857251E-08 0.00000000E+00 1.12099721E-08 0.00000000E+00 1.23399491E-08
+-1.32118254E-02-3.86618193E-17 4.63975999E-08 7.54135274E-20 5.01879160E-01
+ 0.00000000E+00-1.95715777E-04 0.00000000E+00 7.29077597E-04 1.73982443E-08
+-2.93532413E-05-1.01971688E-09 0.00000000E+00 1.12192998E-08 0.00000000E+00
+-5.61224041E-10-2.28293252E-03-9.53435983E-19 1.42754972E-05 7.59402659E-21
+ 7.40981060E-02 0.00000000E+00-4.68283605E-04 0.00000000E+00 0.00000000E+00
+ 4.30441273E-15-4.00973523E-08-1.40601695E-12-6.58398978E-04 0.00000000E+00
+-3.88461866E-06 0.00000000E+00 1.43175806E-05-5.65726722E-20 8.58024019E-08
+-3.49521727E-22 0.00000000E+00-5.82194154E-11 0.00000000E+00 5.94873314E-15
+ 2.88852736E-06-1.13653296E-10-8.02462213E-08-1.92320131E-12-1.95715777E-04
+ 0.00000000E+00 8.76228911E-06 0.00000000E+00 4.63975999E-08-7.54135274E-20
+-2.28481579E-07 5.94446546E-22 0.00000000E+00 5.82738132E-11 0.00000000E+00
+-1.77710210E-15-3.85112643E-06 8.89642472E-11-4.00846181E-08-8.28325962E-13
+ 4.58192075E-04 0.00000000E+00-2.77573680E-06 0.00000000E+00-1.42715375E-05
+ 4.04650056E-21 8.55455758E-08-3.29828935E-23 0.00000000E+00-5.61285266E-10
+ 3.55254014E-05-8.35669366E-10 1.03730500E-01 0.00000000E+00 6.38464092E-04
+ 0.00000000E+00-2.28977138E-03 9.25994732E-18-1.43150613E-05 5.94791759E-20
+ 0.00000000E+00 1.12099721E-08 0.00000000E+00 1.23399491E-08-5.68458816E-04
+ 2.14969501E-08-7.13647459E-04 2.11857251E-08 5.01879160E-01 0.00000000E+00
+-1.95715777E-04 0.00000000E+00-1.32118254E-02 3.86618193E-17 4.63975999E-08
+-7.54135274E-20 0.00000000E+00 1.12192998E-08 0.00000000E+00-5.61224041E-10
+-7.29077597E-04 1.73982443E-08 2.93532413E-05-1.01971688E-09 7.40981060E-02
+ 0.00000000E+00-4.68283605E-04 0.00000000E+00-2.28293252E-03 9.53435983E-19
+ 1.42754972E-05-7.59402659E-21-4.59363476E-06-1.42148131E-20-1.12411936E-04
+ 0.00000000E+00 1.85421922E-05 1.44068655E-09-4.00973523E-08 1.40601695E-12
+ 0.00000000E+00 5.59600115E-10 0.00000000E+00-4.30441273E-15 1.28088842E-05
+ 3.38942009E-20 5.22604536E-05 1.12664940E-19 2.69783831E-04 0.00000000E+00
+ 1.07913188E-03 0.00000000E+00-7.13647459E-04-2.11857251E-08-8.02462213E-08
+ 1.92320131E-12 0.00000000E+00-1.23399491E-08 0.00000000E+00-5.94873314E-15
+ 1.28085178E-05 2.73625613E-20-8.93298836E-06-9.43576181E-21 2.69783796E-04
+ 0.00000000E+00-1.57369510E-04 0.00000000E+00 4.63305669E-05 6.69554903E-10
+-4.00846181E-08 8.28325962E-13 0.00000000E+00 5.60491634E-10 0.00000000E+00
+ 1.77710210E-15 2.69783796E-04 0.00000000E+00 1.28085178E-05-2.73625613E-20
+ 0.00000000E+00-1.12192998E-08 0.00000000E+00-5.82738132E-11 7.29077597E-04
+-1.73982443E-08 3.85112643E-06-8.89642472E-11 2.51791576E-03 0.00000000E+00
+ 3.59694243E-04 0.00000000E+00 1.42103194E-04-1.39044929E-19 2.29234356E-05
+-1.03804859E-20 0.00000000E+00-1.12169175E-08 0.00000000E+00 5.82667048E-11
+ 7.84639382E-04-1.62527509E-08-4.01146490E-06 8.56509434E-11 2.29238722E-05
+ 9.87779310E-21 3.59693602E-04 0.00000000E+00-9.44815294E-04-1.38354753E-08
+-4.97144205E-06-7.11176290E-11 0.00000000E+00-1.12096143E-08 0.00000000E+00
+-5.82271351E-11 2.34586808E-04 2.47024411E-19 3.59289123E-05 5.64661482E-20
+ 3.23713832E-03 0.00000000E+00 4.49589946E-04 0.00000000E+00-1.00015628E-03
+-1.32291835E-08 5.13113463E-06 6.93769384E-11 0.00000000E+00-1.12148576E-08
+ 0.00000000E+00 5.82418876E-11-1.57369510E-04 0.00000000E+00-8.93298836E-06
+ 9.43576181E-21 0.00000000E+00 5.61224041E-10 0.00000000E+00 1.77710210E-15
+-2.93532413E-05 1.01971688E-09 4.00846181E-08 8.28325962E-13 3.59694243E-04
+ 0.00000000E+00 1.43877075E-03 0.00000000E+00 2.29234356E-05-1.03804859E-20
+ 9.27268509E-05-6.32930871E-20 0.00000000E+00-1.23322150E-08 0.00000000E+00
+ 8.06359294E-15 9.51279658E-04-1.63560626E-08 7.99854936E-08 1.16169643E-12
+ 3.59693602E-04 0.00000000E+00-2.02320887E-04 0.00000000E+00 2.29238722E-05
+-9.87779310E-21-1.47131961E-05 1.65859853E-20 0.00000000E+00 5.61556897E-10
+ 0.00000000E+00-3.68814693E-15-5.70782032E-05 5.85692579E-10 3.99231467E-08
+ 4.35172656E-13 4.00846181E-08-8.28325962E-13 0.00000000E+00-1.77710210E-15
+ 1.42754972E-05 7.59402659E-21 8.55455758E-08 3.29828935E-23-4.68283605E-04
+ 0.00000000E+00-2.77573680E-06 0.00000000E+00-4.01146490E-06-8.56509434E-11
+ 7.99854936E-08-1.16169643E-12 0.00000000E+00-5.82667048E-11 0.00000000E+00
+-8.06359294E-15 6.25922200E-08-7.84850769E-20-2.27669122E-07-4.27734956E-22
+-1.08700169E-04 0.00000000E+00 6.53879903E-06 0.00000000E+00 4.97144205E-06
+ 7.11176290E-11 3.99231467E-08-4.35172656E-13 0.00000000E+00 5.82271351E-11
+ 0.00000000E+00 3.68814693E-15-1.42128733E-05-6.35609445E-20 8.51968569E-08
+ 3.68100247E-22 3.58206885E-04 0.00000000E+00-2.16474619E-06 0.00000000E+00
+-4.63305669E-05-6.69554903E-10 0.00000000E+00-5.60491634E-10-2.28293252E-03
+-9.53435983E-19-1.42715375E-05-4.04650056E-21 7.40981060E-02 0.00000000E+00
+ 4.58192075E-04 0.00000000E+00 7.84639382E-04 1.62527509E-08 9.51279658E-04
+ 1.63560626E-08 0.00000000E+00 1.12169175E-08 0.00000000E+00 1.23322150E-08
+-1.31646922E-02-1.97281930E-17 6.25922200E-08-7.84850769E-20 3.76105923E-01
+ 0.00000000E+00-1.08700169E-04 0.00000000E+00 9.44815294E-04 1.38354753E-08
+-4.01685043E-05-7.70777887E-10 0.00000000E+00 1.12096143E-08 0.00000000E+00
+-5.59962054E-10-2.27363948E-03-9.76309193E-18 1.42178734E-05 5.87539710E-20
+ 5.77810279E-02 0.00000000E+00-3.64275454E-04 0.00000000E+00 0.00000000E+00
+-1.77710210E-15-4.00846181E-08-8.28325962E-13-4.68283605E-04 0.00000000E+00
+-2.77573680E-06 0.00000000E+00 1.42754972E-05-7.59402659E-21 8.55455758E-08
+-3.29828935E-23 0.00000000E+00-5.82667048E-11 0.00000000E+00-8.06359294E-15
+ 4.01146490E-06-8.56509434E-11-7.99854936E-08-1.16169643E-12-1.08700169E-04
+ 0.00000000E+00 6.53879903E-06 0.00000000E+00 6.25922200E-08 7.84850769E-20
+-2.27669122E-07 4.27734956E-22 0.00000000E+00 5.82271351E-11 0.00000000E+00
+ 3.68814693E-15-4.97144205E-06 7.11176290E-11-3.99231467E-08-4.35172656E-13
+ 3.58206885E-04 0.00000000E+00-2.16474619E-06 0.00000000E+00-1.42128733E-05
+ 6.35609445E-20 8.51968569E-08-3.68100247E-22 0.00000000E+00-5.60491634E-10
+ 4.63305669E-05-6.69554903E-10 7.40981060E-02 0.00000000E+00 4.58192075E-04
+ 0.00000000E+00-2.28293252E-03 9.53435983E-19-1.42715375E-05 4.04650056E-21
+ 0.00000000E+00 1.12169175E-08 0.00000000E+00 1.23322150E-08-7.84639382E-04
+ 1.62527509E-08-9.51279658E-04 1.63560626E-08 3.76105923E-01 0.00000000E+00
+-1.08700169E-04 0.00000000E+00-1.31646922E-02 1.97281930E-17 6.25922200E-08
+ 7.84850769E-20 0.00000000E+00 1.12096143E-08 0.00000000E+00-5.59962054E-10
+-9.44815294E-04 1.38354753E-08 4.01685043E-05-7.70777887E-10 5.77810279E-02
+ 0.00000000E+00-3.64275454E-04 0.00000000E+00-2.27363948E-03 9.76309193E-18
+ 1.42178734E-05-5.87539710E-20-8.93298836E-06-9.43576181E-21-1.57369510E-04
+ 0.00000000E+00 2.93532413E-05 1.01971688E-09-4.00846181E-08 8.28325962E-13
+ 0.00000000E+00 5.61224041E-10 0.00000000E+00 1.77710210E-15 2.29234356E-05
+ 1.03804859E-20 9.27268509E-05 6.32930871E-20 3.59694243E-04 0.00000000E+00
+ 1.43877075E-03 0.00000000E+00-9.51279658E-04-1.63560626E-08-7.99854936E-08
+ 1.16169643E-12 0.00000000E+00-1.23322150E-08 0.00000000E+00 8.06359294E-15
+ 2.29238722E-05 9.87779310E-21-1.47131961E-05-1.65859853E-20 3.59693602E-04
+ 0.00000000E+00-2.02320887E-04 0.00000000E+00 5.70782032E-05 5.85692579E-10
+-3.99231467E-08 4.35172656E-13 0.00000000E+00 5.61556897E-10 0.00000000E+00
+-3.68814693E-15 3.59693602E-04 0.00000000E+00 2.29238722E-05-9.87779310E-21
+ 0.00000000E+00-1.12096143E-08 0.00000000E+00-5.82271351E-11 9.44815294E-04
+-1.38354753E-08 4.97144205E-06-7.11176290E-11 3.23713832E-03 0.00000000E+00
+ 4.49589946E-04 0.00000000E+00 2.34586808E-04-2.47024411E-19 3.59289123E-05
+-5.64661482E-20 0.00000000E+00-1.12148576E-08 0.00000000E+00 5.82418876E-11
+ 1.00015628E-03-1.32291835E-08-5.13113463E-06 6.93769384E-11 3.59289115E-05
+ 5.94731204E-20 4.49589088E-04 0.00000000E+00-1.15981939E-03-1.18047173E-08
+-6.08802784E-06-6.08490869E-11 0.00000000E+00-1.12333206E-08 0.00000000E+00
+-5.83340138E-11 3.50159574E-04 8.14902151E-19 5.18169310E-05 1.45366357E-19
+ 3.95623235E-03 0.00000000E+00 5.39467669E-04 0.00000000E+00-1.21502239E-03
+-1.14356413E-08 6.24732475E-06 5.97827293E-11 0.00000000E+00-1.12082093E-08
+ 0.00000000E+00 5.82634973E-11-2.02320887E-04 0.00000000E+00-1.47131961E-05
+ 1.65859853E-20 0.00000000E+00 5.59962054E-10 0.00000000E+00-3.68814693E-15
+-4.01685043E-05 7.70777887E-10 3.99231467E-08 4.35172656E-13 4.49589946E-04
+ 0.00000000E+00 1.79835190E-03 0.00000000E+00 3.59289123E-05-5.64661482E-20
+ 1.44745330E-04-2.45879363E-19 0.00000000E+00-1.23554119E-08 0.00000000E+00
+-2.75330935E-14 1.18803225E-03-1.36932881E-08 7.97327741E-08 7.21038593E-13
+ 4.49589088E-04 0.00000000E+00-2.47264189E-04 0.00000000E+00 3.59289115E-05
+-5.94731204E-20-2.19364606E-05 5.12098693E-20 0.00000000E+00 5.56593668E-10
+ 0.00000000E+00 1.76291254E-14-6.78040978E-05 5.26195525E-10 3.98242299E-08
+ 2.66589418E-13 3.99231467E-08-4.35172656E-13 0.00000000E+00 3.68814693E-15
+ 1.42178734E-05 5.87539710E-20 8.51968569E-08 3.68100247E-22-3.64275454E-04
+ 0.00000000E+00-2.16474619E-06 0.00000000E+00-5.13113463E-06-6.93769384E-11
+ 7.97327741E-08-7.21038593E-13 0.00000000E+00-5.82418876E-11 0.00000000E+00
+ 2.75330935E-14 7.83112096E-08 4.05489964E-20-2.26624779E-07-8.82760381E-22
+-6.89716507E-05 0.00000000E+00 5.23308808E-06 0.00000000E+00 6.08802784E-06
+ 6.08490869E-11 3.98242299E-08-2.66589418E-13 0.00000000E+00 5.83340138E-11
+ 0.00000000E+00-1.76291254E-14-1.41396712E-05-3.47038974E-20 8.47613096E-08
+ 2.17106647E-22 2.94748908E-04 0.00000000E+00-1.77846133E-06 0.00000000E+00
+-5.70782032E-05-5.85692579E-10 0.00000000E+00-5.61556897E-10-2.27363948E-03
+-9.76309193E-18-1.42128733E-05-6.35609445E-20 5.77810279E-02 0.00000000E+00
+ 3.58206885E-04 0.00000000E+00 1.00015628E-03 1.32291835E-08 1.18803225E-03
+ 1.36932881E-08 0.00000000E+00 1.12148576E-08 0.00000000E+00 1.23554119E-08
+-1.31044475E-02-5.55521453E-17 7.83112096E-08 4.05489964E-20 3.01582648E-01
+ 0.00000000E+00-6.89716507E-05 0.00000000E+00 1.15981939E-03 1.18047173E-08
+-5.09365019E-05-6.38994441E-10 0.00000000E+00 1.12333206E-08 0.00000000E+00
+-5.64229096E-10-2.26202967E-03-5.82661399E-18 1.41458160E-05 3.80291090E-20
+ 4.74677487E-02 0.00000000E+00-2.98787710E-04 0.00000000E+00 0.00000000E+00
+ 3.68814693E-15-3.99231467E-08-4.35172656E-13-3.64275454E-04 0.00000000E+00
+-2.16474619E-06 0.00000000E+00 1.42178734E-05-5.87539710E-20 8.51968569E-08
+-3.68100247E-22 0.00000000E+00-5.82418876E-11 0.00000000E+00 2.75330935E-14
+ 5.13113463E-06-6.93769384E-11-7.97327741E-08-7.21038593E-13-6.89716507E-05
+ 0.00000000E+00 5.23308808E-06 0.00000000E+00 7.83112096E-08-4.05489964E-20
+-2.26624779E-07 8.82760381E-22 0.00000000E+00 5.83340138E-11 0.00000000E+00
+-1.76291254E-14-6.08802784E-06 6.08490869E-11-3.98242299E-08-2.66589418E-13
+ 2.94748908E-04 0.00000000E+00-1.77846133E-06 0.00000000E+00-1.41396712E-05
+ 3.47038974E-20 8.47613096E-08-2.17106647E-22 0.00000000E+00-5.61556897E-10
+ 5.70782032E-05-5.85692579E-10 5.77810279E-02 0.00000000E+00 3.58206885E-04
+ 0.00000000E+00-2.27363948E-03 9.76309193E-18-1.42128733E-05 6.35609445E-20
+ 0.00000000E+00 1.12148576E-08 0.00000000E+00 1.23554119E-08-1.00015628E-03
+ 1.32291835E-08-1.18803225E-03 1.36932881E-08 3.01582648E-01 0.00000000E+00
+-6.89716507E-05 0.00000000E+00-1.31044475E-02 5.55521453E-17 7.83112096E-08
+-4.05489964E-20 0.00000000E+00 1.12333206E-08 0.00000000E+00-5.64229096E-10
+-1.15981939E-03 1.18047173E-08 5.09365019E-05-6.38994441E-10 4.74677487E-02
+ 0.00000000E+00-2.98787710E-04 0.00000000E+00-2.26202967E-03 5.82661399E-18
+ 1.41458160E-05-3.80291090E-20-1.47131961E-05-1.65859853E-20-2.02320887E-04
+ 0.00000000E+00 4.01685043E-05 7.70777887E-10-3.99231467E-08 4.35172656E-13
+ 0.00000000E+00 5.59962054E-10 0.00000000E+00-3.68814693E-15 3.59289123E-05
+ 5.64661482E-20 1.44745330E-04 2.45879363E-19 4.49589946E-04 0.00000000E+00
+ 1.79835190E-03 0.00000000E+00-1.18803225E-03-1.36932881E-08-7.97327741E-08
+ 7.21038593E-13 0.00000000E+00-1.23554119E-08 0.00000000E+00-2.75330935E-14
+ 3.59289115E-05 5.94731204E-20-2.19364606E-05-5.12098693E-20 4.49589088E-04
+ 0.00000000E+00-2.47264189E-04 0.00000000E+00 6.78040978E-05 5.26195525E-10
+-3.98242299E-08 2.66589418E-13 0.00000000E+00 5.56593668E-10 0.00000000E+00
+ 1.76291254E-14 4.49589088E-04 0.00000000E+00 3.59289115E-05-5.94731204E-20
+ 0.00000000E+00-1.12333206E-08 0.00000000E+00-5.83340138E-11 1.15981939E-03
+-1.18047173E-08 6.08802784E-06-6.08490869E-11 3.95623235E-03 0.00000000E+00
+ 5.39467669E-04 0.00000000E+00 3.50159574E-04-8.14902151E-19 5.18169310E-05
+-1.45366357E-19 0.00000000E+00-1.12082093E-08 0.00000000E+00 5.82634973E-11
+ 1.21502239E-03-1.14356413E-08-6.24732475E-06 5.97827293E-11 5.18171855E-05
+ 1.38518998E-19 5.39466318E-04 0.00000000E+00-1.37423943E-03-1.07303302E-08
+-7.20151326E-06-5.55260596E-11 0.00000000E+00-1.09977496E-08 0.00000000E+00
+-5.70231916E-11 4.88787193E-04 1.69393974E-18 7.05851338E-05 2.91841201E-19
+ 4.67516665E-03 0.00000000E+00 6.29323843E-04 0.00000000E+00-1.42922544E-03
+-1.05590888E-08 7.36018397E-06 5.50352531E-11 0.00000000E+00-1.09138770E-08
+ 0.00000000E+00 5.67788812E-11-2.47264189E-04 0.00000000E+00-2.19364606E-05
+ 5.12098693E-20 0.00000000E+00 5.64229096E-10 0.00000000E+00 1.76291254E-14
+-5.09365019E-05 6.38994441E-10 3.98242299E-08 2.66589418E-13 5.39467669E-04
+ 0.00000000E+00 2.15786065E-03 0.00000000E+00 5.18169310E-05-1.45366357E-19
+ 2.08296867E-04-5.92292709E-19 0.00000000E+00-1.22350029E-08 0.00000000E+00
+ 1.26358035E-13 1.42416705E-03-1.21222211E-08 7.95339982E-08 3.22912241E-13
+ 5.39466318E-04 0.00000000E+00-2.92197540E-04 0.00000000E+00 5.18171855E-05
+-1.38518998E-19-3.06005798E-05 1.07590050E-19 0.00000000E+00 5.35149983E-10
+ 0.00000000E+00 6.10776156E-14-7.84855684E-05 5.06472648E-10 3.96676761E-08
+ 1.22701640E-13 3.98242299E-08-2.66589418E-13 0.00000000E+00-1.76291254E-14
+ 1.41458160E-05 3.80291090E-20 8.47613096E-08 2.17106647E-22-2.98787710E-04
+ 0.00000000E+00-1.77846133E-06 0.00000000E+00-6.24732475E-06-5.97827293E-11
+ 7.95339982E-08-3.22912241E-13 0.00000000E+00-5.82634973E-11 0.00000000E+00
+-1.26358035E-13 9.39403809E-08-1.09797825E-20-2.25346559E-07-5.52379779E-22
+-4.75331521E-05 0.00000000E+00 4.37419872E-06 0.00000000E+00 7.20151326E-06
+ 5.55260596E-11 3.96676761E-08-1.22701640E-13 0.00000000E+00 5.70231916E-11
+ 0.00000000E+00-6.10776156E-14-1.40518696E-05-3.97817735E-20 8.42382641E-08
+ 2.36371326E-22 2.50989215E-04 0.00000000E+00-1.51275971E-06 0.00000000E+00
+-6.78040978E-05-5.26195525E-10 0.00000000E+00-5.56593668E-10-2.26202967E-03
+-5.82661399E-18-1.41396712E-05-3.47038974E-20 4.74677487E-02 0.00000000E+00
+ 2.94748908E-04 0.00000000E+00 1.21502239E-03 1.14356413E-08 1.42416705E-03
+ 1.21222211E-08 0.00000000E+00 1.12082093E-08 0.00000000E+00 1.22350029E-08
+-1.30306099E-02-2.97077759E-17 9.39403809E-08-1.09797825E-20 2.52347067E-01
+ 0.00000000E+00-4.75331521E-05 0.00000000E+00 1.37423943E-03 1.07303302E-08
+-6.16842667E-05-5.58732199E-10 0.00000000E+00 1.09977496E-08 0.00000000E+00
+-5.60821695E-10-2.24808402E-03-6.29091561E-18 1.40591529E-05 3.89486588E-20
+ 4.03749001E-02 0.00000000E+00-2.53862408E-04 0.00000000E+00 0.00000000E+00
+-1.76291254E-14-3.98242299E-08-2.66589418E-13-2.98787710E-04 0.00000000E+00
+-1.77846133E-06 0.00000000E+00 1.41458160E-05-3.80291090E-20 8.47613096E-08
+-2.17106647E-22 0.00000000E+00-5.82634973E-11 0.00000000E+00-1.26358035E-13
+ 6.24732475E-06-5.97827293E-11-7.95339982E-08-3.22912241E-13-4.75331521E-05
+ 0.00000000E+00 4.37419872E-06 0.00000000E+00 9.39403809E-08 1.09797825E-20
+-2.25346559E-07 5.52379779E-22 0.00000000E+00 5.70231916E-11 0.00000000E+00
+-6.10776156E-14-7.20151326E-06 5.55260596E-11-3.96676761E-08-1.22701640E-13
+ 2.50989215E-04 0.00000000E+00-1.51275971E-06 0.00000000E+00-1.40518696E-05
+ 3.97817735E-20 8.42382641E-08-2.36371326E-22 0.00000000E+00-5.56593668E-10
+ 6.78040978E-05-5.26195525E-10 4.74677487E-02 0.00000000E+00 2.94748908E-04
+ 0.00000000E+00-2.26202967E-03 5.82661399E-18-1.41396712E-05 3.47038974E-20
+ 0.00000000E+00 1.12082093E-08 0.00000000E+00 1.22350029E-08-1.21502239E-03
+ 1.14356413E-08-1.42416705E-03 1.21222211E-08 2.52347067E-01 0.00000000E+00
+-4.75331521E-05 0.00000000E+00-1.30306099E-02 2.97077759E-17 9.39403809E-08
+ 1.09797825E-20 0.00000000E+00 1.09977496E-08 0.00000000E+00-5.60821695E-10
+-1.37423943E-03 1.07303302E-08 6.16842667E-05-5.58732199E-10 4.03749001E-02
+ 0.00000000E+00-2.53862408E-04 0.00000000E+00-2.24808402E-03 6.29091561E-18
+ 1.40591529E-05-3.89486588E-20-2.19364606E-05-5.12098693E-20-2.47264189E-04
+ 0.00000000E+00 5.09365019E-05 6.38994441E-10-3.98242299E-08 2.66589418E-13
+ 0.00000000E+00 5.64229096E-10 0.00000000E+00 1.76291254E-14 5.18169310E-05
+ 1.45366357E-19 2.08296867E-04 5.92292709E-19 5.39467669E-04 0.00000000E+00
+ 2.15786065E-03 0.00000000E+00-1.42416705E-03-1.21222211E-08-7.95339982E-08
+ 3.22912241E-13 0.00000000E+00-1.22350029E-08 0.00000000E+00 1.26358035E-13
+ 5.18171855E-05 1.38518998E-19-3.06005798E-05-1.07590050E-19 5.39466318E-04
+ 0.00000000E+00-2.92197540E-04 0.00000000E+00 7.84855684E-05 5.06472648E-10
+-3.96676761E-08 1.22701640E-13 0.00000000E+00 5.35149983E-10 0.00000000E+00
+ 6.10776156E-14 5.39466318E-04 0.00000000E+00 5.18171855E-05-1.38518998E-19
+ 0.00000000E+00-1.09977496E-08 0.00000000E+00-5.70231916E-11 1.37423943E-03
+-1.07303302E-08 7.20151326E-06-5.55260596E-11 4.67516665E-03 0.00000000E+00
+ 6.29323843E-04 0.00000000E+00 4.88787193E-04-1.69393974E-18 7.05851338E-05
+-2.91841201E-19 0.00000000E+00-1.09138770E-08 0.00000000E+00 5.67788812E-11
+ 1.42922544E-03-1.05590888E-08-7.36018397E-06 5.50352531E-11 7.05849759E-05
+ 3.22722810E-19 6.29322294E-04 0.00000000E+00-1.58768672E-03-1.01239387E-08
+-8.30989046E-06-5.24283125E-11 0.00000000E+00-1.07387569E-08 0.00000000E+00
+-5.57250230E-11 6.50433448E-04 2.61101692E-18 9.22287781E-05 3.04254129E-19
+ 5.39391548E-03 0.00000000E+00 7.19154735E-04 0.00000000E+00-1.64245854E-03
+-9.99364037E-09 8.46794212E-06 5.20523041E-11 0.00000000E+00-1.06954896E-08
+ 0.00000000E+00 5.56005869E-11-2.92197540E-04 0.00000000E+00-3.06005798E-05
+ 1.07590050E-19 0.00000000E+00 5.60821695E-10 0.00000000E+00 6.10776156E-14
+-6.16842667E-05 5.58732199E-10 3.96676761E-08 1.22701640E-13 6.29323843E-04
+ 0.00000000E+00 2.51728352E-03 0.00000000E+00 7.05851338E-05-2.91841201E-19
+ 2.83367407E-04-1.16713368E-18 0.00000000E+00-1.18942909E-08 0.00000000E+00
+ 8.33477327E-14 1.65937482E-03-1.13628938E-08 7.91019805E-08 2.18546195E-13
+ 6.29322294E-04 0.00000000E+00-3.37119257E-04 0.00000000E+00 7.05849759E-05
+-3.22722810E-19-4.07034385E-05 1.56744235E-19 0.00000000E+00 5.29378675E-10
+ 0.00000000E+00 3.11090361E-14-8.91209231E-05 4.83277874E-10 3.95129141E-08
+ 9.40020973E-14 3.96676761E-08-1.22701640E-13 0.00000000E+00-6.10776156E-14
+ 1.40591529E-05 3.89486588E-20 8.42382641E-08 2.36371326E-22-2.53862408E-04
+ 0.00000000E+00-1.51275971E-06 0.00000000E+00-7.36018397E-06-5.50352531E-11
+ 7.91019805E-08-2.18546195E-13 0.00000000E+00-5.67788812E-11 0.00000000E+00
+-8.33477327E-14 1.10319765E-07 1.60677554E-20-2.23831083E-07-5.62827558E-22
+-3.46546145E-05 0.00000000E+00 3.76720226E-06 0.00000000E+00 8.30989046E-06
+ 5.24283125E-11 3.95129141E-08-9.40020973E-14 0.00000000E+00 5.57250230E-11
+ 0.00000000E+00-3.11090361E-14-1.39489516E-05-2.73577586E-20 8.36246298E-08
+ 1.67163500E-22 2.19065940E-04 0.00000000E+00-1.31927361E-06 0.00000000E+00
+-7.84855684E-05-5.06472648E-10 0.00000000E+00-5.35149983E-10-2.24808402E-03
+-6.29091561E-18-1.40518696E-05-3.97817735E-20 4.03749001E-02 0.00000000E+00
+ 2.50989215E-04 0.00000000E+00 1.42922544E-03 1.05590888E-08 1.65937482E-03
+ 1.13628938E-08 0.00000000E+00 1.09138770E-08 0.00000000E+00 1.18942909E-08
+-1.29430620E-02-3.35708455E-17 1.10319765E-07 1.60677554E-20 2.17465647E-01
+ 0.00000000E+00-3.46546145E-05 0.00000000E+00 1.58768672E-03 1.01239387E-08
+-7.23850777E-05-5.23091554E-10 0.00000000E+00 1.07387569E-08 0.00000000E+00
+-5.42591202E-10-2.23172135E-03-4.47014193E-18 1.39573812E-05 2.85040958E-20
+ 3.52102764E-02 0.00000000E+00-2.21208399E-04 0.00000000E+00 0.00000000E+00
+-6.10776156E-14-3.96676761E-08-1.22701640E-13-2.53862408E-04 0.00000000E+00
+-1.51275971E-06 0.00000000E+00 1.40591529E-05-3.89486588E-20 8.42382641E-08
+-2.36371326E-22 0.00000000E+00-5.67788812E-11 0.00000000E+00-8.33477327E-14
+ 7.36018397E-06-5.50352531E-11-7.91019805E-08-2.18546195E-13-3.46546145E-05
+ 0.00000000E+00 3.76720226E-06 0.00000000E+00 1.10319765E-07-1.60677554E-20
+-2.23831083E-07 5.62827558E-22 0.00000000E+00 5.57250230E-11 0.00000000E+00
+-3.11090361E-14-8.30989046E-06 5.24283125E-11-3.95129141E-08-9.40020973E-14
+ 2.19065940E-04 0.00000000E+00-1.31927361E-06 0.00000000E+00-1.39489516E-05
+ 2.73577586E-20 8.36246298E-08-1.67163500E-22 0.00000000E+00-5.35149983E-10
+ 7.84855684E-05-5.06472648E-10 4.03749001E-02 0.00000000E+00 2.50989215E-04
+ 0.00000000E+00-2.24808402E-03 6.29091561E-18-1.40518696E-05 3.97817735E-20
+ 0.00000000E+00 1.09138770E-08 0.00000000E+00 1.18942909E-08-1.42922544E-03
+ 1.05590888E-08-1.65937482E-03 1.13628938E-08 2.17465647E-01 0.00000000E+00
+-3.46546145E-05 0.00000000E+00-1.29430620E-02 3.35708455E-17 1.10319765E-07
+-1.60677554E-20 0.00000000E+00 1.07387569E-08 0.00000000E+00-5.42591202E-10
+-1.58768672E-03 1.01239387E-08 7.23850777E-05-5.23091554E-10 3.52102764E-02
+ 0.00000000E+00-2.21208399E-04 0.00000000E+00-2.23172135E-03 4.47014193E-18
+ 1.39573812E-05-2.85040958E-20-3.06005798E-05-1.07590050E-19-2.92197540E-04
+ 0.00000000E+00 6.16842667E-05 5.58732199E-10-3.96676761E-08 1.22701640E-13
+ 0.00000000E+00 5.60821695E-10 0.00000000E+00 6.10776156E-14 7.05851338E-05
+ 2.91841201E-19 2.83367407E-04 1.16713368E-18 6.29323843E-04 0.00000000E+00
+ 2.51728352E-03 0.00000000E+00-1.65937482E-03-1.13628938E-08-7.91019805E-08
+ 2.18546195E-13 0.00000000E+00-1.18942909E-08 0.00000000E+00 8.33477327E-14
+ 7.05849759E-05 3.22722810E-19-4.07034385E-05-1.56744235E-19 6.29322294E-04
+ 0.00000000E+00-3.37119257E-04 0.00000000E+00 8.91209231E-05 4.83277874E-10
+-3.95129141E-08 9.40020973E-14 0.00000000E+00 5.29378675E-10 0.00000000E+00
+ 3.11090361E-14 6.29322294E-04 0.00000000E+00 7.05849759E-05-3.22722810E-19
+ 0.00000000E+00-1.07387569E-08 0.00000000E+00-5.57250230E-11 1.58768672E-03
+-1.01239387E-08 8.30989046E-06-5.24283125E-11 5.39391548E-03 0.00000000E+00
+ 7.19154735E-04 0.00000000E+00 6.50433448E-04-2.61101692E-18 9.22287781E-05
+-3.04254129E-19 0.00000000E+00-1.06954896E-08 0.00000000E+00 5.56005869E-11
+ 1.64245854E-03-9.99364037E-09-8.46794212E-06 5.20523041E-11 9.22290010E-05
+ 2.53488314E-19 7.19152638E-04 0.00000000E+00-1.80040865E-03-9.67532032E-09
+-9.41450778E-06-5.01420571E-11 0.00000000E+00-1.05994649E-08 0.00000000E+00
+-5.50250179E-11 8.35068003E-04 2.20286844E-18 1.16742730E-04 3.26361940E-19
+ 6.11244832E-03 0.00000000E+00 8.08957464E-04 0.00000000E+00-1.85491828E-03
+-9.58106815E-09 9.57180160E-06 4.98702758E-11 0.00000000E+00-1.05760609E-08
+ 0.00000000E+00 5.49575509E-11-3.37119257E-04 0.00000000E+00-4.07034385E-05
+ 1.56744235E-19 0.00000000E+00 5.42591202E-10 0.00000000E+00 3.11090361E-14
+-7.23850777E-05 5.23091554E-10 3.95129141E-08 9.40020973E-14 7.19154735E-04
+ 0.00000000E+00 2.87660506E-03 0.00000000E+00 9.22287781E-05-3.04254129E-19
+ 3.69940628E-04-1.14839446E-18 0.00000000E+00-1.17055903E-08 0.00000000E+00
+ 4.80909626E-14 1.89366622E-03-1.08056564E-08 7.89167855E-08 1.56684172E-13
+ 7.19152638E-04 0.00000000E+00-3.82027525E-04 0.00000000E+00 9.22290010E-05
+-2.53488314E-19-5.22429328E-05 1.44962563E-19 0.00000000E+00 5.25920526E-10
+ 0.00000000E+00 1.68667327E-14-9.97087932E-05 4.67158044E-10 3.93234551E-08
+ 6.79453344E-14 3.95129141E-08-9.40020973E-14 0.00000000E+00-3.11090361E-14
+ 1.39573812E-05 2.85040958E-20 8.36246298E-08 1.67163500E-22-2.21208399E-04
+ 0.00000000E+00-1.31927361E-06 0.00000000E+00-8.46794212E-06-5.20523041E-11
+ 7.89167855E-08-1.56684172E-13 0.00000000E+00-5.56005869E-11 0.00000000E+00
+-4.80909626E-14 1.26123730E-07-7.54976031E-21-2.22076958E-07-4.60580010E-22
+-2.63112791E-05 0.00000000E+00 3.31642837E-06 0.00000000E+00 9.41450778E-06
+ 5.01420571E-11 3.93234551E-08-6.79453344E-14 0.00000000E+00 5.50250179E-11
+ 0.00000000E+00-1.68667327E-14-1.38312398E-05-3.66250536E-20 8.29224330E-08
+ 2.11806284E-22 1.94814101E-04 0.00000000E+00-1.17247910E-06 0.00000000E+00
+-8.91209231E-05-4.83277874E-10 0.00000000E+00-5.29378675E-10-2.23172135E-03
+-4.47014193E-18-1.39489516E-05-2.73577586E-20 3.52102764E-02 0.00000000E+00
+ 2.19065940E-04 0.00000000E+00 1.64245854E-03 9.99364037E-09 1.89366622E-03
+ 1.08056564E-08 0.00000000E+00 1.06954896E-08 0.00000000E+00 1.17055903E-08
+-1.28417244E-02-2.47487160E-17 1.26123730E-07-7.54976031E-21 1.91522291E-01
+ 0.00000000E+00-2.63112791E-05 0.00000000E+00 1.80040865E-03 9.67532032E-09
+-8.30530777E-05-4.95953572E-10 0.00000000E+00 1.05994649E-08 0.00000000E+00
+-5.33070430E-10-2.21299418E-03-5.66376025E-18 1.38408410E-05 3.41536581E-20
+ 3.12921828E-02 0.00000000E+00-1.96468447E-04 0.00000000E+00 0.00000000E+00
+-3.11090361E-14-3.95129141E-08-9.40020973E-14-2.21208399E-04 0.00000000E+00
+-1.31927361E-06 0.00000000E+00 1.39573812E-05-2.85040958E-20 8.36246298E-08
+-1.67163500E-22 0.00000000E+00-5.56005869E-11 0.00000000E+00-4.80909626E-14
+ 8.46794212E-06-5.20523041E-11-7.89167855E-08-1.56684172E-13-2.63112791E-05
+ 0.00000000E+00 3.31642837E-06 0.00000000E+00 1.26123730E-07 7.54976031E-21
+-2.22076958E-07 4.60580010E-22 0.00000000E+00 5.50250179E-11 0.00000000E+00
+-1.68667327E-14-9.41450778E-06 5.01420571E-11-3.93234551E-08-6.79453344E-14
+ 1.94814101E-04 0.00000000E+00-1.17247910E-06 0.00000000E+00-1.38312398E-05
+ 3.66250536E-20 8.29224330E-08-2.11806284E-22 0.00000000E+00-5.29378675E-10
+ 8.91209231E-05-4.83277874E-10 3.52102764E-02 0.00000000E+00 2.19065940E-04
+ 0.00000000E+00-2.23172135E-03 4.47014193E-18-1.39489516E-05 2.73577586E-20
+ 0.00000000E+00 1.06954896E-08 0.00000000E+00 1.17055903E-08-1.64245854E-03
+ 9.99364037E-09-1.89366622E-03 1.08056564E-08 1.91522291E-01 0.00000000E+00
+-2.63112791E-05 0.00000000E+00-1.28417244E-02 2.47487160E-17 1.26123730E-07
+ 7.54976031E-21 0.00000000E+00 1.05994649E-08 0.00000000E+00-5.33070430E-10
+-1.80040865E-03 9.67532032E-09 8.30530777E-05-4.95953572E-10 3.12921828E-02
+ 0.00000000E+00-1.96468447E-04 0.00000000E+00-2.21299418E-03 5.66376025E-18
+ 1.38408410E-05-3.41536581E-20-4.07034385E-05-1.56744235E-19-3.37119257E-04
+ 0.00000000E+00 7.23850777E-05 5.23091554E-10-3.95129141E-08 9.40020973E-14
+ 0.00000000E+00 5.42591202E-10 0.00000000E+00 3.11090361E-14 9.22287781E-05
+ 3.04254129E-19 3.69940628E-04 1.14839446E-18 7.19154735E-04 0.00000000E+00
+ 2.87660506E-03 0.00000000E+00-1.89366622E-03-1.08056564E-08-7.89167855E-08
+ 1.56684172E-13 0.00000000E+00-1.17055903E-08 0.00000000E+00 4.80909626E-14
+ 9.22290010E-05 2.53488314E-19-5.22429328E-05-1.44962563E-19 7.19152638E-04
+ 0.00000000E+00-3.82027525E-04 0.00000000E+00 9.97087932E-05 4.67158044E-10
+-3.93234551E-08 6.79453344E-14 0.00000000E+00 5.25920526E-10 0.00000000E+00
+ 1.68667327E-14 7.19152638E-04 0.00000000E+00 9.22290010E-05-2.53488314E-19
+ 0.00000000E+00-1.05994649E-08 0.00000000E+00-5.50250179E-11 1.80040865E-03
+-9.67532032E-09 9.41450778E-06-5.01420571E-11 6.11244832E-03 0.00000000E+00
+ 8.08957464E-04 0.00000000E+00 8.35068003E-04-2.20286844E-18 1.16742730E-04
+-3.26361940E-19 0.00000000E+00-1.05760609E-08 0.00000000E+00 5.49575509E-11
+ 1.85491828E-03-9.58106815E-09-9.57180160E-06 4.98702758E-11 1.16742327E-04
+ 3.75170392E-19 8.08955306E-04 0.00000000E+00-2.01187888E-03-9.34333618E-09
+-1.05125011E-05-4.84448591E-11 0.00000000E+00-1.05335818E-08 0.00000000E+00
+-5.47020377E-11 1.04263597E-03 3.17149003E-18 1.44121250E-04 3.95152686E-19
+ 6.83074175E-03 0.00000000E+00 8.98727729E-04 0.00000000E+00-2.06608612E-03
+-9.27193379E-09 1.06689231E-05 4.82389129E-11 0.00000000E+00-1.05261431E-08
+ 0.00000000E+00 5.46806378E-11-3.82027525E-04 0.00000000E+00-5.22429328E-05
+ 1.44962563E-19 0.00000000E+00 5.33070430E-10 0.00000000E+00 1.68667327E-14
+-8.30530777E-05 4.95953572E-10 3.93234551E-08 6.79453344E-14 8.08957464E-04
+ 0.00000000E+00 3.23581412E-03 0.00000000E+00 1.16742730E-04-3.26361940E-19
+ 4.67993491E-04-1.38390168E-18 0.00000000E+00-1.16048996E-08 0.00000000E+00
+ 2.04908555E-14 2.12684011E-03-1.04007028E-08 7.83513749E-08 1.18272066E-13
+ 8.08955306E-04 0.00000000E+00-4.26920759E-04 0.00000000E+00 1.16742327E-04
+-3.75170392E-19-6.52158945E-05 1.92580770E-19 0.00000000E+00 5.25427782E-10
+ 0.00000000E+00 5.34997497E-15-1.10229596E-04 4.54585986E-10 3.91055027E-08
+ 5.14865491E-14 3.93234551E-08-6.79453344E-14 0.00000000E+00-1.68667327E-14
+ 1.38408410E-05 3.41536581E-20 8.29224330E-08 2.11806284E-22-1.96468447E-04
+ 0.00000000E+00-1.17247910E-06 0.00000000E+00-9.57180160E-06-4.98702758E-11
+ 7.83513749E-08-1.18272066E-13 0.00000000E+00-5.49575509E-11 0.00000000E+00
+-2.04908555E-14 1.42842101E-07-3.35904507E-20-2.20080999E-07-8.14042281E-22
+-2.06010052E-05 0.00000000E+00 2.96930051E-06 0.00000000E+00 1.05125011E-05
+ 4.84448591E-11 3.91055027E-08-5.14865491E-14 0.00000000E+00 5.47020377E-11
+ 0.00000000E+00-5.34997497E-15-1.36981196E-05-6.29501823E-20 8.21278255E-08
+ 3.77233944E-22 1.75816339E-04 0.00000000E+00-1.05760423E-06 0.00000000E+00
+-9.97087932E-05-4.67158044E-10 0.00000000E+00-5.25920526E-10-2.21299418E-03
+-5.66376025E-18-1.38312398E-05-3.66250536E-20 3.12921828E-02 0.00000000E+00
+ 1.94814101E-04 0.00000000E+00 1.85491828E-03 9.58106815E-09 2.12684011E-03
+ 1.04007028E-08 0.00000000E+00 1.05760609E-08 0.00000000E+00 1.16048996E-08
+-1.27263759E-02-4.83475195E-17 1.42842101E-07-3.35904507E-20 1.71523888E-01
+ 0.00000000E+00-2.06010052E-05 0.00000000E+00 2.01187888E-03 9.34333618E-09
+-9.36662523E-05-4.76401587E-10 0.00000000E+00 1.05335818E-08 0.00000000E+00
+-5.27699454E-10-2.19180136E-03-1.00473980E-17 1.37088762E-05 6.27630862E-20
+ 2.82261773E-02 0.00000000E+00-1.77128442E-04 0.00000000E+00 0.00000000E+00
+-1.68667327E-14-3.93234551E-08-6.79453344E-14-1.96468447E-04 0.00000000E+00
+-1.17247910E-06 0.00000000E+00 1.38408410E-05-3.41536581E-20 8.29224330E-08
+-2.11806284E-22 0.00000000E+00-5.49575509E-11 0.00000000E+00-2.04908555E-14
+ 9.57180160E-06-4.98702758E-11-7.83513749E-08-1.18272066E-13-2.06010052E-05
+ 0.00000000E+00 2.96930051E-06 0.00000000E+00 1.42842101E-07 3.35904507E-20
+-2.20080999E-07 8.14042281E-22 0.00000000E+00 5.47020377E-11 0.00000000E+00
+-5.34997497E-15-1.05125011E-05 4.84448591E-11-3.91055027E-08-5.14865491E-14
+ 1.75816339E-04 0.00000000E+00-1.05760423E-06 0.00000000E+00-1.36981196E-05
+ 6.29501823E-20 8.21278255E-08-3.77233944E-22 0.00000000E+00-5.25920526E-10
+ 9.97087932E-05-4.67158044E-10 3.12921828E-02 0.00000000E+00 1.94814101E-04
+ 0.00000000E+00-2.21299418E-03 5.66376025E-18-1.38312398E-05 3.66250536E-20
+ 0.00000000E+00 1.05760609E-08 0.00000000E+00 1.16048996E-08-1.85491828E-03
+ 9.58106815E-09-2.12684011E-03 1.04007028E-08 1.71523888E-01 0.00000000E+00
+-2.06010052E-05 0.00000000E+00-1.27263759E-02 4.83475195E-17 1.42842101E-07
+ 3.35904507E-20 0.00000000E+00 1.05335818E-08 0.00000000E+00-5.27699454E-10
+-2.01187888E-03 9.34333618E-09 9.36662523E-05-4.76401587E-10 2.82261773E-02
+ 0.00000000E+00-1.77128442E-04 0.00000000E+00-2.19180136E-03 1.00473980E-17
+ 1.37088762E-05-6.27630862E-20-5.22429328E-05-1.44962563E-19-3.82027525E-04
+ 0.00000000E+00 8.30530777E-05 4.95953572E-10-3.93234551E-08 6.79453344E-14
+ 0.00000000E+00 5.33070430E-10 0.00000000E+00 1.68667327E-14 1.16742730E-04
+ 3.26361940E-19 4.67993491E-04 1.38390168E-18 8.08957464E-04 0.00000000E+00
+ 3.23581412E-03 0.00000000E+00-2.12684011E-03-1.04007028E-08-7.83513749E-08
+ 1.18272066E-13 0.00000000E+00-1.16048996E-08 0.00000000E+00 2.04908555E-14
+ 1.16742327E-04 3.75170392E-19-6.52158945E-05-1.92580770E-19 8.08955306E-04
+ 0.00000000E+00-4.26920759E-04 0.00000000E+00 1.10229596E-04 4.54585986E-10
+-3.91055027E-08 5.14865491E-14 0.00000000E+00 5.25427782E-10 0.00000000E+00
+ 5.34997497E-15 8.08955306E-04 0.00000000E+00 1.16742327E-04-3.75170392E-19
+ 0.00000000E+00-1.05335818E-08 0.00000000E+00-5.47020377E-11 2.01187888E-03
+-9.34333618E-09 1.05125011E-05-4.84448591E-11 6.83074175E-03 0.00000000E+00
+ 8.98727729E-04 0.00000000E+00 1.04263597E-03-3.17149003E-18 1.44121250E-04
+-3.95152686E-19 0.00000000E+00-1.05261431E-08 0.00000000E+00 5.46806378E-11
+ 2.06608612E-03-9.27193379E-09-1.06689231E-05 4.82389129E-11 1.44121311E-04
+ 3.53718367E-19 8.98725002E-04 0.00000000E+00-2.22231051E-03-9.09217712E-09
+-1.16051590E-05-4.71608639E-11 0.00000000E+00-1.05215126E-08 0.00000000E+00
+-5.46524568E-11 1.27310104E-03 3.32315708E-18 1.74357754E-04 4.98168046E-19
+ 7.54876006E-03 0.00000000E+00 9.88462489E-04 0.00000000E+00-2.27623001E-03
+-9.03798505E-09 1.17607515E-05 4.70045485E-11 0.00000000E+00-1.05251886E-08
+ 0.00000000E+00 5.46631073E-11-4.26920759E-04 0.00000000E+00-6.52158945E-05
+ 1.92580770E-19 0.00000000E+00 5.27699454E-10 0.00000000E+00 5.34997497E-15
+-9.36662523E-05 4.76401587E-10 3.91055027E-08 5.14865491E-14 8.98727729E-04
+ 0.00000000E+00 3.59489310E-03 0.00000000E+00 1.44121250E-04-3.95152686E-19
+ 5.77505733E-04-1.54245182E-18 0.00000000E+00-1.15724497E-08 0.00000000E+00
+ 2.08563453E-15 2.35871550E-03-1.00944428E-08 7.80279764E-08 8.92185019E-14
+ 8.98725002E-04 0.00000000E+00-4.71796873E-04 0.00000000E+00 1.44121311E-04
+-3.53718367E-19-7.96197663E-05 2.12971603E-19 0.00000000E+00 5.26783522E-10
+ 0.00000000E+00-2.66262492E-15-1.20699194E-04 4.45056190E-10 3.88981382E-08
+ 3.90788414E-14 3.91055027E-08-5.14865491E-14 0.00000000E+00-5.34997497E-15
+ 1.37088762E-05 6.27630862E-20 8.21278255E-08 3.77233944E-22-1.77128442E-04
+ 0.00000000E+00-1.05760423E-06 0.00000000E+00-1.06689231E-05-4.82389129E-11
+ 7.80279764E-08-8.92185019E-14 0.00000000E+00-5.46806378E-11 0.00000000E+00
+-2.08563453E-15 1.58941907E-07 2.00601055E-20-2.17842403E-07-8.97741197E-22
+-1.65166094E-05 0.00000000E+00 2.69450317E-06 0.00000000E+00 1.16051590E-05
+ 4.71608639E-11 3.88981382E-08-3.90788414E-14 0.00000000E+00 5.46524568E-11
+ 0.00000000E+00 2.66262492E-15-1.35499186E-05-4.60997033E-20 8.12430114E-08
+ 2.80743211E-22 1.60578300E-04 0.00000000E+00-9.65537362E-07 0.00000000E+00
+-1.10229596E-04-4.54585986E-10 0.00000000E+00-5.25427782E-10-2.19180136E-03
+-1.00473980E-17-1.36981196E-05-6.29501823E-20 2.82261773E-02 0.00000000E+00
+ 1.75816339E-04 0.00000000E+00 2.06608612E-03 9.27193379E-09 2.35871550E-03
+ 1.00944428E-08 0.00000000E+00 1.05261431E-08 0.00000000E+00 1.15724497E-08
+-1.25970372E-02-5.27023606E-17 1.58941907E-07 2.00601055E-20 1.55681424E-01
+ 0.00000000E+00-1.65166094E-05 0.00000000E+00 2.22231051E-03 9.09217712E-09
+-1.04223746E-04-4.61613695E-10 0.00000000E+00 1.05215126E-08 0.00000000E+00
+-5.25659460E-10-2.16820004E-03-7.49665203E-18 1.35618804E-05 4.76243466E-20
+ 2.57689837E-02 0.00000000E+00-1.61641114E-04 0.00000000E+00 0.00000000E+00
+-5.34997497E-15-3.91055027E-08-5.14865491E-14-1.77128442E-04 0.00000000E+00
+-1.05760423E-06 0.00000000E+00 1.37088762E-05-6.27630862E-20 8.21278255E-08
+-3.77233944E-22 0.00000000E+00-5.46806378E-11 0.00000000E+00-2.08563453E-15
+ 1.06689231E-05-4.82389129E-11-7.80279764E-08-8.92185019E-14-1.65166094E-05
+ 0.00000000E+00 2.69450317E-06 0.00000000E+00 1.58941907E-07-2.00601055E-20
+-2.17842403E-07 8.97741197E-22 0.00000000E+00 5.46524568E-11 0.00000000E+00
+ 2.66262492E-15-1.16051590E-05 4.71608639E-11-3.88981382E-08-3.90788414E-14
+ 1.60578300E-04 0.00000000E+00-9.65537362E-07 0.00000000E+00-1.35499186E-05
+ 4.60997033E-20 8.12430114E-08-2.80743211E-22 0.00000000E+00-5.25427782E-10
+ 1.10229596E-04-4.54585986E-10 2.82261773E-02 0.00000000E+00 1.75816339E-04
+ 0.00000000E+00-2.19180136E-03 1.00473980E-17-1.36981196E-05 6.29501823E-20
+ 0.00000000E+00 1.05261431E-08 0.00000000E+00 1.15724497E-08-2.06608612E-03
+ 9.27193379E-09-2.35871550E-03 1.00944428E-08 1.55681424E-01 0.00000000E+00
+-1.65166094E-05 0.00000000E+00-1.25970372E-02 5.27023606E-17 1.58941907E-07
+-2.00601055E-20 0.00000000E+00 1.05215126E-08 0.00000000E+00-5.25659460E-10
+-2.22231051E-03 9.09217712E-09 1.04223746E-04-4.61613695E-10 2.57689837E-02
+ 0.00000000E+00-1.61641114E-04 0.00000000E+00-2.16820004E-03 7.49665203E-18
+ 1.35618804E-05-4.76243466E-20-6.52158945E-05-1.92580770E-19-4.26920759E-04
+ 0.00000000E+00 9.36662523E-05 4.76401587E-10-3.91055027E-08 5.14865491E-14
+ 0.00000000E+00 5.27699454E-10 0.00000000E+00 5.34997497E-15 1.44121250E-04
+ 3.95152686E-19 5.77505733E-04 1.54245182E-18 8.98727729E-04 0.00000000E+00
+ 3.59489310E-03 0.00000000E+00-2.35871550E-03-1.00944428E-08-7.80279764E-08
+ 8.92185019E-14 0.00000000E+00-1.15724497E-08 0.00000000E+00 2.08563453E-15
+ 1.44121311E-04 3.53718367E-19-7.96197663E-05-2.12971603E-19 8.98725002E-04
+ 0.00000000E+00-4.71796873E-04 0.00000000E+00 1.20699194E-04 4.45056190E-10
+-3.88981382E-08 3.90788414E-14 0.00000000E+00 5.26783522E-10 0.00000000E+00
+-2.66262492E-15 8.98725002E-04 0.00000000E+00 1.44121311E-04-3.53718367E-19
+ 0.00000000E+00-1.05215126E-08 0.00000000E+00-5.46524568E-11 2.22231051E-03
+-9.09217712E-09 1.16051590E-05-4.71608639E-11 7.54876006E-03 0.00000000E+00
+ 9.88462489E-04 0.00000000E+00 1.27310104E-03-3.32315708E-18 1.74357754E-04
+-4.98168046E-19 0.00000000E+00-1.05251886E-08 0.00000000E+00 5.46631073E-11
+ 2.27623001E-03-9.03798505E-09-1.17607515E-05 4.70045485E-11 1.74357292E-04
+ 5.33289100E-19 9.88459711E-04 0.00000000E+00-2.43140207E-03-8.90087637E-09
+-1.26906830E-05-4.61823663E-11 0.00000000E+00-1.05486642E-08 0.00000000E+00
+-5.48034007E-11 1.52639589E-03 4.40285609E-18 2.07445141E-04 5.49795614E-19
+ 8.26648274E-03 0.00000000E+00 1.07815807E-03 0.00000000E+00-2.48489748E-03
+-8.85948883E-09 1.28450467E-05 4.60629828E-11 0.00000000E+00-1.05607609E-08
+ 0.00000000E+00 5.48383353E-11-4.71796873E-04 0.00000000E+00-7.96197663E-05
+ 2.12971603E-19 0.00000000E+00 5.25659460E-10 0.00000000E+00-2.66262492E-15
+-1.04223746E-04 4.61613695E-10 3.88981382E-08 3.90788414E-14 9.88462489E-04
+ 0.00000000E+00 3.95383050E-03 0.00000000E+00 1.74357754E-04-4.98168046E-19
+ 6.98448486E-04-2.01771928E-18 0.00000000E+00-1.15877727E-08 0.00000000E+00
+-1.19214851E-14 2.58934381E-03-9.86204168E-09 7.74929629E-08 6.81815024E-14
+ 9.88459711E-04 0.00000000E+00-5.16654445E-04 0.00000000E+00 1.74357292E-04
+-5.33289100E-19-9.54506083E-05 2.70771179E-19 0.00000000E+00 5.29624432E-10
+ 0.00000000E+00-8.73363976E-15-1.31077976E-04 4.37748736E-10 3.85909170E-08
+ 2.98458794E-14 3.88981382E-08-3.90788414E-14 0.00000000E+00 2.66262492E-15
+ 1.35618804E-05 4.76243466E-20 8.12430114E-08 2.80743211E-22-1.61641114E-04
+ 0.00000000E+00-9.65537362E-07 0.00000000E+00-1.17607515E-05-4.70045485E-11
+ 7.74929629E-08-6.81815024E-14 0.00000000E+00-5.46631073E-11 0.00000000E+00
+ 1.19214851E-14 1.76129163E-07 1.13672879E-20-2.15355953E-07-6.46635408E-22
+-1.34968321E-05 0.00000000E+00 2.47221609E-06 0.00000000E+00 1.26906830E-05
+ 4.61823663E-11 3.85909170E-08-2.98458794E-14 0.00000000E+00 5.48034007E-11
+ 0.00000000E+00 8.73363976E-15-1.33858377E-05-3.60725331E-20 8.02630135E-08
+ 2.16769351E-22 1.48121630E-04 0.00000000E+00-8.90324199E-07 0.00000000E+00
+-1.20699194E-04-4.45056190E-10 0.00000000E+00-5.26783522E-10-2.16820004E-03
+-7.49665203E-18-1.35499186E-05-4.60997033E-20 2.57689837E-02 0.00000000E+00
+ 1.60578300E-04 0.00000000E+00 2.27623001E-03 9.03798505E-09 2.58934381E-03
+ 9.86204168E-09 0.00000000E+00 1.05251886E-08 0.00000000E+00 1.15877727E-08
+-1.24533302E-02-3.66379816E-17 1.76129163E-07 1.13672879E-20 1.42859835E-01
+ 0.00000000E+00-1.34968321E-05 0.00000000E+00 2.43140207E-03 8.90087637E-09
+-1.14732200E-04-4.50394079E-10 0.00000000E+00 1.05486642E-08 0.00000000E+00
+-5.25927667E-10-2.14205882E-03-5.78556398E-18 1.33990042E-05 3.62699786E-20
+ 2.37616465E-02 0.00000000E+00-1.48997355E-04 0.00000000E+00 0.00000000E+00
+ 2.66262492E-15-3.88981382E-08-3.90788414E-14-1.61641114E-04 0.00000000E+00
+-9.65537362E-07 0.00000000E+00 1.35618804E-05-4.76243466E-20 8.12430114E-08
+-2.80743211E-22 0.00000000E+00-5.46631073E-11 0.00000000E+00 1.19214851E-14
+ 1.17607515E-05-4.70045485E-11-7.74929629E-08-6.81815024E-14-1.34968321E-05
+ 0.00000000E+00 2.47221609E-06 0.00000000E+00 1.76129163E-07-1.13672879E-20
+-2.15355953E-07 6.46635408E-22 0.00000000E+00 5.48034007E-11 0.00000000E+00
+ 8.73363976E-15-1.26906830E-05 4.61823663E-11-3.85909170E-08-2.98458794E-14
+ 1.48121630E-04 0.00000000E+00-8.90324199E-07 0.00000000E+00-1.33858377E-05
+ 3.60725331E-20 8.02630135E-08-2.16769351E-22 0.00000000E+00-5.26783522E-10
+ 1.20699194E-04-4.45056190E-10 2.57689837E-02 0.00000000E+00 1.60578300E-04
+ 0.00000000E+00-2.16820004E-03 7.49665203E-18-1.35499186E-05 4.60997033E-20
+ 0.00000000E+00 1.05251886E-08 0.00000000E+00 1.15877727E-08-2.27623001E-03
+ 9.03798505E-09-2.58934381E-03 9.86204168E-09 1.42859835E-01 0.00000000E+00
+-1.34968321E-05 0.00000000E+00-1.24533302E-02 3.66379816E-17 1.76129163E-07
+-1.13672879E-20 0.00000000E+00 1.05486642E-08 0.00000000E+00-5.25927667E-10
+-2.43140207E-03 8.90087637E-09 1.14732200E-04-4.50394079E-10 2.37616465E-02
+ 0.00000000E+00-1.48997355E-04 0.00000000E+00-2.14205882E-03 5.78556398E-18
+ 1.33990042E-05-3.62699786E-20-7.96197663E-05-2.12971603E-19-4.71796873E-04
+ 0.00000000E+00 1.04223746E-04 4.61613695E-10-3.88981382E-08 3.90788414E-14
+ 0.00000000E+00 5.25659460E-10 0.00000000E+00-2.66262492E-15 1.74357754E-04
+ 4.98168046E-19 6.98448486E-04 2.01771928E-18 9.88462489E-04 0.00000000E+00
+ 3.95383050E-03 0.00000000E+00-2.58934381E-03-9.86204168E-09-7.74929629E-08
+ 6.81815024E-14 0.00000000E+00-1.15877727E-08 0.00000000E+00-1.19214851E-14
+ 1.74357292E-04 5.33289100E-19-9.54506083E-05-2.70771179E-19 9.88459711E-04
+ 0.00000000E+00-5.16654445E-04 0.00000000E+00 1.31077976E-04 4.37748736E-10
+-3.85909170E-08 2.98458794E-14 0.00000000E+00 5.29624432E-10 0.00000000E+00
+-8.73363976E-15 9.88459711E-04 0.00000000E+00 1.74357292E-04-5.33289100E-19
+ 0.00000000E+00-1.05486642E-08 0.00000000E+00-5.48034007E-11 2.43140207E-03
+-8.90087637E-09 1.26906830E-05-4.61823663E-11 8.26648274E-03 0.00000000E+00
+ 1.07815807E-03 0.00000000E+00 1.52639589E-03-4.40285609E-18 2.07445141E-04
+-5.49795614E-19 0.00000000E+00-1.05607609E-08 0.00000000E+00 5.48383353E-11
+ 2.48489748E-03-8.85948883E-09-1.28450467E-05 4.60629828E-11 2.07444959E-04
+ 5.24763247E-19 1.07815489E-03 0.00000000E+00-2.63887208E-03-8.75492317E-09
+-1.37678163E-05-4.54359254E-11 0.00000000E+00-1.06054411E-08 0.00000000E+00
+-5.51058036E-11 1.80246920E-03 4.58484225E-18 2.43375017E-04 6.32968876E-19
+ 8.98387553E-03 0.00000000E+00 1.16781088E-03 0.00000000E+00-2.69199655E-03
+-8.72342846E-09 1.39211144E-05 4.53450760E-11 0.00000000E+00-1.06239722E-08
+ 0.00000000E+00 5.51592978E-11-5.16654445E-04 0.00000000E+00-9.54506083E-05
+ 2.70771179E-19 0.00000000E+00 5.25927667E-10 0.00000000E+00-8.73363976E-15
+-1.14732200E-04 4.50394079E-10 3.85909170E-08 2.98458794E-14 1.07815807E-03
+ 0.00000000E+00 4.31261082E-03 0.00000000E+00 2.07445141E-04-5.49795614E-19
+ 8.30795284E-04-2.18054789E-18 0.00000000E+00-1.16392346E-08 0.00000000E+00
+-2.24186273E-14 2.81819565E-03-9.68458170E-09 7.68732925E-08 5.20124808E-14
+ 1.07815489E-03 0.00000000E+00-5.61491442E-04 0.00000000E+00 2.07444959E-04
+-5.24763247E-19-1.12704994E-04 2.89433031E-19 0.00000000E+00 5.33598173E-10
+ 0.00000000E+00-1.33735708E-14-1.41385926E-04 4.32195831E-10 3.83245204E-08
+ 2.27123608E-14 3.85909170E-08-2.98458794E-14 0.00000000E+00 8.73363976E-15
+ 1.33990042E-05 3.62699786E-20 8.02630135E-08 2.16769351E-22-1.48997355E-04
+ 0.00000000E+00-8.90324199E-07 0.00000000E+00-1.28450467E-05-4.60629828E-11
+ 7.68732925E-08-5.20124808E-14 0.00000000E+00-5.48383353E-11 0.00000000E+00
+ 2.24186273E-14 1.93037599E-07 1.42475808E-20-2.12617232E-07-4.92732594E-22
+-1.11997836E-05 0.00000000E+00 2.28925203E-06 0.00000000E+00 1.37678163E-05
+ 4.54359254E-11 3.83245204E-08-2.27123608E-14 0.00000000E+00 5.51058036E-11
+ 0.00000000E+00 1.33735708E-14-1.32059932E-05-2.10928737E-20 7.91886548E-08
+ 1.33139682E-22 1.37781809E-04 0.00000000E+00-8.27925013E-07 0.00000000E+00
+-1.31077976E-04-4.37748736E-10 0.00000000E+00-5.29624432E-10-2.14205882E-03
+-5.78556398E-18-1.33858377E-05-3.60725331E-20 2.37616465E-02 0.00000000E+00
+ 1.48121630E-04 0.00000000E+00 2.48489748E-03 8.85948883E-09 2.81819565E-03
+ 9.68458170E-09 0.00000000E+00 1.05607609E-08 0.00000000E+00 1.16392346E-08
+-1.22950604E-02-2.97808459E-17 1.93037599E-07 1.42475808E-20 1.32302292E-01
+ 0.00000000E+00-1.11997836E-05 0.00000000E+00 2.63887208E-03 8.75492317E-09
+-1.25153396E-04-4.41818615E-10 0.00000000E+00 1.06054411E-08 0.00000000E+00
+-5.27935488E-10-2.11339860E-03-3.55127505E-18 1.32203969E-05 2.33206372E-20
+ 2.20963261E-02 0.00000000E+00-1.38513321E-04 0.00000000E+00 0.00000000E+00
+ 8.73363976E-15-3.85909170E-08-2.98458794E-14-1.48997355E-04 0.00000000E+00
+-8.90324199E-07 0.00000000E+00 1.33990042E-05-3.62699786E-20 8.02630135E-08
+-2.16769351E-22 0.00000000E+00-5.48383353E-11 0.00000000E+00 2.24186273E-14
+ 1.28450467E-05-4.60629828E-11-7.68732925E-08-5.20124808E-14-1.11997836E-05
+ 0.00000000E+00 2.28925203E-06 0.00000000E+00 1.93037599E-07-1.42475808E-20
+-2.12617232E-07 4.92732594E-22 0.00000000E+00 5.51058036E-11 0.00000000E+00
+ 1.33735708E-14-1.37678163E-05 4.54359254E-11-3.83245204E-08-2.27123608E-14
+ 1.37781809E-04 0.00000000E+00-8.27925013E-07 0.00000000E+00-1.32059932E-05
+ 2.10928737E-20 7.91886548E-08-1.33139682E-22 0.00000000E+00-5.29624432E-10
+ 1.31077976E-04-4.37748736E-10 2.37616465E-02 0.00000000E+00 1.48121630E-04
+ 0.00000000E+00-2.14205882E-03 5.78556398E-18-1.33858377E-05 3.60725331E-20
+ 0.00000000E+00 1.05607609E-08 0.00000000E+00 1.16392346E-08-2.48489748E-03
+ 8.85948883E-09-2.81819565E-03 9.68458170E-09 1.32302292E-01 0.00000000E+00
+-1.11997836E-05 0.00000000E+00-1.22950604E-02 2.97808459E-17 1.93037599E-07
+-1.42475808E-20 0.00000000E+00 1.06054411E-08 0.00000000E+00-5.27935488E-10
+-2.63887208E-03 8.75492317E-09 1.25153396E-04-4.41818615E-10 2.20963261E-02
+ 0.00000000E+00-1.38513321E-04 0.00000000E+00-2.11339860E-03 3.55127505E-18
+ 1.32203969E-05-2.33206372E-20-9.54506083E-05-2.70771179E-19-5.16654445E-04
+ 0.00000000E+00 1.14732200E-04 4.50394079E-10-3.85909170E-08 2.98458794E-14
+ 0.00000000E+00 5.25927667E-10 0.00000000E+00-8.73363976E-15 2.07445141E-04
+ 5.49795614E-19 8.30795284E-04 2.18054789E-18 1.07815807E-03 0.00000000E+00
+ 4.31261082E-03 0.00000000E+00-2.81819565E-03-9.68458170E-09-7.68732925E-08
+ 5.20124808E-14 0.00000000E+00-1.16392346E-08 0.00000000E+00-2.24186273E-14
+ 2.07444959E-04 5.24763247E-19-1.12704994E-04-2.89433031E-19 1.07815489E-03
+ 0.00000000E+00-5.61491442E-04 0.00000000E+00 1.41385926E-04 4.32195831E-10
+-3.83245204E-08 2.27123608E-14 0.00000000E+00 5.33598173E-10 0.00000000E+00
+-1.33735708E-14 1.07815489E-03 0.00000000E+00 2.07444959E-04-5.24763247E-19
+ 0.00000000E+00-1.06054411E-08 0.00000000E+00-5.51058036E-11 2.63887208E-03
+-8.75492317E-09 1.37678163E-05-4.54359254E-11 8.98387553E-03 0.00000000E+00
+ 1.16781088E-03 0.00000000E+00 1.80246920E-03-4.58484225E-18 2.43375017E-04
+-6.32968876E-19 0.00000000E+00-1.06239722E-08 0.00000000E+00 5.51592978E-11
+ 2.69199655E-03-8.72342846E-09-1.39211144E-05 4.53450760E-11-5.61491442E-04
+ 0.00000000E+00-1.12704994E-04 2.89433031E-19 0.00000000E+00 5.27935488E-10
+ 0.00000000E+00-1.33735708E-14-1.25153396E-04 4.41818615E-10 3.83245204E-08
+ 2.27123608E-14 1.16781088E-03 0.00000000E+00 4.67122038E-03 0.00000000E+00
+ 2.43375017E-04-6.32968876E-19 9.74511282E-04-2.54444613E-18 0.00000000E+00
+-1.17182876E-08 0.00000000E+00-3.05899079E-14 3.04541913E-03-9.54955325E-09
+ 7.63349838E-08 3.94445105E-14 1.16780757E-03 0.00000000E+00-6.06306212E-04
+ 0.00000000E+00 2.43374580E-04-6.31921622E-19-1.31378292E-04 3.51002738E-19
+ 0.00000000E+00 5.38469503E-10 0.00000000E+00-1.70042983E-14-1.51605077E-04
+ 4.28032469E-10 3.80024474E-08 1.70995149E-14 3.83245204E-08-2.27123608E-14
+ 0.00000000E+00 1.33735708E-14 1.32203969E-05 2.33206372E-20 7.91886548E-08
+ 1.33139682E-22-1.38513321E-04 0.00000000E+00-8.27925013E-07 0.00000000E+00
+-1.39211144E-05-4.53450760E-11 7.63349838E-08-3.94445105E-14 0.00000000E+00
+-5.51592978E-11 0.00000000E+00 3.05899079E-14 2.10387203E-07 1.26251229E-20
+-2.09623588E-07-2.28855655E-22-9.41028879E-06 0.00000000E+00 2.13653128E-06
+ 0.00000000E+00 1.48371365E-05 4.48698372E-11 3.80024474E-08-1.70995149E-14
+ 0.00000000E+00 5.55253802E-11 0.00000000E+00 1.70042983E-14-1.30100634E-05
+-1.31984306E-20 7.80178745E-08 7.40888381E-23 1.29091637E-04 0.00000000E+00
+-7.75504011E-07 0.00000000E+00-1.41385926E-04-4.32195831E-10 0.00000000E+00
+-5.33598173E-10-2.11339860E-03-3.55127505E-18-1.32059932E-05-2.10928737E-20
+ 2.20963261E-02 0.00000000E+00 1.37781809E-04 0.00000000E+00 2.69199655E-03
+ 8.72342846E-09 3.04541913E-03 9.54955325E-09 0.00000000E+00 1.06239722E-08
+ 0.00000000E+00 1.17182876E-08-1.21220171E-02-1.10124393E-17 2.10387203E-07
+ 1.26251229E-20 1.23487430E-01 0.00000000E+00-9.41028879E-06 0.00000000E+00
+ 2.84485003E-03 8.64418136E-09-1.35508610E-04-4.35277222E-10 0.00000000E+00
+ 1.06851002E-08 0.00000000E+00-5.31268476E-10-2.08216485E-03-1.99250507E-18
+ 1.30256966E-05 1.16577281E-20 2.06973251E-02 0.00000000E+00-1.29709718E-04
+ 0.00000000E+00 0.00000000E+00 1.33735708E-14-3.83245204E-08-2.27123608E-14
+-1.38513321E-04 0.00000000E+00-8.27925013E-07 0.00000000E+00 1.32203969E-05
+-2.33206372E-20 7.91886548E-08-1.33139682E-22 0.00000000E+00-5.51592978E-11
+ 0.00000000E+00 3.05899079E-14 1.39211144E-05-4.53450760E-11-7.63349838E-08
+-3.94445105E-14-9.41028879E-06 0.00000000E+00 2.13653128E-06 0.00000000E+00
+ 2.10387203E-07-1.26251229E-20-2.09623588E-07 2.28855655E-22 0.00000000E+00
+ 5.55253802E-11 0.00000000E+00 1.70042983E-14-1.48371365E-05 4.48698372E-11
+-3.80024474E-08-1.70995149E-14 1.29091637E-04 0.00000000E+00-7.75504011E-07
+ 0.00000000E+00-1.30100634E-05 1.31984306E-20 7.80178745E-08-7.40888381E-23
+ 0.00000000E+00-5.33598173E-10 1.41385926E-04-4.32195831E-10 2.20963261E-02
+ 0.00000000E+00 1.37781809E-04 0.00000000E+00-2.11339860E-03 3.55127505E-18
+-1.32059932E-05 2.10928737E-20 0.00000000E+00 1.06239722E-08 0.00000000E+00
+ 1.17182876E-08-2.69199655E-03 8.72342846E-09-3.04541913E-03 9.54955325E-09
+ 1.23487430E-01 0.00000000E+00-9.41028879E-06 0.00000000E+00-1.21220171E-02
+ 1.10124393E-17 2.10387203E-07-1.26251229E-20 0.00000000E+00 1.06851002E-08
+ 0.00000000E+00-5.31268476E-10-2.84485003E-03 8.64418136E-09 1.35508610E-04
+-4.35277222E-10 2.06973251E-02 0.00000000E+00-1.29709718E-04 0.00000000E+00
+-2.08216485E-03 1.99250507E-18 1.30256966E-05-1.16577281E-20-1.12704994E-04
+-2.89433031E-19-5.61491442E-04 0.00000000E+00 1.25153396E-04 4.41818615E-10
+-3.83245204E-08 2.27123608E-14 0.00000000E+00 5.27935488E-10 0.00000000E+00
+-1.33735708E-14 2.43375017E-04 6.32968876E-19 9.74511282E-04 2.54444613E-18
+ 1.16781088E-03 0.00000000E+00 4.67122038E-03 0.00000000E+00-3.04541913E-03
+-9.54955325E-09-7.63349838E-08 3.94445105E-14 0.00000000E+00-1.17182876E-08
+ 0.00000000E+00-3.05899079E-14 2.43374580E-04 6.31921622E-19-1.31378292E-04
+-3.51002738E-19 1.16780757E-03 0.00000000E+00-6.06306212E-04 0.00000000E+00
+ 1.51605077E-04 4.28032469E-10-3.80024474E-08 1.70995149E-14 0.00000000E+00
+ 5.38469503E-10 0.00000000E+00-1.70042983E-14 2.43374580E-04 6.31921622E-19
+ 1.16780757E-03 0.00000000E+00-2.84485003E-03-8.64418136E-09-1.48371365E-05
+-4.48698372E-11 0.00000000E+00-1.06851002E-08 0.00000000E+00-5.55253802E-11
+ 2.10124433E-03 5.53047307E-18 2.82138588E-04 7.72089328E-19 9.70091323E-03
+ 0.00000000E+00 1.25741728E-03 0.00000000E+00-2.89752942E-03-8.62046978E-09
+ 1.49891463E-05 4.48014391E-11 0.00000000E+00-1.07086662E-08 0.00000000E+00
+ 5.55933974E-11 1.16780757E-03 0.00000000E+00 2.43374580E-04-6.31921622E-19
+ 0.00000000E+00-1.06851002E-08 0.00000000E+00-5.55253802E-11 2.84485003E-03
+-8.64418136E-09 1.48371365E-05-4.48698372E-11 9.70091323E-03 0.00000000E+00
+ 1.25741728E-03 0.00000000E+00 2.10124433E-03-5.53047307E-18 2.82138588E-04
+-7.72089328E-19 0.00000000E+00-1.07086662E-08 0.00000000E+00 5.55933974E-11
+ 2.89752942E-03-8.62046978E-09-1.49891463E-05 4.48014391E-11-6.06306212E-04
+ 0.00000000E+00-1.31378292E-04 3.51002738E-19 0.00000000E+00 5.31268476E-10
+ 0.00000000E+00-1.70042983E-14-1.35508610E-04 4.35277222E-10 3.80024474E-08
+ 1.70995149E-14 1.25741728E-03 0.00000000E+00 5.02964385E-03 0.00000000E+00
+ 2.82138588E-04-7.72089328E-19 1.12956210E-03-3.28844099E-18 0.00000000E+00
+-1.18189280E-08 0.00000000E+00-3.70281006E-14 3.27076562E-03-9.44788919E-09
+ 7.56466487E-08 2.94407191E-14 1.25741363E-03 0.00000000E+00-6.51096662E-04
+ 0.00000000E+00 2.82138175E-04-8.11303685E-19-1.51466120E-04 5.34741855E-19
+ 0.00000000E+00 5.44058945E-10 0.00000000E+00-1.98911406E-14-1.61730357E-04
+ 4.24993099E-10 3.76634793E-08 1.25978857E-14 2.82138175E-04 8.11303685E-19
+ 1.25741363E-03 0.00000000E+00-3.04903069E-03-8.56134845E-09-1.58970706E-05
+-4.44468673E-11 0.00000000E+00-1.07827550E-08 0.00000000E+00-5.60371871E-11
+ 2.42265246E-03 8.75789359E-18 3.23726305E-04 1.32766374E-18 1.04175612E-02
+ 0.00000000E+00 1.34697302E-03 0.00000000E+00-3.10123950E-03-8.54387892E-09
+ 1.60477245E-05 4.43964758E-11 0.00000000E+00-1.08103240E-08 0.00000000E+00
+ 5.61167517E-11 1.25741363E-03 0.00000000E+00 2.82138175E-04-8.11303685E-19
+ 0.00000000E+00-1.07827550E-08 0.00000000E+00-5.60371871E-11 3.04903069E-03
+-8.56134845E-09 1.58970706E-05-4.44468673E-11 1.04175612E-02 0.00000000E+00
+ 1.34697302E-03 0.00000000E+00 2.42265246E-03-8.75789359E-18 3.23726305E-04
+-1.32766374E-18 0.00000000E+00-1.08103240E-08 0.00000000E+00 5.61167517E-11
+ 3.10123950E-03-8.54387892E-09-1.60477245E-05 4.43964758E-11 3.80024474E-08
+-1.70995149E-14 0.00000000E+00 1.70042983E-14 1.30256966E-05 1.16577281E-20
+ 7.80178745E-08 7.40888381E-23-1.29709718E-04 0.00000000E+00-7.75504011E-07
+ 0.00000000E+00-1.49891463E-05-4.48014391E-11 7.56466487E-08-2.94407191E-14
+ 0.00000000E+00-5.55933974E-11 0.00000000E+00 3.70281006E-14 2.28020220E-07
+-3.43926934E-20-2.06371427E-07-4.29616696E-22-7.98964483E-06 0.00000000E+00
+ 2.00757411E-06 0.00000000E+00 1.58970706E-05 4.44468673E-11 3.76634793E-08
+-1.25978857E-14 0.00000000E+00 5.60371871E-11 0.00000000E+00 1.98911406E-14
+-1.27977089E-05-4.29202180E-20 7.67488761E-08 2.51698641E-22 1.21711757E-04
+ 0.00000000E+00-7.31002786E-07 0.00000000E+00-1.51605077E-04-4.28032469E-10
+ 0.00000000E+00-5.38469503E-10-2.08216485E-03-1.99250507E-18-1.30100634E-05
+-1.31984306E-20 2.06973251E-02 0.00000000E+00 1.29091637E-04 0.00000000E+00
+ 2.89752942E-03 8.62046978E-09 3.27076562E-03 9.44788919E-09 0.00000000E+00
+ 1.07086662E-08 0.00000000E+00 1.18189280E-08-1.19340750E-02-2.46532340E-17
+ 2.28020220E-07-3.43926934E-20 1.16042443E-01 0.00000000E+00-7.98964483E-06
+ 0.00000000E+00 3.04903069E-03 8.56134845E-09-1.45777630E-04-4.30330663E-10
+ 0.00000000E+00 1.07827550E-08 0.00000000E+00-5.35634828E-10-2.04830933E-03
+-6.70620426E-18 1.28146407E-05 4.09783729E-20 1.95097008E-02 0.00000000E+00
+-1.22238909E-04 0.00000000E+00 0.00000000E+00 1.70042983E-14-3.80024474E-08
+-1.70995149E-14-1.29709718E-04 0.00000000E+00-7.75504011E-07 0.00000000E+00
+ 1.30256966E-05-1.16577281E-20 7.80178745E-08-7.40888381E-23 0.00000000E+00
+-5.55933974E-11 0.00000000E+00 3.70281006E-14 1.49891463E-05-4.48014391E-11
+-7.56466487E-08-2.94407191E-14-7.98964483E-06 0.00000000E+00 2.00757411E-06
+ 0.00000000E+00 2.28020220E-07 3.43926934E-20-2.06371427E-07 4.29616696E-22
+ 0.00000000E+00 5.60371871E-11 0.00000000E+00 1.98911406E-14-1.58970706E-05
+ 4.44468673E-11-3.76634793E-08-1.25978857E-14 1.21711757E-04 0.00000000E+00
+-7.31002786E-07 0.00000000E+00-1.27977089E-05 4.29202180E-20 7.67488761E-08
+-2.51698641E-22 0.00000000E+00-5.38469503E-10 1.51605077E-04-4.28032469E-10
+ 2.06973251E-02 0.00000000E+00 1.29091637E-04 0.00000000E+00-2.08216485E-03
+ 1.99250507E-18-1.30100634E-05 1.31984306E-20 0.00000000E+00 1.07086662E-08
+ 0.00000000E+00 1.18189280E-08-2.89752942E-03 8.62046978E-09-3.27076562E-03
+ 9.44788919E-09 1.16042443E-01 0.00000000E+00-7.98964483E-06 0.00000000E+00
+-1.19340750E-02 2.46532340E-17 2.28020220E-07 3.43926934E-20 0.00000000E+00
+ 1.07827550E-08 0.00000000E+00-5.35634828E-10-3.04903069E-03 8.56134845E-09
+ 1.45777630E-04-4.30330663E-10 1.95097008E-02 0.00000000E+00-1.22238909E-04
+ 0.00000000E+00-2.04830933E-03 6.70620426E-18 1.28146407E-05-4.09783729E-20
+-1.31378292E-04-3.51002738E-19-6.06306212E-04 0.00000000E+00 1.35508610E-04
+ 4.35277222E-10-3.80024474E-08 1.70995149E-14 0.00000000E+00 5.31268476E-10
+ 0.00000000E+00-1.70042983E-14 2.82138588E-04 7.72089328E-19 1.12956210E-03
+ 3.28844099E-18 1.25741728E-03 0.00000000E+00 5.02964385E-03 0.00000000E+00
+-3.27076562E-03-9.44788919E-09-7.56466487E-08 2.94407191E-14 0.00000000E+00
+-1.18189280E-08 0.00000000E+00-3.70281006E-14 2.82138175E-04 8.11303685E-19
+-1.51466120E-04-5.34741855E-19 1.25741363E-03 0.00000000E+00-6.51096662E-04
+ 0.00000000E+00 1.61730357E-04 4.24993099E-10-3.76634793E-08 1.25978857E-14
+ 0.00000000E+00 5.44058945E-10 0.00000000E+00-1.98911406E-14 3.23725834E-04
+ 1.26781654E-18 1.34696922E-03 0.00000000E+00-3.25129741E-03-8.50102492E-09
+-1.69469912E-05-4.41394323E-11 0.00000000E+00-1.08947944E-08 0.00000000E+00
+-5.66227794E-11 2.76661534E-03 7.12396288E-18 3.68128609E-04 5.55190955E-19
+ 1.11337972E-02 0.00000000E+00 1.43647611E-03 0.00000000E+00-3.30297491E-03
+-8.48864151E-09 1.70961088E-05 4.41037132E-11 0.00000000E+00-1.09255909E-08
+ 0.00000000E+00 5.67116540E-11-6.51096662E-04 0.00000000E+00-1.51466120E-04
+ 5.34741855E-19 0.00000000E+00 5.35634828E-10 0.00000000E+00-1.98911406E-14
+-1.45777630E-04 4.30330663E-10 3.76634793E-08 1.25978857E-14 1.34697302E-03
+ 0.00000000E+00 5.38786570E-03 0.00000000E+00 3.23726305E-04-1.32766374E-18
+ 1.29590944E-03-4.78018708E-18 0.00000000E+00-1.19367238E-08 0.00000000E+00
+-4.21896101E-14 3.49407780E-03-9.37297692E-09 7.49263645E-08 2.13507344E-14
+ 1.34696922E-03 0.00000000E+00-6.95861334E-04 0.00000000E+00 3.23725834E-04
+-1.26781654E-18-1.72963611E-04 4.55751874E-19 0.00000000E+00 5.50230901E-10
+ 0.00000000E+00-2.22186487E-14-1.71749043E-04 4.22875503E-10 3.72793919E-08
+ 8.92976643E-15 3.76634793E-08-1.25978857E-14 0.00000000E+00 1.98911406E-14
+ 1.28146407E-05 4.09783729E-20 7.67488761E-08 2.51698641E-22-1.22238909E-04
+ 0.00000000E+00-7.31002786E-07 0.00000000E+00-1.60477245E-05-4.43964758E-11
+ 7.49263645E-08-2.13507344E-14 0.00000000E+00-5.61167517E-11 0.00000000E+00
+ 4.21896101E-14 2.46097715E-07 2.32231158E-21-2.02853091E-07-7.06928642E-22
+-6.84203184E-06 0.00000000E+00 1.89763750E-06 0.00000000E+00 1.69469912E-05
+ 4.41394323E-11 3.72793919E-08-8.92976643E-15 0.00000000E+00 5.66227794E-11
+ 0.00000000E+00 2.22186487E-14-1.25685853E-05-3.95345132E-20 7.53793275E-08
+ 2.42638388E-22 1.15390673E-04 0.00000000E+00-6.92897588E-07 0.00000000E+00
+-1.61730357E-04-4.24993099E-10 0.00000000E+00-5.44058945E-10-2.04830933E-03
+-6.70620426E-18-1.27977089E-05-4.29202180E-20 1.95097008E-02 0.00000000E+00
+ 1.21711757E-04 0.00000000E+00 3.10123950E-03 8.54387892E-09 3.49407780E-03
+ 9.37297692E-09 0.00000000E+00 1.08103240E-08 0.00000000E+00 1.19367238E-08
+-1.17306786E-02-4.31229726E-17 2.46097715E-07 2.32231158E-21 1.09694486E-01
+ 0.00000000E+00-6.84203184E-06 0.00000000E+00 3.25129741E-03 8.50102492E-09
+-1.55958714E-04-4.26659052E-10 0.00000000E+00 1.08947944E-08 0.00000000E+00
+-5.40820677E-10-2.01176991E-03-6.47188920E-18 1.25867966E-05 4.14052631E-20
+ 1.84927822E-02 0.00000000E+00-1.15843841E-04 0.00000000E+00 0.00000000E+00
+ 1.98911406E-14-3.76634793E-08-1.25978857E-14-1.22238909E-04 0.00000000E+00
+-7.31002786E-07 0.00000000E+00 1.28146407E-05-4.09783729E-20 7.67488761E-08
+-2.51698641E-22 0.00000000E+00-5.61167517E-11 0.00000000E+00 4.21896101E-14
+ 1.60477245E-05-4.43964758E-11-7.49263645E-08-2.13507344E-14-6.84203184E-06
+ 0.00000000E+00 1.89763750E-06 0.00000000E+00 2.46097715E-07-2.32231158E-21
+-2.02853091E-07 7.06928642E-22 0.00000000E+00 5.66227794E-11 0.00000000E+00
+ 2.22186487E-14-1.69469912E-05 4.41394323E-11-3.72793919E-08-8.92976643E-15
+ 1.15390673E-04 0.00000000E+00-6.92897588E-07 0.00000000E+00-1.25685853E-05
+ 3.95345132E-20 7.53793275E-08-2.42638388E-22 0.00000000E+00-5.44058945E-10
+ 1.61730357E-04-4.24993099E-10 1.95097008E-02 0.00000000E+00 1.21711757E-04
+ 0.00000000E+00-2.04830933E-03 6.70620426E-18-1.27977089E-05 4.29202180E-20
+ 0.00000000E+00 1.08103240E-08 0.00000000E+00 1.19367238E-08-3.10123950E-03
+ 8.54387892E-09-3.49407780E-03 9.37297692E-09 1.09694486E-01 0.00000000E+00
+-6.84203184E-06 0.00000000E+00-1.17306786E-02 4.31229726E-17 2.46097715E-07
+-2.32231158E-21 0.00000000E+00 1.08947944E-08 0.00000000E+00-5.40820677E-10
+-3.25129741E-03 8.50102492E-09 1.55958714E-04-4.26659052E-10 1.84927822E-02
+ 0.00000000E+00-1.15843841E-04 0.00000000E+00-2.01176991E-03 6.47188920E-18
+ 1.25867966E-05-4.14052631E-20-1.51466120E-04-5.34741855E-19-6.51096662E-04
+ 0.00000000E+00 1.45777630E-04 4.30330663E-10-3.76634793E-08 1.25978857E-14
+ 0.00000000E+00 5.35634828E-10 0.00000000E+00-1.98911406E-14 3.23726305E-04
+ 1.32766374E-18 1.29590944E-03 4.78018708E-18 1.34697302E-03 0.00000000E+00
+ 5.38786570E-03 0.00000000E+00-3.49407780E-03-9.37297692E-09-7.49263645E-08
+ 2.13507344E-14 0.00000000E+00-1.19367238E-08 0.00000000E+00-4.21896101E-14
+ 3.23725834E-04 1.26781654E-18-1.72963611E-04-4.55751874E-19 1.34696922E-03
+ 0.00000000E+00-6.95861334E-04 0.00000000E+00 1.71749043E-04 4.22875503E-10
+-3.72793919E-08 8.92976643E-15 0.00000000E+00 5.50230901E-10 0.00000000E+00
+-2.22186487E-14 1.34696922E-03 0.00000000E+00 3.23725834E-04-1.26781654E-18
+ 0.00000000E+00-1.08947944E-08 0.00000000E+00-5.66227794E-11 3.25129741E-03
+-8.50102492E-09 1.69469912E-05-4.41394323E-11 1.11337972E-02 0.00000000E+00
+ 1.43647611E-03 0.00000000E+00 2.76661534E-03-7.12396288E-18 3.68128609E-04
+-5.55190955E-19 0.00000000E+00-1.09255909E-08 0.00000000E+00 5.67116540E-11
+ 3.30297491E-03-8.48864151E-09-1.70961088E-05 4.41037132E-11-6.95861334E-04
+ 0.00000000E+00-1.72963611E-04 4.55751874E-19 0.00000000E+00 5.40820677E-10
+ 0.00000000E+00-2.22186487E-14-1.55958714E-04 4.26659052E-10 3.72793919E-08
+ 8.92976643E-15 1.43647611E-03 0.00000000E+00 5.74587562E-03 0.00000000E+00
+ 3.68128609E-04-5.55190955E-19 1.47351440E-03-2.88704980E-18 0.00000000E+00
+-1.20683487E-08 0.00000000E+00-4.63769796E-14 3.71514080E-03-9.31985677E-09
+ 7.41636163E-08 1.47074318E-14 1.43647205E-03 0.00000000E+00-7.40598244E-04
+ 0.00000000E+00 3.68128129E-04-5.80810553E-19-1.95865443E-04 5.64275917E-19
+ 0.00000000E+00 5.56880224E-10 0.00000000E+00-2.41170424E-14-1.81665586E-04
+ 4.21524028E-10 3.68997951E-08 5.89839909E-15 3.72793919E-08-8.92976643E-15
+ 0.00000000E+00 2.22186487E-14 1.25867966E-05 4.14052631E-20 7.53793275E-08
+ 2.42638388E-22-1.15843841E-04 0.00000000E+00-6.92897588E-07 0.00000000E+00
+-1.70961088E-05-4.41037132E-11 7.41636163E-08-1.47074318E-14 0.00000000E+00
+-5.67116540E-11 0.00000000E+00 4.63769796E-14 2.64495715E-07 1.79145733E-20
+-1.99065335E-07-4.98100924E-22-5.90087459E-06 0.00000000E+00 1.80317145E-06
+ 0.00000000E+00 1.79862208E-05 4.39267051E-11 3.68997951E-08-5.89839909E-15
+ 0.00000000E+00 5.72681494E-11 0.00000000E+00 2.41170424E-14-1.23223407E-05
+-2.37876803E-20 7.39073918E-08 1.44172742E-22 1.09938252E-04 0.00000000E+00
+-6.60036696E-07 0.00000000E+00-1.71749043E-04-4.22875503E-10 0.00000000E+00
+-5.50230901E-10-2.01176991E-03-6.47188920E-18-1.25685853E-05-3.95345132E-20
+ 1.84927822E-02 0.00000000E+00 1.15390673E-04 0.00000000E+00 3.30297491E-03
+ 8.48864151E-09 3.71514080E-03 9.31985677E-09 0.00000000E+00 1.09255909E-08
+ 0.00000000E+00 1.20683487E-08-1.15117617E-02-2.78217796E-17 2.64495715E-07
+ 1.79145733E-20 1.04238974E-01 0.00000000E+00-5.90087459E-06 0.00000000E+00
+ 3.45150634E-03 8.45913781E-09-1.66036261E-04-4.24023350E-10 0.00000000E+00
+ 1.10184801E-08 0.00000000E+00-5.46665712E-10-1.97249744E-03-3.84820126E-18
+ 1.23419019E-05 2.43289212E-20 1.76158288E-02 0.00000000E+00-1.10330270E-04
+ 0.00000000E+00 0.00000000E+00 2.22186487E-14-3.72793919E-08-8.92976643E-15
+-1.15843841E-04 0.00000000E+00-6.92897588E-07 0.00000000E+00 1.25867966E-05
+-4.14052631E-20 7.53793275E-08-2.42638388E-22 0.00000000E+00-5.67116540E-11
+ 0.00000000E+00 4.63769796E-14 1.70961088E-05-4.41037132E-11-7.41636163E-08
+-1.47074318E-14-5.90087459E-06 0.00000000E+00 1.80317145E-06 0.00000000E+00
+ 2.64495715E-07-1.79145733E-20-1.99065335E-07 4.98100924E-22 0.00000000E+00
+ 5.72681494E-11 0.00000000E+00 2.41170424E-14-1.79862208E-05 4.39267051E-11
+-3.68997951E-08-5.89839909E-15 1.09938252E-04 0.00000000E+00-6.60036696E-07
+ 0.00000000E+00-1.23223407E-05 2.37876803E-20 7.39073918E-08-1.44172742E-22
+ 0.00000000E+00-5.50230901E-10 1.71749043E-04-4.22875503E-10 1.84927822E-02
+ 0.00000000E+00 1.15390673E-04 0.00000000E+00-2.01176991E-03 6.47188920E-18
+-1.25685853E-05 3.95345132E-20 0.00000000E+00 1.09255909E-08 0.00000000E+00
+ 1.20683487E-08-3.30297491E-03 8.48864151E-09-3.71514080E-03 9.31985677E-09
+ 1.04238974E-01 0.00000000E+00-5.90087459E-06 0.00000000E+00-1.15117617E-02
+ 2.78217796E-17 2.64495715E-07-1.79145733E-20 0.00000000E+00 1.10184801E-08
+ 0.00000000E+00-5.46665712E-10-3.45150634E-03 8.45913781E-09 1.66036261E-04
+-4.24023350E-10 1.76158288E-02 0.00000000E+00-1.10330270E-04 0.00000000E+00
+-1.97249744E-03 3.84820126E-18 1.23419019E-05-2.43289212E-20-1.72963611E-04
+-4.55751874E-19-6.95861334E-04 0.00000000E+00 1.55958714E-04 4.26659052E-10
+-3.72793919E-08 8.92976643E-15 0.00000000E+00 5.40820677E-10 0.00000000E+00
+-2.22186487E-14 3.68128609E-04 5.55190955E-19 1.47351440E-03 2.88704980E-18
+ 1.43647611E-03 0.00000000E+00 5.74587562E-03 0.00000000E+00-3.71514080E-03
+-9.31985677E-09-7.41636163E-08 1.47074318E-14 0.00000000E+00-1.20683487E-08
+ 0.00000000E+00-4.63769796E-14 3.68128129E-04 5.80810553E-19-1.95865443E-04
+-5.64275917E-19 1.43647205E-03 0.00000000E+00-7.40598244E-04 0.00000000E+00
+ 1.81665586E-04 4.21524028E-10-3.68997951E-08 5.89839909E-15 0.00000000E+00
+ 5.56880224E-10 0.00000000E+00-2.41170424E-14 3.68128129E-04 5.80810553E-19
+ 1.43647205E-03 0.00000000E+00-3.45150634E-03-8.45913781E-09-1.79862208E-05
+-4.39267051E-11 0.00000000E+00-1.10184801E-08 0.00000000E+00-5.72681494E-11
+ 3.13304813E-03 8.92048627E-18 4.15333644E-04 1.67629312E-18 1.18495888E-02
+ 0.00000000E+00 1.52592093E-03 0.00000000E+00-3.50265672E-03-8.45095751E-09
+ 1.81338199E-05 4.39031115E-11 0.00000000E+00-1.10519090E-08 0.00000000E+00
+ 5.73646176E-11 1.43647205E-03 0.00000000E+00 3.68128129E-04-5.80810553E-19
+ 0.00000000E+00-1.10184801E-08 0.00000000E+00-5.72681494E-11 3.45150634E-03
+-8.45913781E-09 1.79862208E-05-4.39267051E-11 1.18495888E-02 0.00000000E+00
+ 1.52592093E-03 0.00000000E+00 3.13304813E-03-8.92048627E-18 4.15333644E-04
+-1.67629312E-18 0.00000000E+00-1.10519090E-08 0.00000000E+00 5.73646176E-11
+ 3.50265672E-03-8.45095751E-09-1.81338199E-05 4.39031115E-11-7.40598244E-04
+ 0.00000000E+00-1.95865443E-04 5.64275917E-19 0.00000000E+00 5.46665712E-10
+ 0.00000000E+00-2.41170424E-14-1.66036261E-04 4.24023350E-10 3.68997951E-08
+ 5.89839909E-15 1.52592093E-03 0.00000000E+00 6.10365349E-03 0.00000000E+00
+ 4.15333644E-04-1.67629312E-18 1.66233002E-03-6.43442002E-18 0.00000000E+00
+-1.22112503E-08 0.00000000E+00-4.98096972E-14 3.93392151E-03-9.28474198E-09
+ 7.33441126E-08 9.18088977E-15 1.52591665E-03 0.00000000E+00-7.85305380E-04
+ 0.00000000E+00 4.15333043E-04-1.76402520E-18-2.20165578E-04 8.35961293E-19
+ 0.00000000E+00 5.63923989E-10 0.00000000E+00-2.56797500E-14-1.91459882E-04
+ 4.20816698E-10 3.64622149E-08 3.36201191E-15 4.15333043E-04 1.76402520E-18
+ 1.52591665E-03 0.00000000E+00-3.64955124E-03-8.43255509E-09-1.90141172E-05
+-4.37926529E-11 0.00000000E+00-1.11516971E-08 0.00000000E+00-5.79624676E-11
+ 3.52185359E-03 1.38755457E-17 4.65329269E-04 1.57981997E-18 1.25649040E-02
+ 0.00000000E+00 1.61530488E-03 0.00000000E+00-3.70009598E-03-8.42789154E-09
+ 1.91599660E-05 4.37792048E-11 0.00000000E+00-1.11872928E-08 0.00000000E+00
+ 5.80651866E-11 1.52591665E-03 0.00000000E+00 4.15333043E-04-1.76402520E-18
+ 0.00000000E+00-1.11516971E-08 0.00000000E+00-5.79624676E-11 3.64955124E-03
+-8.43255509E-09 1.90141172E-05-4.37926529E-11 1.25649040E-02 0.00000000E+00
+ 1.61530488E-03 0.00000000E+00 3.52185359E-03-1.38755457E-17 4.65329269E-04
+-1.57981997E-18 0.00000000E+00-1.11872928E-08 0.00000000E+00 5.80651866E-11
+ 3.70009598E-03-8.42789154E-09-1.91599660E-05 4.37792048E-11 3.68997951E-08
+-5.89839909E-15 0.00000000E+00 2.41170424E-14 1.23419019E-05 2.43289212E-20
+ 7.39073918E-08 1.44172742E-22-1.10330270E-04 0.00000000E+00-6.60036696E-07
+ 0.00000000E+00-1.81338199E-05-4.39031115E-11 7.33441126E-08-9.18088977E-15
+ 0.00000000E+00-5.73646176E-11 0.00000000E+00 4.98096972E-14 2.83345973E-07
+ 1.26415898E-20-1.95000192E-07-3.01744738E-22-5.11907894E-06 0.00000000E+00
+ 1.72147256E-06 0.00000000E+00 1.90141172E-05 4.37926529E-11 3.64622149E-08
+-3.36201191E-15 0.00000000E+00 5.79624676E-11 0.00000000E+00 2.56797500E-14
+-1.20585864E-05-1.33545378E-20 7.23305194E-08 8.13119891E-23 1.05207588E-04
+ 0.00000000E+00-6.31531561E-07 0.00000000E+00-1.81665586E-04-4.21524028E-10
+ 0.00000000E+00-5.56880224E-10-1.97249744E-03-3.84820126E-18-1.23223407E-05
+-2.37876803E-20 1.76158288E-02 0.00000000E+00 1.09938252E-04 0.00000000E+00
+ 3.50265672E-03 8.45095751E-09 3.93392151E-03 9.28474198E-09 0.00000000E+00
+ 1.10519090E-08 0.00000000E+00 1.22112503E-08-1.12767511E-02-1.77022987E-17
+ 2.83345973E-07 1.26415898E-20 9.95203325E-02 0.00000000E+00-5.11907894E-06
+ 0.00000000E+00 3.64955124E-03 8.43255509E-09-1.76015660E-04-4.22241502E-10
+ 0.00000000E+00 1.11516971E-08 0.00000000E+00-5.53047405E-10-1.93042383E-03
+-2.18145898E-18 1.20794945E-05 1.38789059E-20 1.68551253E-02 0.00000000E+00
+-1.05548562E-04 0.00000000E+00 0.00000000E+00 2.41170424E-14-3.68997951E-08
+-5.89839909E-15-1.10330270E-04 0.00000000E+00-6.60036696E-07 0.00000000E+00
+ 1.23419019E-05-2.43289212E-20 7.39073918E-08-1.44172742E-22 0.00000000E+00
+-5.73646176E-11 0.00000000E+00 4.98096972E-14 1.81338199E-05-4.39031115E-11
+-7.33441126E-08-9.18088977E-15-5.11907894E-06 0.00000000E+00 1.72147256E-06
+ 0.00000000E+00 2.83345973E-07-1.26415898E-20-1.95000192E-07 3.01744738E-22
+ 0.00000000E+00 5.79624676E-11 0.00000000E+00 2.56797500E-14-1.90141172E-05
+ 4.37926529E-11-3.64622149E-08-3.36201191E-15 1.05207588E-04 0.00000000E+00
+-6.31531561E-07 0.00000000E+00-1.20585864E-05 1.33545378E-20 7.23305194E-08
+-8.13119891E-23 0.00000000E+00-5.56880224E-10 1.81665586E-04-4.21524028E-10
+ 1.76158288E-02 0.00000000E+00 1.09938252E-04 0.00000000E+00-1.97249744E-03
+ 3.84820126E-18-1.23223407E-05 2.37876803E-20 0.00000000E+00 1.10519090E-08
+ 0.00000000E+00 1.22112503E-08-3.50265672E-03 8.45095751E-09-3.93392151E-03
+ 9.28474198E-09 9.95203325E-02 0.00000000E+00-5.11907894E-06 0.00000000E+00
+-1.12767511E-02 1.77022987E-17 2.83345973E-07-1.26415898E-20 0.00000000E+00
+ 1.11516971E-08 0.00000000E+00-5.53047405E-10-3.64955124E-03 8.43255509E-09
+ 1.76015660E-04-4.22241502E-10 1.68551253E-02 0.00000000E+00-1.05548562E-04
+ 0.00000000E+00-1.93042383E-03 2.18145898E-18 1.20794945E-05-1.38789059E-20
+-1.95865443E-04-5.64275917E-19-7.40598244E-04 0.00000000E+00 1.66036261E-04
+ 4.24023350E-10-3.68997951E-08 5.89839909E-15 0.00000000E+00 5.46665712E-10
+ 0.00000000E+00-2.41170424E-14 4.15333644E-04 1.67629312E-18 1.66233002E-03
+ 6.43442002E-18 1.52592093E-03 0.00000000E+00 6.10365349E-03 0.00000000E+00
+-3.93392151E-03-9.28474198E-09-7.33441126E-08 9.18088977E-15 0.00000000E+00
+-1.22112503E-08 0.00000000E+00-4.98096972E-14 4.15333043E-04 1.76402520E-18
+-2.20165578E-04-8.35961293E-19 1.52591665E-03 0.00000000E+00-7.85305380E-04
+ 0.00000000E+00 1.91459882E-04 4.20816698E-10-3.64622149E-08 3.36201191E-15
+ 0.00000000E+00 5.63923989E-10 0.00000000E+00-2.56797500E-14 4.65328646E-04
+ 1.33246043E-18 1.61530033E-03 0.00000000E+00-3.84521018E-03-8.41883253E-09
+-2.00295875E-05-4.37247553E-11 0.00000000E+00-1.12927844E-08 0.00000000E+00
+-5.86972220E-11 3.93293580E-03 8.91777861E-18 5.18103266E-04 1.10082855E-18
+ 1.32797144E-02 0.00000000E+00 1.70462352E-03 0.00000000E+00-3.89512752E-03
+-8.41714598E-09 2.01736269E-05 4.37198958E-11 0.00000000E+00-1.13301786E-08
+ 0.00000000E+00 5.88051293E-11-7.85305380E-04 0.00000000E+00-2.20165578E-04
+ 8.35961293E-19 0.00000000E+00 5.53047405E-10 0.00000000E+00-2.56797500E-14
+-1.76015660E-04 4.22241502E-10 3.64622149E-08 3.36201191E-15 1.61530488E-03
+ 0.00000000E+00 6.46118722E-03 0.00000000E+00 4.65329269E-04-1.57981997E-18
+ 1.86230810E-03-5.81810205E-18 0.00000000E+00-1.23634338E-08 0.00000000E+00
+-5.26484579E-14 4.15013013E-03-9.26469057E-09 7.24546433E-08 4.52753388E-15
+ 1.61530033E-03 0.00000000E+00-8.29980962E-04 0.00000000E+00 4.65328646E-04
+-1.33246043E-18-2.45857978E-04 6.08322244E-19 0.00000000E+00 5.71296242E-10
+ 0.00000000E+00-2.69768252E-14-2.01131067E-04 4.20657123E-10 3.60098416E-08
+ 1.21486113E-15 3.64622149E-08-3.36201191E-15 0.00000000E+00 2.56797500E-14
+ 1.20794945E-05 1.38789059E-20 7.23305194E-08 8.13119891E-23-1.05548562E-04
+ 0.00000000E+00-6.31531561E-07 0.00000000E+00-1.91599660E-05-4.37792048E-11
+ 7.24546433E-08-4.52753388E-15 0.00000000E+00-5.80651866E-11 0.00000000E+00
+ 5.26484579E-14 3.02635863E-07-1.80826479E-20-1.90652855E-07-3.03340164E-22
+-4.46217208E-06 0.00000000E+00 1.65043337E-06 0.00000000E+00 2.00295875E-05
+ 4.37247553E-11 3.60098416E-08-1.21486113E-15 0.00000000E+00 5.86972220E-11
+ 0.00000000E+00 2.69768252E-14-1.17768914E-05-2.87671283E-20 7.06463208E-08
+ 1.67578564E-22 1.01083591E-04 0.00000000E+00-6.06685783E-07 0.00000000E+00
+-1.91459882E-04-4.20816698E-10 0.00000000E+00-5.63923989E-10-1.93042383E-03
+-2.18145898E-18-1.20585864E-05-1.33545378E-20 1.68551253E-02 0.00000000E+00
+ 1.05207588E-04 0.00000000E+00 3.70009598E-03 8.42789154E-09 4.15013013E-03
+ 9.26469057E-09 0.00000000E+00 1.11872928E-08 0.00000000E+00 1.23634338E-08
+-1.10254615E-02-1.61178246E-17 3.02635863E-07-1.80826479E-20 9.54169155E-02
+ 0.00000000E+00-4.46217208E-06 0.00000000E+00 3.84521018E-03 8.41883253E-09
+-1.85878524E-04-4.21172319E-10 0.00000000E+00 1.12927844E-08 0.00000000E+00
+-5.59870131E-10-1.88548525E-03-4.46330207E-18 1.17992074E-05 2.70774355E-20
+ 1.61920851E-02 0.00000000E+00-1.01381395E-04 0.00000000E+00 0.00000000E+00
+ 2.56797500E-14-3.64622149E-08-3.36201191E-15-1.05548562E-04 0.00000000E+00
+-6.31531561E-07 0.00000000E+00 1.20794945E-05-1.38789059E-20 7.23305194E-08
+-8.13119891E-23 0.00000000E+00-5.80651866E-11 0.00000000E+00 5.26484579E-14
+ 1.91599660E-05-4.37792048E-11-7.24546433E-08-4.52753388E-15-4.46217208E-06
+ 0.00000000E+00 1.65043337E-06 0.00000000E+00 3.02635863E-07 1.80826479E-20
+-1.90652855E-07 3.03340164E-22 0.00000000E+00 5.86972220E-11 0.00000000E+00
+ 2.69768252E-14-2.00295875E-05 4.37247553E-11-3.60098416E-08-1.21486113E-15
+ 1.01083591E-04 0.00000000E+00-6.06685783E-07 0.00000000E+00-1.17768914E-05
+ 2.87671283E-20 7.06463208E-08-1.67578564E-22 0.00000000E+00-5.63923989E-10
+ 1.91459882E-04-4.20816698E-10 1.68551253E-02 0.00000000E+00 1.05207588E-04
+ 0.00000000E+00-1.93042383E-03 2.18145898E-18-1.20585864E-05 1.33545378E-20
+ 0.00000000E+00 1.11872928E-08 0.00000000E+00 1.23634338E-08-3.70009598E-03
+ 8.42789154E-09-4.15013013E-03 9.26469057E-09 9.54169155E-02 0.00000000E+00
+-4.46217208E-06 0.00000000E+00-1.10254615E-02 1.61178246E-17 3.02635863E-07
+ 1.80826479E-20 0.00000000E+00 1.12927844E-08 0.00000000E+00-5.59870131E-10
+-3.84521018E-03 8.41883253E-09 1.85878524E-04-4.21172319E-10 1.61920851E-02
+ 0.00000000E+00-1.01381395E-04 0.00000000E+00-1.88548525E-03 4.46330207E-18
+ 1.17992074E-05-2.70774355E-20-2.20165578E-04-8.35961293E-19-7.85305380E-04
+ 0.00000000E+00 1.76015660E-04 4.22241502E-10-3.64622149E-08 3.36201191E-15
+ 0.00000000E+00 5.53047405E-10 0.00000000E+00-2.56797500E-14 4.65329269E-04
+ 1.57981997E-18 1.86230810E-03 5.81810205E-18 1.61530488E-03 0.00000000E+00
+ 6.46118722E-03 0.00000000E+00-4.15013013E-03-9.26469057E-09-7.24546433E-08
+ 4.52753388E-15 0.00000000E+00-1.23634338E-08 0.00000000E+00-5.26484579E-14
+ 4.65328646E-04 1.33246043E-18-2.45857978E-04-6.08322244E-19 1.61530033E-03
+ 0.00000000E+00-8.29980962E-04 0.00000000E+00 2.01131067E-04 4.20657123E-10
+-3.60098416E-08 1.21486113E-15 0.00000000E+00 5.71296242E-10 0.00000000E+00
+-2.69768252E-14 1.61530033E-03 0.00000000E+00 4.65328646E-04-1.33246043E-18
+ 0.00000000E+00-1.12927844E-08 0.00000000E+00-5.86972220E-11 3.84521018E-03
+-8.41883253E-09 2.00295875E-05-4.37247553E-11 1.32797144E-02 0.00000000E+00
+ 1.70462352E-03 0.00000000E+00 3.93293580E-03-8.91777861E-18 5.18103266E-04
+-1.10082855E-18 0.00000000E+00-1.13301786E-08 0.00000000E+00 5.88051293E-11
+ 3.89512752E-03-8.41714598E-09-2.01736269E-05 4.37198958E-11 2.53244666E-03
+ 0.00000000E+00 1.50545947E-03-5.94667244E-18 0.00000000E+00-5.84038099E-09
+ 0.00000000E+00-2.11816861E-11 5.21746461E-03-3.36586209E-09 2.04222387E-05
+-1.21835907E-11 2.04575987E-02 0.00000000E+00 2.58187679E-03 0.00000000E+00
+ 1.22774934E-02-3.72822596E-17 1.56394277E-03-3.00650445E-18 0.00000000E+00
+-3.71809035E-09 0.00000000E+00 1.65705663E-11 5.23240712E-03-2.12750718E-09
+-2.04547256E-05 9.49294435E-12 8.12171887E-09-6.72661587E-13 0.00000000E+00
+-1.15277996E-12 9.33365335E-07 6.10268395E-21 4.15220418E-09 2.40507893E-23
+-4.28146000E-05 0.00000000E+00-1.93248788E-07 0.00000000E+00-2.04547256E-05
+-9.49294435E-12-5.12972217E-06-9.09743173E-13 0.00000000E+00-1.65705663E-11
+ 0.00000000E+00-1.60945799E-12 1.44930552E-06 1.68956076E-21-5.27357790E-09
+-1.52774623E-23-7.24686450E-05 0.00000000E+00 2.57690883E-07 0.00000000E+00
+-2.63522233E-04 5.66630481E-11 0.00000000E+00 9.45310880E-11-1.95377825E-04
+-1.11875379E-18-9.06523131E-07-4.47018117E-21 9.09328764E-03 0.00000000E+00
+ 4.28171506E-05 0.00000000E+00 5.23240712E-03 2.12750718E-09 2.88580788E-03
+ 4.06561330E-10 0.00000000E+00 3.71809035E-09 0.00000000E+00 7.17366281E-10
+-5.06648427E-04 9.31171062E-19 1.44930552E-06 1.68956076E-21 2.62757109E-02
+ 0.00000000E+00-7.24686450E-05 0.00000000E+00 0.00000000E+00-1.15277996E-12
+-8.12171887E-09-6.72661587E-13-4.28146000E-05 0.00000000E+00-1.93248788E-07
+ 0.00000000E+00 9.33365335E-07-6.10268395E-21 4.15220418E-09-2.40507893E-23
+ 0.00000000E+00-1.65705663E-11 0.00000000E+00-1.60945799E-12 2.04547256E-05
+-9.49294435E-12 5.12972217E-06-9.09743173E-13-7.24686450E-05 0.00000000E+00
+ 2.57690883E-07 0.00000000E+00 1.44930552E-06-1.68956076E-21-5.27357790E-09
+ 1.52774623E-23 0.00000000E+00 9.45310880E-11 2.63522233E-04 5.66630481E-11
+ 9.09328764E-03 0.00000000E+00 4.28171506E-05 0.00000000E+00-1.95377825E-04
+ 1.11875379E-18-9.06523131E-07 4.47018117E-21 0.00000000E+00 3.71809035E-09
+ 0.00000000E+00 7.17366281E-10-5.23240712E-03 2.12750718E-09-2.88580788E-03
+ 4.06561330E-10 2.62757109E-02 0.00000000E+00-7.24686450E-05 0.00000000E+00
+-5.06648427E-04-9.31171062E-19 1.44930552E-06-1.68956076E-21-7.67350560E-04
+-2.23829422E-18-1.27858086E-03 0.00000000E+00 2.58956100E-04 3.21710422E-10
+-8.12171887E-09 6.72661587E-13 0.00000000E+00 5.53922053E-10 0.00000000E+00
+ 1.15277996E-12 1.56394277E-03 3.00650445E-18 3.11327565E-03 6.47297658E-18
+ 2.58187679E-03 0.00000000E+00 5.15132050E-03 0.00000000E+00-2.88580788E-03
+-4.06561330E-10 5.12972217E-06 9.09743173E-13 0.00000000E+00-7.17366281E-10
+ 0.00000000E+00 1.60945799E-12 1.50545947E-03 5.94667244E-18 2.53244666E-03
+ 0.00000000E+00-5.21746461E-03-3.36586209E-09-2.04222387E-05-1.21835907E-11
+ 0.00000000E+00-5.84038099E-09 0.00000000E+00-2.11816861E-11 1.22774934E-02
+ 3.72822596E-17 1.56394277E-03 3.00650445E-18 2.04575987E-02 0.00000000E+00
+ 2.58187679E-03 0.00000000E+00-5.23240712E-03-2.12750718E-09 2.04547256E-05
+ 9.49294435E-12 0.00000000E+00-3.71809035E-09 0.00000000E+00 1.65705663E-11
+-1.27858086E-03 0.00000000E+00-7.67350560E-04 2.23829422E-18 0.00000000E+00
+ 5.53922053E-10 0.00000000E+00 1.15277996E-12-2.58956100E-04 3.21710422E-10
+ 8.12171887E-09 6.72661587E-13 2.58187679E-03 0.00000000E+00 5.15132050E-03
+ 0.00000000E+00 1.56394277E-03-3.00650445E-18 3.11327565E-03-6.47297658E-18
+ 0.00000000E+00-7.17366281E-10 0.00000000E+00 1.60945799E-12 2.88580788E-03
+-4.06561330E-10-5.12972217E-06 9.09743173E-13 8.57706455E-09-2.27572885E-13
+ 0.00000000E+00-2.99442738E-13 1.27607912E-06 9.59471387E-21 5.70129362E-09
+ 4.53083483E-23-4.27984831E-05 0.00000000E+00-1.93170824E-07 0.00000000E+00
+-2.02207834E-05-2.28084495E-11 1.68692553E-08-8.73750502E-13 0.00000000E+00
+-3.82282879E-11 0.00000000E+00-1.39576856E-12 3.69850681E-07 4.92049717E-21
+-1.31470150E-08-1.15147815E-22 1.83369704E-08 0.00000000E+00 5.15204913E-07
+ 0.00000000E+00 2.04222387E-05 1.21835907E-11 8.12171887E-09-6.72661587E-13
+ 0.00000000E+00 2.11816861E-11 0.00000000E+00-1.15277996E-12-9.06523131E-07
+-4.47018117E-21 4.15220418E-09 2.40507893E-23 4.28171506E-05 0.00000000E+00
+-1.93248788E-07 0.00000000E+00 2.48277020E-03 0.00000000E+00 1.44785021E-03
+-4.14698508E-18 0.00000000E+00-1.01708663E-08 0.00000000E+00-3.94260588E-11
+ 5.15702535E-03-6.13982855E-09 2.01864751E-05-2.37187410E-11 2.00604744E-02
+ 0.00000000E+00 2.53237051E-03 0.00000000E+00 1.18127277E-02-4.07588957E-17
+ 1.50541651E-03-5.86428285E-18 0.00000000E+00-9.61212509E-09 0.00000000E+00
+ 3.82282879E-11 5.17281393E-03-5.71750187E-09-2.02207834E-05 2.28084495E-11
+-1.25378518E-03 0.00000000E+00-7.38316681E-04 2.50281698E-18 0.00000000E+00
+ 5.72840446E-10 0.00000000E+00 2.99442738E-13-2.55830745E-04 3.57153258E-10
+ 8.57706455E-09 2.27572885E-13 2.53237051E-03 0.00000000E+00 1.01295735E-02
+ 0.00000000E+00 1.50541651E-03-5.86428285E-18 6.02207935E-03-2.19587557E-17
+ 0.00000000E+00-9.04020808E-09 0.00000000E+00 1.39576856E-12 5.71492723E-03
+-5.27756332E-09 1.68692553E-08 8.73750502E-13 2.53244666E-03 0.00000000E+00
+-1.27858086E-03 0.00000000E+00 1.50545947E-03-5.94667244E-18-7.67350560E-04
+ 2.23829422E-18 0.00000000E+00-9.45310880E-11 0.00000000E+00 1.15277996E-12
+-2.63522233E-04-5.66630481E-11 8.12171887E-09 6.72661587E-13 1.44785021E-03
+ 4.14698508E-18 2.48277020E-03 0.00000000E+00-5.15702535E-03-6.13982855E-09
+-2.01864751E-05-2.37187410E-11 0.00000000E+00-1.01708663E-08 0.00000000E+00
+-3.94260588E-11 1.18127277E-02 4.07588957E-17 1.50541651E-03 5.86428285E-18
+ 2.00604744E-02 0.00000000E+00 2.53237051E-03 0.00000000E+00-5.17281393E-03
+-5.71750187E-09 2.02207834E-05 2.28084495E-11 0.00000000E+00-9.61212509E-09
+ 0.00000000E+00 3.82282879E-11-7.38316681E-04-2.50281698E-18-1.25378518E-03
+ 0.00000000E+00 2.55830745E-04 3.57153258E-10-8.57706455E-09 2.27572885E-13
+ 0.00000000E+00 5.72840446E-10 0.00000000E+00 2.99442738E-13 1.50541651E-03
+ 5.86428285E-18 6.02207935E-03 2.19587557E-17 2.53237051E-03 0.00000000E+00
+ 1.01295735E-02 0.00000000E+00-5.71492723E-03-5.27756332E-09-1.68692553E-08
+ 8.73750502E-13 0.00000000E+00-9.04020808E-09 0.00000000E+00 1.39576856E-12
+ 1.50545947E-03 5.94667244E-18-7.67350560E-04-2.23829422E-18 2.53244666E-03
+ 0.00000000E+00-1.27858086E-03 0.00000000E+00 2.63522233E-04-5.66630481E-11
+-8.12171887E-09 6.72661587E-13 0.00000000E+00-9.45310880E-11 0.00000000E+00
+ 1.15277996E-12 0.00000000E+00-4.02534851E-10 2.60654961E-04-2.28300536E-10
+ 9.08961599E-03 0.00000000E+00 4.27987004E-05 0.00000000E+00-2.68267062E-04
+ 2.12296664E-18-1.25021777E-06 1.04234299E-20 0.00000000E+00 9.61212509E-09
+ 0.00000000E+00 9.04020808E-09-5.17281393E-03 5.71750187E-09-5.71492723E-03
+ 5.27756332E-09 5.25246164E-02 0.00000000E+00 1.83369704E-08 0.00000000E+00
+-1.34103359E-03 1.34302731E-17 3.69850681E-07-4.92049717E-21 0.00000000E+00
+ 5.84038099E-09 0.00000000E+00-5.53922053E-10-5.21746461E-03 3.36586209E-09
+ 2.58956100E-04-3.21710422E-10 9.09328764E-03 0.00000000E+00-4.28146000E-05
+ 0.00000000E+00-1.95377825E-04 1.11875379E-18 9.33365335E-07-6.10268395E-21
+ 0.00000000E+00-2.99442738E-13-8.57706455E-09-2.27572885E-13-4.27984831E-05
+ 0.00000000E+00-1.93170824E-07 0.00000000E+00 1.27607912E-06-9.59471387E-21
+ 5.70129362E-09-4.53083483E-23 0.00000000E+00-3.82282879E-11 0.00000000E+00
+-1.39576856E-12 2.02207834E-05-2.28084495E-11-1.68692553E-08-8.73750502E-13
+ 1.83369704E-08 0.00000000E+00 5.15204913E-07 0.00000000E+00 3.69850681E-07
+-4.92049717E-21-1.31470150E-08 1.15147815E-22 0.00000000E+00 2.11816861E-11
+ 0.00000000E+00-1.15277996E-12-2.04222387E-05 1.21835907E-11-8.12171887E-09
+-6.72661587E-13 4.28171506E-05 0.00000000E+00-1.93248788E-07 0.00000000E+00
+-9.06523131E-07 4.47018117E-21 4.15220418E-09-2.40507893E-23-2.60654961E-04
+-2.28300536E-10 0.00000000E+00-4.02534851E-10-2.68267062E-04-2.12296664E-18
+-1.25021777E-06-1.04234299E-20 9.08961599E-03 0.00000000E+00 4.27987004E-05
+ 0.00000000E+00 5.17281393E-03 5.71750187E-09 5.71492723E-03 5.27756332E-09
+ 0.00000000E+00 9.61212509E-09 0.00000000E+00 9.04020808E-09-1.34103359E-03
+-1.34302731E-17 3.69850681E-07 4.92049717E-21 5.25246164E-02 0.00000000E+00
+ 1.83369704E-08 0.00000000E+00 5.21746461E-03 3.36586209E-09-2.58956100E-04
+-3.21710422E-10 0.00000000E+00 5.84038099E-09 0.00000000E+00-5.53922053E-10
+-1.95377825E-04-1.11875379E-18 9.33365335E-07 6.10268395E-21 9.09328764E-03
+ 0.00000000E+00-4.28146000E-05 0.00000000E+00 1.82295904E-03 7.24889606E-18
+ 3.20912514E-03 0.00000000E+00-6.74566114E-03-8.98432156E-09-3.50689559E-05
+-4.65722786E-11 0.00000000E+00-1.40648797E-08 0.00000000E+00-7.30226675E-11
+ 1.49804424E-02 4.35358217E-17 1.92230985E-03 4.44104428E-18 2.60226235E-02
+ 0.00000000E+00 3.29650467E-03 0.00000000E+00-6.77497508E-03-8.88962710E-09
+ 3.51535396E-05 4.63057584E-11 0.00000000E+00-1.40560025E-08 0.00000000E+00
+ 7.30041627E-11-1.62640745E-03 0.00000000E+00-9.36317224E-04 2.92248508E-18
+ 0.00000000E+00 7.04775916E-10 0.00000000E+00 4.62620284E-15-3.33526689E-04
+ 4.60358755E-10 2.11459169E-08 6.66300434E-14 3.29650467E-03 0.00000000E+00
+ 1.15490978E-02 0.00000000E+00 1.92230985E-03-4.44104428E-18 6.73005358E-03
+-1.90863465E-17 0.00000000E+00-1.35133106E-08 0.00000000E+00 7.94337397E-12
+ 6.56970556E-03-8.36124373E-09-3.80094314E-06 5.10401111E-12 2.48277020E-03
+ 0.00000000E+00-1.25378518E-03 0.00000000E+00 1.44785021E-03-4.14698508E-18
+-7.38316681E-04 2.50281698E-18 0.00000000E+00 4.02534851E-10 0.00000000E+00
+ 2.99442738E-13-2.60654961E-04 2.28300536E-10 8.57706455E-09 2.27572885E-13
+ 2.11459169E-08-6.66300434E-14 0.00000000E+00-4.62620284E-15 2.92909728E-06
+-1.06210928E-20 1.73802205E-08-6.01002596E-23-7.54809124E-05 0.00000000E+00
+-4.52317855E-07 0.00000000E+00-3.51535396E-05-4.63057584E-11-3.80094314E-06
+-5.10401111E-12 0.00000000E+00-7.30041627E-11 0.00000000E+00-7.94337397E-12
+ 2.43510657E-06-2.33054196E-20-3.02757466E-08 8.89397484E-24-5.52834532E-05
+ 0.00000000E+00 8.60579746E-07 0.00000000E+00 2.01864751E-05 2.37187410E-11
+ 8.57706455E-09-2.27572885E-13 0.00000000E+00 3.94260588E-11 0.00000000E+00
+-2.99442738E-13-1.25021777E-06-1.04234299E-20 5.70129362E-09 4.53083483E-23
+ 4.27987004E-05 0.00000000E+00-1.93170824E-07 0.00000000E+00-3.42483761E-04
+-4.31553521E-10 0.00000000E+00-7.02200321E-10-4.63902310E-04 1.58583048E-18
+-2.87126149E-06 9.27770632E-21 1.20732961E-02 0.00000000E+00 7.54752441E-05
+ 0.00000000E+00 6.77497508E-03 8.88962710E-09 6.56970556E-03 8.36124373E-09
+ 0.00000000E+00 1.40560025E-08 0.00000000E+00 1.35133106E-08-2.07631619E-03
+-2.50050963E-18 2.43510657E-06-2.33054196E-20 6.11296785E-02 0.00000000E+00
+-5.52834532E-05 0.00000000E+00 5.15702535E-03 6.13982855E-09-2.55830745E-04
+-3.57153258E-10 0.00000000E+00 1.01708663E-08 0.00000000E+00-5.72840446E-10
+-2.68267062E-04-2.12296664E-18 1.27607912E-06 9.59471387E-21 9.08961599E-03
+ 0.00000000E+00-4.27984831E-05 0.00000000E+00 0.00000000E+00-4.62620284E-15
+-2.11459169E-08-6.66300434E-14-7.54809124E-05 0.00000000E+00-4.52317855E-07
+ 0.00000000E+00 2.92909728E-06 1.06210928E-20 1.73802205E-08 6.01002596E-23
+ 0.00000000E+00-7.30041627E-11 0.00000000E+00-7.94337397E-12 3.51535396E-05
+-4.63057584E-11 3.80094314E-06-5.10401111E-12-5.52834532E-05 0.00000000E+00
+ 8.60579746E-07 0.00000000E+00 2.43510657E-06 2.33054196E-20-3.02757466E-08
+-8.89397484E-24 0.00000000E+00 3.94260588E-11 0.00000000E+00-2.99442738E-13
+-2.01864751E-05 2.37187410E-11-8.57706455E-09-2.27572885E-13 4.27987004E-05
+ 0.00000000E+00-1.93170824E-07 0.00000000E+00-1.25021777E-06 1.04234299E-20
+ 5.70129362E-09-4.53083483E-23 0.00000000E+00-7.02200321E-10 3.42483761E-04
+-4.31553521E-10 1.20732961E-02 0.00000000E+00 7.54752441E-05 0.00000000E+00
+-4.63902310E-04-1.58583048E-18-2.87126149E-06-9.27770632E-21 0.00000000E+00
+ 1.40560025E-08 0.00000000E+00 1.35133106E-08-6.77497508E-03 8.88962710E-09
+-6.56970556E-03 8.36124373E-09 6.11296785E-02 0.00000000E+00-5.52834532E-05
+ 0.00000000E+00-2.07631619E-03 2.50050963E-18 2.43510657E-06 2.33054196E-20
+ 0.00000000E+00 1.01708663E-08 0.00000000E+00-5.72840446E-10-5.15702535E-03
+ 6.13982855E-09 2.55830745E-04-3.57153258E-10 9.08961599E-03 0.00000000E+00
+-4.27984831E-05 0.00000000E+00-2.68267062E-04 2.12296664E-18 1.27607912E-06
+-9.59471387E-21-9.36317224E-04-2.92248508E-18-1.62640745E-03 0.00000000E+00
+ 3.33526689E-04 4.60358755E-10-2.11459169E-08 6.66300434E-14 0.00000000E+00
+ 7.04775916E-10 0.00000000E+00 4.62620284E-15 1.92230985E-03 4.44104428E-18
+ 6.73005358E-03 1.90863465E-17 3.29650467E-03 0.00000000E+00 1.15490978E-02
+ 0.00000000E+00-6.56970556E-03-8.36124373E-09 3.80094314E-06 5.10401111E-12
+ 0.00000000E+00-1.35133106E-08 0.00000000E+00 7.94337397E-12 1.44785021E-03
+ 4.14698508E-18-7.38316681E-04-2.50281698E-18 2.48277020E-03 0.00000000E+00
+-1.25378518E-03 0.00000000E+00 2.60654961E-04 2.28300536E-10-8.57706455E-09
+ 2.27572885E-13 0.00000000E+00 4.02534851E-10 0.00000000E+00 2.99442738E-13
+ 3.20912514E-03 0.00000000E+00 1.82295904E-03-7.24889606E-18 0.00000000E+00
+-1.40648797E-08 0.00000000E+00-7.30226675E-11 6.74566114E-03-8.98432156E-09
+ 3.50689559E-05-4.65722786E-11 2.60226235E-02 0.00000000E+00 3.29650467E-03
+ 0.00000000E+00 1.49804424E-02-4.35358217E-17 1.92230985E-03-4.44104428E-18
+ 0.00000000E+00-1.40560025E-08 0.00000000E+00 7.30041627E-11 6.77497508E-03
+-8.88962710E-09-3.51535396E-05 4.63057584E-11 1.72592117E-03 7.41636422E-18
+ 3.12152539E-03 0.00000000E+00-6.62723914E-03-9.11358167E-09-3.44560273E-05
+-4.73355395E-11 0.00000000E+00-1.41557028E-08 0.00000000E+00-7.35481224E-11
+ 1.41948084E-02 6.79646214E-17 1.82295272E-03 8.74718329E-18 2.53225911E-02
+ 0.00000000E+00 3.20911636E-03 0.00000000E+00-6.65833347E-03-9.10886358E-09
+ 3.45457478E-05 4.73232534E-11 0.00000000E+00-1.41645235E-08 0.00000000E+00
+ 7.35761614E-11-1.58266044E-03 0.00000000E+00-8.87218472E-04 4.04088688E-18
+ 0.00000000E+00 7.05911464E-10 0.00000000E+00-7.00976204E-15-3.27379601E-04
+ 4.55944707E-10 2.24301381E-08 3.07153397E-15 3.20911636E-03 0.00000000E+00
+ 1.28364068E-02 0.00000000E+00 1.82295272E-03-8.74718329E-18 7.29265151E-03
+-3.04968293E-17 0.00000000E+00-1.55335158E-08 0.00000000E+00 9.36762409E-14
+ 7.37279920E-03-9.98062522E-09 4.36046621E-08 5.77403711E-14 3.20912514E-03
+ 0.00000000E+00-1.62640745E-03 0.00000000E+00 1.82295904E-03-7.24889606E-18
+-9.36317224E-04 2.92248508E-18 0.00000000E+00 7.02200321E-10 0.00000000E+00
+ 4.62620284E-15-3.42483761E-04 4.31553521E-10 2.11459169E-08 6.66300434E-14
+ 2.24301381E-08-3.07153397E-15 0.00000000E+00 7.00976204E-15 3.66178309E-06
+ 3.81270902E-22 2.17793253E-08-4.25009555E-24-7.56073105E-05 0.00000000E+00
+-4.53054228E-07 0.00000000E+00-3.45457478E-05-4.73232534E-11 4.36046621E-08
+-5.77403711E-14 0.00000000E+00-7.35761614E-11 0.00000000E+00-9.36762409E-14
+ 7.90584215E-07 1.14685947E-20-5.22461391E-08 1.28798343E-22-1.32331142E-07
+ 0.00000000E+00 1.20707212E-06 0.00000000E+00 3.50689559E-05 4.65722786E-11
+ 2.11459169E-08-6.66300434E-14 0.00000000E+00 7.30226675E-11 0.00000000E+00
+-4.62620284E-15-2.87126149E-06 9.27770632E-21 1.73802205E-08-6.01002596E-23
+ 7.54752441E-05 0.00000000E+00-4.52317855E-07 0.00000000E+00-3.36880670E-04
+-4.54528627E-10 0.00000000E+00-7.08656493E-10-5.81319633E-04 1.10333713E-19
+-3.60670389E-06 1.77277405E-21 1.20928805E-02 0.00000000E+00 7.55941605E-05
+ 0.00000000E+00 6.65833347E-03 9.10886358E-09 7.37279920E-03 9.98062522E-09
+ 0.00000000E+00 1.41645235E-08 0.00000000E+00 1.55335158E-08-3.02290583E-03
+ 9.26259032E-18 7.90584215E-07 1.14685947E-20 6.98042457E-02 0.00000000E+00
+-1.32331142E-07 0.00000000E+00 6.74566114E-03 8.98432156E-09-3.33526689E-04
+-4.60358755E-10 0.00000000E+00 1.40648797E-08 0.00000000E+00-7.04775916E-10
+-4.63902310E-04 1.58583048E-18 2.92909728E-06-1.06210928E-20 1.20732961E-02
+ 0.00000000E+00-7.54809124E-05 0.00000000E+00 0.00000000E+00 7.00976204E-15
+-2.24301381E-08-3.07153397E-15-7.56073105E-05 0.00000000E+00-4.53054228E-07
+ 0.00000000E+00 3.66178309E-06-3.81270902E-22 2.17793253E-08 4.25009555E-24
+ 0.00000000E+00-7.35761614E-11 0.00000000E+00-9.36762409E-14 3.45457478E-05
+-4.73232534E-11-4.36046621E-08-5.77403711E-14-1.32331142E-07 0.00000000E+00
+ 1.20707212E-06 0.00000000E+00 7.90584215E-07-1.14685947E-20-5.22461391E-08
+-1.28798343E-22 0.00000000E+00 7.30226675E-11 0.00000000E+00-4.62620284E-15
+-3.50689559E-05 4.65722786E-11-2.11459169E-08-6.66300434E-14 7.54752441E-05
+ 0.00000000E+00-4.52317855E-07 0.00000000E+00-2.87126149E-06-9.27770632E-21
+ 1.73802205E-08 6.01002596E-23 0.00000000E+00-7.08656493E-10 3.36880670E-04
+-4.54528627E-10 1.20928805E-02 0.00000000E+00 7.55941605E-05 0.00000000E+00
+-5.81319633E-04-1.10333713E-19-3.60670389E-06-1.77277405E-21 0.00000000E+00
+ 1.41645235E-08 0.00000000E+00 1.55335158E-08-6.65833347E-03 9.10886358E-09
+-7.37279920E-03 9.98062522E-09 6.98042457E-02 0.00000000E+00-1.32331142E-07
+ 0.00000000E+00-3.02290583E-03-9.26259032E-18 7.90584215E-07-1.14685947E-20
+ 0.00000000E+00 1.40648797E-08 0.00000000E+00-7.04775916E-10-6.74566114E-03
+ 8.98432156E-09 3.33526689E-04-4.60358755E-10 1.20732961E-02 0.00000000E+00
+-7.54809124E-05 0.00000000E+00-4.63902310E-04-1.58583048E-18 2.92909728E-06
+ 1.06210928E-20-8.87218472E-04-4.04088688E-18-1.58266044E-03 0.00000000E+00
+ 3.27379601E-04 4.55944707E-10-2.24301381E-08 3.07153397E-15 0.00000000E+00
+ 7.05911464E-10 0.00000000E+00-7.00976204E-15 1.82295272E-03 8.74718329E-18
+ 7.29265151E-03 3.04968293E-17 3.20911636E-03 0.00000000E+00 1.28364068E-02
+ 0.00000000E+00-7.37279920E-03-9.98062522E-09-4.36046621E-08 5.77403711E-14
+ 0.00000000E+00-1.55335158E-08 0.00000000E+00 9.36762409E-14 1.82295904E-03
+ 7.24889606E-18-9.36317224E-04-2.92248508E-18 3.20912514E-03 0.00000000E+00
+-1.62640745E-03 0.00000000E+00 3.42483761E-04 4.31553521E-10-2.11459169E-08
+ 6.66300434E-14 0.00000000E+00 7.02200321E-10 0.00000000E+00 4.62620284E-15
+ 3.12152539E-03 0.00000000E+00 1.72592117E-03-7.41636422E-18 0.00000000E+00
+-1.41557028E-08 0.00000000E+00-7.35481224E-11 6.62723914E-03-9.11358167E-09
+ 3.44560273E-05-4.73355395E-11 2.53225911E-02 0.00000000E+00 3.20911636E-03
+ 0.00000000E+00 1.41948084E-02-6.79646214E-17 1.82295272E-03-8.74718329E-18
+ 0.00000000E+00-1.41645235E-08 0.00000000E+00 7.35761614E-11 6.65833347E-03
+-9.10886358E-09-3.45457478E-05 4.73232534E-11 1.63129399E-03 6.16819952E-18
+ 3.03382383E-03 0.00000000E+00-6.50234390E-03-9.06290611E-09-3.38093335E-05
+-4.70878330E-11 0.00000000E+00-1.39822288E-08 0.00000000E+00-7.26695199E-11
+ 1.34281969E-02 4.82505706E-17 1.72592680E-03 6.29999365E-18 2.46214920E-02
+ 0.00000000E+00 3.12153859E-03 0.00000000E+00-6.53506718E-03-9.07848927E-09
+ 3.39037536E-05 4.71327101E-11 0.00000000E+00-1.40275432E-08 0.00000000E+00
+ 7.27996859E-11-1.53884060E-03 0.00000000E+00-8.39305197E-04 3.11704829E-18
+ 0.00000000E+00 6.93435087E-10 0.00000000E+00-3.25415012E-14-3.20926922E-04
+ 4.51168972E-10 2.36050327E-08-1.12192646E-14 3.12153859E-03 0.00000000E+00
+ 1.24860839E-02 0.00000000E+00 1.72592680E-03-6.29999365E-18 6.90455279E-03
+-2.78429095E-17 0.00000000E+00-1.55110146E-08 0.00000000E+00-8.33230934E-14
+ 7.23982023E-03-1.00117109E-08 4.59928977E-08-2.48205636E-14 3.12152539E-03
+ 0.00000000E+00-1.58266044E-03 0.00000000E+00 1.72592117E-03-7.41636422E-18
+-8.87218472E-04 4.04088688E-18 0.00000000E+00 7.08656493E-10 0.00000000E+00
+-7.00976204E-15-3.36880670E-04 4.54528627E-10 2.24301381E-08 3.07153397E-15
+ 2.36050327E-08 1.12192646E-14 0.00000000E+00 3.25415012E-14 4.35898862E-06
+ 1.34944113E-20 2.59655309E-08 8.35548641E-23-7.58327448E-05 0.00000000E+00
+-4.54383193E-07 0.00000000E+00-3.39037536E-05-4.71327101E-11 4.59928977E-08
+ 2.48205636E-14 0.00000000E+00-7.27996859E-11 0.00000000E+00 8.33230934E-14
+ 7.52208460E-07 1.80345273E-20-6.36920809E-08-1.42995236E-22-2.38705506E-07
+ 0.00000000E+00 1.20982229E-06 0.00000000E+00 3.44560273E-05 4.73355395E-11
+ 2.24301381E-08-3.07153397E-15 0.00000000E+00 7.35481224E-11 0.00000000E+00
+ 7.00976204E-15-3.60670389E-06 1.77277405E-21 2.17793253E-08-4.25009555E-24
+ 7.55941605E-05 0.00000000E+00-4.53054228E-07 0.00000000E+00-3.30925711E-04
+-4.55928827E-10 0.00000000E+00-7.07269893E-10-6.93053799E-04-2.21819581E-18
+-4.30657316E-06-1.42868206E-20 1.21282828E-02 0.00000000E+00 7.58118165E-05
+ 0.00000000E+00 6.53506718E-03 9.07848927E-09 7.23982023E-03 1.00117109E-08
+ 0.00000000E+00 1.40275432E-08 0.00000000E+00 1.55110146E-08-3.68478165E-03
+-9.97911823E-18 7.52208460E-07 1.80345273E-20 6.99627293E-02 0.00000000E+00
+-2.38705506E-07 0.00000000E+00 6.62723914E-03 9.11358167E-09-3.27379601E-04
+-4.55944707E-10 0.00000000E+00 1.41557028E-08 0.00000000E+00-7.05911464E-10
+-5.81319633E-04 1.10333713E-19 3.66178309E-06 3.81270902E-22 1.20928805E-02
+ 0.00000000E+00-7.56073105E-05 0.00000000E+00 0.00000000E+00 3.25415012E-14
+-2.36050327E-08 1.12192646E-14-7.58327448E-05 0.00000000E+00-4.54383193E-07
+ 0.00000000E+00 4.35898862E-06-1.34944113E-20 2.59655309E-08-8.35548641E-23
+ 0.00000000E+00-7.27996859E-11 0.00000000E+00 8.33230934E-14 3.39037536E-05
+-4.71327101E-11-4.59928977E-08 2.48205636E-14-2.38705506E-07 0.00000000E+00
+ 1.20982229E-06 0.00000000E+00 7.52208460E-07-1.80345273E-20-6.36920809E-08
+ 1.42995236E-22 0.00000000E+00 7.35481224E-11 0.00000000E+00 7.00976204E-15
+-3.44560273E-05 4.73355395E-11-2.24301381E-08-3.07153397E-15 7.55941605E-05
+ 0.00000000E+00-4.53054228E-07 0.00000000E+00-3.60670389E-06-1.77277405E-21
+ 2.17793253E-08 4.25009555E-24 0.00000000E+00-7.07269893E-10 3.30925711E-04
+-4.55928827E-10 1.21282828E-02 0.00000000E+00 7.58118165E-05 0.00000000E+00
+-6.93053799E-04 2.21819581E-18-4.30657316E-06 1.42868206E-20 0.00000000E+00
+ 1.40275432E-08 0.00000000E+00 1.55110146E-08-6.53506718E-03 9.07848927E-09
+-7.23982023E-03 1.00117109E-08 6.99627293E-02 0.00000000E+00-2.38705506E-07
+ 0.00000000E+00-3.68478165E-03 9.97911823E-18 7.52208460E-07-1.80345273E-20
+ 0.00000000E+00 1.41557028E-08 0.00000000E+00-7.05911464E-10-6.62723914E-03
+ 9.11358167E-09 3.27379601E-04-4.55944707E-10 1.20928805E-02 0.00000000E+00
+-7.56073105E-05 0.00000000E+00-5.81319633E-04-1.10333713E-19 3.66178309E-06
+-3.81270902E-22-8.39305197E-04-3.11704829E-18-1.53884060E-03 0.00000000E+00
+ 3.20926922E-04 4.51168972E-10-2.36050327E-08-1.12192646E-14 0.00000000E+00
+ 6.93435087E-10 0.00000000E+00-3.25415012E-14 1.72592680E-03 6.29999365E-18
+ 6.90455279E-03 2.78429095E-17 3.12153859E-03 0.00000000E+00 1.24860839E-02
+ 0.00000000E+00-7.23982023E-03-1.00117109E-08-4.59928977E-08-2.48205636E-14
+ 0.00000000E+00-1.55110146E-08 0.00000000E+00-8.33230934E-14 1.72592117E-03
+ 7.41636422E-18-8.87218472E-04-4.04088688E-18 3.12152539E-03 0.00000000E+00
+-1.58266044E-03 0.00000000E+00 3.36880670E-04 4.54528627E-10-2.24301381E-08
+ 3.07153397E-15 0.00000000E+00 7.08656493E-10 0.00000000E+00-7.00976204E-15
+ 3.03382383E-03 0.00000000E+00 1.63129399E-03-6.16819952E-18 0.00000000E+00
+-1.39822288E-08 0.00000000E+00-7.26695199E-11 6.50234390E-03-9.06290611E-09
+ 3.38093335E-05-4.70878330E-11 2.46214920E-02 0.00000000E+00 3.12153859E-03
+ 0.00000000E+00 1.34281969E-02-4.82505706E-17 1.72592680E-03-6.29999365E-18
+ 0.00000000E+00-1.40275432E-08 0.00000000E+00 7.27996859E-11 6.53506718E-03
+-9.07848927E-09-3.39037536E-05 4.71327101E-11 1.53908661E-03 3.42184946E-18
+ 2.94597858E-03 0.00000000E+00-6.37119951E-03-9.00212274E-09-3.31301257E-05
+-4.67737158E-11 0.00000000E+00-1.38178847E-08 0.00000000E+00-7.18181846E-11
+ 1.26808358E-02 4.16644468E-17 1.63129677E-03 6.78898222E-18 2.39192793E-02
+ 0.00000000E+00 3.03383191E-03 0.00000000E+00-6.40551228E-03-9.01845077E-09
+ 3.32291354E-05 4.68208928E-11 0.00000000E+00-1.38619857E-08 0.00000000E+00
+ 7.19456528E-11-1.49495262E-03 0.00000000E+00-7.92595845E-04 2.55270792E-18
+ 0.00000000E+00 6.85218430E-10 0.00000000E+00-3.18670495E-14-3.14167032E-04
+ 4.48008083E-10 2.47524450E-08-1.17942481E-14 3.03383191E-03 0.00000000E+00
+ 1.21352620E-02 0.00000000E+00 1.63129677E-03-6.78898222E-18 6.52604676E-03
+-2.48104001E-17 0.00000000E+00-1.53145127E-08 0.00000000E+00-5.65026755E-14
+ 7.09986164E-03-9.94512495E-09 4.83239656E-08-2.14972127E-14 3.03382383E-03
+ 0.00000000E+00-1.53884060E-03 0.00000000E+00 1.63129399E-03-6.16819952E-18
+-8.39305197E-04 3.11704829E-18 0.00000000E+00 7.07269893E-10 0.00000000E+00
+-3.25415012E-14-3.30925711E-04 4.55928827E-10 2.36050327E-08-1.12192646E-14
+ 2.47524450E-08 1.17942481E-14 0.00000000E+00 3.18670495E-14 5.02268388E-06
+ 8.92090491E-21 2.99505119E-08 4.97089588E-23-7.61617838E-05 0.00000000E+00
+-4.56331991E-07 0.00000000E+00-3.32291354E-05-4.68208928E-11 4.83239656E-08
+ 2.14972127E-14 0.00000000E+00-7.19456528E-11 0.00000000E+00 5.65026755E-14
+ 7.16079430E-07-9.09801030E-21-7.45852280E-08-1.52447776E-22-3.50105169E-07
+ 0.00000000E+00 1.21418842E-06 0.00000000E+00 3.38093335E-05 4.70878330E-11
+ 2.36050327E-08 1.12192646E-14 0.00000000E+00 7.26695199E-11 0.00000000E+00
+ 3.25415012E-14-4.30657316E-06-1.42868206E-20 2.59655309E-08 8.35548641E-23
+ 7.58118165E-05 0.00000000E+00-4.54383193E-07 0.00000000E+00-3.24651558E-04
+-4.52998434E-10 0.00000000E+00-6.98697958E-10-7.99415342E-04-1.33864769E-18
+-4.97278595E-06-7.77123193E-21 1.21802290E-02 0.00000000E+00 7.61327258E-05
+ 0.00000000E+00 6.40551228E-03 9.01845077E-09 7.09986164E-03 9.94512495E-09
+ 0.00000000E+00 1.38619857E-08 0.00000000E+00 1.53145127E-08-4.31465781E-03
+-7.54190157E-18 7.16079430E-07-9.09801030E-21 7.02146484E-02 0.00000000E+00
+-3.50105169E-07 0.00000000E+00 6.50234390E-03 9.06290611E-09-3.20926922E-04
+-4.51168972E-10 0.00000000E+00 1.39822288E-08 0.00000000E+00-6.93435087E-10
+-6.93053799E-04-2.21819581E-18 4.35898862E-06 1.34944113E-20 1.21282828E-02
+ 0.00000000E+00-7.58327448E-05 0.00000000E+00 0.00000000E+00 3.18670495E-14
+-2.47524450E-08 1.17942481E-14-7.61617838E-05 0.00000000E+00-4.56331991E-07
+ 0.00000000E+00 5.02268388E-06-8.92090491E-21 2.99505119E-08-4.97089588E-23
+ 0.00000000E+00-7.19456528E-11 0.00000000E+00 5.65026755E-14 3.32291354E-05
+-4.68208928E-11-4.83239656E-08 2.14972127E-14-3.50105169E-07 0.00000000E+00
+ 1.21418842E-06 0.00000000E+00 7.16079430E-07 9.09801030E-21-7.45852280E-08
+ 1.52447776E-22 0.00000000E+00 7.26695199E-11 0.00000000E+00 3.25415012E-14
+-3.38093335E-05 4.70878330E-11-2.36050327E-08 1.12192646E-14 7.58118165E-05
+ 0.00000000E+00-4.54383193E-07 0.00000000E+00-4.30657316E-06 1.42868206E-20
+ 2.59655309E-08-8.35548641E-23 0.00000000E+00-6.98697958E-10 3.24651558E-04
+-4.52998434E-10 1.21802290E-02 0.00000000E+00 7.61327258E-05 0.00000000E+00
+-7.99415342E-04 1.33864769E-18-4.97278595E-06 7.77123193E-21 0.00000000E+00
+ 1.38619857E-08 0.00000000E+00 1.53145127E-08-6.40551228E-03 9.01845077E-09
+-7.09986164E-03 9.94512495E-09 7.02146484E-02 0.00000000E+00-3.50105169E-07
+ 0.00000000E+00-4.31465781E-03 7.54190157E-18 7.16079430E-07 9.09801030E-21
+ 0.00000000E+00 1.39822288E-08 0.00000000E+00-6.93435087E-10-6.50234390E-03
+ 9.06290611E-09 3.20926922E-04-4.51168972E-10 1.21282828E-02 0.00000000E+00
+-7.58327448E-05 0.00000000E+00-6.93053799E-04 2.21819581E-18 4.35898862E-06
+-1.34944113E-20-7.92595845E-04-2.55270792E-18-1.49495262E-03 0.00000000E+00
+ 3.14167032E-04 4.48008083E-10-2.47524450E-08-1.17942481E-14 0.00000000E+00
+ 6.85218430E-10 0.00000000E+00-3.18670495E-14 1.63129677E-03 6.78898222E-18
+ 6.52604676E-03 2.48104001E-17 3.03383191E-03 0.00000000E+00 1.21352620E-02
+ 0.00000000E+00-7.09986164E-03-9.94512495E-09-4.83239656E-08-2.14972127E-14
+ 0.00000000E+00-1.53145127E-08 0.00000000E+00-5.65026755E-14 1.63129399E-03
+ 6.16819952E-18-8.39305197E-04-3.11704829E-18 3.03382383E-03 0.00000000E+00
+-1.53884060E-03 0.00000000E+00 3.30925711E-04 4.55928827E-10-2.36050327E-08
+-1.12192646E-14 0.00000000E+00 7.07269893E-10 0.00000000E+00-3.25415012E-14
+ 2.94597858E-03 0.00000000E+00 1.53908661E-03-3.42184946E-18 0.00000000E+00
+-1.38178847E-08 0.00000000E+00-7.18181846E-11 6.37119951E-03-9.00212274E-09
+ 3.31301257E-05-4.67737158E-11 2.39192793E-02 0.00000000E+00 3.03383191E-03
+ 0.00000000E+00 1.26808358E-02-4.16644468E-17 1.63129677E-03-6.78898222E-18
+ 0.00000000E+00-1.38619857E-08 0.00000000E+00 7.19456528E-11 6.40551228E-03
+-9.01845077E-09-3.32291354E-05 4.68208928E-11 1.44933666E-03 5.68013166E-18
+ 2.85800537E-03 0.00000000E+00-6.23420865E-03-8.93708917E-09-3.24203814E-05
+-4.64361192E-11 0.00000000E+00-1.36405842E-08 0.00000000E+00-7.08981444E-11
+ 1.19529990E-02 3.34799311E-17 1.53908965E-03 2.94385131E-18 2.32160061E-02
+ 0.00000000E+00 2.94598711E-03 0.00000000E+00-6.26996722E-03-8.95373540E-09
+ 3.25235591E-05 4.64841505E-11 0.00000000E+00-1.36860666E-08 0.00000000E+00
+ 7.10293376E-11-1.45099812E-03 0.00000000E+00-7.47106578E-04 2.15599574E-18
+ 0.00000000E+00 6.76222674E-10 0.00000000E+00-3.27983074E-14-3.07133445E-04
+ 4.44730465E-10 2.57944293E-08-1.20078163E-14 2.94598711E-03 0.00000000E+00
+ 1.17838856E-02 0.00000000E+00 1.53908965E-03-2.94385131E-18 6.15723009E-03
+-1.48108090E-17 0.00000000E+00-1.51274396E-08 0.00000000E+00-6.66750274E-14
+ 6.95312870E-03-9.87578072E-09 5.05298214E-08-2.44013526E-14 2.94597858E-03
+ 0.00000000E+00-1.49495262E-03 0.00000000E+00 1.53908661E-03-3.42184946E-18
+-7.92595845E-04 2.55270792E-18 0.00000000E+00 6.98697958E-10 0.00000000E+00
+-3.18670495E-14-3.24651558E-04 4.52998434E-10 2.47524450E-08-1.17942481E-14
+ 2.57944293E-08 1.20078163E-14 0.00000000E+00 3.27983074E-14 5.65436039E-06
+ 2.50465941E-20 3.37433385E-08 1.49288089E-22-7.66002865E-05 0.00000000E+00
+-4.58935065E-07 0.00000000E+00-3.25235591E-05-4.64841505E-11 5.05298214E-08
+ 2.44013526E-14 0.00000000E+00-7.10293376E-11 0.00000000E+00 6.66750274E-14
+ 6.81551076E-07 2.03409289E-20-8.49544419E-08-2.75458367E-22-4.67596085E-07
+ 0.00000000E+00 1.22025061E-06 0.00000000E+00 3.31301257E-05 4.67737158E-11
+ 2.47524450E-08 1.17942481E-14 0.00000000E+00 7.18181846E-11 0.00000000E+00
+ 3.18670495E-14-4.97278595E-06-7.77123193E-21 2.99505119E-08 4.97089588E-23
+ 7.61327258E-05 0.00000000E+00-4.56331991E-07 0.00000000E+00-3.18059662E-04
+-4.49816813E-10 0.00000000E+00-6.90119262E-10-9.00646732E-04-3.97306525E-18
+-5.60688079E-06-2.46752675E-20 1.22496388E-02 0.00000000E+00 7.65625281E-05
+ 0.00000000E+00 6.26996722E-03 8.95373540E-09 6.95312870E-03 9.87578072E-09
+ 0.00000000E+00 1.36860666E-08 0.00000000E+00 1.51274396E-08-4.91425057E-03
+-1.64588205E-17 6.81551076E-07 2.03409289E-20 7.05645206E-02 0.00000000E+00
+-4.67596085E-07 0.00000000E+00 6.37119951E-03 9.00212274E-09-3.14167032E-04
+-4.48008083E-10 0.00000000E+00 1.38178847E-08 0.00000000E+00-6.85218430E-10
+-7.99415342E-04-1.33864769E-18 5.02268388E-06 8.92090491E-21 1.21802290E-02
+ 0.00000000E+00-7.61617838E-05 0.00000000E+00 0.00000000E+00 3.27983074E-14
+-2.57944293E-08 1.20078163E-14-7.66002865E-05 0.00000000E+00-4.58935065E-07
+ 0.00000000E+00 5.65436039E-06-2.50465941E-20 3.37433385E-08-1.49288089E-22
+ 0.00000000E+00-7.10293376E-11 0.00000000E+00 6.66750274E-14 3.25235591E-05
+-4.64841505E-11-5.05298214E-08 2.44013526E-14-4.67596085E-07 0.00000000E+00
+ 1.22025061E-06 0.00000000E+00 6.81551076E-07-2.03409289E-20-8.49544419E-08
+ 2.75458367E-22 0.00000000E+00 7.18181846E-11 0.00000000E+00 3.18670495E-14
+-3.31301257E-05 4.67737158E-11-2.47524450E-08 1.17942481E-14 7.61327258E-05
+ 0.00000000E+00-4.56331991E-07 0.00000000E+00-4.97278595E-06 7.77123193E-21
+ 2.99505119E-08-4.97089588E-23 0.00000000E+00-6.90119262E-10 3.18059662E-04
+-4.49816813E-10 1.22496388E-02 0.00000000E+00 7.65625281E-05 0.00000000E+00
+-9.00646732E-04 3.97306525E-18-5.60688079E-06 2.46752675E-20 0.00000000E+00
+ 1.36860666E-08 0.00000000E+00 1.51274396E-08-6.26996722E-03 8.95373540E-09
+-6.95312870E-03 9.87578072E-09 7.05645206E-02 0.00000000E+00-4.67596085E-07
+ 0.00000000E+00-4.91425057E-03 1.64588205E-17 6.81551076E-07-2.03409289E-20
+ 0.00000000E+00 1.38178847E-08 0.00000000E+00-6.85218430E-10-6.37119951E-03
+ 9.00212274E-09 3.14167032E-04-4.48008083E-10 1.21802290E-02 0.00000000E+00
+-7.61617838E-05 0.00000000E+00-7.99415342E-04 1.33864769E-18 5.02268388E-06
+-8.92090491E-21-7.47106578E-04-2.15599574E-18-1.45099812E-03 0.00000000E+00
+ 3.07133445E-04 4.44730465E-10-2.57944293E-08-1.20078163E-14 0.00000000E+00
+ 6.76222674E-10 0.00000000E+00-3.27983074E-14 1.53908965E-03 2.94385131E-18
+ 6.15723009E-03 1.48108090E-17 2.94598711E-03 0.00000000E+00 1.17838856E-02
+ 0.00000000E+00-6.95312870E-03-9.87578072E-09-5.05298214E-08-2.44013526E-14
+ 0.00000000E+00-1.51274396E-08 0.00000000E+00-6.66750274E-14 1.53908661E-03
+ 3.42184946E-18-7.92595845E-04-2.55270792E-18 2.94597858E-03 0.00000000E+00
+-1.49495262E-03 0.00000000E+00 3.24651558E-04 4.52998434E-10-2.47524450E-08
+-1.17942481E-14 0.00000000E+00 6.98697958E-10 0.00000000E+00-3.18670495E-14
+ 2.85800537E-03 0.00000000E+00 1.44933666E-03-5.68013166E-18 0.00000000E+00
+-1.36405842E-08 0.00000000E+00-7.08981444E-11 6.23420865E-03-8.93708917E-09
+ 3.24203814E-05-4.64361192E-11 2.32160061E-02 0.00000000E+00 2.94598711E-03
+ 0.00000000E+00 1.19529990E-02-3.34799311E-17 1.53908965E-03-2.94385131E-18
+ 0.00000000E+00-1.36860666E-08 0.00000000E+00 7.10293376E-11 6.26996722E-03
+-8.95373540E-09-3.25235591E-05 4.64841505E-11 1.36207245E-03 3.04008775E-18
+ 2.76990525E-03 0.00000000E+00-6.09169854E-03-8.87374277E-09-3.16819438E-05
+-4.61065763E-11 0.00000000E+00-1.34638988E-08 0.00000000E+00-6.99809030E-11
+ 1.12449333E-02 3.76020280E-17 1.44933953E-03 6.11107317E-18 2.25117111E-02
+ 0.00000000E+00 2.85801370E-03 0.00000000E+00-6.12887334E-03-8.88981987E-09
+ 3.17892105E-05 4.61529696E-11 0.00000000E+00-1.35094556E-08 0.00000000E+00
+ 7.01123692E-11-1.40697974E-03 0.00000000E+00-7.02852994E-04 2.28779023E-18
+ 0.00000000E+00 6.67372409E-10 0.00000000E+00-3.28665539E-14-2.99827075E-04
+ 4.41636413E-10 2.68166749E-08-1.15983180E-14 2.85801370E-03 0.00000000E+00
+ 1.14319930E-02 0.00000000E+00 1.44933953E-03-6.11107317E-18 5.79824020E-03
+-2.16372021E-17 0.00000000E+00-1.49325951E-08 0.00000000E+00-6.52765307E-14
+ 6.80017701E-03-9.80461063E-09 5.25677114E-08-2.35606900E-14 2.85800537E-03
+ 0.00000000E+00-1.45099812E-03 0.00000000E+00 1.44933666E-03-5.68013166E-18
+-7.47106578E-04 2.15599574E-18 0.00000000E+00 6.90119262E-10 0.00000000E+00
+-3.27983074E-14-3.18059662E-04 4.49816813E-10 2.57944293E-08-1.20078163E-14
+ 2.68166749E-08 1.15983180E-14 0.00000000E+00 3.28665539E-14 6.25539432E-06
+ 1.04679558E-20 3.73521979E-08 6.77853265E-23-7.71553849E-05 0.00000000E+00
+-4.62235445E-07 0.00000000E+00-3.17892105E-05-4.61529696E-11 5.25677114E-08
+ 2.35606900E-14 0.00000000E+00-7.01123692E-11 0.00000000E+00 6.52765307E-14
+ 6.48478920E-07-1.62302013E-20-9.48219322E-08-3.16523927E-22-5.92939934E-07
+ 0.00000000E+00 1.22811606E-06 0.00000000E+00 3.24203814E-05 4.64361192E-11
+ 2.57944293E-08 1.20078163E-14 0.00000000E+00 7.08981444E-11 0.00000000E+00
+ 3.27983074E-14-5.60688079E-06-2.46752675E-20 3.37433385E-08 1.49288089E-22
+ 7.65625281E-05 0.00000000E+00-4.58935065E-07 0.00000000E+00-3.11186075E-04
+-4.46548937E-10 0.00000000E+00-6.81292836E-10-9.96966728E-04-1.81676061E-18
+-6.21021561E-06-1.22191074E-20 1.23376595E-02 0.00000000E+00 7.71084415E-05
+ 0.00000000E+00 6.12887334E-03 8.88981987E-09 6.80017701E-03 9.80461063E-09
+ 0.00000000E+00 1.35094556E-08 0.00000000E+00 1.49325951E-08-5.48481058E-03
+-1.96428880E-17 6.48478920E-07-1.62302013E-20 7.10187395E-02 0.00000000E+00
+-5.92939934E-07 0.00000000E+00 6.23420865E-03 8.93708917E-09-3.07133445E-04
+-4.44730465E-10 0.00000000E+00 1.36405842E-08 0.00000000E+00-6.76222674E-10
+-9.00646732E-04-3.97306525E-18 5.65436039E-06 2.50465941E-20 1.22496388E-02
+ 0.00000000E+00-7.66002865E-05 0.00000000E+00 0.00000000E+00 3.28665539E-14
+-2.68166749E-08 1.15983180E-14-7.71553849E-05 0.00000000E+00-4.62235445E-07
+ 0.00000000E+00 6.25539432E-06-1.04679558E-20 3.73521979E-08-6.77853265E-23
+ 0.00000000E+00-7.01123692E-11 0.00000000E+00 6.52765307E-14 3.17892105E-05
+-4.61529696E-11-5.25677114E-08 2.35606900E-14-5.92939934E-07 0.00000000E+00
+ 1.22811606E-06 0.00000000E+00 6.48478920E-07 1.62302013E-20-9.48219322E-08
+ 3.16523927E-22 0.00000000E+00 7.08981444E-11 0.00000000E+00 3.27983074E-14
+-3.24203814E-05 4.64361192E-11-2.57944293E-08 1.20078163E-14 7.65625281E-05
+ 0.00000000E+00-4.58935065E-07 0.00000000E+00-5.60688079E-06 2.46752675E-20
+ 3.37433385E-08-1.49288089E-22 0.00000000E+00-6.81292836E-10 3.11186075E-04
+-4.46548937E-10 1.23376595E-02 0.00000000E+00 7.71084415E-05 0.00000000E+00
+-9.96966728E-04 1.81676061E-18-6.21021561E-06 1.22191074E-20 0.00000000E+00
+ 1.35094556E-08 0.00000000E+00 1.49325951E-08-6.12887334E-03 8.88981987E-09
+-6.80017701E-03 9.80461063E-09 7.10187395E-02 0.00000000E+00-5.92939934E-07
+ 0.00000000E+00-5.48481058E-03 1.96428880E-17 6.48478920E-07 1.62302013E-20
+ 0.00000000E+00 1.36405842E-08 0.00000000E+00-6.76222674E-10-6.23420865E-03
+ 8.93708917E-09 3.07133445E-04-4.44730465E-10 1.22496388E-02 0.00000000E+00
+-7.66002865E-05 0.00000000E+00-9.00646732E-04 3.97306525E-18 5.65436039E-06
+-2.50465941E-20-7.02852994E-04-2.28779023E-18-1.40697974E-03 0.00000000E+00
+ 2.99827075E-04 4.41636413E-10-2.68166749E-08-1.15983180E-14 0.00000000E+00
+ 6.67372409E-10 0.00000000E+00-3.28665539E-14 1.44933953E-03 6.11107317E-18
+ 5.79824020E-03 2.16372021E-17 2.85801370E-03 0.00000000E+00 1.14319930E-02
+ 0.00000000E+00-6.80017701E-03-9.80461063E-09-5.25677114E-08-2.35606900E-14
+ 0.00000000E+00-1.49325951E-08 0.00000000E+00-6.52765307E-14 1.44933666E-03
+ 5.68013166E-18-7.47106578E-04-2.15599574E-18 2.85800537E-03 0.00000000E+00
+-1.45099812E-03 0.00000000E+00 3.18059662E-04 4.49816813E-10-2.57944293E-08
+-1.20078163E-14 0.00000000E+00 6.90119262E-10 0.00000000E+00-3.27983074E-14
+ 2.76990525E-03 0.00000000E+00 1.36207245E-03-3.04008775E-18 0.00000000E+00
+-1.34638988E-08 0.00000000E+00-6.99809030E-11 6.09169854E-03-8.87374277E-09
+ 3.16819438E-05-4.61065763E-11 2.25117111E-02 0.00000000E+00 2.85801370E-03
+ 0.00000000E+00 1.12449333E-02-3.76020280E-17 1.44933953E-03-6.11107317E-18
+ 0.00000000E+00-1.35094556E-08 0.00000000E+00 7.01123692E-11 6.12887334E-03
+-8.88981987E-09-3.17892105E-05 4.61529696E-11 1.27732442E-03 3.05731501E-18
+ 2.68168461E-03 0.00000000E+00-5.94383606E-03-8.81301972E-09-3.09156127E-05
+-4.57904585E-11 0.00000000E+00-1.32869055E-08 0.00000000E+00-6.90616785E-11
+ 1.05568748E-02 2.31423721E-17 1.36207505E-03 2.80774801E-18 2.18064239E-02
+ 0.00000000E+00 2.76991309E-03 0.00000000E+00-5.98235557E-03-8.82835597E-09
+ 3.10267592E-05 4.58347104E-11 0.00000000E+00-1.33323599E-08 0.00000000E+00
+ 6.91928317E-11-1.36289942E-03 0.00000000E+00-6.59849867E-04 1.46626575E-18
+ 0.00000000E+00 6.58538240E-10 0.00000000E+00-3.27883037E-14-2.92262604E-04
+ 4.38695692E-10 2.77866368E-08-1.10629697E-14 2.76991309E-03 0.00000000E+00
+ 1.10795939E-02 0.00000000E+00 1.36207505E-03-2.80774801E-18 5.44919369E-03
+-1.27738326E-17 0.00000000E+00-1.47378923E-08 0.00000000E+00-6.56496329E-14
+ 6.64118516E-03-9.73590007E-09 5.45772996E-08-2.26249349E-14 2.76990525E-03
+ 0.00000000E+00-1.40697974E-03 0.00000000E+00 1.36207245E-03-3.04008775E-18
+-7.02852994E-04 2.28779023E-18 0.00000000E+00 6.81292836E-10 0.00000000E+00
+-3.28665539E-14-3.11186075E-04 4.46548937E-10 2.68166749E-08-1.15983180E-14
+ 2.77866368E-08 1.10629697E-14 0.00000000E+00 3.27883037E-14 6.82743009E-06
+ 2.23292373E-20 4.07869254E-08 1.24638917E-22-7.78341907E-05 0.00000000E+00
+-4.66275246E-07 0.00000000E+00-3.10267592E-05-4.58347104E-11 5.45772996E-08
+ 2.26249349E-14 0.00000000E+00-6.91928317E-11 0.00000000E+00 6.56496329E-14
+ 6.17196715E-07 1.05720579E-20-1.04211851E-07-1.95429406E-22-7.25735013E-07
+ 0.00000000E+00 1.23789513E-06 0.00000000E+00 3.16819438E-05 4.61065763E-11
+ 2.68166749E-08 1.15983180E-14 0.00000000E+00 6.99809030E-11 0.00000000E+00
+ 3.28665539E-14-6.21021561E-06-1.22191074E-20 3.73521979E-08 6.77853265E-23
+ 7.71084415E-05 0.00000000E+00-4.62235445E-07 0.00000000E+00-3.04032476E-04
+-4.43381770E-10 0.00000000E+00-6.72427060E-10-1.08863769E-03-3.32907175E-18
+-6.78442686E-06-1.92869892E-20 1.24454158E-02 0.00000000E+00 7.77774171E-05
+ 0.00000000E+00 5.98235557E-03 8.82835597E-09 6.64118516E-03 9.73590007E-09
+ 0.00000000E+00 1.33323599E-08 0.00000000E+00 1.47378923E-08-6.02773961E-03
+-8.26850198E-18 6.17196715E-07 1.05720579E-20 7.15835232E-02 0.00000000E+00
+-7.25735013E-07 0.00000000E+00 6.09169854E-03 8.87374277E-09-2.99827075E-04
+-4.41636413E-10 0.00000000E+00 1.34638988E-08 0.00000000E+00-6.67372409E-10
+-9.96966728E-04-1.81676061E-18 6.25539432E-06 1.04679558E-20 1.23376595E-02
+ 0.00000000E+00-7.71553849E-05 0.00000000E+00 0.00000000E+00 3.27883037E-14
+-2.77866368E-08 1.10629697E-14-7.78341907E-05 0.00000000E+00-4.66275246E-07
+ 0.00000000E+00 6.82743009E-06-2.23292373E-20 4.07869254E-08-1.24638917E-22
+ 0.00000000E+00-6.91928317E-11 0.00000000E+00 6.56496329E-14 3.10267592E-05
+-4.58347104E-11-5.45772996E-08 2.26249349E-14-7.25735013E-07 0.00000000E+00
+ 1.23789513E-06 0.00000000E+00 6.17196715E-07-1.05720579E-20-1.04211851E-07
+ 1.95429406E-22 0.00000000E+00 6.99809030E-11 0.00000000E+00 3.28665539E-14
+-3.16819438E-05 4.61065763E-11-2.68166749E-08 1.15983180E-14 7.71084415E-05
+ 0.00000000E+00-4.62235445E-07 0.00000000E+00-6.21021561E-06 1.22191074E-20
+ 3.73521979E-08-6.77853265E-23 0.00000000E+00-6.72427060E-10 3.04032476E-04
+-4.43381770E-10 1.24454158E-02 0.00000000E+00 7.77774171E-05 0.00000000E+00
+-1.08863769E-03 3.32907175E-18-6.78442686E-06 1.92869892E-20 0.00000000E+00
+ 1.33323599E-08 0.00000000E+00 1.47378923E-08-5.98235557E-03 8.82835597E-09
+-6.64118516E-03 9.73590007E-09 7.15835232E-02 0.00000000E+00-7.25735013E-07
+ 0.00000000E+00-6.02773961E-03 8.26850198E-18 6.17196715E-07-1.05720579E-20
+ 0.00000000E+00 1.34638988E-08 0.00000000E+00-6.67372409E-10-6.09169854E-03
+ 8.87374277E-09 2.99827075E-04-4.41636413E-10 1.23376595E-02 0.00000000E+00
+-7.71553849E-05 0.00000000E+00-9.96966728E-04 1.81676061E-18 6.25539432E-06
+-1.04679558E-20-6.59849867E-04-1.46626575E-18-1.36289942E-03 0.00000000E+00
+ 2.92262604E-04 4.38695692E-10-2.77866368E-08-1.10629697E-14 0.00000000E+00
+ 6.58538240E-10 0.00000000E+00-3.27883037E-14 1.36207505E-03 2.80774801E-18
+ 5.44919369E-03 1.27738326E-17 2.76991309E-03 0.00000000E+00 1.10795939E-02
+ 0.00000000E+00-6.64118516E-03-9.73590007E-09-5.45772996E-08-2.26249349E-14
+ 0.00000000E+00-1.47378923E-08 0.00000000E+00-6.56496329E-14 1.36207245E-03
+ 3.04008775E-18-7.02852994E-04-2.28779023E-18 2.76990525E-03 0.00000000E+00
+-1.40697974E-03 0.00000000E+00 3.11186075E-04 4.46548937E-10-2.68166749E-08
+-1.15983180E-14 0.00000000E+00 6.81292836E-10 0.00000000E+00-3.28665539E-14
+ 2.68168461E-03 0.00000000E+00 1.27732442E-03-3.05731501E-18 0.00000000E+00
+-1.32869055E-08 0.00000000E+00-6.90616785E-11 5.94383606E-03-8.81301972E-09
+ 3.09156127E-05-4.57904585E-11 2.18064239E-02 0.00000000E+00 2.76991309E-03
+ 0.00000000E+00 1.05568748E-02-2.31423721E-17 1.36207505E-03-2.80774801E-18
+ 0.00000000E+00-1.33323599E-08 0.00000000E+00 6.91928317E-11 5.98235557E-03
+-8.82835597E-09-3.10267592E-05 4.58347104E-11 1.19512061E-03 1.39689861E-18
+ 2.59334972E-03 0.00000000E+00-5.79093911E-03-8.75533657E-09-3.01230336E-05
+-4.54900757E-11 0.00000000E+00-1.31105409E-08 0.00000000E+00-6.81457088E-11
+ 9.88905961E-03 1.67633618E-17 1.27732697E-03 2.96168489E-18 2.11002006E-02
+ 0.00000000E+00 2.68169239E-03 0.00000000E+00-5.83072227E-03-8.76987770E-09
+ 3.02378273E-05 4.55320343E-11 0.00000000E+00-1.31558467E-08 0.00000000E+00
+ 6.82764381E-11-1.31876053E-03 0.00000000E+00-6.18111893E-04 1.08964588E-18
+ 0.00000000E+00 6.49738915E-10 0.00000000E+00-3.26823163E-14-2.84456802E-04
+ 4.35913344E-10 2.86984316E-08-1.04896388E-14 2.68169239E-03 0.00000000E+00
+ 1.07267133E-02 0.00000000E+00 1.27732697E-03-2.96168489E-18 5.11021141E-03
+-1.14705075E-17 0.00000000E+00-1.45434672E-08 0.00000000E+00-6.53693113E-14
+ 6.47643601E-03-9.67032487E-09 5.64626436E-08-2.14950107E-14 2.68168461E-03
+ 0.00000000E+00-1.36289942E-03 0.00000000E+00 1.27732442E-03-3.05731501E-18
+-6.59849867E-04 1.46626575E-18 0.00000000E+00 6.72427060E-10 0.00000000E+00
+-3.27883037E-14-3.04032476E-04 4.43381770E-10 2.77866368E-08-1.10629697E-14
+ 2.86984316E-08 1.04896388E-14 0.00000000E+00 3.26823163E-14 7.37170432E-06
+ 3.84375963E-20 4.40550936E-08 2.31667469E-22-7.86461491E-05 0.00000000E+00
+-4.71110662E-07 0.00000000E+00-3.02378273E-05-4.55320343E-11 5.64626436E-08
+ 2.14950107E-14 0.00000000E+00-6.82764381E-11 0.00000000E+00 6.53693113E-14
+ 5.87272147E-07 1.94493728E-20-1.13148204E-07-5.19989384E-22-8.68653192E-07
+ 0.00000000E+00 1.24971923E-06 0.00000000E+00 3.09156127E-05 4.57904585E-11
+ 2.77866368E-08 1.10629697E-14 0.00000000E+00 6.90616785E-11 0.00000000E+00
+ 3.27883037E-14-6.78442686E-06-1.92869892E-20 4.07869254E-08 1.24638917E-22
+ 7.77774171E-05 0.00000000E+00-4.66275246E-07 0.00000000E+00-2.96612801E-04
+-4.40356487E-10 0.00000000E+00-6.63582414E-10-1.17586187E-03-6.18093388E-18
+-7.33080602E-06-3.88557215E-20 1.25744071E-02 0.00000000E+00 7.85787590E-05
+ 0.00000000E+00 5.83072227E-03 8.76987770E-09 6.47643601E-03 9.67032487E-09
+ 0.00000000E+00 1.31558467E-08 0.00000000E+00 1.45434672E-08-6.54446452E-03
+-3.24184989E-17 5.87272147E-07 1.94493728E-20 7.22665010E-02 0.00000000E+00
+-8.68653192E-07 0.00000000E+00 5.94383606E-03 8.81301972E-09-2.92262604E-04
+-4.38695692E-10 0.00000000E+00 1.32869055E-08 0.00000000E+00-6.58538240E-10
+-1.08863769E-03-3.32907175E-18 6.82743009E-06 2.23292373E-20 1.24454158E-02
+ 0.00000000E+00-7.78341907E-05 0.00000000E+00 0.00000000E+00 3.26823163E-14
+-2.86984316E-08 1.04896388E-14-7.86461491E-05 0.00000000E+00-4.71110662E-07
+ 0.00000000E+00 7.37170432E-06-3.84375963E-20 4.40550936E-08-2.31667469E-22
+ 0.00000000E+00-6.82764381E-11 0.00000000E+00 6.53693113E-14 3.02378273E-05
+-4.55320343E-11-5.64626436E-08 2.14950107E-14-8.68653192E-07 0.00000000E+00
+ 1.24971923E-06 0.00000000E+00 5.87272147E-07-1.94493728E-20-1.13148204E-07
+ 5.19989384E-22 0.00000000E+00 6.90616785E-11 0.00000000E+00 3.27883037E-14
+-3.09156127E-05 4.57904585E-11-2.77866368E-08 1.10629697E-14 7.77774171E-05
+ 0.00000000E+00-4.66275246E-07 0.00000000E+00-6.78442686E-06 1.92869892E-20
+ 4.07869254E-08-1.24638917E-22 0.00000000E+00-6.63582414E-10 2.96612801E-04
+-4.40356487E-10 1.25744071E-02 0.00000000E+00 7.85787590E-05 0.00000000E+00
+-1.17586187E-03 6.18093388E-18-7.33080602E-06 3.88557215E-20 0.00000000E+00
+ 1.31558467E-08 0.00000000E+00 1.45434672E-08-5.83072227E-03 8.76987770E-09
+-6.47643601E-03 9.67032487E-09 7.22665010E-02 0.00000000E+00-8.68653192E-07
+ 0.00000000E+00-6.54446452E-03 3.24184989E-17 5.87272147E-07-1.94493728E-20
+ 0.00000000E+00 1.32869055E-08 0.00000000E+00-6.58538240E-10-5.94383606E-03
+ 8.81301972E-09 2.92262604E-04-4.38695692E-10 1.24454158E-02 0.00000000E+00
+-7.78341907E-05 0.00000000E+00-1.08863769E-03 3.32907175E-18 6.82743009E-06
+-2.23292373E-20-6.18111893E-04-1.08964588E-18-1.31876053E-03 0.00000000E+00
+ 2.84456802E-04 4.35913344E-10-2.86984316E-08-1.04896388E-14 0.00000000E+00
+ 6.49738915E-10 0.00000000E+00-3.26823163E-14 1.27732697E-03 2.96168489E-18
+ 5.11021141E-03 1.14705075E-17 2.68169239E-03 0.00000000E+00 1.07267133E-02
+ 0.00000000E+00-6.47643601E-03-9.67032487E-09-5.64626436E-08-2.14950107E-14
+ 0.00000000E+00-1.45434672E-08 0.00000000E+00-6.53693113E-14 1.27732442E-03
+ 3.05731501E-18-6.59849867E-04-1.46626575E-18 2.68168461E-03 0.00000000E+00
+-1.36289942E-03 0.00000000E+00 3.04032476E-04 4.43381770E-10-2.77866368E-08
+-1.10629697E-14 0.00000000E+00 6.72427060E-10 0.00000000E+00-3.27883037E-14
+ 2.59334972E-03 0.00000000E+00 1.19512061E-03-1.39689861E-18 0.00000000E+00
+-1.31105409E-08 0.00000000E+00-6.81457088E-11 5.79093911E-03-8.75533657E-09
+ 3.01230336E-05-4.54900757E-11 2.11002006E-02 0.00000000E+00 2.68169239E-03
+ 0.00000000E+00 9.88905961E-03-1.67633618E-17 1.27732697E-03-2.96168489E-18
+ 0.00000000E+00-1.31558467E-08 0.00000000E+00 6.82764381E-11 5.83072227E-03
+-8.76987770E-09-3.02378273E-05 4.55320343E-11 1.11548686E-03 3.96637713E-18
+ 2.50490315E-03 0.00000000E+00-5.63334961E-03-8.70087613E-09-2.93059884E-05
+-4.52063619E-11 0.00000000E+00-1.29349039E-08 0.00000000E+00-6.72334225E-11
+ 9.24170138E-03 2.28171192E-17 1.19512299E-03 1.64733560E-18 2.03930721E-02
+ 0.00000000E+00 2.59335717E-03 0.00000000E+00-5.67431196E-03-8.71456610E-09
+ 2.94241833E-05 4.52458645E-11 0.00000000E+00-1.29799909E-08 0.00000000E+00
+ 6.73635194E-11-1.27456508E-03 0.00000000E+00-5.77652463E-04 1.40342818E-18
+ 0.00000000E+00 6.40985460E-10 0.00000000E+00-3.25242441E-14-2.76426913E-04
+ 4.33299426E-10 2.95487065E-08-9.87566971E-15 2.59335717E-03 0.00000000E+00
+ 1.03733741E-02 0.00000000E+00 1.19512299E-03-1.64733560E-18 4.78140513E-03
+-7.41271617E-18 0.00000000E+00-1.43497176E-08 0.00000000E+00-6.51236672E-14
+ 6.30628644E-03-9.60815808E-09 5.82123872E-08-2.03132190E-14 2.59334972E-03
+ 0.00000000E+00-1.31876053E-03 0.00000000E+00 1.19512061E-03-1.39689861E-18
+-6.18111893E-04 1.08964588E-18 0.00000000E+00 6.63582414E-10 0.00000000E+00
+-3.26823163E-14-2.96612801E-04 4.40356487E-10 2.86984316E-08-1.04896388E-14
+ 2.95487065E-08 9.87566971E-15 0.00000000E+00 3.25242441E-14 7.88921304E-06
+ 4.16923935E-20 4.71626151E-08 2.49651837E-22-7.96025705E-05 0.00000000E+00
+-4.76809066E-07 0.00000000E+00-2.94241833E-05-4.52458645E-11 5.82123872E-08
+ 2.03132190E-14 0.00000000E+00-6.73635194E-11 0.00000000E+00 6.51236672E-14
+ 5.58395968E-07 4.93133083E-21-1.21648058E-07-6.31739241E-22-1.02371274E-06
+ 0.00000000E+00 1.26375306E-06 0.00000000E+00 3.01230336E-05 4.54900757E-11
+ 2.86984316E-08 1.04896388E-14 0.00000000E+00 6.81457088E-11 0.00000000E+00
+ 3.26823163E-14-7.33080602E-06-3.88557215E-20 4.40550936E-08 2.31667469E-22
+ 7.85787590E-05 0.00000000E+00-4.71110662E-07 0.00000000E+00-2.88943188E-04
+-4.37482490E-10 0.00000000E+00-6.54762054E-10-1.25879730E-03-6.64815447E-18
+-7.85033210E-06-4.14921855E-20 1.27264309E-02 0.00000000E+00 7.95236358E-05
+ 0.00000000E+00 5.67431196E-03 8.71456610E-09 6.30628644E-03 9.60815808E-09
+ 0.00000000E+00 1.29799909E-08 0.00000000E+00 1.43497176E-08-7.03592853E-03
+-3.57263373E-17 5.58395968E-07 4.93133083E-21 7.30771816E-02 0.00000000E+00
+-1.02371274E-06 0.00000000E+00 5.79093911E-03 8.75533657E-09-2.84456802E-04
+-4.35913344E-10 0.00000000E+00 1.31105409E-08 0.00000000E+00-6.49738915E-10
+-1.17586187E-03-6.18093388E-18 7.37170432E-06 3.84375963E-20 1.25744071E-02
+ 0.00000000E+00-7.86461491E-05 0.00000000E+00 0.00000000E+00 3.25242441E-14
+-2.95487065E-08 9.87566971E-15-7.96025705E-05 0.00000000E+00-4.76809066E-07
+ 0.00000000E+00 7.88921304E-06-4.16923935E-20 4.71626151E-08-2.49651837E-22
+ 0.00000000E+00-6.73635194E-11 0.00000000E+00 6.51236672E-14 2.94241833E-05
+-4.52458645E-11-5.82123872E-08 2.03132190E-14-1.02371274E-06 0.00000000E+00
+ 1.26375306E-06 0.00000000E+00 5.58395968E-07-4.93133083E-21-1.21648058E-07
+ 6.31739241E-22 0.00000000E+00 6.81457088E-11 0.00000000E+00 3.26823163E-14
+-3.01230336E-05 4.54900757E-11-2.86984316E-08 1.04896388E-14 7.85787590E-05
+ 0.00000000E+00-4.71110662E-07 0.00000000E+00-7.33080602E-06 3.88557215E-20
+ 4.40550936E-08-2.31667469E-22 0.00000000E+00-6.54762054E-10 2.88943188E-04
+-4.37482490E-10 1.27264309E-02 0.00000000E+00 7.95236358E-05 0.00000000E+00
+-1.25879730E-03 6.64815447E-18-7.85033210E-06 4.14921855E-20 0.00000000E+00
+ 1.29799909E-08 0.00000000E+00 1.43497176E-08-5.67431196E-03 8.71456610E-09
+-6.30628644E-03 9.60815808E-09 7.30771816E-02 0.00000000E+00-1.02371274E-06
+ 0.00000000E+00-7.03592853E-03 3.57263373E-17 5.58395968E-07-4.93133083E-21
+ 0.00000000E+00 1.31105409E-08 0.00000000E+00-6.49738915E-10-5.79093911E-03
+ 8.75533657E-09 2.84456802E-04-4.35913344E-10 1.25744071E-02 0.00000000E+00
+-7.86461491E-05 0.00000000E+00-1.17586187E-03 6.18093388E-18 7.37170432E-06
+-3.84375963E-20-5.77652463E-04-1.40342818E-18-1.27456508E-03 0.00000000E+00
+ 2.76426913E-04 4.33299426E-10-2.95487065E-08-9.87566971E-15 0.00000000E+00
+ 6.40985460E-10 0.00000000E+00-3.25242441E-14 1.19512299E-03 1.64733560E-18
+ 4.78140513E-03 7.41271617E-18 2.59335717E-03 0.00000000E+00 1.03733741E-02
+ 0.00000000E+00-6.30628644E-03-9.60815808E-09-5.82123872E-08-2.03132190E-14
+ 0.00000000E+00-1.43497176E-08 0.00000000E+00-6.51236672E-14 1.19512061E-03
+ 1.39689861E-18-6.18111893E-04-1.08964588E-18 2.59334972E-03 0.00000000E+00
+-1.31876053E-03 0.00000000E+00 2.96612801E-04 4.40356487E-10-2.86984316E-08
+-1.04896388E-14 0.00000000E+00 6.63582414E-10 0.00000000E+00-3.26823163E-14
+ 2.50490315E-03 0.00000000E+00 1.11548686E-03-3.96637713E-18 0.00000000E+00
+-1.29349039E-08 0.00000000E+00-6.72334225E-11 5.63334961E-03-8.70087613E-09
+ 2.93059884E-05-4.52063619E-11 2.03930721E-02 0.00000000E+00 2.59335717E-03
+ 0.00000000E+00 9.24170138E-03-2.28171192E-17 1.19512299E-03-1.64733560E-18
+ 0.00000000E+00-1.29799909E-08 0.00000000E+00 6.73635194E-11 5.67431196E-03
+-8.71456610E-09-2.94241833E-05 4.52458645E-11 1.03844794E-03 2.74371749E-18
+ 2.41635056E-03 0.00000000E+00-5.47124959E-03-8.64988315E-09-2.84654675E-05
+-4.49405780E-11 0.00000000E+00-1.27602698E-08 0.00000000E+00-6.63262686E-11
+ 8.61500364E-03 2.66218944E-17 1.11548915E-03 3.85561092E-18 1.96850731E-02
+ 0.00000000E+00 2.50491035E-03 0.00000000E+00-5.51335675E-03-8.66265612E-09
+ 2.85869674E-05 4.49774351E-11 0.00000000E+00-1.28050760E-08 0.00000000E+00
+ 6.64555563E-11-1.23031523E-03 0.00000000E+00-5.38484275E-04 1.64983210E-18
+ 0.00000000E+00 6.32290000E-10 0.00000000E+00-3.23219183E-14-2.68175973E-04
+ 4.30867348E-10 3.03749630E-08-9.21427741E-15 2.50491035E-03 0.00000000E+00
+ 1.00195893E-02 0.00000000E+00 1.11548915E-03-3.85561092E-18 4.46287880E-03
+-1.44481902E-17 0.00000000E+00-1.41568942E-08 0.00000000E+00-6.47642424E-14
+ 6.13107750E-03-9.54963219E-09 5.98980597E-08-1.90411647E-14 2.50490315E-03
+ 0.00000000E+00-1.27456508E-03 0.00000000E+00 1.11548686E-03-3.96637713E-18
+-5.77652463E-04 1.40342818E-18 0.00000000E+00 6.54762054E-10 0.00000000E+00
+-3.25242441E-14-2.88943188E-04 4.37482490E-10 2.95487065E-08-9.87566971E-15
+ 3.03749630E-08 9.21427741E-15 0.00000000E+00 3.23219183E-14 8.38111041E-06
+ 1.67129568E-20 5.01164202E-08 1.04250059E-22-8.07158229E-05 0.00000000E+00
+-4.83444372E-07 0.00000000E+00-2.85869674E-05-4.49774351E-11 5.98980597E-08
+ 1.90411647E-14 0.00000000E+00-6.64555563E-11 0.00000000E+00 6.47642424E-14
+ 5.30780368E-07-3.16951190E-20-1.29728807E-07-4.97648537E-22-1.19199185E-06
+ 0.00000000E+00 1.28018598E-06 0.00000000E+00 2.93059884E-05 4.52063619E-11
+ 2.95487065E-08 9.87566971E-15 0.00000000E+00 6.72334225E-11 0.00000000E+00
+ 3.25242441E-14-7.85033210E-06-4.14921855E-20 4.71626151E-08 2.49651837E-22
+ 7.95236358E-05 0.00000000E+00-4.76809066E-07 0.00000000E+00-2.81042075E-04
+-4.34770226E-10 0.00000000E+00-6.45980816E-10-1.33762888E-03-2.81435786E-18
+-8.34416290E-06-1.83542046E-20 1.29034602E-02 0.00000000E+00 8.06243489E-05
+ 0.00000000E+00 5.51335675E-03 8.66265612E-09 6.13107750E-03 9.54963219E-09
+ 0.00000000E+00 1.28050760E-08 0.00000000E+00 1.41568942E-08-7.50315214E-03
+-3.03371737E-17 5.30780368E-07-3.16951190E-20 7.40265694E-02 0.00000000E+00
+-1.19199185E-06 0.00000000E+00 5.63334961E-03 8.70087613E-09-2.76426913E-04
+-4.33299426E-10 0.00000000E+00 1.29349039E-08 0.00000000E+00-6.40985460E-10
+-1.25879730E-03-6.64815447E-18 7.88921304E-06 4.16923935E-20 1.27264309E-02
+ 0.00000000E+00-7.96025705E-05 0.00000000E+00 0.00000000E+00 3.23219183E-14
+-3.03749630E-08 9.21427741E-15-8.07158229E-05 0.00000000E+00-4.83444372E-07
+ 0.00000000E+00 8.38111041E-06-1.67129568E-20 5.01164202E-08-1.04250059E-22
+ 0.00000000E+00-6.64555563E-11 0.00000000E+00 6.47642424E-14 2.85869674E-05
+-4.49774351E-11-5.98980597E-08 1.90411647E-14-1.19199185E-06 0.00000000E+00
+ 1.28018598E-06 0.00000000E+00 5.30780368E-07 3.16951190E-20-1.29728807E-07
+ 4.97648537E-22 0.00000000E+00 6.72334225E-11 0.00000000E+00 3.25242441E-14
+-2.93059884E-05 4.52063619E-11-2.95487065E-08 9.87566971E-15 7.95236358E-05
+ 0.00000000E+00-4.76809066E-07 0.00000000E+00-7.85033210E-06 4.14921855E-20
+ 4.71626151E-08-2.49651837E-22 0.00000000E+00-6.45980816E-10 2.81042075E-04
+-4.34770226E-10 1.29034602E-02 0.00000000E+00 8.06243489E-05 0.00000000E+00
+-1.33762888E-03 2.81435786E-18-8.34416290E-06 1.83542046E-20 0.00000000E+00
+ 1.28050760E-08 0.00000000E+00 1.41568942E-08-5.51335675E-03 8.66265612E-09
+-6.13107750E-03 9.54963219E-09 7.40265694E-02 0.00000000E+00-1.19199185E-06
+ 0.00000000E+00-7.50315214E-03 3.03371737E-17 5.30780368E-07 3.16951190E-20
+ 0.00000000E+00 1.29349039E-08 0.00000000E+00-6.40985460E-10-5.63334961E-03
+ 8.70087613E-09 2.76426913E-04-4.33299426E-10 1.27264309E-02 0.00000000E+00
+-7.96025705E-05 0.00000000E+00-1.25879730E-03 6.64815447E-18 7.88921304E-06
+-4.16923935E-20-5.38484275E-04-1.64983210E-18-1.23031523E-03 0.00000000E+00
+ 2.68175973E-04 4.30867348E-10-3.03749630E-08-9.21427741E-15 0.00000000E+00
+ 6.32290000E-10 0.00000000E+00-3.23219183E-14 1.11548915E-03 3.85561092E-18
+ 4.46287880E-03 1.44481902E-17 2.50491035E-03 0.00000000E+00 1.00195893E-02
+ 0.00000000E+00-6.13107750E-03-9.54963219E-09-5.98980597E-08-1.90411647E-14
+ 0.00000000E+00-1.41568942E-08 0.00000000E+00-6.47642424E-14 1.11548686E-03
+ 3.96637713E-18-5.77652463E-04-1.40342818E-18 2.50490315E-03 0.00000000E+00
+-1.27456508E-03 0.00000000E+00 2.88943188E-04 4.37482490E-10-2.95487065E-08
+-9.87566971E-15 0.00000000E+00 6.54762054E-10 0.00000000E+00-3.25242441E-14
+ 2.41635056E-03 0.00000000E+00 1.03844794E-03-2.74371749E-18 0.00000000E+00
+-1.27602698E-08 0.00000000E+00-6.63262686E-11 5.47124959E-03-8.64988315E-09
+ 2.84654675E-05-4.49405780E-11 1.96850731E-02 0.00000000E+00 2.50491035E-03
+ 0.00000000E+00 8.61500364E-03-2.66218944E-17 1.11548915E-03-3.85561092E-18
+ 0.00000000E+00-1.28050760E-08 0.00000000E+00 6.64555563E-11 5.51335675E-03
+-8.66265612E-09-2.85869674E-05 4.49774351E-11 9.64026674E-04 2.60236754E-18
+ 2.32769606E-03 0.00000000E+00-5.30486915E-03-8.60264674E-09-2.76026374E-05
+-4.46942102E-11 0.00000000E+00-1.25869062E-08 0.00000000E+00-6.54256218E-11
+ 8.00915517E-03 2.08450139E-17 1.03845000E-03 2.69087132E-18 1.89762427E-02
+ 0.00000000E+00 2.41635754E-03 0.00000000E+00-5.34805454E-03-8.61442331E-09
+ 2.77272478E-05 4.47281925E-11 0.00000000E+00-1.26313576E-08 0.00000000E+00
+ 6.55538857E-11-1.18601340E-03 0.00000000E+00-5.00619168E-04 1.32330972E-18
+ 0.00000000E+00 6.23667596E-10 0.00000000E+00-3.20659859E-14-2.59719415E-04
+ 4.28633317E-10 3.11526041E-08-8.49557253E-15 2.41635754E-03 0.00000000E+00
+ 9.66537993E-03 0.00000000E+00 1.03845000E-03-2.69087132E-18 4.15473090E-03
+-1.12329059E-17 0.00000000E+00-1.39652748E-08 0.00000000E+00-6.43088885E-14
+ 5.95098212E-03-9.49503098E-09 6.14944277E-08-1.76643049E-14 2.41635056E-03
+ 0.00000000E+00-1.23031523E-03 0.00000000E+00 1.03844794E-03-2.74371749E-18
+-5.38484275E-04 1.64983210E-18 0.00000000E+00 6.45980816E-10 0.00000000E+00
+-3.23219183E-14-2.81042075E-04 4.34770226E-10 3.03749630E-08-9.21427741E-15
+ 3.11526041E-08 8.49557253E-15 0.00000000E+00 3.20659859E-14 8.84836065E-06
+ 4.91079882E-20 5.29223146E-08 2.87945345E-22-8.20006067E-05 0.00000000E+00
+-4.91103965E-07 0.00000000E+00-2.77272478E-05-4.47281925E-11 6.14944277E-08
+ 1.76643049E-14 0.00000000E+00-6.55538857E-11 0.00000000E+00 6.43088885E-14
+ 5.04189481E-07 4.24739456E-20-1.37407529E-07-4.67883815E-22-1.37600480E-06
+ 0.00000000E+00 1.29923084E-06 0.00000000E+00 2.84654675E-05 4.49405780E-11
+ 3.03749630E-08 9.21427741E-15 0.00000000E+00 6.63262686E-11 0.00000000E+00
+ 3.23219183E-14-8.34416290E-06-1.83542046E-20 5.01164202E-08 1.04250059E-22
+ 8.06243489E-05 0.00000000E+00-4.83444372E-07 0.00000000E+00-2.72914959E-04
+-4.32231740E-10 0.00000000E+00-6.37249963E-10-1.41251182E-03-7.64186785E-18
+-8.81327365E-06-4.66109572E-20 1.31078266E-02 0.00000000E+00 8.18953569E-05
+ 0.00000000E+00 5.34805454E-03 8.61442331E-09 5.95098212E-03 9.49503098E-09
+ 0.00000000E+00 1.26313576E-08 0.00000000E+00 1.39652748E-08-7.94712825E-03
+-2.41655800E-17 5.04189481E-07 4.24739456E-20 7.51268615E-02 0.00000000E+00
+-1.37600480E-06 0.00000000E+00 5.47124959E-03 8.64988315E-09-2.68175973E-04
+-4.30867348E-10 0.00000000E+00 1.27602698E-08 0.00000000E+00-6.32290000E-10
+-1.33762888E-03-2.81435786E-18 8.38111041E-06 1.67129568E-20 1.29034602E-02
+ 0.00000000E+00-8.07158229E-05 0.00000000E+00 0.00000000E+00 3.20659859E-14
+-3.11526041E-08 8.49557253E-15-8.20006067E-05 0.00000000E+00-4.91103965E-07
+ 0.00000000E+00 8.84836065E-06-4.91079882E-20 5.29223146E-08-2.87945345E-22
+ 0.00000000E+00-6.55538857E-11 0.00000000E+00 6.43088885E-14 2.77272478E-05
+-4.47281925E-11-6.14944277E-08 1.76643049E-14-1.37600480E-06 0.00000000E+00
+ 1.29923084E-06 0.00000000E+00 5.04189481E-07-4.24739456E-20-1.37407529E-07
+ 4.67883815E-22 0.00000000E+00 6.63262686E-11 0.00000000E+00 3.23219183E-14
+-2.84654675E-05 4.49405780E-11-3.03749630E-08 9.21427741E-15 8.06243489E-05
+ 0.00000000E+00-4.83444372E-07 0.00000000E+00-8.34416290E-06 1.83542046E-20
+ 5.01164202E-08-1.04250059E-22 0.00000000E+00-6.37249963E-10 2.72914959E-04
+-4.32231740E-10 1.31078266E-02 0.00000000E+00 8.18953569E-05 0.00000000E+00
+-1.41251182E-03 7.64186785E-18-8.81327365E-06 4.66109572E-20 0.00000000E+00
+ 1.26313576E-08 0.00000000E+00 1.39652748E-08-5.34805454E-03 8.61442331E-09
+-5.95098212E-03 9.49503098E-09 7.51268615E-02 0.00000000E+00-1.37600480E-06
+ 0.00000000E+00-7.94712825E-03 2.41655800E-17 5.04189481E-07-4.24739456E-20
+ 0.00000000E+00 1.27602698E-08 0.00000000E+00-6.32290000E-10-5.47124959E-03
+ 8.64988315E-09 2.68175973E-04-4.30867348E-10 1.29034602E-02 0.00000000E+00
+-8.07158229E-05 0.00000000E+00-1.33762888E-03 2.81435786E-18 8.38111041E-06
+-1.67129568E-20-5.00619168E-04-1.32330972E-18-1.18601340E-03 0.00000000E+00
+ 2.59719415E-04 4.28633317E-10-3.11526041E-08-8.49557253E-15 0.00000000E+00
+ 6.23667596E-10 0.00000000E+00-3.20659859E-14 1.03845000E-03 2.69087132E-18
+ 4.15473090E-03 1.12329059E-17 2.41635754E-03 0.00000000E+00 9.66537993E-03
+ 0.00000000E+00-5.95098212E-03-9.49503098E-09-6.14944277E-08-1.76643049E-14
+ 0.00000000E+00-1.39652748E-08 0.00000000E+00-6.43088885E-14 1.03844794E-03
+ 2.74371749E-18-5.38484275E-04-1.64983210E-18 2.41635056E-03 0.00000000E+00
+-1.23031523E-03 0.00000000E+00 2.81042075E-04 4.34770226E-10-3.03749630E-08
+-9.21427741E-15 0.00000000E+00 6.45980816E-10 0.00000000E+00-3.23219183E-14
+ 2.32769606E-03 0.00000000E+00 9.64026674E-04-2.60236754E-18 0.00000000E+00
+-1.25869062E-08 0.00000000E+00-6.54256218E-11 5.30486915E-03-8.60264674E-09
+ 2.76026374E-05-4.46942102E-11 1.89762427E-02 0.00000000E+00 2.41635754E-03
+ 0.00000000E+00 8.00915517E-03-2.08450139E-17 1.03845000E-03-2.69087132E-18
+ 0.00000000E+00-1.26313576E-08 0.00000000E+00 6.55538857E-11 5.34805454E-03
+-8.61442331E-09-2.77272478E-05 4.47281925E-11-1.14166164E-03 0.00000000E+00
+-4.64068653E-04 1.34638817E-18 0.00000000E+00 6.15134126E-10 0.00000000E+00
+-3.17522453E-14-2.51065172E-04 4.26616148E-10 3.18946474E-08-7.70969791E-15
+ 2.32770277E-03 0.00000000E+00 9.31076291E-03 0.00000000E+00 9.64028625E-04
+-2.74068541E-18 3.85705378E-03-1.06809089E-17 0.00000000E+00-1.37751734E-08
+ 0.00000000E+00-6.37432871E-14 5.76626625E-03-9.44469362E-09 6.30282266E-08
+-1.61644781E-14 2.32769606E-03 0.00000000E+00-1.18601340E-03 0.00000000E+00
+ 9.64026674E-04-2.60236754E-18-5.00619168E-04 1.32330972E-18 0.00000000E+00
+ 6.37249963E-10 0.00000000E+00-3.20659859E-14-2.72914959E-04 4.32231740E-10
+ 3.11526041E-08-8.49557253E-15 3.18946474E-08 7.70969791E-15 0.00000000E+00
+ 3.17522453E-14 9.29203452E-06 5.64696845E-21 5.55866977E-08 4.62362673E-23
+-8.34741005E-05 0.00000000E+00-4.99890238E-07 0.00000000E+00-2.68460972E-05
+-4.44998502E-11 6.30282266E-08 1.61644781E-14 0.00000000E+00-6.46600521E-11
+ 0.00000000E+00 6.37432871E-14 4.78775999E-07-5.40337409E-20-1.44700252E-07
+-5.34512247E-22-1.57834559E-06 0.00000000E+00 1.32114146E-06 0.00000000E+00
+ 2.76026374E-05 4.46942102E-11 3.11526041E-08 8.49557253E-15 0.00000000E+00
+ 6.54256218E-11 0.00000000E+00 3.20659859E-14-8.81327365E-06-4.66109572E-20
+ 5.29223146E-08 2.87945345E-22 8.18953569E-05 0.00000000E+00-4.91103965E-07
+ 0.00000000E+00-2.64574906E-04-4.29881653E-10 0.00000000E+00-6.28583539E-10
+-1.48361675E-03-1.26828986E-18-9.25872775E-06-1.00796796E-20 1.33422631E-02
+ 0.00000000E+00 8.33536544E-05 0.00000000E+00 5.17861683E-03 8.57019458E-09
+ 5.76626625E-03 9.44469362E-09 0.00000000E+00 1.24591315E-08 0.00000000E+00
+ 1.37751734E-08-8.36877132E-03-3.51097855E-17 4.78775999E-07-5.40337409E-20
+ 7.63927802E-02 0.00000000E+00-1.57834559E-06 0.00000000E+00 5.30486915E-03
+ 8.60264674E-09-2.59719415E-04-4.28633317E-10 0.00000000E+00 1.25869062E-08
+ 0.00000000E+00-6.23667596E-10-1.41251182E-03-7.64186785E-18 8.84836065E-06
+ 4.91079882E-20 1.31078266E-02 0.00000000E+00-8.20006067E-05 0.00000000E+00
+ 0.00000000E+00 3.17522453E-14-3.18946474E-08 7.70969791E-15-8.34741005E-05
+ 0.00000000E+00-4.99890238E-07 0.00000000E+00 9.29203452E-06-5.64696845E-21
+ 5.55866977E-08-4.62362673E-23 0.00000000E+00-6.46600521E-11 0.00000000E+00
+ 6.37432871E-14 2.68460972E-05-4.44998502E-11-6.30282266E-08 1.61644781E-14
+-1.57834559E-06 0.00000000E+00 1.32114146E-06 0.00000000E+00 4.78775999E-07
+ 5.40337409E-20-1.44700252E-07 5.34512247E-22 0.00000000E+00 6.54256218E-11
+ 0.00000000E+00 3.20659859E-14-2.76026374E-05 4.46942102E-11-3.11526041E-08
+ 8.49557253E-15 8.18953569E-05 0.00000000E+00-4.91103965E-07 0.00000000E+00
+-8.81327365E-06 4.66109572E-20 5.29223146E-08-2.87945345E-22 0.00000000E+00
+-6.28583539E-10 2.64574906E-04-4.29881653E-10 1.33422631E-02 0.00000000E+00
+ 8.33536544E-05 0.00000000E+00-1.48361675E-03 1.26828986E-18-9.25872775E-06
+ 1.00796796E-20 0.00000000E+00 1.24591315E-08 0.00000000E+00 1.37751734E-08
+-5.17861683E-03 8.57019458E-09-5.76626625E-03 9.44469362E-09 7.63927802E-02
+ 0.00000000E+00-1.57834559E-06 0.00000000E+00-8.36877132E-03 3.51097855E-17
+ 4.78775999E-07 5.40337409E-20 0.00000000E+00 1.25869062E-08 0.00000000E+00
+-6.23667596E-10-5.30486915E-03 8.60264674E-09 2.59719415E-04-4.28633317E-10
+ 1.31078266E-02 0.00000000E+00-8.20006067E-05 0.00000000E+00-1.41251182E-03
+ 7.64186785E-18 8.84836065E-06-4.91079882E-20-4.64068653E-04-1.34638817E-18
+-1.14166164E-03 0.00000000E+00 2.51065172E-04 4.26616148E-10-3.18946474E-08
+-7.70969791E-15 0.00000000E+00 6.15134126E-10 0.00000000E+00-3.17522453E-14
+ 9.64028625E-04 2.74068541E-18 3.85705378E-03 1.06809089E-17 2.32770277E-03
+ 0.00000000E+00 9.31076291E-03 0.00000000E+00-5.76626625E-03-9.44469362E-09
+-6.30282266E-08-1.61644781E-14 0.00000000E+00-1.37751734E-08 0.00000000E+00
+-6.37432871E-14 9.64026674E-04 2.60236754E-18-5.00619168E-04-1.32330972E-18
+ 2.32769606E-03 0.00000000E+00-1.18601340E-03 0.00000000E+00 2.72914959E-04
+ 4.32231740E-10-3.11526041E-08-8.49557253E-15 0.00000000E+00 6.37249963E-10
+ 0.00000000E+00-3.20659859E-14 8.92245988E-04 2.64486728E-18 2.23894378E-03
+ 0.00000000E+00-5.13440324E-03-8.55950758E-09-2.67185186E-05-4.44690114E-11
+ 0.00000000E+00-1.24151153E-08 0.00000000E+00-6.45330432E-11 7.42434076E-03
+ 2.19332035E-17 9.64028625E-04 2.74068541E-18 1.82666133E-02 0.00000000E+00
+ 2.32770277E-03 0.00000000E+00-5.17861683E-03-8.57019458E-09 2.68460972E-05
+ 4.44998502E-11 0.00000000E+00-1.24591315E-08 0.00000000E+00 6.46600521E-11
+ 2.23894378E-03 0.00000000E+00 8.92245988E-04-2.64486728E-18 0.00000000E+00
+-1.24151153E-08 0.00000000E+00-6.45330432E-11 5.13440324E-03-8.55950758E-09
+ 2.67185186E-05-4.44690114E-11 1.82666133E-02 0.00000000E+00 2.32770277E-03
+ 0.00000000E+00 7.42434076E-03-2.19332035E-17 9.64028625E-04-2.74068541E-18
+ 0.00000000E+00-1.24591315E-08 0.00000000E+00 6.46600521E-11 5.17861683E-03
+-8.57019458E-09-2.68460972E-05 4.44998502E-11-1.09726207E-03 0.00000000E+00
+-4.28843512E-04 1.16940036E-18 0.00000000E+00 6.06708075E-10 0.00000000E+00
+-3.13723869E-14-2.42230261E-04 4.24838612E-10 3.25816368E-08-6.84323783E-15
+ 2.23895021E-03 0.00000000E+00 8.95575477E-03 0.00000000E+00 8.92247759E-04
+-2.44011470E-18 3.56993802E-03-1.01306976E-17 0.00000000E+00-1.35869347E-08
+ 0.00000000E+00-6.30531016E-14 5.57715865E-03-9.39901980E-09 6.44499972E-08
+-1.45165056E-14 2.23894378E-03 0.00000000E+00-1.14166164E-03 0.00000000E+00
+ 8.92245988E-04-2.64486728E-18-4.64068653E-04 1.34638817E-18 0.00000000E+00
+ 6.28583539E-10 0.00000000E+00-3.17522453E-14-2.64574906E-04 4.29881653E-10
+ 3.18946474E-08-7.70969791E-15 8.23126291E-04 2.23748674E-18 2.15009806E-03
+ 0.00000000E+00-4.96013274E-03-8.52087362E-09-2.58145508E-05-4.42670791E-11
+ 0.00000000E+00-1.22452374E-08 0.00000000E+00-6.36502883E-11 6.86073275E-03
+ 1.81848843E-17 8.92247759E-04 2.44011470E-18 1.75562188E-02 0.00000000E+00
+ 2.23895021E-03 0.00000000E+00-5.00529878E-03-8.53035934E-09 2.59448774E-05
+ 4.42944520E-11 0.00000000E+00-1.22887268E-08 0.00000000E+00 6.37757779E-11
+ 2.15009806E-03 0.00000000E+00 8.23126291E-04-2.23748674E-18 0.00000000E+00
+-1.22452374E-08 0.00000000E+00-6.36502883E-11 4.96013274E-03-8.52087362E-09
+ 2.58145508E-05-4.42670791E-11 1.75562188E-02 0.00000000E+00 2.23895021E-03
+ 0.00000000E+00 6.86073275E-03-1.81848843E-17 8.92247759E-04-2.44011470E-18
+ 0.00000000E+00-1.22887268E-08 0.00000000E+00 6.37757779E-11 5.00529878E-03
+-8.53035934E-09-2.59448774E-05 4.42944520E-11 3.25816368E-08 6.84323783E-15
+ 0.00000000E+00 3.13723869E-14 9.71289579E-06 1.56589631E-20 5.81142382E-08
+ 8.54113169E-23-8.51570274E-05 0.00000000E+00-5.09926482E-07 0.00000000E+00
+-2.59448774E-05-4.42944520E-11 6.44499972E-08 1.45165056E-14 0.00000000E+00
+-6.37757779E-11 0.00000000E+00 6.30531016E-14 4.54180716E-07 1.35644802E-20
+-1.51622241E-07-8.38077942E-23-1.80288328E-06 0.00000000E+00 1.34621721E-06
+ 0.00000000E+00 2.67185186E-05 4.44690114E-11 3.18946474E-08 7.70969791E-15
+ 0.00000000E+00 6.45330432E-11 0.00000000E+00 3.17522453E-14-9.25872775E-06
+-1.00796796E-20 5.55866977E-08 4.62362673E-23 8.33536544E-05 0.00000000E+00
+-4.99890238E-07 0.00000000E+00-2.56031009E-04-4.27737067E-10 0.00000000E+00
+-6.19996533E-10-1.55106850E-03-2.27307376E-18-9.68132126E-06-1.27882614E-20
+ 1.36100596E-02 0.00000000E+00 8.50196577E-05 0.00000000E+00 5.00529878E-03
+ 8.53035934E-09 5.57715865E-03 9.39901980E-09 0.00000000E+00 1.22887268E-08
+ 0.00000000E+00 1.35869347E-08-8.76898833E-03-7.93120732E-19 4.54180716E-07
+ 1.35644802E-20 7.78415606E-02 0.00000000E+00-1.80288328E-06 0.00000000E+00
+ 5.13440324E-03 8.55950758E-09-2.51065172E-04-4.26616148E-10 0.00000000E+00
+ 1.24151153E-08 0.00000000E+00-6.15134126E-10-1.48361675E-03-1.26828986E-18
+ 9.29203452E-06 5.64696845E-21 1.33422631E-02 0.00000000E+00-8.34741005E-05
+ 0.00000000E+00 0.00000000E+00 3.13723869E-14-3.25816368E-08 6.84323783E-15
+-8.51570274E-05 0.00000000E+00-5.09926482E-07 0.00000000E+00 9.71289579E-06
+-1.56589631E-20 5.81142382E-08-8.54113169E-23 0.00000000E+00-6.37757779E-11
+ 0.00000000E+00 6.30531016E-14 2.59448774E-05-4.42944520E-11-6.44499972E-08
+ 1.45165056E-14-1.80288328E-06 0.00000000E+00 1.34621721E-06 0.00000000E+00
+ 4.54180716E-07-1.35644802E-20-1.51622241E-07 8.38077942E-23 0.00000000E+00
+ 6.45330432E-11 0.00000000E+00 3.17522453E-14-2.67185186E-05 4.44690114E-11
+-3.18946474E-08 7.70969791E-15 8.33536544E-05 0.00000000E+00-4.99890238E-07
+ 0.00000000E+00-9.25872775E-06 1.00796796E-20 5.55866977E-08-4.62362673E-23
+ 0.00000000E+00-6.19996533E-10 2.56031009E-04-4.27737067E-10 1.36100596E-02
+ 0.00000000E+00 8.50196577E-05 0.00000000E+00-1.55106850E-03 2.27307376E-18
+-9.68132126E-06 1.27882614E-20 0.00000000E+00 1.22887268E-08 0.00000000E+00
+ 1.35869347E-08-5.00529878E-03 8.53035934E-09-5.57715865E-03 9.39901980E-09
+ 7.78415606E-02 0.00000000E+00-1.80288328E-06 0.00000000E+00-8.76898833E-03
+ 7.93120732E-19 4.54180716E-07-1.35644802E-20 0.00000000E+00 1.24151153E-08
+ 0.00000000E+00-6.15134126E-10-5.13440324E-03 8.55950758E-09 2.51065172E-04
+-4.26616148E-10 1.33422631E-02 0.00000000E+00-8.34741005E-05 0.00000000E+00
+-1.48361675E-03 1.26828986E-18 9.29203452E-06-5.64696845E-21-4.28843512E-04
+-1.16940036E-18-1.09726207E-03 0.00000000E+00 2.42230261E-04 4.24838612E-10
+-3.25816368E-08-6.84323783E-15 0.00000000E+00 6.06708075E-10 0.00000000E+00
+-3.13723869E-14 8.92247759E-04 2.44011470E-18 3.56993802E-03 1.01306976E-17
+ 2.23895021E-03 0.00000000E+00 8.95575477E-03 0.00000000E+00-5.57715865E-03
+-9.39901980E-09-6.44499972E-08-1.45165056E-14 0.00000000E+00-1.35869347E-08
+ 0.00000000E+00-6.30531016E-14 8.92245988E-04 2.64486728E-18-4.64068653E-04
+-1.34638817E-18 2.23894378E-03 0.00000000E+00-1.14166164E-03 0.00000000E+00
+ 2.64574906E-04 4.29881653E-10-3.18946474E-08-7.70969791E-15 0.00000000E+00
+ 6.28583539E-10 0.00000000E+00-3.17522453E-14 7.56687796E-04 2.85531603E-18
+ 2.06116398E-03 0.00000000E+00-4.78226796E-03-8.48722739E-09-2.48918625E-05
+-4.40908949E-11 0.00000000E+00-1.20776565E-08 0.00000000E+00-6.27793363E-11
+ 6.31849298E-03 2.15351735E-17 8.23127777E-04 2.43766165E-18 1.68450968E-02
+ 0.00000000E+00 2.15010416E-03 0.00000000E+00-4.82834366E-03-8.49537957E-09
+ 2.50248143E-05 4.41144205E-11 0.00000000E+00-1.21205154E-08 0.00000000E+00
+ 6.29030074E-11-1.05281704E-03 0.00000000E+00-3.94953893E-04 1.32324442E-18
+ 0.00000000E+00 5.98410203E-10 0.00000000E+00-3.09177743E-14-2.33220986E-04
+ 4.23327499E-10 3.32379449E-08-5.88139767E-15 2.15010416E-03 0.00000000E+00
+ 8.60037310E-03 0.00000000E+00 8.23127777E-04-2.43766165E-18 3.29346594E-03
+-9.57792739E-18 0.00000000E+00-1.34009505E-08 0.00000000E+00-6.22236823E-14
+ 5.38397031E-03-9.35848745E-09 6.57900283E-08-1.26943546E-14 2.15009806E-03
+ 0.00000000E+00-1.09726207E-03 0.00000000E+00 8.23126291E-04-2.23748674E-18
+-4.28843512E-04 1.16940036E-18 0.00000000E+00 6.19996533E-10 0.00000000E+00
+-3.13723869E-14-2.56031009E-04 4.27737067E-10 3.25816368E-08-6.84323783E-15
+ 3.32379449E-08 5.88139767E-15 0.00000000E+00 3.09177743E-14 1.01116728E-05
+ 3.56149283E-20 6.05092510E-08 2.09854745E-22-8.70735147E-05 0.00000000E+00
+-5.21356531E-07 0.00000000E+00-2.50248143E-05-4.41144205E-11 6.57900283E-08
+ 1.26943546E-14 0.00000000E+00-6.29030074E-11 0.00000000E+00 6.22236823E-14
+ 4.30358850E-07 2.01354232E-20-1.58184868E-07-4.15474433E-22-2.05322726E-06
+ 0.00000000E+00 1.37481494E-06 0.00000000E+00 2.58145508E-05 4.42670791E-11
+ 3.25816368E-08 6.84323783E-15 0.00000000E+00 6.36502883E-11 0.00000000E+00
+ 3.13723869E-14-9.68132126E-06-1.27882614E-20 5.81142382E-08 8.54113169E-23
+ 8.50196577E-05 0.00000000E+00-5.09926482E-07 0.00000000E+00-2.47299688E-04
+-4.25818492E-10 0.00000000E+00-6.11506032E-10-1.61498236E-03-5.60447141E-18
+-1.00817666E-05-3.44489470E-20 1.39150548E-02 0.00000000E+00 8.69172405E-05
+ 0.00000000E+00 4.82834366E-03 8.49537957E-09 5.38397031E-03 9.35848745E-09
+ 0.00000000E+00 1.21205154E-08 0.00000000E+00 1.34009505E-08-9.14841052E-03
+-2.49957438E-17 4.30358850E-07 2.01354232E-20 7.94938701E-02 0.00000000E+00
+-2.05322726E-06 0.00000000E+00 4.96013274E-03 8.52087362E-09-2.42230261E-04
+-4.24838612E-10 0.00000000E+00 1.22452374E-08 0.00000000E+00-6.06708075E-10
+-1.55106850E-03-2.27307376E-18 9.71289579E-06 1.56589631E-20 1.36100596E-02
+ 0.00000000E+00-8.51570274E-05 0.00000000E+00 0.00000000E+00 3.09177743E-14
+-3.32379449E-08 5.88139767E-15-8.70735147E-05 0.00000000E+00-5.21356531E-07
+ 0.00000000E+00 1.01116728E-05-3.56149283E-20 6.05092510E-08-2.09854745E-22
+ 0.00000000E+00-6.29030074E-11 0.00000000E+00 6.22236823E-14 2.50248143E-05
+-4.41144205E-11-6.57900283E-08 1.26943546E-14-2.05322726E-06 0.00000000E+00
+ 1.37481494E-06 0.00000000E+00 4.30358850E-07-2.01354232E-20-1.58184868E-07
+ 4.15474433E-22 0.00000000E+00 6.36502883E-11 0.00000000E+00 3.13723869E-14
+-2.58145508E-05 4.42670791E-11-3.25816368E-08 6.84323783E-15 8.50196577E-05
+ 0.00000000E+00-5.09926482E-07 0.00000000E+00-9.68132126E-06 1.27882614E-20
+ 5.81142382E-08-8.54113169E-23 0.00000000E+00-6.11506032E-10 2.47299688E-04
+-4.25818492E-10 1.39150548E-02 0.00000000E+00 8.69172405E-05 0.00000000E+00
+-1.61498236E-03 5.60447141E-18-1.00817666E-05 3.44489470E-20 0.00000000E+00
+ 1.21205154E-08 0.00000000E+00 1.34009505E-08-4.82834366E-03 8.49537957E-09
+-5.38397031E-03 9.35848745E-09 7.94938701E-02 0.00000000E+00-2.05322726E-06
+ 0.00000000E+00-9.14841052E-03 2.49957438E-17 4.30358850E-07-2.01354232E-20
+ 0.00000000E+00 1.22452374E-08 0.00000000E+00-6.06708075E-10-4.96013274E-03
+ 8.52087362E-09 2.42230261E-04-4.24838612E-10 1.36100596E-02 0.00000000E+00
+-8.51570274E-05 0.00000000E+00-1.55106850E-03 2.27307376E-18 9.71289579E-06
+-1.56589631E-20-3.94953893E-04-1.32324442E-18-1.05281704E-03 0.00000000E+00
+ 2.33220986E-04 4.23327499E-10-3.32379449E-08-5.88139767E-15 0.00000000E+00
+ 5.98410203E-10 0.00000000E+00-3.09177743E-14 8.23127777E-04 2.43766165E-18
+ 3.29346594E-03 9.57792739E-18 2.15010416E-03 0.00000000E+00 8.60037310E-03
+ 0.00000000E+00-5.38397031E-03-9.35848745E-09-6.57900283E-08-1.26943546E-14
+ 0.00000000E+00-1.34009505E-08 0.00000000E+00-6.22236823E-14 8.23126291E-04
+ 2.23748674E-18-4.28843512E-04-1.16940036E-18 2.15009806E-03 0.00000000E+00
+-1.09726207E-03 0.00000000E+00 2.56031009E-04 4.27737067E-10-3.25816368E-08
+-6.84323783E-15 0.00000000E+00 6.19996533E-10 0.00000000E+00-3.13723869E-14
+ 2.06116398E-03 0.00000000E+00 7.56687796E-04-2.85531603E-18 0.00000000E+00
+-1.20776565E-08 0.00000000E+00-6.27793363E-11 4.78226796E-03-8.48722739E-09
+ 2.48918625E-05-4.40908949E-11 1.68450968E-02 0.00000000E+00 2.15010416E-03
+ 0.00000000E+00 6.31849298E-03-2.15351735E-17 8.23127777E-04-2.43766165E-18
+ 0.00000000E+00-1.21205154E-08 0.00000000E+00 6.29030074E-11 4.82834366E-03
+-8.49537957E-09-2.50248143E-05 4.41144205E-11-1.00832880E-03 0.00000000E+00
+-3.62409648E-04 1.18332408E-18 0.00000000E+00 5.90264941E-10 0.00000000E+00
+-3.03760354E-14-2.24045631E-04 4.22115251E-10 3.38624739E-08-4.80468230E-15
+ 2.06117003E-03 0.00000000E+00 8.24463786E-03 0.00000000E+00 7.56689263E-04
+-2.82315525E-18 3.02771855E-03-1.08735200E-17 0.00000000E+00-1.32176652E-08
+ 0.00000000E+00-6.12326492E-14 5.18689021E-03-9.32366349E-09 6.70776005E-08
+-1.06626800E-14 2.06116398E-03 0.00000000E+00-1.05281704E-03 0.00000000E+00
+ 7.56687796E-04-2.85531603E-18-3.94953893E-04 1.32324442E-18 0.00000000E+00
+ 6.11506032E-10 0.00000000E+00-3.09177743E-14-2.47299688E-04 4.25818492E-10
+ 3.32379449E-08-5.88139767E-15 3.38624739E-08 4.80468230E-15 0.00000000E+00
+ 3.03760354E-14 1.04891953E-05 5.13806641E-20 6.27767326E-08 3.06420004E-22
+-8.92519229E-05 0.00000000E+00-5.34349172E-07 0.00000000E+00-2.40867169E-05
+-4.39626553E-11 6.70776005E-08 1.06626800E-14 0.00000000E+00-6.20439804E-11
+ 0.00000000E+00 6.12326492E-14 4.07452874E-07 1.91757363E-20-1.64400838E-07
+-6.95299146E-22-2.33384847E-06 0.00000000E+00 1.40734976E-06 0.00000000E+00
+ 2.48918625E-05 4.40908949E-11 3.32379449E-08 5.88139767E-15 0.00000000E+00
+ 6.27793363E-11 0.00000000E+00 3.09177743E-14-1.00817666E-05-3.44489470E-20
+ 6.05092510E-08 2.09854745E-22 8.69172405E-05 0.00000000E+00-5.21356531E-07
+ 0.00000000E+00-2.38388806E-04-4.24150119E-10 0.00000000E+00-6.03131233E-10
+-1.67549157E-03-8.16900795E-18-1.04609005E-05-5.07989653E-20 1.42617534E-02
+ 0.00000000E+00 8.90743704E-05 0.00000000E+00 4.64790805E-03 8.46580760E-09
+ 5.18689021E-03 9.32366349E-09 0.00000000E+00 1.19549247E-08 0.00000000E+00
+ 1.32176652E-08-9.50778521E-03-4.04829373E-17 4.07452874E-07 1.91757363E-20
+ 8.13736377E-02 0.00000000E+00-2.33384847E-06 0.00000000E+00 4.78226796E-03
+ 8.48722739E-09-2.33220986E-04-4.23327499E-10 0.00000000E+00 1.20776565E-08
+ 0.00000000E+00-5.98410203E-10-1.61498236E-03-5.60447141E-18 1.01116728E-05
+ 3.56149283E-20 1.39150548E-02 0.00000000E+00-8.70735147E-05 0.00000000E+00
+ 0.00000000E+00 3.03760354E-14-3.38624739E-08 4.80468230E-15-8.92519229E-05
+ 0.00000000E+00-5.34349172E-07 0.00000000E+00 1.04891953E-05-5.13806641E-20
+ 6.27767326E-08-3.06420004E-22 0.00000000E+00-6.20439804E-11 0.00000000E+00
+ 6.12326492E-14 2.40867169E-05-4.39626553E-11-6.70776005E-08 1.06626800E-14
+-2.33384847E-06 0.00000000E+00 1.40734976E-06 0.00000000E+00 4.07452874E-07
+-1.91757363E-20-1.64400838E-07 6.95299146E-22 0.00000000E+00 6.27793363E-11
+ 0.00000000E+00 3.09177743E-14-2.48918625E-05 4.40908949E-11-3.32379449E-08
+ 5.88139767E-15 8.69172405E-05 0.00000000E+00-5.21356531E-07 0.00000000E+00
+-1.00817666E-05 3.44489470E-20 6.05092510E-08-2.09854745E-22 0.00000000E+00
+-6.03131233E-10 2.38388806E-04-4.24150119E-10 1.42617534E-02 0.00000000E+00
+ 8.90743704E-05 0.00000000E+00-1.67549157E-03 8.16900795E-18-1.04609005E-05
+ 5.07989653E-20 0.00000000E+00 1.19549247E-08 0.00000000E+00 1.32176652E-08
+-4.64790805E-03 8.46580760E-09-5.18689021E-03 9.32366349E-09 8.13736377E-02
+ 0.00000000E+00-2.33384847E-06 0.00000000E+00-9.50778521E-03 4.04829373E-17
+ 4.07452874E-07-1.91757363E-20 0.00000000E+00 1.20776565E-08 0.00000000E+00
+-5.98410203E-10-4.78226796E-03 8.48722739E-09 2.33220986E-04-4.23327499E-10
+ 1.39150548E-02 0.00000000E+00-8.70735147E-05 0.00000000E+00-1.61498236E-03
+ 5.60447141E-18 1.01116728E-05-3.56149283E-20-3.62409648E-04-1.18332408E-18
+-1.00832880E-03 0.00000000E+00 2.24045631E-04 4.22115251E-10-3.38624739E-08
+-4.80468230E-15 0.00000000E+00 5.90264941E-10 0.00000000E+00-3.03760354E-14
+ 7.56689263E-04 2.82315525E-18 3.02771855E-03 1.08735200E-17 2.06117003E-03
+ 0.00000000E+00 8.24463786E-03 0.00000000E+00-5.18689021E-03-9.32366349E-09
+-6.70776005E-08-1.06626800E-14 0.00000000E+00-1.32176652E-08 0.00000000E+00
+-6.12326492E-14 7.56687796E-04 2.85531603E-18-3.94953893E-04-1.32324442E-18
+ 2.06116398E-03 0.00000000E+00-1.05281704E-03 0.00000000E+00 2.47299688E-04
+ 4.25818492E-10-3.32379449E-08-5.88139767E-15 0.00000000E+00 6.11506032E-10
+ 0.00000000E+00-3.09177743E-14 6.92949330E-04 1.91014108E-18 1.97214516E-03
+ 0.00000000E+00-4.60096680E-03-8.45914823E-09-2.39512670E-05-4.39434366E-11
+ 0.00000000E+00-1.19128170E-08 0.00000000E+00-6.19224762E-11 5.79778032E-03
+ 1.91904908E-17 7.56689263E-04 2.82315525E-18 1.61332845E-02 0.00000000E+00
+ 2.06117003E-03 0.00000000E+00-4.64790805E-03-8.46580760E-09 2.40867169E-05
+ 4.39626553E-11 0.00000000E+00-1.19549247E-08 0.00000000E+00 6.20439804E-11
+ 1.97214516E-03 0.00000000E+00 6.92949330E-04-1.91014108E-18 0.00000000E+00
+-1.19128170E-08 0.00000000E+00-6.19224762E-11 4.60096680E-03-8.45914823E-09
+ 2.39512670E-05-4.39434366E-11 1.61332845E-02 0.00000000E+00 2.06117003E-03
+ 0.00000000E+00 5.79778032E-03-1.91904908E-17 7.56689263E-04-2.82315525E-18
+ 0.00000000E+00-1.19549247E-08 0.00000000E+00 6.20439804E-11 4.64790805E-03
+-8.46580760E-09-2.40867169E-05 4.39626553E-11-9.63798883E-04 0.00000000E+00
+-3.31219573E-04 6.83613562E-19 0.00000000E+00 5.82300815E-10 0.00000000E+00
+-2.97325027E-14-2.14715689E-04 4.21240841E-10 3.44472673E-08-3.58982636E-15
+ 1.97215066E-03 0.00000000E+00 7.88856283E-03 0.00000000E+00 6.92950459E-04
+-1.81572764E-18 2.77277016E-03-7.45569888E-18 0.00000000E+00-1.30375959E-08
+ 0.00000000E+00-6.00539814E-14 4.98610870E-03-9.29522999E-09 6.82876256E-08
+-8.37966851E-15 1.97214516E-03 0.00000000E+00-1.00832880E-03 0.00000000E+00
+ 6.92949330E-04-1.91014108E-18-3.62409648E-04 1.18332408E-18 0.00000000E+00
+ 6.03131233E-10 0.00000000E+00-3.03760354E-14-2.38388806E-04 4.24150119E-10
+ 3.38624739E-08-4.80468230E-15 6.31927834E-04 9.18726606E-19 1.88304487E-03
+ 0.00000000E+00-4.41643418E-03-8.43733237E-09-2.29938196E-05-4.38282820E-11
+ 0.00000000E+00-1.17512370E-08 0.00000000E+00-6.10823742E-11 5.29873401E-03
+ 1.06263130E-17 6.92950459E-04 1.81572764E-18 1.54208042E-02 0.00000000E+00
+ 1.97215066E-03 0.00000000E+00-4.46418613E-03-8.44230739E-09 2.31316087E-05
+ 4.38426413E-11 0.00000000E+00-1.17924524E-08 0.00000000E+00 6.12013042E-11
+ 1.88304487E-03 0.00000000E+00 6.31927834E-04-9.18726606E-19 0.00000000E+00
+-1.17512370E-08 0.00000000E+00-6.10823742E-11 4.41643418E-03-8.43733237E-09
+ 2.29938196E-05-4.38282820E-11 1.54208042E-02 0.00000000E+00 1.97215066E-03
+ 0.00000000E+00 5.29873401E-03-1.06263130E-17 6.92950459E-04-1.81572764E-18
+ 0.00000000E+00-1.17924524E-08 0.00000000E+00 6.12013042E-11 4.46418613E-03
+-8.44230739E-09-2.31316087E-05 4.38426413E-11 3.44472673E-08 3.58982636E-15
+ 0.00000000E+00 2.97325027E-14 1.08460741E-05 4.86152281E-20 6.49203760E-08
+ 2.92339699E-22-9.17264639E-05 0.00000000E+00-5.49107993E-07 0.00000000E+00
+-2.31316087E-05-4.38426413E-11 6.82876256E-08 8.37966851E-15 0.00000000E+00
+-6.12013042E-11 0.00000000E+00 6.00539814E-14 3.85194724E-07-4.02078146E-21
+-1.70281800E-07-8.09470583E-22-2.65103916E-06 0.00000000E+00 1.44431708E-06
+ 0.00000000E+00 2.39512670E-05 4.39434366E-11 3.38624739E-08 4.80468230E-15
+ 0.00000000E+00 6.19224762E-11 0.00000000E+00 3.03760354E-14-1.04609005E-05
+-5.07989653E-20 6.27767326E-08 3.06420004E-22 8.90743704E-05 0.00000000E+00
+-5.34349172E-07 0.00000000E+00-2.29306570E-04-4.22761062E-10 0.00000000E+00
+-5.94894445E-10-1.73269490E-03-7.80388727E-18-1.08193461E-05-4.89580150E-20
+ 1.46555885E-02 0.00000000E+00 9.15247750E-05 0.00000000E+00 4.46418613E-03
+ 8.44230739E-09 4.98610870E-03 9.29522999E-09 0.00000000E+00 1.17924524E-08
+ 0.00000000E+00 1.30375959E-08-9.84778933E-03-4.72643165E-17 3.85194724E-07
+-4.02078146E-21 8.35094611E-02 0.00000000E+00-2.65103916E-06 0.00000000E+00
+ 4.60096680E-03 8.45914823E-09-2.24045631E-04-4.22115251E-10 0.00000000E+00
+ 1.19128170E-08 0.00000000E+00-5.90264941E-10-1.67549157E-03-8.16900795E-18
+ 1.04891953E-05 5.13806641E-20 1.42617534E-02 0.00000000E+00-8.92519229E-05
+ 0.00000000E+00 0.00000000E+00 2.97325027E-14-3.44472673E-08 3.58982636E-15
+-9.17264639E-05 0.00000000E+00-5.49107993E-07 0.00000000E+00 1.08460741E-05
+-4.86152281E-20 6.49203760E-08-2.92339699E-22 0.00000000E+00-6.12013042E-11
+ 0.00000000E+00 6.00539814E-14 2.31316087E-05-4.38426413E-11-6.82876256E-08
+ 8.37966851E-15-2.65103916E-06 0.00000000E+00 1.44431708E-06 0.00000000E+00
+ 3.85194724E-07 4.02078146E-21-1.70281800E-07 8.09470583E-22 0.00000000E+00
+ 6.19224762E-11 0.00000000E+00 3.03760354E-14-2.39512670E-05 4.39434366E-11
+-3.38624739E-08 4.80468230E-15 8.90743704E-05 0.00000000E+00-5.34349172E-07
+ 0.00000000E+00-1.04609005E-05 5.07989653E-20 6.27767326E-08-3.06420004E-22
+ 0.00000000E+00-5.94894445E-10 2.29306570E-04-4.22761062E-10 1.46555885E-02
+ 0.00000000E+00 9.15247750E-05 0.00000000E+00-1.73269490E-03 7.80388727E-18
+-1.08193461E-05 4.89580150E-20 0.00000000E+00 1.17924524E-08 0.00000000E+00
+ 1.30375959E-08-4.46418613E-03 8.44230739E-09-4.98610870E-03 9.29522999E-09
+ 8.35094611E-02 0.00000000E+00-2.65103916E-06 0.00000000E+00-9.84778933E-03
+ 4.72643165E-17 3.85194724E-07 4.02078146E-21 0.00000000E+00 1.19128170E-08
+ 0.00000000E+00-5.90264941E-10-4.60096680E-03 8.45914823E-09 2.24045631E-04
+-4.22115251E-10 1.42617534E-02 0.00000000E+00-8.92519229E-05 0.00000000E+00
+-1.67549157E-03 8.16900795E-18 1.04891953E-05-5.13806641E-20-3.31219573E-04
+-6.83613562E-19-9.63798883E-04 0.00000000E+00 2.14715689E-04 4.21240841E-10
+-3.44472673E-08-3.58982636E-15 0.00000000E+00 5.82300815E-10 0.00000000E+00
+-2.97325027E-14 6.92950459E-04 1.81572764E-18 2.77277016E-03 7.45569888E-18
+ 1.97215066E-03 0.00000000E+00 7.88856283E-03 0.00000000E+00-4.98610870E-03
+-9.29522999E-09-6.82876256E-08-8.37966851E-15 0.00000000E+00-1.30375959E-08
+ 0.00000000E+00-6.00539814E-14 6.92949330E-04 1.91014108E-18-3.62409648E-04
+-1.18332408E-18 1.97214516E-03 0.00000000E+00-1.00832880E-03 0.00000000E+00
+ 2.38388806E-04 4.24150119E-10-3.38624739E-08-4.80468230E-15 0.00000000E+00
+ 6.03131233E-10 0.00000000E+00-3.03760354E-14 5.73640413E-04 2.08163394E-18
+ 1.79386818E-03 0.00000000E+00-4.22883581E-03-8.42262095E-09-2.20204079E-05
+-4.37497524E-11 0.00000000E+00-1.15935277E-08 0.00000000E+00-6.02621737E-11
+ 4.82149350E-03 1.11678109E-17 6.31928867E-04 8.32497204E-19 1.47076948E-02
+ 0.00000000E+00 1.88305024E-03 0.00000000E+00-4.27736602E-03-8.42567965E-09
+ 2.21604441E-05 4.37585831E-11 0.00000000E+00-1.16336834E-08 0.00000000E+00
+ 6.03780467E-11-9.19229605E-04 0.00000000E+00-3.01392320E-04 7.28532786E-19
+ 0.00000000E+00 5.74551770E-10 0.00000000E+00-2.89682638E-14-2.05236483E-04
+ 4.20751546E-10 3.50090628E-08-2.20766034E-15 1.88305024E-03 0.00000000E+00
+ 7.53216307E-03 0.00000000E+00 6.31928867E-04-8.32497204E-19 2.52868999E-03
+-4.28146998E-18 0.00000000E+00-1.28613473E-08 0.00000000E+00-5.86542196E-14
+ 4.78185437E-03-9.27400750E-09 6.94278216E-08-5.79325256E-15 1.88304487E-03
+ 0.00000000E+00-9.63798883E-04 0.00000000E+00 6.31927834E-04-9.18726606E-19
+-3.31219573E-04 6.83613562E-19 0.00000000E+00 5.94894445E-10 0.00000000E+00
+-2.97325027E-14-2.29306570E-04 4.22761062E-10 3.44472673E-08-3.58982636E-15
+ 3.50090628E-08 2.20766034E-15 0.00000000E+00 2.89682638E-14 1.11829399E-05
+ 4.03821258E-20 6.69439419E-08 2.45943852E-22-9.45380076E-05 0.00000000E+00
+-5.65876297E-07 0.00000000E+00-2.21604441E-05-4.37585831E-11 6.94278216E-08
+ 5.79325256E-15 0.00000000E+00-6.03780467E-11 0.00000000E+00 5.86542196E-14
+ 3.63615436E-07-7.24026372E-21-1.75837461E-07-7.29427549E-22-3.01191215E-06
+ 0.00000000E+00 1.48631201E-06 0.00000000E+00 2.29938196E-05 4.38282820E-11
+ 3.44472673E-08 3.58982636E-15 0.00000000E+00 6.10823742E-11 0.00000000E+00
+ 2.97325027E-14-1.08193461E-05-4.89580150E-20 6.49203760E-08 2.92339699E-22
+ 9.15247750E-05 0.00000000E+00-5.49107993E-07 0.00000000E+00-2.20065188E-04
+-4.21686240E-10 0.00000000E+00-5.86821604E-10-1.78669275E-03-6.55947521E-18
+-1.11577279E-05-4.16548012E-20 1.51030534E-02 0.00000000E+00 9.43087786E-05
+ 0.00000000E+00 4.27736602E-03 8.42567965E-09 4.78185437E-03 9.27400750E-09
+ 0.00000000E+00 1.16336834E-08 0.00000000E+00 1.28613473E-08-1.01689748E-02
+-4.27002821E-17 3.63615436E-07-7.24026372E-21 8.59357221E-02 0.00000000E+00
+-3.01191215E-06 0.00000000E+00 4.41643418E-03 8.43733237E-09-2.14715689E-04
+-4.21240841E-10 0.00000000E+00 1.17512370E-08 0.00000000E+00-5.82300815E-10
+-1.73269490E-03-7.80388727E-18 1.08460741E-05 4.86152281E-20 1.46555885E-02
+ 0.00000000E+00-9.17264639E-05 0.00000000E+00 0.00000000E+00 2.89682638E-14
+-3.50090628E-08 2.20766034E-15-9.45380076E-05 0.00000000E+00-5.65876297E-07
+ 0.00000000E+00 1.11829399E-05-4.03821258E-20 6.69439419E-08-2.45943852E-22
+ 0.00000000E+00-6.03780467E-11 0.00000000E+00 5.86542196E-14 2.21604441E-05
+-4.37585831E-11-6.94278216E-08 5.79325256E-15-3.01191215E-06 0.00000000E+00
+ 1.48631201E-06 0.00000000E+00 3.63615436E-07 7.24026372E-21-1.75837461E-07
+ 7.29427549E-22 0.00000000E+00 6.10823742E-11 0.00000000E+00 2.97325027E-14
+-2.29938196E-05 4.38282820E-11-3.44472673E-08 3.58982636E-15 9.15247750E-05
+ 0.00000000E+00-5.49107993E-07 0.00000000E+00-1.08193461E-05 4.89580150E-20
+ 6.49203760E-08-2.92339699E-22 0.00000000E+00-5.86821604E-10 2.20065188E-04
+-4.21686240E-10 1.51030534E-02 0.00000000E+00 9.43087786E-05 0.00000000E+00
+-1.78669275E-03 6.55947521E-18-1.11577279E-05 4.16548012E-20 0.00000000E+00
+ 1.16336834E-08 0.00000000E+00 1.28613473E-08-4.27736602E-03 8.42567965E-09
+-4.78185437E-03 9.27400750E-09 8.59357221E-02 0.00000000E+00-3.01191215E-06
+ 0.00000000E+00-1.01689748E-02 4.27002821E-17 3.63615436E-07 7.24026372E-21
+ 0.00000000E+00 1.17512370E-08 0.00000000E+00-5.82300815E-10-4.41643418E-03
+ 8.43733237E-09 2.14715689E-04-4.21240841E-10 1.46555885E-02 0.00000000E+00
+-9.17264639E-05 0.00000000E+00-1.73269490E-03 7.80388727E-18 1.08460741E-05
+-4.86152281E-20-3.01392320E-04-7.28532786E-19-9.19229605E-04 0.00000000E+00
+ 2.05236483E-04 4.20751546E-10-3.50090628E-08-2.20766034E-15 0.00000000E+00
+ 5.74551770E-10 0.00000000E+00-2.89682638E-14 6.31928867E-04 8.32497204E-19
+ 2.52868999E-03 4.28146998E-18 1.88305024E-03 0.00000000E+00 7.53216307E-03
+ 0.00000000E+00-4.78185437E-03-9.27400750E-09-6.94278216E-08-5.79325256E-15
+ 0.00000000E+00-1.28613473E-08 0.00000000E+00-5.86542196E-14 6.31927834E-04
+ 9.18726606E-19-3.31219573E-04-6.83613562E-19 1.88304487E-03 0.00000000E+00
+-9.63798883E-04 0.00000000E+00 2.29306570E-04 4.22761062E-10-3.44472673E-08
+-3.58982636E-15 0.00000000E+00 5.94894445E-10 0.00000000E+00-2.97325027E-14
+ 1.79386818E-03 0.00000000E+00 5.73640413E-04-2.08163394E-18 0.00000000E+00
+-1.15935277E-08 0.00000000E+00-6.02621737E-11 4.22883581E-03-8.42262095E-09
+ 2.20204079E-05-4.37497524E-11 1.47076948E-02 0.00000000E+00 1.88305024E-03
+ 0.00000000E+00 4.82149350E-03-1.11678109E-17 6.31928867E-04-8.32497204E-19
+ 0.00000000E+00-1.16336834E-08 0.00000000E+00 6.03780467E-11 4.27736602E-03
+-8.42567965E-09-2.21604441E-05 4.37585831E-11-8.29980962E-04 0.00000000E+00
+-2.45857978E-04 6.08322244E-19 0.00000000E+00 5.59870131E-10 0.00000000E+00
+-2.69768252E-14-1.85878524E-04 4.21172319E-10 3.60098416E-08 1.21486113E-15
+ 1.70462352E-03 0.00000000E+00 6.81845998E-03 0.00000000E+00 5.18103266E-04
+-1.10082855E-18 2.07339878E-03-5.57313482E-18 0.00000000E+00-1.25233199E-08
+ 0.00000000E+00-5.50120678E-14 4.36364350E-03-9.25738862E-09 7.15065350E-08
+ 5.66949575E-16 1.70461871E-03 0.00000000E+00-8.74622985E-04 0.00000000E+00
+ 5.18102512E-04-1.48072214E-18-2.72935947E-04 9.77117126E-19 0.00000000E+00
+ 5.78943361E-10 0.00000000E+00-2.80596544E-14-2.10668162E-04 4.20967826E-10
+ 3.55229696E-08-6.21489896E-16 3.60098416E-08-1.21486113E-15 0.00000000E+00
+ 2.69768252E-14 1.17992074E-05 2.70774355E-20 7.06463208E-08 1.67578564E-22
+-1.01381395E-04 0.00000000E+00-6.06685783E-07 0.00000000E+00-2.01736269E-05
+-4.37198958E-11 7.15065350E-08-5.66949575E-16 0.00000000E+00-5.88051293E-11
+ 0.00000000E+00 5.50120678E-14 3.22528899E-07 8.67018607E-23-1.86014372E-07
+-4.91131315E-22-3.90417123E-06 0.00000000E+00 1.58839896E-06 0.00000000E+00
+ 2.10319270E-05 4.37131012E-11 3.55229696E-08 6.21489896E-16 0.00000000E+00
+ 5.94656219E-11 0.00000000E+00 2.80596544E-14-1.14767161E-05-3.00295975E-20
+ 6.88514485E-08 1.80862254E-22 9.74750636E-05 0.00000000E+00-5.84948203E-07
+ 0.00000000E+00-2.01131067E-04-4.20657123E-10 0.00000000E+00-5.71296242E-10
+-1.88548525E-03-4.46330207E-18-1.17768914E-05-2.87671283E-20 1.61920851E-02
+ 0.00000000E+00 1.01083591E-04 0.00000000E+00 3.89512752E-03 8.41714598E-09
+ 4.36364350E-03 9.25738862E-09 0.00000000E+00 1.13301786E-08 0.00000000E+00
+ 1.25233199E-08-1.07573092E-02-2.97010531E-17 3.22528899E-07 8.67018607E-23
+ 9.18334052E-02 0.00000000E+00-3.90417123E-06 0.00000000E+00 4.03835293E-03
+ 8.41603701E-09-1.95621714E-04-4.20705082E-10 0.00000000E+00 1.14404180E-08
+ 0.00000000E+00-5.67058483E-10-1.83759241E-03-4.83493929E-18 1.15004636E-05
+ 3.03960274E-20 1.56119980E-02 0.00000000E+00-9.77360296E-05 0.00000000E+00
+ 0.00000000E+00 2.69768252E-14-3.60098416E-08-1.21486113E-15-1.01381395E-04
+ 0.00000000E+00-6.06685783E-07 0.00000000E+00 1.17992074E-05-2.70774355E-20
+ 7.06463208E-08-1.67578564E-22 0.00000000E+00-5.88051293E-11 0.00000000E+00
+ 5.50120678E-14 2.01736269E-05-4.37198958E-11-7.15065350E-08-5.66949575E-16
+-3.90417123E-06 0.00000000E+00 1.58839896E-06 0.00000000E+00 3.22528899E-07
+-8.67018607E-23-1.86014372E-07 4.91131315E-22 0.00000000E+00 5.94656219E-11
+ 0.00000000E+00 2.80596544E-14-2.10319270E-05 4.37131012E-11-3.55229696E-08
+ 6.21489896E-16 9.74750636E-05 0.00000000E+00-5.84948203E-07 0.00000000E+00
+-1.14767161E-05 3.00295975E-20 6.88514485E-08-1.80862254E-22 0.00000000E+00
+-5.71296242E-10 2.01131067E-04-4.20657123E-10 1.61920851E-02 0.00000000E+00
+ 1.01083591E-04 0.00000000E+00-1.88548525E-03 4.46330207E-18-1.17768914E-05
+ 2.87671283E-20 0.00000000E+00 1.13301786E-08 0.00000000E+00 1.25233199E-08
+-3.89512752E-03 8.41714598E-09-4.36364350E-03 9.25738862E-09 9.18334052E-02
+ 0.00000000E+00-3.90417123E-06 0.00000000E+00-1.07573092E-02 2.97010531E-17
+ 3.22528899E-07-8.67018607E-23 0.00000000E+00 1.14404180E-08 0.00000000E+00
+-5.67058483E-10-4.03835293E-03 8.41603701E-09 1.95621714E-04-4.20705082E-10
+ 1.56119980E-02 0.00000000E+00-9.77360296E-05 0.00000000E+00-1.83759241E-03
+ 4.83493929E-18 1.15004636E-05-3.03960274E-20-2.45857978E-04-6.08322244E-19
+-8.29980962E-04 0.00000000E+00 1.85878524E-04 4.21172319E-10-3.60098416E-08
+ 1.21486113E-15 0.00000000E+00 5.59870131E-10 0.00000000E+00-2.69768252E-14
+ 5.18103266E-04 1.10082855E-18 2.07339878E-03 5.57313482E-18 1.70462352E-03
+ 0.00000000E+00 6.81845998E-03 0.00000000E+00-4.36364350E-03-9.25738862E-09
+-7.15065350E-08 5.66949575E-16 0.00000000E+00-1.25233199E-08 0.00000000E+00
+-5.50120678E-14 5.18102512E-04 1.48072214E-18-2.72935947E-04-9.77117126E-19
+ 1.70461871E-03 0.00000000E+00-8.74622985E-04 0.00000000E+00 2.10668162E-04
+ 4.20967826E-10-3.55229696E-08-6.21489896E-16 0.00000000E+00 5.78943361E-10
+ 0.00000000E+00-2.80596544E-14-8.74622985E-04 0.00000000E+00-2.72935947E-04
+ 9.77117126E-19 0.00000000E+00 5.67058483E-10 0.00000000E+00-2.80596544E-14
+-1.95621714E-04 4.20705082E-10 3.55229696E-08-6.21489896E-16 1.79387323E-03
+ 0.00000000E+00 7.17545701E-03 0.00000000E+00 5.73641275E-04-2.42774637E-18
+ 2.29554547E-03-8.22964374E-18 0.00000000E+00-1.26896362E-08 0.00000000E+00
+-5.69911476E-14 4.57427828E-03-9.26098984E-09 7.05210748E-08-2.83837889E-15
+ 1.79386818E-03 0.00000000E+00-9.19229605E-04 0.00000000E+00 5.73640413E-04
+-2.08163394E-18-3.01392320E-04 7.28532786E-19 0.00000000E+00 5.86821604E-10
+ 0.00000000E+00-2.89682638E-14-2.20065188E-04 4.21686240E-10 3.50090628E-08
+-2.20766034E-15 3.55229696E-08 6.21489896E-16 0.00000000E+00 2.80596544E-14
+ 1.15004636E-05 3.03960274E-20 6.88514485E-08 1.80862254E-22-9.77360296E-05
+ 0.00000000E+00-5.84948203E-07 0.00000000E+00-2.11740189E-05-4.37155872E-11
+ 7.05210748E-08 2.83837889E-15 0.00000000E+00-5.95778605E-11 0.00000000E+00
+ 5.69911476E-14 3.42760098E-07-1.36359826E-20-1.81078267E-07-5.48152478E-22
+-3.42551312E-06 0.00000000E+00 1.53404809E-06 0.00000000E+00 2.20204079E-05
+ 4.37497524E-11 3.50090628E-08 2.20766034E-15 0.00000000E+00 6.02621737E-11
+ 0.00000000E+00 2.89682638E-14-1.11577279E-05-4.16548012E-20 6.69439419E-08
+ 2.45943852E-22 9.43087786E-05 0.00000000E+00-5.65876297E-07 0.00000000E+00
+-2.10668162E-04-4.20967826E-10 0.00000000E+00-5.78943361E-10-1.83759241E-03
+-4.83493929E-18-1.14767161E-05-3.00295975E-20 1.56119980E-02 0.00000000E+00
+ 9.74750636E-05 0.00000000E+00 4.08759583E-03 8.41689654E-09 4.57427828E-03
+ 9.26098984E-09 0.00000000E+00 1.14793137E-08 0.00000000E+00 1.26896362E-08
+-1.04719489E-02-3.07265899E-17 3.42760098E-07-1.36359826E-20 8.86935480E-02
+ 0.00000000E+00-3.42551312E-06 0.00000000E+00 4.22883581E-03 8.42262095E-09
+-2.05236483E-04-4.20751546E-10 0.00000000E+00 1.15935277E-08 0.00000000E+00
+-5.74551770E-10-1.78669275E-03-6.55947521E-18 1.11829399E-05 4.03821258E-20
+ 1.51030534E-02 0.00000000E+00-9.45380076E-05 0.00000000E+00 0.00000000E+00
+ 2.80596544E-14-3.55229696E-08 6.21489896E-16-9.77360296E-05 0.00000000E+00
+-5.84948203E-07 0.00000000E+00 1.15004636E-05-3.03960274E-20 6.88514485E-08
+-1.80862254E-22 0.00000000E+00-5.95778605E-11 0.00000000E+00 5.69911476E-14
+ 2.11740189E-05-4.37155872E-11-7.05210748E-08 2.83837889E-15-3.42551312E-06
+ 0.00000000E+00 1.53404809E-06 0.00000000E+00 3.42760098E-07 1.36359826E-20
+-1.81078267E-07 5.48152478E-22 0.00000000E+00 6.02621737E-11 0.00000000E+00
+ 2.89682638E-14-2.20204079E-05 4.37497524E-11-3.50090628E-08 2.20766034E-15
+ 9.43087786E-05 0.00000000E+00-5.65876297E-07 0.00000000E+00-1.11577279E-05
+ 4.16548012E-20 6.69439419E-08-2.45943852E-22 0.00000000E+00-5.78943361E-10
+ 2.10668162E-04-4.20967826E-10 1.56119980E-02 0.00000000E+00 9.74750636E-05
+ 0.00000000E+00-1.83759241E-03 4.83493929E-18-1.14767161E-05 3.00295975E-20
+ 0.00000000E+00 1.14793137E-08 0.00000000E+00 1.26896362E-08-4.08759583E-03
+ 8.41689654E-09-4.57427828E-03 9.26098984E-09 8.86935480E-02 0.00000000E+00
+-3.42551312E-06 0.00000000E+00-1.04719489E-02 3.07265899E-17 3.42760098E-07
+ 1.36359826E-20 0.00000000E+00 1.15935277E-08 0.00000000E+00-5.74551770E-10
+-4.22883581E-03 8.42262095E-09 2.05236483E-04-4.20751546E-10 1.51030534E-02
+ 0.00000000E+00-9.45380076E-05 0.00000000E+00-1.78669275E-03 6.55947521E-18
+ 1.11829399E-05-4.03821258E-20-2.72935947E-04-9.77117126E-19-8.74622985E-04
+ 0.00000000E+00 1.95621714E-04 4.20705082E-10-3.55229696E-08-6.21489896E-16
+ 0.00000000E+00 5.67058483E-10 0.00000000E+00-2.80596544E-14 5.73641275E-04
+ 2.42774637E-18 2.29554547E-03 8.22964374E-18 1.79387323E-03 0.00000000E+00
+ 7.17545701E-03 0.00000000E+00-4.57427828E-03-9.26098984E-09-7.05210748E-08
+-2.83837889E-15 0.00000000E+00-1.26896362E-08 0.00000000E+00-5.69911476E-14
+ 5.73640413E-04 2.08163394E-18-3.01392320E-04-7.28532786E-19 1.79386818E-03
+ 0.00000000E+00-9.19229605E-04 0.00000000E+00 2.20065188E-04 4.21686240E-10
+-3.50090628E-08-2.20766034E-15 0.00000000E+00 5.86821604E-10 0.00000000E+00
+-2.89682638E-14 5.18102512E-04 1.48072214E-18 1.70461871E-03 0.00000000E+00
+-4.03835293E-03-8.41603701E-09-2.10319270E-05-4.37131012E-11 0.00000000E+00
+-1.14404180E-08 0.00000000E+00-5.94656219E-11 4.36618727E-03 1.65812449E-17
+ 5.73641275E-04 2.42774637E-18 1.39939877E-02 0.00000000E+00 1.79387323E-03
+ 0.00000000E+00-4.08759583E-03-8.41689654E-09 2.11740189E-05 4.37155872E-11
+ 0.00000000E+00-1.14793137E-08 0.00000000E+00 5.95778605E-11 1.70461871E-03
+ 0.00000000E+00 5.18102512E-04-1.48072214E-18 0.00000000E+00-1.14404180E-08
+ 0.00000000E+00-5.94656219E-11 4.03835293E-03-8.41603701E-09 2.10319270E-05
+-4.37131012E-11 1.39939877E-02 0.00000000E+00 1.79387323E-03 0.00000000E+00
+ 4.36618727E-03-1.65812449E-17 5.73641275E-04-2.42774637E-18 0.00000000E+00
+-1.14793137E-08 0.00000000E+00 5.95778605E-11 4.08759583E-03-8.41689654E-09
+-2.11740189E-05 4.37155872E-11 4.49509255E-05 0.00000000E+00-2.40909084E-08
+-4.20804442E-23 0.00000000E+00-1.40466514E-11 4.11751495E-08-1.31036026E-10
+ 0.00000000E+00-1.40466514E-11 4.11751495E-08-1.31036026E-10 3.46215210E-03
+ 0.00000000E+00-2.24783720E-05 0.00000000E+00-2.93440489E-06-3.63226763E-21
+ 1.76503909E-08 2.42039935E-23 0.00000000E+00-5.89886133E-11 0.00000000E+00
+-2.98130723E-13 4.84988889E-07-4.38532884E-10 4.00332114E-08 1.00930141E-11
+ 0.00000000E+00-5.89886133E-11 0.00000000E+00-2.98130723E-13 4.84988889E-07
+-4.38532884E-10 4.00332114E-08 1.00930141E-11 4.84988889E-07 4.38532884E-10
+ 0.00000000E+00 5.89886133E-11-2.51328991E-06 4.58918167E-21 1.63168975E-08
+ 0.00000000E+00 3.04454833E-02-3.86047019E-17 2.12979992E+01 0.00000000E+00
+ 1.36530472E-04 7.37327475E-08-6.45121735E-07-3.98160827E-10 0.00000000E+00
+ 1.16619185E-08 0.00000000E+00-6.01811362E-11-1.55414590E-06 4.27330687E-20
+ 2.12487408E-06 6.09421977E-21 3.59792902E-04 0.00000000E+00 8.99351051E-05
+ 0.00000000E+00 2.43548839E-01 1.57193558E-16 3.04422621E-02 7.79065537E-17
+ 4.25964458E+01 0.00000000E+00 3.45529031E-05 0.00000000E+00 0.00000000E+00
+ 5.89886133E-11-4.84988889E-07 4.38532884E-10 1.63168975E-08 0.00000000E+00
+-2.51328991E-06-4.58918167E-21 2.12979992E+01 0.00000000E+00 3.04454833E-02
+ 3.86047019E-17 0.00000000E+00 1.16619185E-08 0.00000000E+00-6.01811362E-11
+-1.36530472E-04 7.37327475E-08 6.45121735E-07-3.98160827E-10 3.59792902E-04
+ 0.00000000E+00 8.99351051E-05 0.00000000E+00-1.55414590E-06-4.27330687E-20
+ 2.12487408E-06-6.09421977E-21 4.25964458E+01 0.00000000E+00 3.45529031E-05
+ 0.00000000E+00 2.43548839E-01-1.57193558E-16 3.04422621E-02-7.79065537E-17
+ 4.84988889E-07 4.38532884E-10 0.00000000E+00 5.89886133E-11-2.51328991E-06
+ 4.58918167E-21 1.63168975E-08 0.00000000E+00-2.51328991E-06 4.58918167E-21
+ 1.63168975E-08 0.00000000E+00 1.36530472E-04 7.37327475E-08-6.45121735E-07
+-3.98160827E-10 0.00000000E+00 1.16619185E-08 0.00000000E+00-6.01811362E-11
+-1.55414590E-06 4.27330687E-20 2.12487408E-06 6.09421977E-21 3.59792902E-04
+ 0.00000000E+00 8.99351051E-05 0.00000000E+00-1.55414590E-06 4.27330687E-20
+ 2.12487408E-06 6.09421977E-21 3.59792902E-04 0.00000000E+00 8.99351051E-05
+ 0.00000000E+00 0.00000000E+00 5.89886133E-11-4.84988889E-07 4.38532884E-10
+ 1.63168975E-08 0.00000000E+00-2.51328991E-06-4.58918167E-21 1.63168975E-08
+ 0.00000000E+00-2.51328991E-06-4.58918167E-21 0.00000000E+00 1.16619185E-08
+ 0.00000000E+00-6.01811362E-11-1.36530472E-04 7.37327475E-08 6.45121735E-07
+-3.98160827E-10 3.59792902E-04 0.00000000E+00 8.99351051E-05 0.00000000E+00
+-1.55414590E-06-4.27330687E-20 2.12487408E-06-6.09421977E-21 3.59792902E-04
+ 0.00000000E+00 8.99351051E-05 0.00000000E+00-1.55414590E-06-4.27330687E-20
+ 2.12487408E-06-6.09421977E-21 4.11751495E-08 1.31036026E-10 0.00000000E+00
+ 1.40466514E-11-3.86697810E-06 9.55469012E-21 2.25139369E-05 0.00000000E+00
+ 6.08904291E-02-4.80798488E-17 5.32448720E+01 0.00000000E+00-1.39170647E-05
+-1.93645462E-09 4.00332114E-08-1.00930141E-11 0.00000000E+00-6.32691269E-10
+ 0.00000000E+00 2.98130723E-13-2.51328991E-06 4.58918167E-21 9.71039581E-08
+-2.67085036E-21 1.63168975E-08 0.00000000E+00-2.24878555E-05 0.00000000E+00
+ 3.04454833E-02-3.86047019E-17-1.52219364E-02-9.82546293E-18 2.12979992E+01
+ 0.00000000E+00-5.32450844E+00 0.00000000E+00 0.00000000E+00 1.40466514E-11
+-4.11751495E-08 1.31036026E-10 2.25139369E-05 0.00000000E+00-3.86697810E-06
+-9.55469012E-21 5.32448720E+01 0.00000000E+00 6.08904291E-02 4.80798488E-17
+ 0.00000000E+00-6.32691269E-10 0.00000000E+00 2.98130723E-13 1.39170647E-05
+-1.93645462E-09-4.00332114E-08-1.00930141E-11 1.63168975E-08 0.00000000E+00
+-2.24878555E-05 0.00000000E+00-2.51328991E-06-4.58918167E-21 9.71039581E-08
+ 2.67085036E-21 2.12979992E+01 0.00000000E+00-5.32450844E+00 0.00000000E+00
+ 3.04454833E-02 3.86047019E-17-1.52219364E-02 9.82546293E-18 4.11751495E-08
+ 1.31036026E-10 0.00000000E+00 1.40466514E-11-3.86697810E-06 9.55469012E-21
+ 2.25139369E-05 0.00000000E+00-3.86697810E-06 9.55469012E-21 2.25139369E-05
+ 0.00000000E+00-1.39170647E-05-1.93645462E-09 4.00332114E-08-1.00930141E-11
+ 0.00000000E+00-6.32691269E-10 0.00000000E+00 2.98130723E-13-2.51328991E-06
+ 4.58918167E-21 9.71039581E-08-2.67085036E-21 1.63168975E-08 0.00000000E+00
+-2.24878555E-05 0.00000000E+00-2.51328991E-06 4.58918167E-21 9.71039581E-08
+-2.67085036E-21 1.63168975E-08 0.00000000E+00-2.24878555E-05 0.00000000E+00
+ 0.00000000E+00 1.40466514E-11-4.11751495E-08 1.31036026E-10 2.25139369E-05
+ 0.00000000E+00-3.86697810E-06-9.55469012E-21 2.25139369E-05 0.00000000E+00
+-3.86697810E-06-9.55469012E-21 0.00000000E+00-6.32691269E-10 0.00000000E+00
+ 2.98130723E-13 1.39170647E-05-1.93645462E-09-4.00332114E-08-1.00930141E-11
+ 1.63168975E-08 0.00000000E+00-2.24878555E-05 0.00000000E+00-2.51328991E-06
+-4.58918167E-21 9.71039581E-08 2.67085036E-21 1.63168975E-08 0.00000000E+00
+-2.24878555E-05 0.00000000E+00-2.51328991E-06-4.58918167E-21 9.71039581E-08
+ 2.67085036E-21-2.40909084E-08 4.20804442E-23 4.49509255E-05 0.00000000E+00
+-4.11751495E-08-1.31036026E-10 0.00000000E+00-1.40466514E-11-4.11751495E-08
+-1.31036026E-10 0.00000000E+00-1.40466514E-11-2.93440489E-06 3.63226763E-21
+ 1.76503909E-08-2.42039935E-23 3.46215210E-03 0.00000000E+00-2.24783720E-05
+ 0.00000000E+00-4.84988889E-07-4.38532884E-10-4.00332114E-08 1.00930141E-11
+ 0.00000000E+00-5.89886133E-11 0.00000000E+00-2.98130723E-13-4.84988889E-07
+-4.38532884E-10-4.00332114E-08 1.00930141E-11 0.00000000E+00-5.89886133E-11
+ 0.00000000E+00-2.98130723E-13 2.96827850E-04 4.30614799E-08 1.60584009E-06
+ 2.14336226E-10 0.00000000E+00 1.20857195E-08 0.00000000E+00 6.27692959E-11
+ 1.89081858E-06 3.34243744E-21 8.99355087E-05 0.00000000E+00 3.04424223E-02
+ 9.43265053E-17 1.99049519E+00 0.00000000E+00 3.52318272E-04 3.58174219E-08
+-1.76596770E-06-1.93432292E-10 0.00000000E+00 1.20571371E-08 0.00000000E+00
+-6.26743089E-11 3.86152484E-05 9.06993318E-20 8.03884968E-06 2.25708054E-20
+ 1.07938443E-03 0.00000000E+00 1.79914386E-04 0.00000000E+00 2.43560646E-01
+ 8.75244199E-16 3.04480903E-02 1.05163947E-16 1.15452375E+01 0.00000000E+00
+ 9.95339906E-01 0.00000000E+00 3.46215210E-03 0.00000000E+00-2.93440489E-06
+-3.63226763E-21 0.00000000E+00 6.32691269E-10-1.39170647E-05 1.93645462E-09
+ 0.00000000E+00 6.32691269E-10-1.39170647E-05 1.93645462E-09 1.64755271E+00
+ 0.00000000E+00-2.23205429E-03 0.00000000E+00-2.65585772E-03 1.26003415E-18
+ 7.86061908E-08 1.16526156E-20 0.00000000E+00-1.16619185E-08 0.00000000E+00
+-1.32213241E-08 1.36530472E-04-7.37327475E-08 2.38346856E-04-6.19504734E-08
+ 0.00000000E+00-1.16619185E-08 0.00000000E+00-1.32213241E-08 1.36530472E-04
+-7.37327475E-08 2.38346856E-04-6.19504734E-08 1.74219402E-01 0.00000000E+00
+-1.11698387E-03 0.00000000E+00-4.55670288E-04 1.05052103E-18 2.85016886E-06
+-6.20377319E-21 0.00000000E+00-1.20857195E-08 0.00000000E+00 6.07284573E-10
+ 2.96827850E-04-4.30614799E-08-7.75099760E-06 3.11617040E-09 0.00000000E+00
+-1.20857195E-08 0.00000000E+00 6.07284573E-10 2.96827850E-04-4.30614799E-08
+-7.75099760E-06 3.11617040E-09-2.24783720E-05 0.00000000E+00 1.76503909E-08
+ 2.42039935E-23 0.00000000E+00-2.98130723E-13 4.00332114E-08 1.00930141E-11
+ 0.00000000E+00-2.98130723E-13 4.00332114E-08 1.00930141E-11-2.23205429E-03
+ 0.00000000E+00 3.19403151E-05 0.00000000E+00 7.86061908E-08 1.16526156E-20
+-4.60565375E-08 2.11580797E-23 0.00000000E+00 6.01811362E-11 0.00000000E+00
+-1.63262927E-13-6.45121735E-07 3.98160827E-10 8.00546092E-08 1.53186028E-11
+ 0.00000000E+00 6.01811362E-11 0.00000000E+00-1.63262927E-13-6.45121735E-07
+ 3.98160827E-10 8.00546092E-08 1.53186028E-11 1.06036391E-03 0.00000000E+00
+-6.51670722E-06 0.00000000E+00-2.84779494E-06 6.93746626E-21 1.70747902E-08
+-3.94128332E-23 0.00000000E+00-6.27692959E-11 0.00000000E+00 2.37467613E-14
+ 1.60584009E-06-2.14336226E-10 4.00319026E-08 5.22598364E-12 0.00000000E+00
+-6.27692959E-11 0.00000000E+00 2.37467613E-14 1.60584009E-06-2.14336226E-10
+ 4.00319026E-08 5.22598364E-12-2.93440489E-06 3.63226763E-21 3.46215210E-03
+ 0.00000000E+00 1.39170647E-05 1.93645462E-09 0.00000000E+00 6.32691269E-10
+ 1.39170647E-05 1.93645462E-09 0.00000000E+00 6.32691269E-10-2.65585772E-03
+-1.26003415E-18 7.86061908E-08-1.16526156E-20 1.64755271E+00 0.00000000E+00
+-2.23205429E-03 0.00000000E+00-1.36530472E-04-7.37327475E-08-2.38346856E-04
+-6.19504734E-08 0.00000000E+00-1.16619185E-08 0.00000000E+00-1.32213241E-08
+-1.36530472E-04-7.37327475E-08-2.38346856E-04-6.19504734E-08 0.00000000E+00
+-1.16619185E-08 0.00000000E+00-1.32213241E-08-4.55670288E-04-1.05052103E-18
+ 2.85016886E-06 6.20377319E-21 1.74219402E-01 0.00000000E+00-1.11698387E-03
+ 0.00000000E+00-2.96827850E-04-4.30614799E-08 7.75099760E-06 3.11617040E-09
+ 0.00000000E+00-1.20857195E-08 0.00000000E+00 6.07284573E-10-2.96827850E-04
+-4.30614799E-08 7.75099760E-06 3.11617040E-09 0.00000000E+00-1.20857195E-08
+ 0.00000000E+00 6.07284573E-10 1.76503909E-08-2.42039935E-23-2.24783720E-05
+ 0.00000000E+00-4.00332114E-08 1.00930141E-11 0.00000000E+00-2.98130723E-13
+-4.00332114E-08 1.00930141E-11 0.00000000E+00-2.98130723E-13 7.86061908E-08
+-1.16526156E-20-4.60565375E-08-2.11580797E-23-2.23205429E-03 0.00000000E+00
+ 3.19403151E-05 0.00000000E+00 6.45121735E-07 3.98160827E-10-8.00546092E-08
+ 1.53186028E-11 0.00000000E+00 6.01811362E-11 0.00000000E+00-1.63262927E-13
+ 6.45121735E-07 3.98160827E-10-8.00546092E-08 1.53186028E-11 0.00000000E+00
+ 6.01811362E-11 0.00000000E+00-1.63262927E-13-2.84779494E-06-6.93746626E-21
+ 1.70747902E-08 3.94128332E-23 1.06036391E-03 0.00000000E+00-6.51670722E-06
+ 0.00000000E+00-1.60584009E-06-2.14336226E-10-4.00319026E-08 5.22598364E-12
+ 0.00000000E+00-6.27692959E-11 0.00000000E+00 2.37467613E-14-1.60584009E-06
+-2.14336226E-10-4.00319026E-08 5.22598364E-12 0.00000000E+00-6.27692959E-11
+ 0.00000000E+00 2.37467613E-14 0.00000000E+00 2.98130723E-13-4.00332114E-08
+-1.00930141E-11-2.24878555E-05 0.00000000E+00 9.71039581E-08 2.67085036E-21
+-2.24878555E-05 0.00000000E+00 9.71039581E-08 2.67085036E-21 0.00000000E+00
+ 1.32213241E-08 0.00000000E+00 1.63262927E-13-2.38346856E-04 6.19504734E-08
+-8.00546092E-08-1.53186028E-11 8.99351051E-05 0.00000000E+00 3.59762062E-04
+ 0.00000000E+00 2.12487408E-06-6.09421977E-21 8.59019160E-06-2.54342703E-20
+ 8.99351051E-05 0.00000000E+00 3.59762062E-04 0.00000000E+00 2.12487408E-06
+-6.09421977E-21 8.59019160E-06-2.54342703E-20 0.00000000E+00-5.98310281E-10
+ 0.00000000E+00-2.37467613E-14 2.47064046E-05-9.02710109E-10-4.00319026E-08
+-5.22598364E-12 8.99355087E-05 0.00000000E+00-6.74624738E-05 0.00000000E+00
+ 1.89081858E-06-3.34243744E-21-2.48241706E-06 6.47831070E-21 8.99355087E-05
+ 0.00000000E+00-6.74624738E-05 0.00000000E+00 1.89081858E-06-3.34243744E-21
+-2.48241706E-06 6.47831070E-21 4.00332114E-08-1.00930141E-11 0.00000000E+00
+ 2.98130723E-13 9.71039581E-08-2.67085036E-21-2.24878555E-05 0.00000000E+00
+ 9.71039581E-08-2.67085036E-21-2.24878555E-05 0.00000000E+00 2.38346856E-04
+ 6.19504734E-08 8.00546092E-08-1.53186028E-11 0.00000000E+00 1.32213241E-08
+ 0.00000000E+00 1.63262927E-13 2.12487408E-06 6.09421977E-21 8.59019160E-06
+ 2.54342703E-20 8.99351051E-05 0.00000000E+00 3.59762062E-04 0.00000000E+00
+ 2.12487408E-06 6.09421977E-21 8.59019160E-06 2.54342703E-20 8.99351051E-05
+ 0.00000000E+00 3.59762062E-04 0.00000000E+00-2.47064046E-05-9.02710109E-10
+ 4.00319026E-08-5.22598364E-12 0.00000000E+00-5.98310281E-10 0.00000000E+00
+-2.37467613E-14 1.89081858E-06 3.34243744E-21-2.48241706E-06-6.47831070E-21
+ 8.99355087E-05 0.00000000E+00-6.74624738E-05 0.00000000E+00 1.89081858E-06
+ 3.34243744E-21-2.48241706E-06-6.47831070E-21 8.99355087E-05 0.00000000E+00
+-6.74624738E-05 0.00000000E+00 0.00000000E+00 2.98130723E-13-4.00332114E-08
+-1.00930141E-11-2.24878555E-05 0.00000000E+00 9.71039581E-08 2.67085036E-21
+-5.32450844E+00 0.00000000E+00-1.52219364E-02 9.82546293E-18 0.00000000E+00
+ 1.32213241E-08 0.00000000E+00 1.63262927E-13-2.38346856E-04 6.19504734E-08
+-8.00546092E-08-1.53186028E-11 8.99351051E-05 0.00000000E+00 3.59762062E-04
+ 0.00000000E+00 2.12487408E-06-6.09421977E-21 8.59019160E-06-2.54342703E-20
+ 3.45529031E-05 0.00000000E+00 9.15630721E+00 0.00000000E+00 3.04422621E-02
+-7.79065537E-17 1.21772463E-01-3.05345911E-16 0.00000000E+00-5.98310281E-10
+ 0.00000000E+00-2.37467613E-14 2.47064046E-05-9.02710109E-10-4.00319026E-08
+-5.22598364E-12 8.99355087E-05 0.00000000E+00-6.74624738E-05 0.00000000E+00
+ 1.89081858E-06-3.34243744E-21-2.48241706E-06 6.47831070E-21 1.99049519E+00
+ 0.00000000E+00-7.46458775E-01 0.00000000E+00 3.04424223E-02-9.43265053E-17
+-1.52226282E-02 4.98726132E-17 4.00332114E-08-1.00930141E-11 0.00000000E+00
+ 2.98130723E-13 9.71039581E-08-2.67085036E-21-2.24878555E-05 0.00000000E+00
+-1.52219364E-02-9.82546293E-18-5.32450844E+00 0.00000000E+00 2.38346856E-04
+ 6.19504734E-08 8.00546092E-08-1.53186028E-11 0.00000000E+00 1.32213241E-08
+ 0.00000000E+00 1.63262927E-13 2.12487408E-06 6.09421977E-21 8.59019160E-06
+ 2.54342703E-20 8.99351051E-05 0.00000000E+00 3.59762062E-04 0.00000000E+00
+ 3.04422621E-02 7.79065537E-17 1.21772463E-01 3.05345911E-16 3.45529031E-05
+ 0.00000000E+00 9.15630721E+00 0.00000000E+00-2.47064046E-05-9.02710109E-10
+ 4.00319026E-08-5.22598364E-12 0.00000000E+00-5.98310281E-10 0.00000000E+00
+-2.37467613E-14 1.89081858E-06 3.34243744E-21-2.48241706E-06-6.47831070E-21
+ 8.99355087E-05 0.00000000E+00-6.74624738E-05 0.00000000E+00 3.04424223E-02
+ 9.43265053E-17-1.52226282E-02-4.98726132E-17 1.99049519E+00 0.00000000E+00
+-7.46458775E-01 0.00000000E+00 0.00000000E+00 1.20857195E-08 0.00000000E+00
+ 6.27692959E-11-2.96827850E-04 4.30614799E-08-1.60584009E-06 2.14336226E-10
+ 8.99355087E-05 0.00000000E+00 1.89081858E-06-3.34243744E-21 8.99355087E-05
+ 0.00000000E+00 1.89081858E-06-3.34243744E-21 0.00000000E+00 1.20571371E-08
+ 0.00000000E+00-6.26743089E-11-3.52318272E-04 3.58174219E-08 1.76596770E-06
+-1.93432292E-10 1.07938443E-03 0.00000000E+00 1.79914386E-04 0.00000000E+00
+ 3.86152484E-05-9.06993318E-20 8.03884968E-06-2.25708054E-20 1.07938443E-03
+ 0.00000000E+00 1.79914386E-04 0.00000000E+00 3.86152484E-05-9.06993318E-20
+ 8.03884968E-06-2.25708054E-20 2.96827850E-04 4.30614799E-08 1.60584009E-06
+ 2.14336226E-10 0.00000000E+00 1.20857195E-08 0.00000000E+00 6.27692959E-11
+ 1.89081858E-06 3.34243744E-21 8.99355087E-05 0.00000000E+00 1.89081858E-06
+ 3.34243744E-21 8.99355087E-05 0.00000000E+00 3.52318272E-04 3.58174219E-08
+-1.76596770E-06-1.93432292E-10 0.00000000E+00 1.20571371E-08 0.00000000E+00
+-6.26743089E-11 3.86152484E-05 9.06993318E-20 8.03884968E-06 2.25708054E-20
+ 1.07938443E-03 0.00000000E+00 1.79914386E-04 0.00000000E+00 3.86152484E-05
+ 9.06993318E-20 8.03884968E-06 2.25708054E-20 1.07938443E-03 0.00000000E+00
+ 1.79914386E-04 0.00000000E+00 0.00000000E+00 1.20857195E-08 0.00000000E+00
+ 6.27692959E-11-2.96827850E-04 4.30614799E-08-1.60584009E-06 2.14336226E-10
+ 8.99355087E-05 0.00000000E+00 1.89081858E-06-3.34243744E-21 1.99049519E+00
+ 0.00000000E+00 3.04424223E-02-9.43265053E-17 0.00000000E+00 1.20571371E-08
+ 0.00000000E+00-6.26743089E-11-3.52318272E-04 3.58174219E-08 1.76596770E-06
+-1.93432292E-10 1.07938443E-03 0.00000000E+00 1.79914386E-04 0.00000000E+00
+ 3.86152484E-05-9.06993318E-20 8.03884968E-06-2.25708054E-20 1.15452375E+01
+ 0.00000000E+00 9.95339906E-01 0.00000000E+00 2.43560646E-01-8.75244199E-16
+ 3.04480903E-02-1.05163947E-16 5.12633896E-04 2.38640242E-08 2.72678577E-06
+ 1.21299299E-10 0.00000000E+00 1.20012210E-08 0.00000000E+00 6.23497348E-11
+ 8.03935107E-06 2.88699829E-20 1.79911893E-04 0.00000000E+00 3.04480281E-02
+ 7.33421282E-17 1.04040854E+00 0.00000000E+00 5.68131739E-04 2.19182897E-08
+-2.88693442E-06-1.15794206E-10 0.00000000E+00 1.20174288E-08 0.00000000E+00
+-6.23997595E-11 1.04956041E-04 3.56535389E-19 1.85000411E-05 5.61302147E-20
+ 1.79946880E-03 0.00000000E+00 2.69962119E-04 0.00000000E+00 2.43619469E-01
+ 2.11750019E-16 3.04570830E-02-2.65162758E-18 6.85586021E+00 0.00000000E+00
+ 6.93716262E-01 0.00000000E+00 1.74219402E-01 0.00000000E+00 1.06036391E-03
+ 0.00000000E+00-4.55670288E-04 1.05052103E-18-2.84779494E-06 6.93746626E-21
+ 0.00000000E+00 5.98310281E-10-2.47064046E-05 9.02710109E-10 0.00000000E+00
+ 5.98310281E-10-2.47064046E-05 9.02710109E-10 7.59315917E-01 0.00000000E+00
+-4.54643281E-04 0.00000000E+00-2.61817667E-03 9.70437203E-18 3.57548951E-08
+ 7.00338996E-21 0.00000000E+00-1.20571371E-08 0.00000000E+00-1.32048739E-08
+ 3.52318272E-04-3.58174219E-08 4.75721252E-04-3.09450206E-08 0.00000000E+00
+-1.20571371E-08 0.00000000E+00-1.32048739E-08 3.52318272E-04-3.58174219E-08
+ 4.75721252E-04-3.09450206E-08 1.03550242E-01 0.00000000E+00-6.57289798E-04
+ 0.00000000E+00-4.50221714E-04 2.04249510E-18 2.81655538E-06-1.27299719E-20
+ 0.00000000E+00-1.20012210E-08 0.00000000E+00 5.98120072E-10 5.12633896E-04
+-2.38640242E-08-1.85403385E-05 1.45442440E-09 0.00000000E+00-1.20012210E-08
+ 0.00000000E+00 5.98120072E-10 5.12633896E-04-2.38640242E-08-1.85403385E-05
+ 1.45442440E-09-7.75099760E-06-3.11617040E-09 4.00319026E-08-5.22598364E-12
+ 0.00000000E+00-6.07284573E-10 0.00000000E+00-2.37467613E-14-2.48241706E-06
+-6.47831070E-21-6.74624738E-05 0.00000000E+00-1.52226282E-02-4.98726132E-17
+-7.46458775E-01 0.00000000E+00 4.75721252E-04 3.09450206E-08 8.00661270E-08
+-5.47824535E-12 0.00000000E+00 1.32048739E-08 0.00000000E+00-3.87076439E-14
+ 8.03884968E-06 2.25708054E-20 3.36959327E-05 1.05424862E-19 1.79914386E-04
+ 0.00000000E+00 7.19678004E-04 0.00000000E+00 3.04480903E-02 1.05163947E-16
+ 1.21793452E-01 3.27621091E-16 9.95339906E-01 0.00000000E+00 4.30151852E+00
+ 0.00000000E+00-3.54980149E-05-8.62005532E-10 4.00371611E-08-1.37627343E-12
+ 0.00000000E+00-6.03135107E-10 0.00000000E+00 1.25061766E-14 8.03935107E-06
+ 2.88699829E-20-6.63484803E-06-2.12500494E-20 1.79911893E-04 0.00000000E+00
+-1.12468503E-04 0.00000000E+00 3.04480281E-02 7.33421282E-17-1.52262778E-02
+-1.76726252E-17 1.04040854E+00 0.00000000E+00-4.33531200E-01 0.00000000E+00
+ 0.00000000E+00-6.07284573E-10 0.00000000E+00-2.37467613E-14 7.75099760E-06
+-3.11617040E-09-4.00319026E-08-5.22598364E-12-6.74624738E-05 0.00000000E+00
+-2.48241706E-06 6.47831070E-21-7.46458775E-01 0.00000000E+00-1.52226282E-02
+ 4.98726132E-17 0.00000000E+00 1.32048739E-08 0.00000000E+00-3.87076439E-14
+-4.75721252E-04 3.09450206E-08-8.00661270E-08-5.47824535E-12 1.79914386E-04
+ 0.00000000E+00 7.19678004E-04 0.00000000E+00 8.03884968E-06-2.25708054E-20
+ 3.36959327E-05-1.05424862E-19 9.95339906E-01 0.00000000E+00 4.30151852E+00
+ 0.00000000E+00 3.04480903E-02-1.05163947E-16 1.21793452E-01-3.27621091E-16
+ 0.00000000E+00-6.03135107E-10 0.00000000E+00 1.25061766E-14 3.54980149E-05
+-8.62005532E-10-4.00371611E-08-1.37627343E-12 1.79911893E-04 0.00000000E+00
+-1.12468503E-04 0.00000000E+00 8.03935107E-06-2.88699829E-20-6.63484803E-06
+ 2.12500494E-20 1.04040854E+00 0.00000000E+00-4.33531200E-01 0.00000000E+00
+ 3.04480281E-02-7.33421282E-17-1.52262778E-02 1.76726252E-17-7.75099760E-06
+-3.11617040E-09 4.00319026E-08-5.22598364E-12 0.00000000E+00-6.07284573E-10
+ 0.00000000E+00-2.37467613E-14-2.48241706E-06-6.47831070E-21-6.74624738E-05
+ 0.00000000E+00-2.48241706E-06-6.47831070E-21-6.74624738E-05 0.00000000E+00
+ 4.75721252E-04 3.09450206E-08 8.00661270E-08-5.47824535E-12 0.00000000E+00
+ 1.32048739E-08 0.00000000E+00-3.87076439E-14 8.03884968E-06 2.25708054E-20
+ 3.36959327E-05 1.05424862E-19 1.79914386E-04 0.00000000E+00 7.19678004E-04
+ 0.00000000E+00 8.03884968E-06 2.25708054E-20 3.36959327E-05 1.05424862E-19
+ 1.79914386E-04 0.00000000E+00 7.19678004E-04 0.00000000E+00-3.54980149E-05
+-8.62005532E-10 4.00371611E-08-1.37627343E-12 0.00000000E+00-6.03135107E-10
+ 0.00000000E+00 1.25061766E-14 8.03935107E-06 2.88699829E-20-6.63484803E-06
+-2.12500494E-20 1.79911893E-04 0.00000000E+00-1.12468503E-04 0.00000000E+00
+ 8.03935107E-06 2.88699829E-20-6.63484803E-06-2.12500494E-20 1.79911893E-04
+ 0.00000000E+00-1.12468503E-04 0.00000000E+00 0.00000000E+00-6.07284573E-10
+ 0.00000000E+00-2.37467613E-14 7.75099760E-06-3.11617040E-09-4.00319026E-08
+-5.22598364E-12-6.74624738E-05 0.00000000E+00-2.48241706E-06 6.47831070E-21
+-6.74624738E-05 0.00000000E+00-2.48241706E-06 6.47831070E-21 0.00000000E+00
+ 1.32048739E-08 0.00000000E+00-3.87076439E-14-4.75721252E-04 3.09450206E-08
+-8.00661270E-08-5.47824535E-12 1.79914386E-04 0.00000000E+00 7.19678004E-04
+ 0.00000000E+00 8.03884968E-06-2.25708054E-20 3.36959327E-05-1.05424862E-19
+ 1.79914386E-04 0.00000000E+00 7.19678004E-04 0.00000000E+00 8.03884968E-06
+-2.25708054E-20 3.36959327E-05-1.05424862E-19 0.00000000E+00-6.03135107E-10
+ 0.00000000E+00 1.25061766E-14 3.54980149E-05-8.62005532E-10-4.00371611E-08
+-1.37627343E-12 1.79911893E-04 0.00000000E+00-1.12468503E-04 0.00000000E+00
+ 8.03935107E-06-2.88699829E-20-6.63484803E-06 2.12500494E-20 1.79911893E-04
+ 0.00000000E+00-1.12468503E-04 0.00000000E+00 8.03935107E-06-2.88699829E-20
+-6.63484803E-06 2.12500494E-20 2.85016886E-06 6.20377319E-21 1.70747902E-08
+ 3.94128332E-23-1.11698387E-03 0.00000000E+00-6.51670722E-06 0.00000000E+00
+-4.00319026E-08 5.22598364E-12 0.00000000E+00 2.37467613E-14-4.00319026E-08
+ 5.22598364E-12 0.00000000E+00 2.37467613E-14 3.57548951E-08-7.00338996E-21
+-4.52721089E-08-1.62489536E-22-4.54643281E-04 0.00000000E+00 1.34256245E-05
+ 0.00000000E+00 1.76596770E-06 1.93432292E-10-8.00661270E-08 5.47824535E-12
+ 0.00000000E+00 6.26743089E-11 0.00000000E+00 3.87076439E-14 1.76596770E-06
+ 1.93432292E-10-8.00661270E-08 5.47824535E-12 0.00000000E+00 6.26743089E-11
+ 0.00000000E+00 3.87076439E-14-2.81330261E-06-1.28258817E-20 1.68709408E-08
+ 7.66854568E-23 6.37319247E-04 0.00000000E+00-3.87786425E-06 0.00000000E+00
+-2.72678577E-06-1.21299299E-10-4.00371611E-08 1.37627343E-12 0.00000000E+00
+-6.23497348E-11 0.00000000E+00-1.25061766E-14-2.72678577E-06-1.21299299E-10
+-4.00371611E-08 1.37627343E-12 0.00000000E+00-6.23497348E-11 0.00000000E+00
+-1.25061766E-14-4.55670288E-04-1.05052103E-18-2.84779494E-06-6.93746626E-21
+ 1.74219402E-01 0.00000000E+00 1.06036391E-03 0.00000000E+00 2.47064046E-05
+ 9.02710109E-10 0.00000000E+00 5.98310281E-10 2.47064046E-05 9.02710109E-10
+ 0.00000000E+00 5.98310281E-10-2.61817667E-03-9.70437203E-18 3.57548951E-08
+-7.00338996E-21 7.59315917E-01 0.00000000E+00-4.54643281E-04 0.00000000E+00
+-3.52318272E-04-3.58174219E-08-4.75721252E-04-3.09450206E-08 0.00000000E+00
+-1.20571371E-08 0.00000000E+00-1.32048739E-08-3.52318272E-04-3.58174219E-08
+-4.75721252E-04-3.09450206E-08 0.00000000E+00-1.20571371E-08 0.00000000E+00
+-1.32048739E-08-4.50221714E-04-2.04249510E-18 2.81655538E-06 1.27299719E-20
+ 1.03550242E-01 0.00000000E+00-6.57289798E-04 0.00000000E+00-5.12633896E-04
+-2.38640242E-08 1.85403385E-05 1.45442440E-09 0.00000000E+00-1.20012210E-08
+ 0.00000000E+00 5.98120072E-10-5.12633896E-04-2.38640242E-08 1.85403385E-05
+ 1.45442440E-09 0.00000000E+00-1.20012210E-08 0.00000000E+00 5.98120072E-10
+-1.11698387E-03 0.00000000E+00-6.51670722E-06 0.00000000E+00 2.85016886E-06
+-6.20377319E-21 1.70747902E-08-3.94128332E-23 0.00000000E+00 2.37467613E-14
+ 4.00319026E-08 5.22598364E-12 0.00000000E+00 2.37467613E-14 4.00319026E-08
+ 5.22598364E-12-4.54643281E-04 0.00000000E+00 1.34256245E-05 0.00000000E+00
+ 3.57548951E-08 7.00338996E-21-4.52721089E-08 1.62489536E-22 0.00000000E+00
+ 6.26743089E-11 0.00000000E+00 3.87076439E-14-1.76596770E-06 1.93432292E-10
+ 8.00661270E-08 5.47824535E-12 0.00000000E+00 6.26743089E-11 0.00000000E+00
+ 3.87076439E-14-1.76596770E-06 1.93432292E-10 8.00661270E-08 5.47824535E-12
+ 6.37319247E-04 0.00000000E+00-3.87786425E-06 0.00000000E+00-2.81330261E-06
+ 1.28258817E-20 1.68709408E-08-7.66854568E-23 0.00000000E+00-6.23497348E-11
+ 0.00000000E+00-1.25061766E-14 2.72678577E-06-1.21299299E-10 4.00371611E-08
+ 1.37627343E-12 0.00000000E+00-6.23497348E-11 0.00000000E+00-1.25061766E-14
+ 2.72678577E-06-1.21299299E-10 4.00371611E-08 1.37627343E-12 0.00000000E+00
+ 1.20012210E-08 0.00000000E+00 6.23497348E-11-5.12633896E-04 2.38640242E-08
+-2.72678577E-06 1.21299299E-10 1.79911893E-04 0.00000000E+00 8.03935107E-06
+-2.88699829E-20 1.79911893E-04 0.00000000E+00 8.03935107E-06-2.88699829E-20
+ 0.00000000E+00 1.20174288E-08 0.00000000E+00-6.23997595E-11-5.68131739E-04
+ 2.19182897E-08 2.88693442E-06-1.15794206E-10 1.79946880E-03 0.00000000E+00
+ 2.69962119E-04 0.00000000E+00 1.04956041E-04-3.56535389E-19 1.85000411E-05
+-5.61302147E-20 1.79946880E-03 0.00000000E+00 2.69962119E-04 0.00000000E+00
+ 1.04956041E-04-3.56535389E-19 1.85000411E-05-5.61302147E-20 5.12633896E-04
+ 2.38640242E-08 2.72678577E-06 1.21299299E-10 0.00000000E+00 1.20012210E-08
+ 0.00000000E+00 6.23497348E-11 8.03935107E-06 2.88699829E-20 1.79911893E-04
+ 0.00000000E+00 8.03935107E-06 2.88699829E-20 1.79911893E-04 0.00000000E+00
+ 5.68131739E-04 2.19182897E-08-2.88693442E-06-1.15794206E-10 0.00000000E+00
+ 1.20174288E-08 0.00000000E+00-6.23997595E-11 1.04956041E-04 3.56535389E-19
+ 1.85000411E-05 5.61302147E-20 1.79946880E-03 0.00000000E+00 2.69962119E-04
+ 0.00000000E+00 1.04956041E-04 3.56535389E-19 1.85000411E-05 5.61302147E-20
+ 1.79946880E-03 0.00000000E+00 2.69962119E-04 0.00000000E+00 0.00000000E+00
+ 1.20012210E-08 0.00000000E+00 6.23497348E-11-5.12633896E-04 2.38640242E-08
+-2.72678577E-06 1.21299299E-10 1.79911893E-04 0.00000000E+00 8.03935107E-06
+-2.88699829E-20 1.04040854E+00 0.00000000E+00 3.04480281E-02-7.33421282E-17
+ 0.00000000E+00 1.20174288E-08 0.00000000E+00-6.23997595E-11-5.68131739E-04
+ 2.19182897E-08 2.88693442E-06-1.15794206E-10 1.79946880E-03 0.00000000E+00
+ 2.69962119E-04 0.00000000E+00 1.04956041E-04-3.56535389E-19 1.85000411E-05
+-5.61302147E-20 6.85586021E+00 0.00000000E+00 6.93716262E-01 0.00000000E+00
+ 2.43619469E-01-2.11750019E-16 3.04570830E-02 2.65162758E-18 7.28403617E-04
+ 1.79388205E-08 3.84745108E-06 9.18196769E-11 0.00000000E+00 1.20533236E-08
+ 0.00000000E+00 6.26131844E-11 1.84996244E-05 4.72947059E-20 2.69959957E-04
+ 0.00000000E+00 3.04569905E-02 1.48691177E-17 7.01787952E-01 0.00000000E+00
+ 7.83802446E-04 1.68344745E-08-4.00731985E-06-8.86251281E-11 0.00000000E+00
+ 1.20571862E-08 0.00000000E+00-6.26236510E-11 2.05232888E-04 4.20159737E-19
+ 3.31061369E-05 6.34179378E-20 2.52030057E-03 0.00000000E+00 3.60124633E-04
+ 0.00000000E+00 2.43705163E-01 6.40756784E-16 3.04695545E-02 1.45867592E-16
+ 4.88406857E+00 0.00000000E+00 5.26451423E-01 0.00000000E+00 1.03550242E-01
+ 0.00000000E+00 6.37319247E-04 0.00000000E+00-4.50221714E-04 2.04249510E-18
+-2.81330261E-06 1.28258817E-20 0.00000000E+00 6.03135107E-10-3.54980149E-05
+ 8.62005532E-10 0.00000000E+00 6.03135107E-10-3.54980149E-05 8.62005532E-10
+ 5.00624946E-01 0.00000000E+00-1.96208182E-04 0.00000000E+00-2.57845141E-03
+ 1.07736966E-17 5.83895678E-08-4.34983776E-21 0.00000000E+00-1.20174288E-08
+ 0.00000000E+00-1.32457192E-08 5.68131739E-04-2.19182897E-08 7.13123719E-04
+-2.17147902E-08 0.00000000E+00-1.20174288E-08 0.00000000E+00-1.32457192E-08
+ 5.68131739E-04-2.19182897E-08 7.13123719E-04-2.17147902E-08 7.38446799E-02
+ 0.00000000E+00-4.66716499E-04 0.00000000E+00-4.41589833E-04 1.53590813E-18
+ 2.76342658E-06-9.70934951E-21 0.00000000E+00-1.20533236E-08 0.00000000E+00
+ 6.02136996E-10 7.28403617E-04-1.79388205E-08-2.93398284E-05 1.04148447E-09
+ 0.00000000E+00-1.20533236E-08 0.00000000E+00 6.02136996E-10 7.28403617E-04
+-1.79388205E-08-2.93398284E-05 1.04148447E-09-1.85403385E-05-1.45442440E-09
+ 4.00371611E-08-1.37627343E-12 0.00000000E+00-5.98120072E-10 0.00000000E+00
+ 1.25061766E-14-6.63484803E-06-2.12500494E-20-1.12468503E-04 0.00000000E+00
+-1.52262778E-02-1.76726252E-17-4.33531200E-01 0.00000000E+00 7.13123719E-04
+ 2.17147902E-08 8.00762788E-08-1.86355687E-12 0.00000000E+00 1.32457192E-08
+ 0.00000000E+00 1.94002525E-14 1.85000411E-05 5.61302147E-20 7.54800474E-05
+ 2.03098584E-19 2.69962119E-04 0.00000000E+00 1.07988506E-03 0.00000000E+00
+ 3.04570830E-02-2.65162758E-18 1.21829401E-01 9.80370983E-17 6.93716262E-01
+ 0.00000000E+00 2.85213344E+00 0.00000000E+00-4.62673721E-05-7.03895672E-10
+ 3.99671908E-08-7.98637196E-13 0.00000000E+00-6.03304141E-10 0.00000000E+00
+ 2.61665674E-15 1.84996244E-05 4.72947059E-20-1.29014403E-05-2.76781609E-20
+ 2.69959957E-04 0.00000000E+00-1.57521148E-04 0.00000000E+00 3.04569905E-02
+ 1.48691177E-17-1.52316362E-02-4.01841774E-17 7.01787952E-01 0.00000000E+00
+-3.07059844E-01 0.00000000E+00 0.00000000E+00-5.98120072E-10 0.00000000E+00
+ 1.25061766E-14 1.85403385E-05-1.45442440E-09-4.00371611E-08-1.37627343E-12
+-1.12468503E-04 0.00000000E+00-6.63484803E-06 2.12500494E-20-4.33531200E-01
+ 0.00000000E+00-1.52262778E-02 1.76726252E-17 0.00000000E+00 1.32457192E-08
+ 0.00000000E+00 1.94002525E-14-7.13123719E-04 2.17147902E-08-8.00762788E-08
+-1.86355687E-12 2.69962119E-04 0.00000000E+00 1.07988506E-03 0.00000000E+00
+ 1.85000411E-05-5.61302147E-20 7.54800474E-05-2.03098584E-19 6.93716262E-01
+ 0.00000000E+00 2.85213344E+00 0.00000000E+00 3.04570830E-02 2.65162758E-18
+ 1.21829401E-01-9.80370983E-17 0.00000000E+00-6.03304141E-10 0.00000000E+00
+ 2.61665674E-15 4.62673721E-05-7.03895672E-10-3.99671908E-08-7.98637196E-13
+ 2.69959957E-04 0.00000000E+00-1.57521148E-04 0.00000000E+00 1.84996244E-05
+-4.72947059E-20-1.29014403E-05 2.76781609E-20 7.01787952E-01 0.00000000E+00
+-3.07059844E-01 0.00000000E+00 3.04569905E-02-1.48691177E-17-1.52316362E-02
+ 4.01841774E-17-1.85403385E-05-1.45442440E-09 4.00371611E-08-1.37627343E-12
+ 0.00000000E+00-5.98120072E-10 0.00000000E+00 1.25061766E-14-6.63484803E-06
+-2.12500494E-20-1.12468503E-04 0.00000000E+00-6.63484803E-06-2.12500494E-20
+-1.12468503E-04 0.00000000E+00 7.13123719E-04 2.17147902E-08 8.00762788E-08
+-1.86355687E-12 0.00000000E+00 1.32457192E-08 0.00000000E+00 1.94002525E-14
+ 1.85000411E-05 5.61302147E-20 7.54800474E-05 2.03098584E-19 2.69962119E-04
+ 0.00000000E+00 1.07988506E-03 0.00000000E+00 1.85000411E-05 5.61302147E-20
+ 7.54800474E-05 2.03098584E-19 2.69962119E-04 0.00000000E+00 1.07988506E-03
+ 0.00000000E+00-4.62673721E-05-7.03895672E-10 3.99671908E-08-7.98637196E-13
+ 0.00000000E+00-6.03304141E-10 0.00000000E+00 2.61665674E-15 1.84996244E-05
+ 4.72947059E-20-1.29014403E-05-2.76781609E-20 2.69959957E-04 0.00000000E+00
+-1.57521148E-04 0.00000000E+00 1.84996244E-05 4.72947059E-20-1.29014403E-05
+-2.76781609E-20 2.69959957E-04 0.00000000E+00-1.57521148E-04 0.00000000E+00
+ 0.00000000E+00-5.98120072E-10 0.00000000E+00 1.25061766E-14 1.85403385E-05
+-1.45442440E-09-4.00371611E-08-1.37627343E-12-1.12468503E-04 0.00000000E+00
+-6.63484803E-06 2.12500494E-20-1.12468503E-04 0.00000000E+00-6.63484803E-06
+ 2.12500494E-20 0.00000000E+00 1.32457192E-08 0.00000000E+00 1.94002525E-14
+-7.13123719E-04 2.17147902E-08-8.00762788E-08-1.86355687E-12 2.69962119E-04
+ 0.00000000E+00 1.07988506E-03 0.00000000E+00 1.85000411E-05-5.61302147E-20
+ 7.54800474E-05-2.03098584E-19 2.69962119E-04 0.00000000E+00 1.07988506E-03
+ 0.00000000E+00 1.85000411E-05-5.61302147E-20 7.54800474E-05-2.03098584E-19
+ 0.00000000E+00-6.03304141E-10 0.00000000E+00 2.61665674E-15 4.62673721E-05
+-7.03895672E-10-3.99671908E-08-7.98637196E-13 2.69959957E-04 0.00000000E+00
+-1.57521148E-04 0.00000000E+00 1.84996244E-05-4.72947059E-20-1.29014403E-05
+ 2.76781609E-20 2.69959957E-04 0.00000000E+00-1.57521148E-04 0.00000000E+00
+ 1.84996244E-05-4.72947059E-20-1.29014403E-05 2.76781609E-20 2.81655538E-06
+ 1.27299719E-20 1.68709408E-08 7.66854568E-23-6.57289798E-04 0.00000000E+00
+-3.87786425E-06 0.00000000E+00-4.00371611E-08 1.37627343E-12 0.00000000E+00
+-1.25061766E-14-4.00371611E-08 1.37627343E-12 0.00000000E+00-1.25061766E-14
+ 5.83895678E-08 4.34983776E-21-4.45784504E-08-1.82919987E-22-1.96208182E-04
+ 0.00000000E+00 8.74060922E-06 0.00000000E+00 2.88693442E-06 1.15794206E-10
+-8.00762788E-08 1.86355687E-12 0.00000000E+00 6.23997595E-11 0.00000000E+00
+-1.94002525E-14 2.88693442E-06 1.15794206E-10-8.00762788E-08 1.86355687E-12
+ 0.00000000E+00 6.23997595E-11 0.00000000E+00-1.94002525E-14-2.75847080E-06
+-9.48370596E-21 1.65473286E-08 5.74287815E-23 4.56590205E-04 0.00000000E+00
+-2.76624049E-06 0.00000000E+00-3.84745108E-06-9.18196769E-11-3.99671908E-08
+ 7.98637196E-13 0.00000000E+00-6.26131844E-11 0.00000000E+00-2.61665674E-15
+-3.84745108E-06-9.18196769E-11-3.99671908E-08 7.98637196E-13 0.00000000E+00
+-6.26131844E-11 0.00000000E+00-2.61665674E-15-4.50221714E-04-2.04249510E-18
+-2.81330261E-06-1.28258817E-20 1.03550242E-01 0.00000000E+00 6.37319247E-04
+ 0.00000000E+00 3.54980149E-05 8.62005532E-10 0.00000000E+00 6.03135107E-10
+ 3.54980149E-05 8.62005532E-10 0.00000000E+00 6.03135107E-10-2.57845141E-03
+-1.07736966E-17 5.83895678E-08 4.34983776E-21 5.00624946E-01 0.00000000E+00
+-1.96208182E-04 0.00000000E+00-5.68131739E-04-2.19182897E-08-7.13123719E-04
+-2.17147902E-08 0.00000000E+00-1.20174288E-08 0.00000000E+00-1.32457192E-08
+-5.68131739E-04-2.19182897E-08-7.13123719E-04-2.17147902E-08 0.00000000E+00
+-1.20174288E-08 0.00000000E+00-1.32457192E-08-4.41589833E-04-1.53590813E-18
+ 2.76342658E-06 9.70934951E-21 7.38446799E-02 0.00000000E+00-4.66716499E-04
+ 0.00000000E+00-7.28403617E-04-1.79388205E-08 2.93398284E-05 1.04148447E-09
+ 0.00000000E+00-1.20533236E-08 0.00000000E+00 6.02136996E-10-7.28403617E-04
+-1.79388205E-08 2.93398284E-05 1.04148447E-09 0.00000000E+00-1.20533236E-08
+ 0.00000000E+00 6.02136996E-10-6.57289798E-04 0.00000000E+00-3.87786425E-06
+ 0.00000000E+00 2.81655538E-06-1.27299719E-20 1.68709408E-08-7.66854568E-23
+ 0.00000000E+00-1.25061766E-14 4.00371611E-08 1.37627343E-12 0.00000000E+00
+-1.25061766E-14 4.00371611E-08 1.37627343E-12-1.96208182E-04 0.00000000E+00
+ 8.74060922E-06 0.00000000E+00 5.83895678E-08-4.34983776E-21-4.45784504E-08
+ 1.82919987E-22 0.00000000E+00 6.23997595E-11 0.00000000E+00-1.94002525E-14
+-2.88693442E-06 1.15794206E-10 8.00762788E-08 1.86355687E-12 0.00000000E+00
+ 6.23997595E-11 0.00000000E+00-1.94002525E-14-2.88693442E-06 1.15794206E-10
+ 8.00762788E-08 1.86355687E-12 4.56590205E-04 0.00000000E+00-2.76624049E-06
+ 0.00000000E+00-2.75847080E-06 9.48370596E-21 1.65473286E-08-5.74287815E-23
+ 0.00000000E+00-6.26131844E-11 0.00000000E+00-2.61665674E-15 3.84745108E-06
+-9.18196769E-11 3.99671908E-08 7.98637196E-13 0.00000000E+00-6.26131844E-11
+ 0.00000000E+00-2.61665674E-15 3.84745108E-06-9.18196769E-11 3.99671908E-08
+ 7.98637196E-13 0.00000000E+00 1.20533236E-08 0.00000000E+00 6.26131844E-11
+-7.28403617E-04 1.79388205E-08-3.84745108E-06 9.18196769E-11 2.69959957E-04
+ 0.00000000E+00 1.84996244E-05-4.72947059E-20 2.69959957E-04 0.00000000E+00
+ 1.84996244E-05-4.72947059E-20 0.00000000E+00 1.20571862E-08 0.00000000E+00
+-6.26236510E-11-7.83802446E-04 1.68344745E-08 4.00731985E-06-8.86251281E-11
+ 2.52030057E-03 0.00000000E+00 3.60124633E-04 0.00000000E+00 2.05232888E-04
+-4.20159737E-19 3.31061369E-05-6.34179378E-20 2.52030057E-03 0.00000000E+00
+ 3.60124633E-04 0.00000000E+00 2.05232888E-04-4.20159737E-19 3.31061369E-05
+-6.34179378E-20 7.28403617E-04 1.79388205E-08 3.84745108E-06 9.18196769E-11
+ 0.00000000E+00 1.20533236E-08 0.00000000E+00 6.26131844E-11 1.84996244E-05
+ 4.72947059E-20 2.69959957E-04 0.00000000E+00 1.84996244E-05 4.72947059E-20
+ 2.69959957E-04 0.00000000E+00 7.83802446E-04 1.68344745E-08-4.00731985E-06
+-8.86251281E-11 0.00000000E+00 1.20571862E-08 0.00000000E+00-6.26236510E-11
+ 2.05232888E-04 4.20159737E-19 3.31061369E-05 6.34179378E-20 2.52030057E-03
+ 0.00000000E+00 3.60124633E-04 0.00000000E+00 2.05232888E-04 4.20159737E-19
+ 3.31061369E-05 6.34179378E-20 2.52030057E-03 0.00000000E+00 3.60124633E-04
+ 0.00000000E+00 0.00000000E+00 1.20533236E-08 0.00000000E+00 6.26131844E-11
+-7.28403617E-04 1.79388205E-08-3.84745108E-06 9.18196769E-11 2.69959957E-04
+ 0.00000000E+00 1.84996244E-05-4.72947059E-20 7.01787952E-01 0.00000000E+00
+ 3.04569905E-02-1.48691177E-17 0.00000000E+00 1.20571862E-08 0.00000000E+00
+-6.26236510E-11-7.83802446E-04 1.68344745E-08 4.00731985E-06-8.86251281E-11
+ 2.52030057E-03 0.00000000E+00 3.60124633E-04 0.00000000E+00 2.05232888E-04
+-4.20159737E-19 3.31061369E-05-6.34179378E-20 4.88406857E+00 0.00000000E+00
+ 5.26451423E-01 0.00000000E+00 2.43705163E-01-6.40756784E-16 3.04695545E-02
+-1.45867592E-16 9.43357356E-04 1.45357677E-08 4.96357275E-06 7.48028240E-11
+ 0.00000000E+00 1.20744098E-08 0.00000000E+00 6.27304824E-11 3.31068566E-05
+ 8.21190576E-20 3.60121900E-04 0.00000000E+00 3.04694652E-02 1.59557089E-16
+ 5.28923861E-01 0.00000000E+00 9.98426591E-04 1.39711211E-08-5.12248152E-06
+-7.31822643E-11 0.00000000E+00 1.20896304E-08 0.00000000E+00-6.27741751E-11
+ 3.38772847E-04 6.28018266E-19 5.18836571E-05 6.00996193E-20 3.24219056E-03
+ 0.00000000E+00 4.50437997E-04 0.00000000E+00 2.43819302E-01 1.27254241E-15
+ 3.04856147E-02 1.39606146E-16 3.79521021E+00 0.00000000E+00 4.23253149E-01
+ 0.00000000E+00 7.38446799E-02 0.00000000E+00 4.56590205E-04 0.00000000E+00
+-4.41589833E-04 1.53590813E-18-2.75847080E-06 9.48370596E-21 0.00000000E+00
+ 6.03304141E-10-4.62673721E-05 7.03895672E-10 0.00000000E+00 6.03304141E-10
+-4.62673721E-05 7.03895672E-10 3.74432269E-01 0.00000000E+00-1.09189310E-04
+ 0.00000000E+00-2.51934704E-03 9.12191690E-18 7.84221017E-08 2.61903684E-21
+ 0.00000000E+00-1.20571862E-08 0.00000000E+00-1.32683861E-08 7.83802446E-04
+-1.68344745E-08 9.50054445E-04-1.70610481E-08 0.00000000E+00-1.20571862E-08
+ 0.00000000E+00-1.32683861E-08 7.83802446E-04-1.68344745E-08 9.50054445E-04
+-1.70610481E-08 5.74549672E-02 0.00000000E+00-3.62254380E-04 0.00000000E+00
+-4.29934992E-04 1.79579035E-18 2.69121152E-06-1.11589027E-20 0.00000000E+00
+-1.20744098E-08 0.00000000E+00 6.01925375E-10 9.43357356E-04-1.45357677E-08
+-4.01296596E-05 8.00484630E-10 0.00000000E+00-1.20744098E-08 0.00000000E+00
+ 6.01925375E-10 9.43357356E-04-1.45357677E-08-4.01296596E-05 8.00484630E-10
+-2.93398284E-05-1.04148447E-09 3.99671908E-08-7.98637196E-13 0.00000000E+00
+-6.02136996E-10 0.00000000E+00 2.61665674E-15-1.29014403E-05-2.76781609E-20
+-1.57521148E-04 0.00000000E+00-1.52316362E-02-4.01841774E-17-3.07059844E-01
+ 0.00000000E+00 9.50054445E-04 1.70610481E-08 7.96777527E-08-1.10288433E-12
+ 0.00000000E+00 1.32683861E-08 0.00000000E+00 4.76539318E-15 3.31061369E-05
+ 6.34179378E-20 1.33915447E-04 2.77257248E-19 3.60124633E-04 0.00000000E+00
+ 1.44054723E-03 0.00000000E+00 3.04695545E-02 1.45867592E-16 1.21879320E-01
+ 5.56667658E-16 5.26451423E-01 0.00000000E+00 2.13562205E+00 0.00000000E+00
+-5.69563318E-05-6.28123444E-10 3.97271943E-08-4.05139921E-13 0.00000000E+00
+-6.06571712E-10 0.00000000E+00 1.09231881E-14 3.31068566E-05 8.21190576E-20
+-2.12476284E-05-3.55546692E-20 3.60121900E-04 0.00000000E+00-2.02639974E-04
+ 0.00000000E+00 3.04694652E-02 1.59557089E-16-1.52387700E-02-7.47908089E-17
+ 5.28923861E-01 0.00000000E+00-2.38044252E-01 0.00000000E+00 0.00000000E+00
+-6.02136996E-10 0.00000000E+00 2.61665674E-15 2.93398284E-05-1.04148447E-09
+-3.99671908E-08-7.98637196E-13-1.57521148E-04 0.00000000E+00-1.29014403E-05
+ 2.76781609E-20-3.07059844E-01 0.00000000E+00-1.52316362E-02 4.01841774E-17
+ 0.00000000E+00 1.32683861E-08 0.00000000E+00 4.76539318E-15-9.50054445E-04
+ 1.70610481E-08-7.96777527E-08-1.10288433E-12 3.60124633E-04 0.00000000E+00
+ 1.44054723E-03 0.00000000E+00 3.31061369E-05-6.34179378E-20 1.33915447E-04
+-2.77257248E-19 5.26451423E-01 0.00000000E+00 2.13562205E+00 0.00000000E+00
+ 3.04695545E-02-1.45867592E-16 1.21879320E-01-5.56667658E-16 0.00000000E+00
+-6.06571712E-10 0.00000000E+00 1.09231881E-14 5.69563318E-05-6.28123444E-10
+-3.97271943E-08-4.05139921E-13 3.60121900E-04 0.00000000E+00-2.02639974E-04
+ 0.00000000E+00 3.31068566E-05-8.21190576E-20-2.12476284E-05 3.55546692E-20
+ 5.28923861E-01 0.00000000E+00-2.38044252E-01 0.00000000E+00 3.04694652E-02
+-1.59557089E-16-1.52387700E-02 7.47908089E-17-2.93398284E-05-1.04148447E-09
+ 3.99671908E-08-7.98637196E-13 0.00000000E+00-6.02136996E-10 0.00000000E+00
+ 2.61665674E-15-1.29014403E-05-2.76781609E-20-1.57521148E-04 0.00000000E+00
+-1.29014403E-05-2.76781609E-20-1.57521148E-04 0.00000000E+00 9.50054445E-04
+ 1.70610481E-08 7.96777527E-08-1.10288433E-12 0.00000000E+00 1.32683861E-08
+ 0.00000000E+00 4.76539318E-15 3.31061369E-05 6.34179378E-20 1.33915447E-04
+ 2.77257248E-19 3.60124633E-04 0.00000000E+00 1.44054723E-03 0.00000000E+00
+ 3.31061369E-05 6.34179378E-20 1.33915447E-04 2.77257248E-19 3.60124633E-04
+ 0.00000000E+00 1.44054723E-03 0.00000000E+00-5.69563318E-05-6.28123444E-10
+ 3.97271943E-08-4.05139921E-13 0.00000000E+00-6.06571712E-10 0.00000000E+00
+ 1.09231881E-14 3.31068566E-05 8.21190576E-20-2.12476284E-05-3.55546692E-20
+ 3.60121900E-04 0.00000000E+00-2.02639974E-04 0.00000000E+00 3.31068566E-05
+ 8.21190576E-20-2.12476284E-05-3.55546692E-20 3.60121900E-04 0.00000000E+00
+-2.02639974E-04 0.00000000E+00 0.00000000E+00-6.02136996E-10 0.00000000E+00
+ 2.61665674E-15 2.93398284E-05-1.04148447E-09-3.99671908E-08-7.98637196E-13
+-1.57521148E-04 0.00000000E+00-1.29014403E-05 2.76781609E-20-1.57521148E-04
+ 0.00000000E+00-1.29014403E-05 2.76781609E-20 0.00000000E+00 1.32683861E-08
+ 0.00000000E+00 4.76539318E-15-9.50054445E-04 1.70610481E-08-7.96777527E-08
+-1.10288433E-12 3.60124633E-04 0.00000000E+00 1.44054723E-03 0.00000000E+00
+ 3.31061369E-05-6.34179378E-20 1.33915447E-04-2.77257248E-19 3.60124633E-04
+ 0.00000000E+00 1.44054723E-03 0.00000000E+00 3.31061369E-05-6.34179378E-20
+ 1.33915447E-04-2.77257248E-19 0.00000000E+00-6.06571712E-10 0.00000000E+00
+ 1.09231881E-14 5.69563318E-05-6.28123444E-10-3.97271943E-08-4.05139921E-13
+ 3.60121900E-04 0.00000000E+00-2.02639974E-04 0.00000000E+00 3.31068566E-05
+-8.21190576E-20-2.12476284E-05 3.55546692E-20 3.60121900E-04 0.00000000E+00
+-2.02639974E-04 0.00000000E+00 3.31068566E-05-8.21190576E-20-2.12476284E-05
+ 3.55546692E-20 2.76342658E-06 9.70934951E-21 1.65473286E-08 5.74287815E-23
+-4.66716499E-04 0.00000000E+00-2.76624049E-06 0.00000000E+00-3.99671908E-08
+ 7.98637196E-13 0.00000000E+00-2.61665674E-15-3.99671908E-08 7.98637196E-13
+ 0.00000000E+00-2.61665674E-15 7.84221017E-08-2.61903684E-21-4.35597697E-08
+-1.61637492E-22-1.09189310E-04 0.00000000E+00 6.50985065E-06 0.00000000E+00
+ 4.00731985E-06 8.86251281E-11-7.96777527E-08 1.10288433E-12 0.00000000E+00
+ 6.26236510E-11 0.00000000E+00-4.76539318E-15 4.00731985E-06 8.86251281E-11
+-7.96777527E-08 1.10288433E-12 0.00000000E+00 6.26236510E-11 0.00000000E+00
+-4.76539318E-15-2.68493262E-06-1.13072021E-20 1.61105167E-08 6.73945958E-23
+ 3.56150735E-04 0.00000000E+00-2.15252822E-06 0.00000000E+00-4.96357275E-06
+-7.48028240E-11-3.97271943E-08 4.05139921E-13 0.00000000E+00-6.27304824E-11
+ 0.00000000E+00-1.09231881E-14-4.96357275E-06-7.48028240E-11-3.97271943E-08
+ 4.05139921E-13 0.00000000E+00-6.27304824E-11 0.00000000E+00-1.09231881E-14
+-4.41589833E-04-1.53590813E-18-2.75847080E-06-9.48370596E-21 7.38446799E-02
+ 0.00000000E+00 4.56590205E-04 0.00000000E+00 4.62673721E-05 7.03895672E-10
+ 0.00000000E+00 6.03304141E-10 4.62673721E-05 7.03895672E-10 0.00000000E+00
+ 6.03304141E-10-2.51934704E-03-9.12191690E-18 7.84221017E-08-2.61903684E-21
+ 3.74432269E-01 0.00000000E+00-1.09189310E-04 0.00000000E+00-7.83802446E-04
+-1.68344745E-08-9.50054445E-04-1.70610481E-08 0.00000000E+00-1.20571862E-08
+ 0.00000000E+00-1.32683861E-08-7.83802446E-04-1.68344745E-08-9.50054445E-04
+-1.70610481E-08 0.00000000E+00-1.20571862E-08 0.00000000E+00-1.32683861E-08
+-4.29934992E-04-1.79579035E-18 2.69121152E-06 1.11589027E-20 5.74549672E-02
+ 0.00000000E+00-3.62254380E-04 0.00000000E+00-9.43357356E-04-1.45357677E-08
+ 4.01296596E-05 8.00484630E-10 0.00000000E+00-1.20744098E-08 0.00000000E+00
+ 6.01925375E-10-9.43357356E-04-1.45357677E-08 4.01296596E-05 8.00484630E-10
+ 0.00000000E+00-1.20744098E-08 0.00000000E+00 6.01925375E-10-4.66716499E-04
+ 0.00000000E+00-2.76624049E-06 0.00000000E+00 2.76342658E-06-9.70934951E-21
+ 1.65473286E-08-5.74287815E-23 0.00000000E+00-2.61665674E-15 3.99671908E-08
+ 7.98637196E-13 0.00000000E+00-2.61665674E-15 3.99671908E-08 7.98637196E-13
+-1.09189310E-04 0.00000000E+00 6.50985065E-06 0.00000000E+00 7.84221017E-08
+ 2.61903684E-21-4.35597697E-08 1.61637492E-22 0.00000000E+00 6.26236510E-11
+ 0.00000000E+00-4.76539318E-15-4.00731985E-06 8.86251281E-11 7.96777527E-08
+ 1.10288433E-12 0.00000000E+00 6.26236510E-11 0.00000000E+00-4.76539318E-15
+-4.00731985E-06 8.86251281E-11 7.96777527E-08 1.10288433E-12 3.56150735E-04
+ 0.00000000E+00-2.15252822E-06 0.00000000E+00-2.68493262E-06 1.13072021E-20
+ 1.61105167E-08-6.73945958E-23 0.00000000E+00-6.27304824E-11 0.00000000E+00
+-1.09231881E-14 4.96357275E-06-7.48028240E-11 3.97271943E-08 4.05139921E-13
+ 0.00000000E+00-6.27304824E-11 0.00000000E+00-1.09231881E-14 4.96357275E-06
+-7.48028240E-11 3.97271943E-08 4.05139921E-13 0.00000000E+00 1.20744098E-08
+ 0.00000000E+00 6.27304824E-11-9.43357356E-04 1.45357677E-08-4.96357275E-06
+ 7.48028240E-11 3.60121900E-04 0.00000000E+00 3.31068566E-05-8.21190576E-20
+ 3.60121900E-04 0.00000000E+00 3.31068566E-05-8.21190576E-20 0.00000000E+00
+ 1.20896304E-08 0.00000000E+00-6.27741751E-11-9.98426591E-04 1.39711211E-08
+ 5.12248152E-06-7.31822643E-11 3.24219056E-03 0.00000000E+00 4.50437997E-04
+ 0.00000000E+00 3.38772847E-04-6.28018266E-19 5.18836571E-05-6.00996193E-20
+ 3.24219056E-03 0.00000000E+00 4.50437997E-04 0.00000000E+00 3.38772847E-04
+-6.28018266E-19 5.18836571E-05-6.00996193E-20 9.43357356E-04 1.45357677E-08
+ 4.96357275E-06 7.48028240E-11 0.00000000E+00 1.20744098E-08 0.00000000E+00
+ 6.27304824E-11 3.31068566E-05 8.21190576E-20 3.60121900E-04 0.00000000E+00
+ 3.31068566E-05 8.21190576E-20 3.60121900E-04 0.00000000E+00 9.98426591E-04
+ 1.39711211E-08-5.12248152E-06-7.31822643E-11 0.00000000E+00 1.20896304E-08
+ 0.00000000E+00-6.27741751E-11 3.38772847E-04 6.28018266E-19 5.18836571E-05
+ 6.00996193E-20 3.24219056E-03 0.00000000E+00 4.50437997E-04 0.00000000E+00
+ 3.38772847E-04 6.28018266E-19 5.18836571E-05 6.00996193E-20 3.24219056E-03
+ 0.00000000E+00 4.50437997E-04 0.00000000E+00 0.00000000E+00 1.20744098E-08
+ 0.00000000E+00 6.27304824E-11-9.43357356E-04 1.45357677E-08-4.96357275E-06
+ 7.48028240E-11 3.60121900E-04 0.00000000E+00 3.31068566E-05-8.21190576E-20
+ 5.28923861E-01 0.00000000E+00 3.04694652E-02-1.59557089E-16 0.00000000E+00
+ 1.20896304E-08 0.00000000E+00-6.27741751E-11-9.98426591E-04 1.39711211E-08
+ 5.12248152E-06-7.31822643E-11 3.24219056E-03 0.00000000E+00 4.50437997E-04
+ 0.00000000E+00 3.38772847E-04-6.28018266E-19 5.18836571E-05-6.00996193E-20
+ 3.79521021E+00 0.00000000E+00 4.23253149E-01 0.00000000E+00 2.43819302E-01
+-1.27254241E-15 3.04856147E-02-1.39606146E-16 1.15712002E-03 1.26673472E-08
+ 6.07356017E-06 6.53761040E-11 0.00000000E+00 1.21387422E-08 0.00000000E+00
+ 6.30517225E-11 5.18838302E-05 4.96031128E-21 4.50435069E-04 0.00000000E+00
+ 3.04855228E-02 1.10406303E-16 4.24250527E-01 0.00000000E+00 1.21191772E-03
+ 1.23372684E-08-6.23168798E-06-6.44224616E-11 0.00000000E+00 1.21279096E-08
+ 0.00000000E+00-6.30222011E-11 5.05620373E-04 5.32131861E-19 7.48181387E-05
+ 1.74434762E-19 3.96544202E-03 0.00000000E+00 5.40940354E-04 0.00000000E+00
+ 2.43962000E-01 5.24770833E-16 3.05052329E-02 3.59871873E-17 3.10426787E+00
+ 0.00000000E+00 3.53658182E-01 0.00000000E+00 5.74549672E-02 0.00000000E+00
+ 3.56150735E-04 0.00000000E+00-4.29934992E-04 1.79579035E-18-2.68493262E-06
+ 1.13072021E-20 0.00000000E+00 6.06571712E-10-5.69563318E-05 6.28123444E-10
+ 0.00000000E+00 6.06571712E-10-5.69563318E-05 6.28123444E-10 2.99487918E-01
+ 0.00000000E+00-6.94632345E-05 0.00000000E+00-2.44378230E-03 9.86575575E-18
+ 9.80058599E-08-3.07675707E-21 0.00000000E+00-1.20896304E-08 0.00000000E+00
+-1.33332525E-08 9.98426591E-04-1.39711211E-08 1.18564148E-03-1.45765685E-08
+ 0.00000000E+00-1.20896304E-08 0.00000000E+00-1.33332525E-08 9.98426591E-04
+-1.39711211E-08 1.18564148E-03-1.45765685E-08 4.70686692E-02 0.00000000E+00
+-2.96310163E-04 0.00000000E+00-4.15388238E-04 1.42338342E-18 2.60096239E-06
+-9.04409808E-21 0.00000000E+00-1.21387422E-08 0.00000000E+00 6.07746368E-10
+ 1.15712002E-03-1.26673472E-08-5.08524956E-05 6.77085146E-10 0.00000000E+00
+-1.21387422E-08 0.00000000E+00 6.07746368E-10 1.15712002E-03-1.26673472E-08
+-5.08524956E-05 6.77085146E-10-4.01296596E-05-8.00484630E-10 3.97271943E-08
+-4.05139921E-13 0.00000000E+00-6.01925375E-10 0.00000000E+00 1.09231881E-14
+-2.12476284E-05-3.55546692E-20-2.02639974E-04 0.00000000E+00-1.52387700E-02
+-7.47908089E-17-2.38044252E-01 0.00000000E+00 1.18564148E-03 1.45765685E-08
+ 7.92514849E-08-6.59124682E-13 0.00000000E+00 1.33332525E-08 0.00000000E+00
+ 4.10887169E-14 5.18836571E-05 6.00996193E-20 2.09019870E-04 1.98396506E-19
+ 4.50437997E-04 0.00000000E+00 1.80181383E-03 0.00000000E+00 3.04856147E-02
+ 1.39606146E-16 1.21943547E-01 4.79969868E-16 4.23253149E-01 0.00000000E+00
+ 1.70753344E+00 0.00000000E+00-6.75962579E-05-5.76205544E-10 3.95319535E-08
+-2.38410603E-13 0.00000000E+00-6.04469862E-10 0.00000000E+00-7.38034003E-15
+ 5.18838302E-05 4.96031128E-21-3.16754922E-05-4.48487683E-20 4.50435069E-04
+ 0.00000000E+00-2.47843856E-04 0.00000000E+00 3.04855228E-02 1.10406303E-16
+-1.52476889E-02-3.65983727E-17 4.24250527E-01 0.00000000E+00-1.94477177E-01
+ 0.00000000E+00 0.00000000E+00-6.01925375E-10 0.00000000E+00 1.09231881E-14
+ 4.01296596E-05-8.00484630E-10-3.97271943E-08-4.05139921E-13-2.02639974E-04
+ 0.00000000E+00-2.12476284E-05 3.55546692E-20-2.38044252E-01 0.00000000E+00
+-1.52387700E-02 7.47908089E-17 0.00000000E+00 1.33332525E-08 0.00000000E+00
+ 4.10887169E-14-1.18564148E-03 1.45765685E-08-7.92514849E-08-6.59124682E-13
+ 4.50437997E-04 0.00000000E+00 1.80181383E-03 0.00000000E+00 5.18836571E-05
+-6.00996193E-20 2.09019870E-04-1.98396506E-19 4.23253149E-01 0.00000000E+00
+ 1.70753344E+00 0.00000000E+00 3.04856147E-02-1.39606146E-16 1.21943547E-01
+-4.79969868E-16 0.00000000E+00-6.04469862E-10 0.00000000E+00-7.38034003E-15
+ 6.75962579E-05-5.76205544E-10-3.95319535E-08-2.38410603E-13 4.50435069E-04
+ 0.00000000E+00-2.47843856E-04 0.00000000E+00 5.18838302E-05-4.96031128E-21
+-3.16754922E-05 4.48487683E-20 4.24250527E-01 0.00000000E+00-1.94477177E-01
+ 0.00000000E+00 3.04855228E-02-1.10406303E-16-1.52476889E-02 3.65983727E-17
+-4.01296596E-05-8.00484630E-10 3.97271943E-08-4.05139921E-13 0.00000000E+00
+-6.01925375E-10 0.00000000E+00 1.09231881E-14-2.12476284E-05-3.55546692E-20
+-2.02639974E-04 0.00000000E+00-2.12476284E-05-3.55546692E-20-2.02639974E-04
+ 0.00000000E+00 1.18564148E-03 1.45765685E-08 7.92514849E-08-6.59124682E-13
+ 0.00000000E+00 1.33332525E-08 0.00000000E+00 4.10887169E-14 5.18836571E-05
+ 6.00996193E-20 2.09019870E-04 1.98396506E-19 4.50437997E-04 0.00000000E+00
+ 1.80181383E-03 0.00000000E+00 5.18836571E-05 6.00996193E-20 2.09019870E-04
+ 1.98396506E-19 4.50437997E-04 0.00000000E+00 1.80181383E-03 0.00000000E+00
+-6.75962579E-05-5.76205544E-10 3.95319535E-08-2.38410603E-13 0.00000000E+00
+-6.04469862E-10 0.00000000E+00-7.38034003E-15 5.18838302E-05 4.96031128E-21
+-3.16754922E-05-4.48487683E-20 4.50435069E-04 0.00000000E+00-2.47843856E-04
+ 0.00000000E+00 5.18838302E-05 4.96031128E-21-3.16754922E-05-4.48487683E-20
+ 4.50435069E-04 0.00000000E+00-2.47843856E-04 0.00000000E+00 0.00000000E+00
+-6.01925375E-10 0.00000000E+00 1.09231881E-14 4.01296596E-05-8.00484630E-10
+-3.97271943E-08-4.05139921E-13-2.02639974E-04 0.00000000E+00-2.12476284E-05
+ 3.55546692E-20-2.02639974E-04 0.00000000E+00-2.12476284E-05 3.55546692E-20
+ 0.00000000E+00 1.33332525E-08 0.00000000E+00 4.10887169E-14-1.18564148E-03
+ 1.45765685E-08-7.92514849E-08-6.59124682E-13 4.50437997E-04 0.00000000E+00
+ 1.80181383E-03 0.00000000E+00 5.18836571E-05-6.00996193E-20 2.09019870E-04
+-1.98396506E-19 4.50437997E-04 0.00000000E+00 1.80181383E-03 0.00000000E+00
+ 5.18836571E-05-6.00996193E-20 2.09019870E-04-1.98396506E-19 0.00000000E+00
+-6.04469862E-10 0.00000000E+00-7.38034003E-15 6.75962579E-05-5.76205544E-10
+-3.95319535E-08-2.38410603E-13 4.50435069E-04 0.00000000E+00-2.47843856E-04
+ 0.00000000E+00 5.18838302E-05-4.96031128E-21-3.16754922E-05 4.48487683E-20
+ 4.50435069E-04 0.00000000E+00-2.47843856E-04 0.00000000E+00 5.18838302E-05
+-4.96031128E-21-3.16754922E-05 4.48487683E-20 2.69121152E-06 1.11589027E-20
+ 1.61105167E-08 6.73945958E-23-3.62254380E-04 0.00000000E+00-2.15252822E-06
+ 0.00000000E+00-3.97271943E-08 4.05139921E-13 0.00000000E+00-1.09231881E-14
+-3.97271943E-08 4.05139921E-13 0.00000000E+00-1.09231881E-14 9.80058599E-08
+ 3.07675707E-21-4.22516598E-08-1.66457424E-22-6.94632345E-05 0.00000000E+00
+ 5.19686000E-06 0.00000000E+00 5.12248152E-06 7.31822643E-11-7.92514849E-08
+ 6.59124682E-13 0.00000000E+00 6.27741751E-11 0.00000000E+00-4.10887169E-14
+ 5.12248152E-06 7.31822643E-11-7.92514849E-08 6.59124682E-13 0.00000000E+00
+ 6.27741751E-11 0.00000000E+00-4.10887169E-14-2.59326559E-06-8.75083466E-21
+ 1.55653273E-08 5.32998166E-23 2.92236183E-04 0.00000000E+00-1.76350734E-06
+ 0.00000000E+00-6.07356017E-06-6.53761040E-11-3.95319535E-08 2.38410603E-13
+ 0.00000000E+00-6.30517225E-11 0.00000000E+00 7.38034003E-15-6.07356017E-06
+-6.53761040E-11-3.95319535E-08 2.38410603E-13 0.00000000E+00-6.30517225E-11
+ 0.00000000E+00 7.38034003E-15-4.29934992E-04-1.79579035E-18-2.68493262E-06
+-1.13072021E-20 5.74549672E-02 0.00000000E+00 3.56150735E-04 0.00000000E+00
+ 5.69563318E-05 6.28123444E-10 0.00000000E+00 6.06571712E-10 5.69563318E-05
+ 6.28123444E-10 0.00000000E+00 6.06571712E-10-2.44378230E-03-9.86575575E-18
+ 9.80058599E-08 3.07675707E-21 2.99487918E-01 0.00000000E+00-6.94632345E-05
+ 0.00000000E+00-9.98426591E-04-1.39711211E-08-1.18564148E-03-1.45765685E-08
+ 0.00000000E+00-1.20896304E-08 0.00000000E+00-1.33332525E-08-9.98426591E-04
+-1.39711211E-08-1.18564148E-03-1.45765685E-08 0.00000000E+00-1.20896304E-08
+ 0.00000000E+00-1.33332525E-08-4.15388238E-04-1.42338342E-18 2.60096239E-06
+ 9.04409808E-21 4.70686692E-02 0.00000000E+00-2.96310163E-04 0.00000000E+00
+-1.15712002E-03-1.26673472E-08 5.08524956E-05 6.77085146E-10 0.00000000E+00
+-1.21387422E-08 0.00000000E+00 6.07746368E-10-1.15712002E-03-1.26673472E-08
+ 5.08524956E-05 6.77085146E-10 0.00000000E+00-1.21387422E-08 0.00000000E+00
+ 6.07746368E-10-3.62254380E-04 0.00000000E+00-2.15252822E-06 0.00000000E+00
+ 2.69121152E-06-1.11589027E-20 1.61105167E-08-6.73945958E-23 0.00000000E+00
+-1.09231881E-14 3.97271943E-08 4.05139921E-13 0.00000000E+00-1.09231881E-14
+ 3.97271943E-08 4.05139921E-13-6.94632345E-05 0.00000000E+00 5.19686000E-06
+ 0.00000000E+00 9.80058599E-08-3.07675707E-21-4.22516598E-08 1.66457424E-22
+ 0.00000000E+00 6.27741751E-11 0.00000000E+00-4.10887169E-14-5.12248152E-06
+ 7.31822643E-11 7.92514849E-08 6.59124682E-13 0.00000000E+00 6.27741751E-11
+ 0.00000000E+00-4.10887169E-14-5.12248152E-06 7.31822643E-11 7.92514849E-08
+ 6.59124682E-13 2.92236183E-04 0.00000000E+00-1.76350734E-06 0.00000000E+00
+-2.59326559E-06 8.75083466E-21 1.55653273E-08-5.32998166E-23 0.00000000E+00
+-6.30517225E-11 0.00000000E+00 7.38034003E-15 6.07356017E-06-6.53761040E-11
+ 3.95319535E-08 2.38410603E-13 0.00000000E+00-6.30517225E-11 0.00000000E+00
+ 7.38034003E-15 6.07356017E-06-6.53761040E-11 3.95319535E-08 2.38410603E-13
+ 0.00000000E+00 1.21387422E-08 0.00000000E+00 6.30517225E-11-1.15712002E-03
+ 1.26673472E-08-6.07356017E-06 6.53761040E-11 4.50435069E-04 0.00000000E+00
+ 5.18838302E-05-4.96031128E-21 4.50435069E-04 0.00000000E+00 5.18838302E-05
+-4.96031128E-21 0.00000000E+00 1.21279096E-08 0.00000000E+00-6.30222011E-11
+-1.21191772E-03 1.23372684E-08 6.23168798E-06-6.44224616E-11 3.96544202E-03
+ 0.00000000E+00 5.40940354E-04 0.00000000E+00 5.05620373E-04-5.32131861E-19
+ 7.48181387E-05-1.74434762E-19 3.96544202E-03 0.00000000E+00 5.40940354E-04
+ 0.00000000E+00 5.05620373E-04-5.32131861E-19 7.48181387E-05-1.74434762E-19
+ 1.15712002E-03 1.26673472E-08 6.07356017E-06 6.53761040E-11 0.00000000E+00
+ 1.21387422E-08 0.00000000E+00 6.30517225E-11 5.18838302E-05 4.96031128E-21
+ 4.50435069E-04 0.00000000E+00 5.18838302E-05 4.96031128E-21 4.50435069E-04
+ 0.00000000E+00 1.21191772E-03 1.23372684E-08-6.23168798E-06-6.44224616E-11
+ 0.00000000E+00 1.21279096E-08 0.00000000E+00-6.30222011E-11 5.05620373E-04
+ 5.32131861E-19 7.48181387E-05 1.74434762E-19 3.96544202E-03 0.00000000E+00
+ 5.40940354E-04 0.00000000E+00 5.05620373E-04 5.32131861E-19 7.48181387E-05
+ 1.74434762E-19 3.96544202E-03 0.00000000E+00 5.40940354E-04 0.00000000E+00
+ 0.00000000E+00 1.21387422E-08 0.00000000E+00 6.30517225E-11-1.15712002E-03
+ 1.26673472E-08-6.07356017E-06 6.53761040E-11 4.50435069E-04 0.00000000E+00
+ 5.18838302E-05-4.96031128E-21 4.24250527E-01 0.00000000E+00 3.04855228E-02
+-1.10406303E-16 0.00000000E+00 1.21279096E-08 0.00000000E+00-6.30222011E-11
+-1.21191772E-03 1.23372684E-08 6.23168798E-06-6.44224616E-11 3.96544202E-03
+ 0.00000000E+00 5.40940354E-04 0.00000000E+00 5.05620373E-04-5.32131861E-19
+ 7.48181387E-05-1.74434762E-19 3.10426787E+00 0.00000000E+00 3.53658182E-01
+ 0.00000000E+00 2.43962000E-01-5.24770833E-16 3.05052329E-02-3.59871873E-17
+ 1.36973968E-03 1.17315123E-08 7.17751334E-06 6.07640482E-11 0.00000000E+00
+ 1.19752841E-08 0.00000000E+00 6.21268488E-11 7.48185997E-05 2.80812926E-19
+ 5.40936972E-04 0.00000000E+00 3.05051474E-02 5.49754151E-17 3.54135028E-01
+ 0.00000000E+00 1.42416081E-03 1.15929694E-08-7.33455437E-06-6.03674136E-11
+ 0.00000000E+00 1.19143481E-08 0.00000000E+00-6.19489137E-11 7.05702772E-04
+ 2.60561055E-18 1.01903190E-04 3.01009373E-19 4.69035571E-03 0.00000000E+00
+ 6.31669660E-04 0.00000000E+00 2.44133215E-01 5.88104593E-16 3.05284070E-02
+ 8.77936662E-17 2.62673415E+00 0.00000000E+00 3.03662001E-01 0.00000000E+00
+ 4.70686692E-02 0.00000000E+00 2.92236183E-04 0.00000000E+00-4.15388238E-04
+ 1.42338342E-18-2.59326559E-06 8.75083466E-21 0.00000000E+00 6.04469862E-10
+-6.75962579E-05 5.76205544E-10 0.00000000E+00 6.04469862E-10-6.75962579E-05
+ 5.76205544E-10 2.49829652E-01 0.00000000E+00-4.80268846E-05 0.00000000E+00
+-2.35133601E-03 7.06606508E-18 1.17447073E-07-1.80710822E-21 0.00000000E+00
+-1.21279096E-08 0.00000000E+00-1.32753821E-08 1.21191772E-03-1.23372684E-08
+ 1.42003874E-03-1.31710549E-08 0.00000000E+00-1.21279096E-08 0.00000000E+00
+-1.32753821E-08 1.21191772E-03-1.23372684E-08 1.42003874E-03-1.31710549E-08
+ 3.99024901E-02 0.00000000E+00-2.50926479E-04 0.00000000E+00-3.97940900E-04
+ 1.13270771E-18 2.49257327E-06-7.10148688E-21 0.00000000E+00-1.19752841E-08
+ 0.00000000E+00 6.06772804E-10 1.36973968E-03-1.17315123E-08-6.15305081E-05
+ 6.04620057E-10 0.00000000E+00-1.19752841E-08 0.00000000E+00 6.06772804E-10
+ 1.36973968E-03-1.17315123E-08-6.15305081E-05 6.04620057E-10-5.08524956E-05
+-6.77085146E-10 3.95319535E-08-2.38410603E-13 0.00000000E+00-6.07746368E-10
+ 0.00000000E+00-7.38034003E-15-3.16754922E-05-4.48487683E-20-2.47843856E-04
+ 0.00000000E+00-1.52476889E-02-3.65983727E-17-1.94477177E-01 0.00000000E+00
+ 1.42003874E-03 1.31710549E-08 7.88394604E-08-2.74806254E-13 0.00000000E+00
+ 1.32753821E-08 0.00000000E+00-9.58296347E-14 7.48181387E-05 1.74434762E-19
+ 3.00755851E-04 8.58263839E-19 5.40940354E-04 0.00000000E+00 2.16383601E-03
+ 0.00000000E+00 3.05052329E-02 3.59871873E-17 1.22022028E-01 2.21230207E-16
+ 3.53658182E-01 0.00000000E+00 1.42277135E+00 0.00000000E+00-7.81592117E-05
+-5.62348143E-10 3.92602581E-08-9.91586589E-14 0.00000000E+00-5.88113106E-10
+ 0.00000000E+00-4.44837599E-14 7.48185997E-05 2.80812926E-19-4.41804474E-05
+-1.45455575E-19 5.40936972E-04 0.00000000E+00-2.93151658E-04 0.00000000E+00
+ 3.05051474E-02 5.49754151E-17-1.52583886E-02-3.56922703E-17 3.54135028E-01
+ 0.00000000E+00-1.64449257E-01 0.00000000E+00 0.00000000E+00-6.07746368E-10
+ 0.00000000E+00-7.38034003E-15 5.08524956E-05-6.77085146E-10-3.95319535E-08
+-2.38410603E-13-2.47843856E-04 0.00000000E+00-3.16754922E-05 4.48487683E-20
+-1.94477177E-01 0.00000000E+00-1.52476889E-02 3.65983727E-17 0.00000000E+00
+ 1.32753821E-08 0.00000000E+00-9.58296347E-14-1.42003874E-03 1.31710549E-08
+-7.88394604E-08-2.74806254E-13 5.40940354E-04 0.00000000E+00 2.16383601E-03
+ 0.00000000E+00 7.48181387E-05-1.74434762E-19 3.00755851E-04-8.58263839E-19
+ 3.53658182E-01 0.00000000E+00 1.42277135E+00 0.00000000E+00 3.05052329E-02
+-3.59871873E-17 1.22022028E-01-2.21230207E-16 0.00000000E+00-5.88113106E-10
+ 0.00000000E+00-4.44837599E-14 7.81592117E-05-5.62348143E-10-3.92602581E-08
+-9.91586589E-14 5.40936972E-04 0.00000000E+00-2.93151658E-04 0.00000000E+00
+ 7.48185997E-05-2.80812926E-19-4.41804474E-05 1.45455575E-19 3.54135028E-01
+ 0.00000000E+00-1.64449257E-01 0.00000000E+00 3.05051474E-02-5.49754151E-17
+-1.52583886E-02 3.56922703E-17-5.08524956E-05-6.77085146E-10 3.95319535E-08
+-2.38410603E-13 0.00000000E+00-6.07746368E-10 0.00000000E+00-7.38034003E-15
+-3.16754922E-05-4.48487683E-20-2.47843856E-04 0.00000000E+00-3.16754922E-05
+-4.48487683E-20-2.47843856E-04 0.00000000E+00 1.42003874E-03 1.31710549E-08
+ 7.88394604E-08-2.74806254E-13 0.00000000E+00 1.32753821E-08 0.00000000E+00
+-9.58296347E-14 7.48181387E-05 1.74434762E-19 3.00755851E-04 8.58263839E-19
+ 5.40940354E-04 0.00000000E+00 2.16383601E-03 0.00000000E+00 7.48181387E-05
+ 1.74434762E-19 3.00755851E-04 8.58263839E-19 5.40940354E-04 0.00000000E+00
+ 2.16383601E-03 0.00000000E+00-7.81592117E-05-5.62348143E-10 3.92602581E-08
+-9.91586589E-14 0.00000000E+00-5.88113106E-10 0.00000000E+00-4.44837599E-14
+ 7.48185997E-05 2.80812926E-19-4.41804474E-05-1.45455575E-19 5.40936972E-04
+ 0.00000000E+00-2.93151658E-04 0.00000000E+00 7.48185997E-05 2.80812926E-19
+-4.41804474E-05-1.45455575E-19 5.40936972E-04 0.00000000E+00-2.93151658E-04
+ 0.00000000E+00 0.00000000E+00-6.07746368E-10 0.00000000E+00-7.38034003E-15
+ 5.08524956E-05-6.77085146E-10-3.95319535E-08-2.38410603E-13-2.47843856E-04
+ 0.00000000E+00-3.16754922E-05 4.48487683E-20-2.47843856E-04 0.00000000E+00
+-3.16754922E-05 4.48487683E-20 0.00000000E+00 1.32753821E-08 0.00000000E+00
+-9.58296347E-14-1.42003874E-03 1.31710549E-08-7.88394604E-08-2.74806254E-13
+ 5.40940354E-04 0.00000000E+00 2.16383601E-03 0.00000000E+00 7.48181387E-05
+-1.74434762E-19 3.00755851E-04-8.58263839E-19 5.40940354E-04 0.00000000E+00
+ 2.16383601E-03 0.00000000E+00 7.48181387E-05-1.74434762E-19 3.00755851E-04
+-8.58263839E-19 0.00000000E+00-5.88113106E-10 0.00000000E+00-4.44837599E-14
+ 7.81592117E-05-5.62348143E-10-3.92602581E-08-9.91586589E-14 5.40936972E-04
+ 0.00000000E+00-2.93151658E-04 0.00000000E+00 7.48185997E-05-2.80812926E-19
+-4.41804474E-05 1.45455575E-19 5.40936972E-04 0.00000000E+00-2.93151658E-04
+ 0.00000000E+00 7.48185997E-05-2.80812926E-19-4.41804474E-05 1.45455575E-19
+ 2.60096239E-06 9.04409808E-21 1.55653273E-08 5.32998166E-23-2.96310163E-04
+ 0.00000000E+00-1.76350734E-06 0.00000000E+00-3.95319535E-08 2.38410603E-13
+ 0.00000000E+00 7.38034003E-15-3.95319535E-08 2.38410603E-13 0.00000000E+00
+ 7.38034003E-15 1.17447073E-07 1.80710822E-21-4.06527608E-08-1.24505897E-22
+-4.80268846E-05 0.00000000E+00 4.33066000E-06 0.00000000E+00 6.23168798E-06
+ 6.44224616E-11-7.88394604E-08 2.74806254E-13 0.00000000E+00 6.30222011E-11
+ 0.00000000E+00 9.58296347E-14 6.23168798E-06 6.44224616E-11-7.88394604E-08
+ 2.74806254E-13 0.00000000E+00 6.30222011E-11 0.00000000E+00 9.58296347E-14
+-2.48347159E-06-7.06102302E-21 1.49114769E-08 4.24305898E-23 2.48017929E-04
+ 0.00000000E+00-1.49505803E-06 0.00000000E+00-7.17751334E-06-6.07640482E-11
+-3.92602581E-08 9.91586589E-14 0.00000000E+00-6.21268488E-11 0.00000000E+00
+ 4.44837599E-14-7.17751334E-06-6.07640482E-11-3.92602581E-08 9.91586589E-14
+ 0.00000000E+00-6.21268488E-11 0.00000000E+00 4.44837599E-14-4.15388238E-04
+-1.42338342E-18-2.59326559E-06-8.75083466E-21 4.70686692E-02 0.00000000E+00
+ 2.92236183E-04 0.00000000E+00 6.75962579E-05 5.76205544E-10 0.00000000E+00
+ 6.04469862E-10 6.75962579E-05 5.76205544E-10 0.00000000E+00 6.04469862E-10
+-2.35133601E-03-7.06606508E-18 1.17447073E-07 1.80710822E-21 2.49829652E-01
+ 0.00000000E+00-4.80268846E-05 0.00000000E+00-1.21191772E-03-1.23372684E-08
+-1.42003874E-03-1.31710549E-08 0.00000000E+00-1.21279096E-08 0.00000000E+00
+-1.32753821E-08-1.21191772E-03-1.23372684E-08-1.42003874E-03-1.31710549E-08
+ 0.00000000E+00-1.21279096E-08 0.00000000E+00-1.32753821E-08-3.97940900E-04
+-1.13270771E-18 2.49257327E-06 7.10148688E-21 3.99024901E-02 0.00000000E+00
+-2.50926479E-04 0.00000000E+00-1.36973968E-03-1.17315123E-08 6.15305081E-05
+ 6.04620057E-10 0.00000000E+00-1.19752841E-08 0.00000000E+00 6.06772804E-10
+-1.36973968E-03-1.17315123E-08 6.15305081E-05 6.04620057E-10 0.00000000E+00
+-1.19752841E-08 0.00000000E+00 6.06772804E-10-2.96310163E-04 0.00000000E+00
+-1.76350734E-06 0.00000000E+00 2.60096239E-06-9.04409808E-21 1.55653273E-08
+-5.32998166E-23 0.00000000E+00 7.38034003E-15 3.95319535E-08 2.38410603E-13
+ 0.00000000E+00 7.38034003E-15 3.95319535E-08 2.38410603E-13-4.80268846E-05
+ 0.00000000E+00 4.33066000E-06 0.00000000E+00 1.17447073E-07-1.80710822E-21
+-4.06527608E-08 1.24505897E-22 0.00000000E+00 6.30222011E-11 0.00000000E+00
+ 9.58296347E-14-6.23168798E-06 6.44224616E-11 7.88394604E-08 2.74806254E-13
+ 0.00000000E+00 6.30222011E-11 0.00000000E+00 9.58296347E-14-6.23168798E-06
+ 6.44224616E-11 7.88394604E-08 2.74806254E-13 2.48017929E-04 0.00000000E+00
+-1.49505803E-06 0.00000000E+00-2.48347159E-06 7.06102302E-21 1.49114769E-08
+-4.24305898E-23 0.00000000E+00-6.21268488E-11 0.00000000E+00 4.44837599E-14
+ 7.17751334E-06-6.07640482E-11 3.92602581E-08 9.91586589E-14 0.00000000E+00
+-6.21268488E-11 0.00000000E+00 4.44837599E-14 7.17751334E-06-6.07640482E-11
+ 3.92602581E-08 9.91586589E-14 0.00000000E+00 1.19752841E-08 0.00000000E+00
+ 6.21268488E-11-1.36973968E-03 1.17315123E-08-7.17751334E-06 6.07640482E-11
+ 5.40936972E-04 0.00000000E+00 7.48185997E-05-2.80812926E-19 5.40936972E-04
+ 0.00000000E+00 7.48185997E-05-2.80812926E-19 0.00000000E+00 1.19143481E-08
+ 0.00000000E+00-6.19489137E-11-1.42416081E-03 1.15929694E-08 7.33455437E-06
+-6.03674136E-11 4.69035571E-03 0.00000000E+00 6.31669660E-04 0.00000000E+00
+ 7.05702772E-04-2.60561055E-18 1.01903190E-04-3.01009373E-19 4.69035571E-03
+ 0.00000000E+00 6.31669660E-04 0.00000000E+00 7.05702772E-04-2.60561055E-18
+ 1.01903190E-04-3.01009373E-19 1.36973968E-03 1.17315123E-08 7.17751334E-06
+ 6.07640482E-11 0.00000000E+00 1.19752841E-08 0.00000000E+00 6.21268488E-11
+ 7.48185997E-05 2.80812926E-19 5.40936972E-04 0.00000000E+00 7.48185997E-05
+ 2.80812926E-19 5.40936972E-04 0.00000000E+00 1.42416081E-03 1.15929694E-08
+-7.33455437E-06-6.03674136E-11 0.00000000E+00 1.19143481E-08 0.00000000E+00
+-6.19489137E-11 7.05702772E-04 2.60561055E-18 1.01903190E-04 3.01009373E-19
+ 4.69035571E-03 0.00000000E+00 6.31669660E-04 0.00000000E+00 7.05702772E-04
+ 2.60561055E-18 1.01903190E-04 3.01009373E-19 4.69035571E-03 0.00000000E+00
+ 6.31669660E-04 0.00000000E+00 0.00000000E+00 1.19752841E-08 0.00000000E+00
+ 6.21268488E-11-1.36973968E-03 1.17315123E-08-7.17751334E-06 6.07640482E-11
+ 5.40936972E-04 0.00000000E+00 7.48185997E-05-2.80812926E-19 3.54135028E-01
+ 0.00000000E+00 3.05051474E-02-5.49754151E-17 0.00000000E+00 1.19143481E-08
+ 0.00000000E+00-6.19489137E-11-1.42416081E-03 1.15929694E-08 7.33455437E-06
+-6.03674136E-11 4.69035571E-03 0.00000000E+00 6.31669660E-04 0.00000000E+00
+ 7.05702772E-04-2.60561055E-18 1.01903190E-04-3.01009373E-19 2.62673415E+00
+ 0.00000000E+00 3.03662001E-01 0.00000000E+00 2.44133215E-01-5.88104593E-16
+ 3.05284070E-02-8.77936662E-17 1.58073074E-03 1.12553575E-08 8.27292217E-06
+ 5.83448714E-11 0.00000000E+00 1.18055170E-08 0.00000000E+00 6.12924984E-11
+ 1.01903238E-04 1.60600024E-19 6.31666092E-04 0.00000000E+00 3.05283107E-02
+ 7.86553336E-17 3.03917772E-01 0.00000000E+00 1.63475148E-03 1.11597344E-08
+-8.42880689E-06-5.80689374E-11 0.00000000E+00 1.17853813E-08 0.00000000E+00
+-6.12347958E-11 9.38944655E-04 1.55085154E-18 1.33128469E-04 3.07918278E-19
+ 5.41723804E-03 0.00000000E+00 7.22663767E-04 0.00000000E+00 2.44332697E-01
+ 7.09322568E-16 3.05551204E-02 1.02729575E-16 2.27696373E+00 0.00000000E+00
+ 2.66047137E-01 0.00000000E+00 3.99024901E-02 0.00000000E+00 2.48017929E-04
+ 0.00000000E+00-3.97940900E-04 1.13270771E-18-2.48347159E-06 7.06102302E-21
+ 0.00000000E+00 5.88113106E-10-7.81592117E-05 5.62348143E-10 0.00000000E+00
+ 5.88113106E-10-7.81592117E-05 5.62348143E-10 2.14523457E-01 0.00000000E+00
+-3.51509107E-05 0.00000000E+00-2.24197947E-03 6.52629251E-18 1.37473932E-07
+ 4.44225708E-22 0.00000000E+00-1.19143481E-08 0.00000000E+00-1.30312694E-08
+ 1.42416081E-03-1.15929694E-08 1.65282657E-03-1.25530732E-08 0.00000000E+00
+-1.19143481E-08 0.00000000E+00-1.30312694E-08 1.42416081E-03-1.15929694E-08
+ 1.65282657E-03-1.25530732E-08 3.46641500E-02 0.00000000E+00-2.17811692E-04
+ 0.00000000E+00-3.77532956E-04 1.22100633E-18 2.36567456E-06-7.54053726E-21
+ 0.00000000E+00-1.18055170E-08 0.00000000E+00 5.92978458E-10 1.58073074E-03
+-1.12553575E-08-7.21321246E-05 5.75239178E-10 0.00000000E+00-1.18055170E-08
+ 0.00000000E+00 5.92978458E-10 1.58073074E-03-1.12553575E-08-7.21321246E-05
+ 5.75239178E-10-6.15305081E-05-6.04620057E-10 3.92602581E-08-9.91586589E-14
+ 0.00000000E+00-6.06772804E-10 0.00000000E+00-4.44837599E-14-4.41804474E-05
+-1.45455575E-19-2.93151658E-04 0.00000000E+00-1.52583886E-02-3.56922703E-17
+-1.64449257E-01 0.00000000E+00 1.65282657E-03 1.25530732E-08 7.81608896E-08
+-1.69681079E-13 0.00000000E+00 1.30312694E-08 0.00000000E+00-5.04169718E-14
+ 1.01903190E-04 3.01009373E-19 4.09091801E-04 9.67035929E-19 6.31669660E-04
+ 0.00000000E+00 2.52676630E-03 0.00000000E+00 3.05284070E-02 8.77936662E-17
+ 1.22114703E-01 3.29349503E-16 3.03662001E-01 0.00000000E+00 1.21966020E+00
+ 0.00000000E+00-8.86384800E-05-5.46020983E-10 3.89711804E-08-6.89835202E-14
+ 0.00000000E+00-5.86833604E-10 0.00000000E+00-1.44256412E-14 1.01903238E-04
+ 1.60600024E-19-5.87579268E-05-1.17129576E-19 6.31666092E-04 0.00000000E+00
+-3.38582465E-04 0.00000000E+00 3.05283107E-02 7.86553336E-17-1.52708578E-02
+-4.53462273E-17 3.03917772E-01 0.00000000E+00-1.42491227E-01 0.00000000E+00
+ 0.00000000E+00-6.06772804E-10 0.00000000E+00-4.44837599E-14 6.15305081E-05
+-6.04620057E-10-3.92602581E-08-9.91586589E-14-2.93151658E-04 0.00000000E+00
+-4.41804474E-05 1.45455575E-19-1.64449257E-01 0.00000000E+00-1.52583886E-02
+ 3.56922703E-17 0.00000000E+00 1.30312694E-08 0.00000000E+00-5.04169718E-14
+-1.65282657E-03 1.25530732E-08-7.81608896E-08-1.69681079E-13 6.31669660E-04
+ 0.00000000E+00 2.52676630E-03 0.00000000E+00 1.01903190E-04-3.01009373E-19
+ 4.09091801E-04-9.67035929E-19 3.03662001E-01 0.00000000E+00 1.21966020E+00
+ 0.00000000E+00 3.05284070E-02-8.77936662E-17 1.22114703E-01-3.29349503E-16
+ 0.00000000E+00-5.86833604E-10 0.00000000E+00-1.44256412E-14 8.86384800E-05
+-5.46020983E-10-3.89711804E-08-6.89835202E-14 6.31666092E-04 0.00000000E+00
+-3.38582465E-04 0.00000000E+00 1.01903238E-04-1.60600024E-19-5.87579268E-05
+ 1.17129576E-19 3.03917772E-01 0.00000000E+00-1.42491227E-01 0.00000000E+00
+ 3.05283107E-02-7.86553336E-17-1.52708578E-02 4.53462273E-17-6.15305081E-05
+-6.04620057E-10 3.92602581E-08-9.91586589E-14 0.00000000E+00-6.06772804E-10
+ 0.00000000E+00-4.44837599E-14-4.41804474E-05-1.45455575E-19-2.93151658E-04
+ 0.00000000E+00-4.41804474E-05-1.45455575E-19-2.93151658E-04 0.00000000E+00
+ 1.65282657E-03 1.25530732E-08 7.81608896E-08-1.69681079E-13 0.00000000E+00
+ 1.30312694E-08 0.00000000E+00-5.04169718E-14 1.01903190E-04 3.01009373E-19
+ 4.09091801E-04 9.67035929E-19 6.31669660E-04 0.00000000E+00 2.52676630E-03
+ 0.00000000E+00 1.01903190E-04 3.01009373E-19 4.09091801E-04 9.67035929E-19
+ 6.31669660E-04 0.00000000E+00 2.52676630E-03 0.00000000E+00-8.86384800E-05
+-5.46020983E-10 3.89711804E-08-6.89835202E-14 0.00000000E+00-5.86833604E-10
+ 0.00000000E+00-1.44256412E-14 1.01903238E-04 1.60600024E-19-5.87579268E-05
+-1.17129576E-19 6.31666092E-04 0.00000000E+00-3.38582465E-04 0.00000000E+00
+ 1.01903238E-04 1.60600024E-19-5.87579268E-05-1.17129576E-19 6.31666092E-04
+ 0.00000000E+00-3.38582465E-04 0.00000000E+00 0.00000000E+00-6.06772804E-10
+ 0.00000000E+00-4.44837599E-14 6.15305081E-05-6.04620057E-10-3.92602581E-08
+-9.91586589E-14-2.93151658E-04 0.00000000E+00-4.41804474E-05 1.45455575E-19
+-2.93151658E-04 0.00000000E+00-4.41804474E-05 1.45455575E-19 0.00000000E+00
+ 1.30312694E-08 0.00000000E+00-5.04169718E-14-1.65282657E-03 1.25530732E-08
+-7.81608896E-08-1.69681079E-13 6.31669660E-04 0.00000000E+00 2.52676630E-03
+ 0.00000000E+00 1.01903190E-04-3.01009373E-19 4.09091801E-04-9.67035929E-19
+ 6.31669660E-04 0.00000000E+00 2.52676630E-03 0.00000000E+00 1.01903190E-04
+-3.01009373E-19 4.09091801E-04-9.67035929E-19 0.00000000E+00-5.86833604E-10
+ 0.00000000E+00-1.44256412E-14 8.86384800E-05-5.46020983E-10-3.89711804E-08
+-6.89835202E-14 6.31666092E-04 0.00000000E+00-3.38582465E-04 0.00000000E+00
+ 1.01903238E-04-1.60600024E-19-5.87579268E-05 1.17129576E-19 6.31666092E-04
+ 0.00000000E+00-3.38582465E-04 0.00000000E+00 1.01903238E-04-1.60600024E-19
+-5.87579268E-05 1.17129576E-19 2.49257327E-06 7.10148688E-21 1.49114769E-08
+ 4.24305898E-23-2.50926479E-04 0.00000000E+00-1.49505803E-06 0.00000000E+00
+-3.92602581E-08 9.91586589E-14 0.00000000E+00 4.44837599E-14-3.92602581E-08
+ 9.91586589E-14 0.00000000E+00 4.44837599E-14 1.37473932E-07-4.44225708E-22
+-3.87612569E-08-1.14812891E-22-3.51509107E-05 0.00000000E+00 3.71631743E-06
+ 0.00000000E+00 7.33455437E-06 6.03674136E-11-7.81608896E-08 1.69681079E-13
+ 0.00000000E+00 6.19489137E-11 0.00000000E+00 5.04169718E-14 7.33455437E-06
+ 6.03674136E-11-7.81608896E-08 1.69681079E-13 0.00000000E+00 6.19489137E-11
+ 0.00000000E+00 5.04169718E-14-2.35516542E-06-7.72232491E-21 1.41466737E-08
+ 4.57026718E-23 2.15633673E-04 0.00000000E+00-1.29880983E-06 0.00000000E+00
+-8.27292217E-06-5.83448714E-11-3.89711804E-08 6.89835202E-14 0.00000000E+00
+-6.12924984E-11 0.00000000E+00 1.44256412E-14-8.27292217E-06-5.83448714E-11
+-3.89711804E-08 6.89835202E-14 0.00000000E+00-6.12924984E-11 0.00000000E+00
+ 1.44256412E-14-3.97940900E-04-1.13270771E-18-2.48347159E-06-7.06102302E-21
+ 3.99024901E-02 0.00000000E+00 2.48017929E-04 0.00000000E+00 7.81592117E-05
+ 5.62348143E-10 0.00000000E+00 5.88113106E-10 7.81592117E-05 5.62348143E-10
+ 0.00000000E+00 5.88113106E-10-2.24197947E-03-6.52629251E-18 1.37473932E-07
+-4.44225708E-22 2.14523457E-01 0.00000000E+00-3.51509107E-05 0.00000000E+00
+-1.42416081E-03-1.15929694E-08-1.65282657E-03-1.25530732E-08 0.00000000E+00
+-1.19143481E-08 0.00000000E+00-1.30312694E-08-1.42416081E-03-1.15929694E-08
+-1.65282657E-03-1.25530732E-08 0.00000000E+00-1.19143481E-08 0.00000000E+00
+-1.30312694E-08-3.77532956E-04-1.22100633E-18 2.36567456E-06 7.54053726E-21
+ 3.46641500E-02 0.00000000E+00-2.17811692E-04 0.00000000E+00-1.58073074E-03
+-1.12553575E-08 7.21321246E-05 5.75239178E-10 0.00000000E+00-1.18055170E-08
+ 0.00000000E+00 5.92978458E-10-1.58073074E-03-1.12553575E-08 7.21321246E-05
+ 5.75239178E-10 0.00000000E+00-1.18055170E-08 0.00000000E+00 5.92978458E-10
+-2.50926479E-04 0.00000000E+00-1.49505803E-06 0.00000000E+00 2.49257327E-06
+-7.10148688E-21 1.49114769E-08-4.24305898E-23 0.00000000E+00 4.44837599E-14
+ 3.92602581E-08 9.91586589E-14 0.00000000E+00 4.44837599E-14 3.92602581E-08
+ 9.91586589E-14-3.51509107E-05 0.00000000E+00 3.71631743E-06 0.00000000E+00
+ 1.37473932E-07 4.44225708E-22-3.87612569E-08 1.14812891E-22 0.00000000E+00
+ 6.19489137E-11 0.00000000E+00 5.04169718E-14-7.33455437E-06 6.03674136E-11
+ 7.81608896E-08 1.69681079E-13 0.00000000E+00 6.19489137E-11 0.00000000E+00
+ 5.04169718E-14-7.33455437E-06 6.03674136E-11 7.81608896E-08 1.69681079E-13
+ 2.15633673E-04 0.00000000E+00-1.29880983E-06 0.00000000E+00-2.35516542E-06
+ 7.72232491E-21 1.41466737E-08-4.57026718E-23 0.00000000E+00-6.12924984E-11
+ 0.00000000E+00 1.44256412E-14 8.27292217E-06-5.83448714E-11 3.89711804E-08
+ 6.89835202E-14 0.00000000E+00-6.12924984E-11 0.00000000E+00 1.44256412E-14
+ 8.27292217E-06-5.83448714E-11 3.89711804E-08 6.89835202E-14 0.00000000E+00
+ 1.18055170E-08 0.00000000E+00 6.12924984E-11-1.58073074E-03 1.12553575E-08
+-8.27292217E-06 5.83448714E-11 6.31666092E-04 0.00000000E+00 1.01903238E-04
+-1.60600024E-19 6.31666092E-04 0.00000000E+00 1.01903238E-04-1.60600024E-19
+ 0.00000000E+00 1.17853813E-08 0.00000000E+00-6.12347958E-11-1.63475148E-03
+ 1.11597344E-08 8.42880689E-06-5.80689374E-11 5.41723804E-03 0.00000000E+00
+ 7.22663767E-04 0.00000000E+00 9.38944655E-04-1.55085154E-18 1.33128469E-04
+-3.07918278E-19 5.41723804E-03 0.00000000E+00 7.22663767E-04 0.00000000E+00
+ 9.38944655E-04-1.55085154E-18 1.33128469E-04-3.07918278E-19 1.58073074E-03
+ 1.12553575E-08 8.27292217E-06 5.83448714E-11 0.00000000E+00 1.18055170E-08
+ 0.00000000E+00 6.12924984E-11 1.01903238E-04 1.60600024E-19 6.31666092E-04
+ 0.00000000E+00 1.01903238E-04 1.60600024E-19 6.31666092E-04 0.00000000E+00
+ 1.63475148E-03 1.11597344E-08-8.42880689E-06-5.80689374E-11 0.00000000E+00
+ 1.17853813E-08 0.00000000E+00-6.12347958E-11 9.38944655E-04 1.55085154E-18
+ 1.33128469E-04 3.07918278E-19 5.41723804E-03 0.00000000E+00 7.22663767E-04
+ 0.00000000E+00 9.38944655E-04 1.55085154E-18 1.33128469E-04 3.07918278E-19
+ 5.41723804E-03 0.00000000E+00 7.22663767E-04 0.00000000E+00 0.00000000E+00
+ 1.18055170E-08 0.00000000E+00 6.12924984E-11-1.58073074E-03 1.12553575E-08
+-8.27292217E-06 5.83448714E-11 6.31666092E-04 0.00000000E+00 1.01903238E-04
+-1.60600024E-19 3.03917772E-01 0.00000000E+00 3.05283107E-02-7.86553336E-17
+ 0.00000000E+00 1.17853813E-08 0.00000000E+00-6.12347958E-11-1.63475148E-03
+ 1.11597344E-08 8.42880689E-06-5.80689374E-11 5.41723804E-03 0.00000000E+00
+ 7.22663767E-04 0.00000000E+00 9.38944655E-04-1.55085154E-18 1.33128469E-04
+-3.07918278E-19 2.27696373E+00 0.00000000E+00 2.66047137E-01 0.00000000E+00
+ 2.44332697E-01-7.09322568E-16 3.05551204E-02-1.02729575E-16 1.79023118E-03
+ 1.09435191E-08 9.36056521E-06 5.67706657E-11 0.00000000E+00 1.17574526E-08
+ 0.00000000E+00 6.10672683E-11 1.33128862E-04 4.51573668E-19 7.22659693E-04
+ 0.00000000E+00 3.05550389E-02 1.12224164E-16 2.66196436E-01 0.00000000E+00
+ 1.84377791E-03 1.08853685E-08-9.51508093E-06-5.66030577E-11 0.00000000E+00
+ 1.17579707E-08 0.00000000E+00-6.10688336E-11 1.20526852E-03 4.16981307E-18
+ 1.68482688E-04 5.18401609E-19 6.14639173E-03 0.00000000E+00 8.13961418E-04
+ 0.00000000E+00 2.44560653E-01 9.26576765E-16 3.05853713E-02 1.13360392E-16
+ 2.00975531E+00 0.00000000E+00 2.36739262E-01 0.00000000E+00 3.46641500E-02
+ 0.00000000E+00 2.15633673E-04 0.00000000E+00-3.77532956E-04 1.22100633E-18
+-2.35516542E-06 7.72232491E-21 0.00000000E+00 5.86833604E-10-8.86384800E-05
+ 5.46020983E-10 0.00000000E+00 5.86833604E-10-8.86384800E-05 5.46020983E-10
+ 1.88152888E-01 0.00000000E+00-2.68106938E-05 0.00000000E+00-2.11570344E-03
+ 8.60624542E-18 1.56907343E-07 4.16414062E-21 0.00000000E+00-1.17853813E-08
+ 0.00000000E+00-1.29416513E-08 1.63475148E-03-1.11597344E-08 1.88390148E-03
+-1.21440386E-08 0.00000000E+00-1.17853813E-08 0.00000000E+00-1.29416513E-08
+ 1.63475148E-03-1.11597344E-08 1.88390148E-03-1.21440386E-08 3.06718801E-02
+ 0.00000000E+00-1.92608101E-04 0.00000000E+00-3.54223893E-04 1.80628666E-18
+ 2.22064604E-06-1.11485358E-20 0.00000000E+00-1.17574526E-08 0.00000000E+00
+ 5.87916297E-10 1.79023118E-03-1.09435191E-08-8.26660030E-05 5.54759589E-10
+ 0.00000000E+00-1.17574526E-08 0.00000000E+00 5.87916297E-10 1.79023118E-03
+-1.09435191E-08-8.26660030E-05 5.54759589E-10-7.21321246E-05-5.75239178E-10
+ 3.89711804E-08-6.89835202E-14 0.00000000E+00-5.92978458E-10 0.00000000E+00
+-1.44256412E-14-5.87579268E-05-1.17129576E-19-3.38582465E-04 0.00000000E+00
+-1.52708578E-02-4.53462273E-17-1.42491227E-01 0.00000000E+00 1.88390148E-03
+ 1.21440386E-08 7.76848215E-08-1.05751896E-13 0.00000000E+00 1.29416513E-08
+ 0.00000000E+00-1.40298709E-14 1.33128469E-04 3.07918278E-19 5.33989307E-04
+ 1.49127065E-18 7.22663767E-04 0.00000000E+00 2.89075565E-03 0.00000000E+00
+ 3.05551204E-02 1.02729575E-16 1.22221577E-01 4.21792881E-16 2.66047137E-01
+ 0.00000000E+00 1.06749187E+00 0.00000000E+00-9.90275086E-05-5.36995041E-10
+ 3.86289303E-08-4.19020202E-14 0.00000000E+00-5.88075960E-10 0.00000000E+00
+ 3.91323208E-16 1.33128862E-04 4.51573668E-19-7.54028875E-05-2.42493819E-19
+ 7.22659693E-04 0.00000000E+00-3.84155278E-04 0.00000000E+00 3.05550389E-02
+ 1.12224164E-16-1.52851025E-02-5.63961389E-17 2.66196436E-01 0.00000000E+00
+-1.25733924E-01 0.00000000E+00 0.00000000E+00-5.92978458E-10 0.00000000E+00
+-1.44256412E-14 7.21321246E-05-5.75239178E-10-3.89711804E-08-6.89835202E-14
+-3.38582465E-04 0.00000000E+00-5.87579268E-05 1.17129576E-19-1.42491227E-01
+ 0.00000000E+00-1.52708578E-02 4.53462273E-17 0.00000000E+00 1.29416513E-08
+ 0.00000000E+00-1.40298709E-14-1.88390148E-03 1.21440386E-08-7.76848215E-08
+-1.05751896E-13 7.22663767E-04 0.00000000E+00 2.89075565E-03 0.00000000E+00
+ 1.33128469E-04-3.07918278E-19 5.33989307E-04-1.49127065E-18 2.66047137E-01
+ 0.00000000E+00 1.06749187E+00 0.00000000E+00 3.05551204E-02-1.02729575E-16
+ 1.22221577E-01-4.21792881E-16 0.00000000E+00-5.88075960E-10 0.00000000E+00
+ 3.91323208E-16 9.90275086E-05-5.36995041E-10-3.86289303E-08-4.19020202E-14
+ 7.22659693E-04 0.00000000E+00-3.84155278E-04 0.00000000E+00 1.33128862E-04
+-4.51573668E-19-7.54028875E-05 2.42493819E-19 2.66196436E-01 0.00000000E+00
+-1.25733924E-01 0.00000000E+00 3.05550389E-02-1.12224164E-16-1.52851025E-02
+ 5.63961389E-17-7.21321246E-05-5.75239178E-10 3.89711804E-08-6.89835202E-14
+ 0.00000000E+00-5.92978458E-10 0.00000000E+00-1.44256412E-14-5.87579268E-05
+-1.17129576E-19-3.38582465E-04 0.00000000E+00-5.87579268E-05-1.17129576E-19
+-3.38582465E-04 0.00000000E+00 1.88390148E-03 1.21440386E-08 7.76848215E-08
+-1.05751896E-13 0.00000000E+00 1.29416513E-08 0.00000000E+00-1.40298709E-14
+ 1.33128469E-04 3.07918278E-19 5.33989307E-04 1.49127065E-18 7.22663767E-04
+ 0.00000000E+00 2.89075565E-03 0.00000000E+00 1.33128469E-04 3.07918278E-19
+ 5.33989307E-04 1.49127065E-18 7.22663767E-04 0.00000000E+00 2.89075565E-03
+ 0.00000000E+00-9.90275086E-05-5.36995041E-10 3.86289303E-08-4.19020202E-14
+ 0.00000000E+00-5.88075960E-10 0.00000000E+00 3.91323208E-16 1.33128862E-04
+ 4.51573668E-19-7.54028875E-05-2.42493819E-19 7.22659693E-04 0.00000000E+00
+-3.84155278E-04 0.00000000E+00 1.33128862E-04 4.51573668E-19-7.54028875E-05
+-2.42493819E-19 7.22659693E-04 0.00000000E+00-3.84155278E-04 0.00000000E+00
+ 0.00000000E+00-5.92978458E-10 0.00000000E+00-1.44256412E-14 7.21321246E-05
+-5.75239178E-10-3.89711804E-08-6.89835202E-14-3.38582465E-04 0.00000000E+00
+-5.87579268E-05 1.17129576E-19-3.38582465E-04 0.00000000E+00-5.87579268E-05
+ 1.17129576E-19 0.00000000E+00 1.29416513E-08 0.00000000E+00-1.40298709E-14
+-1.88390148E-03 1.21440386E-08-7.76848215E-08-1.05751896E-13 7.22663767E-04
+ 0.00000000E+00 2.89075565E-03 0.00000000E+00 1.33128469E-04-3.07918278E-19
+ 5.33989307E-04-1.49127065E-18 7.22663767E-04 0.00000000E+00 2.89075565E-03
+ 0.00000000E+00 1.33128469E-04-3.07918278E-19 5.33989307E-04-1.49127065E-18
+ 0.00000000E+00-5.88075960E-10 0.00000000E+00 3.91323208E-16 9.90275086E-05
+-5.36995041E-10-3.86289303E-08-4.19020202E-14 7.22659693E-04 0.00000000E+00
+-3.84155278E-04 0.00000000E+00 1.33128862E-04-4.51573668E-19-7.54028875E-05
+ 2.42493819E-19 7.22659693E-04 0.00000000E+00-3.84155278E-04 0.00000000E+00
+ 1.33128862E-04-4.51573668E-19-7.54028875E-05 2.42493819E-19 2.36567456E-06
+ 7.54053726E-21 1.41466737E-08 4.57026718E-23-2.17811692E-04 0.00000000E+00
+-1.29880983E-06 0.00000000E+00-3.89711804E-08 6.89835202E-14 0.00000000E+00
+ 1.44256412E-14-3.89711804E-08 6.89835202E-14 0.00000000E+00 1.44256412E-14
+ 1.56907343E-07-4.16414062E-21-3.65770498E-08-1.49831664E-22-2.68106938E-05
+ 0.00000000E+00 3.25815533E-06 0.00000000E+00 8.42880689E-06 5.80689374E-11
+-7.76848215E-08 1.05751896E-13 0.00000000E+00 6.12347958E-11 0.00000000E+00
+ 1.40298709E-14 8.42880689E-06 5.80689374E-11-7.76848215E-08 1.05751896E-13
+ 0.00000000E+00 6.12347958E-11 0.00000000E+00 1.40298709E-14-2.20871653E-06
+-1.14413387E-20 1.32731981E-08 6.77160463E-23 1.90917965E-04 0.00000000E+00
+-1.14923601E-06 0.00000000E+00-9.36056521E-06-5.67706657E-11-3.86289303E-08
+ 4.19020202E-14 0.00000000E+00-6.10672683E-11 0.00000000E+00-3.91323208E-16
+-9.36056521E-06-5.67706657E-11-3.86289303E-08 4.19020202E-14 0.00000000E+00
+-6.10672683E-11 0.00000000E+00-3.91323208E-16-3.77532956E-04-1.22100633E-18
+-2.35516542E-06-7.72232491E-21 3.46641500E-02 0.00000000E+00 2.15633673E-04
+ 0.00000000E+00 8.86384800E-05 5.46020983E-10 0.00000000E+00 5.86833604E-10
+ 8.86384800E-05 5.46020983E-10 0.00000000E+00 5.86833604E-10-2.11570344E-03
+-8.60624542E-18 1.56907343E-07-4.16414062E-21 1.88152888E-01 0.00000000E+00
+-2.68106938E-05 0.00000000E+00-1.63475148E-03-1.11597344E-08-1.88390148E-03
+-1.21440386E-08 0.00000000E+00-1.17853813E-08 0.00000000E+00-1.29416513E-08
+-1.63475148E-03-1.11597344E-08-1.88390148E-03-1.21440386E-08 0.00000000E+00
+-1.17853813E-08 0.00000000E+00-1.29416513E-08-3.54223893E-04-1.80628666E-18
+ 2.22064604E-06 1.11485358E-20 3.06718801E-02 0.00000000E+00-1.92608101E-04
+ 0.00000000E+00-1.79023118E-03-1.09435191E-08 8.26660030E-05 5.54759589E-10
+ 0.00000000E+00-1.17574526E-08 0.00000000E+00 5.87916297E-10-1.79023118E-03
+-1.09435191E-08 8.26660030E-05 5.54759589E-10 0.00000000E+00-1.17574526E-08
+ 0.00000000E+00 5.87916297E-10-2.17811692E-04 0.00000000E+00-1.29880983E-06
+ 0.00000000E+00 2.36567456E-06-7.54053726E-21 1.41466737E-08-4.57026718E-23
+ 0.00000000E+00 1.44256412E-14 3.89711804E-08 6.89835202E-14 0.00000000E+00
+ 1.44256412E-14 3.89711804E-08 6.89835202E-14-2.68106938E-05 0.00000000E+00
+ 3.25815533E-06 0.00000000E+00 1.56907343E-07 4.16414062E-21-3.65770498E-08
+ 1.49831664E-22 0.00000000E+00 6.12347958E-11 0.00000000E+00 1.40298709E-14
+-8.42880689E-06 5.80689374E-11 7.76848215E-08 1.05751896E-13 0.00000000E+00
+ 6.12347958E-11 0.00000000E+00 1.40298709E-14-8.42880689E-06 5.80689374E-11
+ 7.76848215E-08 1.05751896E-13 1.90917965E-04 0.00000000E+00-1.14923601E-06
+ 0.00000000E+00-2.20871653E-06 1.14413387E-20 1.32731981E-08-6.77160463E-23
+ 0.00000000E+00-6.10672683E-11 0.00000000E+00-3.91323208E-16 9.36056521E-06
+-5.67706657E-11 3.86289303E-08 4.19020202E-14 0.00000000E+00-6.10672683E-11
+ 0.00000000E+00-3.91323208E-16 9.36056521E-06-5.67706657E-11 3.86289303E-08
+ 4.19020202E-14 0.00000000E+00 1.17574526E-08 0.00000000E+00 6.10672683E-11
+-1.79023118E-03 1.09435191E-08-9.36056521E-06 5.67706657E-11 7.22659693E-04
+ 0.00000000E+00 1.33128862E-04-4.51573668E-19 7.22659693E-04 0.00000000E+00
+ 1.33128862E-04-4.51573668E-19 0.00000000E+00 1.17579707E-08 0.00000000E+00
+-6.10688336E-11-1.84377791E-03 1.08853685E-08 9.51508093E-06-5.66030577E-11
+ 6.14639173E-03 0.00000000E+00 8.13961418E-04 0.00000000E+00 1.20526852E-03
+-4.16981307E-18 1.68482688E-04-5.18401609E-19 6.14639173E-03 0.00000000E+00
+ 8.13961418E-04 0.00000000E+00 1.20526852E-03-4.16981307E-18 1.68482688E-04
+-5.18401609E-19 1.79023118E-03 1.09435191E-08 9.36056521E-06 5.67706657E-11
+ 0.00000000E+00 1.17574526E-08 0.00000000E+00 6.10672683E-11 1.33128862E-04
+ 4.51573668E-19 7.22659693E-04 0.00000000E+00 1.33128862E-04 4.51573668E-19
+ 7.22659693E-04 0.00000000E+00 1.84377791E-03 1.08853685E-08-9.51508093E-06
+-5.66030577E-11 0.00000000E+00 1.17579707E-08 0.00000000E+00-6.10688336E-11
+ 1.20526852E-03 4.16981307E-18 1.68482688E-04 5.18401609E-19 6.14639173E-03
+ 0.00000000E+00 8.13961418E-04 0.00000000E+00 1.20526852E-03 4.16981307E-18
+ 1.68482688E-04 5.18401609E-19 6.14639173E-03 0.00000000E+00 8.13961418E-04
+ 0.00000000E+00 0.00000000E+00 1.17574526E-08 0.00000000E+00 6.10672683E-11
+-1.79023118E-03 1.09435191E-08-9.36056521E-06 5.67706657E-11 7.22659693E-04
+ 0.00000000E+00 1.33128862E-04-4.51573668E-19 2.66196436E-01 0.00000000E+00
+ 3.05550389E-02-1.12224164E-16 0.00000000E+00 1.17579707E-08 0.00000000E+00
+-6.10688336E-11-1.84377791E-03 1.08853685E-08 9.51508093E-06-5.66030577E-11
+ 6.14639173E-03 0.00000000E+00 8.13961418E-04 0.00000000E+00 1.20526852E-03
+-4.16981307E-18 1.68482688E-04-5.18401609E-19 2.00975531E+00 0.00000000E+00
+ 2.36739262E-01 0.00000000E+00 2.44560653E-01-9.26576765E-16 3.05853713E-02
+-1.13360392E-16 1.99762190E-03 1.07542545E-08 1.04370985E-05 5.58165913E-11
+ 0.00000000E+00 1.17854488E-08 0.00000000E+00 6.12325881E-11 1.68482475E-04
+ 3.95612048E-19 8.13957259E-04 0.00000000E+00 3.05852747E-02 1.05133790E-16
+ 2.36831987E-01 0.00000000E+00 2.05062749E-03 1.07205402E-08-1.05900533E-05
+-5.57193983E-11 0.00000000E+00 1.18025489E-08 0.00000000E+00-6.12819975E-11
+ 1.50456671E-03 3.67933153E-18 2.07952918E-04 5.85625880E-19 6.87812632E-03
+ 0.00000000E+00 9.05600086E-04 0.00000000E+00 2.44816538E-01 7.96021375E-16
+ 3.06191128E-02 9.72281895E-17 1.79898496E+00 0.00000000E+00 2.13269988E-01
+ 0.00000000E+00 3.06718801E-02 0.00000000E+00 1.90917965E-04 0.00000000E+00
+-3.54223893E-04 1.80628666E-18-2.20871653E-06 1.14413387E-20 0.00000000E+00
+ 5.88075960E-10-9.90275086E-05 5.36995041E-10 0.00000000E+00 5.88075960E-10
+-9.90275086E-05 5.36995041E-10 1.67724493E-01 0.00000000E+00-2.11038020E-05
+ 0.00000000E+00-1.97241817E-03 1.13243119E-17 1.77004386E-07 2.93429209E-22
+ 0.00000000E+00-1.17579707E-08 0.00000000E+00-1.29432682E-08 1.84377791E-03
+-1.08853685E-08 2.11295252E-03-1.18935352E-08 0.00000000E+00-1.17579707E-08
+ 0.00000000E+00-1.29432682E-08 1.84377791E-03-1.08853685E-08 2.11295252E-03
+-1.18935352E-08 2.75311914E-02 0.00000000E+00-1.72801310E-04 0.00000000E+00
+-3.27944793E-04 1.79926192E-18 2.05703689E-06-1.14681222E-20 0.00000000E+00
+-1.17854488E-08 0.00000000E+00 5.87161023E-10 1.99762190E-03-1.07542545E-08
+-9.31055297E-05 5.42140330E-10 0.00000000E+00-1.17854488E-08 0.00000000E+00
+ 5.87161023E-10 1.99762190E-03-1.07542545E-08-9.31055297E-05 5.42140330E-10
+-8.26660030E-05-5.54759589E-10 3.86289303E-08-4.19020202E-14 0.00000000E+00
+-5.87916297E-10 0.00000000E+00 3.91323208E-16-7.54028875E-05-2.42493819E-19
+-3.84155278E-04 0.00000000E+00-1.52851025E-02-5.63961389E-17-1.25733924E-01
+ 0.00000000E+00 2.11295252E-03 1.18935352E-08 7.67985646E-08-6.50162542E-14
+ 0.00000000E+00 1.29432682E-08 0.00000000E+00 1.44244215E-14 1.68482688E-04
+ 5.18401609E-19 6.75400682E-04 1.87151266E-18 8.13961418E-04 0.00000000E+00
+ 3.25595930E-03 0.00000000E+00 3.05853713E-02 1.13360392E-16 1.22342544E-01
+ 4.33648282E-16 2.36739262E-01 0.00000000E+00 9.49247872E-01 0.00000000E+00
+-1.09301710E-04-5.31840527E-10 3.82387209E-08-2.42982346E-14 0.00000000E+00
+-5.92387307E-10 0.00000000E+00 1.23523320E-14 1.68482475E-04 3.95612048E-19
+-9.41088483E-05-2.45309482E-19 8.13957259E-04 0.00000000E+00-4.29889336E-04
+ 0.00000000E+00 3.05852747E-02 1.05133790E-16-1.53010969E-02-5.05904948E-17
+ 2.36831987E-01 0.00000000E+00-1.12525494E-01 0.00000000E+00 0.00000000E+00
+-5.87916297E-10 0.00000000E+00 3.91323208E-16 8.26660030E-05-5.54759589E-10
+-3.86289303E-08-4.19020202E-14-3.84155278E-04 0.00000000E+00-7.54028875E-05
+ 2.42493819E-19-1.25733924E-01 0.00000000E+00-1.52851025E-02 5.63961389E-17
+ 0.00000000E+00 1.29432682E-08 0.00000000E+00 1.44244215E-14-2.11295252E-03
+ 1.18935352E-08-7.67985646E-08-6.50162542E-14 8.13961418E-04 0.00000000E+00
+ 3.25595930E-03 0.00000000E+00 1.68482688E-04-5.18401609E-19 6.75400682E-04
+-1.87151266E-18 2.36739262E-01 0.00000000E+00 9.49247872E-01 0.00000000E+00
+ 3.05853713E-02-1.13360392E-16 1.22342544E-01-4.33648282E-16 0.00000000E+00
+-5.92387307E-10 0.00000000E+00 1.23523320E-14 1.09301710E-04-5.31840527E-10
+-3.82387209E-08-2.42982346E-14 8.13957259E-04 0.00000000E+00-4.29889336E-04
+ 0.00000000E+00 1.68482475E-04-3.95612048E-19-9.41088483E-05 2.45309482E-19
+ 2.36831987E-01 0.00000000E+00-1.12525494E-01 0.00000000E+00 3.05852747E-02
+-1.05133790E-16-1.53010969E-02 5.05904948E-17-8.26660030E-05-5.54759589E-10
+ 3.86289303E-08-4.19020202E-14 0.00000000E+00-5.87916297E-10 0.00000000E+00
+ 3.91323208E-16-7.54028875E-05-2.42493819E-19-3.84155278E-04 0.00000000E+00
+-7.54028875E-05-2.42493819E-19-3.84155278E-04 0.00000000E+00 2.11295252E-03
+ 1.18935352E-08 7.67985646E-08-6.50162542E-14 0.00000000E+00 1.29432682E-08
+ 0.00000000E+00 1.44244215E-14 1.68482688E-04 5.18401609E-19 6.75400682E-04
+ 1.87151266E-18 8.13961418E-04 0.00000000E+00 3.25595930E-03 0.00000000E+00
+ 1.68482688E-04 5.18401609E-19 6.75400682E-04 1.87151266E-18 8.13961418E-04
+ 0.00000000E+00 3.25595930E-03 0.00000000E+00-1.09301710E-04-5.31840527E-10
+ 3.82387209E-08-2.42982346E-14 0.00000000E+00-5.92387307E-10 0.00000000E+00
+ 1.23523320E-14 1.68482475E-04 3.95612048E-19-9.41088483E-05-2.45309482E-19
+ 8.13957259E-04 0.00000000E+00-4.29889336E-04 0.00000000E+00 1.68482475E-04
+ 3.95612048E-19-9.41088483E-05-2.45309482E-19 8.13957259E-04 0.00000000E+00
+-4.29889336E-04 0.00000000E+00 0.00000000E+00-5.87916297E-10 0.00000000E+00
+ 3.91323208E-16 8.26660030E-05-5.54759589E-10-3.86289303E-08-4.19020202E-14
+-3.84155278E-04 0.00000000E+00-7.54028875E-05 2.42493819E-19-3.84155278E-04
+ 0.00000000E+00-7.54028875E-05 2.42493819E-19 0.00000000E+00 1.29432682E-08
+ 0.00000000E+00 1.44244215E-14-2.11295252E-03 1.18935352E-08-7.67985646E-08
+-6.50162542E-14 8.13961418E-04 0.00000000E+00 3.25595930E-03 0.00000000E+00
+ 1.68482688E-04-5.18401609E-19 6.75400682E-04-1.87151266E-18 8.13961418E-04
+ 0.00000000E+00 3.25595930E-03 0.00000000E+00 1.68482688E-04-5.18401609E-19
+ 6.75400682E-04-1.87151266E-18 0.00000000E+00-5.92387307E-10 0.00000000E+00
+ 1.23523320E-14 1.09301710E-04-5.31840527E-10-3.82387209E-08-2.42982346E-14
+ 8.13957259E-04 0.00000000E+00-4.29889336E-04 0.00000000E+00 1.68482475E-04
+-3.95612048E-19-9.41088483E-05 2.45309482E-19 8.13957259E-04 0.00000000E+00
+-4.29889336E-04 0.00000000E+00 1.68482475E-04-3.95612048E-19-9.41088483E-05
+ 2.45309482E-19 2.22064604E-06 1.11485358E-20 1.32731981E-08 6.77160463E-23
+-1.92608101E-04 0.00000000E+00-1.14923601E-06 0.00000000E+00-3.86289303E-08
+ 4.19020202E-14 0.00000000E+00-3.91323208E-16-3.86289303E-08 4.19020202E-14
+ 0.00000000E+00-3.91323208E-16 1.77004386E-07-2.93429209E-22-3.40990887E-08
+-1.89235579E-22-2.11038020E-05 0.00000000E+00 2.90359115E-06 0.00000000E+00
+ 9.51508093E-06 5.66030577E-11-7.67985646E-08 6.50162542E-14 0.00000000E+00
+ 6.10688336E-11 0.00000000E+00-1.44244215E-14 9.51508093E-06 5.66030577E-11
+-7.67985646E-08 6.50162542E-14 0.00000000E+00 6.10688336E-11 0.00000000E+00
+-1.44244215E-14-2.04370907E-06-1.10417230E-20 1.22884186E-08 6.75291416E-23
+ 1.71453150E-04 0.00000000E+00-1.03156288E-06 0.00000000E+00-1.04370985E-05
+-5.58165913E-11-3.82387209E-08 2.42982346E-14 0.00000000E+00-6.12325881E-11
+ 0.00000000E+00-1.23523320E-14-1.04370985E-05-5.58165913E-11-3.82387209E-08
+ 2.42982346E-14 0.00000000E+00-6.12325881E-11 0.00000000E+00-1.23523320E-14
+-3.54223893E-04-1.80628666E-18-2.20871653E-06-1.14413387E-20 3.06718801E-02
+ 0.00000000E+00 1.90917965E-04 0.00000000E+00 9.90275086E-05 5.36995041E-10
+ 0.00000000E+00 5.88075960E-10 9.90275086E-05 5.36995041E-10 0.00000000E+00
+ 5.88075960E-10-1.97241817E-03-1.13243119E-17 1.77004386E-07-2.93429209E-22
+ 1.67724493E-01 0.00000000E+00-2.11038020E-05 0.00000000E+00-1.84377791E-03
+-1.08853685E-08-2.11295252E-03-1.18935352E-08 0.00000000E+00-1.17579707E-08
+ 0.00000000E+00-1.29432682E-08-1.84377791E-03-1.08853685E-08-2.11295252E-03
+-1.18935352E-08 0.00000000E+00-1.17579707E-08 0.00000000E+00-1.29432682E-08
+-3.27944793E-04-1.79926192E-18 2.05703689E-06 1.14681222E-20 2.75311914E-02
+ 0.00000000E+00-1.72801310E-04 0.00000000E+00-1.99762190E-03-1.07542545E-08
+ 9.31055297E-05 5.42140330E-10 0.00000000E+00-1.17854488E-08 0.00000000E+00
+ 5.87161023E-10-1.99762190E-03-1.07542545E-08 9.31055297E-05 5.42140330E-10
+ 0.00000000E+00-1.17854488E-08 0.00000000E+00 5.87161023E-10-1.92608101E-04
+ 0.00000000E+00-1.14923601E-06 0.00000000E+00 2.22064604E-06-1.11485358E-20
+ 1.32731981E-08-6.77160463E-23 0.00000000E+00-3.91323208E-16 3.86289303E-08
+ 4.19020202E-14 0.00000000E+00-3.91323208E-16 3.86289303E-08 4.19020202E-14
+-2.11038020E-05 0.00000000E+00 2.90359115E-06 0.00000000E+00 1.77004386E-07
+ 2.93429209E-22-3.40990887E-08 1.89235579E-22 0.00000000E+00 6.10688336E-11
+ 0.00000000E+00-1.44244215E-14-9.51508093E-06 5.66030577E-11 7.67985646E-08
+ 6.50162542E-14 0.00000000E+00 6.10688336E-11 0.00000000E+00-1.44244215E-14
+-9.51508093E-06 5.66030577E-11 7.67985646E-08 6.50162542E-14 1.71453150E-04
+ 0.00000000E+00-1.03156288E-06 0.00000000E+00-2.04370907E-06 1.10417230E-20
+ 1.22884186E-08-6.75291416E-23 0.00000000E+00-6.12325881E-11 0.00000000E+00
+-1.23523320E-14 1.04370985E-05-5.58165913E-11 3.82387209E-08 2.42982346E-14
+ 0.00000000E+00-6.12325881E-11 0.00000000E+00-1.23523320E-14 1.04370985E-05
+-5.58165913E-11 3.82387209E-08 2.42982346E-14 0.00000000E+00 1.17854488E-08
+ 0.00000000E+00 6.12325881E-11-1.99762190E-03 1.07542545E-08-1.04370985E-05
+ 5.58165913E-11 8.13957259E-04 0.00000000E+00 1.68482475E-04-3.95612048E-19
+ 8.13957259E-04 0.00000000E+00 1.68482475E-04-3.95612048E-19 0.00000000E+00
+ 1.18025489E-08 0.00000000E+00-6.12819975E-11-2.05062749E-03 1.07205402E-08
+ 1.05900533E-05-5.57193983E-11 6.87812632E-03 0.00000000E+00 9.05600086E-04
+ 0.00000000E+00 1.50456671E-03-3.67933153E-18 2.07952918E-04-5.85625880E-19
+ 6.87812632E-03 0.00000000E+00 9.05600086E-04 0.00000000E+00 1.50456671E-03
+-3.67933153E-18 2.07952918E-04-5.85625880E-19 1.99762190E-03 1.07542545E-08
+ 1.04370985E-05 5.58165913E-11 0.00000000E+00 1.17854488E-08 0.00000000E+00
+ 6.12325881E-11 1.68482475E-04 3.95612048E-19 8.13957259E-04 0.00000000E+00
+ 1.68482475E-04 3.95612048E-19 8.13957259E-04 0.00000000E+00 2.05062749E-03
+ 1.07205402E-08-1.05900533E-05-5.57193983E-11 0.00000000E+00 1.18025489E-08
+ 0.00000000E+00-6.12819975E-11 1.50456671E-03 3.67933153E-18 2.07952918E-04
+ 5.85625880E-19 6.87812632E-03 0.00000000E+00 9.05600086E-04 0.00000000E+00
+ 1.50456671E-03 3.67933153E-18 2.07952918E-04 5.85625880E-19 6.87812632E-03
+ 0.00000000E+00 9.05600086E-04 0.00000000E+00 0.00000000E+00 1.17854488E-08
+ 0.00000000E+00 6.12325881E-11-1.99762190E-03 1.07542545E-08-1.04370985E-05
+ 5.58165913E-11 8.13957259E-04 0.00000000E+00 1.68482475E-04-3.95612048E-19
+ 2.36831987E-01 0.00000000E+00 3.05852747E-02-1.05133790E-16 0.00000000E+00
+ 1.18025489E-08 0.00000000E+00-6.12819975E-11-2.05062749E-03 1.07205402E-08
+ 1.05900533E-05-5.57193983E-11 6.87812632E-03 0.00000000E+00 9.05600086E-04
+ 0.00000000E+00 1.50456671E-03-3.67933153E-18 2.07952918E-04-5.85625880E-19
+ 1.79898496E+00 0.00000000E+00 2.13269988E-01 0.00000000E+00 2.44816538E-01
+-7.96021375E-16 3.06191128E-02-9.72281895E-17 2.20300418E-03 1.06518791E-08
+ 1.15032275E-05 5.53071493E-11 0.00000000E+00 1.18697647E-08 0.00000000E+00
+ 6.16843841E-11 2.07953115E-04 6.72295753E-19 9.05595393E-04 0.00000000E+00
+ 3.06190277E-02 1.00321671E-16 2.13330612E-01 0.00000000E+00 2.25545765E-03
+ 1.06369203E-08-1.16545900E-05-5.52640458E-11 0.00000000E+00 1.18986379E-08
+ 0.00000000E+00-6.17677436E-11 1.83674212E-03 6.23084662E-18 2.51524777E-04
+ 8.44792984E-19 7.61274116E-03 0.00000000E+00 9.97618518E-04 0.00000000E+00
+ 2.45100545E-01 8.33350026E-16 3.06563550E-02 1.08549463E-16 1.62850543E+00
+ 0.00000000E+00 1.94059084E-01 0.00000000E+00 2.75311914E-02 0.00000000E+00
+ 1.71453150E-04 0.00000000E+00-3.27944793E-04 1.79926192E-18-2.04370907E-06
+ 1.10417230E-20 0.00000000E+00 5.92387307E-10-1.09301710E-04 5.31840527E-10
+ 0.00000000E+00 5.92387307E-10-1.09301710E-04 5.31840527E-10 1.51448845E-01
+ 0.00000000E+00-1.70234201E-05 0.00000000E+00-1.81223819E-03 7.35626607E-18
+ 1.96468110E-07-7.08210713E-21 0.00000000E+00-1.18025489E-08 0.00000000E+00
+-1.30157885E-08 2.05062749E-03-1.07205402E-08 2.33968436E-03-1.17484887E-08
+ 0.00000000E+00-1.18025489E-08 0.00000000E+00-1.30157885E-08 2.05062749E-03
+-1.07205402E-08 2.33968436E-03-1.17484887E-08 2.49987212E-02 0.00000000E+00
+-1.56843504E-04 0.00000000E+00-2.98759875E-04 8.54710123E-19 1.87528055E-06
+-5.44214385E-21 0.00000000E+00-1.18697647E-08 0.00000000E+00 5.89856018E-10
+ 2.20300418E-03-1.06518791E-08-1.03444229E-04 5.34594291E-10 0.00000000E+00
+-1.18697647E-08 0.00000000E+00 5.89856018E-10 2.20300418E-03-1.06518791E-08
+-1.03444229E-04 5.34594291E-10-9.31055297E-05-5.42140330E-10 3.82387209E-08
+-2.42982346E-14 0.00000000E+00-5.87161023E-10 0.00000000E+00 1.23523320E-14
+-9.41088483E-05-2.45309482E-19-4.29889336E-04 0.00000000E+00-1.53010969E-02
+-5.05904948E-17-1.12525494E-01 0.00000000E+00 2.33968436E-03 1.17484887E-08
+ 7.61083611E-08-3.37467720E-14 0.00000000E+00 1.30157885E-08 0.00000000E+00
+ 3.37924825E-14 2.07952918E-04 5.85625880E-19 8.33276886E-04 2.51064878E-18
+ 9.05600086E-04 0.00000000E+00 3.62252688E-03 0.00000000E+00 3.06191128E-02
+ 9.72281895E-17 1.22477527E-01 4.00872785E-16 2.13269988E-01 0.00000000E+00
+ 8.54733484E-01 0.00000000E+00-1.19471728E-04-5.30024738E-10 3.78406271E-08
+-1.07758787E-14 0.00000000E+00-5.98679225E-10 0.00000000E+00 2.08398851E-14
+ 2.07953115E-04 6.72295753E-19-1.14869473E-04-3.79272184E-19 9.05595393E-04
+ 0.00000000E+00-4.75803478E-04 0.00000000E+00 3.06190277E-02 1.00321671E-16
+-1.53188457E-02-5.22177835E-17 2.13330612E-01 0.00000000E+00-1.01847424E-01
+ 0.00000000E+00 0.00000000E+00-5.87161023E-10 0.00000000E+00 1.23523320E-14
+ 9.31055297E-05-5.42140330E-10-3.82387209E-08-2.42982346E-14-4.29889336E-04
+ 0.00000000E+00-9.41088483E-05 2.45309482E-19-1.12525494E-01 0.00000000E+00
+-1.53010969E-02 5.05904948E-17 0.00000000E+00 1.30157885E-08 0.00000000E+00
+ 3.37924825E-14-2.33968436E-03 1.17484887E-08-7.61083611E-08-3.37467720E-14
+ 9.05600086E-04 0.00000000E+00 3.62252688E-03 0.00000000E+00 2.07952918E-04
+-5.85625880E-19 8.33276886E-04-2.51064878E-18 2.13269988E-01 0.00000000E+00
+ 8.54733484E-01 0.00000000E+00 3.06191128E-02-9.72281895E-17 1.22477527E-01
+-4.00872785E-16 0.00000000E+00-5.98679225E-10 0.00000000E+00 2.08398851E-14
+ 1.19471728E-04-5.30024738E-10-3.78406271E-08-1.07758787E-14 9.05595393E-04
+ 0.00000000E+00-4.75803478E-04 0.00000000E+00 2.07953115E-04-6.72295753E-19
+-1.14869473E-04 3.79272184E-19 2.13330612E-01 0.00000000E+00-1.01847424E-01
+ 0.00000000E+00 3.06190277E-02-1.00321671E-16-1.53188457E-02 5.22177835E-17
+-9.31055297E-05-5.42140330E-10 3.82387209E-08-2.42982346E-14 0.00000000E+00
+-5.87161023E-10 0.00000000E+00 1.23523320E-14-9.41088483E-05-2.45309482E-19
+-4.29889336E-04 0.00000000E+00-9.41088483E-05-2.45309482E-19-4.29889336E-04
+ 0.00000000E+00 2.33968436E-03 1.17484887E-08 7.61083611E-08-3.37467720E-14
+ 0.00000000E+00 1.30157885E-08 0.00000000E+00 3.37924825E-14 2.07952918E-04
+ 5.85625880E-19 8.33276886E-04 2.51064878E-18 9.05600086E-04 0.00000000E+00
+ 3.62252688E-03 0.00000000E+00 2.07952918E-04 5.85625880E-19 8.33276886E-04
+ 2.51064878E-18 9.05600086E-04 0.00000000E+00 3.62252688E-03 0.00000000E+00
+-1.19471728E-04-5.30024738E-10 3.78406271E-08-1.07758787E-14 0.00000000E+00
+-5.98679225E-10 0.00000000E+00 2.08398851E-14 2.07953115E-04 6.72295753E-19
+-1.14869473E-04-3.79272184E-19 9.05595393E-04 0.00000000E+00-4.75803478E-04
+ 0.00000000E+00 2.07953115E-04 6.72295753E-19-1.14869473E-04-3.79272184E-19
+ 9.05595393E-04 0.00000000E+00-4.75803478E-04 0.00000000E+00 0.00000000E+00
+-5.87161023E-10 0.00000000E+00 1.23523320E-14 9.31055297E-05-5.42140330E-10
+-3.82387209E-08-2.42982346E-14-4.29889336E-04 0.00000000E+00-9.41088483E-05
+ 2.45309482E-19-4.29889336E-04 0.00000000E+00-9.41088483E-05 2.45309482E-19
+ 0.00000000E+00 1.30157885E-08 0.00000000E+00 3.37924825E-14-2.33968436E-03
+ 1.17484887E-08-7.61083611E-08-3.37467720E-14 9.05600086E-04 0.00000000E+00
+ 3.62252688E-03 0.00000000E+00 2.07952918E-04-5.85625880E-19 8.33276886E-04
+-2.51064878E-18 9.05600086E-04 0.00000000E+00 3.62252688E-03 0.00000000E+00
+ 2.07952918E-04-5.85625880E-19 8.33276886E-04-2.51064878E-18 0.00000000E+00
+-5.98679225E-10 0.00000000E+00 2.08398851E-14 1.19471728E-04-5.30024738E-10
+-3.78406271E-08-1.07758787E-14 9.05595393E-04 0.00000000E+00-4.75803478E-04
+ 0.00000000E+00 2.07953115E-04-6.72295753E-19-1.14869473E-04 3.79272184E-19
+ 9.05595393E-04 0.00000000E+00-4.75803478E-04 0.00000000E+00 2.07953115E-04
+-6.72295753E-19-1.14869473E-04 3.79272184E-19 2.05703689E-06 1.14681222E-20
+ 1.22884186E-08 6.75291416E-23-1.72801310E-04 0.00000000E+00-1.03156288E-06
+ 0.00000000E+00-3.82387209E-08 2.42982346E-14 0.00000000E+00-1.23523320E-14
+-3.82387209E-08 2.42982346E-14 0.00000000E+00-1.23523320E-14 1.96468110E-07
+ 7.08210713E-21-3.13283520E-08-1.29715557E-22-1.70234201E-05 0.00000000E+00
+ 2.62130250E-06 0.00000000E+00 1.05900533E-05 5.57193983E-11-7.61083611E-08
+ 3.37467720E-14 0.00000000E+00 6.12819975E-11 0.00000000E+00-3.37924825E-14
+ 1.05900533E-05 5.57193983E-11-7.61083611E-08 3.37467720E-14 0.00000000E+00
+ 6.12819975E-11 0.00000000E+00-3.37924825E-14-1.86051828E-06-5.23555177E-21
+ 1.11947956E-08 3.19303140E-23 1.55744337E-04 0.00000000E+00-9.36675536E-07
+ 0.00000000E+00-1.15032275E-05-5.53071493E-11-3.78406271E-08 1.07758787E-14
+ 0.00000000E+00-6.16843841E-11 0.00000000E+00-2.08398851E-14-1.15032275E-05
+-5.53071493E-11-3.78406271E-08 1.07758787E-14 0.00000000E+00-6.16843841E-11
+ 0.00000000E+00-2.08398851E-14-3.27944793E-04-1.79926192E-18-2.04370907E-06
+-1.10417230E-20 2.75311914E-02 0.00000000E+00 1.71453150E-04 0.00000000E+00
+ 1.09301710E-04 5.31840527E-10 0.00000000E+00 5.92387307E-10 1.09301710E-04
+ 5.31840527E-10 0.00000000E+00 5.92387307E-10-1.81223819E-03-7.35626607E-18
+ 1.96468110E-07 7.08210713E-21 1.51448845E-01 0.00000000E+00-1.70234201E-05
+ 0.00000000E+00-2.05062749E-03-1.07205402E-08-2.33968436E-03-1.17484887E-08
+ 0.00000000E+00-1.18025489E-08 0.00000000E+00-1.30157885E-08-2.05062749E-03
+-1.07205402E-08-2.33968436E-03-1.17484887E-08 0.00000000E+00-1.18025489E-08
+ 0.00000000E+00-1.30157885E-08-2.98759875E-04-8.54710123E-19 1.87528055E-06
+ 5.44214385E-21 2.49987212E-02 0.00000000E+00-1.56843504E-04 0.00000000E+00
+-2.20300418E-03-1.06518791E-08 1.03444229E-04 5.34594291E-10 0.00000000E+00
+-1.18697647E-08 0.00000000E+00 5.89856018E-10-2.20300418E-03-1.06518791E-08
+ 1.03444229E-04 5.34594291E-10 0.00000000E+00-1.18697647E-08 0.00000000E+00
+ 5.89856018E-10-1.72801310E-04 0.00000000E+00-1.03156288E-06 0.00000000E+00
+ 2.05703689E-06-1.14681222E-20 1.22884186E-08-6.75291416E-23 0.00000000E+00
+-1.23523320E-14 3.82387209E-08 2.42982346E-14 0.00000000E+00-1.23523320E-14
+ 3.82387209E-08 2.42982346E-14-1.70234201E-05 0.00000000E+00 2.62130250E-06
+ 0.00000000E+00 1.96468110E-07-7.08210713E-21-3.13283520E-08 1.29715557E-22
+ 0.00000000E+00 6.12819975E-11 0.00000000E+00-3.37924825E-14-1.05900533E-05
+ 5.57193983E-11 7.61083611E-08 3.37467720E-14 0.00000000E+00 6.12819975E-11
+ 0.00000000E+00-3.37924825E-14-1.05900533E-05 5.57193983E-11 7.61083611E-08
+ 3.37467720E-14 1.55744337E-04 0.00000000E+00-9.36675536E-07 0.00000000E+00
+-1.86051828E-06 5.23555177E-21 1.11947956E-08-3.19303140E-23 0.00000000E+00
+-6.16843841E-11 0.00000000E+00-2.08398851E-14 1.15032275E-05-5.53071493E-11
+ 3.78406271E-08 1.07758787E-14 0.00000000E+00-6.16843841E-11 0.00000000E+00
+-2.08398851E-14 1.15032275E-05-5.53071493E-11 3.78406271E-08 1.07758787E-14
+ 0.00000000E+00 1.18697647E-08 0.00000000E+00 6.16843841E-11-2.20300418E-03
+ 1.06518791E-08-1.15032275E-05 5.53071493E-11 9.05595393E-04 0.00000000E+00
+ 2.07953115E-04-6.72295753E-19 9.05595393E-04 0.00000000E+00 2.07953115E-04
+-6.72295753E-19 0.00000000E+00 1.18986379E-08 0.00000000E+00-6.17677436E-11
+-2.25545765E-03 1.06369203E-08 1.16545900E-05-5.52640458E-11 7.61274116E-03
+ 0.00000000E+00 9.97618518E-04 0.00000000E+00 1.83674212E-03-6.23084662E-18
+ 2.51524777E-04-8.44792984E-19 7.61274116E-03 0.00000000E+00 9.97618518E-04
+ 0.00000000E+00 1.83674212E-03-6.23084662E-18 2.51524777E-04-8.44792984E-19
+ 2.20300418E-03 1.06518791E-08 1.15032275E-05 5.53071493E-11 0.00000000E+00
+ 1.18697647E-08 0.00000000E+00 6.16843841E-11 2.07953115E-04 6.72295753E-19
+ 9.05595393E-04 0.00000000E+00 2.07953115E-04 6.72295753E-19 9.05595393E-04
+ 0.00000000E+00 2.25545765E-03 1.06369203E-08-1.16545900E-05-5.52640458E-11
+ 0.00000000E+00 1.18986379E-08 0.00000000E+00-6.17677436E-11 1.83674212E-03
+ 6.23084662E-18 2.51524777E-04 8.44792984E-19 7.61274116E-03 0.00000000E+00
+ 9.97618518E-04 0.00000000E+00 1.83674212E-03 6.23084662E-18 2.51524777E-04
+ 8.44792984E-19 7.61274116E-03 0.00000000E+00 9.97618518E-04 0.00000000E+00
+ 0.00000000E+00 1.18697647E-08 0.00000000E+00 6.16843841E-11-2.20300418E-03
+ 1.06518791E-08-1.15032275E-05 5.53071493E-11 9.05595393E-04 0.00000000E+00
+ 2.07953115E-04-6.72295753E-19 2.13330612E-01 0.00000000E+00 3.06190277E-02
+-1.00321671E-16 0.00000000E+00 1.18986379E-08 0.00000000E+00-6.17677436E-11
+-2.25545765E-03 1.06369203E-08 1.16545900E-05-5.52640458E-11 7.61274116E-03
+ 0.00000000E+00 9.97618518E-04 0.00000000E+00 1.83674212E-03-6.23084662E-18
+ 2.51524777E-04-8.44792984E-19 1.62850543E+00 0.00000000E+00 1.94059084E-01
+ 0.00000000E+00 2.45100545E-01-8.33350026E-16 3.06563550E-02-1.08549463E-16
+ 2.40598848E-03 1.06153884E-08 1.25567037E-05 5.51345117E-11 0.00000000E+00
+ 1.19958400E-08 0.00000000E+00 6.23498753E-11 2.51524477E-04 8.08569272E-19
+ 9.97613725E-04 0.00000000E+00 3.06562634E-02 1.06812293E-16 1.94100279E-01
+ 0.00000000E+00 2.45773183E-03 1.06147830E-08-1.27060121E-05-5.51328090E-11
+ 0.00000000E+00 1.20337861E-08 0.00000000E+00-6.24594006E-11 2.20166244E-03
+ 6.30932886E-18 2.99182475E-04 7.77901837E-19 8.35055003E-03 0.00000000E+00
+ 1.09005505E-03 0.00000000E+00 2.45412257E-01 1.04525901E-15 3.06970480E-02
+ 1.54683961E-16 1.48779255E+00 0.00000000E+00 1.78048251E-01 0.00000000E+00
+ 2.49987212E-02 0.00000000E+00 1.55744337E-04 0.00000000E+00-2.98759875E-04
+ 8.54710123E-19-1.86051828E-06 5.23555177E-21 0.00000000E+00 5.98679225E-10
+-1.19471728E-04 5.30024738E-10 0.00000000E+00 5.98679225E-10-1.19471728E-04
+ 5.30024738E-10 1.38190515E-01 0.00000000E+00-1.40079352E-05 0.00000000E+00
+-1.63492905E-03 4.29551783E-18 2.16730696E-07-1.03140021E-21 0.00000000E+00
+-1.18986379E-08 0.00000000E+00-1.31388955E-08 2.25545765E-03-1.06369203E-08
+ 2.56403839E-03-1.16839129E-08 0.00000000E+00-1.18986379E-08 0.00000000E+00
+-1.31388955E-08 2.25545765E-03-1.06369203E-08 2.56403839E-03-1.16839129E-08
+ 2.29154669E-02 0.00000000E+00-1.43725280E-04 0.00000000E+00-2.66577079E-04
+ 6.36839842E-19 1.67477331E-06-4.06779359E-21 0.00000000E+00-1.19958400E-08
+ 0.00000000E+00 5.94987135E-10 2.40598848E-03-1.06153884E-08-1.13683729E-04
+ 5.30917205E-10 0.00000000E+00-1.19958400E-08 0.00000000E+00 5.94987135E-10
+ 2.40598848E-03-1.06153884E-08-1.13683729E-04 5.30917205E-10-1.03444229E-04
+-5.34594291E-10 3.78406271E-08-1.07758787E-14 0.00000000E+00-5.89856018E-10
+ 0.00000000E+00 2.08398851E-14-1.14869473E-04-3.79272184E-19-4.75803478E-04
+ 0.00000000E+00-1.53188457E-02-5.22177835E-17-1.01847424E-01 0.00000000E+00
+ 2.56403839E-03 1.16839129E-08 7.51776382E-08-1.04677226E-14 0.00000000E+00
+ 1.31388955E-08 0.00000000E+00 4.87327602E-14 2.51524777E-04 8.44792984E-19
+ 1.00755797E-03 3.23318192E-18 9.97618518E-04 0.00000000E+00 3.99061392E-03
+ 0.00000000E+00 3.06563550E-02 1.08549463E-16 1.22626472E-01 4.44880074E-16
+ 1.94059084E-01 0.00000000E+00 7.77468529E-01 0.00000000E+00-1.29494161E-04
+-5.30733077E-10 3.73271039E-08-4.25675456E-16 0.00000000E+00-6.06582311E-10
+ 0.00000000E+00 2.73813240E-14 2.51524477E-04 8.08569272E-19-1.37676738E-04
+-3.96617777E-19 9.97613725E-04 0.00000000E+00-5.21917193E-04 0.00000000E+00
+ 3.06562634E-02 1.06812293E-16-1.53383279E-02-6.53740633E-17 1.94100279E-01
+ 0.00000000E+00-9.30371326E-02 0.00000000E+00 0.00000000E+00-5.89856018E-10
+ 0.00000000E+00 2.08398851E-14 1.03444229E-04-5.34594291E-10-3.78406271E-08
+-1.07758787E-14-4.75803478E-04 0.00000000E+00-1.14869473E-04 3.79272184E-19
+-1.01847424E-01 0.00000000E+00-1.53188457E-02 5.22177835E-17 0.00000000E+00
+ 1.31388955E-08 0.00000000E+00 4.87327602E-14-2.56403839E-03 1.16839129E-08
+-7.51776382E-08-1.04677226E-14 9.97618518E-04 0.00000000E+00 3.99061392E-03
+ 0.00000000E+00 2.51524777E-04-8.44792984E-19 1.00755797E-03-3.23318192E-18
+ 1.94059084E-01 0.00000000E+00 7.77468529E-01 0.00000000E+00 3.06563550E-02
+-1.08549463E-16 1.22626472E-01-4.44880074E-16 0.00000000E+00-6.06582311E-10
+ 0.00000000E+00 2.73813240E-14 1.29494161E-04-5.30733077E-10-3.73271039E-08
+-4.25675456E-16 9.97613725E-04 0.00000000E+00-5.21917193E-04 0.00000000E+00
+ 2.51524477E-04-8.08569272E-19-1.37676738E-04 3.96617777E-19 1.94100279E-01
+ 0.00000000E+00-9.30371326E-02 0.00000000E+00 3.06562634E-02-1.06812293E-16
+-1.53383279E-02 6.53740633E-17-1.03444229E-04-5.34594291E-10 3.78406271E-08
+-1.07758787E-14 0.00000000E+00-5.89856018E-10 0.00000000E+00 2.08398851E-14
+-1.14869473E-04-3.79272184E-19-4.75803478E-04 0.00000000E+00-1.14869473E-04
+-3.79272184E-19-4.75803478E-04 0.00000000E+00 2.56403839E-03 1.16839129E-08
+ 7.51776382E-08-1.04677226E-14 0.00000000E+00 1.31388955E-08 0.00000000E+00
+ 4.87327602E-14 2.51524777E-04 8.44792984E-19 1.00755797E-03 3.23318192E-18
+ 9.97618518E-04 0.00000000E+00 3.99061392E-03 0.00000000E+00 2.51524777E-04
+ 8.44792984E-19 1.00755797E-03 3.23318192E-18 9.97618518E-04 0.00000000E+00
+ 3.99061392E-03 0.00000000E+00-1.29494161E-04-5.30733077E-10 3.73271039E-08
+-4.25675456E-16 0.00000000E+00-6.06582311E-10 0.00000000E+00 2.73813240E-14
+ 2.51524477E-04 8.08569272E-19-1.37676738E-04-3.96617777E-19 9.97613725E-04
+ 0.00000000E+00-5.21917193E-04 0.00000000E+00 2.51524477E-04 8.08569272E-19
+-1.37676738E-04-3.96617777E-19 9.97613725E-04 0.00000000E+00-5.21917193E-04
+ 0.00000000E+00 0.00000000E+00-5.89856018E-10 0.00000000E+00 2.08398851E-14
+ 1.03444229E-04-5.34594291E-10-3.78406271E-08-1.07758787E-14-4.75803478E-04
+ 0.00000000E+00-1.14869473E-04 3.79272184E-19-4.75803478E-04 0.00000000E+00
+-1.14869473E-04 3.79272184E-19 0.00000000E+00 1.31388955E-08 0.00000000E+00
+ 4.87327602E-14-2.56403839E-03 1.16839129E-08-7.51776382E-08-1.04677226E-14
+ 9.97618518E-04 0.00000000E+00 3.99061392E-03 0.00000000E+00 2.51524777E-04
+-8.44792984E-19 1.00755797E-03-3.23318192E-18 9.97618518E-04 0.00000000E+00
+ 3.99061392E-03 0.00000000E+00 2.51524777E-04-8.44792984E-19 1.00755797E-03
+-3.23318192E-18 0.00000000E+00-6.06582311E-10 0.00000000E+00 2.73813240E-14
+ 1.29494161E-04-5.30733077E-10-3.73271039E-08-4.25675456E-16 9.97613725E-04
+ 0.00000000E+00-5.21917193E-04 0.00000000E+00 2.51524477E-04-8.08569272E-19
+-1.37676738E-04 3.96617777E-19 9.97613725E-04 0.00000000E+00-5.21917193E-04
+ 0.00000000E+00 2.51524477E-04-8.08569272E-19-1.37676738E-04 3.96617777E-19
+ 1.87528055E-06 5.44214385E-21 1.11947956E-08 3.19303140E-23-1.56843504E-04
+ 0.00000000E+00-9.36675536E-07 0.00000000E+00-3.78406271E-08 1.07758787E-14
+ 0.00000000E+00-2.08398851E-14-3.78406271E-08 1.07758787E-14 0.00000000E+00
+-2.08398851E-14 2.16730696E-07 1.03140021E-21-2.82620199E-08-7.41415186E-23
+-1.40079352E-05 0.00000000E+00 2.39146261E-06 0.00000000E+00 1.16545900E-05
+ 5.52640458E-11-7.51776382E-08 1.04677226E-14 0.00000000E+00 6.17677436E-11
+ 0.00000000E+00-4.87327602E-14 1.16545900E-05 5.52640458E-11-7.51776382E-08
+ 1.04677226E-14 0.00000000E+00 6.17677436E-11 0.00000000E+00-4.87327602E-14
+-1.65859214E-06-3.89855590E-21 9.98883334E-09 2.38930288E-23 1.42812876E-04
+ 0.00000000E+00-8.58617942E-07 0.00000000E+00-1.25567037E-05-5.51345117E-11
+-3.73271039E-08 4.25675456E-16 0.00000000E+00-6.23498753E-11 0.00000000E+00
+-2.73813240E-14-1.25567037E-05-5.51345117E-11-3.73271039E-08 4.25675456E-16
+ 0.00000000E+00-6.23498753E-11 0.00000000E+00-2.73813240E-14-2.98759875E-04
+-8.54710123E-19-1.86051828E-06-5.23555177E-21 2.49987212E-02 0.00000000E+00
+ 1.55744337E-04 0.00000000E+00 1.19471728E-04 5.30024738E-10 0.00000000E+00
+ 5.98679225E-10 1.19471728E-04 5.30024738E-10 0.00000000E+00 5.98679225E-10
+-1.63492905E-03-4.29551783E-18 2.16730696E-07 1.03140021E-21 1.38190515E-01
+ 0.00000000E+00-1.40079352E-05 0.00000000E+00-2.25545765E-03-1.06369203E-08
+-2.56403839E-03-1.16839129E-08 0.00000000E+00-1.18986379E-08 0.00000000E+00
+-1.31388955E-08-2.25545765E-03-1.06369203E-08-2.56403839E-03-1.16839129E-08
+ 0.00000000E+00-1.18986379E-08 0.00000000E+00-1.31388955E-08-2.66577079E-04
+-6.36839842E-19 1.67477331E-06 4.06779359E-21 2.29154669E-02 0.00000000E+00
+-1.43725280E-04 0.00000000E+00-2.40598848E-03-1.06153884E-08 1.13683729E-04
+ 5.30917205E-10 0.00000000E+00-1.19958400E-08 0.00000000E+00 5.94987135E-10
+-2.40598848E-03-1.06153884E-08 1.13683729E-04 5.30917205E-10 0.00000000E+00
+-1.19958400E-08 0.00000000E+00 5.94987135E-10-1.56843504E-04 0.00000000E+00
+-9.36675536E-07 0.00000000E+00 1.87528055E-06-5.44214385E-21 1.11947956E-08
+-3.19303140E-23 0.00000000E+00-2.08398851E-14 3.78406271E-08 1.07758787E-14
+ 0.00000000E+00-2.08398851E-14 3.78406271E-08 1.07758787E-14-1.40079352E-05
+ 0.00000000E+00 2.39146261E-06 0.00000000E+00 2.16730696E-07-1.03140021E-21
+-2.82620199E-08 7.41415186E-23 0.00000000E+00 6.17677436E-11 0.00000000E+00
+-4.87327602E-14-1.16545900E-05 5.52640458E-11 7.51776382E-08 1.04677226E-14
+ 0.00000000E+00 6.17677436E-11 0.00000000E+00-4.87327602E-14-1.16545900E-05
+ 5.52640458E-11 7.51776382E-08 1.04677226E-14 1.42812876E-04 0.00000000E+00
+-8.58617942E-07 0.00000000E+00-1.65859214E-06 3.89855590E-21 9.98883334E-09
+-2.38930288E-23 0.00000000E+00-6.23498753E-11 0.00000000E+00-2.73813240E-14
+ 1.25567037E-05-5.51345117E-11 3.73271039E-08 4.25675456E-16 0.00000000E+00
+-6.23498753E-11 0.00000000E+00-2.73813240E-14 1.25567037E-05-5.51345117E-11
+ 3.73271039E-08 4.25675456E-16 0.00000000E+00 1.19958400E-08 0.00000000E+00
+ 6.23498753E-11-2.40598848E-03 1.06153884E-08-1.25567037E-05 5.51345117E-11
+ 9.97613725E-04 0.00000000E+00 2.51524477E-04-8.08569272E-19 9.97613725E-04
+ 0.00000000E+00 2.51524477E-04-8.08569272E-19 0.00000000E+00 1.20337861E-08
+ 0.00000000E+00-6.24594006E-11-2.45773183E-03 1.06147830E-08 1.27060121E-05
+-5.51328090E-11 8.35055003E-03 0.00000000E+00 1.09005505E-03 0.00000000E+00
+ 2.20166244E-03-6.30932886E-18 2.99182475E-04-7.77901837E-19 8.35055003E-03
+ 0.00000000E+00 1.09005505E-03 0.00000000E+00 2.20166244E-03-6.30932886E-18
+ 2.99182475E-04-7.77901837E-19 2.40598848E-03 1.06153884E-08 1.25567037E-05
+ 5.51345117E-11 0.00000000E+00 1.19958400E-08 0.00000000E+00 6.23498753E-11
+ 2.51524477E-04 8.08569272E-19 9.97613725E-04 0.00000000E+00 2.51524477E-04
+ 8.08569272E-19 9.97613725E-04 0.00000000E+00 2.45773183E-03 1.06147830E-08
+-1.27060121E-05-5.51328090E-11 0.00000000E+00 1.20337861E-08 0.00000000E+00
+-6.24594006E-11 2.20166244E-03 6.30932886E-18 2.99182475E-04 7.77901837E-19
+ 8.35055003E-03 0.00000000E+00 1.09005505E-03 0.00000000E+00 2.20166244E-03
+ 6.30932886E-18 2.99182475E-04 7.77901837E-19 8.35055003E-03 0.00000000E+00
+ 1.09005505E-03 0.00000000E+00 0.00000000E+00 1.19958400E-08 0.00000000E+00
+ 6.23498753E-11-2.40598848E-03 1.06153884E-08-1.25567037E-05 5.51345117E-11
+ 9.97613725E-04 0.00000000E+00 2.51524477E-04-8.08569272E-19 1.94100279E-01
+ 0.00000000E+00 3.06562634E-02-1.06812293E-16 0.00000000E+00 1.20337861E-08
+ 0.00000000E+00-6.24594006E-11-2.45773183E-03 1.06147830E-08 1.27060121E-05
+-5.51328090E-11 8.35055003E-03 0.00000000E+00 1.09005505E-03 0.00000000E+00
+ 2.20166244E-03-6.30932886E-18 2.99182475E-04-7.77901837E-19 1.48779255E+00
+ 0.00000000E+00 1.78048251E-01 0.00000000E+00 2.45412257E-01-1.04525901E-15
+ 3.06970480E-02-1.54683961E-16 3.18891877E-03 1.08946909E-08 1.66194131E-05
+ 5.66260921E-11 0.00000000E+00 1.27632137E-08 0.00000000E+00 6.63601531E-11
+ 4.66485193E-04 1.17511322E-18 1.37025138E-03 0.00000000E+00 3.08395779E-02
+ 7.11749993E-17 1.42855211E-01 0.00000000E+00 3.23744248E-03 1.09292286E-08
+-1.67594304E-05-5.67257666E-11 0.00000000E+00 1.28225002E-08 0.00000000E+00
+-6.65312373E-11 3.98598104E-03 9.23413590E-18 5.30295395E-04 1.15961660E-18
+ 1.13398450E-02 0.00000000E+00 1.46475220E-03 0.00000000E+00 2.46933143E-01
+ 4.43821644E-16 3.08939460E-02 4.74640937E-17 1.10730613E+00 0.00000000E+00
+ 1.34053126E-01 0.00000000E+00 2.99796244E-03 1.07762798E-08 1.56286813E-05
+ 5.60034495E-11 0.00000000E+00 1.25420104E-08 0.00000000E+00 6.52068237E-11
+ 4.06682403E-04 6.07413155E-19 1.27633039E-03 0.00000000E+00 3.07886470E-02
+ 1.20610020E-16 1.52912176E-01 0.00000000E+00 3.04740482E-03 1.08042051E-08
+-1.57713530E-05-5.60840478E-11 0.00000000E+00 1.25974050E-08 0.00000000E+00
+-6.53666808E-11 3.49152385E-03 7.09141990E-18 4.66485513E-04 1.18096522E-18
+ 1.05861923E-02 0.00000000E+00 1.37025727E-03 0.00000000E+00 2.46512296E-01
+ 8.20576965E-16 3.08396676E-02 7.95757101E-17 1.18262332E+00 0.00000000E+00
+ 1.42843582E-01 0.00000000E+00 2.80365502E-03 1.06863279E-08 1.46204401E-05
+ 5.55272328E-11 0.00000000E+00 1.23377679E-08 0.00000000E+00 6.41406598E-11
+ 3.50907835E-04 9.60342103E-19 1.18294269E-03 0.00000000E+00 3.07411005E-02
+ 9.48681227E-17 1.64523745E-01 0.00000000E+00 2.85392737E-03 1.07064788E-08
+-1.47655044E-05-5.55854035E-11 0.00000000E+00 1.23884980E-08 0.00000000E+00
+-6.42870612E-11 3.02920808E-03 6.31637785E-18 4.06682674E-04 6.24656760E-19
+ 9.83696822E-03 0.00000000E+00 1.27633610E-03 0.00000000E+00 2.46118381E-01
+ 8.15350141E-16 3.07887371E-02 1.13511434E-16 1.26918664E+00 0.00000000E+00
+ 1.52896741E-01 0.00000000E+00 2.60619933E-03 1.06302561E-08 1.35957741E-05
+ 5.52251380E-11 0.00000000E+00 1.21540857E-08 0.00000000E+00 6.31800472E-11
+ 2.99182429E-04 7.81594890E-19 1.09004987E-03 0.00000000E+00 3.06969586E-02
+ 1.61102507E-16 1.78077196E-01 0.00000000E+00 2.65725714E-03 1.06410863E-08
+-1.37431091E-05-5.52564206E-11 0.00000000E+00 1.21991225E-08 0.00000000E+00
+-6.33100259E-11 2.59920279E-03 6.98168977E-18 3.50908122E-04 9.55982233E-19
+ 9.09185545E-03 0.00000000E+00 1.18294805E-03 0.00000000E+00 2.45751613E-01
+ 1.07948334E-15 3.07411896E-02 1.03529338E-16 1.36969611E+00 0.00000000E+00
+ 1.64502845E-01 0.00000000E+00 2.29154669E-02 0.00000000E+00 1.42812876E-04
+ 0.00000000E+00-2.66577079E-04 6.36839842E-19-1.65859214E-06 3.89855590E-21
+ 0.00000000E+00 6.06582311E-10-1.29494161E-04 5.30733077E-10 0.00000000E+00
+ 6.06582311E-10-1.29494161E-04 5.30733077E-10 1.27192306E-01 0.00000000E+00
+-1.17157224E-05 0.00000000E+00-1.44048393E-03 2.60608195E-18 2.36564584E-07
+-2.34005575E-21 0.00000000E+00-1.20337861E-08 0.00000000E+00-1.33009306E-08
+ 2.45773183E-03-1.06147830E-08 2.78539120E-03-1.16809038E-08 0.00000000E+00
+-1.20337861E-08 0.00000000E+00-1.33009306E-08 2.45773183E-03-1.06147830E-08
+ 2.78539120E-03-1.16809038E-08 2.11735114E-02 0.00000000E+00-1.32762311E-04
+ 0.00000000E+00-2.31441070E-04 3.22011015E-19 1.45581460E-06-2.03544583E-21
+ 0.00000000E+00-1.21540857E-08 0.00000000E+00 6.01984528E-10 2.60619933E-03
+-1.06302561E-08-1.23782000E-04 5.30185649E-10 0.00000000E+00-1.21540857E-08
+ 0.00000000E+00 6.01984528E-10 2.60619933E-03-1.06302561E-08-1.23782000E-04
+ 5.30185649E-10-1.13683729E-04-5.30917205E-10 3.73271039E-08-4.25675456E-16
+ 0.00000000E+00-5.94987135E-10 0.00000000E+00 2.73813240E-14-1.37676738E-04
+-3.96617777E-19-5.21917193E-04 0.00000000E+00-1.53383279E-02-6.53740633E-17
+-9.30371326E-02 0.00000000E+00 2.78539120E-03 1.16809038E-08 7.41262247E-08
+ 7.92732036E-15 0.00000000E+00 1.33009306E-08 0.00000000E+00 6.01757089E-14
+ 2.99182475E-04 7.77901837E-19 1.19818257E-03 3.19071014E-18 1.09005505E-03
+ 0.00000000E+00 4.36037303E-03 0.00000000E+00 3.06970480E-02 1.54683961E-16
+ 1.22789244E-01 5.94525715E-16 1.78048251E-01 0.00000000E+00 7.13135765E-01
+ 0.00000000E+00-1.39383061E-04-5.33495457E-10 3.68337430E-08 7.82065732E-15
+ 0.00000000E+00-6.15746173E-10 0.00000000E+00 3.24946701E-14 2.99182429E-04
+ 7.81594890E-19-1.62522638E-04-4.34394281E-19 1.09004987E-03 0.00000000E+00
+-5.68249479E-04 0.00000000E+00 3.06969586E-02 1.61102507E-16-1.53595370E-02
+-6.61579614E-17 1.78077196E-01 0.00000000E+00-8.56450101E-02 0.00000000E+00
+ 0.00000000E+00-5.94987135E-10 0.00000000E+00 2.73813240E-14 1.13683729E-04
+-5.30917205E-10-3.73271039E-08-4.25675456E-16-5.21917193E-04 0.00000000E+00
+-1.37676738E-04 3.96617777E-19-9.30371326E-02 0.00000000E+00-1.53383279E-02
+ 6.53740633E-17 0.00000000E+00 1.33009306E-08 0.00000000E+00 6.01757089E-14
+-2.78539120E-03 1.16809038E-08-7.41262247E-08 7.92732036E-15 1.09005505E-03
+ 0.00000000E+00 4.36037303E-03 0.00000000E+00 2.99182475E-04-7.77901837E-19
+ 1.19818257E-03-3.19071014E-18 1.78048251E-01 0.00000000E+00 7.13135765E-01
+ 0.00000000E+00 3.06970480E-02-1.54683961E-16 1.22789244E-01-5.94525715E-16
+ 0.00000000E+00-6.15746173E-10 0.00000000E+00 3.24946701E-14 1.39383061E-04
+-5.33495457E-10-3.68337430E-08 7.82065732E-15 1.09004987E-03 0.00000000E+00
+-5.68249479E-04 0.00000000E+00 2.99182429E-04-7.81594890E-19-1.62522638E-04
+ 4.34394281E-19 1.78077196E-01 0.00000000E+00-8.56450101E-02 0.00000000E+00
+ 3.06969586E-02-1.61102507E-16-1.53595370E-02 6.61579614E-17-1.13683729E-04
+-5.30917205E-10 3.73271039E-08-4.25675456E-16 0.00000000E+00-5.94987135E-10
+ 0.00000000E+00 2.73813240E-14-1.37676738E-04-3.96617777E-19-5.21917193E-04
+ 0.00000000E+00-1.37676738E-04-3.96617777E-19-5.21917193E-04 0.00000000E+00
+ 2.78539120E-03 1.16809038E-08 7.41262247E-08 7.92732036E-15 0.00000000E+00
+ 1.33009306E-08 0.00000000E+00 6.01757089E-14 2.99182475E-04 7.77901837E-19
+ 1.19818257E-03 3.19071014E-18 1.09005505E-03 0.00000000E+00 4.36037303E-03
+ 0.00000000E+00 2.99182475E-04 7.77901837E-19 1.19818257E-03 3.19071014E-18
+ 1.09005505E-03 0.00000000E+00 4.36037303E-03 0.00000000E+00-1.39383061E-04
+-5.33495457E-10 3.68337430E-08 7.82065732E-15 0.00000000E+00-6.15746173E-10
+ 0.00000000E+00 3.24946701E-14 2.99182429E-04 7.81594890E-19-1.62522638E-04
+-4.34394281E-19 1.09004987E-03 0.00000000E+00-5.68249479E-04 0.00000000E+00
+ 2.99182429E-04 7.81594890E-19-1.62522638E-04-4.34394281E-19 1.09004987E-03
+ 0.00000000E+00-5.68249479E-04 0.00000000E+00 0.00000000E+00-5.94987135E-10
+ 0.00000000E+00 2.73813240E-14 1.13683729E-04-5.30917205E-10-3.73271039E-08
+-4.25675456E-16-5.21917193E-04 0.00000000E+00-1.37676738E-04 3.96617777E-19
+-5.21917193E-04 0.00000000E+00-1.37676738E-04 3.96617777E-19 0.00000000E+00
+ 1.33009306E-08 0.00000000E+00 6.01757089E-14-2.78539120E-03 1.16809038E-08
+-7.41262247E-08 7.92732036E-15 1.09005505E-03 0.00000000E+00 4.36037303E-03
+ 0.00000000E+00 2.99182475E-04-7.77901837E-19 1.19818257E-03-3.19071014E-18
+ 1.09005505E-03 0.00000000E+00 4.36037303E-03 0.00000000E+00 2.99182475E-04
+-7.77901837E-19 1.19818257E-03-3.19071014E-18 0.00000000E+00-6.15746173E-10
+ 0.00000000E+00 3.24946701E-14 1.39383061E-04-5.33495457E-10-3.68337430E-08
+ 7.82065732E-15 1.09004987E-03 0.00000000E+00-5.68249479E-04 0.00000000E+00
+ 2.99182429E-04-7.81594890E-19-1.62522638E-04 4.34394281E-19 1.09004987E-03
+ 0.00000000E+00-5.68249479E-04 0.00000000E+00 2.99182429E-04-7.81594890E-19
+-1.62522638E-04 4.34394281E-19 1.67477331E-06 4.06779359E-21 9.98883334E-09
+ 2.38930288E-23-1.43725280E-04 0.00000000E+00-8.58617942E-07 0.00000000E+00
+-3.73271039E-08 4.25675456E-16 0.00000000E+00-2.73813240E-14-3.73271039E-08
+ 4.25675456E-16 0.00000000E+00-2.73813240E-14 2.36564584E-07 2.34005575E-21
+-2.48988979E-08-4.63515815E-23-1.17157224E-05 0.00000000E+00 2.20087798E-06
+ 0.00000000E+00 1.27060121E-05 5.51328090E-11-7.41262247E-08-7.92732036E-15
+ 0.00000000E+00 6.24594006E-11 0.00000000E+00-6.01757089E-14 1.27060121E-05
+ 5.51328090E-11-7.41262247E-08-7.92732036E-15 0.00000000E+00 6.24594006E-11
+ 0.00000000E+00-6.01757089E-14-1.43819357E-06-1.98694881E-21 8.67224219E-09
+ 1.20257612E-23 1.31993759E-04 0.00000000E+00-7.93347449E-07 0.00000000E+00
+-1.35957741E-05-5.52251380E-11-3.68337430E-08-7.82065732E-15 0.00000000E+00
+-6.31800472E-11 0.00000000E+00-3.24946701E-14-1.35957741E-05-5.52251380E-11
+-3.68337430E-08-7.82065732E-15 0.00000000E+00-6.31800472E-11 0.00000000E+00
+-3.24946701E-14-2.66577079E-04-6.36839842E-19-1.65859214E-06-3.89855590E-21
+ 2.29154669E-02 0.00000000E+00 1.42812876E-04 0.00000000E+00 1.29494161E-04
+ 5.30733077E-10 0.00000000E+00 6.06582311E-10 1.29494161E-04 5.30733077E-10
+ 0.00000000E+00 6.06582311E-10-1.44048393E-03-2.60608195E-18 2.36564584E-07
+ 2.34005575E-21 1.27192306E-01 0.00000000E+00-1.17157224E-05 0.00000000E+00
+-2.45773183E-03-1.06147830E-08-2.78539120E-03-1.16809038E-08 0.00000000E+00
+-1.20337861E-08 0.00000000E+00-1.33009306E-08-2.45773183E-03-1.06147830E-08
+-2.78539120E-03-1.16809038E-08 0.00000000E+00-1.20337861E-08 0.00000000E+00
+-1.33009306E-08-2.31441070E-04-3.22011015E-19 1.45581460E-06 2.03544583E-21
+ 2.11735114E-02 0.00000000E+00-1.32762311E-04 0.00000000E+00-2.60619933E-03
+-1.06302561E-08 1.23782000E-04 5.30185649E-10 0.00000000E+00-1.21540857E-08
+ 0.00000000E+00 6.01984528E-10-2.60619933E-03-1.06302561E-08 1.23782000E-04
+ 5.30185649E-10 0.00000000E+00-1.21540857E-08 0.00000000E+00 6.01984528E-10
+-1.43725280E-04 0.00000000E+00-8.58617942E-07 0.00000000E+00 1.67477331E-06
+-4.06779359E-21 9.98883334E-09-2.38930288E-23 0.00000000E+00-2.73813240E-14
+ 3.73271039E-08 4.25675456E-16 0.00000000E+00-2.73813240E-14 3.73271039E-08
+ 4.25675456E-16-1.17157224E-05 0.00000000E+00 2.20087798E-06 0.00000000E+00
+ 2.36564584E-07-2.34005575E-21-2.48988979E-08 4.63515815E-23 0.00000000E+00
+ 6.24594006E-11 0.00000000E+00-6.01757089E-14-1.27060121E-05 5.51328090E-11
+ 7.41262247E-08-7.92732036E-15 0.00000000E+00 6.24594006E-11 0.00000000E+00
+-6.01757089E-14-1.27060121E-05 5.51328090E-11 7.41262247E-08-7.92732036E-15
+ 1.31993759E-04 0.00000000E+00-7.93347449E-07 0.00000000E+00-1.43819357E-06
+ 1.98694881E-21 8.67224219E-09-1.20257612E-23 0.00000000E+00-6.31800472E-11
+ 0.00000000E+00-3.24946701E-14 1.35957741E-05-5.52251380E-11 3.68337430E-08
+-7.82065732E-15 0.00000000E+00-6.31800472E-11 0.00000000E+00-3.24946701E-14
+ 1.35957741E-05-5.52251380E-11 3.68337430E-08-7.82065732E-15 0.00000000E+00
+ 1.21540857E-08 0.00000000E+00 6.31800472E-11-2.60619933E-03 1.06302561E-08
+-1.35957741E-05 5.52251380E-11 1.09004987E-03 0.00000000E+00 2.99182429E-04
+-7.81594890E-19 1.09004987E-03 0.00000000E+00 2.99182429E-04-7.81594890E-19
+ 0.00000000E+00 1.21991225E-08 0.00000000E+00-6.33100259E-11-2.65725714E-03
+ 1.06410863E-08 1.37431091E-05-5.52564206E-11 9.09185545E-03 0.00000000E+00
+ 1.18294805E-03 0.00000000E+00 2.59920279E-03-6.98168977E-18 3.50908122E-04
+-9.55982233E-19 9.09185545E-03 0.00000000E+00 1.18294805E-03 0.00000000E+00
+ 2.59920279E-03-6.98168977E-18 3.50908122E-04-9.55982233E-19 2.60619933E-03
+ 1.06302561E-08 1.35957741E-05 5.52251380E-11 0.00000000E+00 1.21540857E-08
+ 0.00000000E+00 6.31800472E-11 2.99182429E-04 7.81594890E-19 1.09004987E-03
+ 0.00000000E+00 2.99182429E-04 7.81594890E-19 1.09004987E-03 0.00000000E+00
+ 2.65725714E-03 1.06410863E-08-1.37431091E-05-5.52564206E-11 0.00000000E+00
+ 1.21991225E-08 0.00000000E+00-6.33100259E-11 2.59920279E-03 6.98168977E-18
+ 3.50908122E-04 9.55982233E-19 9.09185545E-03 0.00000000E+00 1.18294805E-03
+ 0.00000000E+00 2.59920279E-03 6.98168977E-18 3.50908122E-04 9.55982233E-19
+ 9.09185545E-03 0.00000000E+00 1.18294805E-03 0.00000000E+00 0.00000000E+00
+ 1.21540857E-08 0.00000000E+00 6.31800472E-11-2.60619933E-03 1.06302561E-08
+-1.35957741E-05 5.52251380E-11 1.09004987E-03 0.00000000E+00 2.99182429E-04
+-7.81594890E-19 1.78077196E-01 0.00000000E+00 3.06969586E-02-1.61102507E-16
+ 0.00000000E+00 1.21991225E-08 0.00000000E+00-6.33100259E-11-2.65725714E-03
+ 1.06410863E-08 1.37431091E-05-5.52564206E-11 9.09185545E-03 0.00000000E+00
+ 1.18294805E-03 0.00000000E+00 2.59920279E-03-6.98168977E-18 3.50908122E-04
+-9.55982233E-19 1.36969611E+00 0.00000000E+00 1.64502845E-01 0.00000000E+00
+ 2.45751613E-01-1.07948334E-15 3.07411896E-02-1.03529338E-16 2.11735114E-02
+ 0.00000000E+00 1.31993759E-04 0.00000000E+00-2.31441070E-04 3.22011015E-19
+-1.43819357E-06 1.98694881E-21 0.00000000E+00 6.15746173E-10-1.39383061E-04
+ 5.33495457E-10 0.00000000E+00 6.15746173E-10-1.39383061E-04 5.33495457E-10
+ 1.17932426E-01 0.00000000E+00-9.93154514E-06 0.00000000E+00-1.22883562E-03
+ 1.98967238E-18 2.56638929E-07 8.99672587E-22 0.00000000E+00-1.21991225E-08
+ 0.00000000E+00-1.34933643E-08 2.65725714E-03-1.06410863E-08 3.00377068E-03
+-1.17269246E-08 0.00000000E+00-1.21991225E-08 0.00000000E+00-1.34933643E-08
+ 2.65725714E-03-1.06410863E-08 3.00377068E-03-1.17269246E-08 1.96970843E-02
+ 0.00000000E+00-1.23474852E-04 0.00000000E+00-1.93327000E-04 4.36357554E-19
+ 1.21822554E-06-2.67571767E-21 0.00000000E+00-1.23377679E-08 0.00000000E+00
+ 6.10434553E-10 2.80365502E-03-1.06863279E-08-1.33754480E-04 5.31788420E-10
+ 0.00000000E+00-1.23377679E-08 0.00000000E+00 6.10434553E-10 2.80365502E-03
+-1.06863279E-08-1.33754480E-04 5.31788420E-10-1.23782000E-04-5.30185649E-10
+ 3.68337430E-08 7.82065732E-15 0.00000000E+00-6.01984528E-10 0.00000000E+00
+ 3.24946701E-14-1.62522638E-04-4.34394281E-19-5.68249479E-04 0.00000000E+00
+-1.53595370E-02-6.61579614E-17-8.56450101E-02 0.00000000E+00 3.00377068E-03
+ 1.17269246E-08 7.31133971E-08 2.27169273E-14 0.00000000E+00 1.34933643E-08
+ 0.00000000E+00 6.92939239E-14 3.50908122E-04 9.55982233E-19 1.40507799E-03
+ 3.65845871E-18 1.18294805E-03 0.00000000E+00 4.73195837E-03 0.00000000E+00
+ 3.07411896E-02 1.03529338E-16 1.22965796E-01 4.22745897E-16 1.64502845E-01
+ 0.00000000E+00 6.58748651E-01 0.00000000E+00-1.49115465E-04-5.37946105E-10
+ 3.62660783E-08 1.45426791E-14 0.00000000E+00-6.25935734E-10 0.00000000E+00
+ 3.66003485E-14 3.50907835E-04 9.60342103E-19-1.89397627E-04-3.96249716E-19
+ 1.18294269E-03 0.00000000E+00-6.14819697E-04 0.00000000E+00 3.07411005E-02
+ 9.48681227E-17-1.53824594E-02-5.20948891E-17 1.64523745E-01 0.00000000E+00
+-7.93551215E-02 0.00000000E+00 0.00000000E+00-6.01984528E-10 0.00000000E+00
+ 3.24946701E-14 1.23782000E-04-5.30185649E-10-3.68337430E-08 7.82065732E-15
+-5.68249479E-04 0.00000000E+00-1.62522638E-04 4.34394281E-19-8.56450101E-02
+ 0.00000000E+00-1.53595370E-02 6.61579614E-17 0.00000000E+00 1.34933643E-08
+ 0.00000000E+00 6.92939239E-14-3.00377068E-03 1.17269246E-08-7.31133971E-08
+ 2.27169273E-14 1.18294805E-03 0.00000000E+00 4.73195837E-03 0.00000000E+00
+ 3.50908122E-04-9.55982233E-19 1.40507799E-03-3.65845871E-18 1.64502845E-01
+ 0.00000000E+00 6.58748651E-01 0.00000000E+00 3.07411896E-02-1.03529338E-16
+ 1.22965796E-01-4.22745897E-16 0.00000000E+00-6.25935734E-10 0.00000000E+00
+ 3.66003485E-14 1.49115465E-04-5.37946105E-10-3.62660783E-08 1.45426791E-14
+ 1.18294269E-03 0.00000000E+00-6.14819697E-04 0.00000000E+00 3.50907835E-04
+-9.60342103E-19-1.89397627E-04 3.96249716E-19 1.64523745E-01 0.00000000E+00
+-7.93551215E-02 0.00000000E+00 3.07411005E-02-9.48681227E-17-1.53824594E-02
+ 5.20948891E-17-1.23782000E-04-5.30185649E-10 3.68337430E-08 7.82065732E-15
+ 0.00000000E+00-6.01984528E-10 0.00000000E+00 3.24946701E-14-1.62522638E-04
+-4.34394281E-19-5.68249479E-04 0.00000000E+00-1.62522638E-04-4.34394281E-19
+-5.68249479E-04 0.00000000E+00 3.00377068E-03 1.17269246E-08 7.31133971E-08
+ 2.27169273E-14 0.00000000E+00 1.34933643E-08 0.00000000E+00 6.92939239E-14
+ 3.50908122E-04 9.55982233E-19 1.40507799E-03 3.65845871E-18 1.18294805E-03
+ 0.00000000E+00 4.73195837E-03 0.00000000E+00 3.50908122E-04 9.55982233E-19
+ 1.40507799E-03 3.65845871E-18 1.18294805E-03 0.00000000E+00 4.73195837E-03
+ 0.00000000E+00-1.49115465E-04-5.37946105E-10 3.62660783E-08 1.45426791E-14
+ 0.00000000E+00-6.25935734E-10 0.00000000E+00 3.66003485E-14 3.50907835E-04
+ 9.60342103E-19-1.89397627E-04-3.96249716E-19 1.18294269E-03 0.00000000E+00
+-6.14819697E-04 0.00000000E+00 3.50907835E-04 9.60342103E-19-1.89397627E-04
+-3.96249716E-19 1.18294269E-03 0.00000000E+00-6.14819697E-04 0.00000000E+00
+ 0.00000000E+00-6.01984528E-10 0.00000000E+00 3.24946701E-14 1.23782000E-04
+-5.30185649E-10-3.68337430E-08 7.82065732E-15-5.68249479E-04 0.00000000E+00
+-1.62522638E-04 4.34394281E-19-5.68249479E-04 0.00000000E+00-1.62522638E-04
+ 4.34394281E-19 0.00000000E+00 1.34933643E-08 0.00000000E+00 6.92939239E-14
+-3.00377068E-03 1.17269246E-08-7.31133971E-08 2.27169273E-14 1.18294805E-03
+ 0.00000000E+00 4.73195837E-03 0.00000000E+00 3.50908122E-04-9.55982233E-19
+ 1.40507799E-03-3.65845871E-18 1.18294805E-03 0.00000000E+00 4.73195837E-03
+ 0.00000000E+00 3.50908122E-04-9.55982233E-19 1.40507799E-03-3.65845871E-18
+ 0.00000000E+00-6.25935734E-10 0.00000000E+00 3.66003485E-14 1.49115465E-04
+-5.37946105E-10-3.62660783E-08 1.45426791E-14 1.18294269E-03 0.00000000E+00
+-6.14819697E-04 0.00000000E+00 3.50907835E-04-9.60342103E-19-1.89397627E-04
+ 3.96249716E-19 1.18294269E-03 0.00000000E+00-6.14819697E-04 0.00000000E+00
+ 3.50907835E-04-9.60342103E-19-1.89397627E-04 3.96249716E-19 1.45581460E-06
+ 2.03544583E-21 8.67224219E-09 1.20257612E-23-1.32762311E-04 0.00000000E+00
+-7.93347449E-07 0.00000000E+00-3.68337430E-08-7.82065732E-15 0.00000000E+00
+-3.24946701E-14-3.68337430E-08-7.82065732E-15 0.00000000E+00-3.24946701E-14
+ 2.56638929E-07-8.99672587E-22-2.12388894E-08-3.59242823E-23-9.93154514E-06
+ 0.00000000E+00 2.04046141E-06 0.00000000E+00 1.37431091E-05 5.52564206E-11
+-7.31133971E-08-2.27169273E-14 0.00000000E+00 6.33100259E-11 0.00000000E+00
+-6.92939239E-14 1.37431091E-05 5.52564206E-11-7.31133971E-08-2.27169273E-14
+ 0.00000000E+00 6.33100259E-11 0.00000000E+00-6.92939239E-14-1.19918918E-06
+-2.78189374E-21 7.24407438E-09 1.63629852E-23 1.22819330E-04 0.00000000E+00
+-7.38025543E-07 0.00000000E+00-1.46204401E-05-5.55272328E-11-3.62660783E-08
+-1.45426791E-14 0.00000000E+00-6.41406598E-11 0.00000000E+00-3.66003485E-14
+-1.46204401E-05-5.55272328E-11-3.62660783E-08-1.45426791E-14 0.00000000E+00
+-6.41406598E-11 0.00000000E+00-3.66003485E-14-2.31441070E-04-3.22011015E-19
+-1.43819357E-06-1.98694881E-21 2.11735114E-02 0.00000000E+00 1.31993759E-04
+ 0.00000000E+00 1.39383061E-04 5.33495457E-10 0.00000000E+00 6.15746173E-10
+ 1.39383061E-04 5.33495457E-10 0.00000000E+00 6.15746173E-10-1.22883562E-03
+-1.98967238E-18 2.56638929E-07-8.99672587E-22 1.17932426E-01 0.00000000E+00
+-9.93154514E-06 0.00000000E+00-2.65725714E-03-1.06410863E-08-3.00377068E-03
+-1.17269246E-08 0.00000000E+00-1.21991225E-08 0.00000000E+00-1.34933643E-08
+-2.65725714E-03-1.06410863E-08-3.00377068E-03-1.17269246E-08 0.00000000E+00
+-1.21991225E-08 0.00000000E+00-1.34933643E-08-1.93327000E-04-4.36357554E-19
+ 1.21822554E-06 2.67571767E-21 1.96970843E-02 0.00000000E+00-1.23474852E-04
+ 0.00000000E+00-2.80365502E-03-1.06863279E-08 1.33754480E-04 5.31788420E-10
+ 0.00000000E+00-1.23377679E-08 0.00000000E+00 6.10434553E-10-2.80365502E-03
+-1.06863279E-08 1.33754480E-04 5.31788420E-10 0.00000000E+00-1.23377679E-08
+ 0.00000000E+00 6.10434553E-10-1.32762311E-04 0.00000000E+00-7.93347449E-07
+ 0.00000000E+00 1.45581460E-06-2.03544583E-21 8.67224219E-09-1.20257612E-23
+ 0.00000000E+00-3.24946701E-14 3.68337430E-08-7.82065732E-15 0.00000000E+00
+-3.24946701E-14 3.68337430E-08-7.82065732E-15-9.93154514E-06 0.00000000E+00
+ 2.04046141E-06 0.00000000E+00 2.56638929E-07 8.99672587E-22-2.12388894E-08
+ 3.59242823E-23 0.00000000E+00 6.33100259E-11 0.00000000E+00-6.92939239E-14
+-1.37431091E-05 5.52564206E-11 7.31133971E-08-2.27169273E-14 0.00000000E+00
+ 6.33100259E-11 0.00000000E+00-6.92939239E-14-1.37431091E-05 5.52564206E-11
+ 7.31133971E-08-2.27169273E-14 1.22819330E-04 0.00000000E+00-7.38025543E-07
+ 0.00000000E+00-1.19918918E-06 2.78189374E-21 7.24407438E-09-1.63629852E-23
+ 0.00000000E+00-6.41406598E-11 0.00000000E+00-3.66003485E-14 1.46204401E-05
+-5.55272328E-11 3.62660783E-08-1.45426791E-14 0.00000000E+00-6.41406598E-11
+ 0.00000000E+00-3.66003485E-14 1.46204401E-05-5.55272328E-11 3.62660783E-08
+-1.45426791E-14 0.00000000E+00 1.23377679E-08 0.00000000E+00 6.41406598E-11
+-2.80365502E-03 1.06863279E-08-1.46204401E-05 5.55272328E-11 1.18294269E-03
+ 0.00000000E+00 3.50907835E-04-9.60342103E-19 1.18294269E-03 0.00000000E+00
+ 3.50907835E-04-9.60342103E-19 0.00000000E+00 1.23884980E-08 0.00000000E+00
+-6.42870612E-11-2.85392737E-03 1.07064788E-08 1.47655044E-05-5.55854035E-11
+ 9.83696822E-03 0.00000000E+00 1.27633610E-03 0.00000000E+00 3.02920808E-03
+-6.31637785E-18 4.06682674E-04-6.24656760E-19 9.83696822E-03 0.00000000E+00
+ 1.27633610E-03 0.00000000E+00 3.02920808E-03-6.31637785E-18 4.06682674E-04
+-6.24656760E-19 2.80365502E-03 1.06863279E-08 1.46204401E-05 5.55272328E-11
+ 0.00000000E+00 1.23377679E-08 0.00000000E+00 6.41406598E-11 3.50907835E-04
+ 9.60342103E-19 1.18294269E-03 0.00000000E+00 3.50907835E-04 9.60342103E-19
+ 1.18294269E-03 0.00000000E+00 2.85392737E-03 1.07064788E-08-1.47655044E-05
+-5.55854035E-11 0.00000000E+00 1.23884980E-08 0.00000000E+00-6.42870612E-11
+ 3.02920808E-03 6.31637785E-18 4.06682674E-04 6.24656760E-19 9.83696822E-03
+ 0.00000000E+00 1.27633610E-03 0.00000000E+00 3.02920808E-03 6.31637785E-18
+ 4.06682674E-04 6.24656760E-19 9.83696822E-03 0.00000000E+00 1.27633610E-03
+ 0.00000000E+00 0.00000000E+00 1.23377679E-08 0.00000000E+00 6.41406598E-11
+-2.80365502E-03 1.06863279E-08-1.46204401E-05 5.55272328E-11 1.18294269E-03
+ 0.00000000E+00 3.50907835E-04-9.60342103E-19 1.64523745E-01 0.00000000E+00
+ 3.07411005E-02-9.48681227E-17 0.00000000E+00 1.23884980E-08 0.00000000E+00
+-6.42870612E-11-2.85392737E-03 1.07064788E-08 1.47655044E-05-5.55854035E-11
+ 9.83696822E-03 0.00000000E+00 1.27633610E-03 0.00000000E+00 3.02920808E-03
+-6.31637785E-18 4.06682674E-04-6.24656760E-19 1.26918664E+00 0.00000000E+00
+ 1.52896741E-01 0.00000000E+00 2.46118381E-01-8.15350141E-16 3.07887371E-02
+-1.13511434E-16 1.96970843E-02 0.00000000E+00 1.22819330E-04 0.00000000E+00
+-1.93327000E-04 4.36357554E-19-1.19918918E-06 2.78189374E-21 0.00000000E+00
+ 6.25935734E-10-1.49115465E-04 5.37946105E-10 0.00000000E+00 6.25935734E-10
+-1.49115465E-04 5.37946105E-10 1.10037634E-01 0.00000000E+00-8.51669741E-06
+ 0.00000000E+00-1.00005509E-03 2.75426384E-18 2.76751843E-07-2.09819154E-22
+ 0.00000000E+00-1.23884980E-08 0.00000000E+00-1.37102019E-08 2.85392737E-03
+-1.07064788E-08 3.21881849E-03-1.18128872E-08 0.00000000E+00-1.23884980E-08
+ 0.00000000E+00-1.37102019E-08 2.85392737E-03-1.07064788E-08 3.21881849E-03
+-1.18128872E-08 1.84311727E-02 0.00000000E+00-1.15514818E-04 0.00000000E+00
+-1.52222884E-04 4.22038138E-19 9.61969799E-07-2.67287295E-21 0.00000000E+00
+-1.25420104E-08 0.00000000E+00 6.20045796E-10 2.99796244E-03-1.07762798E-08
+-1.43575629E-04 5.35285289E-10 0.00000000E+00-1.25420104E-08 0.00000000E+00
+ 6.20045796E-10 2.99796244E-03-1.07762798E-08-1.43575629E-04 5.35285289E-10
+-1.33754480E-04-5.31788420E-10 3.62660783E-08 1.45426791E-14 0.00000000E+00
+-6.10434553E-10 0.00000000E+00 3.66003485E-14-1.89397627E-04-3.96249716E-19
+-6.14819697E-04 0.00000000E+00-1.53824594E-02-5.20948891E-17-7.93551215E-02
+ 0.00000000E+00 3.21881849E-03 1.18128872E-08 7.19203836E-08 3.49336857E-14
+ 0.00000000E+00 1.37102019E-08 0.00000000E+00 7.66833622E-14 4.06682674E-04
+ 6.24656760E-19 1.62816875E-03 2.77288010E-18 1.27633610E-03 0.00000000E+00
+ 5.10552352E-03 0.00000000E+00 3.07887371E-02 1.13511434E-16 1.23155977E-01
+ 4.48073193E-16 1.52896741E-01 0.00000000E+00 6.12174400E-01 0.00000000E+00
+-1.58683069E-04-5.43818346E-10 3.56679367E-08 2.01495625E-14 0.00000000E+00
+-6.36972165E-10 0.00000000E+00 3.99642700E-14 4.06682403E-04 6.07413155E-19
+-2.18291979E-04-4.47094593E-19 1.27633039E-03 0.00000000E+00-6.61646915E-04
+ 0.00000000E+00 3.07886470E-02 1.20610020E-16-1.54070787E-02-5.00464325E-17
+ 1.52912176E-01 0.00000000E+00-7.39389393E-02 0.00000000E+00 0.00000000E+00
+-6.10434553E-10 0.00000000E+00 3.66003485E-14 1.33754480E-04-5.31788420E-10
+-3.62660783E-08 1.45426791E-14-6.14819697E-04 0.00000000E+00-1.89397627E-04
+ 3.96249716E-19-7.93551215E-02 0.00000000E+00-1.53824594E-02 5.20948891E-17
+ 0.00000000E+00 1.37102019E-08 0.00000000E+00 7.66833622E-14-3.21881849E-03
+ 1.18128872E-08-7.19203836E-08 3.49336857E-14 1.27633610E-03 0.00000000E+00
+ 5.10552352E-03 0.00000000E+00 4.06682674E-04-6.24656760E-19 1.62816875E-03
+-2.77288010E-18 1.52896741E-01 0.00000000E+00 6.12174400E-01 0.00000000E+00
+ 3.07887371E-02-1.13511434E-16 1.23155977E-01-4.48073193E-16 0.00000000E+00
+-6.36972165E-10 0.00000000E+00 3.99642700E-14 1.58683069E-04-5.43818346E-10
+-3.56679367E-08 2.01495625E-14 1.27633039E-03 0.00000000E+00-6.61646915E-04
+ 0.00000000E+00 4.06682403E-04-6.07413155E-19-2.18291979E-04 4.47094593E-19
+ 1.52912176E-01 0.00000000E+00-7.39389393E-02 0.00000000E+00 3.07886470E-02
+-1.20610020E-16-1.54070787E-02 5.00464325E-17-1.33754480E-04-5.31788420E-10
+ 3.62660783E-08 1.45426791E-14 0.00000000E+00-6.10434553E-10 0.00000000E+00
+ 3.66003485E-14-1.89397627E-04-3.96249716E-19-6.14819697E-04 0.00000000E+00
+-1.89397627E-04-3.96249716E-19-6.14819697E-04 0.00000000E+00 3.21881849E-03
+ 1.18128872E-08 7.19203836E-08 3.49336857E-14 0.00000000E+00 1.37102019E-08
+ 0.00000000E+00 7.66833622E-14 4.06682674E-04 6.24656760E-19 1.62816875E-03
+ 2.77288010E-18 1.27633610E-03 0.00000000E+00 5.10552352E-03 0.00000000E+00
+ 4.06682674E-04 6.24656760E-19 1.62816875E-03 2.77288010E-18 1.27633610E-03
+ 0.00000000E+00 5.10552352E-03 0.00000000E+00-1.58683069E-04-5.43818346E-10
+ 3.56679367E-08 2.01495625E-14 0.00000000E+00-6.36972165E-10 0.00000000E+00
+ 3.99642700E-14 4.06682403E-04 6.07413155E-19-2.18291979E-04-4.47094593E-19
+ 1.27633039E-03 0.00000000E+00-6.61646915E-04 0.00000000E+00 4.06682403E-04
+ 6.07413155E-19-2.18291979E-04-4.47094593E-19 1.27633039E-03 0.00000000E+00
+-6.61646915E-04 0.00000000E+00 0.00000000E+00-6.10434553E-10 0.00000000E+00
+ 3.66003485E-14 1.33754480E-04-5.31788420E-10-3.62660783E-08 1.45426791E-14
+-6.14819697E-04 0.00000000E+00-1.89397627E-04 3.96249716E-19-6.14819697E-04
+ 0.00000000E+00-1.89397627E-04 3.96249716E-19 0.00000000E+00 1.37102019E-08
+ 0.00000000E+00 7.66833622E-14-3.21881849E-03 1.18128872E-08-7.19203836E-08
+ 3.49336857E-14 1.27633610E-03 0.00000000E+00 5.10552352E-03 0.00000000E+00
+ 4.06682674E-04-6.24656760E-19 1.62816875E-03-2.77288010E-18 1.27633610E-03
+ 0.00000000E+00 5.10552352E-03 0.00000000E+00 4.06682674E-04-6.24656760E-19
+ 1.62816875E-03-2.77288010E-18 0.00000000E+00-6.36972165E-10 0.00000000E+00
+ 3.99642700E-14 1.58683069E-04-5.43818346E-10-3.56679367E-08 2.01495625E-14
+ 1.27633039E-03 0.00000000E+00-6.61646915E-04 0.00000000E+00 4.06682403E-04
+-6.07413155E-19-2.18291979E-04 4.47094593E-19 1.27633039E-03 0.00000000E+00
+-6.61646915E-04 0.00000000E+00 4.06682403E-04-6.07413155E-19-2.18291979E-04
+ 4.47094593E-19 1.21822554E-06 2.67571767E-21 7.24407438E-09 1.63629852E-23
+-1.23474852E-04 0.00000000E+00-7.38025543E-07 0.00000000E+00-3.62660783E-08
+-1.45426791E-14 0.00000000E+00-3.66003485E-14-3.62660783E-08-1.45426791E-14
+ 0.00000000E+00-3.66003485E-14 2.76751843E-07 2.09819154E-22-1.72817519E-08
+-4.52516541E-23-8.51669741E-06 0.00000000E+00 1.90372586E-06 0.00000000E+00
+ 1.47655044E-05 5.55854035E-11-7.19203836E-08-3.49336857E-14 0.00000000E+00
+ 6.42870612E-11 0.00000000E+00-7.66833622E-14 1.47655044E-05 5.55854035E-11
+-7.19203836E-08-3.49336857E-14 0.00000000E+00 6.42870612E-11 0.00000000E+00
+-7.66833622E-14-9.41466737E-07-2.60024549E-21 5.70389214E-09 1.57735176E-23
+ 1.14949796E-04 0.00000000E+00-6.90591171E-07 0.00000000E+00-1.56286813E-05
+-5.60034495E-11-3.56679367E-08-2.01495625E-14 0.00000000E+00-6.52068237E-11
+ 0.00000000E+00-3.99642700E-14-1.56286813E-05-5.60034495E-11-3.56679367E-08
+-2.01495625E-14 0.00000000E+00-6.52068237E-11 0.00000000E+00-3.99642700E-14
+-1.93327000E-04-4.36357554E-19-1.19918918E-06-2.78189374E-21 1.96970843E-02
+ 0.00000000E+00 1.22819330E-04 0.00000000E+00 1.49115465E-04 5.37946105E-10
+ 0.00000000E+00 6.25935734E-10 1.49115465E-04 5.37946105E-10 0.00000000E+00
+ 6.25935734E-10-1.00005509E-03-2.75426384E-18 2.76751843E-07 2.09819154E-22
+ 1.10037634E-01 0.00000000E+00-8.51669741E-06 0.00000000E+00-2.85392737E-03
+-1.07064788E-08-3.21881849E-03-1.18128872E-08 0.00000000E+00-1.23884980E-08
+ 0.00000000E+00-1.37102019E-08-2.85392737E-03-1.07064788E-08-3.21881849E-03
+-1.18128872E-08 0.00000000E+00-1.23884980E-08 0.00000000E+00-1.37102019E-08
+-1.52222884E-04-4.22038138E-19 9.61969799E-07 2.67287295E-21 1.84311727E-02
+ 0.00000000E+00-1.15514818E-04 0.00000000E+00-2.99796244E-03-1.07762798E-08
+ 1.43575629E-04 5.35285289E-10 0.00000000E+00-1.25420104E-08 0.00000000E+00
+ 6.20045796E-10-2.99796244E-03-1.07762798E-08 1.43575629E-04 5.35285289E-10
+ 0.00000000E+00-1.25420104E-08 0.00000000E+00 6.20045796E-10-1.23474852E-04
+ 0.00000000E+00-7.38025543E-07 0.00000000E+00 1.21822554E-06-2.67571767E-21
+ 7.24407438E-09-1.63629852E-23 0.00000000E+00-3.66003485E-14 3.62660783E-08
+-1.45426791E-14 0.00000000E+00-3.66003485E-14 3.62660783E-08-1.45426791E-14
+-8.51669741E-06 0.00000000E+00 1.90372586E-06 0.00000000E+00 2.76751843E-07
+-2.09819154E-22-1.72817519E-08 4.52516541E-23 0.00000000E+00 6.42870612E-11
+ 0.00000000E+00-7.66833622E-14-1.47655044E-05 5.55854035E-11 7.19203836E-08
+-3.49336857E-14 0.00000000E+00 6.42870612E-11 0.00000000E+00-7.66833622E-14
+-1.47655044E-05 5.55854035E-11 7.19203836E-08-3.49336857E-14 1.14949796E-04
+ 0.00000000E+00-6.90591171E-07 0.00000000E+00-9.41466737E-07 2.60024549E-21
+ 5.70389214E-09-1.57735176E-23 0.00000000E+00-6.52068237E-11 0.00000000E+00
+-3.99642700E-14 1.56286813E-05-5.60034495E-11 3.56679367E-08-2.01495625E-14
+ 0.00000000E+00-6.52068237E-11 0.00000000E+00-3.99642700E-14 1.56286813E-05
+-5.60034495E-11 3.56679367E-08-2.01495625E-14 0.00000000E+00 1.25420104E-08
+ 0.00000000E+00 6.52068237E-11-2.99796244E-03 1.07762798E-08-1.56286813E-05
+ 5.60034495E-11 1.27633039E-03 0.00000000E+00 4.06682403E-04-6.07413155E-19
+ 1.27633039E-03 0.00000000E+00 4.06682403E-04-6.07413155E-19 0.00000000E+00
+ 1.25974050E-08 0.00000000E+00-6.53666808E-11-3.04740482E-03 1.08042051E-08
+ 1.57713530E-05-5.60840478E-11 1.05861923E-02 0.00000000E+00 1.37025727E-03
+ 0.00000000E+00 3.49152385E-03-7.09141990E-18 4.66485513E-04-1.18096522E-18
+ 1.05861923E-02 0.00000000E+00 1.37025727E-03 0.00000000E+00 3.49152385E-03
+-7.09141990E-18 4.66485513E-04-1.18096522E-18 2.99796244E-03 1.07762798E-08
+ 1.56286813E-05 5.60034495E-11 0.00000000E+00 1.25420104E-08 0.00000000E+00
+ 6.52068237E-11 4.06682403E-04 6.07413155E-19 1.27633039E-03 0.00000000E+00
+ 4.06682403E-04 6.07413155E-19 1.27633039E-03 0.00000000E+00 3.04740482E-03
+ 1.08042051E-08-1.57713530E-05-5.60840478E-11 0.00000000E+00 1.25974050E-08
+ 0.00000000E+00-6.53666808E-11 3.49152385E-03 7.09141990E-18 4.66485513E-04
+ 1.18096522E-18 1.05861923E-02 0.00000000E+00 1.37025727E-03 0.00000000E+00
+ 3.49152385E-03 7.09141990E-18 4.66485513E-04 1.18096522E-18 1.05861923E-02
+ 0.00000000E+00 1.37025727E-03 0.00000000E+00 0.00000000E+00 1.25420104E-08
+ 0.00000000E+00 6.52068237E-11-2.99796244E-03 1.07762798E-08-1.56286813E-05
+ 5.60034495E-11 1.27633039E-03 0.00000000E+00 4.06682403E-04-6.07413155E-19
+ 1.52912176E-01 0.00000000E+00 3.07886470E-02-1.20610020E-16 0.00000000E+00
+ 1.25974050E-08 0.00000000E+00-6.53666808E-11-3.04740482E-03 1.08042051E-08
+ 1.57713530E-05-5.60840478E-11 1.05861923E-02 0.00000000E+00 1.37025727E-03
+ 0.00000000E+00 3.49152385E-03-7.09141990E-18 4.66485513E-04-1.18096522E-18
+ 1.18262332E+00 0.00000000E+00 1.42843582E-01 0.00000000E+00 2.46512296E-01
+-8.20576965E-16 3.08396676E-02-7.95757101E-17 1.84311727E-02 0.00000000E+00
+ 1.14949796E-04 0.00000000E+00-1.52222884E-04 4.22038138E-19-9.41466737E-07
+ 2.60024549E-21 0.00000000E+00 6.36972165E-10-1.58683069E-04 5.43818346E-10
+ 0.00000000E+00 6.36972165E-10-1.58683069E-04 5.43818346E-10 1.03234703E-01
+ 0.00000000E+00-7.37537209E-06 0.00000000E+00-7.53806080E-04 3.05249244E-18
+ 2.97032093E-07 3.30378404E-21 0.00000000E+00-1.25974050E-08 0.00000000E+00
+-1.39470238E-08 3.04740482E-03-1.08042051E-08 3.43029201E-03-1.19321554E-08
+ 0.00000000E+00-1.25974050E-08 0.00000000E+00-1.39470238E-08 3.04740482E-03
+-1.08042051E-08 3.43029201E-03-1.19321554E-08 1.73350316E-02 0.00000000E+00
+-1.08624704E-04 0.00000000E+00-1.08107595E-04 8.66002379E-19 6.86869346E-07
+-5.23105304E-21 0.00000000E+00-1.27632137E-08 0.00000000E+00 6.30604955E-10
+ 3.18891877E-03-1.08946909E-08-1.53240554E-04 5.40355350E-10 0.00000000E+00
+-1.27632137E-08 0.00000000E+00 6.30604955E-10 3.18891877E-03-1.08946909E-08
+-1.53240554E-04 5.40355350E-10-1.43575629E-04-5.35285289E-10 3.56679367E-08
+ 2.01495625E-14 0.00000000E+00-6.20045796E-10 0.00000000E+00 3.99642700E-14
+-2.18291979E-04-4.47094593E-19-6.61646915E-04 0.00000000E+00-1.54070787E-02
+-5.00464325E-17-7.39389393E-02 0.00000000E+00 3.43029201E-03 1.19321554E-08
+ 7.06622747E-08 4.52286578E-14 0.00000000E+00 1.39470238E-08 0.00000000E+00
+ 8.28002445E-14 4.66485513E-04 1.18096522E-18 1.86737241E-03 4.52258903E-18
+ 1.37025727E-03 0.00000000E+00 5.48122226E-03 0.00000000E+00 3.08396676E-02
+ 7.95757101E-17 1.23359687E-01 3.07813966E-16 1.42843582E-01 0.00000000E+00
+ 5.71849904E-01 0.00000000E+00-1.68067231E-04-5.50908790E-10 3.50043425E-08
+ 2.49186357E-14 0.00000000E+00-6.48720455E-10 0.00000000E+00 4.27710347E-14
+ 4.66485193E-04 1.17511322E-18-2.49195147E-04-5.83682453E-19 1.37025138E-03
+ 0.00000000E+00-7.08750895E-04 0.00000000E+00 3.08395779E-02 7.11749993E-17
+-1.54333810E-02-2.96597732E-17 1.42855211E-01 0.00000000E+00-6.92270842E-02
+ 0.00000000E+00 0.00000000E+00-6.20045796E-10 0.00000000E+00 3.99642700E-14
+ 1.43575629E-04-5.35285289E-10-3.56679367E-08 2.01495625E-14-6.61646915E-04
+ 0.00000000E+00-2.18291979E-04 4.47094593E-19-7.39389393E-02 0.00000000E+00
+-1.54070787E-02 5.00464325E-17 0.00000000E+00 1.39470238E-08 0.00000000E+00
+ 8.28002445E-14-3.43029201E-03 1.19321554E-08-7.06622747E-08 4.52286578E-14
+ 1.37025727E-03 0.00000000E+00 5.48122226E-03 0.00000000E+00 4.66485513E-04
+-1.18096522E-18 1.86737241E-03-4.52258903E-18 1.42843582E-01 0.00000000E+00
+ 5.71849904E-01 0.00000000E+00 3.08396676E-02-7.95757101E-17 1.23359687E-01
+-3.07813966E-16 0.00000000E+00-6.48720455E-10 0.00000000E+00 4.27710347E-14
+ 1.68067231E-04-5.50908790E-10-3.50043425E-08 2.49186357E-14 1.37025138E-03
+ 0.00000000E+00-7.08750895E-04 0.00000000E+00 4.66485193E-04-1.17511322E-18
+-2.49195147E-04 5.83682453E-19 1.42855211E-01 0.00000000E+00-6.92270842E-02
+ 0.00000000E+00 3.08395779E-02-7.11749993E-17-1.54333810E-02 2.96597732E-17
+-1.43575629E-04-5.35285289E-10 3.56679367E-08 2.01495625E-14 0.00000000E+00
+-6.20045796E-10 0.00000000E+00 3.99642700E-14-2.18291979E-04-4.47094593E-19
+-6.61646915E-04 0.00000000E+00-2.18291979E-04-4.47094593E-19-6.61646915E-04
+ 0.00000000E+00 3.43029201E-03 1.19321554E-08 7.06622747E-08 4.52286578E-14
+ 0.00000000E+00 1.39470238E-08 0.00000000E+00 8.28002445E-14 4.66485513E-04
+ 1.18096522E-18 1.86737241E-03 4.52258903E-18 1.37025727E-03 0.00000000E+00
+ 5.48122226E-03 0.00000000E+00 4.66485513E-04 1.18096522E-18 1.86737241E-03
+ 4.52258903E-18 1.37025727E-03 0.00000000E+00 5.48122226E-03 0.00000000E+00
+-1.68067231E-04-5.50908790E-10 3.50043425E-08 2.49186357E-14 0.00000000E+00
+-6.48720455E-10 0.00000000E+00 4.27710347E-14 4.66485193E-04 1.17511322E-18
+-2.49195147E-04-5.83682453E-19 1.37025138E-03 0.00000000E+00-7.08750895E-04
+ 0.00000000E+00 4.66485193E-04 1.17511322E-18-2.49195147E-04-5.83682453E-19
+ 1.37025138E-03 0.00000000E+00-7.08750895E-04 0.00000000E+00 0.00000000E+00
+-6.20045796E-10 0.00000000E+00 3.99642700E-14 1.43575629E-04-5.35285289E-10
+-3.56679367E-08 2.01495625E-14-6.61646915E-04 0.00000000E+00-2.18291979E-04
+ 4.47094593E-19-6.61646915E-04 0.00000000E+00-2.18291979E-04 4.47094593E-19
+ 0.00000000E+00 1.39470238E-08 0.00000000E+00 8.28002445E-14-3.43029201E-03
+ 1.19321554E-08-7.06622747E-08 4.52286578E-14 1.37025727E-03 0.00000000E+00
+ 5.48122226E-03 0.00000000E+00 4.66485513E-04-1.18096522E-18 1.86737241E-03
+-4.52258903E-18 1.37025727E-03 0.00000000E+00 5.48122226E-03 0.00000000E+00
+ 4.66485513E-04-1.18096522E-18 1.86737241E-03-4.52258903E-18 0.00000000E+00
+-6.48720455E-10 0.00000000E+00 4.27710347E-14 1.68067231E-04-5.50908790E-10
+-3.50043425E-08 2.49186357E-14 1.37025138E-03 0.00000000E+00-7.08750895E-04
+ 0.00000000E+00 4.66485193E-04-1.17511322E-18-2.49195147E-04 5.83682453E-19
+ 1.37025138E-03 0.00000000E+00-7.08750895E-04 0.00000000E+00 4.66485193E-04
+-1.17511322E-18-2.49195147E-04 5.83682453E-19 9.61969799E-07 2.67287295E-21
+ 5.70389214E-09 1.57735176E-23-1.15514818E-04 0.00000000E+00-6.90591171E-07
+ 0.00000000E+00-3.56679367E-08-2.01495625E-14 0.00000000E+00-3.99642700E-14
+-3.56679367E-08-2.01495625E-14 0.00000000E+00-3.99642700E-14 2.97032093E-07
+-3.30378404E-21-1.30236545E-08-5.84792283E-23-7.37537209E-06 0.00000000E+00
+ 1.78592139E-06 0.00000000E+00 1.57713530E-05 5.60840478E-11-7.06622747E-08
+-4.52286578E-14 0.00000000E+00 6.53666808E-11 0.00000000E+00-8.28002445E-14
+ 1.57713530E-05 5.60840478E-11-7.06622747E-08-4.52286578E-14 0.00000000E+00
+ 6.53666808E-11 0.00000000E+00-8.28002445E-14-6.64939836E-07-5.60555578E-21
+ 4.05090022E-09 3.25265280E-23 1.08133195E-04 0.00000000E+00-6.49517827E-07
+ 0.00000000E+00-1.66194131E-05-5.66260921E-11-3.50043425E-08-2.49186357E-14
+ 0.00000000E+00-6.63601531E-11 0.00000000E+00-4.27710347E-14-1.66194131E-05
+-5.66260921E-11-3.50043425E-08-2.49186357E-14 0.00000000E+00-6.63601531E-11
+ 0.00000000E+00-4.27710347E-14-1.52222884E-04-4.22038138E-19-9.41466737E-07
+-2.60024549E-21 1.84311727E-02 0.00000000E+00 1.14949796E-04 0.00000000E+00
+ 1.58683069E-04 5.43818346E-10 0.00000000E+00 6.36972165E-10 1.58683069E-04
+ 5.43818346E-10 0.00000000E+00 6.36972165E-10-7.53806080E-04-3.05249244E-18
+ 2.97032093E-07-3.30378404E-21 1.03234703E-01 0.00000000E+00-7.37537209E-06
+ 0.00000000E+00-3.04740482E-03-1.08042051E-08-3.43029201E-03-1.19321554E-08
+ 0.00000000E+00-1.25974050E-08 0.00000000E+00-1.39470238E-08-3.04740482E-03
+-1.08042051E-08-3.43029201E-03-1.19321554E-08 0.00000000E+00-1.25974050E-08
+ 0.00000000E+00-1.39470238E-08-1.08107595E-04-8.66002379E-19 6.86869346E-07
+ 5.23105304E-21 1.73350316E-02 0.00000000E+00-1.08624704E-04 0.00000000E+00
+-3.18891877E-03-1.08946909E-08 1.53240554E-04 5.40355350E-10 0.00000000E+00
+-1.27632137E-08 0.00000000E+00 6.30604955E-10-3.18891877E-03-1.08946909E-08
+ 1.53240554E-04 5.40355350E-10 0.00000000E+00-1.27632137E-08 0.00000000E+00
+ 6.30604955E-10-1.15514818E-04 0.00000000E+00-6.90591171E-07 0.00000000E+00
+ 9.61969799E-07-2.67287295E-21 5.70389214E-09-1.57735176E-23 0.00000000E+00
+-3.99642700E-14 3.56679367E-08-2.01495625E-14 0.00000000E+00-3.99642700E-14
+ 3.56679367E-08-2.01495625E-14-7.37537209E-06 0.00000000E+00 1.78592139E-06
+ 0.00000000E+00 2.97032093E-07 3.30378404E-21-1.30236545E-08 5.84792283E-23
+ 0.00000000E+00 6.53666808E-11 0.00000000E+00-8.28002445E-14-1.57713530E-05
+ 5.60840478E-11 7.06622747E-08-4.52286578E-14 0.00000000E+00 6.53666808E-11
+ 0.00000000E+00-8.28002445E-14-1.57713530E-05 5.60840478E-11 7.06622747E-08
+-4.52286578E-14 1.08133195E-04 0.00000000E+00-6.49517827E-07 0.00000000E+00
+-6.64939836E-07 5.60555578E-21 4.05090022E-09-3.25265280E-23 0.00000000E+00
+-6.63601531E-11 0.00000000E+00-4.27710347E-14 1.66194131E-05-5.66260921E-11
+ 3.50043425E-08-2.49186357E-14 0.00000000E+00-6.63601531E-11 0.00000000E+00
+-4.27710347E-14 1.66194131E-05-5.66260921E-11 3.50043425E-08-2.49186357E-14
+ 0.00000000E+00 1.27632137E-08 0.00000000E+00 6.63601531E-11-3.18891877E-03
+ 1.08946909E-08-1.66194131E-05 5.66260921E-11 1.37025138E-03 0.00000000E+00
+ 4.66485193E-04-1.17511322E-18 1.37025138E-03 0.00000000E+00 4.66485193E-04
+-1.17511322E-18 0.00000000E+00 1.28225002E-08 0.00000000E+00-6.65312373E-11
+-3.23744248E-03 1.09292286E-08 1.67594304E-05-5.67257666E-11 1.13398450E-02
+ 0.00000000E+00 1.46475220E-03 0.00000000E+00 3.98598104E-03-9.23413590E-18
+ 5.30295395E-04-1.15961660E-18 1.13398450E-02 0.00000000E+00 1.46475220E-03
+ 0.00000000E+00 3.98598104E-03-9.23413590E-18 5.30295395E-04-1.15961660E-18
+ 3.18891877E-03 1.08946909E-08 1.66194131E-05 5.66260921E-11 0.00000000E+00
+ 1.27632137E-08 0.00000000E+00 6.63601531E-11 4.66485193E-04 1.17511322E-18
+ 1.37025138E-03 0.00000000E+00 4.66485193E-04 1.17511322E-18 1.37025138E-03
+ 0.00000000E+00 3.23744248E-03 1.09292286E-08-1.67594304E-05-5.67257666E-11
+ 0.00000000E+00 1.28225002E-08 0.00000000E+00-6.65312373E-11 3.98598104E-03
+ 9.23413590E-18 5.30295395E-04 1.15961660E-18 1.13398450E-02 0.00000000E+00
+ 1.46475220E-03 0.00000000E+00 3.98598104E-03 9.23413590E-18 5.30295395E-04
+ 1.15961660E-18 1.13398450E-02 0.00000000E+00 1.46475220E-03 0.00000000E+00
+ 0.00000000E+00 1.27632137E-08 0.00000000E+00 6.63601531E-11-3.18891877E-03
+ 1.08946909E-08-1.66194131E-05 5.66260921E-11 1.37025138E-03 0.00000000E+00
+ 4.66485193E-04-1.17511322E-18 1.42855211E-01 0.00000000E+00 3.08395779E-02
+-7.11749993E-17 0.00000000E+00 1.28225002E-08 0.00000000E+00-6.65312373E-11
+-3.23744248E-03 1.09292286E-08 1.67594304E-05-5.67257666E-11 1.13398450E-02
+ 0.00000000E+00 1.46475220E-03 0.00000000E+00 3.98598104E-03-9.23413590E-18
+ 5.30295395E-04-1.15961660E-18 1.10730613E+00 0.00000000E+00 1.34053126E-01
+ 0.00000000E+00 2.46933143E-01-4.43821644E-16 3.08939460E-02-4.74640937E-17
+ 1.73350316E-02 0.00000000E+00 1.08133195E-04 0.00000000E+00-1.08107595E-04
+ 8.66002379E-19-6.64939836E-07 5.60555578E-21 0.00000000E+00 6.48720455E-10
+-1.68067231E-04 5.50908790E-10 0.00000000E+00 6.48720455E-10-1.68067231E-04
+ 5.50908790E-10 9.73185643E-02 0.00000000E+00-6.44105717E-06 0.00000000E+00
+-4.90265188E-04 5.25884635E-18 3.17368784E-07-2.91936120E-21 0.00000000E+00
+-1.28225002E-08 0.00000000E+00-1.42005171E-08 3.23744248E-03-1.09292286E-08
+ 3.63786209E-03-1.20797445E-08 0.00000000E+00-1.28225002E-08 0.00000000E+00
+-1.42005171E-08 3.23744248E-03-1.09292286E-08 3.63786209E-03-1.20797445E-08
+ 1.63778388E-02 0.00000000E+00-1.02609748E-04 0.00000000E+00-6.09715301E-05
+ 5.02490754E-19 3.92910811E-07-3.41022484E-21 0.00000000E+00-1.29986524E-08
+ 0.00000000E+00 6.41952276E-10 3.37628133E-03-1.10374652E-08-1.62727721E-04
+ 5.46758413E-10 0.00000000E+00-1.29986524E-08 0.00000000E+00 6.41952276E-10
+ 3.37628133E-03-1.10374652E-08-1.62727721E-04 5.46758413E-10-1.53240554E-04
+-5.40355350E-10 3.50043425E-08 2.49186357E-14 0.00000000E+00-6.30604955E-10
+ 0.00000000E+00 4.27710347E-14-2.49195147E-04-5.83682453E-19-7.08750895E-04
+ 0.00000000E+00-1.54333810E-02-2.96597732E-17-6.92270842E-02 0.00000000E+00
+ 3.63786209E-03 1.20797445E-08 6.93257784E-08 5.40684513E-14 0.00000000E+00
+ 1.42005171E-08 0.00000000E+00 8.79480904E-14 5.30295395E-04 1.15961660E-18
+ 2.12260318E-03 5.04649778E-18 1.46475220E-03 0.00000000E+00 5.85921468E-03
+ 0.00000000E+00 3.08939460E-02 4.74640937E-17 1.23576791E-01 2.38825112E-16
+ 1.34053126E-01 0.00000000E+00 5.36602938E-01 0.00000000E+00-1.77268886E-04
+-5.59060630E-10 3.43308526E-08 2.90466746E-14 0.00000000E+00-6.61076235E-10
+ 0.00000000E+00 4.51514036E-14 5.30295064E-04 1.21786742E-18-2.82095725E-04
+-8.25633236E-19 1.46474602E-03 0.00000000E+00-7.56150963E-04 0.00000000E+00
+ 3.08938568E-02 5.42604561E-17-1.54613504E-02-4.69646868E-17 1.34062038E-01
+ 0.00000000E+00-6.50913295E-02 0.00000000E+00 0.00000000E+00-6.30604955E-10
+ 0.00000000E+00 4.27710347E-14 1.53240554E-04-5.40355350E-10-3.50043425E-08
+ 2.49186357E-14-7.08750895E-04 0.00000000E+00-2.49195147E-04 5.83682453E-19
+-6.92270842E-02 0.00000000E+00-1.54333810E-02 2.96597732E-17 0.00000000E+00
+ 1.42005171E-08 0.00000000E+00 8.79480904E-14-3.63786209E-03 1.20797445E-08
+-6.93257784E-08 5.40684513E-14 1.46475220E-03 0.00000000E+00 5.85921468E-03
+ 0.00000000E+00 5.30295395E-04-1.15961660E-18 2.12260318E-03-5.04649778E-18
+ 1.34053126E-01 0.00000000E+00 5.36602938E-01 0.00000000E+00 3.08939460E-02
+-4.74640937E-17 1.23576791E-01-2.38825112E-16 0.00000000E+00-6.61076235E-10
+ 0.00000000E+00 4.51514036E-14 1.77268886E-04-5.59060630E-10-3.43308526E-08
+ 2.90466746E-14 1.46474602E-03 0.00000000E+00-7.56150963E-04 0.00000000E+00
+ 5.30295064E-04-1.21786742E-18-2.82095725E-04 8.25633236E-19 1.34062038E-01
+ 0.00000000E+00-6.50913295E-02 0.00000000E+00 3.08938568E-02-5.42604561E-17
+-1.54613504E-02 4.69646868E-17-1.53240554E-04-5.40355350E-10 3.50043425E-08
+ 2.49186357E-14 0.00000000E+00-6.30604955E-10 0.00000000E+00 4.27710347E-14
+-2.49195147E-04-5.83682453E-19-7.08750895E-04 0.00000000E+00-2.49195147E-04
+-5.83682453E-19-7.08750895E-04 0.00000000E+00 3.63786209E-03 1.20797445E-08
+ 6.93257784E-08 5.40684513E-14 0.00000000E+00 1.42005171E-08 0.00000000E+00
+ 8.79480904E-14 5.30295395E-04 1.15961660E-18 2.12260318E-03 5.04649778E-18
+ 1.46475220E-03 0.00000000E+00 5.85921468E-03 0.00000000E+00 5.30295395E-04
+ 1.15961660E-18 2.12260318E-03 5.04649778E-18 1.46475220E-03 0.00000000E+00
+ 5.85921468E-03 0.00000000E+00-1.77268886E-04-5.59060630E-10 3.43308526E-08
+ 2.90466746E-14 0.00000000E+00-6.61076235E-10 0.00000000E+00 4.51514036E-14
+ 5.30295064E-04 1.21786742E-18-2.82095725E-04-8.25633236E-19 1.46474602E-03
+ 0.00000000E+00-7.56150963E-04 0.00000000E+00 5.30295064E-04 1.21786742E-18
+-2.82095725E-04-8.25633236E-19 1.46474602E-03 0.00000000E+00-7.56150963E-04
+ 0.00000000E+00 0.00000000E+00-6.30604955E-10 0.00000000E+00 4.27710347E-14
+ 1.53240554E-04-5.40355350E-10-3.50043425E-08 2.49186357E-14-7.08750895E-04
+ 0.00000000E+00-2.49195147E-04 5.83682453E-19-7.08750895E-04 0.00000000E+00
+-2.49195147E-04 5.83682453E-19 0.00000000E+00 1.42005171E-08 0.00000000E+00
+ 8.79480904E-14-3.63786209E-03 1.20797445E-08-6.93257784E-08 5.40684513E-14
+ 1.46475220E-03 0.00000000E+00 5.85921468E-03 0.00000000E+00 5.30295395E-04
+-1.15961660E-18 2.12260318E-03-5.04649778E-18 1.46475220E-03 0.00000000E+00
+ 5.85921468E-03 0.00000000E+00 5.30295395E-04-1.15961660E-18 2.12260318E-03
+-5.04649778E-18 0.00000000E+00-6.61076235E-10 0.00000000E+00 4.51514036E-14
+ 1.77268886E-04-5.59060630E-10-3.43308526E-08 2.90466746E-14 1.46474602E-03
+ 0.00000000E+00-7.56150963E-04 0.00000000E+00 5.30295064E-04-1.21786742E-18
+-2.82095725E-04 8.25633236E-19 1.46474602E-03 0.00000000E+00-7.56150963E-04
+ 0.00000000E+00 5.30295064E-04-1.21786742E-18-2.82095725E-04 8.25633236E-19
+ 6.86869346E-07 5.23105304E-21 4.05090022E-09 3.25265280E-23-1.08624704E-04
+ 0.00000000E+00-6.49517827E-07 0.00000000E+00-3.50043425E-08-2.49186357E-14
+ 0.00000000E+00-4.27710347E-14-3.50043425E-08-2.49186357E-14 0.00000000E+00
+-4.27710347E-14 3.17368784E-07 2.91936120E-21-8.46546673E-09-8.02724933E-23
+-6.44105717E-06 0.00000000E+00 1.68348993E-06 0.00000000E+00 1.67594304E-05
+ 5.67257666E-11-6.93257784E-08-5.40684513E-14 0.00000000E+00 6.65312373E-11
+ 0.00000000E+00-8.79480904E-14 1.67594304E-05 5.67257666E-11-6.93257784E-08
+-5.40684513E-14 0.00000000E+00 6.65312373E-11 0.00000000E+00-8.79480904E-14
+-3.69502373E-07-2.86626192E-21 2.28474333E-09 1.87626260E-23 1.02178883E-04
+ 0.00000000E+00-6.13650719E-07 0.00000000E+00-1.75914525E-05-5.73742138E-11
+-3.43308526E-08-2.90466746E-14 0.00000000E+00-6.75867093E-11 0.00000000E+00
+-4.51514036E-14-1.75914525E-05-5.73742138E-11-3.43308526E-08-2.90466746E-14
+ 0.00000000E+00-6.75867093E-11 0.00000000E+00-4.51514036E-14-1.08107595E-04
+-8.66002379E-19-6.64939836E-07-5.60555578E-21 1.73350316E-02 0.00000000E+00
+ 1.08133195E-04 0.00000000E+00 1.68067231E-04 5.50908790E-10 0.00000000E+00
+ 6.48720455E-10 1.68067231E-04 5.50908790E-10 0.00000000E+00 6.48720455E-10
+-4.90265188E-04-5.25884635E-18 3.17368784E-07 2.91936120E-21 9.73185643E-02
+ 0.00000000E+00-6.44105717E-06 0.00000000E+00-3.23744248E-03-1.09292286E-08
+-3.63786209E-03-1.20797445E-08 0.00000000E+00-1.28225002E-08 0.00000000E+00
+-1.42005171E-08-3.23744248E-03-1.09292286E-08-3.63786209E-03-1.20797445E-08
+ 0.00000000E+00-1.28225002E-08 0.00000000E+00-1.42005171E-08-6.09715301E-05
+-5.02490754E-19 3.92910811E-07 3.41022484E-21 1.63778388E-02 0.00000000E+00
+-1.02609748E-04 0.00000000E+00-3.37628133E-03-1.10374652E-08 1.62727721E-04
+ 5.46758413E-10 0.00000000E+00-1.29986524E-08 0.00000000E+00 6.41952276E-10
+-3.37628133E-03-1.10374652E-08 1.62727721E-04 5.46758413E-10 0.00000000E+00
+-1.29986524E-08 0.00000000E+00 6.41952276E-10-1.08624704E-04 0.00000000E+00
+-6.49517827E-07 0.00000000E+00 6.86869346E-07-5.23105304E-21 4.05090022E-09
+-3.25265280E-23 0.00000000E+00-4.27710347E-14 3.50043425E-08-2.49186357E-14
+ 0.00000000E+00-4.27710347E-14 3.50043425E-08-2.49186357E-14-6.44105717E-06
+ 0.00000000E+00 1.68348993E-06 0.00000000E+00 3.17368784E-07-2.91936120E-21
+-8.46546673E-09 8.02724933E-23 0.00000000E+00 6.65312373E-11 0.00000000E+00
+-8.79480904E-14-1.67594304E-05 5.67257666E-11 6.93257784E-08-5.40684513E-14
+ 0.00000000E+00 6.65312373E-11 0.00000000E+00-8.79480904E-14-1.67594304E-05
+ 5.67257666E-11 6.93257784E-08-5.40684513E-14 1.02178883E-04 0.00000000E+00
+-6.13650719E-07 0.00000000E+00-3.69502373E-07 2.86626192E-21 2.28474333E-09
+-1.87626260E-23 0.00000000E+00-6.75867093E-11 0.00000000E+00-4.51514036E-14
+ 1.75914525E-05-5.73742138E-11 3.43308526E-08-2.90466746E-14 0.00000000E+00
+-6.75867093E-11 0.00000000E+00-4.51514036E-14 1.75914525E-05-5.73742138E-11
+ 3.43308526E-08-2.90466746E-14 3.37628133E-03 1.10374652E-08 1.75914525E-05
+ 5.73742138E-11 0.00000000E+00 1.29986524E-08 0.00000000E+00 6.75867093E-11
+ 5.30295064E-04 1.21786742E-18 1.46474602E-03 0.00000000E+00 3.08938568E-02
+ 5.42604561E-17 1.34062038E-01 0.00000000E+00 3.42387044E-03 1.10777263E-08
+-1.77287759E-05-5.74904005E-11 0.00000000E+00 1.30612394E-08 0.00000000E+00
+-6.77673149E-11 4.51239745E-03 1.33834824E-17 5.98087834E-04 2.08466552E-18
+ 1.20982350E-02 0.00000000E+00 1.55985783E-03 0.00000000E+00 2.47380666E-01
+ 7.57200916E-16 3.09515449E-02 1.33598291E-16 1.04119002E+00 0.00000000E+00
+ 1.26303280E-01 0.00000000E+00 0.00000000E+00 1.29986524E-08 0.00000000E+00
+ 6.75867093E-11-3.37628133E-03 1.10374652E-08-1.75914525E-05 5.73742138E-11
+ 1.46474602E-03 0.00000000E+00 5.30295064E-04-1.21786742E-18 1.46474602E-03
+ 0.00000000E+00 5.30295064E-04-1.21786742E-18 0.00000000E+00 1.30612394E-08
+ 0.00000000E+00-6.77673149E-11-3.42387044E-03 1.10777263E-08 1.77287759E-05
+-5.74904005E-11 1.20982350E-02 0.00000000E+00 1.55985783E-03 0.00000000E+00
+ 4.51239745E-03-1.33834824E-17 5.98087834E-04-2.08466552E-18 1.20982350E-02
+ 0.00000000E+00 1.55985783E-03 0.00000000E+00 4.51239745E-03-1.33834824E-17
+ 5.98087834E-04-2.08466552E-18 3.37628133E-03 1.10374652E-08 1.75914525E-05
+ 5.73742138E-11 0.00000000E+00 1.29986524E-08 0.00000000E+00 6.75867093E-11
+ 5.30295064E-04 1.21786742E-18 1.46474602E-03 0.00000000E+00 5.30295064E-04
+ 1.21786742E-18 1.46474602E-03 0.00000000E+00 3.42387044E-03 1.10777263E-08
+-1.77287759E-05-5.74904005E-11 0.00000000E+00 1.30612394E-08 0.00000000E+00
+-6.77673149E-11 4.51239745E-03 1.33834824E-17 5.98087834E-04 2.08466552E-18
+ 1.20982350E-02 0.00000000E+00 1.55985783E-03 0.00000000E+00 4.51239745E-03
+ 1.33834824E-17 5.98087834E-04 2.08466552E-18 1.20982350E-02 0.00000000E+00
+ 1.55985783E-03 0.00000000E+00 0.00000000E+00 1.29986524E-08 0.00000000E+00
+ 6.75867093E-11-3.37628133E-03 1.10374652E-08-1.75914525E-05 5.73742138E-11
+ 1.46474602E-03 0.00000000E+00 5.30295064E-04-1.21786742E-18 1.34062038E-01
+ 0.00000000E+00 3.08938568E-02-5.42604561E-17 0.00000000E+00 1.30612394E-08
+ 0.00000000E+00-6.77673149E-11-3.42387044E-03 1.10777263E-08 1.77287759E-05
+-5.74904005E-11 1.20982350E-02 0.00000000E+00 1.55985783E-03 0.00000000E+00
+ 4.51239745E-03-1.33834824E-17 5.98087834E-04-2.08466552E-18 1.04119002E+00
+ 0.00000000E+00 1.26303280E-01 0.00000000E+00 2.47380666E-01-7.57200916E-16
+ 3.09515449E-02-1.33598291E-16 3.73933855E-03 1.13841572E-08 1.94746300E-05
+ 5.91857201E-11 0.00000000E+00 1.35042826E-08 0.00000000E+00 7.02187729E-11
+ 6.69836861E-04 2.25684001E-18 1.65560763E-03 0.00000000E+00 3.10123216E-02
+ 1.06033020E-16 1.19426488E-01 0.00000000E+00 3.78481071E-03 1.14339307E-08
+-1.96058431E-05-5.93293506E-11 0.00000000E+00 1.35721818E-08 0.00000000E+00
+-7.04147030E-11 5.66029950E-03 2.01820988E-17 7.45517793E-04 2.53812162E-18
+ 1.36304698E-02 0.00000000E+00 1.75206054E-03 0.00000000E+00 2.48354458E-01
+ 6.41248053E-16 3.10765226E-02 5.64284492E-17 9.30592878E-01 0.00000000E+00
+ 1.13269851E-01 0.00000000E+00 3.55985759E-03 1.12014449E-08 1.85437037E-05
+ 5.82316456E-11 0.00000000E+00 1.32462245E-08 0.00000000E+00 6.88757290E-11
+ 5.98087376E-04 1.97210373E-18 1.55985140E-03 0.00000000E+00 3.09514547E-02
+ 1.35474268E-16 1.26310204E-01 0.00000000E+00 3.60640812E-03 1.12467354E-08
+-1.86780274E-05-5.83623424E-11 0.00000000E+00 1.33116495E-08 0.00000000E+00
+-6.90645216E-11 5.07057202E-03 1.54542871E-17 6.69837368E-04 1.97333379E-18
+ 1.28616713E-02 0.00000000E+00 1.65561435E-03 0.00000000E+00 2.47854532E-01
+ 1.01235124E-15 3.10124112E-02 1.11524575E-16 9.82697582E-01 0.00000000E+00
+ 1.19421035E-01 0.00000000E+00 0.00000000E+00 1.32462245E-08 0.00000000E+00
+ 6.88757290E-11-3.55985759E-03 1.12014449E-08-1.85437037E-05 5.82316456E-11
+ 1.55985140E-03 0.00000000E+00 5.98087376E-04-1.97210373E-18 1.55985140E-03
+ 0.00000000E+00 5.98087376E-04-1.97210373E-18 0.00000000E+00 1.33116495E-08
+ 0.00000000E+00-6.90645216E-11-3.60640812E-03 1.12467354E-08 1.86780274E-05
+-5.83623424E-11 1.28616713E-02 0.00000000E+00 1.65561435E-03 0.00000000E+00
+ 5.07057202E-03-1.54542871E-17 6.69837368E-04-1.97333379E-18 1.28616713E-02
+ 0.00000000E+00 1.65561435E-03 0.00000000E+00 5.07057202E-03-1.54542871E-17
+ 6.69837368E-04-1.97333379E-18 3.55985759E-03 1.12014449E-08 1.85437037E-05
+ 5.82316456E-11 0.00000000E+00 1.32462245E-08 0.00000000E+00 6.88757290E-11
+ 5.98087376E-04 1.97210373E-18 1.55985140E-03 0.00000000E+00 5.98087376E-04
+ 1.97210373E-18 1.55985140E-03 0.00000000E+00 3.60640812E-03 1.12467354E-08
+-1.86780274E-05-5.83623424E-11 0.00000000E+00 1.33116495E-08 0.00000000E+00
+-6.90645216E-11 5.07057202E-03 1.54542871E-17 6.69837368E-04 1.97333379E-18
+ 1.28616713E-02 0.00000000E+00 1.65561435E-03 0.00000000E+00 5.07057202E-03
+ 1.54542871E-17 6.69837368E-04 1.97333379E-18 1.28616713E-02 0.00000000E+00
+ 1.65561435E-03 0.00000000E+00 0.00000000E+00 1.32462245E-08 0.00000000E+00
+ 6.88757290E-11-3.55985759E-03 1.12014449E-08-1.85437037E-05 5.82316456E-11
+ 1.55985140E-03 0.00000000E+00 5.98087376E-04-1.97210373E-18 1.26310204E-01
+ 0.00000000E+00 3.09514547E-02-1.35474268E-16 0.00000000E+00 1.33116495E-08
+ 0.00000000E+00-6.90645216E-11-3.60640812E-03 1.12467354E-08 1.86780274E-05
+-5.83623424E-11 1.28616713E-02 0.00000000E+00 1.65561435E-03 0.00000000E+00
+ 5.07057202E-03-1.54542871E-17 6.69837368E-04-1.97333379E-18 9.82697582E-01
+ 0.00000000E+00 1.19421035E-01 0.00000000E+00 2.47854532E-01-1.01235124E-15
+ 3.10124112E-02-1.11524575E-16 1.63778388E-02 0.00000000E+00 1.02178883E-04
+ 0.00000000E+00-6.09715301E-05 5.02490754E-19-3.69502373E-07 2.86626192E-21
+ 0.00000000E+00 6.61076235E-10-1.77268886E-04 5.59060630E-10 0.00000000E+00
+ 6.61076235E-10-1.77268886E-04 5.59060630E-10 9.21332007E-02 0.00000000E+00
+-5.66664573E-06 0.00000000E+00-2.09091798E-04 1.74733010E-18 3.37839566E-07
+ 1.12619249E-21 0.00000000E+00-1.30612394E-08 0.00000000E+00-1.44681447E-08
+ 3.42387044E-03-1.10777263E-08 3.84140447E-03-1.22518416E-08 0.00000000E+00
+-1.30612394E-08 0.00000000E+00-1.44681447E-08 3.42387044E-03-1.10777263E-08
+ 3.84140447E-03-1.22518416E-08 1.55357984E-02 0.00000000E+00-9.73198184E-05
+ 0.00000000E+00-1.07934970E-05 6.25493877E-19 7.99209911E-08-3.63139980E-21
+ 0.00000000E+00-1.32462245E-08 0.00000000E+00 6.53965997E-10 3.55985759E-03
+-1.12014449E-08-1.72038893E-04 5.54311349E-10 0.00000000E+00-1.32462245E-08
+ 0.00000000E+00 6.53965997E-10 3.55985759E-03-1.12014449E-08-1.72038893E-04
+ 5.54311349E-10-1.62727721E-04-5.46758413E-10 3.43308526E-08 2.90466746E-14
+ 0.00000000E+00-6.41952276E-10 0.00000000E+00 4.51514036E-14-2.82095725E-04
+-8.25633236E-19-7.56150963E-04 0.00000000E+00-1.54613504E-02-4.69646868E-17
+-6.50913295E-02 0.00000000E+00 3.84140447E-03 1.22518416E-08 6.78993153E-08
+ 6.17814029E-14 0.00000000E+00 1.44681447E-08 0.00000000E+00 9.23457622E-14
+ 5.98087834E-04 2.08466552E-18 2.39376366E-03 7.82764522E-18 1.55985783E-03
+ 0.00000000E+00 6.23965101E-03 0.00000000E+00 3.09515449E-02 1.33598291E-16
+ 1.23807167E-01 5.02230023E-16 1.26303280E-01 0.00000000E+00 5.05537532E-01
+ 0.00000000E+00-1.86262667E-04-5.68150309E-10 3.35809077E-08 3.26742122E-14
+ 0.00000000E+00-6.73957080E-10 0.00000000E+00 4.71981452E-14 5.98087376E-04
+ 1.97210373E-18-3.16981186E-04-9.86359380E-19 1.55985140E-03 0.00000000E+00
+-8.03866436E-04 0.00000000E+00 3.09514547E-02 1.35474268E-16-1.54909665E-02
+-6.17497107E-17 1.26310204E-01 0.00000000E+00-6.14328097E-02 0.00000000E+00
+ 0.00000000E+00-6.41952276E-10 0.00000000E+00 4.51514036E-14 1.62727721E-04
+-5.46758413E-10-3.43308526E-08 2.90466746E-14-7.56150963E-04 0.00000000E+00
+-2.82095725E-04 8.25633236E-19-6.50913295E-02 0.00000000E+00-1.54613504E-02
+ 4.69646868E-17 0.00000000E+00 1.44681447E-08 0.00000000E+00 9.23457622E-14
+-3.84140447E-03 1.22518416E-08-6.78993153E-08 6.17814029E-14 1.55985783E-03
+ 0.00000000E+00 6.23965101E-03 0.00000000E+00 5.98087834E-04-2.08466552E-18
+ 2.39376366E-03-7.82764522E-18 1.26303280E-01 0.00000000E+00 5.05537532E-01
+ 0.00000000E+00 3.09515449E-02-1.33598291E-16 1.23807167E-01-5.02230023E-16
+ 0.00000000E+00-6.73957080E-10 0.00000000E+00 4.71981452E-14 1.86262667E-04
+-5.68150309E-10-3.35809077E-08 3.26742122E-14 1.55985140E-03 0.00000000E+00
+-8.03866436E-04 0.00000000E+00 5.98087376E-04-1.97210373E-18-3.16981186E-04
+ 9.86359380E-19 1.26310204E-01 0.00000000E+00-6.14328097E-02 0.00000000E+00
+ 3.09514547E-02-1.35474268E-16-1.54909665E-02 6.17497107E-17-1.62727721E-04
+-5.46758413E-10 3.43308526E-08 2.90466746E-14 0.00000000E+00-6.41952276E-10
+ 0.00000000E+00 4.51514036E-14-2.82095725E-04-8.25633236E-19-7.56150963E-04
+ 0.00000000E+00-2.82095725E-04-8.25633236E-19-7.56150963E-04 0.00000000E+00
+ 3.84140447E-03 1.22518416E-08 6.78993153E-08 6.17814029E-14 0.00000000E+00
+ 1.44681447E-08 0.00000000E+00 9.23457622E-14 5.98087834E-04 2.08466552E-18
+ 2.39376366E-03 7.82764522E-18 1.55985783E-03 0.00000000E+00 6.23965101E-03
+ 0.00000000E+00 5.98087834E-04 2.08466552E-18 2.39376366E-03 7.82764522E-18
+ 1.55985783E-03 0.00000000E+00 6.23965101E-03 0.00000000E+00-1.86262667E-04
+-5.68150309E-10 3.35809077E-08 3.26742122E-14 0.00000000E+00-6.73957080E-10
+ 0.00000000E+00 4.71981452E-14 5.98087376E-04 1.97210373E-18-3.16981186E-04
+-9.86359380E-19 1.55985140E-03 0.00000000E+00-8.03866436E-04 0.00000000E+00
+ 5.98087376E-04 1.97210373E-18-3.16981186E-04-9.86359380E-19 1.55985140E-03
+ 0.00000000E+00-8.03866436E-04 0.00000000E+00 0.00000000E+00-6.41952276E-10
+ 0.00000000E+00 4.51514036E-14 1.62727721E-04-5.46758413E-10-3.43308526E-08
+ 2.90466746E-14-7.56150963E-04 0.00000000E+00-2.82095725E-04 8.25633236E-19
+-7.56150963E-04 0.00000000E+00-2.82095725E-04 8.25633236E-19 0.00000000E+00
+ 1.44681447E-08 0.00000000E+00 9.23457622E-14-3.84140447E-03 1.22518416E-08
+-6.78993153E-08 6.17814029E-14 1.55985783E-03 0.00000000E+00 6.23965101E-03
+ 0.00000000E+00 5.98087834E-04-2.08466552E-18 2.39376366E-03-7.82764522E-18
+ 1.55985783E-03 0.00000000E+00 6.23965101E-03 0.00000000E+00 5.98087834E-04
+-2.08466552E-18 2.39376366E-03-7.82764522E-18 0.00000000E+00-6.73957080E-10
+ 0.00000000E+00 4.71981452E-14 1.86262667E-04-5.68150309E-10-3.35809077E-08
+ 3.26742122E-14 1.55985140E-03 0.00000000E+00-8.03866436E-04 0.00000000E+00
+ 5.98087376E-04-1.97210373E-18-3.16981186E-04 9.86359380E-19 1.55985140E-03
+ 0.00000000E+00-8.03866436E-04 0.00000000E+00 5.98087376E-04-1.97210373E-18
+-3.16981186E-04 9.86359380E-19 3.92910811E-07 3.41022484E-21 2.28474333E-09
+ 1.87626260E-23-1.02609748E-04 0.00000000E+00-6.13650719E-07 0.00000000E+00
+-3.43308526E-08-2.90466746E-14 0.00000000E+00-4.51514036E-14-3.43308526E-08
+-2.90466746E-14 0.00000000E+00-4.51514036E-14 3.37839566E-07-1.12619249E-21
+-3.60338404E-09-4.21931663E-23-5.66664573E-06 0.00000000E+00 1.59372021E-06
+ 0.00000000E+00 1.77287759E-05 5.74904005E-11-6.78993153E-08-6.17814029E-14
+ 0.00000000E+00 6.77673149E-11 0.00000000E+00-9.23457622E-14 1.77287759E-05
+ 5.74904005E-11-6.78993153E-08-6.17814029E-14 0.00000000E+00 6.77673149E-11
+ 0.00000000E+00-9.23457622E-14-5.50629385E-08-4.18819921E-21 4.04629904E-10
+ 2.34209122E-23 9.69394486E-05 0.00000000E+00-5.82098282E-07 0.00000000E+00
+-1.85437037E-05-5.82316456E-11-3.35809077E-08-3.26742122E-14 0.00000000E+00
+-6.88757290E-11 0.00000000E+00-4.71981452E-14-1.85437037E-05-5.82316456E-11
+-3.35809077E-08-3.26742122E-14 0.00000000E+00-6.88757290E-11 0.00000000E+00
+-4.71981452E-14-6.09715301E-05-5.02490754E-19-3.69502373E-07-2.86626192E-21
+ 1.63778388E-02 0.00000000E+00 1.02178883E-04 0.00000000E+00 1.77268886E-04
+ 5.59060630E-10 0.00000000E+00 6.61076235E-10 1.77268886E-04 5.59060630E-10
+ 0.00000000E+00 6.61076235E-10-2.09091798E-04-1.74733010E-18 3.37839566E-07
+-1.12619249E-21 9.21332007E-02 0.00000000E+00-5.66664573E-06 0.00000000E+00
+-3.42387044E-03-1.10777263E-08-3.84140447E-03-1.22518416E-08 0.00000000E+00
+-1.30612394E-08 0.00000000E+00-1.44681447E-08-3.42387044E-03-1.10777263E-08
+-3.84140447E-03-1.22518416E-08 0.00000000E+00-1.30612394E-08 0.00000000E+00
+-1.44681447E-08-1.07934970E-05-6.25493877E-19 7.99209911E-08 3.63139980E-21
+ 1.55357984E-02 0.00000000E+00-9.73198184E-05 0.00000000E+00-3.55985759E-03
+-1.12014449E-08 1.72038893E-04 5.54311349E-10 0.00000000E+00-1.32462245E-08
+ 0.00000000E+00 6.53965997E-10-3.55985759E-03-1.12014449E-08 1.72038893E-04
+ 5.54311349E-10 0.00000000E+00-1.32462245E-08 0.00000000E+00 6.53965997E-10
+-1.02609748E-04 0.00000000E+00-6.13650719E-07 0.00000000E+00 3.92910811E-07
+-3.41022484E-21 2.28474333E-09-1.87626260E-23 0.00000000E+00-4.51514036E-14
+ 3.43308526E-08-2.90466746E-14 0.00000000E+00-4.51514036E-14 3.43308526E-08
+-2.90466746E-14-5.66664573E-06 0.00000000E+00 1.59372021E-06 0.00000000E+00
+ 3.37839566E-07 1.12619249E-21-3.60338404E-09 4.21931663E-23 0.00000000E+00
+ 6.77673149E-11 0.00000000E+00-9.23457622E-14-1.77287759E-05 5.74904005E-11
+ 6.78993153E-08-6.17814029E-14 0.00000000E+00 6.77673149E-11 0.00000000E+00
+-9.23457622E-14-1.77287759E-05 5.74904005E-11 6.78993153E-08-6.17814029E-14
+ 9.69394486E-05 0.00000000E+00-5.82098282E-07 0.00000000E+00-5.50629385E-08
+ 4.18819921E-21 4.04629904E-10-2.34209122E-23 0.00000000E+00-6.88757290E-11
+ 0.00000000E+00-4.71981452E-14 1.85437037E-05-5.82316456E-11 3.35809077E-08
+-3.26742122E-14 0.00000000E+00-6.88757290E-11 0.00000000E+00-4.71981452E-14
+ 1.85437037E-05-5.82316456E-11 3.35809077E-08-3.26742122E-14 1.55357984E-02
+ 0.00000000E+00 9.69394486E-05 0.00000000E+00-1.07934970E-05 6.25493877E-19
+-5.50629385E-08 4.18819921E-21 0.00000000E+00 6.73957080E-10-1.86262667E-04
+ 5.68150309E-10 0.00000000E+00 6.73957080E-10-1.86262667E-04 5.68150309E-10
+ 8.75564702E-02 0.00000000E+00-5.01768613E-06 0.00000000E+00 8.96015981E-05
+ 6.05671826E-18 3.58415057E-07 3.62204566E-21 0.00000000E+00-1.33116495E-08
+ 0.00000000E+00-1.47479251E-08 3.60640812E-03-1.12467354E-08 4.04052513E-03
+-1.24454730E-08 0.00000000E+00-1.33116495E-08 0.00000000E+00-1.47479251E-08
+ 3.60640812E-03-1.12467354E-08 4.04052513E-03-1.24454730E-08 1.47902400E-02
+ 0.00000000E+00-9.26370669E-05 0.00000000E+00 4.24401357E-05 1.09801840E-18
+-2.52151547E-07-7.01480269E-21 0.00000000E+00-1.35042826E-08 0.00000000E+00
+ 6.66550967E-10 3.73933855E-03-1.13841572E-08-1.81150365E-04 5.62871447E-10
+ 0.00000000E+00-1.35042826E-08 0.00000000E+00 6.66550967E-10 3.73933855E-03
+-1.13841572E-08-1.81150365E-04 5.62871447E-10-1.72038893E-04-5.54311349E-10
+ 3.35809077E-08 3.26742122E-14 0.00000000E+00-6.53965997E-10 0.00000000E+00
+ 4.71981452E-14-3.16981186E-04-9.86359380E-19-8.03866436E-04 0.00000000E+00
+-1.54909665E-02-6.17497107E-17-6.14328097E-02 0.00000000E+00 4.04052513E-03
+ 1.24454730E-08 6.63726649E-08 6.86107824E-14 0.00000000E+00 1.47479251E-08
+ 0.00000000E+00 9.61548650E-14 6.69837368E-04 1.97333379E-18 2.68075234E-03
+ 8.53759535E-18 1.65561435E-03 0.00000000E+00 6.62269041E-03 0.00000000E+00
+ 3.10124112E-02 1.11524575E-16 1.24050624E-01 4.25956419E-16 1.19421035E-01
+ 0.00000000E+00 4.77956660E-01 0.00000000E+00-1.95044666E-04-5.78080161E-10
+ 3.28032585E-08 3.59076205E-14 0.00000000E+00-6.87298010E-10 0.00000000E+00
+ 4.89825262E-14 6.69836861E-04 2.25684001E-18-3.53838664E-04-1.19874041E-18
+ 1.65560763E-03 0.00000000E+00-8.51917043E-04 0.00000000E+00 3.10123216E-02
+ 1.06033020E-16-1.55222111E-02-4.06153673E-17 1.19426488E-01 0.00000000E+00
+-5.81740847E-02 0.00000000E+00 0.00000000E+00-6.53965997E-10 0.00000000E+00
+ 4.71981452E-14 1.72038893E-04-5.54311349E-10-3.35809077E-08 3.26742122E-14
+-8.03866436E-04 0.00000000E+00-3.16981186E-04 9.86359380E-19-6.14328097E-02
+ 0.00000000E+00-1.54909665E-02 6.17497107E-17 0.00000000E+00 1.47479251E-08
+ 0.00000000E+00 9.61548650E-14-4.04052513E-03 1.24454730E-08-6.63726649E-08
+ 6.86107824E-14 1.65561435E-03 0.00000000E+00 6.62269041E-03 0.00000000E+00
+ 6.69837368E-04-1.97333379E-18 2.68075234E-03-8.53759535E-18 1.19421035E-01
+ 0.00000000E+00 4.77956660E-01 0.00000000E+00 3.10124112E-02-1.11524575E-16
+ 1.24050624E-01-4.25956419E-16 0.00000000E+00-6.87298010E-10 0.00000000E+00
+ 4.89825262E-14 1.95044666E-04-5.78080161E-10-3.28032585E-08 3.59076205E-14
+ 1.65560763E-03 0.00000000E+00-8.51917043E-04 0.00000000E+00 6.69836861E-04
+-2.25684001E-18-3.53838664E-04 1.19874041E-18 1.19426488E-01 0.00000000E+00
+-5.81740847E-02 0.00000000E+00 3.10123216E-02-1.06033020E-16-1.55222111E-02
+ 4.06153673E-17-1.72038893E-04-5.54311349E-10 3.35809077E-08 3.26742122E-14
+ 0.00000000E+00-6.53965997E-10 0.00000000E+00 4.71981452E-14-3.16981186E-04
+-9.86359380E-19-8.03866436E-04 0.00000000E+00-3.16981186E-04-9.86359380E-19
+-8.03866436E-04 0.00000000E+00 4.04052513E-03 1.24454730E-08 6.63726649E-08
+ 6.86107824E-14 0.00000000E+00 1.47479251E-08 0.00000000E+00 9.61548650E-14
+ 6.69837368E-04 1.97333379E-18 2.68075234E-03 8.53759535E-18 1.65561435E-03
+ 0.00000000E+00 6.62269041E-03 0.00000000E+00 6.69837368E-04 1.97333379E-18
+ 2.68075234E-03 8.53759535E-18 1.65561435E-03 0.00000000E+00 6.62269041E-03
+ 0.00000000E+00-1.95044666E-04-5.78080161E-10 3.28032585E-08 3.59076205E-14
+ 0.00000000E+00-6.87298010E-10 0.00000000E+00 4.89825262E-14 6.69836861E-04
+ 2.25684001E-18-3.53838664E-04-1.19874041E-18 1.65560763E-03 0.00000000E+00
+-8.51917043E-04 0.00000000E+00 6.69836861E-04 2.25684001E-18-3.53838664E-04
+-1.19874041E-18 1.65560763E-03 0.00000000E+00-8.51917043E-04 0.00000000E+00
+ 0.00000000E+00-6.53965997E-10 0.00000000E+00 4.71981452E-14 1.72038893E-04
+-5.54311349E-10-3.35809077E-08 3.26742122E-14-8.03866436E-04 0.00000000E+00
+-3.16981186E-04 9.86359380E-19-8.03866436E-04 0.00000000E+00-3.16981186E-04
+ 9.86359380E-19 0.00000000E+00 1.47479251E-08 0.00000000E+00 9.61548650E-14
+-4.04052513E-03 1.24454730E-08-6.63726649E-08 6.86107824E-14 1.65561435E-03
+ 0.00000000E+00 6.62269041E-03 0.00000000E+00 6.69837368E-04-1.97333379E-18
+ 2.68075234E-03-8.53759535E-18 1.65561435E-03 0.00000000E+00 6.62269041E-03
+ 0.00000000E+00 6.69837368E-04-1.97333379E-18 2.68075234E-03-8.53759535E-18
+ 0.00000000E+00-6.87298010E-10 0.00000000E+00 4.89825262E-14 1.95044666E-04
+-5.78080161E-10-3.28032585E-08 3.59076205E-14 1.65560763E-03 0.00000000E+00
+-8.51917043E-04 0.00000000E+00 6.69836861E-04-2.25684001E-18-3.53838664E-04
+ 1.19874041E-18 1.65560763E-03 0.00000000E+00-8.51917043E-04 0.00000000E+00
+ 6.69836861E-04-2.25684001E-18-3.53838664E-04 1.19874041E-18 7.99209911E-08
+ 3.63139980E-21 4.04629904E-10 2.34209122E-23-9.73198184E-05 0.00000000E+00
+-5.82098282E-07 0.00000000E+00-3.35809077E-08-3.26742122E-14 0.00000000E+00
+-4.71981452E-14-3.35809077E-08-3.26742122E-14 0.00000000E+00-4.71981452E-14
+ 3.58415057E-07-3.62204566E-21 1.56239093E-09-9.67273515E-23-5.01768613E-06
+ 0.00000000E+00 1.51449637E-06 0.00000000E+00 1.86780274E-05 5.83623424E-11
+-6.63726649E-08-6.86107824E-14 0.00000000E+00 6.90645216E-11 0.00000000E+00
+-9.61548650E-14 1.86780274E-05 5.83623424E-11-6.63726649E-08-6.86107824E-14
+ 0.00000000E+00 6.90645216E-11 0.00000000E+00-9.61548650E-14 2.78497228E-07
+-6.73284424E-21-1.58994964E-09 4.13167003E-23 9.22992794E-05 0.00000000E+00
+-5.54160978E-07 0.00000000E+00-1.94746300E-05-5.91857201E-11-3.28032585E-08
+-3.59076205E-14 0.00000000E+00-7.02187729E-11 0.00000000E+00-4.89825262E-14
+-1.94746300E-05-5.91857201E-11-3.28032585E-08-3.59076205E-14 0.00000000E+00
+-7.02187729E-11 0.00000000E+00-4.89825262E-14-1.07934970E-05-6.25493877E-19
+-5.50629385E-08-4.18819921E-21 1.55357984E-02 0.00000000E+00 9.69394486E-05
+ 0.00000000E+00 1.86262667E-04 5.68150309E-10 0.00000000E+00 6.73957080E-10
+ 1.86262667E-04 5.68150309E-10 0.00000000E+00 6.73957080E-10 8.96015981E-05
+-6.05671826E-18 3.58415057E-07-3.62204566E-21 8.75564702E-02 0.00000000E+00
+-5.01768613E-06 0.00000000E+00-3.60640812E-03-1.12467354E-08-4.04052513E-03
+-1.24454730E-08 0.00000000E+00-1.33116495E-08 0.00000000E+00-1.47479251E-08
+-3.60640812E-03-1.12467354E-08-4.04052513E-03-1.24454730E-08 0.00000000E+00
+-1.33116495E-08 0.00000000E+00-1.47479251E-08 4.24401357E-05-1.09801840E-18
+-2.52151547E-07 7.01480269E-21 1.47902400E-02 0.00000000E+00-9.26370669E-05
+ 0.00000000E+00-3.73933855E-03-1.13841572E-08 1.81150365E-04 5.62871447E-10
+ 0.00000000E+00-1.35042826E-08 0.00000000E+00 6.66550967E-10-3.73933855E-03
+-1.13841572E-08 1.81150365E-04 5.62871447E-10 0.00000000E+00-1.35042826E-08
+ 0.00000000E+00 6.66550967E-10-9.73198184E-05 0.00000000E+00-5.82098282E-07
+ 0.00000000E+00 7.99209911E-08-3.63139980E-21 4.04629904E-10-2.34209122E-23
+ 0.00000000E+00-4.71981452E-14 3.35809077E-08-3.26742122E-14 0.00000000E+00
+-4.71981452E-14 3.35809077E-08-3.26742122E-14-5.01768613E-06 0.00000000E+00
+ 1.51449637E-06 0.00000000E+00 3.58415057E-07 3.62204566E-21 1.56239093E-09
+ 9.67273515E-23 0.00000000E+00 6.90645216E-11 0.00000000E+00-9.61548650E-14
+-1.86780274E-05 5.83623424E-11 6.63726649E-08-6.86107824E-14 0.00000000E+00
+ 6.90645216E-11 0.00000000E+00-9.61548650E-14-1.86780274E-05 5.83623424E-11
+ 6.63726649E-08-6.86107824E-14 9.22992794E-05 0.00000000E+00-5.54160978E-07
+ 0.00000000E+00 2.78497228E-07 6.73284424E-21-1.58994964E-09-4.13167003E-23
+ 0.00000000E+00-7.02187729E-11 0.00000000E+00-4.89825262E-14 1.94746300E-05
+-5.91857201E-11 3.28032585E-08-3.59076205E-14 0.00000000E+00-7.02187729E-11
+ 0.00000000E+00-4.89825262E-14 1.94746300E-05-5.91857201E-11 3.28032585E-08
+-3.59076205E-14 0.00000000E+00 1.35042826E-08 0.00000000E+00 7.02187729E-11
+-3.73933855E-03 1.13841572E-08-1.94746300E-05 5.91857201E-11 1.65560763E-03
+ 0.00000000E+00 6.69836861E-04-2.25684001E-18 1.65560763E-03 0.00000000E+00
+ 6.69836861E-04-2.25684001E-18 0.00000000E+00 1.35721818E-08 0.00000000E+00
+-7.04147030E-11-3.78481071E-03 1.14339307E-08 1.96058431E-05-5.93293506E-11
+ 1.36304698E-02 0.00000000E+00 1.75206054E-03 0.00000000E+00 5.66029950E-03
+-2.01820988E-17 7.45517793E-04-2.53812162E-18 1.36304698E-02 0.00000000E+00
+ 1.75206054E-03 0.00000000E+00 5.66029950E-03-2.01820988E-17 7.45517793E-04
+-2.53812162E-18 3.73933855E-03 1.13841572E-08 1.94746300E-05 5.91857201E-11
+ 0.00000000E+00 1.35042826E-08 0.00000000E+00 7.02187729E-11 6.69836861E-04
+ 2.25684001E-18 1.65560763E-03 0.00000000E+00 6.69836861E-04 2.25684001E-18
+ 1.65560763E-03 0.00000000E+00 3.78481071E-03 1.14339307E-08-1.96058431E-05
+-5.93293506E-11 0.00000000E+00 1.35721818E-08 0.00000000E+00-7.04147030E-11
+ 5.66029950E-03 2.01820988E-17 7.45517793E-04 2.53812162E-18 1.36304698E-02
+ 0.00000000E+00 1.75206054E-03 0.00000000E+00 5.66029950E-03 2.01820988E-17
+ 7.45517793E-04 2.53812162E-18 1.36304698E-02 0.00000000E+00 1.75206054E-03
+ 0.00000000E+00 0.00000000E+00 1.35042826E-08 0.00000000E+00 7.02187729E-11
+-3.73933855E-03 1.13841572E-08-1.94746300E-05 5.91857201E-11 1.65560763E-03
+ 0.00000000E+00 6.69836861E-04-2.25684001E-18 1.19426488E-01 0.00000000E+00
+ 3.10123216E-02-1.06033020E-16 0.00000000E+00 1.35721818E-08 0.00000000E+00
+-7.04147030E-11-3.78481071E-03 1.14339307E-08 1.96058431E-05-5.93293506E-11
+ 1.36304698E-02 0.00000000E+00 1.75206054E-03 0.00000000E+00 5.66029950E-03
+-2.01820988E-17 7.45517793E-04-2.53812162E-18 9.30592878E-01 0.00000000E+00
+ 1.13269851E-01 0.00000000E+00 2.48354458E-01-6.41248053E-16 3.10765226E-02
+-5.64284492E-17 6.50928138E-03 0.00000000E+00 3.06365241E-05 0.00000000E+00
+ 1.31230169E-03-4.87650804E-18 6.19138708E-06-2.29843270E-20 0.00000000E+00
+-1.24827704E-10-2.29265257E-04-1.07197462E-10 0.00000000E+00-1.24827704E-10
+-2.29265257E-04-1.07197462E-10 1.87512929E-02 0.00000000E+00-5.17679706E-05
+ 0.00000000E+00 3.84441653E-03-1.41688665E-17-1.05560173E-05 3.90219168E-20
+ 0.00000000E+00-4.87166607E-09 0.00000000E+00-9.38462609E-10 4.57061742E-03
+-4.14102755E-09 2.51683468E-03-7.96052301E-10 0.00000000E+00-4.87166607E-09
+ 0.00000000E+00-9.38462609E-10 4.57061742E-03-4.14102755E-09 2.51683468E-03
+-7.96052301E-10-2.27488326E-04-6.20467873E-10 3.16206903E-09-1.29360787E-12
+ 0.00000000E+00-7.27570100E-10 0.00000000E+00-1.51534493E-12-1.09271660E-03
+-2.48943771E-18-1.42537591E-03 0.00000000E+00-1.23717249E-02-2.51217038E-17
+-2.20383866E-02 0.00000000E+00 2.51683468E-03 7.96052301E-10-4.47458764E-06
+-1.78420705E-12 0.00000000E+00 9.38462609E-10 0.00000000E+00-2.10459794E-12
+ 2.22653918E-03 4.97512614E-18 4.43253626E-03 1.00280934E-17 2.88428653E-03
+ 0.00000000E+00 5.75176074E-03 0.00000000E+00 2.47761074E-02 7.13508582E-17
+ 4.95351995E-02 1.33612476E-16 4.36849440E-02 0.00000000E+00 8.75662485E-02
+ 0.00000000E+00 4.56480308E-03 6.52256408E-09 1.78613161E-05 2.36382481E-11
+ 0.00000000E+00 7.66143530E-09 0.00000000E+00 2.77773453E-11 2.14432722E-03
+ 4.98262469E-18 2.81721709E-03 0.00000000E+00 2.47107924E-02 2.91359571E-17
+ 4.44686025E-02 0.00000000E+00 4.57061742E-03 4.14102755E-09-1.78739643E-05
+-1.84638166E-11 0.00000000E+00 4.87166607E-09 0.00000000E+00-2.17159656E-11
+ 1.74833260E-02 3.94248488E-17 2.22653918E-03 4.97512614E-18 2.28061455E-02
+ 0.00000000E+00 2.88428653E-03 0.00000000E+00 1.97950279E-01 3.94122483E-16
+ 2.47761074E-02 7.13508582E-17 3.52609973E-01 0.00000000E+00 4.36849440E-02
+ 0.00000000E+00 0.00000000E+00-7.27570100E-10 0.00000000E+00-1.51534493E-12
+ 2.27488326E-04-6.20467873E-10-3.16206903E-09-1.29360787E-12-1.42537591E-03
+ 0.00000000E+00-1.09271660E-03 2.48943771E-18-2.20383866E-02 0.00000000E+00
+-1.23717249E-02 2.51217038E-17 0.00000000E+00 9.38462609E-10 0.00000000E+00
+-2.10459794E-12-2.51683468E-03 7.96052301E-10 4.47458764E-06-1.78420705E-12
+ 2.88428653E-03 0.00000000E+00 5.75176074E-03 0.00000000E+00 2.22653918E-03
+-4.97512614E-18 4.43253626E-03-1.00280934E-17 4.36849440E-02 0.00000000E+00
+ 8.75662485E-02 0.00000000E+00 2.47761074E-02-7.13508582E-17 4.95351995E-02
+-1.33612476E-16 0.00000000E+00 7.66143530E-09 0.00000000E+00 2.77773453E-11
+-4.56480308E-03 6.52256408E-09-1.78613161E-05 2.36382481E-11 2.81721709E-03
+ 0.00000000E+00 2.14432722E-03-4.98262469E-18 4.44686025E-02 0.00000000E+00
+ 2.47107924E-02-2.91359571E-17 0.00000000E+00 4.87166607E-09 0.00000000E+00
+-2.17159656E-11-4.57061742E-03 4.14102755E-09 1.78739643E-05-1.84638166E-11
+ 2.28061455E-02 0.00000000E+00 2.88428653E-03 0.00000000E+00 1.74833260E-02
+-3.94248488E-17 2.22653918E-03-4.97512614E-18 3.52609973E-01 0.00000000E+00
+ 4.36849440E-02 0.00000000E+00 1.97950279E-01-3.94122483E-16 2.47761074E-02
+-7.13508582E-17-2.27488326E-04-6.20467873E-10 3.16206903E-09-1.29360787E-12
+ 0.00000000E+00-7.27570100E-10 0.00000000E+00-1.51534493E-12-1.09271660E-03
+-2.48943771E-18-1.42537591E-03 0.00000000E+00-1.09271660E-03-2.48943771E-18
+-1.42537591E-03 0.00000000E+00 2.51683468E-03 7.96052301E-10-4.47458764E-06
+-1.78420705E-12 0.00000000E+00 9.38462609E-10 0.00000000E+00-2.10459794E-12
+ 2.22653918E-03 4.97512614E-18 4.43253626E-03 1.00280934E-17 2.88428653E-03
+ 0.00000000E+00 5.75176074E-03 0.00000000E+00 2.22653918E-03 4.97512614E-18
+ 4.43253626E-03 1.00280934E-17 2.88428653E-03 0.00000000E+00 5.75176074E-03
+ 0.00000000E+00 4.56480308E-03 6.52256408E-09 1.78613161E-05 2.36382481E-11
+ 0.00000000E+00 7.66143530E-09 0.00000000E+00 2.77773453E-11 2.14432722E-03
+ 4.98262469E-18 2.81721709E-03 0.00000000E+00 2.14432722E-03 4.98262469E-18
+ 2.81721709E-03 0.00000000E+00 4.57061742E-03 4.14102755E-09-1.78739643E-05
+-1.84638166E-11 0.00000000E+00 4.87166607E-09 0.00000000E+00-2.17159656E-11
+ 1.74833260E-02 3.94248488E-17 2.22653918E-03 4.97512614E-18 2.28061455E-02
+ 0.00000000E+00 2.88428653E-03 0.00000000E+00 1.74833260E-02 3.94248488E-17
+ 2.22653918E-03 4.97512614E-18 2.28061455E-02 0.00000000E+00 2.88428653E-03
+ 0.00000000E+00 0.00000000E+00-7.27570100E-10 0.00000000E+00-1.51534493E-12
+ 2.27488326E-04-6.20467873E-10-3.16206903E-09-1.29360787E-12-1.42537591E-03
+ 0.00000000E+00-1.09271660E-03 2.48943771E-18-1.42537591E-03 0.00000000E+00
+-1.09271660E-03 2.48943771E-18 0.00000000E+00 9.38462609E-10 0.00000000E+00
+-2.10459794E-12-2.51683468E-03 7.96052301E-10 4.47458764E-06-1.78420705E-12
+ 2.88428653E-03 0.00000000E+00 5.75176074E-03 0.00000000E+00 2.22653918E-03
+-4.97512614E-18 4.43253626E-03-1.00280934E-17 2.88428653E-03 0.00000000E+00
+ 5.75176074E-03 0.00000000E+00 2.22653918E-03-4.97512614E-18 4.43253626E-03
+-1.00280934E-17 0.00000000E+00 7.66143530E-09 0.00000000E+00 2.77773453E-11
+-4.56480308E-03 6.52256408E-09-1.78613161E-05 2.36382481E-11 2.81721709E-03
+ 0.00000000E+00 2.14432722E-03-4.98262469E-18 2.81721709E-03 0.00000000E+00
+ 2.14432722E-03-4.98262469E-18 0.00000000E+00 4.87166607E-09 0.00000000E+00
+-2.17159656E-11-4.57061742E-03 4.14102755E-09 1.78739643E-05-1.84638166E-11
+ 2.28061455E-02 0.00000000E+00 2.88428653E-03 0.00000000E+00 1.74833260E-02
+-3.94248488E-17 2.22653918E-03-4.97512614E-18 2.28061455E-02 0.00000000E+00
+ 2.88428653E-03 0.00000000E+00 1.74833260E-02-3.94248488E-17 2.22653918E-03
+-4.97512614E-18-6.16659582E-06-2.29388208E-20-2.78887831E-08-1.03641438E-22
+-3.06615677E-05 0.00000000E+00-1.38334004E-07 0.00000000E+00-3.16206903E-09
+ 1.29360787E-12 0.00000000E+00 1.51534493E-12-3.16206903E-09 1.29360787E-12
+ 0.00000000E+00 1.51534493E-12-1.05560173E-05-3.90219168E-20 3.74276068E-08
+ 1.38613576E-22-5.17679706E-05 0.00000000E+00 1.84201018E-07 0.00000000E+00
+ 1.78739643E-05 1.84638166E-11 4.47458764E-06 1.78420705E-12 0.00000000E+00
+ 2.17159656E-11 0.00000000E+00 2.10459794E-12 1.78739643E-05 1.84638166E-11
+ 4.47458764E-06 1.78420705E-12 0.00000000E+00 2.17159656E-11 0.00000000E+00
+ 2.10459794E-12 1.31230169E-03 4.87650804E-18 6.19138708E-06 2.29843270E-20
+ 6.50928138E-03 0.00000000E+00 3.06365241E-05 0.00000000E+00 2.29265257E-04
+-1.07197462E-10 0.00000000E+00-1.24827704E-10 2.29265257E-04-1.07197462E-10
+ 0.00000000E+00-1.24827704E-10 3.84441653E-03 1.41688665E-17-1.05560173E-05
+-3.90219168E-20 1.87512929E-02 0.00000000E+00-5.17679706E-05 0.00000000E+00
+-4.57061742E-03-4.14102755E-09-2.51683468E-03-7.96052301E-10 0.00000000E+00
+-4.87166607E-09 0.00000000E+00-9.38462609E-10-4.57061742E-03-4.14102755E-09
+-2.51683468E-03-7.96052301E-10 0.00000000E+00-4.87166607E-09 0.00000000E+00
+-9.38462609E-10-3.06615677E-05 0.00000000E+00-1.38334004E-07 0.00000000E+00
+-6.16659582E-06 2.29388208E-20-2.78887831E-08 1.03641438E-22 0.00000000E+00
+ 1.51534493E-12 3.16206903E-09 1.29360787E-12 0.00000000E+00 1.51534493E-12
+ 3.16206903E-09 1.29360787E-12-5.17679706E-05 0.00000000E+00 1.84201018E-07
+ 0.00000000E+00-1.05560173E-05 3.90219168E-20 3.74276068E-08-1.38613576E-22
+ 0.00000000E+00 2.17159656E-11 0.00000000E+00 2.10459794E-12-1.78739643E-05
+ 1.84638166E-11-4.47458764E-06 1.78420705E-12 0.00000000E+00 2.17159656E-11
+ 0.00000000E+00 2.10459794E-12-1.78739643E-05 1.84638166E-11-4.47458764E-06
+ 1.78420705E-12-2.26075347E-04-6.59647223E-10 3.75570681E-09-3.74879498E-13
+ 0.00000000E+00-7.61482664E-10 0.00000000E+00-4.13197110E-13-1.05188479E-03
+-2.79949782E-18-1.39193211E-03 0.00000000E+00-1.23386165E-02-1.09608352E-17
+-2.24375345E-02 0.00000000E+00 5.01140417E-03 1.01464726E-08 7.07039325E-09
+-1.61055597E-12 0.00000000E+00 1.18844306E-08 0.00000000E+00-1.85716606E-12
+ 2.14426594E-03 5.03239378E-18 8.57762161E-03 2.04319392E-17 2.81713339E-03
+ 0.00000000E+00 1.12688905E-02 0.00000000E+00 2.47100065E-02 2.90525835E-17
+ 9.88415145E-02 1.26360496E-16 4.44670589E-02 0.00000000E+00 1.77882882E-01
+ 0.00000000E+00-2.29265257E-04 1.07197462E-10 3.16206903E-09-1.29360787E-12
+ 0.00000000E+00 1.24827704E-10 0.00000000E+00-1.51534493E-12 2.14432722E-03
+ 4.98262469E-18-1.09271660E-03-2.48943771E-18 2.81721709E-03 0.00000000E+00
+-1.42537591E-03 0.00000000E+00 2.47107924E-02 2.91359571E-17-1.23717249E-02
+-2.51217038E-17 4.44686025E-02 0.00000000E+00-2.20383866E-02 0.00000000E+00
+ 6.58072453E-03 0.00000000E+00 3.09721118E-05 0.00000000E+00 1.24458427E-03
+-4.66717884E-18 5.87224580E-06-2.20335315E-20 0.00000000E+00 5.26712703E-10
+-2.28187918E-04 4.46890440E-10 0.00000000E+00 5.26712703E-10-2.28187918E-04
+ 4.46890440E-10 3.78129638E-02 0.00000000E+00-3.62408526E-07 0.00000000E+00
+ 7.38560376E-03-2.76749755E-17 3.43510607E-07-1.04380797E-21 0.00000000E+00
+-1.26760070E-08 0.00000000E+00-1.18844306E-08 4.54618375E-03-1.08670212E-08
+ 5.01140417E-03-1.01464726E-08 0.00000000E+00-1.26760070E-08 0.00000000E+00
+-1.18844306E-08 4.54618375E-03-1.08670212E-08 5.01140417E-03-1.01464726E-08
+ 6.50928138E-03 0.00000000E+00-3.06615677E-05 0.00000000E+00 1.31230169E-03
+-4.87650804E-18-6.16659582E-06 2.29388208E-20 0.00000000E+00-7.66143530E-09
+ 0.00000000E+00 7.27570100E-10 4.56480308E-03-6.52256408E-09-2.27488326E-04
+ 6.20467873E-10 0.00000000E+00-7.66143530E-09 0.00000000E+00 7.27570100E-10
+ 4.56480308E-03-6.52256408E-09-2.27488326E-04 6.20467873E-10-3.09987668E-05
+ 0.00000000E+00-1.39852334E-07 0.00000000E+00-5.84803556E-06 2.19195393E-20
+-2.64496313E-08 9.92014838E-23 0.00000000E+00 4.13197110E-13 3.75570681E-09
+ 3.74879498E-13 0.00000000E+00 4.13197110E-13 3.75570681E-09 3.74879498E-13
+-3.62408526E-07 0.00000000E+00 3.70900439E-07 0.00000000E+00 3.43510607E-07
+-1.04380797E-21 7.24458804E-08-2.71060893E-22 0.00000000E+00 5.04394958E-11
+ 0.00000000E+00 1.85716606E-12-1.77773451E-05 4.32704077E-11 7.07039325E-09
+ 1.61055597E-12 0.00000000E+00 5.04394958E-11 0.00000000E+00 1.85716606E-12
+-1.77773451E-05 4.32704077E-11 7.07039325E-09 1.61055597E-12 3.06365241E-05
+ 0.00000000E+00-1.38334004E-07 0.00000000E+00 6.19138708E-06-2.29843270E-20
+-2.78887831E-08 1.03641438E-22 0.00000000E+00-2.77773453E-11 0.00000000E+00
+ 1.51534493E-12 1.78613161E-05-2.36382481E-11 3.16206903E-09 1.29360787E-12
+ 0.00000000E+00-2.77773453E-11 0.00000000E+00 1.51534493E-12 1.78613161E-05
+-2.36382481E-11 3.16206903E-09 1.29360787E-12 1.24458427E-03 4.66717884E-18
+ 5.87224580E-06 2.20335315E-20 6.58072453E-03 0.00000000E+00 3.09721118E-05
+ 0.00000000E+00 2.28187918E-04 4.46890440E-10 0.00000000E+00 5.26712703E-10
+ 2.28187918E-04 4.46890440E-10 0.00000000E+00 5.26712703E-10 7.38560376E-03
+ 2.76749755E-17 3.43510607E-07 1.04380797E-21 3.78129638E-02 0.00000000E+00
+-3.62408526E-07 0.00000000E+00-4.54618375E-03-1.08670212E-08-5.01140417E-03
+-1.01464726E-08 0.00000000E+00-1.26760070E-08 0.00000000E+00-1.18844306E-08
+-4.54618375E-03-1.08670212E-08-5.01140417E-03-1.01464726E-08 0.00000000E+00
+-1.26760070E-08 0.00000000E+00-1.18844306E-08 1.31230169E-03 4.87650804E-18
+-6.16659582E-06-2.29388208E-20 6.50928138E-03 0.00000000E+00-3.06615677E-05
+ 0.00000000E+00-4.56480308E-03-6.52256408E-09 2.27488326E-04 6.20467873E-10
+ 0.00000000E+00-7.66143530E-09 0.00000000E+00 7.27570100E-10-4.56480308E-03
+-6.52256408E-09 2.27488326E-04 6.20467873E-10 0.00000000E+00-7.66143530E-09
+ 0.00000000E+00 7.27570100E-10-5.84803556E-06-2.19195393E-20-2.64496313E-08
+-9.92014838E-23-3.09987668E-05 0.00000000E+00-1.39852334E-07 0.00000000E+00
+-3.75570681E-09 3.74879498E-13 0.00000000E+00 4.13197110E-13-3.75570681E-09
+ 3.74879498E-13 0.00000000E+00 4.13197110E-13 3.43510607E-07 1.04380797E-21
+ 7.24458804E-08 2.71060893E-22-3.62408526E-07 0.00000000E+00 3.70900439E-07
+ 0.00000000E+00 1.77773451E-05 4.32704077E-11-7.07039325E-09 1.61055597E-12
+ 0.00000000E+00 5.04394958E-11 0.00000000E+00 1.85716606E-12 1.77773451E-05
+ 4.32704077E-11-7.07039325E-09 1.61055597E-12 0.00000000E+00 5.04394958E-11
+ 0.00000000E+00 1.85716606E-12 6.19138708E-06 2.29843270E-20-2.78887831E-08
+-1.03641438E-22 3.06365241E-05 0.00000000E+00-1.38334004E-07 0.00000000E+00
+-1.78613161E-05-2.36382481E-11-3.16206903E-09 1.29360787E-12 0.00000000E+00
+-2.77773453E-11 0.00000000E+00 1.51534493E-12-1.78613161E-05-2.36382481E-11
+-3.16206903E-09 1.29360787E-12 0.00000000E+00-2.77773453E-11 0.00000000E+00
+ 1.51534493E-12 0.00000000E+00 1.34460767E-08 0.00000000E+00 5.20922842E-11
+-4.53926966E-03 1.15647113E-08-1.77623223E-05 4.47699256E-11 2.75059506E-03
+ 0.00000000E+00 2.06327321E-03-6.16559751E-18 2.75059506E-03 0.00000000E+00
+ 2.06327321E-03-6.16559751E-18 0.00000000E+00 1.26760070E-08 0.00000000E+00
+-5.04394958E-11-4.54618375E-03 1.08670212E-08 1.77773451E-05-4.32704077E-11
+ 2.22706126E-02 0.00000000E+00 2.81713339E-03 0.00000000E+00 1.68296980E-02
+-4.48406387E-17 2.14426594E-03-5.03239378E-18 2.22706126E-02 0.00000000E+00
+ 2.81713339E-03 0.00000000E+00 1.68296980E-02-4.48406387E-17 2.14426594E-03
+-5.03239378E-18 0.00000000E+00-7.61482664E-10 0.00000000E+00-4.13197110E-13
+ 2.26075347E-04-6.59647223E-10-3.75570681E-09-3.74879498E-13-1.39193211E-03
+ 0.00000000E+00-1.05188479E-03 2.79949782E-18-1.39193211E-03 0.00000000E+00
+-1.05188479E-03 2.79949782E-18 0.00000000E+00 1.18844306E-08 0.00000000E+00
+-1.85716606E-12-5.01140417E-03 1.01464726E-08-7.07039325E-09-1.61055597E-12
+ 2.81713339E-03 0.00000000E+00 1.12688905E-02 0.00000000E+00 2.14426594E-03
+-5.03239378E-18 8.57762161E-03-2.04319392E-17 2.81713339E-03 0.00000000E+00
+ 1.12688905E-02 0.00000000E+00 2.14426594E-03-5.03239378E-18 8.57762161E-03
+-2.04319392E-17 0.00000000E+00 1.24827704E-10 0.00000000E+00-1.51534493E-12
+ 2.29265257E-04 1.07197462E-10-3.16206903E-09-1.29360787E-12 2.81721709E-03
+ 0.00000000E+00-1.42537591E-03 0.00000000E+00 2.14432722E-03-4.98262469E-18
+-1.09271660E-03 2.48943771E-18 2.81721709E-03 0.00000000E+00-1.42537591E-03
+ 0.00000000E+00 2.14432722E-03-4.98262469E-18-1.09271660E-03 2.48943771E-18
+ 4.53926966E-03 1.15647113E-08 1.77623223E-05 4.47699256E-11 0.00000000E+00
+ 1.34460767E-08 0.00000000E+00 5.20922842E-11 2.06327321E-03 6.16559751E-18
+ 2.75059506E-03 0.00000000E+00 2.06327321E-03 6.16559751E-18 2.75059506E-03
+ 0.00000000E+00 4.54618375E-03 1.08670212E-08-1.77773451E-05-4.32704077E-11
+ 0.00000000E+00 1.26760070E-08 0.00000000E+00-5.04394958E-11 1.68296980E-02
+ 4.48406387E-17 2.14426594E-03 5.03239378E-18 2.22706126E-02 0.00000000E+00
+ 2.81713339E-03 0.00000000E+00 1.68296980E-02 4.48406387E-17 2.14426594E-03
+ 5.03239378E-18 2.22706126E-02 0.00000000E+00 2.81713339E-03 0.00000000E+00
+-2.26075347E-04-6.59647223E-10 3.75570681E-09-3.74879498E-13 0.00000000E+00
+-7.61482664E-10 0.00000000E+00-4.13197110E-13-1.05188479E-03-2.79949782E-18
+-1.39193211E-03 0.00000000E+00-1.05188479E-03-2.79949782E-18-1.39193211E-03
+ 0.00000000E+00 5.01140417E-03 1.01464726E-08 7.07039325E-09-1.61055597E-12
+ 0.00000000E+00 1.18844306E-08 0.00000000E+00-1.85716606E-12 2.14426594E-03
+ 5.03239378E-18 8.57762161E-03 2.04319392E-17 2.81713339E-03 0.00000000E+00
+ 1.12688905E-02 0.00000000E+00 2.14426594E-03 5.03239378E-18 8.57762161E-03
+ 2.04319392E-17 2.81713339E-03 0.00000000E+00 1.12688905E-02 0.00000000E+00
+-2.29265257E-04 1.07197462E-10 3.16206903E-09-1.29360787E-12 0.00000000E+00
+ 1.24827704E-10 0.00000000E+00-1.51534493E-12 2.14432722E-03 4.98262469E-18
+-1.09271660E-03-2.48943771E-18 2.81721709E-03 0.00000000E+00-1.42537591E-03
+ 0.00000000E+00 2.14432722E-03 4.98262469E-18-1.09271660E-03-2.48943771E-18
+ 2.81721709E-03 0.00000000E+00-1.42537591E-03 0.00000000E+00 0.00000000E+00
+ 1.34460767E-08 0.00000000E+00 5.20922842E-11-4.53926966E-03 1.15647113E-08
+-1.77623223E-05 4.47699256E-11 2.75059506E-03 0.00000000E+00 2.06327321E-03
+-6.16559751E-18 4.52830791E-02 0.00000000E+00 2.46444594E-02-1.47907573E-17
+ 0.00000000E+00 1.26760070E-08 0.00000000E+00-5.04394958E-11-4.54618375E-03
+ 1.08670212E-08 1.77773451E-05-4.32704077E-11 2.22706126E-02 0.00000000E+00
+ 2.81713339E-03 0.00000000E+00 1.68296980E-02-4.48406387E-17 2.14426594E-03
+-5.03239378E-18 3.58988369E-01 0.00000000E+00 4.44670589E-02 0.00000000E+00
+ 1.97416506E-01-1.66835622E-16 2.47100065E-02-2.90525835E-17 0.00000000E+00
+-7.61482664E-10 0.00000000E+00-4.13197110E-13 2.26075347E-04-6.59647223E-10
+-3.75570681E-09-3.74879498E-13-1.39193211E-03 0.00000000E+00-1.05188479E-03
+ 2.79949782E-18-2.24375345E-02 0.00000000E+00-1.23386165E-02 1.09608352E-17
+ 0.00000000E+00 1.18844306E-08 0.00000000E+00-1.85716606E-12-5.01140417E-03
+ 1.01464726E-08-7.07039325E-09-1.61055597E-12 2.81713339E-03 0.00000000E+00
+ 1.12688905E-02 0.00000000E+00 2.14426594E-03-5.03239378E-18 8.57762161E-03
+-2.04319392E-17 4.44670589E-02 0.00000000E+00 1.77882882E-01 0.00000000E+00
+ 2.47100065E-02-2.90525835E-17 9.88415145E-02-1.26360496E-16 0.00000000E+00
+ 1.24827704E-10 0.00000000E+00-1.51534493E-12 2.29265257E-04 1.07197462E-10
+-3.16206903E-09-1.29360787E-12 2.81721709E-03 0.00000000E+00-1.42537591E-03
+ 0.00000000E+00 2.14432722E-03-4.98262469E-18-1.09271660E-03 2.48943771E-18
+ 4.44686025E-02 0.00000000E+00-2.20383866E-02 0.00000000E+00 2.47107924E-02
+-2.91359571E-17-1.23717249E-02 2.51217038E-17 4.53926966E-03 1.15647113E-08
+ 1.77623223E-05 4.47699256E-11 0.00000000E+00 1.34460767E-08 0.00000000E+00
+ 5.20922842E-11 2.06327321E-03 6.16559751E-18 2.75059506E-03 0.00000000E+00
+ 2.46444594E-02 1.47907573E-17 4.52830791E-02 0.00000000E+00 4.54618375E-03
+ 1.08670212E-08-1.77773451E-05-4.32704077E-11 0.00000000E+00 1.26760070E-08
+ 0.00000000E+00-5.04394958E-11 1.68296980E-02 4.48406387E-17 2.14426594E-03
+ 5.03239378E-18 2.22706126E-02 0.00000000E+00 2.81713339E-03 0.00000000E+00
+ 1.97416506E-01 1.66835622E-16 2.47100065E-02 2.90525835E-17 3.58988369E-01
+ 0.00000000E+00 4.44670589E-02 0.00000000E+00 5.97945193E-03 1.62930467E-08
+ 3.10721744E-05 8.45799959E-11 0.00000000E+00 1.87358990E-08 0.00000000E+00
+ 9.72749140E-11 2.59949574E-03 4.27672608E-18 3.53626850E-03 0.00000000E+00
+ 3.26098680E-02 5.78076322E-17 6.16393998E-02 0.00000000E+00 5.99367294E-03
+ 1.62489536E-08-3.11132090E-05-8.44633404E-11 0.00000000E+00 1.87119159E-08
+ 0.00000000E+00-9.72164760E-11 2.13547864E-02 5.52055320E-17 2.73941246E-03
+ 8.90375909E-18 2.87529656E-02 0.00000000E+00 3.65206025E-03 0.00000000E+00
+ 2.61326225E-01 2.84711866E-16 3.27216646E-02 1.70917629E-17 4.87020872E-01
+ 0.00000000E+00 6.01218408E-02 0.00000000E+00 8.85519020E-03 0.00000000E+00
+ 5.53261909E-05 0.00000000E+00 1.55073862E-03-5.00778496E-18 9.72220608E-06
+-3.18707215E-20 0.00000000E+00 9.32650430E-10-3.01486722E-04 8.06329969E-10
+ 0.00000000E+00 9.32650430E-10-3.01486722E-04 8.06329969E-10 4.45432806E-02
+ 0.00000000E+00-4.08758294E-05 0.00000000E+00 8.11293721E-03-2.92498338E-17
+-6.80657944E-06 2.04842944E-20 0.00000000E+00-1.87119159E-08 0.00000000E+00
+-1.79367425E-08 5.99367294E-03-1.62489536E-08 5.79674668E-03-1.55095688E-08
+ 0.00000000E+00-1.87119159E-08 0.00000000E+00-1.79367425E-08 5.99367294E-03
+-1.62489536E-08 5.79674668E-03-1.55095688E-08 6.58072453E-03 0.00000000E+00
+-3.09987668E-05 0.00000000E+00 1.24458427E-03-4.66717884E-18-5.84803556E-06
+ 2.19195393E-20 0.00000000E+00-1.34460767E-08 0.00000000E+00 7.61482664E-10
+ 4.53926966E-03-1.15647113E-08-2.26075347E-04 6.59647223E-10 0.00000000E+00
+-1.34460767E-08 0.00000000E+00 7.61482664E-10 4.53926966E-03-1.15647113E-08
+-2.26075347E-04 6.59647223E-10-2.97141383E-04-8.19599366E-10 1.02586464E-08
+-2.91638816E-14 0.00000000E+00-9.39771395E-10 0.00000000E+00-1.46094951E-14
+-1.33472705E-03-3.29512129E-18-1.79708219E-03 0.00000000E+00-1.63328831E-02
+-1.87248488E-17-3.04403101E-02 0.00000000E+00 5.79674668E-03 1.55095688E-08
+-3.36540984E-06-9.24957453E-12 0.00000000E+00 1.79367425E-08 0.00000000E+00
+-1.06094646E-11 2.73941246E-03 8.90375909E-18 9.59088113E-03 2.79500114E-17
+ 3.65206025E-03 0.00000000E+00 1.27931149E-02 0.00000000E+00 3.27216646E-02
+ 1.70917629E-17 1.14720882E-01 8.36334492E-17 6.01218408E-02 0.00000000E+00
+ 2.10991912E-01 0.00000000E+00-2.28187918E-04-4.46890440E-10 3.75570681E-09
+-3.74879498E-13 0.00000000E+00-5.26712703E-10 0.00000000E+00-4.13197110E-13
+ 2.06327321E-03 6.16559751E-18-1.05188479E-03-2.79949782E-18 2.75059506E-03
+ 0.00000000E+00-1.39193211E-03 0.00000000E+00 2.46444594E-02 1.47907573E-17
+-1.23386165E-02-1.09608352E-17 4.52830791E-02 0.00000000E+00-2.24375345E-02
+ 0.00000000E+00 0.00000000E+00-9.39771395E-10 0.00000000E+00-1.46094951E-14
+ 2.97141383E-04-8.19599366E-10-1.02586464E-08-2.91638816E-14-1.79708219E-03
+ 0.00000000E+00-1.33472705E-03 3.29512129E-18-3.04403101E-02 0.00000000E+00
+-1.63328831E-02 1.87248488E-17 0.00000000E+00 1.79367425E-08 0.00000000E+00
+-1.06094646E-11-5.79674668E-03 1.55095688E-08 3.36540984E-06-9.24957453E-12
+ 3.65206025E-03 0.00000000E+00 1.27931149E-02 0.00000000E+00 2.73941246E-03
+-8.90375909E-18 9.59088113E-03-2.79500114E-17 6.01218408E-02 0.00000000E+00
+ 2.10991912E-01 0.00000000E+00 3.27216646E-02-1.70917629E-17 1.14720882E-01
+-8.36334492E-17 0.00000000E+00-5.26712703E-10 0.00000000E+00-4.13197110E-13
+ 2.28187918E-04-4.46890440E-10-3.75570681E-09-3.74879498E-13 2.75059506E-03
+ 0.00000000E+00-1.39193211E-03 0.00000000E+00 2.06327321E-03-6.16559751E-18
+-1.05188479E-03 2.79949782E-18 4.52830791E-02 0.00000000E+00-2.24375345E-02
+ 0.00000000E+00 2.46444594E-02-1.47907573E-17-1.23386165E-02 1.09608352E-17
+-2.97141383E-04-8.19599366E-10 1.02586464E-08-2.91638816E-14 0.00000000E+00
+-9.39771395E-10 0.00000000E+00-1.46094951E-14-1.33472705E-03-3.29512129E-18
+-1.79708219E-03 0.00000000E+00-1.33472705E-03-3.29512129E-18-1.79708219E-03
+ 0.00000000E+00 5.79674668E-03 1.55095688E-08-3.36540984E-06-9.24957453E-12
+ 0.00000000E+00 1.79367425E-08 0.00000000E+00-1.06094646E-11 2.73941246E-03
+ 8.90375909E-18 9.59088113E-03 2.79500114E-17 3.65206025E-03 0.00000000E+00
+ 1.27931149E-02 0.00000000E+00 2.73941246E-03 8.90375909E-18 9.59088113E-03
+ 2.79500114E-17 3.65206025E-03 0.00000000E+00 1.27931149E-02 0.00000000E+00
+-2.28187918E-04-4.46890440E-10 3.75570681E-09-3.74879498E-13 0.00000000E+00
+-5.26712703E-10 0.00000000E+00-4.13197110E-13 2.06327321E-03 6.16559751E-18
+-1.05188479E-03-2.79949782E-18 2.75059506E-03 0.00000000E+00-1.39193211E-03
+ 0.00000000E+00 2.06327321E-03 6.16559751E-18-1.05188479E-03-2.79949782E-18
+ 2.75059506E-03 0.00000000E+00-1.39193211E-03 0.00000000E+00 0.00000000E+00
+-9.39771395E-10 0.00000000E+00-1.46094951E-14 2.97141383E-04-8.19599366E-10
+-1.02586464E-08-2.91638816E-14-1.79708219E-03 0.00000000E+00-1.33472705E-03
+ 3.29512129E-18-1.79708219E-03 0.00000000E+00-1.33472705E-03 3.29512129E-18
+ 0.00000000E+00 1.79367425E-08 0.00000000E+00-1.06094646E-11-5.79674668E-03
+ 1.55095688E-08 3.36540984E-06-9.24957453E-12 3.65206025E-03 0.00000000E+00
+ 1.27931149E-02 0.00000000E+00 2.73941246E-03-8.90375909E-18 9.59088113E-03
+-2.79500114E-17 3.65206025E-03 0.00000000E+00 1.27931149E-02 0.00000000E+00
+ 2.73941246E-03-8.90375909E-18 9.59088113E-03-2.79500114E-17 0.00000000E+00
+-5.26712703E-10 0.00000000E+00-4.13197110E-13 2.28187918E-04-4.46890440E-10
+-3.75570681E-09-3.74879498E-13 2.75059506E-03 0.00000000E+00-1.39193211E-03
+ 0.00000000E+00 2.06327321E-03-6.16559751E-18-1.05188479E-03 2.79949782E-18
+ 2.75059506E-03 0.00000000E+00-1.39193211E-03 0.00000000E+00 2.06327321E-03
+-6.16559751E-18-1.05188479E-03 2.79949782E-18-9.66714802E-06-3.07525469E-20
+-5.80972675E-08-1.87704649E-22-5.53929930E-05 0.00000000E+00-3.31753710E-07
+ 0.00000000E+00-1.02586464E-08 2.91638816E-14 0.00000000E+00 1.46094951E-14
+-1.02586464E-08 2.91638816E-14 0.00000000E+00 1.46094951E-14-6.80657944E-06
+-2.04842944E-20 1.13208269E-07 3.95626511E-22-4.08758294E-05 0.00000000E+00
+ 6.28204157E-07 0.00000000E+00 3.11132090E-05 8.44633404E-11 3.36540984E-06
+ 9.24957453E-12 0.00000000E+00 9.72164760E-11 0.00000000E+00 1.06094646E-11
+ 3.11132090E-05 8.44633404E-11 3.36540984E-06 9.24957453E-12 0.00000000E+00
+ 9.72164760E-11 0.00000000E+00 1.06094646E-11 5.87224580E-06 2.20335315E-20
+-2.64496313E-08-9.92014838E-23 3.09721118E-05 0.00000000E+00-1.39852334E-07
+ 0.00000000E+00-1.77623223E-05-4.47699256E-11-3.75570681E-09 3.74879498E-13
+ 0.00000000E+00-5.20922842E-11 0.00000000E+00 4.13197110E-13-1.77623223E-05
+-4.47699256E-11-3.75570681E-09 3.74879498E-13 0.00000000E+00-5.20922842E-11
+ 0.00000000E+00 4.13197110E-13 1.55073862E-03 5.00778496E-18 9.72220608E-06
+ 3.18707215E-20 8.85519020E-03 0.00000000E+00 5.53261909E-05 0.00000000E+00
+ 3.01486722E-04 8.06329969E-10 0.00000000E+00 9.32650430E-10 3.01486722E-04
+ 8.06329969E-10 0.00000000E+00 9.32650430E-10 8.11293721E-03 2.92498338E-17
+-6.80657944E-06-2.04842944E-20 4.45432806E-02 0.00000000E+00-4.08758294E-05
+ 0.00000000E+00-5.99367294E-03-1.62489536E-08-5.79674668E-03-1.55095688E-08
+ 0.00000000E+00-1.87119159E-08 0.00000000E+00-1.79367425E-08-5.99367294E-03
+-1.62489536E-08-5.79674668E-03-1.55095688E-08 0.00000000E+00-1.87119159E-08
+ 0.00000000E+00-1.79367425E-08 1.24458427E-03 4.66717884E-18-5.84803556E-06
+-2.19195393E-20 6.58072453E-03 0.00000000E+00-3.09987668E-05 0.00000000E+00
+-4.53926966E-03-1.15647113E-08 2.26075347E-04 6.59647223E-10 0.00000000E+00
+-1.34460767E-08 0.00000000E+00 7.61482664E-10-4.53926966E-03-1.15647113E-08
+ 2.26075347E-04 6.59647223E-10 0.00000000E+00-1.34460767E-08 0.00000000E+00
+ 7.61482664E-10-5.53929930E-05 0.00000000E+00-3.31753710E-07 0.00000000E+00
+-9.66714802E-06 3.07525469E-20-5.80972675E-08 1.87704649E-22 0.00000000E+00
+ 1.46094951E-14 1.02586464E-08 2.91638816E-14 0.00000000E+00 1.46094951E-14
+ 1.02586464E-08 2.91638816E-14-4.08758294E-05 0.00000000E+00 6.28204157E-07
+ 0.00000000E+00-6.80657944E-06 2.04842944E-20 1.13208269E-07-3.95626511E-22
+ 0.00000000E+00 9.72164760E-11 0.00000000E+00 1.06094646E-11-3.11132090E-05
+ 8.44633404E-11-3.36540984E-06 9.24957453E-12 0.00000000E+00 9.72164760E-11
+ 0.00000000E+00 1.06094646E-11-3.11132090E-05 8.44633404E-11-3.36540984E-06
+ 9.24957453E-12 3.09721118E-05 0.00000000E+00-1.39852334E-07 0.00000000E+00
+ 5.87224580E-06-2.20335315E-20-2.64496313E-08 9.92014838E-23 0.00000000E+00
+-5.20922842E-11 0.00000000E+00 4.13197110E-13 1.77623223E-05-4.47699256E-11
+ 3.75570681E-09 3.74879498E-13 0.00000000E+00-5.20922842E-11 0.00000000E+00
+ 4.13197110E-13 1.77623223E-05-4.47699256E-11 3.75570681E-09 3.74879498E-13
+ 0.00000000E+00 1.87358990E-08 0.00000000E+00 9.72749140E-11-5.97945193E-03
+ 1.62930467E-08-3.10721744E-05 8.45799959E-11 3.53626850E-03 0.00000000E+00
+ 2.59949574E-03-4.27672608E-18 3.53626850E-03 0.00000000E+00 2.59949574E-03
+-4.27672608E-18 0.00000000E+00 1.87119159E-08 0.00000000E+00-9.72164760E-11
+-5.99367294E-03 1.62489536E-08 3.11132090E-05-8.44633404E-11 2.87529656E-02
+ 0.00000000E+00 3.65206025E-03 0.00000000E+00 2.13547864E-02-5.52055320E-17
+ 2.73941246E-03-8.90375909E-18 2.87529656E-02 0.00000000E+00 3.65206025E-03
+ 0.00000000E+00 2.13547864E-02-5.52055320E-17 2.73941246E-03-8.90375909E-18
+ 5.97945193E-03 1.62930467E-08 3.10721744E-05 8.45799959E-11 0.00000000E+00
+ 1.87358990E-08 0.00000000E+00 9.72749140E-11 2.59949574E-03 4.27672608E-18
+ 3.53626850E-03 0.00000000E+00 2.59949574E-03 4.27672608E-18 3.53626850E-03
+ 0.00000000E+00 5.99367294E-03 1.62489536E-08-3.11132090E-05-8.44633404E-11
+ 0.00000000E+00 1.87119159E-08 0.00000000E+00-9.72164760E-11 2.13547864E-02
+ 5.52055320E-17 2.73941246E-03 8.90375909E-18 2.87529656E-02 0.00000000E+00
+ 3.65206025E-03 0.00000000E+00 2.13547864E-02 5.52055320E-17 2.73941246E-03
+ 8.90375909E-18 2.87529656E-02 0.00000000E+00 3.65206025E-03 0.00000000E+00
+ 0.00000000E+00 1.87358990E-08 0.00000000E+00 9.72749140E-11-5.97945193E-03
+ 1.62930467E-08-3.10721744E-05 8.45799959E-11 3.53626850E-03 0.00000000E+00
+ 2.59949574E-03-4.27672608E-18 6.16393998E-02 0.00000000E+00 3.26098680E-02
+-5.78076322E-17 0.00000000E+00 1.87119159E-08 0.00000000E+00-9.72164760E-11
+-5.99367294E-03 1.62489536E-08 3.11132090E-05-8.44633404E-11 2.87529656E-02
+ 0.00000000E+00 3.65206025E-03 0.00000000E+00 2.13547864E-02-5.52055320E-17
+ 2.73941246E-03-8.90375909E-18 4.87020872E-01 0.00000000E+00 6.01218408E-02
+ 0.00000000E+00 2.61326225E-01-2.84711866E-16 3.27216646E-02-1.70917629E-17
+ 5.91820629E-03 1.62710031E-08 3.07569146E-05 8.45825574E-11 0.00000000E+00
+ 1.87652591E-08 0.00000000E+00 9.75284361E-11 2.46268171E-03 4.00014899E-18
+ 3.42183754E-03 0.00000000E+00 3.24992731E-02 6.30951619E-17 6.32474231E-02
+ 0.00000000E+00 5.93483151E-03 1.63218133E-08-3.08048860E-05-8.47319133E-11
+ 0.00000000E+00 1.88048132E-08 0.00000000E+00-9.76458784E-11 2.02477481E-02
+ 2.40474954E-17 2.59948652E-03 2.90270919E-18 2.78319708E-02 0.00000000E+00
+ 3.53626111E-03 0.00000000E+00 2.60435396E-01 5.40907831E-16 3.26097671E-02
+ 6.66000030E-17 4.99517269E-01 0.00000000E+00 6.16388531E-02 0.00000000E+00
+ 8.99981963E-03 0.00000000E+00 5.62277661E-05 0.00000000E+00 1.43802116E-03
+-3.83849292E-18 9.01670128E-06-2.36657650E-20 0.00000000E+00 9.44429965E-10
+-2.98853203E-04 8.21894993E-10 0.00000000E+00 9.44429965E-10-2.98853203E-04
+ 8.21894993E-10 5.15743796E-02 0.00000000E+00-9.73982466E-07 0.00000000E+00
+ 8.63208934E-03-2.32733225E-17 7.58863198E-07-9.58270535E-21 0.00000000E+00
+-1.88048132E-08 0.00000000E+00-2.06696984E-08 5.93483151E-03-1.63218133E-08
+ 6.55366955E-03-1.79700113E-08 0.00000000E+00-1.88048132E-08 0.00000000E+00
+-2.06696984E-08 5.93483151E-03-1.63218133E-08 6.55366955E-03-1.79700113E-08
+ 8.85519020E-03 0.00000000E+00-5.53929930E-05 0.00000000E+00 1.55073862E-03
+-5.00778496E-18-9.66714802E-06 3.07525469E-20 0.00000000E+00-1.87358990E-08
+ 0.00000000E+00 9.39771395E-10 5.97945193E-03-1.62930467E-08-2.97141383E-04
+ 8.19599366E-10 0.00000000E+00-1.87358990E-08 0.00000000E+00 9.39771395E-10
+ 5.97945193E-03-1.62930467E-08-2.97141383E-04 8.19599366E-10-2.93773253E-04
+-8.06316730E-10 1.19928340E-08 3.73389913E-14 0.00000000E+00-9.32280177E-10
+ 0.00000000E+00 2.93605608E-14-1.26554206E-03-1.72571455E-18-1.73952466E-03
+ 0.00000000E+00-1.62772601E-02-3.24237912E-17-3.12215690E-02 0.00000000E+00
+ 6.55366955E-03 1.79700113E-08 2.22782230E-08-3.51516527E-14 0.00000000E+00
+ 2.06696984E-08 0.00000000E+00-7.67951082E-14 2.59948652E-03 2.90270919E-18
+ 1.03990755E-02 1.64253247E-17 3.53626111E-03 0.00000000E+00 1.41455471E-02
+ 0.00000000E+00 3.26097671E-02 6.66000030E-17 1.30439728E-01 2.32766576E-16
+ 6.16388531E-02 0.00000000E+00 2.46588995E-01 0.00000000E+00-3.01486722E-04
+-8.06329969E-10 1.02586464E-08-2.91638816E-14 0.00000000E+00-9.32650430E-10
+ 0.00000000E+00-1.46094951E-14 2.59949574E-03 4.27672608E-18-1.33472705E-03
+-3.29512129E-18 3.53626850E-03 0.00000000E+00-1.79708219E-03 0.00000000E+00
+ 3.26098680E-02 5.78076322E-17-1.63328831E-02-1.87248488E-17 6.16393998E-02
+ 0.00000000E+00-3.04403101E-02 0.00000000E+00 0.00000000E+00-9.32280177E-10
+ 0.00000000E+00 2.93605608E-14 2.93773253E-04-8.06316730E-10-1.19928340E-08
+ 3.73389913E-14-1.73952466E-03 0.00000000E+00-1.26554206E-03 1.72571455E-18
+-3.12215690E-02 0.00000000E+00-1.62772601E-02 3.24237912E-17 0.00000000E+00
+ 2.06696984E-08 0.00000000E+00-7.67951082E-14-6.55366955E-03 1.79700113E-08
+-2.22782230E-08-3.51516527E-14 3.53626111E-03 0.00000000E+00 1.41455471E-02
+ 0.00000000E+00 2.59948652E-03-2.90270919E-18 1.03990755E-02-1.64253247E-17
+ 6.16388531E-02 0.00000000E+00 2.46588995E-01 0.00000000E+00 3.26097671E-02
+-6.66000030E-17 1.30439728E-01-2.32766576E-16 0.00000000E+00-9.32650430E-10
+ 0.00000000E+00-1.46094951E-14 3.01486722E-04-8.06329969E-10-1.02586464E-08
+-2.91638816E-14 3.53626850E-03 0.00000000E+00-1.79708219E-03 0.00000000E+00
+ 2.59949574E-03-4.27672608E-18-1.33472705E-03 3.29512129E-18 6.16393998E-02
+ 0.00000000E+00-3.04403101E-02 0.00000000E+00 3.26098680E-02-5.78076322E-17
+-1.63328831E-02 1.87248488E-17-2.93773253E-04-8.06316730E-10 1.19928340E-08
+ 3.73389913E-14 0.00000000E+00-9.32280177E-10 0.00000000E+00 2.93605608E-14
+-1.26554206E-03-1.72571455E-18-1.73952466E-03 0.00000000E+00-1.26554206E-03
+-1.72571455E-18-1.73952466E-03 0.00000000E+00 6.55366955E-03 1.79700113E-08
+ 2.22782230E-08-3.51516527E-14 0.00000000E+00 2.06696984E-08 0.00000000E+00
+-7.67951082E-14 2.59948652E-03 2.90270919E-18 1.03990755E-02 1.64253247E-17
+ 3.53626111E-03 0.00000000E+00 1.41455471E-02 0.00000000E+00 2.59948652E-03
+ 2.90270919E-18 1.03990755E-02 1.64253247E-17 3.53626111E-03 0.00000000E+00
+ 1.41455471E-02 0.00000000E+00-3.01486722E-04-8.06329969E-10 1.02586464E-08
+-2.91638816E-14 0.00000000E+00-9.32650430E-10 0.00000000E+00-1.46094951E-14
+ 2.59949574E-03 4.27672608E-18-1.33472705E-03-3.29512129E-18 3.53626850E-03
+ 0.00000000E+00-1.79708219E-03 0.00000000E+00 2.59949574E-03 4.27672608E-18
+-1.33472705E-03-3.29512129E-18 3.53626850E-03 0.00000000E+00-1.79708219E-03
+ 0.00000000E+00 0.00000000E+00-9.32280177E-10 0.00000000E+00 2.93605608E-14
+ 2.93773253E-04-8.06316730E-10-1.19928340E-08 3.73389913E-14-1.73952466E-03
+ 0.00000000E+00-1.26554206E-03 1.72571455E-18-1.73952466E-03 0.00000000E+00
+-1.26554206E-03 1.72571455E-18 0.00000000E+00 2.06696984E-08 0.00000000E+00
+-7.67951082E-14-6.55366955E-03 1.79700113E-08-2.22782230E-08-3.51516527E-14
+ 3.53626111E-03 0.00000000E+00 1.41455471E-02 0.00000000E+00 2.59948652E-03
+-2.90270919E-18 1.03990755E-02-1.64253247E-17 3.53626111E-03 0.00000000E+00
+ 1.41455471E-02 0.00000000E+00 2.59948652E-03-2.90270919E-18 1.03990755E-02
+-1.64253247E-17 0.00000000E+00-9.32650430E-10 0.00000000E+00-1.46094951E-14
+ 3.01486722E-04-8.06329969E-10-1.02586464E-08-2.91638816E-14 3.53626850E-03
+ 0.00000000E+00-1.79708219E-03 0.00000000E+00 2.59949574E-03-4.27672608E-18
+-1.33472705E-03 3.29512129E-18 3.53626850E-03 0.00000000E+00-1.79708219E-03
+ 0.00000000E+00 2.59949574E-03-4.27672608E-18-1.33472705E-03 3.29512129E-18
+-8.96336248E-06-2.42966068E-20-5.38746809E-08-1.43499321E-22-5.63000931E-05
+ 0.00000000E+00-3.37174109E-07 0.00000000E+00-1.19928340E-08-3.73389913E-14
+ 0.00000000E+00-2.93605608E-14-1.19928340E-08-3.73389913E-14 0.00000000E+00
+-2.93605608E-14 7.58863198E-07 9.58270535E-21 1.49275093E-07 4.19548066E-22
+-9.73982466E-07 0.00000000E+00 8.91836805E-07 0.00000000E+00 3.08048860E-05
+ 8.47319133E-11-2.22782230E-08 3.51516527E-14 0.00000000E+00 9.76458784E-11
+ 0.00000000E+00 7.67951082E-14 3.08048860E-05 8.47319133E-11-2.22782230E-08
+ 3.51516527E-14 0.00000000E+00 9.76458784E-11 0.00000000E+00 7.67951082E-14
+ 9.72220608E-06 3.18707215E-20-5.80972675E-08-1.87704649E-22 5.53261909E-05
+ 0.00000000E+00-3.31753710E-07 0.00000000E+00-3.10721744E-05-8.45799959E-11
+-1.02586464E-08 2.91638816E-14 0.00000000E+00-9.72749140E-11 0.00000000E+00
+ 1.46094951E-14-3.10721744E-05-8.45799959E-11-1.02586464E-08 2.91638816E-14
+ 0.00000000E+00-9.72749140E-11 0.00000000E+00 1.46094951E-14 1.43802116E-03
+ 3.83849292E-18 9.01670128E-06 2.36657650E-20 8.99981963E-03 0.00000000E+00
+ 5.62277661E-05 0.00000000E+00 2.98853203E-04 8.21894993E-10 0.00000000E+00
+ 9.44429965E-10 2.98853203E-04 8.21894993E-10 0.00000000E+00 9.44429965E-10
+ 8.63208934E-03 2.32733225E-17 7.58863198E-07 9.58270535E-21 5.15743796E-02
+ 0.00000000E+00-9.73982466E-07 0.00000000E+00-5.93483151E-03-1.63218133E-08
+-6.55366955E-03-1.79700113E-08 0.00000000E+00-1.88048132E-08 0.00000000E+00
+-2.06696984E-08-5.93483151E-03-1.63218133E-08-6.55366955E-03-1.79700113E-08
+ 0.00000000E+00-1.88048132E-08 0.00000000E+00-2.06696984E-08 1.55073862E-03
+ 5.00778496E-18-9.66714802E-06-3.07525469E-20 8.85519020E-03 0.00000000E+00
+-5.53929930E-05 0.00000000E+00-5.97945193E-03-1.62930467E-08 2.97141383E-04
+ 8.19599366E-10 0.00000000E+00-1.87358990E-08 0.00000000E+00 9.39771395E-10
+-5.97945193E-03-1.62930467E-08 2.97141383E-04 8.19599366E-10 0.00000000E+00
+-1.87358990E-08 0.00000000E+00 9.39771395E-10-5.63000931E-05 0.00000000E+00
+-3.37174109E-07 0.00000000E+00-8.96336248E-06 2.42966068E-20-5.38746809E-08
+ 1.43499321E-22 0.00000000E+00-2.93605608E-14 1.19928340E-08-3.73389913E-14
+ 0.00000000E+00-2.93605608E-14 1.19928340E-08-3.73389913E-14-9.73982466E-07
+ 0.00000000E+00 8.91836805E-07 0.00000000E+00 7.58863198E-07-9.58270535E-21
+ 1.49275093E-07-4.19548066E-22 0.00000000E+00 9.76458784E-11 0.00000000E+00
+ 7.67951082E-14-3.08048860E-05 8.47319133E-11 2.22782230E-08 3.51516527E-14
+ 0.00000000E+00 9.76458784E-11 0.00000000E+00 7.67951082E-14-3.08048860E-05
+ 8.47319133E-11 2.22782230E-08 3.51516527E-14 5.53261909E-05 0.00000000E+00
+-3.31753710E-07 0.00000000E+00 9.72220608E-06-3.18707215E-20-5.80972675E-08
+ 1.87704649E-22 0.00000000E+00-9.72749140E-11 0.00000000E+00 1.46094951E-14
+ 3.10721744E-05-8.45799959E-11 1.02586464E-08 2.91638816E-14 0.00000000E+00
+-9.72749140E-11 0.00000000E+00 1.46094951E-14 3.10721744E-05-8.45799959E-11
+ 1.02586464E-08 2.91638816E-14 0.00000000E+00 1.87652591E-08 0.00000000E+00
+ 9.75284361E-11-5.91820629E-03 1.62710031E-08-3.07569146E-05 8.45825574E-11
+ 3.42183754E-03 0.00000000E+00 2.46268171E-03-4.00014899E-18 3.42183754E-03
+ 0.00000000E+00 2.46268171E-03-4.00014899E-18 0.00000000E+00 1.88048132E-08
+ 0.00000000E+00-9.76458784E-11-5.93483151E-03 1.63218133E-08 3.08048860E-05
+-8.47319133E-11 2.78319708E-02 0.00000000E+00 3.53626111E-03 0.00000000E+00
+ 2.02477481E-02-2.40474954E-17 2.59948652E-03-2.90270919E-18 2.78319708E-02
+ 0.00000000E+00 3.53626111E-03 0.00000000E+00 2.02477481E-02-2.40474954E-17
+ 2.59948652E-03-2.90270919E-18 5.91820629E-03 1.62710031E-08 3.07569146E-05
+ 8.45825574E-11 0.00000000E+00 1.87652591E-08 0.00000000E+00 9.75284361E-11
+ 2.46268171E-03 4.00014899E-18 3.42183754E-03 0.00000000E+00 2.46268171E-03
+ 4.00014899E-18 3.42183754E-03 0.00000000E+00 5.93483151E-03 1.63218133E-08
+-3.08048860E-05-8.47319133E-11 0.00000000E+00 1.88048132E-08 0.00000000E+00
+-9.76458784E-11 2.02477481E-02 2.40474954E-17 2.59948652E-03 2.90270919E-18
+ 2.78319708E-02 0.00000000E+00 3.53626111E-03 0.00000000E+00 2.02477481E-02
+ 2.40474954E-17 2.59948652E-03 2.90270919E-18 2.78319708E-02 0.00000000E+00
+ 3.53626111E-03 0.00000000E+00 0.00000000E+00 1.87652591E-08 0.00000000E+00
+ 9.75284361E-11-5.91820629E-03 1.62710031E-08-3.07569146E-05 8.45825574E-11
+ 3.42183754E-03 0.00000000E+00 2.46268171E-03-4.00014899E-18 6.32474231E-02
+ 0.00000000E+00 3.24992731E-02-6.30951619E-17 0.00000000E+00 1.88048132E-08
+ 0.00000000E+00-9.76458784E-11-5.93483151E-03 1.63218133E-08 3.08048860E-05
+-8.47319133E-11 2.78319708E-02 0.00000000E+00 3.53626111E-03 0.00000000E+00
+ 2.02477481E-02-2.40474954E-17 2.59948652E-03-2.90270919E-18 4.99517269E-01
+ 0.00000000E+00 6.16388531E-02 0.00000000E+00 2.60435396E-01-5.40907831E-16
+ 3.26097671E-02-6.66000030E-17 5.84801230E-03 1.59314416E-08 3.03950530E-05
+ 8.28448836E-11 0.00000000E+00 1.84360994E-08 0.00000000E+00 9.58488182E-11
+ 2.32911557E-03 6.23195571E-18 3.30884414E-03 0.00000000E+00 3.23911639E-02
+ 8.02921054E-17 6.49565437E-02 0.00000000E+00 5.86690756E-03 1.60210629E-08
+-3.04495740E-05-8.31030585E-11 0.00000000E+00 1.85225266E-08 0.00000000E+00
+-9.60975538E-11 1.91662945E-02 4.71516685E-17 2.46268942E-03 5.12139935E-18
+ 2.69224054E-02 0.00000000E+00 3.42185444E-03 0.00000000E+00 2.59561744E-01
+ 5.19470162E-16 3.24994141E-02 5.39449728E-17 5.12785565E-01 0.00000000E+00
+ 6.32473035E-02 0.00000000E+00 9.15636419E-03 0.00000000E+00 5.72036162E-05
+ 0.00000000E+00 1.32891196E-03-4.56733656E-18 8.33374908E-06-2.90041387E-20
+ 0.00000000E+00 9.37284300E-10-2.95747259E-04 8.12583895E-10 0.00000000E+00
+ 9.37284300E-10-2.95747259E-04 8.12583895E-10 5.24438997E-02 0.00000000E+00
+-1.05413637E-06 0.00000000E+00 7.99125440E-03-2.63294231E-17 7.34503644E-07
+ 7.37838736E-21 0.00000000E+00-1.85225266E-08 0.00000000E+00-2.05215764E-08
+ 5.86690756E-03-1.60210629E-08 6.48258185E-03-1.77717936E-08 0.00000000E+00
+-1.85225266E-08 0.00000000E+00-2.05215764E-08 5.86690756E-03-1.60210629E-08
+ 6.48258185E-03-1.77717936E-08 8.99981963E-03 0.00000000E+00-5.63000931E-05
+ 0.00000000E+00 1.43802116E-03-3.83849292E-18-8.96336248E-06 2.42966068E-20
+ 0.00000000E+00-1.87652591E-08 0.00000000E+00 9.32280177E-10 5.91820629E-03
+-1.62710031E-08-2.93773253E-04 8.06316730E-10 0.00000000E+00-1.87652591E-08
+ 0.00000000E+00 9.32280177E-10 5.91820629E-03-1.62710031E-08-2.93773253E-04
+ 8.06316730E-10-2.89973692E-04-7.85207648E-10 1.36302589E-08 6.45437313E-14
+ 0.00000000E+00-9.10888339E-10 0.00000000E+00 6.21839221E-14-1.19795125E-03
+-2.83833877E-18-1.68267465E-03 0.00000000E+00-1.62226445E-02-3.35592696E-17
+-3.20509618E-02 0.00000000E+00 6.48258185E-03 1.77717936E-08 2.55845816E-08
+ 1.42836868E-13 0.00000000E+00 2.05215764E-08 0.00000000E+00 1.44611847E-13
+ 2.46268942E-03 5.12139935E-18 9.85189640E-03 1.82648175E-17 3.42185444E-03
+ 0.00000000E+00 1.36878889E-02 0.00000000E+00 3.24994141E-02 5.39449728E-17
+ 1.29998177E-01 2.44616867E-16 6.32473035E-02 0.00000000E+00 2.53025409E-01
+ 0.00000000E+00-2.98853203E-04-8.21894993E-10 1.19928340E-08 3.73389913E-14
+ 0.00000000E+00-9.44429965E-10 0.00000000E+00 2.93605608E-14 2.46268171E-03
+ 4.00014899E-18-1.26554206E-03-1.72571455E-18 3.42183754E-03 0.00000000E+00
+-1.73952466E-03 0.00000000E+00 3.24992731E-02 6.30951619E-17-1.62772601E-02
+-3.24237912E-17 6.32474231E-02 0.00000000E+00-3.12215690E-02 0.00000000E+00
+ 0.00000000E+00-9.10888339E-10 0.00000000E+00 6.21839221E-14 2.89973692E-04
+-7.85207648E-10-1.36302589E-08 6.45437313E-14-1.68267465E-03 0.00000000E+00
+-1.19795125E-03 2.83833877E-18-3.20509618E-02 0.00000000E+00-1.62226445E-02
+ 3.35592696E-17 0.00000000E+00 2.05215764E-08 0.00000000E+00 1.44611847E-13
+-6.48258185E-03 1.77717936E-08-2.55845816E-08 1.42836868E-13 3.42185444E-03
+ 0.00000000E+00 1.36878889E-02 0.00000000E+00 2.46268942E-03-5.12139935E-18
+ 9.85189640E-03-1.82648175E-17 6.32473035E-02 0.00000000E+00 2.53025409E-01
+ 0.00000000E+00 3.24994141E-02-5.39449728E-17 1.29998177E-01-2.44616867E-16
+ 0.00000000E+00-9.44429965E-10 0.00000000E+00 2.93605608E-14 2.98853203E-04
+-8.21894993E-10-1.19928340E-08 3.73389913E-14 3.42183754E-03 0.00000000E+00
+-1.73952466E-03 0.00000000E+00 2.46268171E-03-4.00014899E-18-1.26554206E-03
+ 1.72571455E-18 6.32474231E-02 0.00000000E+00-3.12215690E-02 0.00000000E+00
+ 3.24992731E-02-6.30951619E-17-1.62772601E-02 3.24237912E-17-2.89973692E-04
+-7.85207648E-10 1.36302589E-08 6.45437313E-14 0.00000000E+00-9.10888339E-10
+ 0.00000000E+00 6.21839221E-14-1.19795125E-03-2.83833877E-18-1.68267465E-03
+ 0.00000000E+00-1.19795125E-03-2.83833877E-18-1.68267465E-03 0.00000000E+00
+ 6.48258185E-03 1.77717936E-08 2.55845816E-08 1.42836868E-13 0.00000000E+00
+ 2.05215764E-08 0.00000000E+00 1.44611847E-13 2.46268942E-03 5.12139935E-18
+ 9.85189640E-03 1.82648175E-17 3.42185444E-03 0.00000000E+00 1.36878889E-02
+ 0.00000000E+00 2.46268942E-03 5.12139935E-18 9.85189640E-03 1.82648175E-17
+ 3.42185444E-03 0.00000000E+00 1.36878889E-02 0.00000000E+00-2.98853203E-04
+-8.21894993E-10 1.19928340E-08 3.73389913E-14 0.00000000E+00-9.44429965E-10
+ 0.00000000E+00 2.93605608E-14 2.46268171E-03 4.00014899E-18-1.26554206E-03
+-1.72571455E-18 3.42183754E-03 0.00000000E+00-1.73952466E-03 0.00000000E+00
+ 2.46268171E-03 4.00014899E-18-1.26554206E-03-1.72571455E-18 3.42183754E-03
+ 0.00000000E+00-1.73952466E-03 0.00000000E+00 0.00000000E+00-9.10888339E-10
+ 0.00000000E+00 6.21839221E-14 2.89973692E-04-7.85207648E-10-1.36302589E-08
+ 6.45437313E-14-1.68267465E-03 0.00000000E+00-1.19795125E-03 2.83833877E-18
+-1.68267465E-03 0.00000000E+00-1.19795125E-03 2.83833877E-18 0.00000000E+00
+ 2.05215764E-08 0.00000000E+00 1.44611847E-13-6.48258185E-03 1.77717936E-08
+-2.55845816E-08 1.42836868E-13 3.42185444E-03 0.00000000E+00 1.36878889E-02
+ 0.00000000E+00 2.46268942E-03-5.12139935E-18 9.85189640E-03-1.82648175E-17
+ 3.42185444E-03 0.00000000E+00 1.36878889E-02 0.00000000E+00 2.46268942E-03
+-5.12139935E-18 9.85189640E-03-1.82648175E-17 0.00000000E+00-9.44429965E-10
+ 0.00000000E+00 2.93605608E-14 2.98853203E-04-8.21894993E-10-1.19928340E-08
+ 3.73389913E-14 3.42183754E-03 0.00000000E+00-1.73952466E-03 0.00000000E+00
+ 2.46268171E-03-4.00014899E-18-1.26554206E-03 1.72571455E-18 3.42183754E-03
+ 0.00000000E+00-1.73952466E-03 0.00000000E+00 2.46268171E-03-4.00014899E-18
+-1.26554206E-03 1.72571455E-18-8.28213344E-06-2.81402042E-20-4.97872470E-08
+-1.71476289E-22-5.72819065E-05 0.00000000E+00-3.43040951E-07 0.00000000E+00
+-1.36302589E-08-6.45437313E-14 0.00000000E+00-6.21839221E-14-1.36302589E-08
+-6.45437313E-14 0.00000000E+00-6.21839221E-14 7.34503644E-07-7.37838736E-21
+ 1.38195027E-07 4.39216204E-22-1.05413637E-06 0.00000000E+00 9.06881138E-07
+ 0.00000000E+00 3.04495740E-05 8.31030585E-11-2.55845816E-08-1.42836868E-13
+ 0.00000000E+00 9.60975538E-11 0.00000000E+00-1.44611847E-13 3.04495740E-05
+ 8.31030585E-11-2.55845816E-08-1.42836868E-13 0.00000000E+00 9.60975538E-11
+ 0.00000000E+00-1.44611847E-13 9.01670128E-06 2.36657650E-20-5.38746809E-08
+-1.43499321E-22 5.62277661E-05 0.00000000E+00-3.37174109E-07 0.00000000E+00
+-3.07569146E-05-8.45825574E-11-1.19928340E-08-3.73389913E-14 0.00000000E+00
+-9.75284361E-11 0.00000000E+00-2.93605608E-14-3.07569146E-05-8.45825574E-11
+-1.19928340E-08-3.73389913E-14 0.00000000E+00-9.75284361E-11 0.00000000E+00
+-2.93605608E-14 1.32891196E-03 4.56733656E-18 8.33374908E-06 2.90041387E-20
+ 9.15636419E-03 0.00000000E+00 5.72036162E-05 0.00000000E+00 2.95747259E-04
+ 8.12583895E-10 0.00000000E+00 9.37284300E-10 2.95747259E-04 8.12583895E-10
+ 0.00000000E+00 9.37284300E-10 7.99125440E-03 2.63294231E-17 7.34503644E-07
+-7.37838736E-21 5.24438997E-02 0.00000000E+00-1.05413637E-06 0.00000000E+00
+-5.86690756E-03-1.60210629E-08-6.48258185E-03-1.77717936E-08 0.00000000E+00
+-1.85225266E-08 0.00000000E+00-2.05215764E-08-5.86690756E-03-1.60210629E-08
+-6.48258185E-03-1.77717936E-08 0.00000000E+00-1.85225266E-08 0.00000000E+00
+-2.05215764E-08 1.43802116E-03 3.83849292E-18-8.96336248E-06-2.42966068E-20
+ 8.99981963E-03 0.00000000E+00-5.63000931E-05 0.00000000E+00-5.91820629E-03
+-1.62710031E-08 2.93773253E-04 8.06316730E-10 0.00000000E+00-1.87652591E-08
+ 0.00000000E+00 9.32280177E-10-5.91820629E-03-1.62710031E-08 2.93773253E-04
+ 8.06316730E-10 0.00000000E+00-1.87652591E-08 0.00000000E+00 9.32280177E-10
+-5.72819065E-05 0.00000000E+00-3.43040951E-07 0.00000000E+00-8.28213344E-06
+ 2.81402042E-20-4.97872470E-08 1.71476289E-22 0.00000000E+00-6.21839221E-14
+ 1.36302589E-08-6.45437313E-14 0.00000000E+00-6.21839221E-14 1.36302589E-08
+-6.45437313E-14-1.05413637E-06 0.00000000E+00 9.06881138E-07 0.00000000E+00
+ 7.34503644E-07 7.37838736E-21 1.38195027E-07-4.39216204E-22 0.00000000E+00
+ 9.60975538E-11 0.00000000E+00-1.44611847E-13-3.04495740E-05 8.31030585E-11
+ 2.55845816E-08-1.42836868E-13 0.00000000E+00 9.60975538E-11 0.00000000E+00
+-1.44611847E-13-3.04495740E-05 8.31030585E-11 2.55845816E-08-1.42836868E-13
+ 5.62277661E-05 0.00000000E+00-3.37174109E-07 0.00000000E+00 9.01670128E-06
+-2.36657650E-20-5.38746809E-08 1.43499321E-22 0.00000000E+00-9.75284361E-11
+ 0.00000000E+00-2.93605608E-14 3.07569146E-05-8.45825574E-11 1.19928340E-08
+-3.73389913E-14 0.00000000E+00-9.75284361E-11 0.00000000E+00-2.93605608E-14
+ 3.07569146E-05-8.45825574E-11 1.19928340E-08-3.73389913E-14 0.00000000E+00
+ 1.84360994E-08 0.00000000E+00 9.58488182E-11-5.84801230E-03 1.59314416E-08
+-3.03950530E-05 8.28448836E-11 3.30884414E-03 0.00000000E+00 2.32911557E-03
+-6.23195571E-18 3.30884414E-03 0.00000000E+00 2.32911557E-03-6.23195571E-18
+ 0.00000000E+00 1.85225266E-08 0.00000000E+00-9.60975538E-11-5.86690756E-03
+ 1.60210629E-08 3.04495740E-05-8.31030585E-11 2.69224054E-02 0.00000000E+00
+ 3.42185444E-03 0.00000000E+00 1.91662945E-02-4.71516685E-17 2.46268942E-03
+-5.12139935E-18 2.69224054E-02 0.00000000E+00 3.42185444E-03 0.00000000E+00
+ 1.91662945E-02-4.71516685E-17 2.46268942E-03-5.12139935E-18 5.84801230E-03
+ 1.59314416E-08 3.03950530E-05 8.28448836E-11 0.00000000E+00 1.84360994E-08
+ 0.00000000E+00 9.58488182E-11 2.32911557E-03 6.23195571E-18 3.30884414E-03
+ 0.00000000E+00 2.32911557E-03 6.23195571E-18 3.30884414E-03 0.00000000E+00
+ 5.86690756E-03 1.60210629E-08-3.04495740E-05-8.31030585E-11 0.00000000E+00
+ 1.85225266E-08 0.00000000E+00-9.60975538E-11 1.91662945E-02 4.71516685E-17
+ 2.46268942E-03 5.12139935E-18 2.69224054E-02 0.00000000E+00 3.42185444E-03
+ 0.00000000E+00 1.91662945E-02 4.71516685E-17 2.46268942E-03 5.12139935E-18
+ 2.69224054E-02 0.00000000E+00 3.42185444E-03 0.00000000E+00 0.00000000E+00
+ 1.84360994E-08 0.00000000E+00 9.58488182E-11-5.84801230E-03 1.59314416E-08
+-3.03950530E-05 8.28448836E-11 3.30884414E-03 0.00000000E+00 2.32911557E-03
+-6.23195571E-18 6.49565437E-02 0.00000000E+00 3.23911639E-02-8.02921054E-17
+ 0.00000000E+00 1.85225266E-08 0.00000000E+00-9.60975538E-11-5.86690756E-03
+ 1.60210629E-08 3.04495740E-05-8.31030585E-11 2.69224054E-02 0.00000000E+00
+ 3.42185444E-03 0.00000000E+00 1.91662945E-02-4.71516685E-17 2.46268942E-03
+-5.12139935E-18 5.12785565E-01 0.00000000E+00 6.32473035E-02 0.00000000E+00
+ 2.59561744E-01-5.19470162E-16 3.24994141E-02-5.39449728E-17 5.76908586E-03
+ 1.55929159E-08 2.99877757E-05 8.10878574E-11 0.00000000E+00 1.81133405E-08
+ 0.00000000E+00 9.41749501E-11 2.19881840E-03 6.78436473E-18 3.19719271E-03
+ 0.00000000E+00 3.22851641E-02 8.26035667E-17 6.67748425E-02 0.00000000E+00
+ 5.79020672E-03 1.56811786E-08-3.00487209E-05-8.13427179E-11 0.00000000E+00
+ 1.81983748E-08 0.00000000E+00-9.44205640E-11 1.81108061E-02 4.89852724E-17
+ 2.32911916E-03 5.70728089E-18 2.60238112E-02 0.00000000E+00 3.30885522E-03
+ 0.00000000E+00 2.58704982E-01 6.93850403E-16 3.23912444E-02 8.72980460E-17
+ 5.26891740E-01 0.00000000E+00 6.49562595E-02 0.00000000E+00 9.32580950E-03
+ 0.00000000E+00 5.82598827E-05 0.00000000E+00 1.22334642E-03-2.56110250E-18
+ 7.67296125E-06-1.61425573E-20 0.00000000E+00 9.20744546E-10-2.92197082E-04
+ 7.95313638E-10 0.00000000E+00 9.20744546E-10-2.92197082E-04 7.95313638E-10
+ 5.33850645E-02 0.00000000E+00-1.14100310E-06 0.00000000E+00 7.37111879E-03
+-1.97188932E-17 7.10674077E-07-1.55315058E-20 0.00000000E+00-1.81983748E-08
+ 0.00000000E+00-2.01491718E-08 5.79020672E-03-1.56811786E-08 6.40177624E-03
+-1.73869493E-08 0.00000000E+00-1.81983748E-08 0.00000000E+00-2.01491718E-08
+ 5.79020672E-03-1.56811786E-08 6.40177624E-03-1.73869493E-08 9.15636419E-03
+ 0.00000000E+00-5.72819065E-05 0.00000000E+00 1.32891196E-03-4.56733656E-18
+-8.28213344E-06 2.81402042E-20 0.00000000E+00-1.84360994E-08 0.00000000E+00
+ 9.10888339E-10 5.84801230E-03-1.59314416E-08-2.89973692E-04 7.85207648E-10
+ 0.00000000E+00-1.84360994E-08 0.00000000E+00 9.10888339E-10 5.84801230E-03
+-1.59314416E-08-2.89973692E-04 7.85207648E-10-2.85743431E-04-7.68340888E-10
+ 1.52363001E-08 6.37151206E-14 0.00000000E+00-8.94756941E-10 0.00000000E+00
+ 6.14034667E-14-1.13198439E-03-3.12291141E-18-1.62651198E-03 0.00000000E+00
+-1.61691021E-02-4.24754032E-17-3.29327755E-02 0.00000000E+00 6.40177624E-03
+ 1.73869493E-08 2.88389379E-08 1.22277221E-13 0.00000000E+00 2.01491718E-08
+ 0.00000000E+00 1.14739700E-13 2.32911916E-03 5.70728089E-18 9.31763845E-03
+ 2.38477269E-17 3.30885522E-03 0.00000000E+00 1.32358801E-02 0.00000000E+00
+ 3.23912444E-02 8.72980460E-17 1.29565591E-01 3.24511850E-16 6.49562595E-02
+ 0.00000000E+00 2.59864655E-01 0.00000000E+00-2.95747259E-04-8.12583895E-10
+ 1.36302589E-08 6.45437313E-14 0.00000000E+00-9.37284300E-10 0.00000000E+00
+ 6.21839221E-14 2.32911557E-03 6.23195571E-18-1.19795125E-03-2.83833877E-18
+ 3.30884414E-03 0.00000000E+00-1.68267465E-03 0.00000000E+00 3.23911639E-02
+ 8.02921054E-17-1.62226445E-02-3.35592696E-17 6.49565437E-02 0.00000000E+00
+-3.20509618E-02 0.00000000E+00 0.00000000E+00-8.94756941E-10 0.00000000E+00
+ 6.14034667E-14 2.85743431E-04-7.68340888E-10-1.52363001E-08 6.37151206E-14
+-1.62651198E-03 0.00000000E+00-1.13198439E-03 3.12291141E-18-3.29327755E-02
+ 0.00000000E+00-1.61691021E-02 4.24754032E-17 0.00000000E+00 2.01491718E-08
+ 0.00000000E+00 1.14739700E-13-6.40177624E-03 1.73869493E-08-2.88389379E-08
+ 1.22277221E-13 3.30885522E-03 0.00000000E+00 1.32358801E-02 0.00000000E+00
+ 2.32911916E-03-5.70728089E-18 9.31763845E-03-2.38477269E-17 6.49562595E-02
+ 0.00000000E+00 2.59864655E-01 0.00000000E+00 3.23912444E-02-8.72980460E-17
+ 1.29565591E-01-3.24511850E-16 0.00000000E+00-9.37284300E-10 0.00000000E+00
+ 6.21839221E-14 2.95747259E-04-8.12583895E-10-1.36302589E-08 6.45437313E-14
+ 3.30884414E-03 0.00000000E+00-1.68267465E-03 0.00000000E+00 2.32911557E-03
+-6.23195571E-18-1.19795125E-03 2.83833877E-18 6.49565437E-02 0.00000000E+00
+-3.20509618E-02 0.00000000E+00 3.23911639E-02-8.02921054E-17-1.62226445E-02
+ 3.35592696E-17-2.85743431E-04-7.68340888E-10 1.52363001E-08 6.37151206E-14
+ 0.00000000E+00-8.94756941E-10 0.00000000E+00 6.14034667E-14-1.13198439E-03
+-3.12291141E-18-1.62651198E-03 0.00000000E+00-1.13198439E-03-3.12291141E-18
+-1.62651198E-03 0.00000000E+00 6.40177624E-03 1.73869493E-08 2.88389379E-08
+ 1.22277221E-13 0.00000000E+00 2.01491718E-08 0.00000000E+00 1.14739700E-13
+ 2.32911916E-03 5.70728089E-18 9.31763845E-03 2.38477269E-17 3.30885522E-03
+ 0.00000000E+00 1.32358801E-02 0.00000000E+00 2.32911916E-03 5.70728089E-18
+ 9.31763845E-03 2.38477269E-17 3.30885522E-03 0.00000000E+00 1.32358801E-02
+ 0.00000000E+00-2.95747259E-04-8.12583895E-10 1.36302589E-08 6.45437313E-14
+ 0.00000000E+00-9.37284300E-10 0.00000000E+00 6.21839221E-14 2.32911557E-03
+ 6.23195571E-18-1.19795125E-03-2.83833877E-18 3.30884414E-03 0.00000000E+00
+-1.68267465E-03 0.00000000E+00 2.32911557E-03 6.23195571E-18-1.19795125E-03
+-2.83833877E-18 3.30884414E-03 0.00000000E+00-1.68267465E-03 0.00000000E+00
+ 0.00000000E+00-8.94756941E-10 0.00000000E+00 6.14034667E-14 2.85743431E-04
+-7.68340888E-10-1.52363001E-08 6.37151206E-14-1.62651198E-03 0.00000000E+00
+-1.13198439E-03 3.12291141E-18-1.62651198E-03 0.00000000E+00-1.13198439E-03
+ 3.12291141E-18 0.00000000E+00 2.01491718E-08 0.00000000E+00 1.14739700E-13
+-6.40177624E-03 1.73869493E-08-2.88389379E-08 1.22277221E-13 3.30885522E-03
+ 0.00000000E+00 1.32358801E-02 0.00000000E+00 2.32911916E-03-5.70728089E-18
+ 9.31763845E-03-2.38477269E-17 3.30885522E-03 0.00000000E+00 1.32358801E-02
+ 0.00000000E+00 2.32911916E-03-5.70728089E-18 9.31763845E-03-2.38477269E-17
+ 0.00000000E+00-9.37284300E-10 0.00000000E+00 6.21839221E-14 2.95747259E-04
+-8.12583895E-10-1.36302589E-08 6.45437313E-14 3.30884414E-03 0.00000000E+00
+-1.68267465E-03 0.00000000E+00 2.32911557E-03-6.23195571E-18-1.19795125E-03
+ 2.83833877E-18 3.30884414E-03 0.00000000E+00-1.68267465E-03 0.00000000E+00
+ 2.32911557E-03-6.23195571E-18-1.19795125E-03 2.83833877E-18-7.62303922E-06
+-1.58533488E-20-4.58325214E-08-9.56922938E-23-5.83446183E-05 0.00000000E+00
+-3.49391184E-07 0.00000000E+00-1.52363001E-08-6.37151206E-14 0.00000000E+00
+-6.14034667E-14-1.52363001E-08-6.37151206E-14 0.00000000E+00-6.14034667E-14
+ 7.10674077E-07 1.55315058E-20 1.27472505E-07 3.48456114E-22-1.14100310E-06
+ 0.00000000E+00 9.23164760E-07 0.00000000E+00 3.00487209E-05 8.13427179E-11
+-2.88389379E-08-1.22277221E-13 0.00000000E+00 9.44205640E-11 0.00000000E+00
+-1.14739700E-13 3.00487209E-05 8.13427179E-11-2.88389379E-08-1.22277221E-13
+ 0.00000000E+00 9.44205640E-11 0.00000000E+00-1.14739700E-13 8.33374908E-06
+ 2.90041387E-20-4.97872470E-08-1.71476289E-22 5.72036162E-05 0.00000000E+00
+-3.43040951E-07 0.00000000E+00-3.03950530E-05-8.28448836E-11-1.36302589E-08
+-6.45437313E-14 0.00000000E+00-9.58488182E-11 0.00000000E+00-6.21839221E-14
+-3.03950530E-05-8.28448836E-11-1.36302589E-08-6.45437313E-14 0.00000000E+00
+-9.58488182E-11 0.00000000E+00-6.21839221E-14 1.22334642E-03 2.56110250E-18
+ 7.67296125E-06 1.61425573E-20 9.32580950E-03 0.00000000E+00 5.82598827E-05
+ 0.00000000E+00 2.92197082E-04 7.95313638E-10 0.00000000E+00 9.20744546E-10
+ 2.92197082E-04 7.95313638E-10 0.00000000E+00 9.20744546E-10 7.37111879E-03
+ 1.97188932E-17 7.10674077E-07 1.55315058E-20 5.33850645E-02 0.00000000E+00
+-1.14100310E-06 0.00000000E+00-5.79020672E-03-1.56811786E-08-6.40177624E-03
+-1.73869493E-08 0.00000000E+00-1.81983748E-08 0.00000000E+00-2.01491718E-08
+-5.79020672E-03-1.56811786E-08-6.40177624E-03-1.73869493E-08 0.00000000E+00
+-1.81983748E-08 0.00000000E+00-2.01491718E-08 1.32891196E-03 4.56733656E-18
+-8.28213344E-06-2.81402042E-20 9.15636419E-03 0.00000000E+00-5.72819065E-05
+ 0.00000000E+00-5.84801230E-03-1.59314416E-08 2.89973692E-04 7.85207648E-10
+ 0.00000000E+00-1.84360994E-08 0.00000000E+00 9.10888339E-10-5.84801230E-03
+-1.59314416E-08 2.89973692E-04 7.85207648E-10 0.00000000E+00-1.84360994E-08
+ 0.00000000E+00 9.10888339E-10-5.83446183E-05 0.00000000E+00-3.49391184E-07
+ 0.00000000E+00-7.62303922E-06 1.58533488E-20-4.58325214E-08 9.56922938E-23
+ 0.00000000E+00-6.14034667E-14 1.52363001E-08-6.37151206E-14 0.00000000E+00
+-6.14034667E-14 1.52363001E-08-6.37151206E-14-1.14100310E-06 0.00000000E+00
+ 9.23164760E-07 0.00000000E+00 7.10674077E-07-1.55315058E-20 1.27472505E-07
+-3.48456114E-22 0.00000000E+00 9.44205640E-11 0.00000000E+00-1.14739700E-13
+-3.00487209E-05 8.13427179E-11 2.88389379E-08-1.22277221E-13 0.00000000E+00
+ 9.44205640E-11 0.00000000E+00-1.14739700E-13-3.00487209E-05 8.13427179E-11
+ 2.88389379E-08-1.22277221E-13 5.72036162E-05 0.00000000E+00-3.43040951E-07
+ 0.00000000E+00 8.33374908E-06-2.90041387E-20-4.97872470E-08 1.71476289E-22
+ 0.00000000E+00-9.58488182E-11 0.00000000E+00-6.21839221E-14 3.03950530E-05
+-8.28448836E-11 1.36302589E-08-6.45437313E-14 0.00000000E+00-9.58488182E-11
+ 0.00000000E+00-6.21839221E-14 3.03950530E-05-8.28448836E-11 1.36302589E-08
+-6.45437313E-14 0.00000000E+00 1.81133405E-08 0.00000000E+00 9.41749501E-11
+-5.76908586E-03 1.55929159E-08-2.99877757E-05 8.10878574E-11 3.19719271E-03
+ 0.00000000E+00 2.19881840E-03-6.78436473E-18 3.19719271E-03 0.00000000E+00
+ 2.19881840E-03-6.78436473E-18 0.00000000E+00 1.81983748E-08 0.00000000E+00
+-9.44205640E-11-5.79020672E-03 1.56811786E-08 3.00487209E-05-8.13427179E-11
+ 2.60238112E-02 0.00000000E+00 3.30885522E-03 0.00000000E+00 1.81108061E-02
+-4.89852724E-17 2.32911916E-03-5.70728089E-18 2.60238112E-02 0.00000000E+00
+ 3.30885522E-03 0.00000000E+00 1.81108061E-02-4.89852724E-17 2.32911916E-03
+-5.70728089E-18 5.76908586E-03 1.55929159E-08 2.99877757E-05 8.10878574E-11
+ 0.00000000E+00 1.81133405E-08 0.00000000E+00 9.41749501E-11 2.19881840E-03
+ 6.78436473E-18 3.19719271E-03 0.00000000E+00 2.19881840E-03 6.78436473E-18
+ 3.19719271E-03 0.00000000E+00 5.79020672E-03 1.56811786E-08-3.00487209E-05
+-8.13427179E-11 0.00000000E+00 1.81983748E-08 0.00000000E+00-9.44205640E-11
+ 1.81108061E-02 4.89852724E-17 2.32911916E-03 5.70728089E-18 2.60238112E-02
+ 0.00000000E+00 3.30885522E-03 0.00000000E+00 1.81108061E-02 4.89852724E-17
+ 2.32911916E-03 5.70728089E-18 2.60238112E-02 0.00000000E+00 3.30885522E-03
+ 0.00000000E+00 0.00000000E+00 1.81133405E-08 0.00000000E+00 9.41749501E-11
+-5.76908586E-03 1.55929159E-08-2.99877757E-05 8.10878574E-11 3.19719271E-03
+ 0.00000000E+00 2.19881840E-03-6.78436473E-18 6.67748425E-02 0.00000000E+00
+ 3.22851641E-02-8.26035667E-17 0.00000000E+00 1.81983748E-08 0.00000000E+00
+-9.44205640E-11-5.79020672E-03 1.56811786E-08 3.00487209E-05-8.13427179E-11
+ 2.60238112E-02 0.00000000E+00 3.30885522E-03 0.00000000E+00 1.81108061E-02
+-4.89852724E-17 2.32911916E-03-5.70728089E-18 5.26891740E-01 0.00000000E+00
+ 6.49562595E-02 0.00000000E+00 2.58704982E-01-6.93850403E-16 3.23912444E-02
+-8.72980460E-17 5.68180576E-03 1.52482245E-08 2.95369603E-05 7.92966569E-11
+ 0.00000000E+00 1.77771835E-08 0.00000000E+00 9.24293752E-11 2.07185090E-03
+ 9.58677228E-18 3.08685020E-03 0.00000000E+00 3.21814691E-02 8.97802769E-17
+ 6.87126594E-02 0.00000000E+00 5.70502407E-03 1.53362154E-08-2.96039546E-05
+-7.95505221E-11 0.00000000E+00 1.78632906E-08 0.00000000E+00-9.26777854E-11
+ 1.70817348E-02 6.78900744E-17 2.19882241E-03 7.09452185E-18 2.51358509E-02
+ 0.00000000E+00 3.19720434E-03 0.00000000E+00 2.57866246E-01 6.62536703E-16
+ 3.22852585E-02 7.79925675E-17 5.41913060E-01 0.00000000E+00 6.67745347E-02
+ 0.00000000E+00 9.50931653E-03 0.00000000E+00 5.94037342E-05 0.00000000E+00
+ 1.12130522E-03-2.94524948E-18 7.03420116E-06-1.82585187E-20 0.00000000E+00
+ 9.04175640E-10-2.88206530E-04 7.78066934E-10 0.00000000E+00 9.04175640E-10
+-2.88206530E-04 7.78066934E-10 5.44038861E-02 0.00000000E+00-1.23561660E-06
+ 0.00000000E+00 6.77136049E-03-1.51915483E-17 6.86954619E-07 3.46300968E-21
+ 0.00000000E+00-1.78632906E-08 0.00000000E+00-1.97872792E-08 5.70502407E-03
+-1.53362154E-08 6.31146905E-03-1.70107669E-08 0.00000000E+00-1.78632906E-08
+ 0.00000000E+00-1.97872792E-08 5.70502407E-03-1.53362154E-08 6.31146905E-03
+-1.70107669E-08 9.32580950E-03 0.00000000E+00-5.83446183E-05 0.00000000E+00
+ 1.22334642E-03-2.56110250E-18-7.62303922E-06 1.58533488E-20 0.00000000E+00
+-1.81133405E-08 0.00000000E+00 8.94756941E-10 5.76908586E-03-1.55929159E-08
+-2.85743431E-04 7.68340888E-10 0.00000000E+00-1.81133405E-08 0.00000000E+00
+ 8.94756941E-10 5.76908586E-03-1.55929159E-08-2.85743431E-04 7.68340888E-10
+-2.81112050E-04-7.51181301E-10 1.67485839E-08 6.34663132E-14 0.00000000E+00
+-8.77865997E-10 0.00000000E+00 6.21025524E-14-1.06766833E-03-4.17032353E-18
+-1.57101364E-03 0.00000000E+00-1.61166819E-02-4.19432111E-17-3.38717985E-02
+ 0.00000000E+00 6.31146905E-03 1.70107669E-08 3.19691203E-08 1.28912140E-13
+ 0.00000000E+00 1.97872792E-08 0.00000000E+00 1.25857622E-13 2.19882241E-03
+ 7.09452185E-18 8.79647065E-03 2.82352026E-17 3.19720434E-03 0.00000000E+00
+ 1.27892614E-02 0.00000000E+00 3.22852585E-02 7.79925675E-17 1.29141664E-01
+ 3.26605840E-16 6.67745347E-02 0.00000000E+00 2.67141448E-01 0.00000000E+00
+-2.92197082E-04-7.95313638E-10 1.52363001E-08 6.37151206E-14 0.00000000E+00
+-9.20744546E-10 0.00000000E+00 6.14034667E-14 2.19881840E-03 6.78436473E-18
+-1.13198439E-03-3.12291141E-18 3.19719271E-03 0.00000000E+00-1.62651198E-03
+ 0.00000000E+00 3.22851641E-02 8.26035667E-17-1.61691021E-02-4.24754032E-17
+ 6.67748425E-02 0.00000000E+00-3.29327755E-02 0.00000000E+00 0.00000000E+00
+-8.77865997E-10 0.00000000E+00 6.21025524E-14 2.81112050E-04-7.51181301E-10
+-1.67485839E-08 6.34663132E-14-1.57101364E-03 0.00000000E+00-1.06766833E-03
+ 4.17032353E-18-3.38717985E-02 0.00000000E+00-1.61166819E-02 4.19432111E-17
+ 0.00000000E+00 1.97872792E-08 0.00000000E+00 1.25857622E-13-6.31146905E-03
+ 1.70107669E-08-3.19691203E-08 1.28912140E-13 3.19720434E-03 0.00000000E+00
+ 1.27892614E-02 0.00000000E+00 2.19882241E-03-7.09452185E-18 8.79647065E-03
+-2.82352026E-17 6.67745347E-02 0.00000000E+00 2.67141448E-01 0.00000000E+00
+ 3.22852585E-02-7.79925675E-17 1.29141664E-01-3.26605840E-16 0.00000000E+00
+-9.20744546E-10 0.00000000E+00 6.14034667E-14 2.92197082E-04-7.95313638E-10
+-1.52363001E-08 6.37151206E-14 3.19719271E-03 0.00000000E+00-1.62651198E-03
+ 0.00000000E+00 2.19881840E-03-6.78436473E-18-1.13198439E-03 3.12291141E-18
+ 6.67748425E-02 0.00000000E+00-3.29327755E-02 0.00000000E+00 3.22851641E-02
+-8.26035667E-17-1.61691021E-02 4.24754032E-17-2.81112050E-04-7.51181301E-10
+ 1.67485839E-08 6.34663132E-14 0.00000000E+00-8.77865997E-10 0.00000000E+00
+ 6.21025524E-14-1.06766833E-03-4.17032353E-18-1.57101364E-03 0.00000000E+00
+-1.06766833E-03-4.17032353E-18-1.57101364E-03 0.00000000E+00 6.31146905E-03
+ 1.70107669E-08 3.19691203E-08 1.28912140E-13 0.00000000E+00 1.97872792E-08
+ 0.00000000E+00 1.25857622E-13 2.19882241E-03 7.09452185E-18 8.79647065E-03
+ 2.82352026E-17 3.19720434E-03 0.00000000E+00 1.27892614E-02 0.00000000E+00
+ 2.19882241E-03 7.09452185E-18 8.79647065E-03 2.82352026E-17 3.19720434E-03
+ 0.00000000E+00 1.27892614E-02 0.00000000E+00-2.92197082E-04-7.95313638E-10
+ 1.52363001E-08 6.37151206E-14 0.00000000E+00-9.20744546E-10 0.00000000E+00
+ 6.14034667E-14 2.19881840E-03 6.78436473E-18-1.13198439E-03-3.12291141E-18
+ 3.19719271E-03 0.00000000E+00-1.62651198E-03 0.00000000E+00 2.19881840E-03
+ 6.78436473E-18-1.13198439E-03-3.12291141E-18 3.19719271E-03 0.00000000E+00
+-1.62651198E-03 0.00000000E+00 0.00000000E+00-8.77865997E-10 0.00000000E+00
+ 6.21025524E-14 2.81112050E-04-7.51181301E-10-1.67485839E-08 6.34663132E-14
+-1.57101364E-03 0.00000000E+00-1.06766833E-03 4.17032353E-18-1.57101364E-03
+ 0.00000000E+00-1.06766833E-03 4.17032353E-18 0.00000000E+00 1.97872792E-08
+ 0.00000000E+00 1.25857622E-13-6.31146905E-03 1.70107669E-08-3.19691203E-08
+ 1.28912140E-13 3.19720434E-03 0.00000000E+00 1.27892614E-02 0.00000000E+00
+ 2.19882241E-03-7.09452185E-18 8.79647065E-03-2.82352026E-17 3.19720434E-03
+ 0.00000000E+00 1.27892614E-02 0.00000000E+00 2.19882241E-03-7.09452185E-18
+ 8.79647065E-03-2.82352026E-17 0.00000000E+00-9.20744546E-10 0.00000000E+00
+ 6.14034667E-14 2.92197082E-04-7.95313638E-10-1.52363001E-08 6.37151206E-14
+ 3.19719271E-03 0.00000000E+00-1.62651198E-03 0.00000000E+00 2.19881840E-03
+-6.78436473E-18-1.13198439E-03 3.12291141E-18 3.19719271E-03 0.00000000E+00
+-1.62651198E-03 0.00000000E+00 2.19881840E-03-6.78436473E-18-1.13198439E-03
+ 3.12291141E-18-6.98597590E-06-1.85728418E-20-4.20097894E-08-1.10398524E-22
+-5.94955755E-05 0.00000000E+00-3.56268299E-07 0.00000000E+00-1.67485839E-08
+-6.34663132E-14 0.00000000E+00-6.21025524E-14-1.67485839E-08-6.34663132E-14
+ 0.00000000E+00-6.21025524E-14 6.86954619E-07-3.46300968E-21 1.17102516E-07
+ 2.67568472E-22-1.23561660E-06 0.00000000E+00 9.40793173E-07 0.00000000E+00
+ 2.96039546E-05 7.95505221E-11-3.19691203E-08-1.28912140E-13 0.00000000E+00
+ 9.26777854E-11 0.00000000E+00-1.25857622E-13 2.96039546E-05 7.95505221E-11
+-3.19691203E-08-1.28912140E-13 0.00000000E+00 9.26777854E-11 0.00000000E+00
+-1.25857622E-13 7.67296125E-06 1.61425573E-20-4.58325214E-08-9.56922938E-23
+ 5.82598827E-05 0.00000000E+00-3.49391184E-07 0.00000000E+00-2.99877757E-05
+-8.10878574E-11-1.52363001E-08-6.37151206E-14 0.00000000E+00-9.41749501E-11
+ 0.00000000E+00-6.14034667E-14-2.99877757E-05-8.10878574E-11-1.52363001E-08
+-6.37151206E-14 0.00000000E+00-9.41749501E-11 0.00000000E+00-6.14034667E-14
+ 1.12130522E-03 2.94524948E-18 7.03420116E-06 1.82585187E-20 9.50931653E-03
+ 0.00000000E+00 5.94037342E-05 0.00000000E+00 2.88206530E-04 7.78066934E-10
+ 0.00000000E+00 9.04175640E-10 2.88206530E-04 7.78066934E-10 0.00000000E+00
+ 9.04175640E-10 6.77136049E-03 1.51915483E-17 6.86954619E-07-3.46300968E-21
+ 5.44038861E-02 0.00000000E+00-1.23561660E-06 0.00000000E+00-5.70502407E-03
+-1.53362154E-08-6.31146905E-03-1.70107669E-08 0.00000000E+00-1.78632906E-08
+ 0.00000000E+00-1.97872792E-08-5.70502407E-03-1.53362154E-08-6.31146905E-03
+-1.70107669E-08 0.00000000E+00-1.78632906E-08 0.00000000E+00-1.97872792E-08
+ 1.22334642E-03 2.56110250E-18-7.62303922E-06-1.58533488E-20 9.32580950E-03
+ 0.00000000E+00-5.83446183E-05 0.00000000E+00-5.76908586E-03-1.55929159E-08
+ 2.85743431E-04 7.68340888E-10 0.00000000E+00-1.81133405E-08 0.00000000E+00
+ 8.94756941E-10-5.76908586E-03-1.55929159E-08 2.85743431E-04 7.68340888E-10
+ 0.00000000E+00-1.81133405E-08 0.00000000E+00 8.94756941E-10-5.94955755E-05
+ 0.00000000E+00-3.56268299E-07 0.00000000E+00-6.98597590E-06 1.85728418E-20
+-4.20097894E-08 1.10398524E-22 0.00000000E+00-6.21025524E-14 1.67485839E-08
+-6.34663132E-14 0.00000000E+00-6.21025524E-14 1.67485839E-08-6.34663132E-14
+-1.23561660E-06 0.00000000E+00 9.40793173E-07 0.00000000E+00 6.86954619E-07
+ 3.46300968E-21 1.17102516E-07-2.67568472E-22 0.00000000E+00 9.26777854E-11
+ 0.00000000E+00-1.25857622E-13-2.96039546E-05 7.95505221E-11 3.19691203E-08
+-1.28912140E-13 0.00000000E+00 9.26777854E-11 0.00000000E+00-1.25857622E-13
+-2.96039546E-05 7.95505221E-11 3.19691203E-08-1.28912140E-13 5.82598827E-05
+ 0.00000000E+00-3.49391184E-07 0.00000000E+00 7.67296125E-06-1.61425573E-20
+-4.58325214E-08 9.56922938E-23 0.00000000E+00-9.41749501E-11 0.00000000E+00
+-6.14034667E-14 2.99877757E-05-8.10878574E-11 1.52363001E-08-6.37151206E-14
+ 0.00000000E+00-9.41749501E-11 0.00000000E+00-6.14034667E-14 2.99877757E-05
+-8.10878574E-11 1.52363001E-08-6.37151206E-14 0.00000000E+00 1.77771835E-08
+ 0.00000000E+00 9.24293752E-11-5.68180576E-03 1.52482245E-08-2.95369603E-05
+ 7.92966569E-11 3.08685020E-03 0.00000000E+00 2.07185090E-03-9.58677228E-18
+ 3.08685020E-03 0.00000000E+00 2.07185090E-03-9.58677228E-18 0.00000000E+00
+ 1.78632906E-08 0.00000000E+00-9.26777854E-11-5.70502407E-03 1.53362154E-08
+ 2.96039546E-05-7.95505221E-11 2.51358509E-02 0.00000000E+00 3.19720434E-03
+ 0.00000000E+00 1.70817348E-02-6.78900744E-17 2.19882241E-03-7.09452185E-18
+ 2.51358509E-02 0.00000000E+00 3.19720434E-03 0.00000000E+00 1.70817348E-02
+-6.78900744E-17 2.19882241E-03-7.09452185E-18 5.68180576E-03 1.52482245E-08
+ 2.95369603E-05 7.92966569E-11 0.00000000E+00 1.77771835E-08 0.00000000E+00
+ 9.24293752E-11 2.07185090E-03 9.58677228E-18 3.08685020E-03 0.00000000E+00
+ 2.07185090E-03 9.58677228E-18 3.08685020E-03 0.00000000E+00 5.70502407E-03
+ 1.53362154E-08-2.96039546E-05-7.95505221E-11 0.00000000E+00 1.78632906E-08
+ 0.00000000E+00-9.26777854E-11 1.70817348E-02 6.78900744E-17 2.19882241E-03
+ 7.09452185E-18 2.51358509E-02 0.00000000E+00 3.19720434E-03 0.00000000E+00
+ 1.70817348E-02 6.78900744E-17 2.19882241E-03 7.09452185E-18 2.51358509E-02
+ 0.00000000E+00 3.19720434E-03 0.00000000E+00 0.00000000E+00 1.77771835E-08
+ 0.00000000E+00 9.24293752E-11-5.68180576E-03 1.52482245E-08-2.95369603E-05
+ 7.92966569E-11 3.08685020E-03 0.00000000E+00 2.07185090E-03-9.58677228E-18
+ 6.87126594E-02 0.00000000E+00 3.21814691E-02-8.97802769E-17 0.00000000E+00
+ 1.78632906E-08 0.00000000E+00-9.26777854E-11-5.70502407E-03 1.53362154E-08
+ 2.96039546E-05-7.95505221E-11 2.51358509E-02 0.00000000E+00 3.19720434E-03
+ 0.00000000E+00 1.70817348E-02-6.78900744E-17 2.19882241E-03-7.09452185E-18
+ 5.41913060E-01 0.00000000E+00 6.67745347E-02 0.00000000E+00 2.57866246E-01
+-6.62536703E-16 3.22852585E-02-7.79925675E-17 5.58649320E-03 1.49107484E-08
+ 2.90443851E-05 7.75420582E-11 0.00000000E+00 1.74443163E-08 0.00000000E+00
+ 9.07001864E-11 1.94826233E-03 3.72250916E-18 2.97776896E-03 0.00000000E+00
+ 3.20801480E-02 1.01968760E-16 7.07814028E-02 0.00000000E+00 5.61176812E-03
+ 1.49969008E-08-2.91173153E-05-7.77906571E-11 0.00000000E+00 1.75297687E-08
+ 0.00000000E+00-9.09467702E-11 1.60794946E-02 5.42054407E-17 2.07185455E-03
+ 9.61415372E-18 2.42581671E-02 0.00000000E+00 3.08686146E-03 0.00000000E+00
+ 2.57046140E-01 7.76117064E-16 3.21815600E-02 9.16850905E-17 5.57935541E-01
+ 0.00000000E+00 6.87122826E-02 0.00000000E+00 9.70823611E-03 0.00000000E+00
+ 6.06436474E-05 0.00000000E+00 1.02276816E-03-2.82492979E-18 6.41735957E-06
+-1.78773838E-20 0.00000000E+00 8.87410413E-10-2.83806714E-04 7.60863639E-10
+ 0.00000000E+00 8.87410413E-10-2.83806714E-04 7.60863639E-10 5.55079470E-02
+ 0.00000000E+00-1.33942420E-06 0.00000000E+00 6.19194947E-03-1.76678758E-17
+ 6.63351860E-07-7.99801471E-22 0.00000000E+00-1.75297687E-08 0.00000000E+00
+-1.94186533E-08 5.61176812E-03-1.49969008E-08 6.21216396E-03-1.66342274E-08
+ 0.00000000E+00-1.75297687E-08 0.00000000E+00-1.94186533E-08 5.61176812E-03
+-1.49969008E-08 6.21216396E-03-1.66342274E-08 9.50931653E-03 0.00000000E+00
+-5.94955755E-05 0.00000000E+00 1.12130522E-03-2.94524948E-18-6.98597590E-06
+ 1.85728418E-20 0.00000000E+00-1.77771835E-08 0.00000000E+00 8.77865997E-10
+ 5.68180576E-03-1.52482245E-08-2.81112050E-04 7.51181301E-10 0.00000000E+00
+-1.77771835E-08 0.00000000E+00 8.77865997E-10 5.68180576E-03-1.52482245E-08
+-2.81112050E-04 7.51181301E-10-2.76083797E-04-7.34539045E-10 1.82325560E-08
+ 6.21497268E-14 0.00000000E+00-8.61299623E-10 0.00000000E+00 6.16459487E-14
+-1.00502922E-03-3.33416572E-18-1.51615760E-03 0.00000000E+00-1.60654270E-02
+-4.84134625E-17-3.48734214E-02 0.00000000E+00 6.21216396E-03 1.66342274E-08
+ 3.49446081E-08 1.25351599E-13 0.00000000E+00 1.94186533E-08 0.00000000E+00
+ 1.23320926E-13 2.07185455E-03 9.61415372E-18 8.28861779E-03 3.55134924E-17
+ 3.08686146E-03 0.00000000E+00 1.23478740E-02 0.00000000E+00 3.21815600E-02
+ 9.16850905E-17 1.28726908E-01 3.62701750E-16 6.87122826E-02 0.00000000E+00
+ 2.74896668E-01 0.00000000E+00-2.88206530E-04-7.78066934E-10 1.67485839E-08
+ 6.34663132E-14 0.00000000E+00-9.04175640E-10 0.00000000E+00 6.21025524E-14
+ 2.07185090E-03 9.58677228E-18-1.06766833E-03-4.17032353E-18 3.08685020E-03
+ 0.00000000E+00-1.57101364E-03 0.00000000E+00 3.21814691E-02 8.97802769E-17
+-1.61166819E-02-4.19432111E-17 6.87126594E-02 0.00000000E+00-3.38717985E-02
+ 0.00000000E+00 0.00000000E+00-8.61299623E-10 0.00000000E+00 6.16459487E-14
+ 2.76083797E-04-7.34539045E-10-1.82325560E-08 6.21497268E-14-1.51615760E-03
+ 0.00000000E+00-1.00502922E-03 3.33416572E-18-3.48734214E-02 0.00000000E+00
+-1.60654270E-02 4.84134625E-17 0.00000000E+00 1.94186533E-08 0.00000000E+00
+ 1.23320926E-13-6.21216396E-03 1.66342274E-08-3.49446081E-08 1.25351599E-13
+ 3.08686146E-03 0.00000000E+00 1.23478740E-02 0.00000000E+00 2.07185455E-03
+-9.61415372E-18 8.28861779E-03-3.55134924E-17 6.87122826E-02 0.00000000E+00
+ 2.74896668E-01 0.00000000E+00 3.21815600E-02-9.16850905E-17 1.28726908E-01
+-3.62701750E-16 0.00000000E+00-9.04175640E-10 0.00000000E+00 6.21025524E-14
+ 2.88206530E-04-7.78066934E-10-1.67485839E-08 6.34663132E-14 3.08685020E-03
+ 0.00000000E+00-1.57101364E-03 0.00000000E+00 2.07185090E-03-9.58677228E-18
+-1.06766833E-03 4.17032353E-18 6.87126594E-02 0.00000000E+00-3.38717985E-02
+ 0.00000000E+00 3.21814691E-02-8.97802769E-17-1.61166819E-02 4.19432111E-17
+-2.76083797E-04-7.34539045E-10 1.82325560E-08 6.21497268E-14 0.00000000E+00
+-8.61299623E-10 0.00000000E+00 6.16459487E-14-1.00502922E-03-3.33416572E-18
+-1.51615760E-03 0.00000000E+00-1.00502922E-03-3.33416572E-18-1.51615760E-03
+ 0.00000000E+00 6.21216396E-03 1.66342274E-08 3.49446081E-08 1.25351599E-13
+ 0.00000000E+00 1.94186533E-08 0.00000000E+00 1.23320926E-13 2.07185455E-03
+ 9.61415372E-18 8.28861779E-03 3.55134924E-17 3.08686146E-03 0.00000000E+00
+ 1.23478740E-02 0.00000000E+00 2.07185455E-03 9.61415372E-18 8.28861779E-03
+ 3.55134924E-17 3.08686146E-03 0.00000000E+00 1.23478740E-02 0.00000000E+00
+-2.88206530E-04-7.78066934E-10 1.67485839E-08 6.34663132E-14 0.00000000E+00
+-9.04175640E-10 0.00000000E+00 6.21025524E-14 2.07185090E-03 9.58677228E-18
+-1.06766833E-03-4.17032353E-18 3.08685020E-03 0.00000000E+00-1.57101364E-03
+ 0.00000000E+00 2.07185090E-03 9.58677228E-18-1.06766833E-03-4.17032353E-18
+ 3.08685020E-03 0.00000000E+00-1.57101364E-03 0.00000000E+00 0.00000000E+00
+-8.61299623E-10 0.00000000E+00 6.16459487E-14 2.76083797E-04-7.34539045E-10
+-1.82325560E-08 6.21497268E-14-1.51615760E-03 0.00000000E+00-1.00502922E-03
+ 3.33416572E-18-1.51615760E-03 0.00000000E+00-1.00502922E-03 3.33416572E-18
+ 0.00000000E+00 1.94186533E-08 0.00000000E+00 1.23320926E-13-6.21216396E-03
+ 1.66342274E-08-3.49446081E-08 1.25351599E-13 3.08686146E-03 0.00000000E+00
+ 1.23478740E-02 0.00000000E+00 2.07185455E-03-9.61415372E-18 8.28861779E-03
+-3.55134924E-17 3.08686146E-03 0.00000000E+00 1.23478740E-02 0.00000000E+00
+ 2.07185455E-03-9.61415372E-18 8.28861779E-03-3.55134924E-17 0.00000000E+00
+-9.04175640E-10 0.00000000E+00 6.21025524E-14 2.88206530E-04-7.78066934E-10
+-1.67485839E-08 6.34663132E-14 3.08685020E-03 0.00000000E+00-1.57101364E-03
+ 0.00000000E+00 2.07185090E-03-9.58677228E-18-1.06766833E-03 4.17032353E-18
+ 3.08685020E-03 0.00000000E+00-1.57101364E-03 0.00000000E+00 2.07185090E-03
+-9.58677228E-18-1.06766833E-03 4.17032353E-18-6.37080126E-06-1.74478440E-20
+-3.83183027E-08-1.05873576E-22-6.07431963E-05 0.00000000E+00-3.63722941E-07
+ 0.00000000E+00-1.82325560E-08-6.21497268E-14 0.00000000E+00-6.16459487E-14
+-1.82325560E-08-6.21497268E-14 0.00000000E+00-6.16459487E-14 6.63351860E-07
+ 7.99801471E-22 1.07083922E-07 2.97751428E-22-1.33942420E-06 0.00000000E+00
+ 9.59894928E-07 0.00000000E+00 2.91173153E-05 7.77906571E-11-3.49446081E-08
+-1.25351599E-13 0.00000000E+00 9.09467702E-11 0.00000000E+00-1.23320926E-13
+ 2.91173153E-05 7.77906571E-11-3.49446081E-08-1.25351599E-13 0.00000000E+00
+ 9.09467702E-11 0.00000000E+00-1.23320926E-13 7.03420116E-06 1.82585187E-20
+-4.20097894E-08-1.10398524E-22 5.94037342E-05 0.00000000E+00-3.56268299E-07
+ 0.00000000E+00-2.95369603E-05-7.92966569E-11-1.67485839E-08-6.34663132E-14
+ 0.00000000E+00-9.24293752E-11 0.00000000E+00-6.21025524E-14-2.95369603E-05
+-7.92966569E-11-1.67485839E-08-6.34663132E-14 0.00000000E+00-9.24293752E-11
+ 0.00000000E+00-6.21025524E-14 1.02276816E-03 2.82492979E-18 6.41735957E-06
+ 1.78773838E-20 9.70823611E-03 0.00000000E+00 6.06436474E-05 0.00000000E+00
+ 2.83806714E-04 7.60863639E-10 0.00000000E+00 8.87410413E-10 2.83806714E-04
+ 7.60863639E-10 0.00000000E+00 8.87410413E-10 6.19194947E-03 1.76678758E-17
+ 6.63351860E-07 7.99801471E-22 5.55079470E-02 0.00000000E+00-1.33942420E-06
+ 0.00000000E+00-5.61176812E-03-1.49969008E-08-6.21216396E-03-1.66342274E-08
+ 0.00000000E+00-1.75297687E-08 0.00000000E+00-1.94186533E-08-5.61176812E-03
+-1.49969008E-08-6.21216396E-03-1.66342274E-08 0.00000000E+00-1.75297687E-08
+ 0.00000000E+00-1.94186533E-08 1.12130522E-03 2.94524948E-18-6.98597590E-06
+-1.85728418E-20 9.50931653E-03 0.00000000E+00-5.94955755E-05 0.00000000E+00
+-5.68180576E-03-1.52482245E-08 2.81112050E-04 7.51181301E-10 0.00000000E+00
+-1.77771835E-08 0.00000000E+00 8.77865997E-10-5.68180576E-03-1.52482245E-08
+ 2.81112050E-04 7.51181301E-10 0.00000000E+00-1.77771835E-08 0.00000000E+00
+ 8.77865997E-10-6.07431963E-05 0.00000000E+00-3.63722941E-07 0.00000000E+00
+-6.37080126E-06 1.74478440E-20-3.83183027E-08 1.05873576E-22 0.00000000E+00
+-6.16459487E-14 1.82325560E-08-6.21497268E-14 0.00000000E+00-6.16459487E-14
+ 1.82325560E-08-6.21497268E-14-1.33942420E-06 0.00000000E+00 9.59894928E-07
+ 0.00000000E+00 6.63351860E-07-7.99801471E-22 1.07083922E-07-2.97751428E-22
+ 0.00000000E+00 9.09467702E-11 0.00000000E+00-1.23320926E-13-2.91173153E-05
+ 7.77906571E-11 3.49446081E-08-1.25351599E-13 0.00000000E+00 9.09467702E-11
+ 0.00000000E+00-1.23320926E-13-2.91173153E-05 7.77906571E-11 3.49446081E-08
+-1.25351599E-13 5.94037342E-05 0.00000000E+00-3.56268299E-07 0.00000000E+00
+ 7.03420116E-06-1.82585187E-20-4.20097894E-08 1.10398524E-22 0.00000000E+00
+-9.24293752E-11 0.00000000E+00-6.21025524E-14 2.95369603E-05-7.92966569E-11
+ 1.67485839E-08-6.34663132E-14 0.00000000E+00-9.24293752E-11 0.00000000E+00
+-6.21025524E-14 2.95369603E-05-7.92966569E-11 1.67485839E-08-6.34663132E-14
+ 0.00000000E+00 1.74443163E-08 0.00000000E+00 9.07001864E-11-5.58649320E-03
+ 1.49107484E-08-2.90443851E-05 7.75420582E-11 2.97776896E-03 0.00000000E+00
+ 1.94826233E-03-3.72250916E-18 2.97776896E-03 0.00000000E+00 1.94826233E-03
+-3.72250916E-18 0.00000000E+00 1.75297687E-08 0.00000000E+00-9.09467702E-11
+-5.61176812E-03 1.49969008E-08 2.91173153E-05-7.77906571E-11 2.42581671E-02
+ 0.00000000E+00 3.08686146E-03 0.00000000E+00 1.60794946E-02-5.42054407E-17
+ 2.07185455E-03-9.61415372E-18 2.42581671E-02 0.00000000E+00 3.08686146E-03
+ 0.00000000E+00 1.60794946E-02-5.42054407E-17 2.07185455E-03-9.61415372E-18
+ 5.58649320E-03 1.49107484E-08 2.90443851E-05 7.75420582E-11 0.00000000E+00
+ 1.74443163E-08 0.00000000E+00 9.07001864E-11 1.94826233E-03 3.72250916E-18
+ 2.97776896E-03 0.00000000E+00 1.94826233E-03 3.72250916E-18 2.97776896E-03
+ 0.00000000E+00 5.61176812E-03 1.49969008E-08-2.91173153E-05-7.77906571E-11
+ 0.00000000E+00 1.75297687E-08 0.00000000E+00-9.09467702E-11 1.60794946E-02
+ 5.42054407E-17 2.07185455E-03 9.61415372E-18 2.42581671E-02 0.00000000E+00
+ 3.08686146E-03 0.00000000E+00 1.60794946E-02 5.42054407E-17 2.07185455E-03
+ 9.61415372E-18 2.42581671E-02 0.00000000E+00 3.08686146E-03 0.00000000E+00
+ 0.00000000E+00 1.74443163E-08 0.00000000E+00 9.07001864E-11-5.58649320E-03
+ 1.49107484E-08-2.90443851E-05 7.75420582E-11 2.97776896E-03 0.00000000E+00
+ 1.94826233E-03-3.72250916E-18 7.07814028E-02 0.00000000E+00 3.20801480E-02
+-1.01968760E-16 0.00000000E+00 1.75297687E-08 0.00000000E+00-9.09467702E-11
+-5.61176812E-03 1.49969008E-08 2.91173153E-05-7.77906571E-11 2.42581671E-02
+ 0.00000000E+00 3.08686146E-03 0.00000000E+00 1.60794946E-02-5.42054407E-17
+ 2.07185455E-03-9.61415372E-18 5.57935541E-01 0.00000000E+00 6.87122826E-02
+ 0.00000000E+00 2.57046140E-01-7.76117064E-16 3.21815600E-02-9.16850905E-17
+ 5.48333417E-03 1.45807591E-08 2.85109682E-05 7.58259426E-11 0.00000000E+00
+ 1.71140754E-08 0.00000000E+00 8.89841868E-11 1.82810490E-03 3.30222348E-18
+ 2.86990801E-03 0.00000000E+00 3.19812816E-02 1.10710122E-16 7.29940319E-02
+ 0.00000000E+00 5.51059712E-03 1.46648231E-08-2.85896349E-05-7.60685020E-11
+ 0.00000000E+00 1.71986476E-08 0.00000000E+00-8.92282110E-11 1.51044946E-02
+ 2.40504938E-17 1.94826564E-03 3.22506667E-18 2.33904075E-02 0.00000000E+00
+ 2.97777966E-03 0.00000000E+00 2.56245368E-01 8.62754447E-16 3.20802392E-02
+ 1.02998118E-16 5.75056797E-01 0.00000000E+00 7.07809547E-02 0.00000000E+00
+ 9.92391215E-03 0.00000000E+00 6.19879592E-05 0.00000000E+00 9.27649615E-04
+-2.38100162E-18 5.82190668E-06-1.47919452E-20 0.00000000E+00 8.70744152E-10
+-2.79002658E-04 7.43994686E-10 0.00000000E+00 8.70744152E-10-2.79002658E-04
+ 7.43994686E-10 5.67047718E-02 0.00000000E+00-1.45217968E-06 0.00000000E+00
+ 5.63255309E-03-1.42366960E-17 6.40353002E-07-3.42444934E-21 0.00000000E+00
+-1.71986476E-08 0.00000000E+00-1.90533146E-08 5.51059712E-03-1.46648231E-08
+ 6.10407348E-03-1.62658447E-08 0.00000000E+00-1.71986476E-08 0.00000000E+00
+-1.90533146E-08 5.51059712E-03-1.46648231E-08 6.10407348E-03-1.62658447E-08
+ 9.70823611E-03 0.00000000E+00-6.07431963E-05 0.00000000E+00 1.02276816E-03
+-2.82492979E-18-6.37080126E-06 1.74478440E-20 0.00000000E+00-1.74443163E-08
+ 0.00000000E+00 8.61299623E-10 5.58649320E-03-1.49107484E-08-2.76083797E-04
+ 7.34539045E-10 0.00000000E+00-1.74443163E-08 0.00000000E+00 8.61299623E-10
+ 5.58649320E-03-1.49107484E-08-2.76083797E-04 7.34539045E-10-2.70672289E-04
+-7.18308503E-10 1.96666770E-08 6.06398415E-14 0.00000000E+00-8.44902705E-10
+ 0.00000000E+00 6.10060468E-14-9.44092636E-04-1.63182254E-18-1.46192192E-03
+ 0.00000000E+00-1.60153802E-02-5.34270599E-17-3.59437467E-02 0.00000000E+00
+ 6.10407348E-03 1.62658447E-08 3.78768869E-08 1.22759750E-13 0.00000000E+00
+ 1.90533146E-08 0.00000000E+00 1.22625861E-13 1.94826564E-03 3.22506667E-18
+ 7.79428142E-03 1.59335072E-17 2.97777966E-03 0.00000000E+00 1.19115333E-02
+ 0.00000000E+00 3.20802392E-02 1.02998118E-16 1.28321652E-01 4.08688011E-16
+ 7.07809547E-02 0.00000000E+00 2.83176128E-01 0.00000000E+00-2.83806714E-04
+-7.60863639E-10 1.82325560E-08 6.21497268E-14 0.00000000E+00-8.87410413E-10
+ 0.00000000E+00 6.16459487E-14 1.94826233E-03 3.72250916E-18-1.00502922E-03
+-3.33416572E-18 2.97776896E-03 0.00000000E+00-1.51615760E-03 0.00000000E+00
+ 3.20801480E-02 1.01968760E-16-1.60654270E-02-4.84134625E-17 7.07814028E-02
+ 0.00000000E+00-3.48734214E-02 0.00000000E+00 0.00000000E+00-8.44902705E-10
+ 0.00000000E+00 6.10060468E-14 2.70672289E-04-7.18308503E-10-1.96666770E-08
+ 6.06398415E-14-1.46192192E-03 0.00000000E+00-9.44092636E-04 1.63182254E-18
+-3.59437467E-02 0.00000000E+00-1.60153802E-02 5.34270599E-17 0.00000000E+00
+ 1.90533146E-08 0.00000000E+00 1.22625861E-13-6.10407348E-03 1.62658447E-08
+-3.78768869E-08 1.22759750E-13 2.97777966E-03 0.00000000E+00 1.19115333E-02
+ 0.00000000E+00 1.94826564E-03-3.22506667E-18 7.79428142E-03-1.59335072E-17
+ 7.07809547E-02 0.00000000E+00 2.83176128E-01 0.00000000E+00 3.20802392E-02
+-1.02998118E-16 1.28321652E-01-4.08688011E-16 0.00000000E+00-8.87410413E-10
+ 0.00000000E+00 6.16459487E-14 2.83806714E-04-7.60863639E-10-1.82325560E-08
+ 6.21497268E-14 2.97776896E-03 0.00000000E+00-1.51615760E-03 0.00000000E+00
+ 1.94826233E-03-3.72250916E-18-1.00502922E-03 3.33416572E-18 7.07814028E-02
+ 0.00000000E+00-3.48734214E-02 0.00000000E+00 3.20801480E-02-1.01968760E-16
+-1.60654270E-02 4.84134625E-17-2.70672289E-04-7.18308503E-10 1.96666770E-08
+ 6.06398415E-14 0.00000000E+00-8.44902705E-10 0.00000000E+00 6.10060468E-14
+-9.44092636E-04-1.63182254E-18-1.46192192E-03 0.00000000E+00-9.44092636E-04
+-1.63182254E-18-1.46192192E-03 0.00000000E+00 6.10407348E-03 1.62658447E-08
+ 3.78768869E-08 1.22759750E-13 0.00000000E+00 1.90533146E-08 0.00000000E+00
+ 1.22625861E-13 1.94826564E-03 3.22506667E-18 7.79428142E-03 1.59335072E-17
+ 2.97777966E-03 0.00000000E+00 1.19115333E-02 0.00000000E+00 1.94826564E-03
+ 3.22506667E-18 7.79428142E-03 1.59335072E-17 2.97777966E-03 0.00000000E+00
+ 1.19115333E-02 0.00000000E+00-2.83806714E-04-7.60863639E-10 1.82325560E-08
+ 6.21497268E-14 0.00000000E+00-8.87410413E-10 0.00000000E+00 6.16459487E-14
+ 1.94826233E-03 3.72250916E-18-1.00502922E-03-3.33416572E-18 2.97776896E-03
+ 0.00000000E+00-1.51615760E-03 0.00000000E+00 1.94826233E-03 3.72250916E-18
+-1.00502922E-03-3.33416572E-18 2.97776896E-03 0.00000000E+00-1.51615760E-03
+ 0.00000000E+00 0.00000000E+00-8.44902705E-10 0.00000000E+00 6.10060468E-14
+ 2.70672289E-04-7.18308503E-10-1.96666770E-08 6.06398415E-14-1.46192192E-03
+ 0.00000000E+00-9.44092636E-04 1.63182254E-18-1.46192192E-03 0.00000000E+00
+-9.44092636E-04 1.63182254E-18 0.00000000E+00 1.90533146E-08 0.00000000E+00
+ 1.22625861E-13-6.10407348E-03 1.62658447E-08-3.78768869E-08 1.22759750E-13
+ 2.97777966E-03 0.00000000E+00 1.19115333E-02 0.00000000E+00 1.94826564E-03
+-3.22506667E-18 7.79428142E-03-1.59335072E-17 2.97777966E-03 0.00000000E+00
+ 1.19115333E-02 0.00000000E+00 1.94826564E-03-3.22506667E-18 7.79428142E-03
+-1.59335072E-17 0.00000000E+00-8.87410413E-10 0.00000000E+00 6.16459487E-14
+ 2.83806714E-04-7.60863639E-10-1.82325560E-08 6.21497268E-14 2.97776896E-03
+ 0.00000000E+00-1.51615760E-03 0.00000000E+00 1.94826233E-03-3.72250916E-18
+-1.00502922E-03 3.33416572E-18 2.97776896E-03 0.00000000E+00-1.51615760E-03
+ 0.00000000E+00 1.94826233E-03-3.72250916E-18-1.00502922E-03 3.33416572E-18
+-5.77697364E-06-1.49663496E-20-3.47548451E-08-8.90827496E-23-6.20959458E-05
+ 0.00000000E+00-3.71805439E-07 0.00000000E+00-1.96666770E-08-6.06398415E-14
+ 0.00000000E+00-6.10060468E-14-1.96666770E-08-6.06398415E-14 0.00000000E+00
+-6.10060468E-14 6.40353002E-07 3.42444934E-21 9.74111769E-08 2.52361273E-22
+-1.45217968E-06 0.00000000E+00 9.80602257E-07 0.00000000E+00 2.85896349E-05
+ 7.60685020E-11-3.78768869E-08-1.22759750E-13 0.00000000E+00 8.92282110E-11
+ 0.00000000E+00-1.22625861E-13 2.85896349E-05 7.60685020E-11-3.78768869E-08
+-1.22759750E-13 0.00000000E+00 8.92282110E-11 0.00000000E+00-1.22625861E-13
+ 6.41735957E-06 1.78773838E-20-3.83183027E-08-1.05873576E-22 6.06436474E-05
+ 0.00000000E+00-3.63722941E-07 0.00000000E+00-2.90443851E-05-7.75420582E-11
+-1.82325560E-08-6.21497268E-14 0.00000000E+00-9.07001864E-11 0.00000000E+00
+-6.16459487E-14-2.90443851E-05-7.75420582E-11-1.82325560E-08-6.21497268E-14
+ 0.00000000E+00-9.07001864E-11 0.00000000E+00-6.16459487E-14 9.27649615E-04
+ 2.38100162E-18 5.82190668E-06 1.47919452E-20 9.92391215E-03 0.00000000E+00
+ 6.19879592E-05 0.00000000E+00 2.79002658E-04 7.43994686E-10 0.00000000E+00
+ 8.70744152E-10 2.79002658E-04 7.43994686E-10 0.00000000E+00 8.70744152E-10
+ 5.63255309E-03 1.42366960E-17 6.40353002E-07 3.42444934E-21 5.67047718E-02
+ 0.00000000E+00-1.45217968E-06 0.00000000E+00-5.51059712E-03-1.46648231E-08
+-6.10407348E-03-1.62658447E-08 0.00000000E+00-1.71986476E-08 0.00000000E+00
+-1.90533146E-08-5.51059712E-03-1.46648231E-08-6.10407348E-03-1.62658447E-08
+ 0.00000000E+00-1.71986476E-08 0.00000000E+00-1.90533146E-08 1.02276816E-03
+ 2.82492979E-18-6.37080126E-06-1.74478440E-20 9.70823611E-03 0.00000000E+00
+-6.07431963E-05 0.00000000E+00-5.58649320E-03-1.49107484E-08 2.76083797E-04
+ 7.34539045E-10 0.00000000E+00-1.74443163E-08 0.00000000E+00 8.61299623E-10
+-5.58649320E-03-1.49107484E-08 2.76083797E-04 7.34539045E-10 0.00000000E+00
+-1.74443163E-08 0.00000000E+00 8.61299623E-10-6.20959458E-05 0.00000000E+00
+-3.71805439E-07 0.00000000E+00-5.77697364E-06 1.49663496E-20-3.47548451E-08
+ 8.90827496E-23 0.00000000E+00-6.10060468E-14 1.96666770E-08-6.06398415E-14
+ 0.00000000E+00-6.10060468E-14 1.96666770E-08-6.06398415E-14-1.45217968E-06
+ 0.00000000E+00 9.80602257E-07 0.00000000E+00 6.40353002E-07-3.42444934E-21
+ 9.74111769E-08-2.52361273E-22 0.00000000E+00 8.92282110E-11 0.00000000E+00
+-1.22625861E-13-2.85896349E-05 7.60685020E-11 3.78768869E-08-1.22759750E-13
+ 0.00000000E+00 8.92282110E-11 0.00000000E+00-1.22625861E-13-2.85896349E-05
+ 7.60685020E-11 3.78768869E-08-1.22759750E-13 6.06436474E-05 0.00000000E+00
+-3.63722941E-07 0.00000000E+00 6.41735957E-06-1.78773838E-20-3.83183027E-08
+ 1.05873576E-22 0.00000000E+00-9.07001864E-11 0.00000000E+00-6.16459487E-14
+ 2.90443851E-05-7.75420582E-11 1.82325560E-08-6.21497268E-14 0.00000000E+00
+-9.07001864E-11 0.00000000E+00-6.16459487E-14 2.90443851E-05-7.75420582E-11
+ 1.82325560E-08-6.21497268E-14 0.00000000E+00 1.71140754E-08 0.00000000E+00
+ 8.89841868E-11-5.48333417E-03 1.45807591E-08-2.85109682E-05 7.58259426E-11
+ 2.86990801E-03 0.00000000E+00 1.82810490E-03-3.30222348E-18 2.86990801E-03
+ 0.00000000E+00 1.82810490E-03-3.30222348E-18 0.00000000E+00 1.71986476E-08
+ 0.00000000E+00-8.92282110E-11-5.51059712E-03 1.46648231E-08 2.85896349E-05
+-7.60685020E-11 2.33904075E-02 0.00000000E+00 2.97777966E-03 0.00000000E+00
+ 1.51044946E-02-2.40504938E-17 1.94826564E-03-3.22506667E-18 2.33904075E-02
+ 0.00000000E+00 2.97777966E-03 0.00000000E+00 1.51044946E-02-2.40504938E-17
+ 1.94826564E-03-3.22506667E-18 5.48333417E-03 1.45807591E-08 2.85109682E-05
+ 7.58259426E-11 0.00000000E+00 1.71140754E-08 0.00000000E+00 8.89841868E-11
+ 1.82810490E-03 3.30222348E-18 2.86990801E-03 0.00000000E+00 1.82810490E-03
+ 3.30222348E-18 2.86990801E-03 0.00000000E+00 5.51059712E-03 1.46648231E-08
+-2.85896349E-05-7.60685020E-11 0.00000000E+00 1.71986476E-08 0.00000000E+00
+-8.92282110E-11 1.51044946E-02 2.40504938E-17 1.94826564E-03 3.22506667E-18
+ 2.33904075E-02 0.00000000E+00 2.97777966E-03 0.00000000E+00 1.51044946E-02
+ 2.40504938E-17 1.94826564E-03 3.22506667E-18 2.33904075E-02 0.00000000E+00
+ 2.97777966E-03 0.00000000E+00 0.00000000E+00 1.71140754E-08 0.00000000E+00
+ 8.89841868E-11-5.48333417E-03 1.45807591E-08-2.85109682E-05 7.58259426E-11
+ 2.86990801E-03 0.00000000E+00 1.82810490E-03-3.30222348E-18 7.29940319E-02
+ 0.00000000E+00 3.19812816E-02-1.10710122E-16 0.00000000E+00 1.71986476E-08
+ 0.00000000E+00-8.92282110E-11-5.51059712E-03 1.46648231E-08 2.85896349E-05
+-7.60685020E-11 2.33904075E-02 0.00000000E+00 2.97777966E-03 0.00000000E+00
+ 1.51044946E-02-2.40504938E-17 1.94826564E-03-3.22506667E-18 5.75056797E-01
+ 0.00000000E+00 7.07809547E-02 0.00000000E+00 2.56245368E-01-8.62754447E-16
+ 3.20802392E-02-1.02998118E-16 5.37265521E-03 1.42591460E-08 2.79383871E-05
+ 7.41532836E-11 0.00000000E+00 1.67874797E-08 0.00000000E+00 8.72871233E-11
+ 1.71142790E-03 5.04184382E-18 2.76322618E-03 0.00000000E+00 3.18849585E-02
+ 7.86895398E-17 7.53653253E-02 0.00000000E+00 5.40181790E-03 1.43410554E-08
+-2.80225361E-05-7.43896301E-11 0.00000000E+00 1.68711356E-08 0.00000000E+00
+-8.75285091E-11 1.41571429E-02 3.86143922E-17 1.82810811E-03 4.03948329E-18
+ 2.25322484E-02 0.00000000E+00 2.86991859E-03 0.00000000E+00 2.55464585E-01
+ 7.54342736E-16 3.19813722E-02 1.09459049E-16 5.93387629E-01 0.00000000E+00
+ 7.29934964E-02 0.00000000E+00 1.01580228E-02 0.00000000E+00 6.34470882E-05
+ 0.00000000E+00 8.35913479E-04-3.18989215E-18 5.24759342E-06-1.98747951E-20
+ 0.00000000E+00 8.54251359E-10-2.73806992E-04 7.27531143E-10 0.00000000E+00
+ 8.54251359E-10-2.73806992E-04 7.27531143E-10 5.80030827E-02 0.00000000E+00
+-1.57625180E-06 0.00000000E+00 5.09274113E-03-1.59978595E-17 6.17593519E-07
+ 6.56462951E-21 0.00000000E+00-1.68711356E-08 0.00000000E+00-1.86915598E-08
+ 5.40181790E-03-1.43410554E-08 5.98747791E-03-1.59062708E-08 0.00000000E+00
+-1.68711356E-08 0.00000000E+00-1.86915598E-08 5.40181790E-03-1.43410554E-08
+ 5.98747791E-03-1.59062708E-08 9.92391215E-03 0.00000000E+00-6.20959458E-05
+ 0.00000000E+00 9.27649615E-04-2.38100162E-18-5.77697364E-06 1.49663496E-20
+ 0.00000000E+00-1.71140754E-08 0.00000000E+00 8.44902705E-10 5.48333417E-03
+-1.45807591E-08-2.70672289E-04 7.18308503E-10 0.00000000E+00-1.71140754E-08
+ 0.00000000E+00 8.44902705E-10 5.48333417E-03-1.45807591E-08-2.70672289E-04
+ 7.18308503E-10-2.64896136E-04-7.02503236E-10 2.10372404E-08 5.90866267E-14
+ 0.00000000E+00-8.28689812E-10 0.00000000E+00 6.03464434E-14-8.84884002E-04
+-2.27033178E-18-1.40828619E-03 0.00000000E+00-1.59665827E-02-4.70371472E-17
+-3.70897054E-02 0.00000000E+00 5.98747791E-03 1.59062708E-08 4.06859671E-08
+ 1.19621791E-13 0.00000000E+00 1.86915598E-08 0.00000000E+00 1.21217679E-13
+ 1.82810811E-03 4.03948329E-18 7.31366903E-03 1.49856745E-17 2.86991859E-03
+ 0.00000000E+00 1.14800744E-02 0.00000000E+00 3.19813722E-02 1.09459049E-16
+ 1.27926216E-01 4.27082833E-16 7.29934964E-02 0.00000000E+00 2.92031753E-01
+ 0.00000000E+00-2.79002658E-04-7.43994686E-10 1.96666770E-08 6.06398415E-14
+ 0.00000000E+00-8.70744152E-10 0.00000000E+00 6.10060468E-14 1.82810490E-03
+ 3.30222348E-18-9.44092636E-04-1.63182254E-18 2.86990801E-03 0.00000000E+00
+-1.46192192E-03 0.00000000E+00 3.19812816E-02 1.10710122E-16-1.60153802E-02
+-5.34270599E-17 7.29940319E-02 0.00000000E+00-3.59437467E-02 0.00000000E+00
+ 0.00000000E+00-8.28689812E-10 0.00000000E+00 6.03464434E-14 2.64896136E-04
+-7.02503236E-10-2.10372404E-08 5.90866267E-14-1.40828619E-03 0.00000000E+00
+-8.84884002E-04 2.27033178E-18-3.70897054E-02 0.00000000E+00-1.59665827E-02
+ 4.70371472E-17 0.00000000E+00 1.86915598E-08 0.00000000E+00 1.21217679E-13
+-5.98747791E-03 1.59062708E-08-4.06859671E-08 1.19621791E-13 2.86991859E-03
+ 0.00000000E+00 1.14800744E-02 0.00000000E+00 1.82810811E-03-4.03948329E-18
+ 7.31366903E-03-1.49856745E-17 7.29934964E-02 0.00000000E+00 2.92031753E-01
+ 0.00000000E+00 3.19813722E-02-1.09459049E-16 1.27926216E-01-4.27082833E-16
+ 0.00000000E+00-8.70744152E-10 0.00000000E+00 6.10060468E-14 2.79002658E-04
+-7.43994686E-10-1.96666770E-08 6.06398415E-14 2.86990801E-03 0.00000000E+00
+-1.46192192E-03 0.00000000E+00 1.82810490E-03-3.30222348E-18-9.44092636E-04
+ 1.63182254E-18 7.29940319E-02 0.00000000E+00-3.59437467E-02 0.00000000E+00
+ 3.19812816E-02-1.10710122E-16-1.60153802E-02 5.34270599E-17-2.64896136E-04
+-7.02503236E-10 2.10372404E-08 5.90866267E-14 0.00000000E+00-8.28689812E-10
+ 0.00000000E+00 6.03464434E-14-8.84884002E-04-2.27033178E-18-1.40828619E-03
+ 0.00000000E+00-8.84884002E-04-2.27033178E-18-1.40828619E-03 0.00000000E+00
+ 5.98747791E-03 1.59062708E-08 4.06859671E-08 1.19621791E-13 0.00000000E+00
+ 1.86915598E-08 0.00000000E+00 1.21217679E-13 1.82810811E-03 4.03948329E-18
+ 7.31366903E-03 1.49856745E-17 2.86991859E-03 0.00000000E+00 1.14800744E-02
+ 0.00000000E+00 1.82810811E-03 4.03948329E-18 7.31366903E-03 1.49856745E-17
+ 2.86991859E-03 0.00000000E+00 1.14800744E-02 0.00000000E+00-2.79002658E-04
+-7.43994686E-10 1.96666770E-08 6.06398415E-14 0.00000000E+00-8.70744152E-10
+ 0.00000000E+00 6.10060468E-14 1.82810490E-03 3.30222348E-18-9.44092636E-04
+-1.63182254E-18 2.86990801E-03 0.00000000E+00-1.46192192E-03 0.00000000E+00
+ 1.82810490E-03 3.30222348E-18-9.44092636E-04-1.63182254E-18 2.86990801E-03
+ 0.00000000E+00-1.46192192E-03 0.00000000E+00 0.00000000E+00-8.28689812E-10
+ 0.00000000E+00 6.03464434E-14 2.64896136E-04-7.02503236E-10-2.10372404E-08
+ 5.90866267E-14-1.40828619E-03 0.00000000E+00-8.84884002E-04 2.27033178E-18
+-1.40828619E-03 0.00000000E+00-8.84884002E-04 2.27033178E-18 0.00000000E+00
+ 1.86915598E-08 0.00000000E+00 1.21217679E-13-5.98747791E-03 1.59062708E-08
+-4.06859671E-08 1.19621791E-13 2.86991859E-03 0.00000000E+00 1.14800744E-02
+ 0.00000000E+00 1.82810811E-03-4.03948329E-18 7.31366903E-03-1.49856745E-17
+ 2.86991859E-03 0.00000000E+00 1.14800744E-02 0.00000000E+00 1.82810811E-03
+-4.03948329E-18 7.31366903E-03-1.49856745E-17 0.00000000E+00-8.70744152E-10
+ 0.00000000E+00 6.10060468E-14 2.79002658E-04-7.43994686E-10-1.96666770E-08
+ 6.06398415E-14 2.86990801E-03 0.00000000E+00-1.46192192E-03 0.00000000E+00
+ 1.82810490E-03-3.30222348E-18-9.44092636E-04 1.63182254E-18 2.86990801E-03
+ 0.00000000E+00-1.46192192E-03 0.00000000E+00 1.82810490E-03-3.30222348E-18
+-9.44092636E-04 1.63182254E-18-5.20429128E-06-2.00389632E-20-3.13180677E-08
+-1.19791821E-22-6.35643898E-05 0.00000000E+00-3.80578680E-07 0.00000000E+00
+-2.10372404E-08-5.90866267E-14 0.00000000E+00-6.03464434E-14-2.10372404E-08
+-5.90866267E-14 0.00000000E+00-6.03464434E-14 6.17593519E-07-6.56462951E-21
+ 8.80774507E-08 2.78163719E-22-1.57625180E-06 0.00000000E+00 1.00306595E-06
+ 0.00000000E+00 2.80225361E-05 7.43896301E-11-4.06859671E-08-1.19621791E-13
+ 0.00000000E+00 8.75285091E-11 0.00000000E+00-1.21217679E-13 2.80225361E-05
+ 7.43896301E-11-4.06859671E-08-1.19621791E-13 0.00000000E+00 8.75285091E-11
+ 0.00000000E+00-1.21217679E-13 5.82190668E-06 1.47919452E-20-3.47548451E-08
+-8.90827496E-23 6.19879592E-05 0.00000000E+00-3.71805439E-07 0.00000000E+00
+-2.85109682E-05-7.58259426E-11-1.96666770E-08-6.06398415E-14 0.00000000E+00
+-8.89841868E-11 0.00000000E+00-6.10060468E-14-2.85109682E-05-7.58259426E-11
+-1.96666770E-08-6.06398415E-14 0.00000000E+00-8.89841868E-11 0.00000000E+00
+-6.10060468E-14 8.35913479E-04 3.18989215E-18 5.24759342E-06 1.98747951E-20
+ 1.01580228E-02 0.00000000E+00 6.34470882E-05 0.00000000E+00 2.73806992E-04
+ 7.27531143E-10 0.00000000E+00 8.54251359E-10 2.73806992E-04 7.27531143E-10
+ 0.00000000E+00 8.54251359E-10 5.09274113E-03 1.59978595E-17 6.17593519E-07
+-6.56462951E-21 5.80030827E-02 0.00000000E+00-1.57625180E-06 0.00000000E+00
+-5.40181790E-03-1.43410554E-08-5.98747791E-03-1.59062708E-08 0.00000000E+00
+-1.68711356E-08 0.00000000E+00-1.86915598E-08-5.40181790E-03-1.43410554E-08
+-5.98747791E-03-1.59062708E-08 0.00000000E+00-1.68711356E-08 0.00000000E+00
+-1.86915598E-08 9.27649615E-04 2.38100162E-18-5.77697364E-06-1.49663496E-20
+ 9.92391215E-03 0.00000000E+00-6.20959458E-05 0.00000000E+00-5.48333417E-03
+-1.45807591E-08 2.70672289E-04 7.18308503E-10 0.00000000E+00-1.71140754E-08
+ 0.00000000E+00 8.44902705E-10-5.48333417E-03-1.45807591E-08 2.70672289E-04
+ 7.18308503E-10 0.00000000E+00-1.71140754E-08 0.00000000E+00 8.44902705E-10
+-6.35643898E-05 0.00000000E+00-3.80578680E-07 0.00000000E+00-5.20429128E-06
+ 2.00389632E-20-3.13180677E-08 1.19791821E-22 0.00000000E+00-6.03464434E-14
+ 2.10372404E-08-5.90866267E-14 0.00000000E+00-6.03464434E-14 2.10372404E-08
+-5.90866267E-14-1.57625180E-06 0.00000000E+00 1.00306595E-06 0.00000000E+00
+ 6.17593519E-07 6.56462951E-21 8.80774507E-08-2.78163719E-22 0.00000000E+00
+ 8.75285091E-11 0.00000000E+00-1.21217679E-13-2.80225361E-05 7.43896301E-11
+ 4.06859671E-08-1.19621791E-13 0.00000000E+00 8.75285091E-11 0.00000000E+00
+-1.21217679E-13-2.80225361E-05 7.43896301E-11 4.06859671E-08-1.19621791E-13
+ 6.19879592E-05 0.00000000E+00-3.71805439E-07 0.00000000E+00 5.82190668E-06
+-1.47919452E-20-3.47548451E-08 8.90827496E-23 0.00000000E+00-8.89841868E-11
+ 0.00000000E+00-6.10060468E-14 2.85109682E-05-7.58259426E-11 1.96666770E-08
+-6.06398415E-14 0.00000000E+00-8.89841868E-11 0.00000000E+00-6.10060468E-14
+ 2.85109682E-05-7.58259426E-11 1.96666770E-08-6.06398415E-14 0.00000000E+00
+ 1.67874797E-08 0.00000000E+00 8.72871233E-11-5.37265521E-03 1.42591460E-08
+-2.79383871E-05 7.41532836E-11 2.76322618E-03 0.00000000E+00 1.71142790E-03
+-5.04184382E-18 2.76322618E-03 0.00000000E+00 1.71142790E-03-5.04184382E-18
+ 0.00000000E+00 1.68711356E-08 0.00000000E+00-8.75285091E-11-5.40181790E-03
+ 1.43410554E-08 2.80225361E-05-7.43896301E-11 2.25322484E-02 0.00000000E+00
+ 2.86991859E-03 0.00000000E+00 1.41571429E-02-3.86143922E-17 1.82810811E-03
+-4.03948329E-18 2.25322484E-02 0.00000000E+00 2.86991859E-03 0.00000000E+00
+ 1.41571429E-02-3.86143922E-17 1.82810811E-03-4.03948329E-18 5.37265521E-03
+ 1.42591460E-08 2.79383871E-05 7.41532836E-11 0.00000000E+00 1.67874797E-08
+ 0.00000000E+00 8.72871233E-11 1.71142790E-03 5.04184382E-18 2.76322618E-03
+ 0.00000000E+00 1.71142790E-03 5.04184382E-18 2.76322618E-03 0.00000000E+00
+ 5.40181790E-03 1.43410554E-08-2.80225361E-05-7.43896301E-11 0.00000000E+00
+ 1.68711356E-08 0.00000000E+00-8.75285091E-11 1.41571429E-02 3.86143922E-17
+ 1.82810811E-03 4.03948329E-18 2.25322484E-02 0.00000000E+00 2.86991859E-03
+ 0.00000000E+00 1.41571429E-02 3.86143922E-17 1.82810811E-03 4.03948329E-18
+ 2.25322484E-02 0.00000000E+00 2.86991859E-03 0.00000000E+00 0.00000000E+00
+ 1.67874797E-08 0.00000000E+00 8.72871233E-11-5.37265521E-03 1.42591460E-08
+-2.79383871E-05 7.41532836E-11 2.76322618E-03 0.00000000E+00 1.71142790E-03
+-5.04184382E-18 7.53653253E-02 0.00000000E+00 3.18849585E-02-7.86895398E-17
+ 0.00000000E+00 1.68711356E-08 0.00000000E+00-8.75285091E-11-5.40181790E-03
+ 1.43410554E-08 2.80225361E-05-7.43896301E-11 2.25322484E-02 0.00000000E+00
+ 2.86991859E-03 0.00000000E+00 1.41571429E-02-3.86143922E-17 1.82810811E-03
+-4.03948329E-18 5.93387629E-01 0.00000000E+00 7.29934964E-02 0.00000000E+00
+ 2.55464585E-01-7.54342736E-16 3.19813722E-02-1.09459049E-16 5.25481749E-03
+ 1.39460877E-08 2.73285266E-05 7.25249473E-11 0.00000000E+00 1.64645670E-08
+ 0.00000000E+00 8.56090999E-11 1.59827776E-03 3.07194056E-19 2.65767940E-03
+ 0.00000000E+00 3.17912517E-02 6.24604176E-17 7.79121484E-02 0.00000000E+00
+ 5.28579158E-03 1.40257631E-08-2.74179011E-05-7.27548477E-11 0.00000000E+00
+ 1.65472474E-08 0.00000000E+00-8.58476706E-11 1.32378201E-02 1.31500233E-17
+ 1.71143086E-03 3.89020246E-18 2.16833443E-02 0.00000000E+00 2.76323637E-03
+ 0.00000000E+00 2.54704445E-01 5.66111986E-16 3.18850492E-02 7.89254561E-17
+ 6.13054529E-01 0.00000000E+00 7.53646881E-02 0.00000000E+00 1.04125372E-02
+ 0.00000000E+00 6.50332846E-05 0.00000000E+00 7.47559263E-04-1.13575472E-18
+ 4.69442679E-06-7.83265530E-21 0.00000000E+00 8.37932657E-10-2.68237425E-04
+ 7.11481538E-10 0.00000000E+00 8.37932657E-10-2.68237425E-04 7.11481538E-10
+ 5.94134350E-02 0.00000000E+00-1.71361916E-06 0.00000000E+00 4.57249694E-03
+-1.48270852E-17 5.94818675E-07-1.55263934E-20 0.00000000E+00-1.65472474E-08
+ 0.00000000E+00-1.83337686E-08 5.28579158E-03-1.40257631E-08 5.86275860E-03
+-1.55559426E-08 0.00000000E+00-1.65472474E-08 0.00000000E+00-1.83337686E-08
+ 5.28579158E-03-1.40257631E-08 5.86275860E-03-1.55559426E-08 1.01580228E-02
+ 0.00000000E+00-6.35643898E-05 0.00000000E+00 8.35913479E-04-3.18989215E-18
+-5.20429128E-06 2.00389632E-20 0.00000000E+00-1.67874797E-08 0.00000000E+00
+ 8.28689812E-10 5.37265521E-03-1.42591460E-08-2.64896136E-04 7.02503236E-10
+ 0.00000000E+00-1.67874797E-08 0.00000000E+00 8.28689812E-10 5.37265521E-03
+-1.42591460E-08-2.64896136E-04 7.02503236E-10-2.58773112E-04-6.87136258E-10
+ 2.23436279E-08 5.74751023E-14 0.00000000E+00-8.12669184E-10 0.00000000E+00
+ 5.96426813E-14-8.27427155E-04-1.04934913E-18-1.35522894E-03 0.00000000E+00
+-1.59190752E-02-3.53464684E-17-3.83192091E-02 0.00000000E+00 5.86275860E-03
+ 1.55559426E-08 4.33521663E-08 1.16473308E-13 0.00000000E+00 1.83337686E-08
+ 0.00000000E+00 1.19875871E-13 1.71143086E-03 3.89020246E-18 6.84697719E-03
+ 1.63570976E-17 2.76323637E-03 0.00000000E+00 1.10533307E-02 0.00000000E+00
+ 3.18850492E-02 7.89254561E-17 1.27540950E-01 3.19991554E-16 7.53646881E-02
+ 0.00000000E+00 3.01522752E-01 0.00000000E+00-2.73806992E-04-7.27531143E-10
+ 2.10372404E-08 5.90866267E-14 0.00000000E+00-8.54251359E-10 0.00000000E+00
+ 6.03464434E-14 1.71142790E-03 5.04184382E-18-8.84884002E-04-2.27033178E-18
+ 2.76322618E-03 0.00000000E+00-1.40828619E-03 0.00000000E+00 3.18849585E-02
+ 7.86895398E-17-1.59665827E-02-4.70371472E-17 7.53653253E-02 0.00000000E+00
+-3.70897054E-02 0.00000000E+00 0.00000000E+00-8.12669184E-10 0.00000000E+00
+ 5.96426813E-14 2.58773112E-04-6.87136258E-10-2.23436279E-08 5.74751023E-14
+-1.35522894E-03 0.00000000E+00-8.27427155E-04 1.04934913E-18-3.83192091E-02
+ 0.00000000E+00-1.59190752E-02 3.53464684E-17 0.00000000E+00 1.83337686E-08
+ 0.00000000E+00 1.19875871E-13-5.86275860E-03 1.55559426E-08-4.33521663E-08
+ 1.16473308E-13 2.76323637E-03 0.00000000E+00 1.10533307E-02 0.00000000E+00
+ 1.71143086E-03-3.89020246E-18 6.84697719E-03-1.63570976E-17 7.53646881E-02
+ 0.00000000E+00 3.01522752E-01 0.00000000E+00 3.18850492E-02-7.89254561E-17
+ 1.27540950E-01-3.19991554E-16 0.00000000E+00-8.54251359E-10 0.00000000E+00
+ 6.03464434E-14 2.73806992E-04-7.27531143E-10-2.10372404E-08 5.90866267E-14
+ 2.76322618E-03 0.00000000E+00-1.40828619E-03 0.00000000E+00 1.71142790E-03
+-5.04184382E-18-8.84884002E-04 2.27033178E-18 7.53653253E-02 0.00000000E+00
+-3.70897054E-02 0.00000000E+00 3.18849585E-02-7.86895398E-17-1.59665827E-02
+ 4.70371472E-17-2.58773112E-04-6.87136258E-10 2.23436279E-08 5.74751023E-14
+ 0.00000000E+00-8.12669184E-10 0.00000000E+00 5.96426813E-14-8.27427155E-04
+-1.04934913E-18-1.35522894E-03 0.00000000E+00-8.27427155E-04-1.04934913E-18
+-1.35522894E-03 0.00000000E+00 5.86275860E-03 1.55559426E-08 4.33521663E-08
+ 1.16473308E-13 0.00000000E+00 1.83337686E-08 0.00000000E+00 1.19875871E-13
+ 1.71143086E-03 3.89020246E-18 6.84697719E-03 1.63570976E-17 2.76323637E-03
+ 0.00000000E+00 1.10533307E-02 0.00000000E+00 1.71143086E-03 3.89020246E-18
+ 6.84697719E-03 1.63570976E-17 2.76323637E-03 0.00000000E+00 1.10533307E-02
+ 0.00000000E+00-2.73806992E-04-7.27531143E-10 2.10372404E-08 5.90866267E-14
+ 0.00000000E+00-8.54251359E-10 0.00000000E+00 6.03464434E-14 1.71142790E-03
+ 5.04184382E-18-8.84884002E-04-2.27033178E-18 2.76322618E-03 0.00000000E+00
+-1.40828619E-03 0.00000000E+00 1.71142790E-03 5.04184382E-18-8.84884002E-04
+-2.27033178E-18 2.76322618E-03 0.00000000E+00-1.40828619E-03 0.00000000E+00
+ 0.00000000E+00-8.12669184E-10 0.00000000E+00 5.96426813E-14 2.58773112E-04
+-6.87136258E-10-2.23436279E-08 5.74751023E-14-1.35522894E-03 0.00000000E+00
+-8.27427155E-04 1.04934913E-18-1.35522894E-03 0.00000000E+00-8.27427155E-04
+ 1.04934913E-18 0.00000000E+00 1.83337686E-08 0.00000000E+00 1.19875871E-13
+-5.86275860E-03 1.55559426E-08-4.33521663E-08 1.16473308E-13 2.76323637E-03
+ 0.00000000E+00 1.10533307E-02 0.00000000E+00 1.71143086E-03-3.89020246E-18
+ 6.84697719E-03-1.63570976E-17 2.76323637E-03 0.00000000E+00 1.10533307E-02
+ 0.00000000E+00 1.71143086E-03-3.89020246E-18 6.84697719E-03-1.63570976E-17
+ 0.00000000E+00-8.54251359E-10 0.00000000E+00 6.03464434E-14 2.73806992E-04
+-7.27531143E-10-2.10372404E-08 5.90866267E-14 2.76322618E-03 0.00000000E+00
+-1.40828619E-03 0.00000000E+00 1.71142790E-03-5.04184382E-18-8.84884002E-04
+ 2.27033178E-18 2.76322618E-03 0.00000000E+00-1.40828619E-03 0.00000000E+00
+ 1.71142790E-03-5.04184382E-18-8.84884002E-04 2.27033178E-18-4.65274217E-06
+-6.34273504E-21-2.80079613E-08-4.23026181E-23-6.51609043E-05 0.00000000E+00
+-3.90116469E-07 0.00000000E+00-2.23436279E-08-5.74751023E-14 0.00000000E+00
+-5.96426813E-14-2.23436279E-08-5.74751023E-14 0.00000000E+00-5.96426813E-14
+ 5.94818675E-07 1.55263934E-20 7.90817695E-08 2.37514461E-22-1.71361916E-06
+ 0.00000000E+00 1.02746848E-06 0.00000000E+00 2.74179011E-05 7.27548477E-11
+-4.33521663E-08-1.16473308E-13 0.00000000E+00 8.58476706E-11 0.00000000E+00
+-1.19875871E-13 2.74179011E-05 7.27548477E-11-4.33521663E-08-1.16473308E-13
+ 0.00000000E+00 8.58476706E-11 0.00000000E+00-1.19875871E-13 5.24759342E-06
+ 1.98747951E-20-3.13180677E-08-1.19791821E-22 6.34470882E-05 0.00000000E+00
+-3.80578680E-07 0.00000000E+00-2.79383871E-05-7.41532836E-11-2.10372404E-08
+-5.90866267E-14 0.00000000E+00-8.72871233E-11 0.00000000E+00-6.03464434E-14
+-2.79383871E-05-7.41532836E-11-2.10372404E-08-5.90866267E-14 0.00000000E+00
+-8.72871233E-11 0.00000000E+00-6.03464434E-14 7.47559263E-04 1.13575472E-18
+ 4.69442679E-06 7.83265530E-21 1.04125372E-02 0.00000000E+00 6.50332846E-05
+ 0.00000000E+00 2.68237425E-04 7.11481538E-10 0.00000000E+00 8.37932657E-10
+ 2.68237425E-04 7.11481538E-10 0.00000000E+00 8.37932657E-10 4.57249694E-03
+ 1.48270852E-17 5.94818675E-07 1.55263934E-20 5.94134350E-02 0.00000000E+00
+-1.71361916E-06 0.00000000E+00-5.28579158E-03-1.40257631E-08-5.86275860E-03
+-1.55559426E-08 0.00000000E+00-1.65472474E-08 0.00000000E+00-1.83337686E-08
+-5.28579158E-03-1.40257631E-08-5.86275860E-03-1.55559426E-08 0.00000000E+00
+-1.65472474E-08 0.00000000E+00-1.83337686E-08 8.35913479E-04 3.18989215E-18
+-5.20429128E-06-2.00389632E-20 1.01580228E-02 0.00000000E+00-6.35643898E-05
+ 0.00000000E+00-5.37265521E-03-1.42591460E-08 2.64896136E-04 7.02503236E-10
+ 0.00000000E+00-1.67874797E-08 0.00000000E+00 8.28689812E-10-5.37265521E-03
+-1.42591460E-08 2.64896136E-04 7.02503236E-10 0.00000000E+00-1.67874797E-08
+ 0.00000000E+00 8.28689812E-10-6.51609043E-05 0.00000000E+00-3.90116469E-07
+ 0.00000000E+00-4.65274217E-06 6.34273504E-21-2.80079613E-08 4.23026181E-23
+ 0.00000000E+00-5.96426813E-14 2.23436279E-08-5.74751023E-14 0.00000000E+00
+-5.96426813E-14 2.23436279E-08-5.74751023E-14-1.71361916E-06 0.00000000E+00
+ 1.02746848E-06 0.00000000E+00 5.94818675E-07-1.55263934E-20 7.90817695E-08
+-2.37514461E-22 0.00000000E+00 8.58476706E-11 0.00000000E+00-1.19875871E-13
+-2.74179011E-05 7.27548477E-11 4.33521663E-08-1.16473308E-13 0.00000000E+00
+ 8.58476706E-11 0.00000000E+00-1.19875871E-13-2.74179011E-05 7.27548477E-11
+ 4.33521663E-08-1.16473308E-13 6.34470882E-05 0.00000000E+00-3.80578680E-07
+ 0.00000000E+00 5.24759342E-06-1.98747951E-20-3.13180677E-08 1.19791821E-22
+ 0.00000000E+00-8.72871233E-11 0.00000000E+00-6.03464434E-14 2.79383871E-05
+-7.41532836E-11 2.10372404E-08-5.90866267E-14 0.00000000E+00-8.72871233E-11
+ 0.00000000E+00-6.03464434E-14 2.79383871E-05-7.41532836E-11 2.10372404E-08
+-5.90866267E-14 0.00000000E+00 1.64645670E-08 0.00000000E+00 8.56090999E-11
+-5.25481749E-03 1.39460877E-08-2.73285266E-05 7.25249473E-11 2.65767940E-03
+ 0.00000000E+00 1.59827776E-03-3.07194056E-19 2.65767940E-03 0.00000000E+00
+ 1.59827776E-03-3.07194056E-19 0.00000000E+00 1.65472474E-08 0.00000000E+00
+-8.58476706E-11-5.28579158E-03 1.40257631E-08 2.74179011E-05-7.27548477E-11
+ 2.16833443E-02 0.00000000E+00 2.76323637E-03 0.00000000E+00 1.32378201E-02
+-1.31500233E-17 1.71143086E-03-3.89020246E-18 2.16833443E-02 0.00000000E+00
+ 2.76323637E-03 0.00000000E+00 1.32378201E-02-1.31500233E-17 1.71143086E-03
+-3.89020246E-18 5.25481749E-03 1.39460877E-08 2.73285266E-05 7.25249473E-11
+ 0.00000000E+00 1.64645670E-08 0.00000000E+00 8.56090999E-11 1.59827776E-03
+ 3.07194056E-19 2.65767940E-03 0.00000000E+00 1.59827776E-03 3.07194056E-19
+ 2.65767940E-03 0.00000000E+00 5.28579158E-03 1.40257631E-08-2.74179011E-05
+-7.27548477E-11 0.00000000E+00 1.65472474E-08 0.00000000E+00-8.58476706E-11
+ 1.32378201E-02 1.31500233E-17 1.71143086E-03 3.89020246E-18 2.16833443E-02
+ 0.00000000E+00 2.76323637E-03 0.00000000E+00 1.32378201E-02 1.31500233E-17
+ 1.71143086E-03 3.89020246E-18 2.16833443E-02 0.00000000E+00 2.76323637E-03
+ 0.00000000E+00 0.00000000E+00 1.64645670E-08 0.00000000E+00 8.56090999E-11
+-5.25481749E-03 1.39460877E-08-2.73285266E-05 7.25249473E-11 2.65767940E-03
+ 0.00000000E+00 1.59827776E-03-3.07194056E-19 7.79121484E-02 0.00000000E+00
+ 3.17912517E-02-6.24604176E-17 0.00000000E+00 1.65472474E-08 0.00000000E+00
+-8.58476706E-11-5.28579158E-03 1.40257631E-08 2.74179011E-05-7.27548477E-11
+ 2.16833443E-02 0.00000000E+00 2.76323637E-03 0.00000000E+00 1.32378201E-02
+-1.31500233E-17 1.71143086E-03-3.89020246E-18 6.13054529E-01 0.00000000E+00
+ 7.53646881E-02 0.00000000E+00 2.54704445E-01-5.66111986E-16 3.18850492E-02
+-7.89254561E-17 5.13004616E-03 1.36419098E-08 2.66825903E-05 7.09426319E-11
+ 0.00000000E+00 1.61455713E-08 0.00000000E+00 8.39513528E-11 1.48869981E-03
+ 8.51473568E-18 2.55322679E-03 0.00000000E+00 3.17002332E-02 3.72592135E-17
+ 8.06538711E-02 0.00000000E+00 5.16278301E-03 1.37192714E-08-2.67770526E-05
+-7.11658572E-11 0.00000000E+00 1.62272256E-08 0.00000000E+00-8.41869640E-11
+ 1.23468946E-02 4.53867764E-17 1.59828056E-03 1.91281386E-18 2.08433575E-02
+ 0.00000000E+00 2.65768930E-03 0.00000000E+00 2.53965523E-01 3.93043741E-16
+ 3.17913421E-02 6.16037817E-17 6.34202278E-01 0.00000000E+00 7.79113882E-02
+ 0.00000000E+00 1.06895961E-02 0.00000000E+00 6.67598937E-05 0.00000000E+00
+ 6.62541288E-04-1.28136632E-18 4.16212610E-06-7.32980403E-21 0.00000000E+00
+ 8.21800780E-10-2.62312661E-04 6.95861800E-10 0.00000000E+00 8.21800780E-10
+-2.62312661E-04 6.95861800E-10 6.09477772E-02 0.00000000E+00-1.86534041E-06
+ 0.00000000E+00 4.07167374E-03-3.21857444E-18 5.72369280E-07 1.76617854E-21
+ 0.00000000E+00-1.62272256E-08 0.00000000E+00-1.79801387E-08 5.16278301E-03
+-1.37192714E-08 5.73027854E-03-1.52151638E-08 0.00000000E+00-1.62272256E-08
+ 0.00000000E+00-1.79801387E-08 5.16278301E-03-1.37192714E-08 5.73027854E-03
+-1.52151638E-08 1.04125372E-02 0.00000000E+00-6.51609043E-05 0.00000000E+00
+ 7.47559263E-04-1.13575472E-18-4.65274217E-06 6.34273504E-21 0.00000000E+00
+-1.64645670E-08 0.00000000E+00 8.12669184E-10 5.25481749E-03-1.39460877E-08
+-2.58773112E-04 6.87136258E-10 0.00000000E+00-1.64645670E-08 0.00000000E+00
+ 8.12669184E-10 5.25481749E-03-1.39460877E-08-2.58773112E-04 6.87136258E-10
+-2.52309708E-04-6.72223487E-10 2.36155764E-08 5.58063262E-14 0.00000000E+00
+-7.96850822E-10 0.00000000E+00 5.89027984E-14-7.71745094E-04-2.60688738E-18
+-1.30272902E-03 0.00000000E+00-1.58728938E-02-2.47157488E-17-3.96413148E-02
+ 0.00000000E+00 5.73027854E-03 1.52151638E-08 4.59387584E-08 1.13196834E-13
+ 0.00000000E+00 1.79801387E-08 0.00000000E+00 1.18434488E-13 1.59828056E-03
+ 1.91281386E-18 6.39439251E-03 7.94574565E-18 2.65768930E-03 0.00000000E+00
+ 1.06311283E-02 0.00000000E+00 3.17913421E-02 6.16037817E-17 1.27166148E-01
+ 2.45432362E-16 7.79113882E-02 0.00000000E+00 3.11716723E-01 0.00000000E+00
+-2.68237425E-04-7.11481538E-10 2.23436279E-08 5.74751023E-14 0.00000000E+00
+-8.37932657E-10 0.00000000E+00 5.96426813E-14 1.59827776E-03 3.07194056E-19
+-8.27427155E-04-1.04934913E-18 2.65767940E-03 0.00000000E+00-1.35522894E-03
+ 0.00000000E+00 3.17912517E-02 6.24604176E-17-1.59190752E-02-3.53464684E-17
+ 7.79121484E-02 0.00000000E+00-3.83192091E-02 0.00000000E+00 0.00000000E+00
+-7.96850822E-10 0.00000000E+00 5.89027984E-14 2.52309708E-04-6.72223487E-10
+-2.36155764E-08 5.58063262E-14-1.30272902E-03 0.00000000E+00-7.71745094E-04
+ 2.60688738E-18-3.96413148E-02 0.00000000E+00-1.58728938E-02 2.47157488E-17
+ 0.00000000E+00 1.79801387E-08 0.00000000E+00 1.18434488E-13-5.73027854E-03
+ 1.52151638E-08-4.59387584E-08 1.13196834E-13 2.65768930E-03 0.00000000E+00
+ 1.06311283E-02 0.00000000E+00 1.59828056E-03-1.91281386E-18 6.39439251E-03
+-7.94574565E-18 7.79113882E-02 0.00000000E+00 3.11716723E-01 0.00000000E+00
+ 3.17913421E-02-6.16037817E-17 1.27166148E-01-2.45432362E-16 0.00000000E+00
+-8.37932657E-10 0.00000000E+00 5.96426813E-14 2.68237425E-04-7.11481538E-10
+-2.23436279E-08 5.74751023E-14 2.65767940E-03 0.00000000E+00-1.35522894E-03
+ 0.00000000E+00 1.59827776E-03-3.07194056E-19-8.27427155E-04 1.04934913E-18
+ 7.79121484E-02 0.00000000E+00-3.83192091E-02 0.00000000E+00 3.17912517E-02
+-6.24604176E-17-1.59190752E-02 3.53464684E-17-2.52309708E-04-6.72223487E-10
+ 2.36155764E-08 5.58063262E-14 0.00000000E+00-7.96850822E-10 0.00000000E+00
+ 5.89027984E-14-7.71745094E-04-2.60688738E-18-1.30272902E-03 0.00000000E+00
+-7.71745094E-04-2.60688738E-18-1.30272902E-03 0.00000000E+00 5.73027854E-03
+ 1.52151638E-08 4.59387584E-08 1.13196834E-13 0.00000000E+00 1.79801387E-08
+ 0.00000000E+00 1.18434488E-13 1.59828056E-03 1.91281386E-18 6.39439251E-03
+ 7.94574565E-18 2.65768930E-03 0.00000000E+00 1.06311283E-02 0.00000000E+00
+ 1.59828056E-03 1.91281386E-18 6.39439251E-03 7.94574565E-18 2.65768930E-03
+ 0.00000000E+00 1.06311283E-02 0.00000000E+00-2.68237425E-04-7.11481538E-10
+ 2.23436279E-08 5.74751023E-14 0.00000000E+00-8.37932657E-10 0.00000000E+00
+ 5.96426813E-14 1.59827776E-03 3.07194056E-19-8.27427155E-04-1.04934913E-18
+ 2.65767940E-03 0.00000000E+00-1.35522894E-03 0.00000000E+00 1.59827776E-03
+ 3.07194056E-19-8.27427155E-04-1.04934913E-18 2.65767940E-03 0.00000000E+00
+-1.35522894E-03 0.00000000E+00 0.00000000E+00-7.96850822E-10 0.00000000E+00
+ 5.89027984E-14 2.52309708E-04-6.72223487E-10-2.36155764E-08 5.58063262E-14
+-1.30272902E-03 0.00000000E+00-7.71745094E-04 2.60688738E-18-1.30272902E-03
+ 0.00000000E+00-7.71745094E-04 2.60688738E-18 0.00000000E+00 1.79801387E-08
+ 0.00000000E+00 1.18434488E-13-5.73027854E-03 1.52151638E-08-4.59387584E-08
+ 1.13196834E-13 2.65768930E-03 0.00000000E+00 1.06311283E-02 0.00000000E+00
+ 1.59828056E-03-1.91281386E-18 6.39439251E-03-7.94574565E-18 2.65768930E-03
+ 0.00000000E+00 1.06311283E-02 0.00000000E+00 1.59828056E-03-1.91281386E-18
+ 6.39439251E-03-7.94574565E-18 0.00000000E+00-8.37932657E-10 0.00000000E+00
+ 5.96426813E-14 2.68237425E-04-7.11481538E-10-2.23436279E-08 5.74751023E-14
+ 2.65767940E-03 0.00000000E+00-1.35522894E-03 0.00000000E+00 1.59827776E-03
+-3.07194056E-19-8.27427155E-04 1.04934913E-18 2.65767940E-03 0.00000000E+00
+-1.35522894E-03 0.00000000E+00 1.59827776E-03-3.07194056E-19-8.27427155E-04
+ 1.04934913E-18-4.12203555E-06-8.67992250E-21-2.48228106E-08-4.78910259E-23
+-6.68989104E-05 0.00000000E+00-4.00499004E-07 0.00000000E+00-2.36155764E-08
+-5.58063262E-14 0.00000000E+00-5.89027984E-14-2.36155764E-08-5.58063262E-14
+ 0.00000000E+00-5.89027984E-14 5.72369280E-07-1.76617854E-21 7.04217157E-08
+ 8.44824150E-23-1.86534041E-06 0.00000000E+00 1.05401586E-06 0.00000000E+00
+ 2.67770526E-05 7.11658572E-11-4.59387584E-08-1.13196834E-13 0.00000000E+00
+ 8.41869640E-11 0.00000000E+00-1.18434488E-13 2.67770526E-05 7.11658572E-11
+-4.59387584E-08-1.13196834E-13 0.00000000E+00 8.41869640E-11 0.00000000E+00
+-1.18434488E-13 4.69442679E-06 7.83265530E-21-2.80079613E-08-4.23026181E-23
+ 6.50332846E-05 0.00000000E+00-3.90116469E-07 0.00000000E+00-2.73285266E-05
+-7.25249473E-11-2.23436279E-08-5.74751023E-14 0.00000000E+00-8.56090999E-11
+ 0.00000000E+00-5.96426813E-14-2.73285266E-05-7.25249473E-11-2.23436279E-08
+-5.74751023E-14 0.00000000E+00-8.56090999E-11 0.00000000E+00-5.96426813E-14
+ 6.62541288E-04 1.28136632E-18 4.16212610E-06 7.32980403E-21 1.06895961E-02
+ 0.00000000E+00 6.67598937E-05 0.00000000E+00 2.62312661E-04 6.95861800E-10
+ 0.00000000E+00 8.21800780E-10 2.62312661E-04 6.95861800E-10 0.00000000E+00
+ 8.21800780E-10 4.07167374E-03 3.21857444E-18 5.72369280E-07-1.76617854E-21
+ 6.09477772E-02 0.00000000E+00-1.86534041E-06 0.00000000E+00-5.16278301E-03
+-1.37192714E-08-5.73027854E-03-1.52151638E-08 0.00000000E+00-1.62272256E-08
+ 0.00000000E+00-1.79801387E-08-5.16278301E-03-1.37192714E-08-5.73027854E-03
+-1.52151638E-08 0.00000000E+00-1.62272256E-08 0.00000000E+00-1.79801387E-08
+ 7.47559263E-04 1.13575472E-18-4.65274217E-06-6.34273504E-21 1.04125372E-02
+ 0.00000000E+00-6.51609043E-05 0.00000000E+00-5.25481749E-03-1.39460877E-08
+ 2.58773112E-04 6.87136258E-10 0.00000000E+00-1.64645670E-08 0.00000000E+00
+ 8.12669184E-10-5.25481749E-03-1.39460877E-08 2.58773112E-04 6.87136258E-10
+ 0.00000000E+00-1.64645670E-08 0.00000000E+00 8.12669184E-10-6.68989104E-05
+ 0.00000000E+00-4.00499004E-07 0.00000000E+00-4.12203555E-06 8.67992250E-21
+-2.48228106E-08 4.78910259E-23 0.00000000E+00-5.89027984E-14 2.36155764E-08
+-5.58063262E-14 0.00000000E+00-5.89027984E-14 2.36155764E-08-5.58063262E-14
+-1.86534041E-06 0.00000000E+00 1.05401586E-06 0.00000000E+00 5.72369280E-07
+ 1.76617854E-21 7.04217157E-08-8.44824150E-23 0.00000000E+00 8.41869640E-11
+ 0.00000000E+00-1.18434488E-13-2.67770526E-05 7.11658572E-11 4.59387584E-08
+-1.13196834E-13 0.00000000E+00 8.41869640E-11 0.00000000E+00-1.18434488E-13
+-2.67770526E-05 7.11658572E-11 4.59387584E-08-1.13196834E-13 6.50332846E-05
+ 0.00000000E+00-3.90116469E-07 0.00000000E+00 4.69442679E-06-7.83265530E-21
+-2.80079613E-08 4.23026181E-23 0.00000000E+00-8.56090999E-11 0.00000000E+00
+-5.96426813E-14 2.73285266E-05-7.25249473E-11 2.23436279E-08-5.74751023E-14
+ 0.00000000E+00-8.56090999E-11 0.00000000E+00-5.96426813E-14 2.73285266E-05
+-7.25249473E-11 2.23436279E-08-5.74751023E-14 0.00000000E+00 1.61455713E-08
+ 0.00000000E+00 8.39513528E-11-5.13004616E-03 1.36419098E-08-2.66825903E-05
+ 7.09426319E-11 2.55322679E-03 0.00000000E+00 1.48869981E-03-8.51473568E-18
+ 2.55322679E-03 0.00000000E+00 1.48869981E-03-8.51473568E-18 0.00000000E+00
+ 1.62272256E-08 0.00000000E+00-8.41869640E-11-5.16278301E-03 1.37192714E-08
+ 2.67770526E-05-7.11658572E-11 2.08433575E-02 0.00000000E+00 2.65768930E-03
+ 0.00000000E+00 1.23468946E-02-4.53867764E-17 1.59828056E-03-1.91281386E-18
+ 2.08433575E-02 0.00000000E+00 2.65768930E-03 0.00000000E+00 1.23468946E-02
+-4.53867764E-17 1.59828056E-03-1.91281386E-18 5.13004616E-03 1.36419098E-08
+ 2.66825903E-05 7.09426319E-11 0.00000000E+00 1.61455713E-08 0.00000000E+00
+ 8.39513528E-11 1.48869981E-03 8.51473568E-18 2.55322679E-03 0.00000000E+00
+ 1.48869981E-03 8.51473568E-18 2.55322679E-03 0.00000000E+00 5.16278301E-03
+ 1.37192714E-08-2.67770526E-05-7.11658572E-11 0.00000000E+00 1.62272256E-08
+ 0.00000000E+00-8.41869640E-11 1.23468946E-02 4.53867764E-17 1.59828056E-03
+ 1.91281386E-18 2.08433575E-02 0.00000000E+00 2.65768930E-03 0.00000000E+00
+ 1.23468946E-02 4.53867764E-17 1.59828056E-03 1.91281386E-18 2.08433575E-02
+ 0.00000000E+00 2.65768930E-03 0.00000000E+00 0.00000000E+00 1.61455713E-08
+ 0.00000000E+00 8.39513528E-11-5.13004616E-03 1.36419098E-08-2.66825903E-05
+ 7.09426319E-11 2.55322679E-03 0.00000000E+00 1.48869981E-03-8.51473568E-18
+ 8.06538711E-02 0.00000000E+00 3.17002332E-02-3.72592135E-17 0.00000000E+00
+ 1.62272256E-08 0.00000000E+00-8.41869640E-11-5.16278301E-03 1.37192714E-08
+ 2.67770526E-05-7.11658572E-11 2.08433575E-02 0.00000000E+00 2.65768930E-03
+ 0.00000000E+00 1.23468946E-02-4.53867764E-17 1.59828056E-03-1.91281386E-18
+ 6.34202278E-01 0.00000000E+00 7.79113882E-02 0.00000000E+00 2.53965523E-01
+-3.93043741E-16 3.17913421E-02-6.16037817E-17 4.99861328E-03 1.33469582E-08
+ 2.60019680E-05 6.94081162E-11 0.00000000E+00 1.58307203E-08 0.00000000E+00
+ 8.23150473E-11 1.38273676E-03 5.45447543E-19 2.44982624E-03 0.00000000E+00
+ 3.16119696E-02 7.04588741E-17 8.36128445E-02 0.00000000E+00 5.03303721E-03
+ 1.34219111E-08-2.61012977E-05-6.96243919E-11 0.00000000E+00 1.59112842E-08
+ 0.00000000E+00-8.25475130E-11 1.14847169E-02 2.96186639E-17 1.48870231E-03
+ 7.19681856E-18 2.00119554E-02 0.00000000E+00 2.55323636E-03 0.00000000E+00
+ 2.53248378E-01 3.66269987E-16 3.17003238E-02 3.05517383E-17 6.56997609E-01
+ 0.00000000E+00 8.06529646E-02 0.00000000E+00 1.09916887E-02 0.00000000E+00
+ 6.86423661E-05 0.00000000E+00 5.80827978E-04-3.36050674E-18 3.65048962E-06
+-2.09085556E-20 0.00000000E+00 8.05864746E-10-2.56041225E-04 6.80686546E-10
+ 0.00000000E+00 8.05864746E-10-2.56041225E-04 6.80686546E-10 6.26192815E-02
+ 0.00000000E+00-2.03385225E-06 0.00000000E+00 3.59002130E-03-1.48470091E-17
+ 5.50113834E-07 1.50281726E-20 0.00000000E+00-1.59112842E-08 0.00000000E+00
+-1.76309011E-08 5.03303721E-03-1.34219111E-08 5.59026708E-03-1.48842853E-08
+ 0.00000000E+00-1.59112842E-08 0.00000000E+00-1.76309011E-08 5.03303721E-03
+-1.34219111E-08 5.59026708E-03-1.48842853E-08 1.06895961E-02 0.00000000E+00
+-6.68989104E-05 0.00000000E+00 6.62541288E-04-1.28136632E-18-4.12203555E-06
+ 8.67992250E-21 0.00000000E+00-1.61455713E-08 0.00000000E+00 7.96850822E-10
+ 5.13004616E-03-1.36419098E-08-2.52309708E-04 6.72223487E-10 0.00000000E+00
+-1.61455713E-08 0.00000000E+00 7.96850822E-10 5.13004616E-03-1.36419098E-08
+-2.52309708E-04 6.72223487E-10-2.45522789E-04-6.57784243E-10 2.48324306E-08
+ 5.40689114E-14 0.00000000E+00-7.81247960E-10 0.00000000E+00 5.81164074E-14
+-7.17859768E-04-1.93556653E-18-1.25076565E-03 0.00000000E+00-1.58280733E-02
+-2.52526531E-17-4.10664523E-02 0.00000000E+00 5.59026708E-03 1.48842853E-08
+ 4.84201361E-08 1.09795244E-13 0.00000000E+00 1.76309011E-08 0.00000000E+00
+ 1.16912045E-13 1.48870231E-03 7.19681856E-18 5.95609546E-03 2.67304467E-17
+ 2.55323636E-03 0.00000000E+00 1.02133022E-02 0.00000000E+00 3.17003238E-02
+ 3.05517383E-17 1.26802098E-01 1.58769458E-16 8.06529646E-02 0.00000000E+00
+ 3.22691311E-01 0.00000000E+00-2.62312661E-04-6.95861800E-10 2.36155764E-08
+ 5.58063262E-14 0.00000000E+00-8.21800780E-10 0.00000000E+00 5.89027984E-14
+ 1.48869981E-03 8.51473568E-18-7.71745094E-04-2.60688738E-18 2.55322679E-03
+ 0.00000000E+00-1.30272902E-03 0.00000000E+00 3.17002332E-02 3.72592135E-17
+-1.58728938E-02-2.47157488E-17 8.06538711E-02 0.00000000E+00-3.96413148E-02
+ 0.00000000E+00 0.00000000E+00-7.81247960E-10 0.00000000E+00 5.81164074E-14
+ 2.45522789E-04-6.57784243E-10-2.48324306E-08 5.40689114E-14-1.25076565E-03
+ 0.00000000E+00-7.17859768E-04 1.93556653E-18-4.10664523E-02 0.00000000E+00
+-1.58280733E-02 2.52526531E-17 0.00000000E+00 1.76309011E-08 0.00000000E+00
+ 1.16912045E-13-5.59026708E-03 1.48842853E-08-4.84201361E-08 1.09795244E-13
+ 2.55323636E-03 0.00000000E+00 1.02133022E-02 0.00000000E+00 1.48870231E-03
+-7.19681856E-18 5.95609546E-03-2.67304467E-17 8.06529646E-02 0.00000000E+00
+ 3.22691311E-01 0.00000000E+00 3.17003238E-02-3.05517383E-17 1.26802098E-01
+-1.58769458E-16 0.00000000E+00-8.21800780E-10 0.00000000E+00 5.89027984E-14
+ 2.62312661E-04-6.95861800E-10-2.36155764E-08 5.58063262E-14 2.55322679E-03
+ 0.00000000E+00-1.30272902E-03 0.00000000E+00 1.48869981E-03-8.51473568E-18
+-7.71745094E-04 2.60688738E-18 8.06538711E-02 0.00000000E+00-3.96413148E-02
+ 0.00000000E+00 3.17002332E-02-3.72592135E-17-1.58728938E-02 2.47157488E-17
+-2.45522789E-04-6.57784243E-10 2.48324306E-08 5.40689114E-14 0.00000000E+00
+-7.81247960E-10 0.00000000E+00 5.81164074E-14-7.17859768E-04-1.93556653E-18
+-1.25076565E-03 0.00000000E+00-7.17859768E-04-1.93556653E-18-1.25076565E-03
+ 0.00000000E+00 5.59026708E-03 1.48842853E-08 4.84201361E-08 1.09795244E-13
+ 0.00000000E+00 1.76309011E-08 0.00000000E+00 1.16912045E-13 1.48870231E-03
+ 7.19681856E-18 5.95609546E-03 2.67304467E-17 2.55323636E-03 0.00000000E+00
+ 1.02133022E-02 0.00000000E+00 1.48870231E-03 7.19681856E-18 5.95609546E-03
+ 2.67304467E-17 2.55323636E-03 0.00000000E+00 1.02133022E-02 0.00000000E+00
+-2.62312661E-04-6.95861800E-10 2.36155764E-08 5.58063262E-14 0.00000000E+00
+-8.21800780E-10 0.00000000E+00 5.89027984E-14 1.48869981E-03 8.51473568E-18
+-7.71745094E-04-2.60688738E-18 2.55322679E-03 0.00000000E+00-1.30272902E-03
+ 0.00000000E+00 1.48869981E-03 8.51473568E-18-7.71745094E-04-2.60688738E-18
+ 2.55322679E-03 0.00000000E+00-1.30272902E-03 0.00000000E+00 0.00000000E+00
+-7.81247960E-10 0.00000000E+00 5.81164074E-14 2.45522789E-04-6.57784243E-10
+-2.48324306E-08 5.40689114E-14-1.25076565E-03 0.00000000E+00-7.17859768E-04
+ 1.93556653E-18-1.25076565E-03 0.00000000E+00-7.17859768E-04 1.93556653E-18
+ 0.00000000E+00 1.76309011E-08 0.00000000E+00 1.16912045E-13-5.59026708E-03
+ 1.48842853E-08-4.84201361E-08 1.09795244E-13 2.55323636E-03 0.00000000E+00
+ 1.02133022E-02 0.00000000E+00 1.48870231E-03-7.19681856E-18 5.95609546E-03
+-2.67304467E-17 2.55323636E-03 0.00000000E+00 1.02133022E-02 0.00000000E+00
+ 1.48870231E-03-7.19681856E-18 5.95609546E-03-2.67304467E-17 0.00000000E+00
+-8.21800780E-10 0.00000000E+00 5.89027984E-14 2.62312661E-04-6.95861800E-10
+-2.36155764E-08 5.58063262E-14 2.55322679E-03 0.00000000E+00-1.30272902E-03
+ 0.00000000E+00 1.48869981E-03-8.51473568E-18-7.71745094E-04 2.60688738E-18
+ 2.55322679E-03 0.00000000E+00-1.30272902E-03 0.00000000E+00 1.48869981E-03
+-8.51473568E-18-7.71745094E-04 2.60688738E-18-3.61197924E-06-2.11421703E-20
+-2.17614400E-08-1.26218455E-22-6.87940846E-05 0.00000000E+00-4.11819567E-07
+ 0.00000000E+00-2.48324306E-08-5.40689114E-14 0.00000000E+00-5.81164074E-14
+-2.48324306E-08-5.40689114E-14 0.00000000E+00-5.81164074E-14 5.50113834E-07
+-1.50281726E-20 6.20931825E-08 2.46059960E-22-2.03385225E-06 0.00000000E+00
+ 1.08293750E-06 0.00000000E+00 2.61012977E-05 6.96243919E-11-4.84201361E-08
+-1.09795244E-13 0.00000000E+00 8.25475130E-11 0.00000000E+00-1.16912045E-13
+ 2.61012977E-05 6.96243919E-11-4.84201361E-08-1.09795244E-13 0.00000000E+00
+ 8.25475130E-11 0.00000000E+00-1.16912045E-13 4.16212610E-06 7.32980403E-21
+-2.48228106E-08-4.78910259E-23 6.67598937E-05 0.00000000E+00-4.00499004E-07
+ 0.00000000E+00-2.66825903E-05-7.09426319E-11-2.36155764E-08-5.58063262E-14
+ 0.00000000E+00-8.39513528E-11 0.00000000E+00-5.89027984E-14-2.66825903E-05
+-7.09426319E-11-2.36155764E-08-5.58063262E-14 0.00000000E+00-8.39513528E-11
+ 0.00000000E+00-5.89027984E-14 5.80827978E-04 3.36050674E-18 3.65048962E-06
+ 2.09085556E-20 1.09916887E-02 0.00000000E+00 6.86423661E-05 0.00000000E+00
+ 2.56041225E-04 6.80686546E-10 0.00000000E+00 8.05864746E-10 2.56041225E-04
+ 6.80686546E-10 0.00000000E+00 8.05864746E-10 3.59002130E-03 1.48470091E-17
+ 5.50113834E-07-1.50281726E-20 6.26192815E-02 0.00000000E+00-2.03385225E-06
+ 0.00000000E+00-5.03303721E-03-1.34219111E-08-5.59026708E-03-1.48842853E-08
+ 0.00000000E+00-1.59112842E-08 0.00000000E+00-1.76309011E-08-5.03303721E-03
+-1.34219111E-08-5.59026708E-03-1.48842853E-08 0.00000000E+00-1.59112842E-08
+ 0.00000000E+00-1.76309011E-08 6.62541288E-04 1.28136632E-18-4.12203555E-06
+-8.67992250E-21 1.06895961E-02 0.00000000E+00-6.68989104E-05 0.00000000E+00
+-5.13004616E-03-1.36419098E-08 2.52309708E-04 6.72223487E-10 0.00000000E+00
+-1.61455713E-08 0.00000000E+00 7.96850822E-10-5.13004616E-03-1.36419098E-08
+ 2.52309708E-04 6.72223487E-10 0.00000000E+00-1.61455713E-08 0.00000000E+00
+ 7.96850822E-10-6.87940846E-05 0.00000000E+00-4.11819567E-07 0.00000000E+00
+-3.61197924E-06 2.11421703E-20-2.17614400E-08 1.26218455E-22 0.00000000E+00
+-5.81164074E-14 2.48324306E-08-5.40689114E-14 0.00000000E+00-5.81164074E-14
+ 2.48324306E-08-5.40689114E-14-2.03385225E-06 0.00000000E+00 1.08293750E-06
+ 0.00000000E+00 5.50113834E-07 1.50281726E-20 6.20931825E-08-2.46059960E-22
+ 0.00000000E+00 8.25475130E-11 0.00000000E+00-1.16912045E-13-2.61012977E-05
+ 6.96243919E-11 4.84201361E-08-1.09795244E-13 0.00000000E+00 8.25475130E-11
+ 0.00000000E+00-1.16912045E-13-2.61012977E-05 6.96243919E-11 4.84201361E-08
+-1.09795244E-13 6.67598937E-05 0.00000000E+00-4.00499004E-07 0.00000000E+00
+ 4.16212610E-06-7.32980403E-21-2.48228106E-08 4.78910259E-23 0.00000000E+00
+-8.39513528E-11 0.00000000E+00-5.89027984E-14 2.66825903E-05-7.09426319E-11
+ 2.36155764E-08-5.58063262E-14 0.00000000E+00-8.39513528E-11 0.00000000E+00
+-5.89027984E-14 2.66825903E-05-7.09426319E-11 2.36155764E-08-5.58063262E-14
+ 0.00000000E+00 1.58307203E-08 0.00000000E+00 8.23150473E-11-4.99861328E-03
+ 1.33469582E-08-2.60019680E-05 6.94081162E-11 2.44982624E-03 0.00000000E+00
+ 1.38273676E-03-5.45447543E-19 2.44982624E-03 0.00000000E+00 1.38273676E-03
+-5.45447543E-19 0.00000000E+00 1.59112842E-08 0.00000000E+00-8.25475130E-11
+-5.03303721E-03 1.34219111E-08 2.61012977E-05-6.96243919E-11 2.00119554E-02
+ 0.00000000E+00 2.55323636E-03 0.00000000E+00 1.14847169E-02-2.96186639E-17
+ 1.48870231E-03-7.19681856E-18 2.00119554E-02 0.00000000E+00 2.55323636E-03
+ 0.00000000E+00 1.14847169E-02-2.96186639E-17 1.48870231E-03-7.19681856E-18
+ 4.99861328E-03 1.33469582E-08 2.60019680E-05 6.94081162E-11 0.00000000E+00
+ 1.58307203E-08 0.00000000E+00 8.23150473E-11 1.38273676E-03 5.45447543E-19
+ 2.44982624E-03 0.00000000E+00 1.38273676E-03 5.45447543E-19 2.44982624E-03
+ 0.00000000E+00 5.03303721E-03 1.34219111E-08-2.61012977E-05-6.96243919E-11
+ 0.00000000E+00 1.59112842E-08 0.00000000E+00-8.25475130E-11 1.14847169E-02
+ 2.96186639E-17 1.48870231E-03 7.19681856E-18 2.00119554E-02 0.00000000E+00
+ 2.55323636E-03 0.00000000E+00 1.14847169E-02 2.96186639E-17 1.48870231E-03
+ 7.19681856E-18 2.00119554E-02 0.00000000E+00 2.55323636E-03 0.00000000E+00
+ 0.00000000E+00 1.58307203E-08 0.00000000E+00 8.23150473E-11-4.99861328E-03
+ 1.33469582E-08-2.60019680E-05 6.94081162E-11 2.44982624E-03 0.00000000E+00
+ 1.38273676E-03-5.45447543E-19 8.36128445E-02 0.00000000E+00 3.16119696E-02
+-7.04588741E-17 0.00000000E+00 1.59112842E-08 0.00000000E+00-8.25475130E-11
+-5.03303721E-03 1.34219111E-08 2.61012977E-05-6.96243919E-11 2.00119554E-02
+ 0.00000000E+00 2.55323636E-03 0.00000000E+00 1.14847169E-02-2.96186639E-17
+ 1.48870231E-03-7.19681856E-18 6.56997609E-01 0.00000000E+00 8.06529646E-02
+ 0.00000000E+00 2.53248378E-01-3.66269987E-16 3.17003238E-02-3.05517383E-17
+ 4.86075581E-03 1.30616280E-08 2.52878955E-05 6.79234373E-11 0.00000000E+00
+ 1.55202773E-08 0.00000000E+00 8.07015437E-11 1.28043105E-03 3.40777737E-18
+ 2.34743654E-03 0.00000000E+00 3.15265277E-02 1.04649952E-16 8.68149937E-02
+ 0.00000000E+00 4.89680507E-03 1.31340656E-08-2.53919163E-05-6.81324562E-11
+ 0.00000000E+00 1.55996802E-08 0.00000000E+00-8.09306600E-11 1.06516294E-02
+ 1.57270646E-17 1.38273908E-03 8.41835607E-19 1.91888049E-02 0.00000000E+00
+ 2.44983550E-03 0.00000000E+00 2.52553530E-01 8.76603235E-16 3.16120592E-02
+ 9.47988447E-17 6.81633378E-01 0.00000000E+00 8.36117581E-02 0.00000000E+00
+ 1.13216876E-02 0.00000000E+00 7.06985711E-05 0.00000000E+00 5.02368150E-04
+-1.97397660E-18 3.15920268E-06-1.29098602E-20 0.00000000E+00 7.90136622E-10
+-2.49437815E-04 6.65973523E-10 0.00000000E+00 7.90136622E-10-2.49437815E-04
+ 6.65973523E-10 6.44435088E-02 0.00000000E+00-2.22163385E-06 0.00000000E+00
+ 3.12733081E-03-1.71465606E-17 5.28230132E-07-1.04488351E-20 0.00000000E+00
+-1.55996802E-08 0.00000000E+00-1.72863270E-08 4.89680507E-03-1.31340656E-08
+ 5.44303140E-03-1.45637109E-08 0.00000000E+00-1.55996802E-08 0.00000000E+00
+-1.72863270E-08 4.89680507E-03-1.31340656E-08 5.44303140E-03-1.45637109E-08
+ 1.09916887E-02 0.00000000E+00-6.87940846E-05 0.00000000E+00 5.80827978E-04
+-3.36050674E-18-3.61197924E-06 2.11421703E-20 0.00000000E+00-1.58307203E-08
+ 0.00000000E+00 7.81247960E-10 4.99861328E-03-1.33469582E-08-2.45522789E-04
+ 6.57784243E-10 0.00000000E+00-1.58307203E-08 0.00000000E+00 7.81247960E-10
+ 4.99861328E-03-1.33469582E-08-2.45522789E-04 6.57784243E-10-2.38422733E-04
+-6.43839774E-10 2.60052053E-08 5.22547100E-14 0.00000000E+00-7.65874611E-10
+ 0.00000000E+00 5.72790698E-14-6.65792532E-04-1.06240324E-18-1.19931801E-03
+ 0.00000000E+00-1.57846467E-02-4.98621993E-17-4.26066879E-02 0.00000000E+00
+ 5.44303140E-03 1.45637109E-08 5.08236504E-08 1.06250655E-13 0.00000000E+00
+ 1.72863270E-08 0.00000000E+00 1.15294289E-13 1.38273908E-03 8.41835607E-19
+ 5.53225806E-03 6.10119392E-18 2.44983550E-03 0.00000000E+00 9.79968469E-03
+ 0.00000000E+00 3.16120592E-02 9.47988447E-17 1.26449066E-01 3.19460499E-16
+ 8.36117581E-02 0.00000000E+00 3.34536116E-01 0.00000000E+00-2.56041225E-04
+-6.80686546E-10 2.48324306E-08 5.40689114E-14 0.00000000E+00-8.05864746E-10
+ 0.00000000E+00 5.81164074E-14 1.38273676E-03 5.45447543E-19-7.17859768E-04
+-1.93556653E-18 2.44982624E-03 0.00000000E+00-1.25076565E-03 0.00000000E+00
+ 3.16119696E-02 7.04588741E-17-1.58280733E-02-2.52526531E-17 8.36128445E-02
+ 0.00000000E+00-4.10664523E-02 0.00000000E+00 0.00000000E+00-7.65874611E-10
+ 0.00000000E+00 5.72790698E-14 2.38422733E-04-6.43839774E-10-2.60052053E-08
+ 5.22547100E-14-1.19931801E-03 0.00000000E+00-6.65792532E-04 1.06240324E-18
+-4.26066879E-02 0.00000000E+00-1.57846467E-02 4.98621993E-17 0.00000000E+00
+ 1.72863270E-08 0.00000000E+00 1.15294289E-13-5.44303140E-03 1.45637109E-08
+-5.08236504E-08 1.06250655E-13 2.44983550E-03 0.00000000E+00 9.79968469E-03
+ 0.00000000E+00 1.38273908E-03-8.41835607E-19 5.53225806E-03-6.10119392E-18
+ 8.36117581E-02 0.00000000E+00 3.34536116E-01 0.00000000E+00 3.16120592E-02
+-9.47988447E-17 1.26449066E-01-3.19460499E-16 0.00000000E+00-8.05864746E-10
+ 0.00000000E+00 5.81164074E-14 2.56041225E-04-6.80686546E-10-2.48324306E-08
+ 5.40689114E-14 2.44982624E-03 0.00000000E+00-1.25076565E-03 0.00000000E+00
+ 1.38273676E-03-5.45447543E-19-7.17859768E-04 1.93556653E-18 8.36128445E-02
+ 0.00000000E+00-4.10664523E-02 0.00000000E+00 3.16119696E-02-7.04588741E-17
+-1.58280733E-02 2.52526531E-17-2.38422733E-04-6.43839774E-10 2.60052053E-08
+ 5.22547100E-14 0.00000000E+00-7.65874611E-10 0.00000000E+00 5.72790698E-14
+-6.65792532E-04-1.06240324E-18-1.19931801E-03 0.00000000E+00-6.65792532E-04
+-1.06240324E-18-1.19931801E-03 0.00000000E+00 5.44303140E-03 1.45637109E-08
+ 5.08236504E-08 1.06250655E-13 0.00000000E+00 1.72863270E-08 0.00000000E+00
+ 1.15294289E-13 1.38273908E-03 8.41835607E-19 5.53225806E-03 6.10119392E-18
+ 2.44983550E-03 0.00000000E+00 9.79968469E-03 0.00000000E+00 1.38273908E-03
+ 8.41835607E-19 5.53225806E-03 6.10119392E-18 2.44983550E-03 0.00000000E+00
+ 9.79968469E-03 0.00000000E+00-2.56041225E-04-6.80686546E-10 2.48324306E-08
+ 5.40689114E-14 0.00000000E+00-8.05864746E-10 0.00000000E+00 5.81164074E-14
+ 1.38273676E-03 5.45447543E-19-7.17859768E-04-1.93556653E-18 2.44982624E-03
+ 0.00000000E+00-1.25076565E-03 0.00000000E+00 1.38273676E-03 5.45447543E-19
+-7.17859768E-04-1.93556653E-18 2.44982624E-03 0.00000000E+00-1.25076565E-03
+ 0.00000000E+00 0.00000000E+00-7.65874611E-10 0.00000000E+00 5.72790698E-14
+ 2.38422733E-04-6.43839774E-10-2.60052053E-08 5.22547100E-14-1.19931801E-03
+ 0.00000000E+00-6.65792532E-04 1.06240324E-18-1.19931801E-03 0.00000000E+00
+-6.65792532E-04 1.06240324E-18 0.00000000E+00 1.72863270E-08 0.00000000E+00
+ 1.15294289E-13-5.44303140E-03 1.45637109E-08-5.08236504E-08 1.06250655E-13
+ 2.44983550E-03 0.00000000E+00 9.79968469E-03 0.00000000E+00 1.38273908E-03
+-8.41835607E-19 5.53225806E-03-6.10119392E-18 2.44983550E-03 0.00000000E+00
+ 9.79968469E-03 0.00000000E+00 1.38273908E-03-8.41835607E-19 5.53225806E-03
+-6.10119392E-18 0.00000000E+00-8.05864746E-10 0.00000000E+00 5.81164074E-14
+ 2.56041225E-04-6.80686546E-10-2.48324306E-08 5.40689114E-14 2.44982624E-03
+ 0.00000000E+00-1.25076565E-03 0.00000000E+00 1.38273676E-03-5.45447543E-19
+-7.17859768E-04 1.93556653E-18 2.44982624E-03 0.00000000E+00-1.25076565E-03
+ 0.00000000E+00 1.38273676E-03-5.45447543E-19-7.17859768E-04 1.93556653E-18
+-3.12224754E-06-1.17698368E-20-1.88219264E-08-7.39356604E-23-7.08644776E-05
+ 0.00000000E+00-4.24185784E-07 0.00000000E+00-2.60052053E-08-5.22547100E-14
+ 0.00000000E+00-5.72790698E-14-2.60052053E-08-5.22547100E-14 0.00000000E+00
+-5.72790698E-14 5.28230132E-07 1.04488351E-20 5.40923128E-08 2.83842594E-22
+-2.22163385E-06 0.00000000E+00 1.11450188E-06 0.00000000E+00 2.53919163E-05
+ 6.81324562E-11-5.08236504E-08-1.06250655E-13 0.00000000E+00 8.09306600E-11
+ 0.00000000E+00-1.15294289E-13 2.53919163E-05 6.81324562E-11-5.08236504E-08
+-1.06250655E-13 0.00000000E+00 8.09306600E-11 0.00000000E+00-1.15294289E-13
+ 3.65048962E-06 2.09085556E-20-2.17614400E-08-1.26218455E-22 6.86423661E-05
+ 0.00000000E+00-4.11819567E-07 0.00000000E+00-2.60019680E-05-6.94081162E-11
+-2.48324306E-08-5.40689114E-14 0.00000000E+00-8.23150473E-11 0.00000000E+00
+-5.81164074E-14-2.60019680E-05-6.94081162E-11-2.48324306E-08-5.40689114E-14
+ 0.00000000E+00-8.23150473E-11 0.00000000E+00-5.81164074E-14 5.02368150E-04
+ 1.97397660E-18 3.15920268E-06 1.29098602E-20 1.13216876E-02 0.00000000E+00
+ 7.06985711E-05 0.00000000E+00 2.49437815E-04 6.65973523E-10 0.00000000E+00
+ 7.90136622E-10 2.49437815E-04 6.65973523E-10 0.00000000E+00 7.90136622E-10
+ 3.12733081E-03 1.71465606E-17 5.28230132E-07 1.04488351E-20 6.44435088E-02
+ 0.00000000E+00-2.22163385E-06 0.00000000E+00-4.89680507E-03-1.31340656E-08
+-5.44303140E-03-1.45637109E-08 0.00000000E+00-1.55996802E-08 0.00000000E+00
+-1.72863270E-08-4.89680507E-03-1.31340656E-08-5.44303140E-03-1.45637109E-08
+ 0.00000000E+00-1.55996802E-08 0.00000000E+00-1.72863270E-08 5.80827978E-04
+ 3.36050674E-18-3.61197924E-06-2.11421703E-20 1.09916887E-02 0.00000000E+00
+-6.87940846E-05 0.00000000E+00-4.99861328E-03-1.33469582E-08 2.45522789E-04
+ 6.57784243E-10 0.00000000E+00-1.58307203E-08 0.00000000E+00 7.81247960E-10
+-4.99861328E-03-1.33469582E-08 2.45522789E-04 6.57784243E-10 0.00000000E+00
+-1.58307203E-08 0.00000000E+00 7.81247960E-10-7.08644776E-05 0.00000000E+00
+-4.24185784E-07 0.00000000E+00-3.12224754E-06 1.17698368E-20-1.88219264E-08
+ 7.39356604E-23 0.00000000E+00-5.72790698E-14 2.60052053E-08-5.22547100E-14
+ 0.00000000E+00-5.72790698E-14 2.60052053E-08-5.22547100E-14-2.22163385E-06
+ 0.00000000E+00 1.11450188E-06 0.00000000E+00 5.28230132E-07-1.04488351E-20
+ 5.40923128E-08-2.83842594E-22 0.00000000E+00 8.09306600E-11 0.00000000E+00
+-1.15294289E-13-2.53919163E-05 6.81324562E-11 5.08236504E-08-1.06250655E-13
+ 0.00000000E+00 8.09306600E-11 0.00000000E+00-1.15294289E-13-2.53919163E-05
+ 6.81324562E-11 5.08236504E-08-1.06250655E-13 6.86423661E-05 0.00000000E+00
+-4.11819567E-07 0.00000000E+00 3.65048962E-06-2.09085556E-20-2.17614400E-08
+ 1.26218455E-22 0.00000000E+00-8.23150473E-11 0.00000000E+00-5.81164074E-14
+ 2.60019680E-05-6.94081162E-11 2.48324306E-08-5.40689114E-14 0.00000000E+00
+-8.23150473E-11 0.00000000E+00-5.81164074E-14 2.60019680E-05-6.94081162E-11
+ 2.48324306E-08-5.40689114E-14 0.00000000E+00 1.55202773E-08 0.00000000E+00
+ 8.07015437E-11-4.86075581E-03 1.30616280E-08-2.52878955E-05 6.79234373E-11
+ 2.34743654E-03 0.00000000E+00 1.28043105E-03-3.40777737E-18 2.34743654E-03
+ 0.00000000E+00 1.28043105E-03-3.40777737E-18 0.00000000E+00 1.55996802E-08
+ 0.00000000E+00-8.09306600E-11-4.89680507E-03 1.31340656E-08 2.53919163E-05
+-6.81324562E-11 1.91888049E-02 0.00000000E+00 2.44983550E-03 0.00000000E+00
+ 1.06516294E-02-1.57270646E-17 1.38273908E-03-8.41835607E-19 1.91888049E-02
+ 0.00000000E+00 2.44983550E-03 0.00000000E+00 1.06516294E-02-1.57270646E-17
+ 1.38273908E-03-8.41835607E-19 4.86075581E-03 1.30616280E-08 2.52878955E-05
+ 6.79234373E-11 0.00000000E+00 1.55202773E-08 0.00000000E+00 8.07015437E-11
+ 1.28043105E-03 3.40777737E-18 2.34743654E-03 0.00000000E+00 1.28043105E-03
+ 3.40777737E-18 2.34743654E-03 0.00000000E+00 4.89680507E-03 1.31340656E-08
+-2.53919163E-05-6.81324562E-11 0.00000000E+00 1.55996802E-08 0.00000000E+00
+-8.09306600E-11 1.06516294E-02 1.57270646E-17 1.38273908E-03 8.41835607E-19
+ 1.91888049E-02 0.00000000E+00 2.44983550E-03 0.00000000E+00 1.06516294E-02
+ 1.57270646E-17 1.38273908E-03 8.41835607E-19 1.91888049E-02 0.00000000E+00
+ 2.44983550E-03 0.00000000E+00 0.00000000E+00 1.55202773E-08 0.00000000E+00
+ 8.07015437E-11-4.86075581E-03 1.30616280E-08-2.52878955E-05 6.79234373E-11
+ 2.34743654E-03 0.00000000E+00 1.28043105E-03-3.40777737E-18 8.68149937E-02
+ 0.00000000E+00 3.15265277E-02-1.04649952E-16 0.00000000E+00 1.55996802E-08
+ 0.00000000E+00-8.09306600E-11-4.89680507E-03 1.31340656E-08 2.53919163E-05
+-6.81324562E-11 1.91888049E-02 0.00000000E+00 2.44983550E-03 0.00000000E+00
+ 1.06516294E-02-1.57270646E-17 1.38273908E-03-8.41835607E-19 6.81633378E-01
+ 0.00000000E+00 8.36117581E-02 0.00000000E+00 2.52553530E-01-8.76603235E-16
+ 3.16120592E-02-9.47988447E-17 4.71680355E-03 1.27863801E-08 2.45420636E-05
+ 6.64909702E-11 0.00000000E+00 1.52145515E-08 0.00000000E+00 7.91124323E-11
+ 1.18182214E-03 4.73657903E-18 2.24601660E-03 0.00000000E+00 3.14439758E-02
+ 4.53434017E-17 9.02905814E-02 0.00000000E+00 4.75438874E-03 1.28561775E-08
+-2.46505160E-05-6.66923715E-11 0.00000000E+00 1.52927095E-08 0.00000000E+00
+-7.93379576E-11 9.84795882E-03 3.68310046E-17 1.28043311E-03 3.97799735E-18
+ 1.83735766E-02 0.00000000E+00 2.34744546E-03 0.00000000E+00 2.51881546E-01
+ 3.43811958E-16 3.15266187E-02 6.48723134E-17 7.08334121E-01 0.00000000E+00
+ 8.68136933E-02 0.00000000E+00 1.16830136E-02 0.00000000E+00 7.29497447E-05
+ 0.00000000E+00 4.27146865E-04-5.19429226E-19 2.68815852E-06-3.25940067E-21
+ 0.00000000E+00 7.74629514E-10-2.42513651E-04 6.51742487E-10 0.00000000E+00
+ 7.74629514E-10-2.42513651E-04 6.51742487E-10 6.64384788E-02 0.00000000E+00
+-2.43248794E-06 0.00000000E+00 2.68335900E-03-5.84207165E-18 5.06425783E-07
+-1.03302718E-20 0.00000000E+00-1.52927095E-08 0.00000000E+00-1.69467210E-08
+ 4.75438874E-03-1.28561775E-08 5.28884979E-03-1.42538984E-08 0.00000000E+00
+-1.52927095E-08 0.00000000E+00-1.69467210E-08 4.75438874E-03-1.28561775E-08
+ 5.28884979E-03-1.42538984E-08 1.13216876E-02 0.00000000E+00-7.08644776E-05
+ 0.00000000E+00 5.02368150E-04-1.97397660E-18-3.12224754E-06 1.17698368E-20
+ 0.00000000E+00-1.55202773E-08 0.00000000E+00 7.65874611E-10 4.86075581E-03
+-1.30616280E-08-2.38422733E-04 6.43839774E-10 0.00000000E+00-1.55202773E-08
+ 0.00000000E+00 7.65874611E-10 4.86075581E-03-1.30616280E-08-2.38422733E-04
+ 6.43839774E-10-2.31029267E-04-6.30415478E-10 2.71131037E-08 5.03503294E-14
+ 0.00000000E+00-7.50747861E-10 0.00000000E+00 5.63813042E-14-6.15563814E-04
+-2.17864410E-18-1.14836552E-03 0.00000000E+00-1.57426486E-02-2.75539288E-17
+-4.42760687E-02 0.00000000E+00 5.28884979E-03 1.42538984E-08 5.30981111E-08
+ 1.02537318E-13 0.00000000E+00 1.69467210E-08 0.00000000E+00 1.13563152E-13
+ 1.28043311E-03 3.97799735E-18 5.12304886E-03 1.41016270E-17 2.34744546E-03
+ 0.00000000E+00 9.39011057E-03 0.00000000E+00 3.15266187E-02 6.48723134E-17
+ 1.26107324E-01 3.28536009E-16 8.68136933E-02 0.00000000E+00 3.47355104E-01
+ 0.00000000E+00-2.49437815E-04-6.65973523E-10 2.60052053E-08 5.22547100E-14
+ 0.00000000E+00-7.90136622E-10 0.00000000E+00 5.72790698E-14 1.28043105E-03
+ 3.40777737E-18-6.65792532E-04-1.06240324E-18 2.34743654E-03 0.00000000E+00
+-1.19931801E-03 0.00000000E+00 3.15265277E-02 1.04649952E-16-1.57846467E-02
+-4.98621993E-17 8.68149937E-02 0.00000000E+00-4.26066879E-02 0.00000000E+00
+ 0.00000000E+00-7.50747861E-10 0.00000000E+00 5.63813042E-14 2.31029267E-04
+-6.30415478E-10-2.71131037E-08 5.03503294E-14-1.14836552E-03 0.00000000E+00
+-6.15563814E-04 2.17864410E-18-4.42760687E-02 0.00000000E+00-1.57426486E-02
+ 2.75539288E-17 0.00000000E+00 1.69467210E-08 0.00000000E+00 1.13563152E-13
+-5.28884979E-03 1.42538984E-08-5.30981111E-08 1.02537318E-13 2.34744546E-03
+ 0.00000000E+00 9.39011057E-03 0.00000000E+00 1.28043311E-03-3.97799735E-18
+ 5.12304886E-03-1.41016270E-17 8.68136933E-02 0.00000000E+00 3.47355104E-01
+ 0.00000000E+00 3.15266187E-02-6.48723134E-17 1.26107324E-01-3.28536009E-16
+ 0.00000000E+00-7.90136622E-10 0.00000000E+00 5.72790698E-14 2.49437815E-04
+-6.65973523E-10-2.60052053E-08 5.22547100E-14 2.34743654E-03 0.00000000E+00
+-1.19931801E-03 0.00000000E+00 1.28043105E-03-3.40777737E-18-6.65792532E-04
+ 1.06240324E-18 8.68149937E-02 0.00000000E+00-4.26066879E-02 0.00000000E+00
+ 3.15265277E-02-1.04649952E-16-1.57846467E-02 4.98621993E-17-2.31029267E-04
+-6.30415478E-10 2.71131037E-08 5.03503294E-14 0.00000000E+00-7.50747861E-10
+ 0.00000000E+00 5.63813042E-14-6.15563814E-04-2.17864410E-18-1.14836552E-03
+ 0.00000000E+00-6.15563814E-04-2.17864410E-18-1.14836552E-03 0.00000000E+00
+ 5.28884979E-03 1.42538984E-08 5.30981111E-08 1.02537318E-13 0.00000000E+00
+ 1.69467210E-08 0.00000000E+00 1.13563152E-13 1.28043311E-03 3.97799735E-18
+ 5.12304886E-03 1.41016270E-17 2.34744546E-03 0.00000000E+00 9.39011057E-03
+ 0.00000000E+00 1.28043311E-03 3.97799735E-18 5.12304886E-03 1.41016270E-17
+ 2.34744546E-03 0.00000000E+00 9.39011057E-03 0.00000000E+00-2.49437815E-04
+-6.65973523E-10 2.60052053E-08 5.22547100E-14 0.00000000E+00-7.90136622E-10
+ 0.00000000E+00 5.72790698E-14 1.28043105E-03 3.40777737E-18-6.65792532E-04
+-1.06240324E-18 2.34743654E-03 0.00000000E+00-1.19931801E-03 0.00000000E+00
+ 1.28043105E-03 3.40777737E-18-6.65792532E-04-1.06240324E-18 2.34743654E-03
+ 0.00000000E+00-1.19931801E-03 0.00000000E+00 0.00000000E+00-7.50747861E-10
+ 0.00000000E+00 5.63813042E-14 2.31029267E-04-6.30415478E-10-2.71131037E-08
+ 5.03503294E-14-1.14836552E-03 0.00000000E+00-6.15563814E-04 2.17864410E-18
+-1.14836552E-03 0.00000000E+00-6.15563814E-04 2.17864410E-18 0.00000000E+00
+ 1.69467210E-08 0.00000000E+00 1.13563152E-13-5.28884979E-03 1.42538984E-08
+-5.30981111E-08 1.02537318E-13 2.34744546E-03 0.00000000E+00 9.39011057E-03
+ 0.00000000E+00 1.28043311E-03-3.97799735E-18 5.12304886E-03-1.41016270E-17
+ 2.34744546E-03 0.00000000E+00 9.39011057E-03 0.00000000E+00 1.28043311E-03
+-3.97799735E-18 5.12304886E-03-1.41016270E-17 0.00000000E+00-7.90136622E-10
+ 0.00000000E+00 5.72790698E-14 2.49437815E-04-6.65973523E-10-2.60052053E-08
+ 5.22547100E-14 2.34743654E-03 0.00000000E+00-1.19931801E-03 0.00000000E+00
+ 1.28043105E-03-3.40777737E-18-6.65792532E-04 1.06240324E-18 2.34743654E-03
+ 0.00000000E+00-1.19931801E-03 0.00000000E+00 1.28043105E-03-3.40777737E-18
+-6.65792532E-04 1.06240324E-18-2.65276132E-06-3.21283219E-21-1.60037175E-08
+-1.92415306E-23-7.31316285E-05 0.00000000E+00-4.37725845E-07 0.00000000E+00
+-2.71131037E-08-5.03503294E-14 0.00000000E+00-5.63813042E-14-2.71131037E-08
+-5.03503294E-14 0.00000000E+00-5.63813042E-14 5.06425783E-07 1.03302718E-20
+ 4.64153110E-08 1.10767088E-22-2.43248794E-06 0.00000000E+00 1.14902189E-06
+ 0.00000000E+00 2.46505160E-05 6.66923715E-11-5.30981111E-08-1.02537318E-13
+ 0.00000000E+00 7.93379576E-11 0.00000000E+00-1.13563152E-13 2.46505160E-05
+ 6.66923715E-11-5.30981111E-08-1.02537318E-13 0.00000000E+00 7.93379576E-11
+ 0.00000000E+00-1.13563152E-13 3.15920268E-06 1.29098602E-20-1.88219264E-08
+-7.39356604E-23 7.06985711E-05 0.00000000E+00-4.24185784E-07 0.00000000E+00
+-2.52878955E-05-6.79234373E-11-2.60052053E-08-5.22547100E-14 0.00000000E+00
+-8.07015437E-11 0.00000000E+00-5.72790698E-14-2.52878955E-05-6.79234373E-11
+-2.60052053E-08-5.22547100E-14 0.00000000E+00-8.07015437E-11 0.00000000E+00
+-5.72790698E-14 4.27146865E-04 5.19429226E-19 2.68815852E-06 3.25940067E-21
+ 1.16830136E-02 0.00000000E+00 7.29497447E-05 0.00000000E+00 2.42513651E-04
+ 6.51742487E-10 0.00000000E+00 7.74629514E-10 2.42513651E-04 6.51742487E-10
+ 0.00000000E+00 7.74629514E-10 2.68335900E-03 5.84207165E-18 5.06425783E-07
+ 1.03302718E-20 6.64384788E-02 0.00000000E+00-2.43248794E-06 0.00000000E+00
+-4.75438874E-03-1.28561775E-08-5.28884979E-03-1.42538984E-08 0.00000000E+00
+-1.52927095E-08 0.00000000E+00-1.69467210E-08-4.75438874E-03-1.28561775E-08
+-5.28884979E-03-1.42538984E-08 0.00000000E+00-1.52927095E-08 0.00000000E+00
+-1.69467210E-08 5.02368150E-04 1.97397660E-18-3.12224754E-06-1.17698368E-20
+ 1.13216876E-02 0.00000000E+00-7.08644776E-05 0.00000000E+00-4.86075581E-03
+-1.30616280E-08 2.38422733E-04 6.43839774E-10 0.00000000E+00-1.55202773E-08
+ 0.00000000E+00 7.65874611E-10-4.86075581E-03-1.30616280E-08 2.38422733E-04
+ 6.43839774E-10 0.00000000E+00-1.55202773E-08 0.00000000E+00 7.65874611E-10
+-7.31316285E-05 0.00000000E+00-4.37725845E-07 0.00000000E+00-2.65276132E-06
+ 3.21283219E-21-1.60037175E-08 1.92415306E-23 0.00000000E+00-5.63813042E-14
+ 2.71131037E-08-5.03503294E-14 0.00000000E+00-5.63813042E-14 2.71131037E-08
+-5.03503294E-14-2.43248794E-06 0.00000000E+00 1.14902189E-06 0.00000000E+00
+ 5.06425783E-07-1.03302718E-20 4.64153110E-08-1.10767088E-22 0.00000000E+00
+ 7.93379576E-11 0.00000000E+00-1.13563152E-13-2.46505160E-05 6.66923715E-11
+ 5.30981111E-08-1.02537318E-13 0.00000000E+00 7.93379576E-11 0.00000000E+00
+-1.13563152E-13-2.46505160E-05 6.66923715E-11 5.30981111E-08-1.02537318E-13
+ 7.06985711E-05 0.00000000E+00-4.24185784E-07 0.00000000E+00 3.15920268E-06
+-1.29098602E-20-1.88219264E-08 7.39356604E-23 0.00000000E+00-8.07015437E-11
+ 0.00000000E+00-5.72790698E-14 2.52878955E-05-6.79234373E-11 2.60052053E-08
+-5.22547100E-14 0.00000000E+00-8.07015437E-11 0.00000000E+00-5.72790698E-14
+ 2.52878955E-05-6.79234373E-11 2.60052053E-08-5.22547100E-14 0.00000000E+00
+ 1.52145515E-08 0.00000000E+00 7.91124323E-11-4.71680355E-03 1.27863801E-08
+-2.45420636E-05 6.64909702E-11 2.24601660E-03 0.00000000E+00 1.18182214E-03
+-4.73657903E-18 2.24601660E-03 0.00000000E+00 1.18182214E-03-4.73657903E-18
+ 0.00000000E+00 1.52927095E-08 0.00000000E+00-7.93379576E-11-4.75438874E-03
+ 1.28561775E-08 2.46505160E-05-6.66923715E-11 1.83735766E-02 0.00000000E+00
+ 2.34744546E-03 0.00000000E+00 9.84795882E-03-3.68310046E-17 1.28043311E-03
+-3.97799735E-18 1.83735766E-02 0.00000000E+00 2.34744546E-03 0.00000000E+00
+ 9.84795882E-03-3.68310046E-17 1.28043311E-03-3.97799735E-18 4.71680355E-03
+ 1.27863801E-08 2.45420636E-05 6.64909702E-11 0.00000000E+00 1.52145515E-08
+ 0.00000000E+00 7.91124323E-11 1.18182214E-03 4.73657903E-18 2.24601660E-03
+ 0.00000000E+00 1.18182214E-03 4.73657903E-18 2.24601660E-03 0.00000000E+00
+ 4.75438874E-03 1.28561775E-08-2.46505160E-05-6.66923715E-11 0.00000000E+00
+ 1.52927095E-08 0.00000000E+00-7.93379576E-11 9.84795882E-03 3.68310046E-17
+ 1.28043311E-03 3.97799735E-18 1.83735766E-02 0.00000000E+00 2.34744546E-03
+ 0.00000000E+00 9.84795882E-03 3.68310046E-17 1.28043311E-03 3.97799735E-18
+ 1.83735766E-02 0.00000000E+00 2.34744546E-03 0.00000000E+00 0.00000000E+00
+ 1.52145515E-08 0.00000000E+00 7.91124323E-11-4.71680355E-03 1.27863801E-08
+-2.45420636E-05 6.64909702E-11 2.24601660E-03 0.00000000E+00 1.18182214E-03
+-4.73657903E-18 9.02905814E-02 0.00000000E+00 3.14439758E-02-4.53434017E-17
+ 0.00000000E+00 1.52927095E-08 0.00000000E+00-7.93379576E-11-4.75438874E-03
+ 1.28561775E-08 2.46505160E-05-6.66923715E-11 1.83735766E-02 0.00000000E+00
+ 2.34744546E-03 0.00000000E+00 9.84795882E-03-3.68310046E-17 1.28043311E-03
+-3.97799735E-18 7.08334121E-01 0.00000000E+00 8.68136933E-02 0.00000000E+00
+ 2.51881546E-01-3.43811958E-16 3.15266187E-02-6.48723134E-17 4.56702803E-03
+ 1.25217424E-08 2.37659165E-05 6.51134331E-11 0.00000000E+00 1.49138935E-08
+ 0.00000000E+00 7.75495211E-11 1.08694880E-03 1.90613701E-18 2.14552658E-03
+ 0.00000000E+00 3.13643641E-02 9.02920365E-17 9.40750979E-02 0.00000000E+00
+ 4.60609016E-03 1.25887561E-08-2.38786309E-05-6.53068033E-11 0.00000000E+00
+ 1.49907114E-08 0.00000000E+00-7.77711804E-11 9.07401719E-03 2.34019835E-17
+ 1.18182383E-03 4.14256900E-18 1.75659463E-02 0.00000000E+00 2.24602511E-03
+ 0.00000000E+00 2.51232869E-01 8.54002422E-16 3.14440656E-02 9.47329908E-17
+ 7.37362444E-01 0.00000000E+00 9.02890128E-02 0.00000000E+00 1.20796356E-02
+ 0.00000000E+00 7.54205759E-05 0.00000000E+00 3.55149452E-04-8.91938128E-19
+ 2.23727643E-06-5.74488050E-21 0.00000000E+00 7.59358956E-10-2.35287727E-04
+ 6.38016603E-10 0.00000000E+00 7.59358956E-10-2.35287727E-04 6.38016603E-10
+ 6.86256096E-02 0.00000000E+00-2.67003179E-06 0.00000000E+00 2.25808368E-03
+-4.37920279E-18 4.84715292E-07 4.37096832E-21 0.00000000E+00-1.49907114E-08
+ 0.00000000E+00-1.66124406E-08 4.60609016E-03-1.25887561E-08 5.12809205E-03
+-1.39553818E-08 0.00000000E+00-1.49907114E-08 0.00000000E+00-1.66124406E-08
+ 4.60609016E-03-1.25887561E-08 5.12809205E-03-1.39553818E-08 1.16830136E-02
+ 0.00000000E+00-7.31316285E-05 0.00000000E+00 4.27146865E-04-5.19429226E-19
+-2.65276132E-06 3.21283219E-21 0.00000000E+00-1.52145515E-08 0.00000000E+00
+ 7.50747861E-10 4.71680355E-03-1.27863801E-08-2.31029267E-04 6.30415478E-10
+ 0.00000000E+00-1.52145515E-08 0.00000000E+00 7.50747861E-10 4.71680355E-03
+-1.27863801E-08-2.31029267E-04 6.30415478E-10-2.23352058E-04-6.17540149E-10
+ 2.81786064E-08 4.83425387E-14 0.00000000E+00-7.35886779E-10 0.00000000E+00
+ 5.54148281E-14-5.67193156E-04-1.51217650E-18-1.09788792E-03 0.00000000E+00
+-1.57021074E-02-4.62562568E-17-4.60910277E-02 0.00000000E+00 5.12809205E-03
+ 1.39553818E-08 5.52676095E-08 9.86333132E-14 0.00000000E+00 1.66124406E-08
+ 0.00000000E+00 1.11705524E-13 1.18182383E-03 4.14256900E-18 4.72862639E-03
+ 1.66713089E-17 2.24602511E-03 0.00000000E+00 8.98441580E-03 0.00000000E+00
+ 3.14440656E-02 9.47329908E-17 1.25777133E-01 2.85690070E-16 9.02890128E-02
+ 0.00000000E+00 3.61269613E-01 0.00000000E+00-2.42513651E-04-6.51742487E-10
+ 2.71131037E-08 5.03503294E-14 0.00000000E+00-7.74629514E-10 0.00000000E+00
+ 5.63813042E-14 1.18182214E-03 4.73657903E-18-6.15563814E-04-2.17864410E-18
+ 2.24601660E-03 0.00000000E+00-1.14836552E-03 0.00000000E+00 3.14439758E-02
+ 4.53434017E-17-1.57426486E-02-2.75539288E-17 9.02905814E-02 0.00000000E+00
+-4.42760687E-02 0.00000000E+00 0.00000000E+00-7.35886779E-10 0.00000000E+00
+ 5.54148281E-14 2.23352058E-04-6.17540149E-10-2.81786064E-08 4.83425387E-14
+-1.09788792E-03 0.00000000E+00-5.67193156E-04 1.51217650E-18-4.60910277E-02
+ 0.00000000E+00-1.57021074E-02 4.62562568E-17 0.00000000E+00 1.66124406E-08
+ 0.00000000E+00 1.11705524E-13-5.12809205E-03 1.39553818E-08-5.52676095E-08
+ 9.86333132E-14 2.24602511E-03 0.00000000E+00 8.98441580E-03 0.00000000E+00
+ 1.18182383E-03-4.14256900E-18 4.72862639E-03-1.66713089E-17 9.02890128E-02
+ 0.00000000E+00 3.61269613E-01 0.00000000E+00 3.14440656E-02-9.47329908E-17
+ 1.25777133E-01-2.85690070E-16 0.00000000E+00-7.74629514E-10 0.00000000E+00
+ 5.63813042E-14 2.42513651E-04-6.51742487E-10-2.71131037E-08 5.03503294E-14
+ 2.24601660E-03 0.00000000E+00-1.14836552E-03 0.00000000E+00 1.18182214E-03
+-4.73657903E-18-6.15563814E-04 2.17864410E-18 9.02905814E-02 0.00000000E+00
+-4.42760687E-02 0.00000000E+00 3.14439758E-02-4.53434017E-17-1.57426486E-02
+ 2.75539288E-17-2.23352058E-04-6.17540149E-10 2.81786064E-08 4.83425387E-14
+ 0.00000000E+00-7.35886779E-10 0.00000000E+00 5.54148281E-14-5.67193156E-04
+-1.51217650E-18-1.09788792E-03 0.00000000E+00-5.67193156E-04-1.51217650E-18
+-1.09788792E-03 0.00000000E+00 5.12809205E-03 1.39553818E-08 5.52676095E-08
+ 9.86333132E-14 0.00000000E+00 1.66124406E-08 0.00000000E+00 1.11705524E-13
+ 1.18182383E-03 4.14256900E-18 4.72862639E-03 1.66713089E-17 2.24602511E-03
+ 0.00000000E+00 8.98441580E-03 0.00000000E+00 1.18182383E-03 4.14256900E-18
+ 4.72862639E-03 1.66713089E-17 2.24602511E-03 0.00000000E+00 8.98441580E-03
+ 0.00000000E+00-2.42513651E-04-6.51742487E-10 2.71131037E-08 5.03503294E-14
+ 0.00000000E+00-7.74629514E-10 0.00000000E+00 5.63813042E-14 1.18182214E-03
+ 4.73657903E-18-6.15563814E-04-2.17864410E-18 2.24601660E-03 0.00000000E+00
+-1.14836552E-03 0.00000000E+00 1.18182214E-03 4.73657903E-18-6.15563814E-04
+-2.17864410E-18 2.24601660E-03 0.00000000E+00-1.14836552E-03 0.00000000E+00
+ 0.00000000E+00-7.35886779E-10 0.00000000E+00 5.54148281E-14 2.23352058E-04
+-6.17540149E-10-2.81786064E-08 4.83425387E-14-1.09788792E-03 0.00000000E+00
+-5.67193156E-04 1.51217650E-18-1.09788792E-03 0.00000000E+00-5.67193156E-04
+ 1.51217650E-18 0.00000000E+00 1.66124406E-08 0.00000000E+00 1.11705524E-13
+-5.12809205E-03 1.39553818E-08-5.52676095E-08 9.86333132E-14 2.24602511E-03
+ 0.00000000E+00 8.98441580E-03 0.00000000E+00 1.18182383E-03-4.14256900E-18
+ 4.72862639E-03-1.66713089E-17 2.24602511E-03 0.00000000E+00 8.98441580E-03
+ 0.00000000E+00 1.18182383E-03-4.14256900E-18 4.72862639E-03-1.66713089E-17
+ 0.00000000E+00-7.74629514E-10 0.00000000E+00 5.63813042E-14 2.42513651E-04
+-6.51742487E-10-2.71131037E-08 5.03503294E-14 2.24601660E-03 0.00000000E+00
+-1.14836552E-03 0.00000000E+00 1.18182214E-03-4.73657903E-18-6.15563814E-04
+ 2.17864410E-18 2.24601660E-03 0.00000000E+00-1.14836552E-03 0.00000000E+00
+ 1.18182214E-03-4.73657903E-18-6.15563814E-04 2.17864410E-18-2.20341842E-06
+-5.43899306E-21-1.33062681E-08-3.37229159E-23-7.56204789E-05 0.00000000E+00
+-4.52588468E-07 0.00000000E+00-2.81786064E-08-4.83425387E-14 0.00000000E+00
+-5.54148281E-14-2.81786064E-08-4.83425387E-14 0.00000000E+00-5.54148281E-14
+ 4.84715292E-07-4.37096832E-21 3.90613288E-08 7.37330988E-23-2.67003179E-06
+ 0.00000000E+00 1.18686740E-06 0.00000000E+00 2.38786309E-05 6.53068033E-11
+-5.52676095E-08-9.86333132E-14 0.00000000E+00 7.77711804E-11 0.00000000E+00
+-1.11705524E-13 2.38786309E-05 6.53068033E-11-5.52676095E-08-9.86333132E-14
+ 0.00000000E+00 7.77711804E-11 0.00000000E+00-1.11705524E-13 2.68815852E-06
+ 3.25940067E-21-1.60037175E-08-1.92415306E-23 7.29497447E-05 0.00000000E+00
+-4.37725845E-07 0.00000000E+00-2.45420636E-05-6.64909702E-11-2.71131037E-08
+-5.03503294E-14 0.00000000E+00-7.91124323E-11 0.00000000E+00-5.63813042E-14
+-2.45420636E-05-6.64909702E-11-2.71131037E-08-5.03503294E-14 0.00000000E+00
+-7.91124323E-11 0.00000000E+00-5.63813042E-14 3.55149452E-04 8.91938128E-19
+ 2.23727643E-06 5.74488050E-21 1.20796356E-02 0.00000000E+00 7.54205759E-05
+ 0.00000000E+00 2.35287727E-04 6.38016603E-10 0.00000000E+00 7.59358956E-10
+ 2.35287727E-04 6.38016603E-10 0.00000000E+00 7.59358956E-10 2.25808368E-03
+ 4.37920279E-18 4.84715292E-07-4.37096832E-21 6.86256096E-02 0.00000000E+00
+-2.67003179E-06 0.00000000E+00-4.60609016E-03-1.25887561E-08-5.12809205E-03
+-1.39553818E-08 0.00000000E+00-1.49907114E-08 0.00000000E+00-1.66124406E-08
+-4.60609016E-03-1.25887561E-08-5.12809205E-03-1.39553818E-08 0.00000000E+00
+-1.49907114E-08 0.00000000E+00-1.66124406E-08 4.27146865E-04 5.19429226E-19
+-2.65276132E-06-3.21283219E-21 1.16830136E-02 0.00000000E+00-7.31316285E-05
+ 0.00000000E+00-4.71680355E-03-1.27863801E-08 2.31029267E-04 6.30415478E-10
+ 0.00000000E+00-1.52145515E-08 0.00000000E+00 7.50747861E-10-4.71680355E-03
+-1.27863801E-08 2.31029267E-04 6.30415478E-10 0.00000000E+00-1.52145515E-08
+ 0.00000000E+00 7.50747861E-10-7.56204789E-05 0.00000000E+00-4.52588468E-07
+ 0.00000000E+00-2.20341842E-06 5.43899306E-21-1.33062681E-08 3.37229159E-23
+ 0.00000000E+00-5.54148281E-14 2.81786064E-08-4.83425387E-14 0.00000000E+00
+-5.54148281E-14 2.81786064E-08-4.83425387E-14-2.67003179E-06 0.00000000E+00
+ 1.18686740E-06 0.00000000E+00 4.84715292E-07 4.37096832E-21 3.90613288E-08
+-7.37330988E-23 0.00000000E+00 7.77711804E-11 0.00000000E+00-1.11705524E-13
+-2.38786309E-05 6.53068033E-11 5.52676095E-08-9.86333132E-14 0.00000000E+00
+ 7.77711804E-11 0.00000000E+00-1.11705524E-13-2.38786309E-05 6.53068033E-11
+ 5.52676095E-08-9.86333132E-14 7.29497447E-05 0.00000000E+00-4.37725845E-07
+ 0.00000000E+00 2.68815852E-06-3.25940067E-21-1.60037175E-08 1.92415306E-23
+ 0.00000000E+00-7.91124323E-11 0.00000000E+00-5.63813042E-14 2.45420636E-05
+-6.64909702E-11 2.71131037E-08-5.03503294E-14 0.00000000E+00-7.91124323E-11
+ 0.00000000E+00-5.63813042E-14 2.45420636E-05-6.64909702E-11 2.71131037E-08
+-5.03503294E-14 0.00000000E+00 1.49138935E-08 0.00000000E+00 7.75495211E-11
+-4.56702803E-03 1.25217424E-08-2.37659165E-05 6.51134331E-11 2.14552658E-03
+ 0.00000000E+00 1.08694880E-03-1.90613701E-18 2.14552658E-03 0.00000000E+00
+ 1.08694880E-03-1.90613701E-18 0.00000000E+00 1.49907114E-08 0.00000000E+00
+-7.77711804E-11-4.60609016E-03 1.25887561E-08 2.38786309E-05-6.53068033E-11
+ 1.75659463E-02 0.00000000E+00 2.24602511E-03 0.00000000E+00 9.07401719E-03
+-2.34019835E-17 1.18182383E-03-4.14256900E-18 1.75659463E-02 0.00000000E+00
+ 2.24602511E-03 0.00000000E+00 9.07401719E-03-2.34019835E-17 1.18182383E-03
+-4.14256900E-18 4.56702803E-03 1.25217424E-08 2.37659165E-05 6.51134331E-11
+ 0.00000000E+00 1.49138935E-08 0.00000000E+00 7.75495211E-11 1.08694880E-03
+ 1.90613701E-18 2.14552658E-03 0.00000000E+00 1.08694880E-03 1.90613701E-18
+ 2.14552658E-03 0.00000000E+00 4.60609016E-03 1.25887561E-08-2.38786309E-05
+-6.53068033E-11 0.00000000E+00 1.49907114E-08 0.00000000E+00-7.77711804E-11
+ 9.07401719E-03 2.34019835E-17 1.18182383E-03 4.14256900E-18 1.75659463E-02
+ 0.00000000E+00 2.24602511E-03 0.00000000E+00 9.07401719E-03 2.34019835E-17
+ 1.18182383E-03 4.14256900E-18 1.75659463E-02 0.00000000E+00 2.24602511E-03
+ 0.00000000E+00 0.00000000E+00 1.49138935E-08 0.00000000E+00 7.75495211E-11
+-4.56702803E-03 1.25217424E-08-2.37659165E-05 6.51134331E-11 2.14552658E-03
+ 0.00000000E+00 1.08694880E-03-1.90613701E-18 9.40750979E-02 0.00000000E+00
+ 3.13643641E-02-9.02920365E-17 0.00000000E+00 1.49907114E-08 0.00000000E+00
+-7.77711804E-11-4.60609016E-03 1.25887561E-08 2.38786309E-05-6.53068033E-11
+ 1.75659463E-02 0.00000000E+00 2.24602511E-03 0.00000000E+00 9.07401719E-03
+-2.34019835E-17 1.18182383E-03-4.14256900E-18 7.37362444E-01 0.00000000E+00
+ 9.02890128E-02 0.00000000E+00 2.51232869E-01-8.54002422E-16 3.14440656E-02
+-9.47329908E-17 1.25161774E-02 0.00000000E+00 7.81397790E-05 0.00000000E+00
+ 2.86330873E-04 7.03309438E-19 1.80627310E-06 4.22269426E-21 0.00000000E+00
+ 7.44342461E-10-2.27770981E-04 6.24822253E-10 0.00000000E+00 7.44342461E-10
+-2.27770981E-04 6.24822253E-10 7.10295563E-02 0.00000000E+00-2.93864895E-06
+ 0.00000000E+00 1.85130119E-03-6.44848100E-19 4.63330949E-07-1.29760010E-20
+ 0.00000000E+00-1.46940833E-08 0.00000000E+00-1.62838947E-08 4.45212851E-03
+-1.23323976E-08 4.96101603E-03-1.36687762E-08 0.00000000E+00-1.46940833E-08
+ 0.00000000E+00-1.62838947E-08 4.45212851E-03-1.23323976E-08 4.96101603E-03
+-1.36687762E-08 1.20796356E-02 0.00000000E+00-7.56204789E-05 0.00000000E+00
+ 3.55149452E-04-8.91938128E-19-2.20341842E-06 5.43899306E-21 0.00000000E+00
+-1.49138935E-08 0.00000000E+00 7.35886779E-10 4.56702803E-03-1.25217424E-08
+-2.23352058E-04 6.17540149E-10 0.00000000E+00-1.49138935E-08 0.00000000E+00
+ 7.35886779E-10 4.56702803E-03-1.25217424E-08-2.23352058E-04 6.17540149E-10
+-2.15402643E-04-6.05248399E-10 2.92002098E-08 4.62118784E-14 0.00000000E+00
+-7.21314530E-10 0.00000000E+00 5.43662646E-14-5.20699550E-04-1.41675763E-18
+-1.04786517E-03 0.00000000E+00-1.56630516E-02-1.10609084E-17-4.80709288E-02
+ 0.00000000E+00 4.96101603E-03 1.36687762E-08 5.73620276E-08 9.45031645E-14
+ 0.00000000E+00 1.62838947E-08 0.00000000E+00 1.09696856E-13 1.08695041E-03
+ 1.86290511E-18 4.34914589E-03 9.06031726E-18 2.14553501E-03 0.00000000E+00
+ 8.58244086E-03 0.00000000E+00 3.13644545E-02 3.95776748E-17 1.25458708E-01
+ 2.48569063E-16 9.40732007E-02 0.00000000E+00 3.76422033E-01 0.00000000E+00
+-2.35287727E-04-6.38016603E-10 2.81786064E-08 4.83425387E-14 0.00000000E+00
+-7.59358956E-10 0.00000000E+00 5.54148281E-14 1.08694880E-03 1.90613701E-18
+-5.67193156E-04-1.51217650E-18 2.14552658E-03 0.00000000E+00-1.09788792E-03
+ 0.00000000E+00 3.13643641E-02 9.02920365E-17-1.57021074E-02-4.62562568E-17
+ 9.40750979E-02 0.00000000E+00-4.60910277E-02 0.00000000E+00 0.00000000E+00
+-7.21314530E-10 0.00000000E+00 5.43662646E-14 2.15402643E-04-6.05248399E-10
+-2.92002098E-08 4.62118784E-14-1.04786517E-03 0.00000000E+00-5.20699550E-04
+ 1.41675763E-18-4.80709288E-02 0.00000000E+00-1.56630516E-02 1.10609084E-17
+ 0.00000000E+00 1.62838947E-08 0.00000000E+00 1.09696856E-13-4.96101603E-03
+ 1.36687762E-08-5.73620276E-08 9.45031645E-14 2.14553501E-03 0.00000000E+00
+ 8.58244086E-03 0.00000000E+00 1.08695041E-03-1.86290511E-18 4.34914589E-03
+-9.06031726E-18 9.40732007E-02 0.00000000E+00 3.76422033E-01 0.00000000E+00
+ 3.13644545E-02-3.95776748E-17 1.25458708E-01-2.48569063E-16 0.00000000E+00
+-7.59358956E-10 0.00000000E+00 5.54148281E-14 2.35287727E-04-6.38016603E-10
+-2.81786064E-08 4.83425387E-14 2.14552658E-03 0.00000000E+00-1.09788792E-03
+ 0.00000000E+00 1.08694880E-03-1.90613701E-18-5.67193156E-04 1.51217650E-18
+ 9.40750979E-02 0.00000000E+00-4.60910277E-02 0.00000000E+00 3.13643641E-02
+-9.02920365E-17-1.57021074E-02 4.62562568E-17-2.15402643E-04-6.05248399E-10
+ 2.92002098E-08 4.62118784E-14 0.00000000E+00-7.21314530E-10 0.00000000E+00
+ 5.43662646E-14-5.20699550E-04-1.41675763E-18-1.04786517E-03 0.00000000E+00
+-5.20699550E-04-1.41675763E-18-1.04786517E-03 0.00000000E+00 4.96101603E-03
+ 1.36687762E-08 5.73620276E-08 9.45031645E-14 0.00000000E+00 1.62838947E-08
+ 0.00000000E+00 1.09696856E-13 1.08695041E-03 1.86290511E-18 4.34914589E-03
+ 9.06031726E-18 2.14553501E-03 0.00000000E+00 8.58244086E-03 0.00000000E+00
+ 1.08695041E-03 1.86290511E-18 4.34914589E-03 9.06031726E-18 2.14553501E-03
+ 0.00000000E+00 8.58244086E-03 0.00000000E+00-2.35287727E-04-6.38016603E-10
+ 2.81786064E-08 4.83425387E-14 0.00000000E+00-7.59358956E-10 0.00000000E+00
+ 5.54148281E-14 1.08694880E-03 1.90613701E-18-5.67193156E-04-1.51217650E-18
+ 2.14552658E-03 0.00000000E+00-1.09788792E-03 0.00000000E+00 1.08694880E-03
+ 1.90613701E-18-5.67193156E-04-1.51217650E-18 2.14552658E-03 0.00000000E+00
+-1.09788792E-03 0.00000000E+00 0.00000000E+00-7.21314530E-10 0.00000000E+00
+ 5.43662646E-14 2.15402643E-04-6.05248399E-10-2.92002098E-08 4.62118784E-14
+-1.04786517E-03 0.00000000E+00-5.20699550E-04 1.41675763E-18-1.04786517E-03
+ 0.00000000E+00-5.20699550E-04 1.41675763E-18 0.00000000E+00 1.62838947E-08
+ 0.00000000E+00 1.09696856E-13-4.96101603E-03 1.36687762E-08-5.73620276E-08
+ 9.45031645E-14 2.14553501E-03 0.00000000E+00 8.58244086E-03 0.00000000E+00
+ 1.08695041E-03-1.86290511E-18 4.34914589E-03-9.06031726E-18 2.14553501E-03
+ 0.00000000E+00 8.58244086E-03 0.00000000E+00 1.08695041E-03-1.86290511E-18
+ 4.34914589E-03-9.06031726E-18 0.00000000E+00-7.59358956E-10 0.00000000E+00
+ 5.54148281E-14 2.35287727E-04-6.38016603E-10-2.81786064E-08 4.83425387E-14
+ 2.14552658E-03 0.00000000E+00-1.09788792E-03 0.00000000E+00 1.08694880E-03
+-1.90613701E-18-5.67193156E-04 1.51217650E-18 2.14552658E-03 0.00000000E+00
+-1.09788792E-03 0.00000000E+00 1.08694880E-03-1.90613701E-18-5.67193156E-04
+ 1.51217650E-18-1.77393866E-06 4.60215281E-21-1.07278859E-08 2.66510190E-23
+-7.83601306E-05 0.00000000E+00-4.68946898E-07 0.00000000E+00-2.92002098E-08
+-4.62118784E-14 0.00000000E+00-5.43662646E-14-2.92002098E-08-4.62118784E-14
+ 0.00000000E+00-5.43662646E-14 4.63330949E-07 1.29760010E-20 3.20270768E-08
+ 1.03705704E-23-2.93864895E-06 0.00000000E+00 1.22846603E-06 0.00000000E+00
+ 2.30773953E-05 6.39788789E-11-5.73620276E-08-9.45031645E-14 0.00000000E+00
+ 7.62324141E-11 0.00000000E+00-1.09696856E-13 2.30773953E-05 6.39788789E-11
+-5.73620276E-08-9.45031645E-14 0.00000000E+00 7.62324141E-11 0.00000000E+00
+-1.09696856E-13 2.23727643E-06 5.74488050E-21-1.33062681E-08-3.37229159E-23
+ 7.54205759E-05 0.00000000E+00-4.52588468E-07 0.00000000E+00-2.37659165E-05
+-6.51134331E-11-2.81786064E-08-4.83425387E-14 0.00000000E+00-7.75495211E-11
+ 0.00000000E+00-5.54148281E-14-2.37659165E-05-6.51134331E-11-2.81786064E-08
+-4.83425387E-14 0.00000000E+00-7.75495211E-11 0.00000000E+00-5.54148281E-14
+ 2.86330873E-04-7.03309438E-19 1.80627310E-06-4.22269426E-21 1.25161774E-02
+ 0.00000000E+00 7.81397790E-05 0.00000000E+00 2.27770981E-04 6.24822253E-10
+ 0.00000000E+00 7.44342461E-10 2.27770981E-04 6.24822253E-10 0.00000000E+00
+ 7.44342461E-10 1.85130119E-03 6.44848100E-19 4.63330949E-07 1.29760010E-20
+ 7.10295563E-02 0.00000000E+00-2.93864895E-06 0.00000000E+00-4.45212851E-03
+-1.23323976E-08-4.96101603E-03-1.36687762E-08 0.00000000E+00-1.46940833E-08
+ 0.00000000E+00-1.62838947E-08-4.45212851E-03-1.23323976E-08-4.96101603E-03
+-1.36687762E-08 0.00000000E+00-1.46940833E-08 0.00000000E+00-1.62838947E-08
+ 3.55149452E-04 8.91938128E-19-2.20341842E-06-5.43899306E-21 1.20796356E-02
+ 0.00000000E+00-7.56204789E-05 0.00000000E+00-4.56702803E-03-1.25217424E-08
+ 2.23352058E-04 6.17540149E-10 0.00000000E+00-1.49138935E-08 0.00000000E+00
+ 7.35886779E-10-4.56702803E-03-1.25217424E-08 2.23352058E-04 6.17540149E-10
+ 0.00000000E+00-1.49138935E-08 0.00000000E+00 7.35886779E-10-7.83601306E-05
+ 0.00000000E+00-4.68946898E-07 0.00000000E+00-1.77393866E-06-4.60215281E-21
+-1.07278859E-08-2.66510190E-23 0.00000000E+00-5.43662646E-14 2.92002098E-08
+-4.62118784E-14 0.00000000E+00-5.43662646E-14 2.92002098E-08-4.62118784E-14
+-2.93864895E-06 0.00000000E+00 1.22846603E-06 0.00000000E+00 4.63330949E-07
+-1.29760010E-20 3.20270768E-08-1.03705704E-23 0.00000000E+00 7.62324141E-11
+ 0.00000000E+00-1.09696856E-13-2.30773953E-05 6.39788789E-11 5.73620276E-08
+-9.45031645E-14 0.00000000E+00 7.62324141E-11 0.00000000E+00-1.09696856E-13
+-2.30773953E-05 6.39788789E-11 5.73620276E-08-9.45031645E-14 7.54205759E-05
+ 0.00000000E+00-4.52588468E-07 0.00000000E+00 2.23727643E-06-5.74488050E-21
+-1.33062681E-08 3.37229159E-23 0.00000000E+00-7.75495211E-11 0.00000000E+00
+-5.54148281E-14 2.37659165E-05-6.51134331E-11 2.81786064E-08-4.83425387E-14
+ 0.00000000E+00-7.75495211E-11 0.00000000E+00-5.54148281E-14 2.37659165E-05
+-6.51134331E-11 2.81786064E-08-4.83425387E-14 4.41165039E-03 1.22683379E-08
+ 2.29605944E-05 6.37940314E-11 0.00000000E+00 1.46187193E-08 0.00000000E+00
+ 7.60149490E-11 9.95847790E-04 3.80412543E-18 2.04592565E-03 0.00000000E+00
+ 3.12877521E-02 4.66595877E-18 9.82105147E-02 0.00000000E+00 4.45212851E-03
+ 1.23323976E-08-2.30773953E-05-6.39788789E-11 0.00000000E+00 1.46940833E-08
+ 0.00000000E+00-7.62324141E-11 8.33010976E-03 2.15738525E-17 1.08695041E-03
+ 1.86290511E-18 1.67655945E-02 0.00000000E+00 2.14553501E-03 0.00000000E+00
+ 2.50607962E-01 7.04733661E-17 3.13644545E-02 3.95776748E-17 7.69027795E-01
+ 0.00000000E+00 9.40732007E-02 0.00000000E+00 0.00000000E+00 1.46187193E-08
+ 0.00000000E+00 7.60149490E-11-4.41165039E-03 1.22683379E-08-2.29605944E-05
+ 6.37940314E-11 2.04592565E-03 0.00000000E+00 9.95847790E-04-3.80412543E-18
+ 2.04592565E-03 0.00000000E+00 9.95847790E-04-3.80412543E-18 0.00000000E+00
+ 1.46940833E-08 0.00000000E+00-7.62324141E-11-4.45212851E-03 1.23323976E-08
+ 2.30773953E-05-6.39788789E-11 1.67655945E-02 0.00000000E+00 2.14553501E-03
+ 0.00000000E+00 8.33010976E-03-2.15738525E-17 1.08695041E-03-1.86290511E-18
+ 1.67655945E-02 0.00000000E+00 2.14553501E-03 0.00000000E+00 8.33010976E-03
+-2.15738525E-17 1.08695041E-03-1.86290511E-18 4.41165039E-03 1.22683379E-08
+ 2.29605944E-05 6.37940314E-11 0.00000000E+00 1.46187193E-08 0.00000000E+00
+ 7.60149490E-11 9.95847790E-04 3.80412543E-18 2.04592565E-03 0.00000000E+00
+ 9.95847790E-04 3.80412543E-18 2.04592565E-03 0.00000000E+00 4.45212851E-03
+ 1.23323976E-08-2.30773953E-05-6.39788789E-11 0.00000000E+00 1.46940833E-08
+ 0.00000000E+00-7.62324141E-11 8.33010976E-03 2.15738525E-17 1.08695041E-03
+ 1.86290511E-18 1.67655945E-02 0.00000000E+00 2.14553501E-03 0.00000000E+00
+ 8.33010976E-03 2.15738525E-17 1.08695041E-03 1.86290511E-18 1.67655945E-02
+ 0.00000000E+00 2.14553501E-03 0.00000000E+00 0.00000000E+00 1.46187193E-08
+ 0.00000000E+00 7.60149490E-11-4.41165039E-03 1.22683379E-08-2.29605944E-05
+ 6.37940314E-11 2.04592565E-03 0.00000000E+00 9.95847790E-04-3.80412543E-18
+ 9.82105147E-02 0.00000000E+00 3.12877521E-02-4.66595877E-18 0.00000000E+00
+ 1.46940833E-08 0.00000000E+00-7.62324141E-11-4.45212851E-03 1.23323976E-08
+ 2.30773953E-05-6.39788789E-11 1.67655945E-02 0.00000000E+00 2.14553501E-03
+ 0.00000000E+00 8.33010976E-03-2.15738525E-17 1.08695041E-03-1.86290511E-18
+ 7.69027795E-01 0.00000000E+00 9.40732007E-02 0.00000000E+00 2.50607962E-01
+-7.04733661E-17 3.13644545E-02-3.95776748E-17 1.29981872E-02 0.00000000E+00
+ 8.11418015E-05 0.00000000E+00 2.20677511E-04 2.22842284E-19 1.39505857E-06
+ 1.51864099E-21 0.00000000E+00 7.29600947E-10-2.19974859E-04 6.12190746E-10
+ 0.00000000E+00 7.29600947E-10-2.19974859E-04 6.12190746E-10 7.36795879E-02
+ 0.00000000E+00-3.24461298E-06 0.00000000E+00 1.46283271E-03 3.45021393E-18
+ 4.42018187E-07 4.76749403E-21 0.00000000E+00-1.44032962E-08 0.00000000E+00
+-1.59615704E-08 4.29276622E-03-1.20878074E-08 4.78788415E-03-1.33948108E-08
+ 0.00000000E+00-1.44032962E-08 0.00000000E+00-1.59615704E-08 4.29276622E-03
+-1.20878074E-08 4.78788415E-03-1.33948108E-08 1.25161774E-02 0.00000000E+00
+-7.83601306E-05 0.00000000E+00 2.86330873E-04 7.03309438E-19-1.77393866E-06
+-4.60215281E-21 0.00000000E+00-1.46187193E-08 0.00000000E+00 7.21314530E-10
+ 4.41165039E-03-1.22683379E-08-2.15402643E-04 6.05248399E-10 0.00000000E+00
+-1.46187193E-08 0.00000000E+00 7.21314530E-10 4.41165039E-03-1.22683379E-08
+-2.15402643E-04 6.05248399E-10 4.25094497E-03 1.20269034E-08 2.21275126E-05
+ 6.25365547E-11 0.00000000E+00 1.43295207E-08 0.00000000E+00 7.45112456E-11
+ 9.08553320E-04 5.74139386E-18 1.94717265E-03 0.00000000E+00 3.12141924E-02
+ 1.26192557E-16 1.02746784E-01 0.00000000E+00 4.29276622E-03 1.20878074E-08
+-2.22481889E-05-6.27122977E-11 0.00000000E+00 1.44032962E-08 0.00000000E+00
+-7.47241280E-11 7.61651613E-03 4.13241572E-17 9.95848971E-04 4.26554444E-18
+ 1.59721872E-02 0.00000000E+00 2.04593346E-03 0.00000000E+00 2.50007257E-01
+ 6.97128680E-16 3.12878419E-02 3.75651676E-17 8.03697274E-01 0.00000000E+00
+ 9.82082056E-02 0.00000000E+00 0.00000000E+00 1.43295207E-08 0.00000000E+00
+ 7.45112456E-11-4.25094497E-03 1.20269034E-08-2.21275126E-05 6.25365547E-11
+ 1.94717265E-03 0.00000000E+00 9.08553320E-04-5.74139386E-18 1.94717265E-03
+ 0.00000000E+00 9.08553320E-04-5.74139386E-18 0.00000000E+00 1.44032962E-08
+ 0.00000000E+00-7.47241280E-11-4.29276622E-03 1.20878074E-08 2.22481889E-05
+-6.27122977E-11 1.59721872E-02 0.00000000E+00 2.04593346E-03 0.00000000E+00
+ 7.61651613E-03-4.13241572E-17 9.95848971E-04-4.26554444E-18 1.59721872E-02
+ 0.00000000E+00 2.04593346E-03 0.00000000E+00 7.61651613E-03-4.13241572E-17
+ 9.95848971E-04-4.26554444E-18 4.25094497E-03 1.20269034E-08 2.21275126E-05
+ 6.25365547E-11 0.00000000E+00 1.43295207E-08 0.00000000E+00 7.45112456E-11
+ 9.08553320E-04 5.74139386E-18 1.94717265E-03 0.00000000E+00 9.08553320E-04
+ 5.74139386E-18 1.94717265E-03 0.00000000E+00 4.29276622E-03 1.20878074E-08
+-2.22481889E-05-6.27122977E-11 0.00000000E+00 1.44032962E-08 0.00000000E+00
+-7.47241280E-11 7.61651613E-03 4.13241572E-17 9.95848971E-04 4.26554444E-18
+ 1.59721872E-02 0.00000000E+00 2.04593346E-03 0.00000000E+00 7.61651613E-03
+ 4.13241572E-17 9.95848971E-04 4.26554444E-18 1.59721872E-02 0.00000000E+00
+ 2.04593346E-03 0.00000000E+00 0.00000000E+00 1.43295207E-08 0.00000000E+00
+ 7.45112456E-11-4.25094497E-03 1.20269034E-08-2.21275126E-05 6.25365547E-11
+ 1.94717265E-03 0.00000000E+00 9.08553320E-04-5.74139386E-18 1.02746784E-01
+ 0.00000000E+00 3.12141924E-02-1.26192557E-16 0.00000000E+00 1.44032962E-08
+ 0.00000000E+00-7.47241280E-11-4.29276622E-03 1.20878074E-08 2.22481889E-05
+-6.27122977E-11 1.59721872E-02 0.00000000E+00 2.04593346E-03 0.00000000E+00
+ 7.61651613E-03-4.13241572E-17 9.95848971E-04-4.26554444E-18 8.03697274E-01
+ 0.00000000E+00 9.82082056E-02 0.00000000E+00 2.50007257E-01-6.97128680E-16
+ 3.12878419E-02-3.75651676E-17-2.07196130E-04-5.93581114E-10 3.01690769E-08
+ 4.39357560E-14 0.00000000E+00-7.07058392E-10 0.00000000E+00 5.32206124E-14
+-4.76100573E-04-2.50173457E-18-9.98276528E-04 0.00000000E+00-1.56255086E-02
+-4.09394313E-17-5.02387473E-02 0.00000000E+00 4.78788415E-03 1.33948108E-08
+ 5.93527872E-08 9.01065735E-14 0.00000000E+00 1.59615704E-08 0.00000000E+00
+ 1.07510426E-13 9.95848971E-04 4.26554444E-18 3.98475333E-03 1.59708701E-17
+ 2.04593346E-03 0.00000000E+00 8.18402138E-03 0.00000000E+00 3.12878419E-02
+ 3.75651676E-17 1.25152278E-01 1.29328808E-16 9.82082056E-02 0.00000000E+00
+ 3.92980746E-01 0.00000000E+00-2.27770981E-04-6.24822253E-10 2.92002098E-08
+ 4.62118784E-14 0.00000000E+00-7.44342461E-10 0.00000000E+00 5.43662646E-14
+ 9.95847790E-04 3.80412543E-18-5.20699550E-04-1.41675763E-18 2.04592565E-03
+ 0.00000000E+00-1.04786517E-03 0.00000000E+00 3.12877521E-02 4.66595877E-18
+-1.56630516E-02-1.10609084E-17 9.82105147E-02 0.00000000E+00-4.80709288E-02
+ 0.00000000E+00 0.00000000E+00-7.07058392E-10 0.00000000E+00 5.32206124E-14
+ 2.07196130E-04-5.93581114E-10-3.01690769E-08 4.39357560E-14-9.98276528E-04
+ 0.00000000E+00-4.76100573E-04 2.50173457E-18-5.02387473E-02 0.00000000E+00
+-1.56255086E-02 4.09394313E-17 0.00000000E+00 1.59615704E-08 0.00000000E+00
+ 1.07510426E-13-4.78788415E-03 1.33948108E-08-5.93527872E-08 9.01065735E-14
+ 2.04593346E-03 0.00000000E+00 8.18402138E-03 0.00000000E+00 9.95848971E-04
+-4.26554444E-18 3.98475333E-03-1.59708701E-17 9.82082056E-02 0.00000000E+00
+ 3.92980746E-01 0.00000000E+00 3.12878419E-02-3.75651676E-17 1.25152278E-01
+-1.29328808E-16 0.00000000E+00-7.44342461E-10 0.00000000E+00 5.43662646E-14
+ 2.27770981E-04-6.24822253E-10-2.92002098E-08 4.62118784E-14 2.04592565E-03
+ 0.00000000E+00-1.04786517E-03 0.00000000E+00 9.95847790E-04-3.80412543E-18
+-5.20699550E-04 1.41675763E-18 9.82105147E-02 0.00000000E+00-4.80709288E-02
+ 0.00000000E+00 3.12877521E-02-4.66595877E-18-1.56630516E-02 1.10609084E-17
+-2.07196130E-04-5.93581114E-10 3.01690769E-08 4.39357560E-14 0.00000000E+00
+-7.07058392E-10 0.00000000E+00 5.32206124E-14-4.76100573E-04-2.50173457E-18
+-9.98276528E-04 0.00000000E+00-4.76100573E-04-2.50173457E-18-9.98276528E-04
+ 0.00000000E+00 4.78788415E-03 1.33948108E-08 5.93527872E-08 9.01065735E-14
+ 0.00000000E+00 1.59615704E-08 0.00000000E+00 1.07510426E-13 9.95848971E-04
+ 4.26554444E-18 3.98475333E-03 1.59708701E-17 2.04593346E-03 0.00000000E+00
+ 8.18402138E-03 0.00000000E+00 9.95848971E-04 4.26554444E-18 3.98475333E-03
+ 1.59708701E-17 2.04593346E-03 0.00000000E+00 8.18402138E-03 0.00000000E+00
+-2.27770981E-04-6.24822253E-10 2.92002098E-08 4.62118784E-14 0.00000000E+00
+-7.44342461E-10 0.00000000E+00 5.43662646E-14 9.95847790E-04 3.80412543E-18
+-5.20699550E-04-1.41675763E-18 2.04592565E-03 0.00000000E+00-1.04786517E-03
+ 0.00000000E+00 9.95847790E-04 3.80412543E-18-5.20699550E-04-1.41675763E-18
+ 2.04592565E-03 0.00000000E+00-1.04786517E-03 0.00000000E+00 0.00000000E+00
+-7.07058392E-10 0.00000000E+00 5.32206124E-14 2.07196130E-04-5.93581114E-10
+-3.01690769E-08 4.39357560E-14-9.98276528E-04 0.00000000E+00-4.76100573E-04
+ 2.50173457E-18-9.98276528E-04 0.00000000E+00-4.76100573E-04 2.50173457E-18
+ 0.00000000E+00 1.59615704E-08 0.00000000E+00 1.07510426E-13-4.78788415E-03
+ 1.33948108E-08-5.93527872E-08 9.01065735E-14 2.04593346E-03 0.00000000E+00
+ 8.18402138E-03 0.00000000E+00 9.95848971E-04-4.26554444E-18 3.98475333E-03
+-1.59708701E-17 2.04593346E-03 0.00000000E+00 8.18402138E-03 0.00000000E+00
+ 9.95848971E-04-4.26554444E-18 3.98475333E-03-1.59708701E-17 0.00000000E+00
+-7.44342461E-10 0.00000000E+00 5.43662646E-14 2.27770981E-04-6.24822253E-10
+-2.92002098E-08 4.62118784E-14 2.04592565E-03 0.00000000E+00-1.04786517E-03
+ 0.00000000E+00 9.95847790E-04-3.80412543E-18-5.20699550E-04 1.41675763E-18
+ 2.04592565E-03 0.00000000E+00-1.04786517E-03 0.00000000E+00 9.95847790E-04
+-3.80412543E-18-5.20699550E-04 1.41675763E-18-1.36424265E-06 1.25717766E-21
+-8.26806837E-09 8.24642932E-24-8.13855135E-05 0.00000000E+00-4.87009031E-07
+ 0.00000000E+00-3.01690769E-08-4.39357560E-14 0.00000000E+00-5.32206124E-14
+-3.01690769E-08-4.39357560E-14 0.00000000E+00-5.32206124E-14 4.42018187E-07
+-4.76749403E-21 2.53095368E-08-5.42617630E-23-3.24461298E-06 0.00000000E+00
+ 1.27432483E-06 0.00000000E+00 2.22481889E-05 6.27122977E-11-5.93527872E-08
+-9.01065735E-14 0.00000000E+00 7.47241280E-11 0.00000000E+00-1.07510426E-13
+ 2.22481889E-05 6.27122977E-11-5.93527872E-08-9.01065735E-14 0.00000000E+00
+ 7.47241280E-11 0.00000000E+00-1.07510426E-13 1.80627310E-06-4.22269426E-21
+-1.07278859E-08 2.66510190E-23 7.81397790E-05 0.00000000E+00-4.68946898E-07
+ 0.00000000E+00-2.29605944E-05-6.37940314E-11-2.92002098E-08-4.62118784E-14
+ 0.00000000E+00-7.60149490E-11 0.00000000E+00-5.43662646E-14-2.29605944E-05
+-6.37940314E-11-2.92002098E-08-4.62118784E-14 0.00000000E+00-7.60149490E-11
+ 0.00000000E+00-5.43662646E-14 2.20677511E-04-2.22842284E-19 1.39505857E-06
+-1.51864099E-21 1.29981872E-02 0.00000000E+00 8.11418015E-05 0.00000000E+00
+ 2.19974859E-04 6.12190746E-10 0.00000000E+00 7.29600947E-10 2.19974859E-04
+ 6.12190746E-10 0.00000000E+00 7.29600947E-10 1.46283271E-03-3.45021393E-18
+ 4.42018187E-07-4.76749403E-21 7.36795879E-02 0.00000000E+00-3.24461298E-06
+ 0.00000000E+00-4.29276622E-03-1.20878074E-08-4.78788415E-03-1.33948108E-08
+ 0.00000000E+00-1.44032962E-08 0.00000000E+00-1.59615704E-08-4.29276622E-03
+-1.20878074E-08-4.78788415E-03-1.33948108E-08 0.00000000E+00-1.44032962E-08
+ 0.00000000E+00-1.59615704E-08 2.86330873E-04-7.03309438E-19-1.77393866E-06
+ 4.60215281E-21 1.25161774E-02 0.00000000E+00-7.83601306E-05 0.00000000E+00
+-4.41165039E-03-1.22683379E-08 2.15402643E-04 6.05248399E-10 0.00000000E+00
+-1.46187193E-08 0.00000000E+00 7.21314530E-10-4.41165039E-03-1.22683379E-08
+ 2.15402643E-04 6.05248399E-10 0.00000000E+00-1.46187193E-08 0.00000000E+00
+ 7.21314530E-10-8.13855135E-05 0.00000000E+00-4.87009031E-07 0.00000000E+00
+-1.36424265E-06-1.25717766E-21-8.26806837E-09-8.24642932E-24 0.00000000E+00
+-5.32206124E-14 3.01690769E-08-4.39357560E-14 0.00000000E+00-5.32206124E-14
+ 3.01690769E-08-4.39357560E-14-3.24461298E-06 0.00000000E+00 1.27432483E-06
+ 0.00000000E+00 4.42018187E-07 4.76749403E-21 2.53095368E-08 5.42617630E-23
+ 0.00000000E+00 7.47241280E-11 0.00000000E+00-1.07510426E-13-2.22481889E-05
+ 6.27122977E-11 5.93527872E-08-9.01065735E-14 0.00000000E+00 7.47241280E-11
+ 0.00000000E+00-1.07510426E-13-2.22481889E-05 6.27122977E-11 5.93527872E-08
+-9.01065735E-14 7.81397790E-05 0.00000000E+00-4.68946898E-07 0.00000000E+00
+ 1.80627310E-06 4.22269426E-21-1.07278859E-08-2.66510190E-23 0.00000000E+00
+-7.60149490E-11 0.00000000E+00-5.43662646E-14 2.29605944E-05-6.37940314E-11
+ 2.92002098E-08-4.62118784E-14 0.00000000E+00-7.60149490E-11 0.00000000E+00
+-5.43662646E-14 2.29605944E-05-6.37940314E-11 2.92002098E-08-4.62118784E-14
+ 4.08515012E-03 1.17983182E-08 2.12679336E-05 6.13455240E-11 0.00000000E+00
+ 1.40468853E-08 0.00000000E+00 7.30414309E-11 8.25099295E-04 2.13808026E-18
+ 1.84922867E-03 0.00000000E+00 3.11437367E-02 7.90831089E-17 1.07743833E-01
+ 0.00000000E+00 4.12826266E-03 1.18558249E-08-2.13923373E-05-6.15114654E-11
+ 0.00000000E+00 1.41189107E-08 0.00000000E+00-7.32492647E-11 6.93351243E-03
+ 3.23746447E-17 9.08554351E-04 5.73751484E-18 1.51854102E-02 0.00000000E+00
+ 1.94718030E-03 0.00000000E+00 2.49431184E-01 8.23739222E-16 3.12142826E-02
+ 1.21747515E-16 8.41809663E-01 0.00000000E+00 1.02743957E-01 0.00000000E+00
+ 1.35322671E-02 0.00000000E+00 8.44676488E-05 0.00000000E+00 1.58166401E-04
+-1.38437490E-19 1.00349453E-06-6.84029931E-22 0.00000000E+00 7.15159044E-10
+-2.11914964E-04 6.00159004E-10 0.00000000E+00 7.15159044E-10-2.11914964E-04
+ 6.00159004E-10 7.66107330E-02 0.00000000E+00-3.59498918E-06 0.00000000E+00
+ 1.09259860E-03 3.99518305E-19 4.20864329E-07 1.70102969E-21 0.00000000E+00
+-1.41189107E-08 0.00000000E+00-1.56460445E-08 4.12826266E-03-1.18558249E-08
+ 4.60900226E-03-1.31343496E-08 0.00000000E+00-1.41189107E-08 0.00000000E+00
+-1.56460445E-08 4.12826266E-03-1.18558249E-08 4.60900226E-03-1.31343496E-08
+ 1.29981872E-02 0.00000000E+00-8.13855135E-05 0.00000000E+00 2.20677511E-04
+ 2.22842284E-19-1.36424265E-06-1.25717766E-21 0.00000000E+00-1.43295207E-08
+ 0.00000000E+00 7.07058392E-10 4.25094497E-03-1.20269034E-08-2.07196130E-04
+ 5.93581114E-10 0.00000000E+00-1.43295207E-08 0.00000000E+00 7.07058392E-10
+ 4.25094497E-03-1.20269034E-08-2.07196130E-04 5.93581114E-10-1.98741655E-04
+-5.82587417E-10 3.11009177E-08 4.14853645E-14 0.00000000E+00-6.93151216E-10
+ 0.00000000E+00 5.19584639E-14-4.33413411E-04-1.96889877E-18-9.49102242E-04
+ 0.00000000E+00-1.55895048E-02-5.02076560E-17-5.26219474E-02 0.00000000E+00
+ 4.60900226E-03 1.31343496E-08 6.12475543E-08 8.53921978E-14 0.00000000E+00
+ 1.56460445E-08 0.00000000E+00 1.05111746E-13 9.08554351E-04 5.73751484E-18
+ 3.63558713E-03 2.11199572E-17 1.94718030E-03 0.00000000E+00 7.78899499E-03
+ 0.00000000E+00 3.12142826E-02 1.21747515E-16 1.24858058E-01 4.48277839E-16
+ 1.02743957E-01 0.00000000E+00 4.11146227E-01 0.00000000E+00-2.19974859E-04
+-6.12190746E-10 3.01690769E-08 4.39357560E-14 0.00000000E+00-7.29600947E-10
+ 0.00000000E+00 5.32206124E-14 9.08553320E-04 5.74139386E-18-4.76100573E-04
+-2.50173457E-18 1.94717265E-03 0.00000000E+00-9.98276528E-04 0.00000000E+00
+ 3.12141924E-02 1.26192557E-16-1.56255086E-02-4.09394313E-17 1.02746784E-01
+ 0.00000000E+00-5.02387473E-02 0.00000000E+00 0.00000000E+00-6.93151216E-10
+ 0.00000000E+00 5.19584639E-14 1.98741655E-04-5.82587417E-10-3.11009177E-08
+ 4.14853645E-14-9.49102242E-04 0.00000000E+00-4.33413411E-04 1.96889877E-18
+-5.26219474E-02 0.00000000E+00-1.55895048E-02 5.02076560E-17 0.00000000E+00
+ 1.56460445E-08 0.00000000E+00 1.05111746E-13-4.60900226E-03 1.31343496E-08
+-6.12475543E-08 8.53921978E-14 1.94718030E-03 0.00000000E+00 7.78899499E-03
+ 0.00000000E+00 9.08554351E-04-5.73751484E-18 3.63558713E-03-2.11199572E-17
+ 1.02743957E-01 0.00000000E+00 4.11146227E-01 0.00000000E+00 3.12142826E-02
+-1.21747515E-16 1.24858058E-01-4.48277839E-16 0.00000000E+00-7.29600947E-10
+ 0.00000000E+00 5.32206124E-14 2.19974859E-04-6.12190746E-10-3.01690769E-08
+ 4.39357560E-14 1.94717265E-03 0.00000000E+00-9.98276528E-04 0.00000000E+00
+ 9.08553320E-04-5.74139386E-18-4.76100573E-04 2.50173457E-18 1.02746784E-01
+ 0.00000000E+00-5.02387473E-02 0.00000000E+00 3.12141924E-02-1.26192557E-16
+-1.56255086E-02 4.09394313E-17-1.98741655E-04-5.82587417E-10 3.11009177E-08
+ 4.14853645E-14 0.00000000E+00-6.93151216E-10 0.00000000E+00 5.19584639E-14
+-4.33413411E-04-1.96889877E-18-9.49102242E-04 0.00000000E+00-4.33413411E-04
+-1.96889877E-18-9.49102242E-04 0.00000000E+00 4.60900226E-03 1.31343496E-08
+ 6.12475543E-08 8.53921978E-14 0.00000000E+00 1.56460445E-08 0.00000000E+00
+ 1.05111746E-13 9.08554351E-04 5.73751484E-18 3.63558713E-03 2.11199572E-17
+ 1.94718030E-03 0.00000000E+00 7.78899499E-03 0.00000000E+00 9.08554351E-04
+ 5.73751484E-18 3.63558713E-03 2.11199572E-17 1.94718030E-03 0.00000000E+00
+ 7.78899499E-03 0.00000000E+00-2.19974859E-04-6.12190746E-10 3.01690769E-08
+ 4.39357560E-14 0.00000000E+00-7.29600947E-10 0.00000000E+00 5.32206124E-14
+ 9.08553320E-04 5.74139386E-18-4.76100573E-04-2.50173457E-18 1.94717265E-03
+ 0.00000000E+00-9.98276528E-04 0.00000000E+00 9.08553320E-04 5.74139386E-18
+-4.76100573E-04-2.50173457E-18 1.94717265E-03 0.00000000E+00-9.98276528E-04
+ 0.00000000E+00 0.00000000E+00-6.93151216E-10 0.00000000E+00 5.19584639E-14
+ 1.98741655E-04-5.82587417E-10-3.11009177E-08 4.14853645E-14-9.49102242E-04
+ 0.00000000E+00-4.33413411E-04 1.96889877E-18-9.49102242E-04 0.00000000E+00
+-4.33413411E-04 1.96889877E-18 0.00000000E+00 1.56460445E-08 0.00000000E+00
+ 1.05111746E-13-4.60900226E-03 1.31343496E-08-6.12475543E-08 8.53921978E-14
+ 1.94718030E-03 0.00000000E+00 7.78899499E-03 0.00000000E+00 9.08554351E-04
+-5.73751484E-18 3.63558713E-03-2.11199572E-17 1.94718030E-03 0.00000000E+00
+ 7.78899499E-03 0.00000000E+00 9.08554351E-04-5.73751484E-18 3.63558713E-03
+-2.11199572E-17 0.00000000E+00-7.29600947E-10 0.00000000E+00 5.32206124E-14
+ 2.19974859E-04-6.12190746E-10-3.01690769E-08 4.39357560E-14 1.94717265E-03
+ 0.00000000E+00-9.98276528E-04 0.00000000E+00 9.08553320E-04-5.74139386E-18
+-4.76100573E-04 2.50173457E-18 1.94717265E-03 0.00000000E+00-9.98276528E-04
+ 0.00000000E+00 9.08553320E-04-5.74139386E-18-4.76100573E-04 2.50173457E-18
+-9.74181797E-07-1.04121684E-21-5.92595622E-09-5.13084454E-24-8.47381769E-05
+ 0.00000000E+00-5.07022245E-07 0.00000000E+00-3.11009177E-08-4.14853645E-14
+ 0.00000000E+00-5.19584639E-14-3.11009177E-08-4.14853645E-14 0.00000000E+00
+-5.19584639E-14 4.20864329E-07-1.70102969E-21 1.89071502E-08-5.53760052E-24
+-3.59498918E-06 0.00000000E+00 1.32505010E-06 0.00000000E+00 2.13923373E-05
+ 6.15114654E-11-6.12475543E-08-8.53921978E-14 0.00000000E+00 7.32492647E-11
+ 0.00000000E+00-1.05111746E-13 2.13923373E-05 6.15114654E-11-6.12475543E-08
+-8.53921978E-14 0.00000000E+00 7.32492647E-11 0.00000000E+00-1.05111746E-13
+ 1.39505857E-06-1.51864099E-21-8.26806837E-09 8.24642932E-24 8.11418015E-05
+ 0.00000000E+00-4.87009031E-07 0.00000000E+00-2.21275126E-05-6.25365547E-11
+-3.01690769E-08-4.39357560E-14 0.00000000E+00-7.45112456E-11 0.00000000E+00
+-5.32206124E-14-2.21275126E-05-6.25365547E-11-3.01690769E-08-4.39357560E-14
+ 0.00000000E+00-7.45112456E-11 0.00000000E+00-5.32206124E-14 1.58166401E-04
+ 1.38437490E-19 1.00349453E-06 6.84029931E-22 1.35322671E-02 0.00000000E+00
+ 8.44676488E-05 0.00000000E+00 2.11914964E-04 6.00159004E-10 0.00000000E+00
+ 7.15159044E-10 2.11914964E-04 6.00159004E-10 0.00000000E+00 7.15159044E-10
+ 1.09259860E-03-3.99518305E-19 4.20864329E-07-1.70102969E-21 7.66107330E-02
+ 0.00000000E+00-3.59498918E-06 0.00000000E+00-4.12826266E-03-1.18558249E-08
+-4.60900226E-03-1.31343496E-08 0.00000000E+00-1.41189107E-08 0.00000000E+00
+-1.56460445E-08-4.12826266E-03-1.18558249E-08-4.60900226E-03-1.31343496E-08
+ 0.00000000E+00-1.41189107E-08 0.00000000E+00-1.56460445E-08 2.20677511E-04
+-2.22842284E-19-1.36424265E-06 1.25717766E-21 1.29981872E-02 0.00000000E+00
+-8.13855135E-05 0.00000000E+00-4.25094497E-03-1.20269034E-08 2.07196130E-04
+ 5.93581114E-10 0.00000000E+00-1.43295207E-08 0.00000000E+00 7.07058392E-10
+-4.25094497E-03-1.20269034E-08 2.07196130E-04 5.93581114E-10 0.00000000E+00
+-1.43295207E-08 0.00000000E+00 7.07058392E-10-8.47381769E-05 0.00000000E+00
+-5.07022245E-07 0.00000000E+00-9.74181797E-07 1.04121684E-21-5.92595622E-09
+ 5.13084454E-24 0.00000000E+00-5.19584639E-14 3.11009177E-08-4.14853645E-14
+ 0.00000000E+00-5.19584639E-14 3.11009177E-08-4.14853645E-14-3.59498918E-06
+ 0.00000000E+00 1.32505010E-06 0.00000000E+00 4.20864329E-07 1.70102969E-21
+ 1.89071502E-08 5.53760052E-24 0.00000000E+00 7.32492647E-11 0.00000000E+00
+-1.05111746E-13-2.13923373E-05 6.15114654E-11 6.12475543E-08-8.53921978E-14
+ 0.00000000E+00 7.32492647E-11 0.00000000E+00-1.05111746E-13-2.13923373E-05
+ 6.15114654E-11 6.12475543E-08-8.53921978E-14 8.11418015E-05 0.00000000E+00
+-4.87009031E-07 0.00000000E+00 1.39505857E-06 1.51864099E-21-8.26806837E-09
+-8.24642932E-24 0.00000000E+00-7.45112456E-11 0.00000000E+00-5.32206124E-14
+ 2.21275126E-05-6.25365547E-11 3.01690769E-08-4.39357560E-14 0.00000000E+00
+-7.45112456E-11 0.00000000E+00-5.32206124E-14 2.21275126E-05-6.25365547E-11
+ 3.01690769E-08-4.39357560E-14 0.00000000E+00 1.40468853E-08 0.00000000E+00
+ 7.30414309E-11-4.08515012E-03 1.17983182E-08-2.12679336E-05 6.13455240E-11
+ 1.84922867E-03 0.00000000E+00 8.25099295E-04-2.13808026E-18 1.84922867E-03
+ 0.00000000E+00 8.25099295E-04-2.13808026E-18 0.00000000E+00 1.41189107E-08
+ 0.00000000E+00-7.32492647E-11-4.12826266E-03 1.18558249E-08 2.13923373E-05
+-6.15114654E-11 1.51854102E-02 0.00000000E+00 1.94718030E-03 0.00000000E+00
+ 6.93351243E-03-3.23746447E-17 9.08554351E-04-5.73751484E-18 1.51854102E-02
+ 0.00000000E+00 1.94718030E-03 0.00000000E+00 6.93351243E-03-3.23746447E-17
+ 9.08554351E-04-5.73751484E-18 4.08515012E-03 1.17983182E-08 2.12679336E-05
+ 6.13455240E-11 0.00000000E+00 1.40468853E-08 0.00000000E+00 7.30414309E-11
+ 8.25099295E-04 2.13808026E-18 1.84922867E-03 0.00000000E+00 8.25099295E-04
+ 2.13808026E-18 1.84922867E-03 0.00000000E+00 4.12826266E-03 1.18558249E-08
+-2.13923373E-05-6.15114654E-11 0.00000000E+00 1.41189107E-08 0.00000000E+00
+-7.32492647E-11 6.93351243E-03 3.23746447E-17 9.08554351E-04 5.73751484E-18
+ 1.51854102E-02 0.00000000E+00 1.94718030E-03 0.00000000E+00 6.93351243E-03
+ 3.23746447E-17 9.08554351E-04 5.73751484E-18 1.51854102E-02 0.00000000E+00
+ 1.94718030E-03 0.00000000E+00 0.00000000E+00 1.40468853E-08 0.00000000E+00
+ 7.30414309E-11-4.08515012E-03 1.17983182E-08-2.12679336E-05 6.13455240E-11
+ 1.84922867E-03 0.00000000E+00 8.25099295E-04-2.13808026E-18 1.07743833E-01
+ 0.00000000E+00 3.11437367E-02-7.90831089E-17 0.00000000E+00 1.41189107E-08
+ 0.00000000E+00-7.32492647E-11-4.12826266E-03 1.18558249E-08 2.13923373E-05
+-6.15114654E-11 1.51854102E-02 0.00000000E+00 1.94718030E-03 0.00000000E+00
+ 6.93351243E-03-3.23746447E-17 9.08554351E-04-5.73751484E-18 8.41809663E-01
+ 0.00000000E+00 1.02743957E-01 0.00000000E+00 2.49431184E-01-8.23739222E-16
+ 3.12142826E-02-1.21747515E-16 1.47902400E-02 0.00000000E+00 9.22992794E-05
+ 0.00000000E+00 4.24401357E-05 1.09801840E-18 2.78497228E-07 6.73284424E-21
+ 0.00000000E+00 6.87298010E-10-1.95044666E-04 5.78080161E-10 0.00000000E+00
+ 6.87298010E-10-1.95044666E-04 5.78080161E-10 8.34925839E-02 0.00000000E+00
+-4.46820848E-06 0.00000000E+00 4.06106333E-04 2.83643359E-18 3.79212329E-07
+-1.03438315E-20 0.00000000E+00-1.35721818E-08 0.00000000E+00-1.50382976E-08
+ 3.78481071E-03-1.14339307E-08 4.23501993E-03-1.26582949E-08 0.00000000E+00
+-1.35721818E-08 0.00000000E+00-1.50382976E-08 3.78481071E-03-1.14339307E-08
+ 4.23501993E-03-1.26582949E-08 1.41263674E-02 0.00000000E+00-8.84682196E-05
+ 0.00000000E+00 9.87625279E-05-2.68239386E-19-6.03536231E-07 1.39113583E-21
+ 0.00000000E+00-1.37715204E-08 0.00000000E+00 6.79632666E-10 3.91451593E-03
+-1.15836412E-08-1.90055869E-04 5.72326723E-10 0.00000000E+00-1.37715204E-08
+ 0.00000000E+00 6.79632666E-10 3.91451593E-03-1.15836412E-08-1.90055869E-04
+ 5.72326723E-10-1.81150365E-04-5.62871447E-10 3.28032585E-08 3.59076205E-14
+ 0.00000000E+00-6.66550967E-10 0.00000000E+00 4.89825262E-14-3.53838664E-04
+-1.19874041E-18-8.51917043E-04 0.00000000E+00-1.55222111E-02-4.06153673E-17
+-5.81740847E-02 0.00000000E+00 4.23501993E-03 1.26582949E-08 6.47577476E-08
+ 7.47367728E-14 0.00000000E+00 1.50382976E-08 0.00000000E+00 9.94952174E-14
+ 7.45517793E-04 2.53812162E-18 2.98346350E-03 8.70731385E-18 1.75206054E-03
+ 0.00000000E+00 7.00848874E-03 0.00000000E+00 3.10765226E-02 5.64284492E-17
+ 1.24307051E-01 2.43899722E-16 1.13269851E-01 0.00000000E+00 4.53310505E-01
+ 0.00000000E+00-2.03598858E-04-5.88771117E-10 3.19735630E-08 3.88245308E-14
+ 0.00000000E+00-7.01046243E-10 0.00000000E+00 5.05558018E-14 7.45517145E-04
+ 1.93232118E-18-3.92654312E-04-8.60863394E-19 1.75205353E-03 0.00000000E+00
+-9.00322371E-04 0.00000000E+00 3.10764326E-02 5.37289317E-17-1.55550648E-02
+-3.09519654E-17 1.13274191E-01 0.00000000E+00-5.52536338E-02 0.00000000E+00
+ 0.00000000E+00-6.66550967E-10 0.00000000E+00 4.89825262E-14 1.81150365E-04
+-5.62871447E-10-3.28032585E-08 3.59076205E-14-8.51917043E-04 0.00000000E+00
+-3.53838664E-04 1.19874041E-18-5.81740847E-02 0.00000000E+00-1.55222111E-02
+ 4.06153673E-17 0.00000000E+00 1.50382976E-08 0.00000000E+00 9.94952174E-14
+-4.23501993E-03 1.26582949E-08-6.47577476E-08 7.47367728E-14 1.75206054E-03
+ 0.00000000E+00 7.00848874E-03 0.00000000E+00 7.45517793E-04-2.53812162E-18
+ 2.98346350E-03-8.70731385E-18 1.13269851E-01 0.00000000E+00 4.53310505E-01
+ 0.00000000E+00 3.10765226E-02-5.64284492E-17 1.24307051E-01-2.43899722E-16
+ 0.00000000E+00-7.01046243E-10 0.00000000E+00 5.05558018E-14 2.03598858E-04
+-5.88771117E-10-3.19735630E-08 3.88245308E-14 1.75205353E-03 0.00000000E+00
+-9.00322371E-04 0.00000000E+00 7.45517145E-04-1.93232118E-18-3.92654312E-04
+ 8.60863394E-19 1.13274191E-01 0.00000000E+00-5.52536338E-02 0.00000000E+00
+ 3.10764326E-02-5.37289317E-17-1.55550648E-02 3.09519654E-17-1.81150365E-04
+-5.62871447E-10 3.28032585E-08 3.59076205E-14 0.00000000E+00-6.66550967E-10
+ 0.00000000E+00 4.89825262E-14-3.53838664E-04-1.19874041E-18-8.51917043E-04
+ 0.00000000E+00-3.53838664E-04-1.19874041E-18-8.51917043E-04 0.00000000E+00
+ 4.23501993E-03 1.26582949E-08 6.47577476E-08 7.47367728E-14 0.00000000E+00
+ 1.50382976E-08 0.00000000E+00 9.94952174E-14 7.45517793E-04 2.53812162E-18
+ 2.98346350E-03 8.70731385E-18 1.75206054E-03 0.00000000E+00 7.00848874E-03
+ 0.00000000E+00 7.45517793E-04 2.53812162E-18 2.98346350E-03 8.70731385E-18
+ 1.75206054E-03 0.00000000E+00 7.00848874E-03 0.00000000E+00-2.03598858E-04
+-5.88771117E-10 3.19735630E-08 3.88245308E-14 0.00000000E+00-7.01046243E-10
+ 0.00000000E+00 5.05558018E-14 7.45517145E-04 1.93232118E-18-3.92654312E-04
+-8.60863394E-19 1.75205353E-03 0.00000000E+00-9.00322371E-04 0.00000000E+00
+ 7.45517145E-04 1.93232118E-18-3.92654312E-04-8.60863394E-19 1.75205353E-03
+ 0.00000000E+00-9.00322371E-04 0.00000000E+00 0.00000000E+00-6.66550967E-10
+ 0.00000000E+00 4.89825262E-14 1.81150365E-04-5.62871447E-10-3.28032585E-08
+ 3.59076205E-14-8.51917043E-04 0.00000000E+00-3.53838664E-04 1.19874041E-18
+-8.51917043E-04 0.00000000E+00-3.53838664E-04 1.19874041E-18 0.00000000E+00
+ 1.50382976E-08 0.00000000E+00 9.94952174E-14-4.23501993E-03 1.26582949E-08
+-6.47577476E-08 7.47367728E-14 1.75206054E-03 0.00000000E+00 7.00848874E-03
+ 0.00000000E+00 7.45517793E-04-2.53812162E-18 2.98346350E-03-8.70731385E-18
+ 1.75206054E-03 0.00000000E+00 7.00848874E-03 0.00000000E+00 7.45517793E-04
+-2.53812162E-18 2.98346350E-03-8.70731385E-18 0.00000000E+00-7.01046243E-10
+ 0.00000000E+00 5.05558018E-14 2.03598858E-04-5.88771117E-10-3.19735630E-08
+ 3.88245308E-14 1.75205353E-03 0.00000000E+00-9.00322371E-04 0.00000000E+00
+ 7.45517145E-04-1.93232118E-18-3.92654312E-04 8.60863394E-19 1.75205353E-03
+ 0.00000000E+00-9.00322371E-04 0.00000000E+00 7.45517145E-04-1.93232118E-18
+-3.92654312E-04 8.60863394E-19-2.52151547E-07 7.01480269E-21-1.58994964E-09
+ 4.13167003E-23-9.26370669E-05 0.00000000E+00-5.54160978E-07 0.00000000E+00
+-3.28032585E-08-3.59076205E-14 0.00000000E+00-4.89825262E-14-3.28032585E-08
+-3.59076205E-14 0.00000000E+00-4.89825262E-14 3.79212329E-07 1.03438315E-20
+ 7.03563362E-09-4.54808695E-23-4.46820848E-06 0.00000000E+00 1.44415519E-06
+ 0.00000000E+00 1.96058431E-05 5.93293506E-11-6.47577476E-08-7.47367728E-14
+ 0.00000000E+00 7.04147030E-11 0.00000000E+00-9.94952174E-14 1.96058431E-05
+ 5.93293506E-11-6.47577476E-08-7.47367728E-14 0.00000000E+00 7.04147030E-11
+ 0.00000000E+00-9.94952174E-14 6.31363271E-07 1.98195865E-21-3.70023844E-09
+-1.02358979E-23 8.81666361E-05 0.00000000E+00-5.29284424E-07 0.00000000E+00
+-2.03831153E-05-6.02263797E-11-3.19735630E-08-3.88245308E-14 0.00000000E+00
+-7.16091402E-11 0.00000000E+00-5.05558018E-14-2.03831153E-05-6.02263797E-11
+-3.19735630E-08-3.88245308E-14 0.00000000E+00-7.16091402E-11 0.00000000E+00
+-5.05558018E-14 4.24401357E-05-1.09801840E-18 2.78497228E-07-6.73284424E-21
+ 1.47902400E-02 0.00000000E+00 9.22992794E-05 0.00000000E+00 1.95044666E-04
+ 5.78080161E-10 0.00000000E+00 6.87298010E-10 1.95044666E-04 5.78080161E-10
+ 0.00000000E+00 6.87298010E-10 4.06106333E-04-2.83643359E-18 3.79212329E-07
+ 1.03438315E-20 8.34925839E-02 0.00000000E+00-4.46820848E-06 0.00000000E+00
+-3.78481071E-03-1.14339307E-08-4.23501993E-03-1.26582949E-08 0.00000000E+00
+-1.35721818E-08 0.00000000E+00-1.50382976E-08-3.78481071E-03-1.14339307E-08
+-4.23501993E-03-1.26582949E-08 0.00000000E+00-1.35721818E-08 0.00000000E+00
+-1.50382976E-08 9.87625279E-05 2.68239386E-19-6.03536231E-07-1.39113583E-21
+ 1.41263674E-02 0.00000000E+00-8.84682196E-05 0.00000000E+00-3.91451593E-03
+-1.15836412E-08 1.90055869E-04 5.72326723E-10 0.00000000E+00-1.37715204E-08
+ 0.00000000E+00 6.79632666E-10-3.91451593E-03-1.15836412E-08 1.90055869E-04
+ 5.72326723E-10 0.00000000E+00-1.37715204E-08 0.00000000E+00 6.79632666E-10
+-9.26370669E-05 0.00000000E+00-5.54160978E-07 0.00000000E+00-2.52151547E-07
+-7.01480269E-21-1.58994964E-09-4.13167003E-23 0.00000000E+00-4.89825262E-14
+ 3.28032585E-08-3.59076205E-14 0.00000000E+00-4.89825262E-14 3.28032585E-08
+-3.59076205E-14-4.46820848E-06 0.00000000E+00 1.44415519E-06 0.00000000E+00
+ 3.79212329E-07-1.03438315E-20 7.03563362E-09 4.54808695E-23 0.00000000E+00
+ 7.04147030E-11 0.00000000E+00-9.94952174E-14-1.96058431E-05 5.93293506E-11
+ 6.47577476E-08-7.47367728E-14 0.00000000E+00 7.04147030E-11 0.00000000E+00
+-9.94952174E-14-1.96058431E-05 5.93293506E-11 6.47577476E-08-7.47367728E-14
+ 8.81666361E-05 0.00000000E+00-5.29284424E-07 0.00000000E+00 6.31363271E-07
+-1.98195865E-21-3.70023844E-09 1.02358979E-23 0.00000000E+00-7.16091402E-11
+ 0.00000000E+00-5.05558018E-14 2.03831153E-05-6.02263797E-11 3.19735630E-08
+-3.88245308E-14 0.00000000E+00-7.16091402E-11 0.00000000E+00-5.05558018E-14
+ 2.03831153E-05-6.02263797E-11 3.19735630E-08-3.88245308E-14 1.41263674E-02
+ 0.00000000E+00 8.81666361E-05 0.00000000E+00 9.87625279E-05-2.68239386E-19
+ 6.31363271E-07-1.98195865E-21 0.00000000E+00 7.01046243E-10-2.03598858E-04
+ 5.88771117E-10 0.00000000E+00 7.01046243E-10-2.03598858E-04 5.88771117E-10
+ 7.98647335E-02 0.00000000E+00-3.99877596E-06 0.00000000E+00 7.40421380E-04
+-2.41283213E-18 3.99947940E-07 1.82900681E-21 0.00000000E+00-1.38416010E-08
+ 0.00000000E+00-1.53380087E-08 3.95883840E-03-1.16374589E-08 4.42460317E-03
+-1.28884278E-08 0.00000000E+00-1.38416010E-08 0.00000000E+00-1.53380087E-08
+ 3.95883840E-03-1.16374589E-08 4.42460317E-03-1.28884278E-08 1.35322671E-02
+ 0.00000000E+00-8.47381769E-05 0.00000000E+00 1.58166401E-04-1.38437490E-19
+-9.74181797E-07 1.04121684E-21 0.00000000E+00-1.40468853E-08 0.00000000E+00
+ 6.93151216E-10 4.08515012E-03-1.17983182E-08-1.98741655E-04 5.82587417E-10
+ 0.00000000E+00-1.40468853E-08 0.00000000E+00 6.93151216E-10 4.08515012E-03
+-1.17983182E-08-1.98741655E-04 5.82587417E-10-1.90055869E-04-5.72326723E-10
+ 3.19735630E-08 3.88245308E-14 0.00000000E+00-6.79632666E-10 0.00000000E+00
+ 5.05558018E-14-3.92654312E-04-8.60863394E-19-9.00322371E-04 0.00000000E+00
+-1.55550648E-02-3.09519654E-17-5.52536338E-02 0.00000000E+00 4.42460317E-03
+ 1.28884278E-08 6.30678974E-08 8.02958786E-14 0.00000000E+00 1.53380087E-08
+ 0.00000000E+00 1.02457764E-13 8.25100105E-04 1.51113240E-18 3.30178179E-03
+ 8.74338825E-18 1.84923596E-03 0.00000000E+00 7.39720404E-03 0.00000000E+00
+ 3.11438266E-02 7.00789299E-17 1.24576252E-01 3.07803770E-16 1.07740344E-01
+ 0.00000000E+00 4.31159054E-01 0.00000000E+00-2.11914964E-04-6.00159004E-10
+ 3.11009177E-08 4.14853645E-14 0.00000000E+00-7.15159044E-10 0.00000000E+00
+ 5.19584639E-14 8.25099295E-04 2.13808026E-18-4.33413411E-04-1.96889877E-18
+ 1.84922867E-03 0.00000000E+00-9.49102242E-04 0.00000000E+00 3.11437367E-02
+ 7.90831089E-17-1.55895048E-02-5.02076560E-17 1.07743833E-01 0.00000000E+00
+-5.26219474E-02 0.00000000E+00 0.00000000E+00-6.79632666E-10 0.00000000E+00
+ 5.05558018E-14 1.90055869E-04-5.72326723E-10-3.19735630E-08 3.88245308E-14
+-9.00322371E-04 0.00000000E+00-3.92654312E-04 8.60863394E-19-5.52536338E-02
+ 0.00000000E+00-1.55550648E-02 3.09519654E-17 0.00000000E+00 1.53380087E-08
+ 0.00000000E+00 1.02457764E-13-4.42460317E-03 1.28884278E-08-6.30678974E-08
+ 8.02958786E-14 1.84923596E-03 0.00000000E+00 7.39720404E-03 0.00000000E+00
+ 8.25100105E-04-1.51113240E-18 3.30178179E-03-8.74338825E-18 1.07740344E-01
+ 0.00000000E+00 4.31159054E-01 0.00000000E+00 3.11438266E-02-7.00789299E-17
+ 1.24576252E-01-3.07803770E-16 0.00000000E+00-7.15159044E-10 0.00000000E+00
+ 5.19584639E-14 2.11914964E-04-6.00159004E-10-3.11009177E-08 4.14853645E-14
+ 1.84922867E-03 0.00000000E+00-9.49102242E-04 0.00000000E+00 8.25099295E-04
+-2.13808026E-18-4.33413411E-04 1.96889877E-18 1.07743833E-01 0.00000000E+00
+-5.26219474E-02 0.00000000E+00 3.11437367E-02-7.90831089E-17-1.55895048E-02
+ 5.02076560E-17-1.90055869E-04-5.72326723E-10 3.19735630E-08 3.88245308E-14
+ 0.00000000E+00-6.79632666E-10 0.00000000E+00 5.05558018E-14-3.92654312E-04
+-8.60863394E-19-9.00322371E-04 0.00000000E+00-3.92654312E-04-8.60863394E-19
+-9.00322371E-04 0.00000000E+00 4.42460317E-03 1.28884278E-08 6.30678974E-08
+ 8.02958786E-14 0.00000000E+00 1.53380087E-08 0.00000000E+00 1.02457764E-13
+ 8.25100105E-04 1.51113240E-18 3.30178179E-03 8.74338825E-18 1.84923596E-03
+ 0.00000000E+00 7.39720404E-03 0.00000000E+00 8.25100105E-04 1.51113240E-18
+ 3.30178179E-03 8.74338825E-18 1.84923596E-03 0.00000000E+00 7.39720404E-03
+ 0.00000000E+00-2.11914964E-04-6.00159004E-10 3.11009177E-08 4.14853645E-14
+ 0.00000000E+00-7.15159044E-10 0.00000000E+00 5.19584639E-14 8.25099295E-04
+ 2.13808026E-18-4.33413411E-04-1.96889877E-18 1.84922867E-03 0.00000000E+00
+-9.49102242E-04 0.00000000E+00 8.25099295E-04 2.13808026E-18-4.33413411E-04
+-1.96889877E-18 1.84922867E-03 0.00000000E+00-9.49102242E-04 0.00000000E+00
+ 0.00000000E+00-6.79632666E-10 0.00000000E+00 5.05558018E-14 1.90055869E-04
+-5.72326723E-10-3.19735630E-08 3.88245308E-14-9.00322371E-04 0.00000000E+00
+-3.92654312E-04 8.60863394E-19-9.00322371E-04 0.00000000E+00-3.92654312E-04
+ 8.60863394E-19 0.00000000E+00 1.53380087E-08 0.00000000E+00 1.02457764E-13
+-4.42460317E-03 1.28884278E-08-6.30678974E-08 8.02958786E-14 1.84923596E-03
+ 0.00000000E+00 7.39720404E-03 0.00000000E+00 8.25100105E-04-1.51113240E-18
+ 3.30178179E-03-8.74338825E-18 1.84923596E-03 0.00000000E+00 7.39720404E-03
+ 0.00000000E+00 8.25100105E-04-1.51113240E-18 3.30178179E-03-8.74338825E-18
+ 0.00000000E+00-7.15159044E-10 0.00000000E+00 5.19584639E-14 2.11914964E-04
+-6.00159004E-10-3.11009177E-08 4.14853645E-14 1.84922867E-03 0.00000000E+00
+-9.49102242E-04 0.00000000E+00 8.25099295E-04-2.13808026E-18-4.33413411E-04
+ 1.96889877E-18 1.84922867E-03 0.00000000E+00-9.49102242E-04 0.00000000E+00
+ 8.25099295E-04-2.13808026E-18-4.33413411E-04 1.96889877E-18-6.03536231E-07
+-1.39113583E-21-3.70023844E-09-1.02358979E-23-8.84682196E-05 0.00000000E+00
+-5.29284424E-07 0.00000000E+00-3.19735630E-08-3.88245308E-14 0.00000000E+00
+-5.05558018E-14-3.19735630E-08-3.88245308E-14 0.00000000E+00-5.05558018E-14
+ 3.99947940E-07-1.82900681E-21 1.28169235E-08 3.24107635E-23-3.99877596E-06
+ 0.00000000E+00 1.38136591E-06 0.00000000E+00 2.05110095E-05 6.03816778E-11
+-6.30678974E-08-8.02958786E-14 0.00000000E+00 7.18113634E-11 0.00000000E+00
+-1.02457764E-13 2.05110095E-05 6.03816778E-11-6.30678974E-08-8.02958786E-14
+ 0.00000000E+00 7.18113634E-11 0.00000000E+00-1.02457764E-13 1.00349453E-06
+ 6.84029931E-22-5.92595622E-09-5.13084454E-24 8.44676488E-05 0.00000000E+00
+-5.07022245E-07 0.00000000E+00-2.12679336E-05-6.13455240E-11-3.11009177E-08
+-4.14853645E-14 0.00000000E+00-7.30414309E-11 0.00000000E+00-5.19584639E-14
+-2.12679336E-05-6.13455240E-11-3.11009177E-08-4.14853645E-14 0.00000000E+00
+-7.30414309E-11 0.00000000E+00-5.19584639E-14 9.87625279E-05 2.68239386E-19
+ 6.31363271E-07 1.98195865E-21 1.41263674E-02 0.00000000E+00 8.81666361E-05
+ 0.00000000E+00 2.03598858E-04 5.88771117E-10 0.00000000E+00 7.01046243E-10
+ 2.03598858E-04 5.88771117E-10 0.00000000E+00 7.01046243E-10 7.40421380E-04
+ 2.41283213E-18 3.99947940E-07-1.82900681E-21 7.98647335E-02 0.00000000E+00
+-3.99877596E-06 0.00000000E+00-3.95883840E-03-1.16374589E-08-4.42460317E-03
+-1.28884278E-08 0.00000000E+00-1.38416010E-08 0.00000000E+00-1.53380087E-08
+-3.95883840E-03-1.16374589E-08-4.42460317E-03-1.28884278E-08 0.00000000E+00
+-1.38416010E-08 0.00000000E+00-1.53380087E-08 1.58166401E-04 1.38437490E-19
+-9.74181797E-07-1.04121684E-21 1.35322671E-02 0.00000000E+00-8.47381769E-05
+ 0.00000000E+00-4.08515012E-03-1.17983182E-08 1.98741655E-04 5.82587417E-10
+ 0.00000000E+00-1.40468853E-08 0.00000000E+00 6.93151216E-10-4.08515012E-03
+-1.17983182E-08 1.98741655E-04 5.82587417E-10 0.00000000E+00-1.40468853E-08
+ 0.00000000E+00 6.93151216E-10-8.84682196E-05 0.00000000E+00-5.29284424E-07
+ 0.00000000E+00-6.03536231E-07 1.39113583E-21-3.70023844E-09 1.02358979E-23
+ 0.00000000E+00-5.05558018E-14 3.19735630E-08-3.88245308E-14 0.00000000E+00
+-5.05558018E-14 3.19735630E-08-3.88245308E-14-3.99877596E-06 0.00000000E+00
+ 1.38136591E-06 0.00000000E+00 3.99947940E-07 1.82900681E-21 1.28169235E-08
+-3.24107635E-23 0.00000000E+00 7.18113634E-11 0.00000000E+00-1.02457764E-13
+-2.05110095E-05 6.03816778E-11 6.30678974E-08-8.02958786E-14 0.00000000E+00
+ 7.18113634E-11 0.00000000E+00-1.02457764E-13-2.05110095E-05 6.03816778E-11
+ 6.30678974E-08-8.02958786E-14 8.44676488E-05 0.00000000E+00-5.07022245E-07
+ 0.00000000E+00 1.00349453E-06-6.84029931E-22-5.92595622E-09 5.13084454E-24
+ 0.00000000E+00-7.30414309E-11 0.00000000E+00-5.19584639E-14 2.12679336E-05
+-6.13455240E-11 3.11009177E-08-4.14853645E-14 0.00000000E+00-7.30414309E-11
+ 0.00000000E+00-5.19584639E-14 2.12679336E-05-6.13455240E-11 3.11009177E-08
+-4.14853645E-14 3.91451593E-03 1.15836412E-08 2.03831153E-05 6.02263797E-11
+ 0.00000000E+00 1.37715204E-08 0.00000000E+00 7.16091402E-11 7.45517145E-04
+ 1.93232118E-18 1.75205353E-03 0.00000000E+00 3.10764326E-02 5.37289317E-17
+ 1.13274191E-01 0.00000000E+00 3.95883840E-03 1.16374589E-08-2.05110095E-05
+-6.03816778E-11 0.00000000E+00 1.38416010E-08 0.00000000E+00-7.18113634E-11
+ 6.28135815E-03 1.19431478E-17 8.25100105E-04 1.51113240E-18 1.44049436E-02
+ 0.00000000E+00 1.84923596E-03 0.00000000E+00 2.48880130E-01 4.69783448E-16
+ 3.11438266E-02 7.00789299E-17 8.83893766E-01 0.00000000E+00 1.07740344E-01
+ 0.00000000E+00 0.00000000E+00 1.37715204E-08 0.00000000E+00 7.16091402E-11
+-3.91451593E-03 1.15836412E-08-2.03831153E-05 6.02263797E-11 1.75205353E-03
+ 0.00000000E+00 7.45517145E-04-1.93232118E-18 1.75205353E-03 0.00000000E+00
+ 7.45517145E-04-1.93232118E-18 0.00000000E+00 1.38416010E-08 0.00000000E+00
+-7.18113634E-11-3.95883840E-03 1.16374589E-08 2.05110095E-05-6.03816778E-11
+ 1.44049436E-02 0.00000000E+00 1.84923596E-03 0.00000000E+00 6.28135815E-03
+-1.19431478E-17 8.25100105E-04-1.51113240E-18 1.44049436E-02 0.00000000E+00
+ 1.84923596E-03 0.00000000E+00 6.28135815E-03-1.19431478E-17 8.25100105E-04
+-1.51113240E-18 3.91451593E-03 1.15836412E-08 2.03831153E-05 6.02263797E-11
+ 0.00000000E+00 1.37715204E-08 0.00000000E+00 7.16091402E-11 7.45517145E-04
+ 1.93232118E-18 1.75205353E-03 0.00000000E+00 7.45517145E-04 1.93232118E-18
+ 1.75205353E-03 0.00000000E+00 3.95883840E-03 1.16374589E-08-2.05110095E-05
+-6.03816778E-11 0.00000000E+00 1.38416010E-08 0.00000000E+00-7.18113634E-11
+ 6.28135815E-03 1.19431478E-17 8.25100105E-04 1.51113240E-18 1.44049436E-02
+ 0.00000000E+00 1.84923596E-03 0.00000000E+00 6.28135815E-03 1.19431478E-17
+ 8.25100105E-04 1.51113240E-18 1.44049436E-02 0.00000000E+00 1.84923596E-03
+ 0.00000000E+00 0.00000000E+00 1.37715204E-08 0.00000000E+00 7.16091402E-11
+-3.91451593E-03 1.15836412E-08-2.03831153E-05 6.02263797E-11 1.75205353E-03
+ 0.00000000E+00 7.45517145E-04-1.93232118E-18 1.13274191E-01 0.00000000E+00
+ 3.10764326E-02-5.37289317E-17 0.00000000E+00 1.38416010E-08 0.00000000E+00
+-7.18113634E-11-3.95883840E-03 1.16374589E-08 2.05110095E-05-6.03816778E-11
+ 1.44049436E-02 0.00000000E+00 1.84923596E-03 0.00000000E+00 6.28135815E-03
+-1.19431478E-17 8.25100105E-04-1.51113240E-18 8.83893766E-01 0.00000000E+00
+ 1.07740344E-01 0.00000000E+00 2.48880130E-01-4.69783448E-16 3.11438266E-02
+-7.00789299E-17
\ No newline at end of file
diff --git a/EXAMPLE/dlinsol.c b/EXAMPLE/dlinsol.c
new file mode 100644
index 0000000..f5c5244
--- /dev/null
+++ b/EXAMPLE/dlinsol.c
@@ -0,0 +1,116 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ double *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ double *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Read the matrix in Harwell-Boeing format. */
+ dreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ dCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_D, SLU_GE);
+ xact = doubleMalloc(n * nrhs);
+ ldx = n;
+ dGenXtrue(n, nrhs, xact, ldx);
+ dFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ dgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ double *sol = (double*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ dinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ dQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("dgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ dQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/dlinsol1.c b/EXAMPLE/dlinsol1.c
new file mode 100644
index 0000000..85b4f06
--- /dev/null
+++ b/EXAMPLE/dlinsol1.c
@@ -0,0 +1,121 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ double *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ double *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Now we modify the default options to use the symmetric mode. */
+ options.SymmetricMode = YES;
+ options.ColPerm = MMD_AT_PLUS_A;
+ options.DiagPivotThresh = 0.001;
+
+ /* Read the matrix in Harwell-Boeing format. */
+ dreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ dCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_D, SLU_GE);
+ xact = doubleMalloc(n * nrhs);
+ ldx = n;
+ dGenXtrue(n, nrhs, xact, ldx);
+ dFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ dgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ double *sol = (double*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ dinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ dQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("dgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ dQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/dlinsolx.c b/EXAMPLE/dlinsolx.c
new file mode 100644
index 0000000..8fc4eed
--- /dev/null
+++ b/EXAMPLE/dlinsolx.c
@@ -0,0 +1,209 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+main(int argc, char *argv[])
+{
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ double *a;
+ int *asub, *xa;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ double *rhsb, *rhsx, *xact;
+ double *R, *C;
+ double *ferr, *berr;
+ double u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ /* Add more functionalities that the defaults. */
+ options.PivotGrowth = YES; /* Compute reciprocal pivot growth */
+ options.ConditionNumber = YES;/* Compute reciprocal condition number */
+ options.IterRefine = DOUBLE; /* Perform double-precision refinement */
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("DLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ dreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ dCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_D, SLU_GE);
+ dCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_D, SLU_GE);
+ xact = doubleMalloc(n * nrhs);
+ ldx = n;
+ dGenXtrue(n, nrhs, xact, ldx);
+ dFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (double *) SUPERLU_MALLOC(A.nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (double *) SUPERLU_MALLOC(A.ncol * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Solve the system and compute the condition number
+ and error bounds using dgssvx. */
+
+ dgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("dgssvx(): info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ double *sol = (double*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth == YES )
+ printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber == YES )
+ printf("Recip. condition number = %e\n", rcond);
+ if ( options.IterRefine != NOREFINE ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+
+/*
+ * Parse command line inputs.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/dlinsolx1.c b/EXAMPLE/dlinsolx1.c
new file mode 100644
index 0000000..157404d
--- /dev/null
+++ b/EXAMPLE/dlinsolx1.c
@@ -0,0 +1,237 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program DLINSOLX1.
+ *
+ * This example illustrates how to use DGSSVX to solve systems with the same
+ * A but different right-hand side.
+ * In this case, we factorize A only once in the first call to DGSSVX,
+ * and reuse the following data structures in the subsequent call to DGSSVX:
+ * perm_c, perm_r, R, C, L, U.
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ double *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ double *rhsb, *rhsx, *xact;
+ double *R, *C;
+ double *ferr, *berr;
+ double u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default values for options argument:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("DLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ dreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ dCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_D, SLU_GE);
+ dCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_D, SLU_GE);
+ xact = doubleMalloc(n * nrhs);
+ ldx = n;
+ dGenXtrue(n, nrhs, xact, ldx);
+ dFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (double *) SUPERLU_MALLOC(A.nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (double *) SUPERLU_MALLOC(A.ncol * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ B.ncol = 0; /* Indicate not to solve the system */
+ dgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("LU factorization: dgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE THE LINEAR SYSTEM USING THE FACTORED FORM OF A.
+ ------------------------------------------------------------*/
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ B.ncol = nrhs; /* Set the number of right-hand side */
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ dgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ double *sol = (double*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/dlinsolx2.c b/EXAMPLE/dlinsolx2.c
new file mode 100644
index 0000000..5fe99a9
--- /dev/null
+++ b/EXAMPLE/dlinsolx2.c
@@ -0,0 +1,275 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program DLINSOLX2.
+ *
+ * This example illustrates how to use DGSSVX to solve systems repeatedly
+ * with the same sparsity pattern of matrix A.
+ * In this case, the column permutation vector perm_c is computed once.
+ * The following data structures will be reused in the subsequent call to
+ * DGSSVX: perm_c, etree
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, A1, L, U;
+ SuperMatrix B, B1, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ double *a, *a1;
+ int *asub, *xa, *asub1, *xa1;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, j, m, n, nnz;
+ double *rhsb, *rhsb1, *rhsx, *xact;
+ double *R, *C;
+ double *ferr, *berr;
+ double u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("DLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ dreadhb(&m, &n, &nnz, &a, &asub, &xa);
+ if ( !(a1 = doubleMalloc(nnz)) ) ABORT("Malloc fails for a1[].");
+ if ( !(asub1 = intMalloc(nnz)) ) ABORT("Malloc fails for asub1[].");
+ if ( !(xa1 = intMalloc(n+1)) ) ABORT("Malloc fails for xa1[].");
+ for (i = 0; i < nnz; ++i) {
+ a1[i] = a[i];
+ asub1[i] = asub[i];
+ }
+ for (i = 0; i < n+1; ++i) xa1[i] = xa[i];
+
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsb1 = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb1[].");
+ if ( !(rhsx = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ dCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_D, SLU_GE);
+ dCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_D, SLU_GE);
+ xact = doubleMalloc(n * nrhs);
+ ldx = n;
+ dGenXtrue(n, nrhs, xact, ldx);
+ dFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < m; ++i) rhsb1[i+j*m] = rhsb[i+j*m];
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(R = (double *) SUPERLU_MALLOC(A.nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (double *) SUPERLU_MALLOC(A.ncol * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ------------------------------------------------------------
+ WE SOLVE THE LINEAR SYSTEM FOR THE FIRST TIME: AX = B
+ ------------------------------------------------------------*/
+ dgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("First system: dgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ double *sol = (double*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_Dense_Matrix(&B);
+ if ( lwork >= 0 ) { /* Deallocate storage associated with L and U. */
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE ANOTHER LINEAR SYSTEM: A1*X = B1
+ ONLY THE SPARSITY PATTERN OF A1 IS THE SAME AS THAT OF A.
+ ------------------------------------------------------------*/
+ options.Fact = SamePattern;
+ StatInit(&stat); /* Initialize the statistics variables. */
+
+ dCreate_CompCol_Matrix(&A1, m, n, nnz, a1, asub1, xa1,
+ SLU_NC, SLU_D, SLU_GE);
+ dCreate_Dense_Matrix(&B1, m, nrhs, rhsb1, m, SLU_DN, SLU_D, SLU_GE);
+
+ dgssvx(&options, &A1, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B1, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("\nSecond system: dgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ double *sol = (double*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A1);
+ Destroy_Dense_Matrix(&B1);
+ Destroy_Dense_Matrix(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/g10 b/EXAMPLE/g10
new file mode 100644
index 0000000..09e1441
--- /dev/null
+++ b/EXAMPLE/g10
@@ -0,0 +1,146 @@
+10x10 grid, with COLMMD order
+ 145 11 39 92 0
+RUA 100 100 460 0
+(10I8) (12I6) (5E16.8)
+ 1 6 10 13 17 22 26 30 35 40
+ 45 50 55 60 65 70 75 79 83 88
+ 92 95 99 103 108 112 117 122 127 131
+ 136 140 145 150 155 160 165 169 173 176
+ 180 184 188 193 197 202 207 211 215 220
+ 225 230 235 239 242 246 251 255 259 264
+ 269 274 279 284 289 294 299 303 307 312
+ 317 322 327 332 337 342 347 352 356 360
+ 365 370 374 379 384 389 394 399 404 409
+ 413 417 422 427 432 437 442 447 452 457
+ 461
+ 46 55 56 57 66 60 69 70 80 90 99 100
+ 89 98 99 100 79 88 89 90 99 80 89 90
+ 100 70 79 80 90 69 78 79 80 89 78 87
+ 88 89 98 59 68 69 70 79 68 77 78 79
+ 88 58 67 68 69 78 67 76 77 78 87 57
+ 66 67 68 77 47 56 57 58 67 34 43 44
+ 45 54 85 94 95 96 86 95 96 97 75 84
+ 85 86 95 51 61 62 71 81 91 92 82 91
+ 92 93 71 81 82 91 62 71 72 73 82 61
+ 71 72 81 72 81 82 83 92 52 61 62 63
+ 72 63 72 73 74 83 84 93 94 95 74 83
+ 84 85 94 83 92 93 94 73 82 83 84 93
+ 64 73 74 75 84 53 62 63 64 73 43 52
+ 53 54 63 54 63 64 65 74 4 5 6 15
+ 5 6 7 16 1 2 11 1 2 3 12 21
+ 31 32 41 1 11 12 21 12 21 22 23 32
+ 11 21 22 31 2 11 12 13 22 3 12 13
+ 14 23 2 3 4 13 3 4 5 14 4 13
+ 14 15 24 5 14 15 16 25 13 22 23 24
+ 33 22 31 32 33 42 30 39 40 50 9 10
+ 20 8 9 10 19 9 18 19 20 29 20 29
+ 30 40 10 19 20 30 19 28 29 30 39 8
+ 17 18 19 28 18 27 28 29 38 29 38 39
+ 40 49 17 26 27 28 37 28 37 38 39 48
+ 7 16 17 18 27 6 15 16 17 26 7 8
+ 9 18 6 7 8 17 15 24 25 26 35 16
+ 25 26 27 36 42 51 52 53 62 24 33 34
+ 35 44 14 23 24 25 34 23 32 33 34 43
+ 25 34 35 36 45 32 41 42 43 52 33 42
+ 43 44 53 31 41 42 51 41 51 52 61 35
+ 44 45 46 55 36 45 46 47 56 50 59 60
+ 70 26 35 36 37 46 27 36 37 38 47 37
+ 46 47 48 57 38 47 48 49 58 48 57 58
+ 59 68 39 48 49 50 59 49 58 59 60 69
+ 40 49 50 60 88 97 98 99 44 53 54 55
+ 64 45 54 55 56 65 55 64 65 66 75 56
+ 65 66 67 76 65 74 75 76 85 66 75 76
+ 77 86 76 85 86 87 96 77 86 87 88 97
+ 87 96 97 98
+ 1.26819336e+00 -3.12426583e-02 7.78211737e-01 2.18048355e+00 4.37813682e-01
+ -3.96516210e-01 1.38880676e+00 1.36442229e+00 6.58152637e-01 -6.92971494e-01
+ -8.59806235e-01 5.29038063e-01 -1.74530599e-01 9.78788421e-01 1.28955368e+00
+ -5.30575045e-01 1.83403368e+00 -1.71591032e+00 8.69317059e-02 1.95567435e+00
+ 1.61453770e-01 -6.28688359e-01 -1.43882447e+00 -6.65959686e-02 3.73380863e-01
+ 1.39860373e-01 -7.48088838e-01 -6.28974933e-01 1.39483065e+00 4.20988804e-01
+ -4.33373058e-01 7.06251990e-01 2.27856907e-01 -1.01699185e+00 8.25892307e-01
+ 1.47039036e+00 -1.37890689e+00 -2.60172069e-01 9.94768173e-01 -1.58105341e+00
+ 1.04902235e+00 3.02689036e-01 -1.22650234e+00 6.96000951e-02 1.33881437e+00
+ 1.22229851e+00 -1.59597816e+00 -1.06773032e+00 -7.59919212e-01 -1.98499916e-01
+ -1.41404614e-01 4.11267927e-01 -1.17905966e+00 -2.77775506e-01 1.93931843e+00
+ -8.95840361e-01 -3.04157583e-01 5.55253123e-01 -3.24246851e-01 -9.11425420e-01
+ -9.96089984e-01 1.19514263e+00 -1.59447782e-01 2.70402605e+00 1.33332898e+00
+ 2.51078139e-01 -3.10470908e-01 -9.23003724e-01 -3.84775736e-01 -1.46163875e+00
+ 1.55446592e+00 -5.97535384e-01 -1.21056787e+00 -7.02668798e-01 9.53355517e-01
+ -1.93005494e+00 5.12844987e-01 3.93682449e-01 -9.05426500e-01 -1.27447328e+00
+ 3.46546103e-01 -1.19523544e+00 8.66840733e-01 1.29184358e+00 4.34312653e-01
+ -3.86206929e-01 -1.12563760e-01 9.59664371e-01 2.08759311e+00 1.52468053e+00
+ -1.95260790e-01 2.17314078e-01 -1.79456822e-01 2.56729070e-02 6.42066362e-01
+ 9.23086649e-01 -1.55510777e+00 6.63594033e-01 -1.64769114e+00 -2.01498584e+00
+ 4.91716881e-01 -1.55497528e+00 -3.97913855e-01 8.64279576e-01 -1.77618078e-01
+ 1.87438052e+00 1.72400235e-01 4.91313669e-01 8.00733701e-01 -7.67268997e-01
+ 3.64419504e-01 -1.40609081e-01 2.44943669e-01 -2.67458500e-01 -5.70245480e-01
+ -1.87266787e-01 1.72603158e-02 2.46340439e-01 -8.54484721e-01 1.15778270e+00
+ 1.61907723e-01 1.27174349e+00 -3.53443680e-02 -1.50132884e+00 3.65373411e-01
+ -1.98659856e-01 9.94299745e-01 -8.03474714e-01 -5.91204478e-01 1.69154641e+00
+ -7.24410496e-01 1.19219551e+00 1.86746737e-01 1.59493888e+00 3.21307056e-01
+ -6.09499611e-01 5.65239403e-01 -6.10781446e-01 1.23111147e+00 1.20855665e+00
+ -6.38854660e-01 6.05540299e-01 -6.24480544e-01 5.72228122e-01 -1.38972170e+00
+ 2.29327812e-01 2.71190237e-01 -3.66360220e-01 1.37696039e+00 1.55706376e+00
+ -1.93543855e-01 1.65130117e+00 -1.89877818e+00 1.82252476e+00 7.65458387e-01
+ -5.94524008e-01 1.30245975e-01 3.50135051e-02 -6.24674139e-01 -1.51841513e+00
+ -1.05107061e+00 4.99305134e-02 -1.45474887e+00 4.66545850e-01 -3.60029626e-01
+ -1.35576294e-01 -1.34933848e+00 -1.27044990e+00 9.84570273e-01 -4.48806138e-02
+ -7.98944517e-01 -7.65172429e-01 1.16495351e+00 6.26839083e-01 7.50801547e-02
+ 3.51606903e-01 -6.96512535e-01 1.69614248e+00 5.90597780e-02 9.68481048e-01
+ 6.70291997e-01 4.20146042e-01 -2.87275127e+00 -2.04134535e-03 1.60651096e+00
+ 8.47648635e-01 2.68100812e-01 3.98848528e-02 -2.48284251e+00 1.15865471e+00
+ -1.02627947e+00 1.15348699e+00 6.15769628e-01 9.77894070e-01 -1.11534771e+00
+ -5.50021449e-01 -9.23489086e-01 -7.04993878e-02 1.47891351e-01 -5.57093642e-01
+ -3.36705699e-01 4.15227463e-01 1.55781354e+00 -2.44429890e+00 -1.09819539e+00
+ 1.12264786e+00 1.79707178e+00 2.64068529e-01 8.71673289e-01 -1.44617154e+00
+ -7.01165346e-01 1.24598212e+00 -6.38976995e-01 5.77350219e-01 5.81667258e-01
+ -2.71354296e-01 4.14191307e-01 -9.77814227e-01 -1.02146617e+00 3.17687980e-01
+ 1.51610780e+00 7.49432453e-01 -5.07700387e-01 8.85299448e-01 -7.86456613e-01
+ 6.34808588e-01 8.20409762e-01 -1.76026510e-01 5.62473875e-01 1.68587408e+00
+ 2.79245535e-02 -9.02030581e-01 -2.05325749e+00 8.90862977e-02 -1.04842345e+00
+ 4.22723685e-01 -8.44414378e-01 -3.11629756e-01 -3.22939921e-01 3.17987916e-01
+ -5.11172208e-01 1.12516182e+00 7.28641592e-01 -2.37745429e+00 -2.73782416e-01
+ 3.49733203e-02 -1.80786206e+00 1.02819255e+00 3.94600309e-01 6.39405642e-01
+ -7.59696649e-01 -6.74720856e-01 -1.17168719e+00 2.03293002e+00 8.74212895e-01
+ 1.75240173e+00 -3.20050826e-01 -1.37413808e-01 2.92314877e-01 2.56591024e+00
+ -4.57815644e-01 -1.61082701e+00 -2.66952378e+00 7.03144053e-01 -5.24115850e-02
+ 2.01849612e+00 9.24159405e-01 -1.81411470e+00 4.38705098e-01 -1.24734432e+00
+ 3.24666917e-01 3.90070410e-01 -4.05138317e-01 -3.68411285e-01 1.14789528e+00
+ 4.14302603e-02 -1.09804965e+00 1.56672375e+00 4.99520851e-01 -1.05537507e+00
+ -4.50743203e-01 1.27037824e+00 8.98693601e-01 8.74127225e-01 7.61126995e-01
+ -1.65923455e-01 3.00907437e-01 -3.22467327e-01 5.62147834e-01 -1.06392289e+00
+ 3.51588948e-01 1.13299993e+00 1.49994248e-01 -2.48093553e-01 -7.26249000e-01
+ -4.45040301e-01 -6.12911120e-01 -2.09144085e-01 7.56218970e-01 4.00486023e-01
+ -1.34138072e+00 3.75041024e-01 8.61734897e-01 -5.62251244e-02 5.13478174e-01
+ 3.96680866e-01 -6.20214209e-01 2.37148765e-01 -1.58684699e+00 -4.01484810e-01
+ -7.70692269e-01 -2.62680506e-01 9.76489544e-01 9.77815041e-01 1.17002111e+00
+ 1.59310862e-01 1.83613203e+00 -3.82918259e-01 1.55082745e-01 -9.64648249e-01
+ 3.87564313e-02 -1.52762265e+00 9.64938959e-01 5.26162503e-01 -1.84454117e-01
+ 1.98782828e-01 -1.27442875e-01 5.54171561e-01 -1.09734432e+00 -7.31301400e-01
+ 1.40473192e+00 2.08709913e+00 3.65118460e-01 8.46105526e-01 -1.84537657e-01
+ 1.03071442e+00 1.59042684e+00 3.21916399e-02 8.89163671e-01 -1.29915249e+00
+ 1.18257310e+00 -2.21360782e-01 1.66494939e-02 -1.19236124e+00 -1.31646297e-01
+ 1.48752430e+00 -8.36821231e-01 -1.30098190e+00 1.57413186e+00 1.16603996e+00
+ 7.86429695e-01 3.97810484e-01 1.04978596e+00 -3.40795563e-01 3.36296999e-01
+ 8.99883574e-01 -2.00898856e-01 -2.33734975e-01 1.44990660e+00 3.56429388e-01
+ 6.52635669e-01 2.15671161e-01 -2.63896186e-01 1.80244024e+00 -6.42984172e-01
+ 1.09555050e-01 -7.19037696e-01 4.20627573e-01 -1.93113369e+00 3.20690754e+00
+ 5.36007045e-01 2.98450536e-01 2.84043161e-01 1.81747171e+00 -5.84302130e-01
+ -1.01067382e+00 -9.60498312e-01 6.91159584e-01 -7.58618207e-01 -9.69717328e-02
+ -1.40694905e+00 1.03081246e+00 -7.59874404e-01 6.60299785e-01 -1.10250960e+00
+ -1.02970645e-01 -1.05980154e+00 -1.23856594e+00 -1.88923606e+00 -9.73584554e-01
+ 2.12115839e-01 4.93441991e-01 1.54717659e+00 1.15818057e+00 8.62500188e-01
+ -1.03470562e+00 -1.92672883e-01 -1.29972278e+00 6.44932748e-01 -2.14835899e+00
+ -1.02884453e+00 -1.41582116e-01 -2.52670612e+00 3.06595916e-01 9.68992176e-01
+ -7.47317127e-01 -2.79602442e+00 6.96731554e-01 -3.12981493e-01 -5.93617619e-01
+ 3.32322162e-01 5.58850703e-01 -9.14800738e-01 -5.14012560e-01 1.89626061e+00
+ -2.53229992e-01 -5.39775241e-01 1.87995711e+00 -1.00384945e+00 -4.97445878e-01
+ -1.50439715e+00 -9.54492989e-02 3.96727054e-01 -5.27114908e-01 3.44571056e-01
+ -7.23290526e-01 5.45436841e-01 1.32031907e+00 -4.04494328e-01 4.18468509e-01
+ 2.47348750e-01 7.04110315e-01 6.31938853e-01 -9.92362113e-01 1.76670837e+00
+ -3.82103635e-01 -7.97532757e-01 -9.36740612e-01 -2.43346549e-03 3.96086166e-01
+ -5.08693172e-01 -2.68285779e-01 -1.08214045e+00 2.01413372e+00 1.94403113e+00
+ -1.52152942e+00 -9.64333079e-01 -2.05725119e+00 1.49996068e-01 5.42037571e-01
+ 2.54408816e-01 -3.07240694e-01 -4.17111830e-01 1.13680483e+00 3.91313809e-01
+ 1.60514782e+00 6.67201442e-01 -6.77937746e-02 -1.73566011e+00 8.06348573e-01
diff --git a/EXAMPLE/slinsol.c b/EXAMPLE/slinsol.c
new file mode 100644
index 0000000..e63bfdf
--- /dev/null
+++ b/EXAMPLE/slinsol.c
@@ -0,0 +1,116 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ float *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ float *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Read the matrix in Harwell-Boeing format. */
+ sreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ sCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_S, SLU_GE);
+ xact = floatMalloc(n * nrhs);
+ ldx = n;
+ sGenXtrue(n, nrhs, xact, ldx);
+ sFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ sgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ float *sol = (float*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ sinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ sQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("sgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ sQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/slinsol1.c b/EXAMPLE/slinsol1.c
new file mode 100644
index 0000000..a736a09
--- /dev/null
+++ b/EXAMPLE/slinsol1.c
@@ -0,0 +1,121 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ float *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ float *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Now we modify the default options to use the symmetric mode. */
+ options.SymmetricMode = YES;
+ options.ColPerm = MMD_AT_PLUS_A;
+ options.DiagPivotThresh = 0.001;
+
+ /* Read the matrix in Harwell-Boeing format. */
+ sreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ sCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_S, SLU_GE);
+ xact = floatMalloc(n * nrhs);
+ ldx = n;
+ sGenXtrue(n, nrhs, xact, ldx);
+ sFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ sgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ float *sol = (float*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ sinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ sQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("sgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ sQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/slinsolx.c b/EXAMPLE/slinsolx.c
new file mode 100644
index 0000000..d73cc6d
--- /dev/null
+++ b/EXAMPLE/slinsolx.c
@@ -0,0 +1,209 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+main(int argc, char *argv[])
+{
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ float *a;
+ int *asub, *xa;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ float *rhsb, *rhsx, *xact;
+ float *R, *C;
+ float *ferr, *berr;
+ float u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ /* Add more functionalities that the defaults. */
+ options.PivotGrowth = YES; /* Compute reciprocal pivot growth */
+ options.ConditionNumber = YES;/* Compute reciprocal condition number */
+ options.IterRefine = SINGLE; /* Perform single-precision refinement */
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("SLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ sreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ sCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_S, SLU_GE);
+ sCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_S, SLU_GE);
+ xact = floatMalloc(n * nrhs);
+ ldx = n;
+ sGenXtrue(n, nrhs, xact, ldx);
+ sFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (float *) SUPERLU_MALLOC(A.nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (float *) SUPERLU_MALLOC(A.ncol * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Solve the system and compute the condition number
+ and error bounds using dgssvx. */
+
+ sgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("sgssvx(): info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ float *sol = (float*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth == YES )
+ printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber == YES )
+ printf("Recip. condition number = %e\n", rcond);
+ if ( options.IterRefine != NOREFINE ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+
+/*
+ * Parse command line inputs.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ float *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/slinsolx1.c b/EXAMPLE/slinsolx1.c
new file mode 100644
index 0000000..deb650f
--- /dev/null
+++ b/EXAMPLE/slinsolx1.c
@@ -0,0 +1,237 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program SLINSOLX1.
+ *
+ * This example illustrates how to use SGSSVX to solve systems with the same
+ * A but different right-hand side.
+ * In this case, we factorize A only once in the first call to DGSSVX,
+ * and reuse the following data structures in the subsequent call to SGSSVX:
+ * perm_c, perm_r, R, C, L, U.
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ float *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ float *rhsb, *rhsx, *xact;
+ float *R, *C;
+ float *ferr, *berr;
+ float u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default values for options argument:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("SLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ sreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ sCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_S, SLU_GE);
+ sCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_S, SLU_GE);
+ xact = floatMalloc(n * nrhs);
+ ldx = n;
+ sGenXtrue(n, nrhs, xact, ldx);
+ sFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (float *) SUPERLU_MALLOC(A.nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (float *) SUPERLU_MALLOC(A.ncol * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ B.ncol = 0; /* Indicate not to solve the system */
+ sgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("LU factorization: sgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE THE LINEAR SYSTEM USING THE FACTORED FORM OF A.
+ ------------------------------------------------------------*/
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ B.ncol = nrhs; /* Set the number of right-hand side */
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ sgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("Triangular solve: sgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ float *sol = (float*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ float *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/slinsolx2.c b/EXAMPLE/slinsolx2.c
new file mode 100644
index 0000000..e0acad7
--- /dev/null
+++ b/EXAMPLE/slinsolx2.c
@@ -0,0 +1,275 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program SLINSOLX2.
+ *
+ * This example illustrates how to use SGSSVX to solve systems repeatedly
+ * with the same sparsity pattern of matrix A.
+ * In this case, the column permutation vector perm_c is computed once.
+ * The following data structures will be reused in the subsequent call to
+ * SGSSVX: perm_c, etree
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, A1, L, U;
+ SuperMatrix B, B1, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ float *a, *a1;
+ int *asub, *xa, *asub1, *xa1;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, j, m, n, nnz;
+ float *rhsb, *rhsb1, *rhsx, *xact;
+ float *R, *C;
+ float *ferr, *berr;
+ float u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("DLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ sreadhb(&m, &n, &nnz, &a, &asub, &xa);
+ if ( !(a1 = floatMalloc(nnz)) ) ABORT("Malloc fails for a1[].");
+ if ( !(asub1 = intMalloc(nnz)) ) ABORT("Malloc fails for asub1[].");
+ if ( !(xa1 = intMalloc(n+1)) ) ABORT("Malloc fails for xa1[].");
+ for (i = 0; i < nnz; ++i) {
+ a1[i] = a[i];
+ asub1[i] = asub[i];
+ }
+ for (i = 0; i < n+1; ++i) xa1[i] = xa[i];
+
+ sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsb1 = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb1[].");
+ if ( !(rhsx = floatMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ sCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_S, SLU_GE);
+ sCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_S, SLU_GE);
+ xact = floatMalloc(n * nrhs);
+ ldx = n;
+ sGenXtrue(n, nrhs, xact, ldx);
+ sFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < m; ++i) rhsb1[i+j*m] = rhsb[i+j*m];
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(R = (float *) SUPERLU_MALLOC(A.nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (float *) SUPERLU_MALLOC(A.ncol * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (float *) SUPERLU_MALLOC(nrhs * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ------------------------------------------------------------
+ WE SOLVE THE LINEAR SYSTEM FOR THE FIRST TIME: AX = B
+ ------------------------------------------------------------*/
+ sgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("First system: sgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ float *sol = (float*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_Dense_Matrix(&B);
+ if ( lwork >= 0 ) { /* Deallocate storage associated with L and U. */
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE ANOTHER LINEAR SYSTEM: A1*X = B1
+ ONLY THE SPARSITY PATTERN OF A1 IS THE SAME AS THAT OF A.
+ ------------------------------------------------------------*/
+ options.Fact = SamePattern;
+ StatInit(&stat); /* Initialize the statistics variables. */
+
+ sCreate_CompCol_Matrix(&A1, m, n, nnz, a1, asub1, xa1,
+ SLU_NC, SLU_S, SLU_GE);
+ sCreate_Dense_Matrix(&B1, m, nrhs, rhsb1, m, SLU_DN, SLU_S, SLU_GE);
+
+ sgssvx(&options, &A1, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B1, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("\nSecond system: sgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ float *sol = (float*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A1);
+ Destroy_Dense_Matrix(&B1);
+ Destroy_Dense_Matrix(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/sp_ienv.c b/EXAMPLE/sp_ienv.c
new file mode 100644
index 0000000..052d860
--- /dev/null
+++ b/EXAMPLE/sp_ienv.c
@@ -0,0 +1,68 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: sp_ienv.c
+ * History: Modified from lapack routine ILAENV
+ */
+int
+sp_ienv(int ispec)
+{
+/*
+ Purpose
+ =======
+
+ sp_ienv() is inquired to choose machine-dependent parameters for the
+ local environment. See ISPEC for a description of the parameters.
+
+ This version provides a set of parameters which should give good,
+ but not optimal, performance on many of the currently available
+ computers. Users are encouraged to modify this subroutine to set
+ the tuning parameters for their particular machine using the option
+ and problem size information in the arguments.
+
+ Arguments
+ =========
+
+ ISPEC (input) int
+ Specifies the parameter to be returned as the value of SP_IENV.
+ = 1: the panel size w; a panel consists of w consecutive
+ columns of matrix A in the process of Gaussian elimination.
+ The best value depends on machine's cache characters.
+ = 2: the relaxation parameter relax; if the number of
+ nodes (columns) in a subtree of the elimination tree is less
+ than relax, this subtree is considered as one supernode,
+ regardless of their row structures.
+ = 3: the maximum size for a supernode;
+ = 4: the minimum row dimension for 2-D blocking to be used;
+ = 5: the minimum column dimension for 2-D blocking to be used;
+ = 6: the estimated fills factor for L and U, compared with A;
+
+ (SP_IENV) (output) int
+ >= 0: the value of the parameter specified by ISPEC
+ < 0: if SP_IENV = -k, the k-th argument had an illegal value.
+
+ =====================================================================
+*/
+ int i;
+
+ switch (ispec) {
+ case 1: return (8);
+ case 2: return (1);
+ case 3: return (100);
+ case 4: return (200);
+ case 5: return (40);
+ case 6: return (20);
+ }
+
+ /* Invalid value for ISPEC */
+ i = 1;
+ xerbla_("sp_ienv", &i);
+ return 0;
+
+} /* sp_ienv_ */
+
diff --git a/EXAMPLE/superlu.c b/EXAMPLE/superlu.c
new file mode 100644
index 0000000..6b88a63
--- /dev/null
+++ b/EXAMPLE/superlu.c
@@ -0,0 +1,80 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include "dsp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * This is the small 5x5 example used in the Sections 1 and 2 of the
+ * User's Guide to illustrate how to call a SuperLU routine, and the
+ * matrix data structures used by SuperLU.
+ *
+ */
+ SuperMatrix A, L, U, B;
+ double *a, *rhs;
+ double s, u, p, e, r, l;
+ int *asub, *xa;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int nrhs, info, i, m, n, nnz, permc_spec;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+ /* Initialize matrix A. */
+ m = n = 5;
+ nnz = 12;
+ if ( !(a = doubleMalloc(nnz)) ) ABORT("Malloc fails for a[].");
+ if ( !(asub = intMalloc(nnz)) ) ABORT("Malloc fails for asub[].");
+ if ( !(xa = intMalloc(n+1)) ) ABORT("Malloc fails for xa[].");
+ s = 19.0; u = 21.0; p = 16.0; e = 5.0; r = 18.0; l = 12.0;
+ a[0] = s; a[1] = l; a[2] = l; a[3] = u; a[4] = l; a[5] = l;
+ a[6] = u; a[7] = p; a[8] = u; a[9] = e; a[10]= u; a[11]= r;
+ asub[0] = 0; asub[1] = 1; asub[2] = 4; asub[3] = 1;
+ asub[4] = 2; asub[5] = 4; asub[6] = 0; asub[7] = 2;
+ asub[8] = 0; asub[9] = 3; asub[10]= 3; asub[11]= 4;
+ xa[0] = 0; xa[1] = 3; xa[2] = 6; xa[3] = 8; xa[4] = 10; xa[5] = 12;
+
+ /* Create matrix A in the format expected by SuperLU. */
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+
+ /* Create right-hand side matrix B. */
+ nrhs = 1;
+ if ( !(rhs = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ for (i = 0; i < m; ++i) rhs[i] = 1.0;
+ dCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_D, SLU_GE);
+
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+
+ /* Set the default input options. */
+ set_default_options(&options);
+ options.ColPerm = NATURAL;
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ dgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ dPrint_CompCol_Matrix("A", &A);
+ dPrint_CompCol_Matrix("U", &U);
+ dPrint_SuperNode_Matrix("L", &L);
+ print_int_vec("\nperm_r", m, perm_r);
+
+ /* De-allocate storage */
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ StatFree(&stat);
+}
diff --git a/EXAMPLE/zlinsol.c b/EXAMPLE/zlinsol.c
new file mode 100644
index 0000000..d3a75c4
--- /dev/null
+++ b/EXAMPLE/zlinsol.c
@@ -0,0 +1,116 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ doublecomplex *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ doublecomplex *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Read the matrix in Harwell-Boeing format. */
+ zreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ zCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_Z, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ zCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_Z, SLU_GE);
+ xact = doublecomplexMalloc(n * nrhs);
+ ldx = n;
+ zGenXtrue(n, nrhs, xact, ldx);
+ zFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ zgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ doublecomplex *sol = (doublecomplex*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ zinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ zQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("zgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ zQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/zlinsol1.c b/EXAMPLE/zlinsol1.c
new file mode 100644
index 0000000..1747397
--- /dev/null
+++ b/EXAMPLE/zlinsol1.c
@@ -0,0 +1,121 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+main(int argc, char *argv[])
+{
+ SuperMatrix A;
+ NCformat *Astore;
+ doublecomplex *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ SuperMatrix L; /* factor L */
+ SCformat *Lstore;
+ SuperMatrix U; /* factor U */
+ NCformat *Ustore;
+ SuperMatrix B;
+ int nrhs, ldx, info, m, n, nnz;
+ doublecomplex *xact, *rhs;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Now we modify the default options to use the symmetric mode. */
+ options.SymmetricMode = YES;
+ options.ColPerm = MMD_AT_PLUS_A;
+ options.DiagPivotThresh = 0.001;
+
+ /* Read the matrix in Harwell-Boeing format. */
+ zreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ zCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_Z, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ nrhs = 1;
+ if ( !(rhs = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");
+ zCreate_Dense_Matrix(&B, m, nrhs, rhs, m, SLU_DN, SLU_Z, SLU_GE);
+ xact = doublecomplexMalloc(n * nrhs);
+ ldx = n;
+ zGenXtrue(n, nrhs, xact, ldx);
+ zFillRHS(options.Trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ zgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+ if ( info == 0 ) {
+
+ /* This is how you could access the solution matrix. */
+ doublecomplex *sol = (doublecomplex*) ((DNformat*) B.Store)->nzval;
+
+ /* Compute the infinity norm of the error. */
+ zinf_norm_error(nrhs, &B, xact);
+
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+
+ zQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ } else {
+ printf("zgssv() error returns INFO= %d\n", info);
+ if ( info <= n ) { /* factorization completes */
+ zQuerySpace(&L, &U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhs);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
diff --git a/EXAMPLE/zlinsolx.c b/EXAMPLE/zlinsolx.c
new file mode 100644
index 0000000..364f62b
--- /dev/null
+++ b/EXAMPLE/zlinsolx.c
@@ -0,0 +1,209 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+main(int argc, char *argv[])
+{
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ doublecomplex *a;
+ int *asub, *xa;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ doublecomplex *rhsb, *rhsx, *xact;
+ double *R, *C;
+ double *ferr, *berr;
+ double u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ /* Add more functionalities that the defaults. */
+ options.PivotGrowth = YES; /* Compute reciprocal pivot growth */
+ options.ConditionNumber = YES;/* Compute reciprocal condition number */
+ options.IterRefine = DOUBLE; /* Perform double-precision refinement */
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("ZLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ zreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ zCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_Z, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ zCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_Z, SLU_GE);
+ zCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_Z, SLU_GE);
+ xact = doublecomplexMalloc(n * nrhs);
+ ldx = n;
+ zGenXtrue(n, nrhs, xact, ldx);
+ zFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (double *) SUPERLU_MALLOC(A.nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (double *) SUPERLU_MALLOC(A.ncol * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Solve the system and compute the condition number
+ and error bounds using dgssvx. */
+
+ zgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("zgssvx(): info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ doublecomplex *sol = (doublecomplex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth == YES )
+ printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber == YES )
+ printf("Recip. condition number = %e\n", rcond);
+ if ( options.IterRefine != NOREFINE ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+
+/*
+ * Parse command line inputs.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:w:r:u:f:t:p:e:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/zlinsolx1.c b/EXAMPLE/zlinsolx1.c
new file mode 100644
index 0000000..48f6261
--- /dev/null
+++ b/EXAMPLE/zlinsolx1.c
@@ -0,0 +1,237 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program ZLINSOLX1.
+ *
+ * This example illustrates how to use ZGSSVX to solve systems with the same
+ * A but different right-hand side.
+ * In this case, we factorize A only once in the first call to DGSSVX,
+ * and reuse the following data structures in the subsequent call to ZGSSVX:
+ * perm_c, perm_r, R, C, L, U.
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, L, U;
+ SuperMatrix B, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ doublecomplex *a;
+ int *asub, *xa;
+ int *perm_c; /* column permutation vector */
+ int *perm_r; /* row permutations from partial pivoting */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, m, n, nnz;
+ doublecomplex *rhsb, *rhsx, *xact;
+ double *R, *C;
+ double *ferr, *berr;
+ double u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default values for options argument:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("ZLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ zreadhb(&m, &n, &nnz, &a, &asub, &xa);
+
+ zCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_Z, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsx = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ zCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_Z, SLU_GE);
+ zCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_Z, SLU_GE);
+ xact = doublecomplexMalloc(n * nrhs);
+ ldx = n;
+ zGenXtrue(n, nrhs, xact, ldx);
+ zFillRHS(trans, nrhs, xact, ldx, &A, &B);
+
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(R = (double *) SUPERLU_MALLOC(A.nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (double *) SUPERLU_MALLOC(A.ncol * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ B.ncol = 0; /* Indicate not to solve the system */
+ zgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("LU factorization: zgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE THE LINEAR SYSTEM USING THE FACTORED FORM OF A.
+ ------------------------------------------------------------*/
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ B.ncol = nrhs; /* Set the number of right-hand side */
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ zgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("Triangular solve: zgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ doublecomplex *sol = (doublecomplex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (rhsx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/EXAMPLE/zlinsolx2.c b/EXAMPLE/zlinsolx2.c
new file mode 100644
index 0000000..ce7f2aa
--- /dev/null
+++ b/EXAMPLE/zlinsolx2.c
@@ -0,0 +1,275 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * The driver program ZLINSOLX2.
+ *
+ * This example illustrates how to use ZGSSVX to solve systems repeatedly
+ * with the same sparsity pattern of matrix A.
+ * In this case, the column permutation vector perm_c is computed once.
+ * The following data structures will be reused in the subsequent call to
+ * ZGSSVX: perm_c, etree
+ *
+ */
+ char equed[1];
+ yes_no_t equil;
+ trans_t trans;
+ SuperMatrix A, A1, L, U;
+ SuperMatrix B, B1, X;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ doublecomplex *a, *a1;
+ int *asub, *xa, *asub1, *xa1;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree;
+ void *work;
+ int info, lwork, nrhs, ldx;
+ int i, j, m, n, nnz;
+ doublecomplex *rhsb, *rhsb1, *rhsx, *xact;
+ double *R, *C;
+ double *ferr, *berr;
+ double u, rpg, rcond;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ extern void parse_command_line();
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Enter main()");
+#endif
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 1;
+ equil = YES;
+ u = 1.0;
+ trans = NOTRANS;
+
+ /* Set the default input options:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ /* Can use command line input to modify the defaults. */
+ parse_command_line(argc, argv, &lwork, &u, &equil, &trans);
+ options.Equil = equil;
+ options.DiagPivotThresh = u;
+ options.Trans = trans;
+
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ ABORT("DLINSOLX: cannot allocate work[]");
+ }
+ }
+
+ /* Read matrix A from a file in Harwell-Boeing format.*/
+ zreadhb(&m, &n, &nnz, &a, &asub, &xa);
+ if ( !(a1 = doublecomplexMalloc(nnz)) ) ABORT("Malloc fails for a1[].");
+ if ( !(asub1 = intMalloc(nnz)) ) ABORT("Malloc fails for asub1[].");
+ if ( !(xa1 = intMalloc(n+1)) ) ABORT("Malloc fails for xa1[].");
+ for (i = 0; i < nnz; ++i) {
+ a1[i] = a[i];
+ asub1[i] = asub[i];
+ }
+ for (i = 0; i < n+1; ++i) xa1[i] = xa[i];
+
+ zCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_Z, SLU_GE);
+ Astore = A.Store;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, Astore->nnz);
+
+ if ( !(rhsb = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb[].");
+ if ( !(rhsb1 = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsb1[].");
+ if ( !(rhsx = doublecomplexMalloc(m * nrhs)) ) ABORT("Malloc fails for rhsx[].");
+ zCreate_Dense_Matrix(&B, m, nrhs, rhsb, m, SLU_DN, SLU_Z, SLU_GE);
+ zCreate_Dense_Matrix(&X, m, nrhs, rhsx, m, SLU_DN, SLU_Z, SLU_GE);
+ xact = doublecomplexMalloc(n * nrhs);
+ ldx = n;
+ zGenXtrue(n, nrhs, xact, ldx);
+ zFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < m; ++i) rhsb1[i+j*m] = rhsb[i+j*m];
+
+ if ( !(perm_c = intMalloc(n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(perm_r = intMalloc(m)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(etree = intMalloc(n)) ) ABORT("Malloc fails for etree[].");
+ if ( !(R = (double *) SUPERLU_MALLOC(A.nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ if ( !(C = (double *) SUPERLU_MALLOC(A.ncol * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ if ( !(ferr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for ferr[].");
+ if ( !(berr = (double *) SUPERLU_MALLOC(nrhs * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for berr[].");
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ------------------------------------------------------------
+ WE SOLVE THE LINEAR SYSTEM FOR THE FIRST TIME: AX = B
+ ------------------------------------------------------------*/
+ zgssvx(&options, &A, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("First system: zgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ doublecomplex *sol = (doublecomplex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_Dense_Matrix(&B);
+ if ( lwork >= 0 ) { /* Deallocate storage associated with L and U. */
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ /* ------------------------------------------------------------
+ NOW WE SOLVE ANOTHER LINEAR SYSTEM: A1*X = B1
+ ONLY THE SPARSITY PATTERN OF A1 IS THE SAME AS THAT OF A.
+ ------------------------------------------------------------*/
+ options.Fact = SamePattern;
+ StatInit(&stat); /* Initialize the statistics variables. */
+
+ zCreate_CompCol_Matrix(&A1, m, n, nnz, a1, asub1, xa1,
+ SLU_NC, SLU_Z, SLU_GE);
+ zCreate_Dense_Matrix(&B1, m, nrhs, rhsb1, m, SLU_DN, SLU_Z, SLU_GE);
+
+ zgssvx(&options, &A1, perm_c, perm_r, etree, equed, R, C,
+ &L, &U, work, lwork, &B1, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+ printf("\nSecond system: zgssvx() returns info %d\n", info);
+
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ doublecomplex *sol = (doublecomplex*) ((DNformat*) X.Store)->nzval;
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ for (i = 0; i < nrhs; ++i)
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[i], berr[i]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+
+ if ( options.PrintStat ) StatPrint(&stat);
+ StatFree(&stat);
+
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ Destroy_CompCol_Matrix(&A1);
+ Destroy_Dense_Matrix(&B1);
+ Destroy_Dense_Matrix(&X);
+ if ( lwork >= 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+#if ( DEBUGlevel>=1 )
+ CHECK_MALLOC("Exit main()");
+#endif
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], int *lwork,
+ double *u, yes_no_t *equil, trans_t *trans )
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "hl:u:e:t:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-l <int> - length of work[*] array\n");
+ printf("\t-u <int> - pivoting threshold\n");
+ printf("\t-e <0 or 1> - equilibrate or not\n");
+ printf("\t-t <0 or 1> - solve transposed system or not\n");
+ exit(1);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ case 'e': *equil = atoi(optarg);
+ break;
+ case 't': *trans = atoi(optarg);
+ break;
+ }
+ }
+}
diff --git a/FORTRAN/Makefile b/FORTRAN/Makefile
new file mode 100644
index 0000000..98abda6
--- /dev/null
+++ b/FORTRAN/Makefile
@@ -0,0 +1,27 @@
+include ../make.inc
+
+#######################################################################
+# This makefile creates the Fortran example interface to use the
+# C routines in SuperLU.
+#######################################################################
+
+HEADER = ../SRC
+
+F77EXM = f77_main.o hbcode1.o c_fortran_dgssv.o
+
+all: f77exm
+
+f77exm: $(F77EXM) ../$(SUPERLULIB)
+ $(FORTRAN) $(F77EXM) ../$(SUPERLULIB) $(BLASLIB) -o $@
+
+c_fortran_zgssv.o: c_fortran_zgssv.c
+ $(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -c $< $(VERBOSE)
+
+.c.o:
+ $(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -c $< $(VERBOSE)
+
+.f.o:
+ $(FORTRAN) $(FFLAGS) -c $< $(VERBOSE)
+
+clean:
+ rm -f *.o f77exm
diff --git a/FORTRAN/README b/FORTRAN/README
new file mode 100644
index 0000000..c51a527
--- /dev/null
+++ b/FORTRAN/README
@@ -0,0 +1,10 @@
+ FORTRAN INTERFACE
+
+This directory contains the Fortran example interface to use the
+C routines in SuperLU.
+
+To compile the examples, type:
+ % make
+
+To run the examples, type:
+ % f77exm < ../EXAMPLE/g10
diff --git a/FORTRAN/c_fortran_dgssv.c b/FORTRAN/c_fortran_dgssv.c
new file mode 100644
index 0000000..22dd066
--- /dev/null
+++ b/FORTRAN/c_fortran_dgssv.c
@@ -0,0 +1,175 @@
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+
+#include "dsp_defs.h"
+
+#define HANDLE_SIZE 8
+/* kind of integer to hold a pointer. Use int.
+ This might need to be changed on 64-bit systems. */
+typedef int fptr; /* 32-bit by default */
+
+typedef struct {
+ SuperMatrix *L;
+ SuperMatrix *U;
+ int *perm_c;
+ int *perm_r;
+} factors_t;
+
+void
+c_fortran_dgssv_(int *iopt, int *n, int *nnz, int *nrhs, double *values,
+ int *rowind, int *colptr, double *b, int *ldb,
+ fptr *f_factors, /* a handle containing the address
+ pointing to the factored matrices */
+ int *info)
+
+{
+/*
+ * This routine can be called from Fortran.
+ *
+ * iopt (input) int
+ * Specifies the operation:
+ * = 1, performs LU decomposition for the first time
+ * = 2, performs triangular solve
+ * = 3, free all the storage in the end
+ *
+ * f_factors (input/output) fptr*
+ * If iopt == 1, it is an output and contains the pointer pointing to
+ * the structure of the factored matrices.
+ * Otherwise, it it an input.
+ *
+ */
+
+ SuperMatrix A, AC, B;
+ SuperMatrix *L, *U;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree; /* column elimination tree */
+ SCformat *Lstore;
+ NCformat *Ustore;
+ int i, panel_size, permc_spec, relax;
+ trans_t trans;
+ double drop_tol = 0.0;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ factors_t *LUfactors;
+
+ trans = NOTRANS;
+
+ if ( *iopt == 1 ) { /* LU decomposition */
+
+ /* Set the default input options. */
+ set_default_options(&options);
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Adjust to 0-based indexing */
+ for (i = 0; i < *nnz; ++i) --rowind[i];
+ for (i = 0; i <= *n; ++i) --colptr[i];
+
+ dCreate_CompCol_Matrix(&A, *n, *n, *nnz, values, rowind, colptr,
+ SLU_NC, SLU_D, SLU_GE);
+ L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ if ( !(perm_r = intMalloc(*n)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(*n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(etree = intMalloc(*n)) ) ABORT("Malloc fails for etree[].");
+
+ /*
+ * Get column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = 0: natural ordering
+ * permc_spec = 1: minimum degree on structure of A'*A
+ * permc_spec = 2: minimum degree on structure of A'+A
+ * permc_spec = 3: approximate minimum degree for unsymmetric matrices
+ */
+ permc_spec = 3;
+ get_perm_c(permc_spec, &A, perm_c);
+
+ sp_preorder(&options, &A, perm_c, etree, &AC);
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+
+ dgstrf(&options, &AC, drop_tol, relax, panel_size,
+ etree, NULL, 0, perm_c, perm_r, L, U, &stat, info);
+
+ if ( *info == 0 ) {
+ Lstore = (SCformat *) L->Store;
+ Ustore = (NCformat *) U->Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz);
+ dQuerySpace(L, U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ } else {
+ printf("dgstrf() error returns INFO= %d\n", *info);
+ if ( *info <= *n ) { /* factorization completes */
+ dQuerySpace(L, U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ /* Restore to 1-based indexing */
+ for (i = 0; i < *nnz; ++i) ++rowind[i];
+ for (i = 0; i <= *n; ++i) ++colptr[i];
+
+ /* Save the LU factors in the factors handle */
+ LUfactors = (factors_t*) SUPERLU_MALLOC(sizeof(factors_t));
+ LUfactors->L = L;
+ LUfactors->U = U;
+ LUfactors->perm_c = perm_c;
+ LUfactors->perm_r = perm_r;
+ *f_factors = (fptr) LUfactors;
+
+ /* Free un-wanted storage */
+ SUPERLU_FREE(etree);
+ Destroy_SuperMatrix_Store(&A);
+ Destroy_CompCol_Permuted(&AC);
+ StatFree(&stat);
+
+ } else if ( *iopt == 2 ) { /* Triangular solve */
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Extract the LU factors in the factors handle */
+ LUfactors = (factors_t*) *f_factors;
+ L = LUfactors->L;
+ U = LUfactors->U;
+ perm_c = LUfactors->perm_c;
+ perm_r = LUfactors->perm_r;
+
+ dCreate_Dense_Matrix(&B, *n, *nrhs, b, *ldb, SLU_DN, SLU_D, SLU_GE);
+
+ /* Solve the system A*X=B, overwriting B with X. */
+ dgstrs (trans, L, U, perm_c, perm_r, &B, &stat, info);
+
+ Destroy_SuperMatrix_Store(&B);
+ StatFree(&stat);
+
+ } else if ( *iopt == 3 ) { /* Free storage */
+ /* Free the LU factors in the factors handle */
+ LUfactors = (factors_t*) *f_factors;
+ SUPERLU_FREE (LUfactors->perm_r);
+ SUPERLU_FREE (LUfactors->perm_c);
+ Destroy_SuperNode_Matrix(LUfactors->L);
+ Destroy_CompCol_Matrix(LUfactors->U);
+ SUPERLU_FREE (LUfactors->L);
+ SUPERLU_FREE (LUfactors->U);
+ SUPERLU_FREE (LUfactors);
+ } else {
+ fprintf(stderr,"Invalid iopt=%d passed to c_fortran_dgssv()\n",*iopt);
+ exit(-1);
+ }
+}
+
+
diff --git a/FORTRAN/c_fortran_dgssv.c.old b/FORTRAN/c_fortran_dgssv.c.old
new file mode 100644
index 0000000..7eb3fc6
--- /dev/null
+++ b/FORTRAN/c_fortran_dgssv.c.old
@@ -0,0 +1,175 @@
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+
+#include "dsp_defs.h"
+
+#define HANDLE_SIZE 8
+/* kind of integer to hold a pointer. Use int.
+ This might need to be changed on 64-bit systems. */
+typedef int fptr; /* 32-bit by default */
+
+typedef struct {
+ SuperMatrix *L;
+ SuperMatrix *U;
+ int *perm_c;
+ int *perm_r;
+} factors_t;
+
+void
+c_fortran_dgssv_(int *iopt, int *n, int *nnz, int *nrhs, double *values,
+ int *rowind, int *colptr, double *b, int *ldb,
+ int factors[HANDLE_SIZE], /* a handle containing the pointer
+ to the factored matrices */
+ int *info)
+
+{
+/*
+ * This routine can be called from Fortran.
+ *
+ * iopt (input) int
+ * Specifies the operation:
+ * = 1, performs LU decomposition for the first time
+ * = 2, performs triangular solve
+ * = 3, free all the storage in the end
+ *
+ * factors (input/output) int array of size 8
+ * If iopt == 1, it is an output and contains the pointer pointing to
+ * the structure of the factored matrices.
+ * Otherwise, it it an input.
+ *
+ */
+
+ SuperMatrix A, AC, B;
+ SuperMatrix *L, *U;
+ int *perm_r; /* row permutations from partial pivoting */
+ int *perm_c; /* column permutation vector */
+ int *etree; /* column elimination tree */
+ SCformat *Lstore;
+ NCformat *Ustore;
+ int i, panel_size, permc_spec, relax;
+ trans_t trans;
+ double drop_tol = 0.0;
+ mem_usage_t mem_usage;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+ factors_t *LUfactors;
+
+ trans = NOTRANS;
+
+ if ( *iopt == 1 ) { /* LU decomposition */
+
+ /* Set the default input options. */
+ set_default_options(&options);
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Adjust to 0-based indexing */
+ for (i = 0; i < *nnz; ++i) --rowind[i];
+ for (i = 0; i <= *n; ++i) --colptr[i];
+
+ dCreate_CompCol_Matrix(&A, *n, *n, *nnz, values, rowind, colptr,
+ SLU_NC, SLU_D, SLU_GE);
+ L = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ U = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ if ( !(perm_r = intMalloc(*n)) ) ABORT("Malloc fails for perm_r[].");
+ if ( !(perm_c = intMalloc(*n)) ) ABORT("Malloc fails for perm_c[].");
+ if ( !(etree = intMalloc(*n)) ) ABORT("Malloc fails for etree[].");
+
+ /*
+ * Get column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = 0: natural ordering
+ * permc_spec = 1: minimum degree on structure of A'*A
+ * permc_spec = 2: minimum degree on structure of A'+A
+ * permc_spec = 3: approximate minimum degree for unsymmetric matrices
+ */
+ permc_spec = 3;
+ get_perm_c(permc_spec, &A, perm_c);
+
+ sp_preorder(&options, &A, perm_c, etree, &AC);
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+
+ dgstrf(&options, &AC, drop_tol, relax, panel_size,
+ etree, NULL, 0, perm_c, perm_r, L, U, &stat, info);
+
+ if ( *info == 0 ) {
+ Lstore = (SCformat *) L->Store;
+ Ustore = (NCformat *) U->Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz);
+ dQuerySpace(L, U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ } else {
+ printf("dgstrf() error returns INFO= %d\n", *info);
+ if ( *info <= *n ) { /* factorization completes */
+ dQuerySpace(L, U, &mem_usage);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ mem_usage.expansions);
+ }
+ }
+
+ /* Restore to 1-based indexing */
+ for (i = 0; i < *nnz; ++i) ++rowind[i];
+ for (i = 0; i <= *n; ++i) ++colptr[i];
+
+ /* Save the LU factors in the factors handle */
+ LUfactors = (factors_t*) SUPERLU_MALLOC(sizeof(factors_t));
+ LUfactors->L = L;
+ LUfactors->U = U;
+ LUfactors->perm_c = perm_c;
+ LUfactors->perm_r = perm_r;
+ factors[0] = (int) LUfactors;
+
+ /* Free un-wanted storage */
+ SUPERLU_FREE(etree);
+ Destroy_SuperMatrix_Store(&A);
+ Destroy_CompCol_Permuted(&AC);
+ StatFree(&stat);
+
+ } else if ( *iopt == 2 ) { /* Triangular solve */
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* Extract the LU factors in the factors handle */
+ LUfactors = (factors_t*) factors[0];
+ L = LUfactors->L;
+ U = LUfactors->U;
+ perm_c = LUfactors->perm_c;
+ perm_r = LUfactors->perm_r;
+
+ dCreate_Dense_Matrix(&B, *n, *nrhs, b, *ldb, SLU_DN, SLU_D, SLU_GE);
+
+ /* Solve the system A*X=B, overwriting B with X. */
+ dgstrs (trans, L, U, perm_c, perm_r, &B, &stat, info);
+
+ Destroy_SuperMatrix_Store(&B);
+ StatFree(&stat);
+
+ } else if ( *iopt == 3 ) { /* Free storage */
+ /* Free the LU factors in the factors handle */
+ LUfactors = (factors_t*) factors[0];
+ SUPERLU_FREE (LUfactors->perm_r);
+ SUPERLU_FREE (LUfactors->perm_c);
+ Destroy_SuperNode_Matrix(LUfactors->L);
+ Destroy_CompCol_Matrix(LUfactors->U);
+ SUPERLU_FREE (LUfactors->L);
+ SUPERLU_FREE (LUfactors->U);
+ SUPERLU_FREE (LUfactors);
+ } else {
+ fprintf(stderr,"Invalid iopt=%d passed to c_fortran_dgssv()\n",*iopt);
+ exit(-1);
+ }
+}
+
+
diff --git a/FORTRAN/f77_main.f b/FORTRAN/f77_main.f
new file mode 100644
index 0000000..28efb22
--- /dev/null
+++ b/FORTRAN/f77_main.f
@@ -0,0 +1,48 @@
+ program f77_main
+ integer maxn, maxnz
+ parameter ( maxn = 10000, maxnz = 100000 )
+ integer rowind(maxnz), colptr(maxn)
+ real*8 values(maxnz), b(maxn)
+ integer n, nnz, nrhs, ldb, info
+ integer factors, iopt
+*
+ call hbcode1(n, n, nnz, values, rowind, colptr)
+*
+ nrhs = 1
+ ldb = n
+ do i = 1, n
+ b(i) = 1
+ enddo
+*
+* First, factorize the matrix. The factors are stored in *factors* handle.
+ iopt = 1
+ call c_fortran_dgssv( iopt, n, nnz, nrhs, values, rowind, colptr,
+ $ b, ldb, factors, info )
+*
+ if (info .eq. 0) then
+ write (*,*) 'Factorization succeeded'
+ else
+ write(*,*) 'INFO from factorization = ', info
+ endif
+*
+* Second, solve the system using the existing factors.
+ iopt = 2
+ call c_fortran_dgssv( iopt, n, nnz, nrhs, values, rowind, colptr,
+ $ b, ldb, factors, info )
+*
+ if (info .eq. 0) then
+ write (*,*) 'Solve succeeded'
+ write (*,*) (b(i), i=1, 10)
+ else
+ write(*,*) 'INFO from triangular solve = ', info
+ endif
+
+* Last, free the storage allocated inside SuperLU
+ iopt = 3
+ call c_fortran_dgssv( iopt, n, nnz, nrhs, values, rowind, colptr,
+ $ b, ldb, factors, info )
+*
+ stop
+ end
+
+
diff --git a/FORTRAN/f77_main.f.old b/FORTRAN/f77_main.f.old
new file mode 100644
index 0000000..aa7e429
--- /dev/null
+++ b/FORTRAN/f77_main.f.old
@@ -0,0 +1,48 @@
+ program f77_main
+ integer maxn, maxnz
+ parameter ( maxn = 10000, maxnz = 100000 )
+ integer rowind(maxnz), colptr(maxn)
+ real*8 values(maxnz), b(maxn)
+ integer n, nnz, nrhs, ldb, info
+ integer factors(8), iopt
+*
+ call hbcode1(n, n, nnz, values, rowind, colptr)
+*
+ nrhs = 1
+ ldb = n
+ do i = 1, n
+ b(i) = 1
+ enddo
+*
+* First, factorize the matrix. The factors are stored in factor() handle.
+ iopt = 1
+ call c_fortran_dgssv( iopt, n, nnz, nrhs, values, rowind, colptr,
+ $ b, ldb, factors, info )
+*
+ if (info .eq. 0) then
+ write (*,*) 'Factorization succeeded'
+ else
+ write(*,*) 'INFO from factorization = ', info
+ endif
+*
+* Second, solve the system using the existing factors.
+ iopt = 2
+ call c_fortran_dgssv( iopt, n, nnz, nrhs, values, rowind, colptr,
+ $ b, ldb, factors, info )
+*
+ if (info .eq. 0) then
+ write (*,*) 'Solve succeeded'
+ write (*,*) (b(i), i=1, 10)
+ else
+ write(*,*) 'INFO from triangular solve = ', info
+ endif
+
+* Last, free the storage allocated inside SuperLU
+ iopt = 3
+ call c_fortran_dgssv( iopt, n, nnz, nrhs, values, rowind, colptr,
+ $ b, ldb, factors, info )
+*
+ stop
+ end
+
+
diff --git a/FORTRAN/hbcode1.f b/FORTRAN/hbcode1.f
new file mode 100644
index 0000000..df63c6c
--- /dev/null
+++ b/FORTRAN/hbcode1.f
@@ -0,0 +1,46 @@
+ subroutine hbcode1(nrow, ncol, nnzero, values, rowind, colptr)
+
+C ================================================================
+C ... SAMPLE CODE FOR READING A SPARSE MATRIX IN STANDARD FORMAT
+C ================================================================
+
+ CHARACTER TITLE*72 , KEY*8 , MXTYPE*3 ,
+ 1 PTRFMT*16, INDFMT*16, VALFMT*20, RHSFMT*20
+
+ INTEGER TOTCRD, PTRCRD, INDCRD, VALCRD, RHSCRD,
+ 1 NROW , NCOL , NNZERO, NELTVL
+
+ INTEGER COLPTR (*), ROWIND (*)
+
+ REAL*8 VALUES (*)
+
+C ------------------------
+C ... READ IN HEADER BLOCK
+C ------------------------
+
+ READ ( *, 1000 ) TITLE , KEY ,
+ 1 TOTCRD, PTRCRD, INDCRD, VALCRD, RHSCRD,
+ 2 MXTYPE, NROW , NCOL , NNZERO, NELTVL,
+ 3 PTRFMT, INDFMT, VALFMT, RHSFMT
+ 1000 FORMAT ( A72, A8 / 5I14 / A3, 11X, 4I14 / 2A16, 2A20 )
+
+C -------------------------
+C ... READ MATRIX STRUCTURE
+C -------------------------
+
+ READ ( *, PTRFMT ) ( COLPTR (I), I = 1, NCOL+1 )
+
+ READ ( *, INDFMT ) ( ROWIND (I), I = 1, NNZERO )
+
+ IF ( VALCRD .GT. 0 ) THEN
+
+C ----------------------
+C ... READ MATRIX VALUES
+C ----------------------
+
+ READ ( *, VALFMT ) ( VALUES (I), I = 1, NNZERO )
+
+ ENDIF
+
+ return
+ end
diff --git a/INSTALL/Makefile b/INSTALL/Makefile
new file mode 100644
index 0000000..a8f77ec
--- /dev/null
+++ b/INSTALL/Makefile
@@ -0,0 +1,26 @@
+include ../make.inc
+
+all: testdlamch testslamch testtimer install.out
+
+testdlamch: dlamch.o lsame.o dlamchtst.o
+ $(LOADER) -o testdlamch dlamch.o lsame.o dlamchtst.o
+
+testslamch: slamch.o lsame.o slamchtst.o
+ $(LOADER) -o testslamch slamch.o lsame.o slamchtst.o
+
+testtimer: superlu_timer.o timertst.o
+ $(LOADER) -o testtimer superlu_timer.o timertst.o
+
+install.out: install.csh
+ @echo Testing machines parameters and timer
+ csh install.csh
+
+slamch.o: slamch.c ; $(CC) -c $(NOOPTS) $<
+dlamch.o: dlamch.c ; $(CC) -c $(NOOPTS) $<
+superlu_timer.o: superlu_timer.c; $(CC) -c $(NOOPTS) $<
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+clean:
+ rm -f *.o test* *.out
diff --git a/INSTALL/dlamch.c b/INSTALL/dlamch.c
new file mode 100644
index 0000000..6db3da6
--- /dev/null
+++ b/INSTALL/dlamch.c
@@ -0,0 +1,963 @@
+#include <stdio.h>
+#define TRUE_ (1)
+#define FALSE_ (0)
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+
+double dlamch_(char *cmach)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+ Purpose
+ =======
+
+ DLAMCH determines double precision machine parameters.
+
+ Arguments
+ =========
+
+ CMACH (input) CHARACTER*1
+ Specifies the value to be returned by DLAMCH:
+ = 'E' or 'e', DLAMCH := eps
+ = 'S' or 's , DLAMCH := sfmin
+ = 'B' or 'b', DLAMCH := base
+ = 'P' or 'p', DLAMCH := eps*base
+ = 'N' or 'n', DLAMCH := t
+ = 'R' or 'r', DLAMCH := rnd
+ = 'M' or 'm', DLAMCH := emin
+ = 'U' or 'u', DLAMCH := rmin
+ = 'L' or 'l', DLAMCH := emax
+ = 'O' or 'o', DLAMCH := rmax
+
+ where
+
+ eps = relative machine precision
+ sfmin = safe minimum, such that 1/sfmin does not overflow
+ base = base of the machine
+ prec = eps*base
+ t = number of (base) digits in the mantissa
+ rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+ emin = minimum exponent before (gradual) underflow
+ rmin = underflow threshold - base**(emin-1)
+ emax = largest exponent before overflow
+ rmax = overflow threshold - (base**emax)*(1-eps)
+
+ =====================================================================
+*/
+
+ static int first = TRUE_;
+
+ /* System generated locals */
+ int i__1;
+ double ret_val;
+ /* Builtin functions */
+ double pow_di(double *, int *);
+ /* Local variables */
+ static double base;
+ static int beta;
+ static double emin, prec, emax;
+ static int imin, imax;
+ static int lrnd;
+ static double rmin, rmax, t, rmach;
+/* extern int lsame_(char *, char *);*/
+ static double small, sfmin;
+ extern /* Subroutine */ int dlamc2_(int *, int *, int *,
+ double *, int *, double *, int *, double *);
+ static int it;
+ static double rnd, eps;
+
+ if (first) {
+ first = FALSE_;
+ dlamc2_(&beta, &it, &lrnd, &eps, &imin, &rmin, &imax, &rmax);
+ base = (double) beta;
+ t = (double) it;
+ if (lrnd) {
+ rnd = 1.;
+ i__1 = 1 - it;
+ eps = pow_di(&base, &i__1) / 2;
+ } else {
+ rnd = 0.;
+ i__1 = 1 - it;
+ eps = pow_di(&base, &i__1);
+ }
+ prec = eps * base;
+ emin = (double) imin;
+ emax = (double) imax;
+ sfmin = rmin;
+ small = 1. / rmax;
+ if (small >= sfmin) {
+
+ /* Use SMALL plus a bit, to avoid the possibility of rounding
+ causing overflow when computing 1/sfmin. */
+ sfmin = small * (eps + 1.);
+ }
+ }
+
+ if (lsame_(cmach, "E")) {
+ rmach = eps;
+ } else if (lsame_(cmach, "S")) {
+ rmach = sfmin;
+ } else if (lsame_(cmach, "B")) {
+ rmach = base;
+ } else if (lsame_(cmach, "P")) {
+ rmach = prec;
+ } else if (lsame_(cmach, "N")) {
+ rmach = t;
+ } else if (lsame_(cmach, "R")) {
+ rmach = rnd;
+ } else if (lsame_(cmach, "M")) {
+ rmach = emin;
+ } else if (lsame_(cmach, "U")) {
+ rmach = rmin;
+ } else if (lsame_(cmach, "L")) {
+ rmach = emax;
+ } else if (lsame_(cmach, "O")) {
+ rmach = rmax;
+ }
+
+ ret_val = rmach;
+ return ret_val;
+
+/* End of DLAMCH */
+
+} /* dlamch_ */
+
+
+/* Subroutine */ int dlamc1_(int *beta, int *t, int *rnd, int
+ *ieee1)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC1 determines the machine parameters given by BETA, T, RND, and
+ IEEE1.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ IEEE1 (output) INT
+ Specifies whether rounding appears to be done in the IEEE
+ 'round to nearest' style.
+
+ Further Details
+ ===============
+
+ The routine is based on the routine ENVRON by Malcolm and
+ incorporates suggestions by Gentleman and Marovich. See
+
+ Malcolm M. A. (1972) Algorithms to reveal properties of
+ floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+
+ Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+ that reveal properties of floating point arithmetic units.
+ Comms. of the ACM, 17, 276-277.
+
+ =====================================================================
+*/
+ /* Initialized data */
+ static int first = TRUE_;
+ /* System generated locals */
+ double d__1, d__2;
+ /* Local variables */
+ static int lrnd;
+ static double a, b, c, f;
+ static int lbeta;
+ static double savec;
+ extern double dlamc3_(double *, double *);
+ static int lieee1;
+ static double t1, t2;
+ static int lt;
+ static double one, qtr;
+
+ if (first) {
+ first = FALSE_;
+ one = 1.;
+
+/* LBETA, LIEEE1, LT and LRND are the local values of BE
+TA,
+ IEEE1, T and RND.
+
+ Throughout this routine we use the function DLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ Compute a = 2.0**m with the smallest positive integer m s
+uch
+ that
+
+ fl( a + 1.0 ) = a. */
+
+ a = 1.;
+ c = 1.;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L10:
+ if (c == one) {
+ a *= 2;
+ c = dlamc3_(&a, &one);
+ d__1 = -a;
+ c = dlamc3_(&c, &d__1);
+ goto L10;
+ }
+/* + END WHILE
+
+ Now compute b = 2.0**m with the smallest positive integer
+m
+ such that
+
+ fl( a + b ) .gt. a. */
+
+ b = 1.;
+ c = dlamc3_(&a, &b);
+
+/* + WHILE( C.EQ.A )LOOP */
+L20:
+ if (c == a) {
+ b *= 2;
+ c = dlamc3_(&a, &b);
+ goto L20;
+ }
+/* + END WHILE
+
+ Now compute the base. a and c are neighbouring floating po
+int
+ numbers in the interval ( beta**t, beta**( t + 1 ) ) and
+ so
+ their difference is beta. Adding 0.25 to c is to ensure that
+ it
+ is truncated to beta and not ( beta - 1 ). */
+
+ qtr = one / 4;
+ savec = c;
+ d__1 = -a;
+ c = dlamc3_(&c, &d__1);
+ lbeta = (int) (c + qtr);
+
+/* Now determine whether rounding or chopping occurs, by addin
+g a
+ bit less than beta/2 and a bit more than beta/2 to
+ a. */
+
+ b = (double) lbeta;
+ d__1 = b / 2;
+ d__2 = -b / 100;
+ f = dlamc3_(&d__1, &d__2);
+ c = dlamc3_(&f, &a);
+ if (c == a) {
+ lrnd = TRUE_;
+ } else {
+ lrnd = FALSE_;
+ }
+ d__1 = b / 2;
+ d__2 = b / 100;
+ f = dlamc3_(&d__1, &d__2);
+ c = dlamc3_(&f, &a);
+ if (lrnd && c == a) {
+ lrnd = FALSE_;
+ }
+
+/* Try and decide whether rounding is done in the IEEE 'round
+ to
+ nearest' style. B/2 is half a unit in the last place of the
+two
+ numbers A and SAVEC. Furthermore, A is even, i.e. has last
+bit
+ zero, and SAVEC is odd. Thus adding B/2 to A should not cha
+nge
+ A, but adding B/2 to SAVEC should change SAVEC. */
+
+ d__1 = b / 2;
+ t1 = dlamc3_(&d__1, &a);
+ d__1 = b / 2;
+ t2 = dlamc3_(&d__1, &savec);
+ lieee1 = t1 == a && t2 > savec && lrnd;
+
+/* Now find the mantissa, t. It should be the integer part
+ of
+ log to the base beta of a, however it is safer to determine
+ t
+ by powering. So we find t as the smallest positive integer
+for
+ which
+
+ fl( beta**t + 1.0 ) = 1.0. */
+
+ lt = 0;
+ a = 1.;
+ c = 1.;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L30:
+ if (c == one) {
+ ++lt;
+ a *= lbeta;
+ c = dlamc3_(&a, &one);
+ d__1 = -a;
+ c = dlamc3_(&c, &d__1);
+ goto L30;
+ }
+/* + END WHILE */
+
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *ieee1 = lieee1;
+ return 0;
+
+/* End of DLAMC1 */
+
+} /* dlamc1_ */
+
+
+/* Subroutine */ int dlamc2_(int *beta, int *t, int *rnd,
+ double *eps, int *emin, double *rmin, int *emax,
+ double *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC2 determines the machine parameters specified in its argument
+ list.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ EPS (output) DOUBLE PRECISION
+ The smallest positive number such that
+
+ fl( 1.0 - EPS ) .LT. 1.0,
+
+ where fl denotes the computed value.
+
+ EMIN (output) INT
+ The minimum exponent before (gradual) underflow occurs.
+
+ RMIN (output) DOUBLE PRECISION
+ The smallest normalized number for the machine, given by
+ BASE**( EMIN - 1 ), where BASE is the floating point value
+
+ of BETA.
+
+ EMAX (output) INT
+ The maximum exponent before overflow occurs.
+
+ RMAX (output) DOUBLE PRECISION
+ The largest positive number for the machine, given by
+ BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
+
+ value of BETA.
+
+ Further Details
+ ===============
+
+ The computation of EPS is based on a routine PARANOIA by
+ W. Kahan of the University of California at Berkeley.
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ static int c__1 = 1;
+
+ /* Initialized data */
+ static int first = TRUE_;
+ static int iwarn = FALSE_;
+ /* System generated locals */
+ int i__1;
+ double d__1, d__2, d__3, d__4, d__5;
+ /* Builtin functions */
+ double pow_di(double *, int *);
+ /* Local variables */
+ static int ieee;
+ static double half;
+ static int lrnd;
+ static double leps, zero, a, b, c;
+ static int i, lbeta;
+ static double rbase;
+ static int lemin, lemax, gnmin;
+ static double small;
+ static int gpmin;
+ static double third, lrmin, lrmax, sixth;
+ extern /* Subroutine */ int dlamc1_(int *, int *, int *,
+ int *);
+ extern double dlamc3_(double *, double *);
+ static int lieee1;
+ extern /* Subroutine */ int dlamc4_(int *, double *, int *),
+ dlamc5_(int *, int *, int *, int *, int *,
+ double *);
+ static int lt, ngnmin, ngpmin;
+ static double one, two;
+
+ if (first) {
+ first = FALSE_;
+ zero = 0.;
+ one = 1.;
+ two = 2.;
+
+/* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values
+ of
+ BETA, T, RND, EPS, EMIN and RMIN.
+
+ Throughout this routine we use the function DLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1.
+*/
+
+ dlamc1_(&lbeta, <, &lrnd, &lieee1);
+
+/* Start to find EPS. */
+
+ b = (double) lbeta;
+ i__1 = -lt;
+ a = pow_di(&b, &i__1);
+ leps = a;
+
+/* Try some tricks to see whether or not this is the correct E
+PS. */
+
+ b = two / 3;
+ half = one / 2;
+ d__1 = -half;
+ sixth = dlamc3_(&b, &d__1);
+ third = dlamc3_(&sixth, &sixth);
+ d__1 = -half;
+ b = dlamc3_(&third, &d__1);
+ b = dlamc3_(&b, &sixth);
+ b = abs(b);
+ if (b < leps) {
+ b = leps;
+ }
+
+ leps = 1.;
+
+/* + WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP */
+L10:
+ if (leps > b && b > zero) {
+ leps = b;
+ d__1 = half * leps;
+/* Computing 5th power */
+ d__3 = two, d__4 = d__3, d__3 *= d__3;
+/* Computing 2nd power */
+ d__5 = leps;
+ d__2 = d__4 * (d__3 * d__3) * (d__5 * d__5);
+ c = dlamc3_(&d__1, &d__2);
+ d__1 = -c;
+ c = dlamc3_(&half, &d__1);
+ b = dlamc3_(&half, &c);
+ d__1 = -b;
+ c = dlamc3_(&half, &d__1);
+ b = dlamc3_(&half, &c);
+ goto L10;
+ }
+/* + END WHILE */
+
+ if (a < leps) {
+ leps = a;
+ }
+
+/* Computation of EPS complete.
+
+ Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3
+)).
+ Keep dividing A by BETA until (gradual) underflow occurs. T
+his
+ is detected when we cannot recover the previous A. */
+
+ rbase = one / lbeta;
+ small = one;
+ for (i = 1; i <= 3; ++i) {
+ d__1 = small * rbase;
+ small = dlamc3_(&d__1, &zero);
+/* L20: */
+ }
+ a = dlamc3_(&one, &small);
+ dlamc4_(&ngpmin, &one, &lbeta);
+ d__1 = -one;
+ dlamc4_(&ngnmin, &d__1, &lbeta);
+ dlamc4_(&gpmin, &a, &lbeta);
+ d__1 = -a;
+ dlamc4_(&gnmin, &d__1, &lbeta);
+ ieee = FALSE_;
+
+ if (ngpmin == ngnmin && gpmin == gnmin) {
+ if (ngpmin == gpmin) {
+ lemin = ngpmin;
+/* ( Non twos-complement machines, no gradual under
+flow;
+ e.g., VAX ) */
+ } else if (gpmin - ngpmin == 3) {
+ lemin = ngpmin - 1 + lt;
+ ieee = TRUE_;
+/* ( Non twos-complement machines, with gradual und
+erflow;
+ e.g., IEEE standard followers ) */
+ } else {
+ lemin = min(ngpmin,gpmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if (ngpmin == gpmin && ngnmin == gnmin) {
+ if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1) {
+ lemin = max(ngpmin,ngnmin);
+/* ( Twos-complement machines, no gradual underflow
+;
+ e.g., CYBER 205 ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1 && gpmin == gnmin)
+ {
+ if (gpmin - min(ngpmin,ngnmin) == 3) {
+ lemin = max(ngpmin,ngnmin) - 1 + lt;
+/* ( Twos-complement machines with gradual underflo
+w;
+ no known machine ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else {
+/* Computing MIN */
+ i__1 = min(ngpmin,ngnmin), i__1 = min(i__1,gpmin);
+ lemin = min(i__1,gnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+/* **
+ Comment out this if block if EMIN is ok */
+ if (iwarn) {
+ first = TRUE_;
+ printf("\n\n WARNING. The value EMIN may be incorrect:- ");
+ printf("EMIN = %8i\n",lemin);
+ printf("If, after inspection, the value EMIN looks acceptable");
+ printf("please comment out \n the IF block as marked within the");
+ printf("code of routine DLAMC2, \n otherwise supply EMIN");
+ printf("explicitly.\n");
+ }
+/* **
+
+ Assume IEEE arithmetic if we found denormalised numbers abo
+ve,
+ or if arithmetic seems to round in the IEEE style, determi
+ned
+ in routine DLAMC1. A true IEEE machine should have both thi
+ngs
+ true; however, faulty machines may have one or the other. */
+
+ ieee = ieee || lieee1;
+
+/* Compute RMIN by successive division by BETA. We could comp
+ute
+ RMIN as BASE**( EMIN - 1 ), but some machines underflow dur
+ing
+ this computation. */
+
+ lrmin = 1.;
+ i__1 = 1 - lemin;
+ for (i = 1; i <= 1-lemin; ++i) {
+ d__1 = lrmin * rbase;
+ lrmin = dlamc3_(&d__1, &zero);
+/* L30: */
+ }
+
+/* Finally, call DLAMC5 to compute EMAX and RMAX. */
+
+ dlamc5_(&lbeta, <, &lemin, &ieee, &lemax, &lrmax);
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *eps = leps;
+ *emin = lemin;
+ *rmin = lrmin;
+ *emax = lemax;
+ *rmax = lrmax;
+
+ return 0;
+
+
+/* End of DLAMC2 */
+
+} /* dlamc2_ */
+
+
+double dlamc3_(double *a, double *b)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC3 is intended to force A and B to be stored prior to doing
+
+ the addition of A and B , for use in situations where optimizers
+
+ might hold one of these in a register.
+
+ Arguments
+ =========
+
+ A, B (input) DOUBLE PRECISION
+ The values A and B.
+
+ =====================================================================
+*/
+/* >>Start of File<<
+ System generated locals */
+ double ret_val;
+
+ ret_val = *a + *b;
+
+ return ret_val;
+
+/* End of DLAMC3 */
+
+} /* dlamc3_ */
+
+
+/* Subroutine */ int dlamc4_(int *emin, double *start, int *base)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC4 is a service routine for DLAMC2.
+
+ Arguments
+ =========
+
+ EMIN (output) EMIN
+ The minimum exponent before (gradual) underflow, computed by
+
+ setting A = START and dividing by BASE until the previous A
+ can not be recovered.
+
+ START (input) DOUBLE PRECISION
+ The starting point for determining EMIN.
+
+ BASE (input) INT
+ The base of the machine.
+
+ =====================================================================
+*/
+ /* System generated locals */
+ int i__1;
+ double d__1;
+ /* Local variables */
+ static double zero, a;
+ static int i;
+ static double rbase, b1, b2, c1, c2, d1, d2;
+ extern double dlamc3_(double *, double *);
+ static double one;
+
+ a = *start;
+ one = 1.;
+ rbase = one / *base;
+ zero = 0.;
+ *emin = 1;
+ d__1 = a * rbase;
+ b1 = dlamc3_(&d__1, &zero);
+ c1 = a;
+ c2 = a;
+ d1 = a;
+ d2 = a;
+/* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
+ $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP */
+L10:
+ if (c1 == a && c2 == a && d1 == a && d2 == a) {
+ --(*emin);
+ a = b1;
+ d__1 = a / *base;
+ b1 = dlamc3_(&d__1, &zero);
+ d__1 = b1 * *base;
+ c1 = dlamc3_(&d__1, &zero);
+ d1 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d1 += b1;
+/* L20: */
+ }
+ d__1 = a * rbase;
+ b2 = dlamc3_(&d__1, &zero);
+ d__1 = b2 / rbase;
+ c2 = dlamc3_(&d__1, &zero);
+ d2 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d2 += b2;
+/* L30: */
+ }
+ goto L10;
+ }
+/* + END WHILE */
+
+ return 0;
+
+/* End of DLAMC4 */
+
+} /* dlamc4_ */
+
+
+/* Subroutine */ int dlamc5_(int *beta, int *p, int *emin,
+ int *ieee, int *emax, double *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC5 attempts to compute RMAX, the largest machine floating-point
+ number, without overflow. It assumes that EMAX + abs(EMIN) sum
+ approximately to a power of 2. It will fail on machines where this
+ assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
+
+ EMAX = 28718). It will also fail if the value supplied for EMIN is
+ too large (i.e. too close to zero), probably with overflow.
+
+ Arguments
+ =========
+
+ BETA (input) INT
+ The base of floating-point arithmetic.
+
+ P (input) INT
+ The number of base BETA digits in the mantissa of a
+ floating-point value.
+
+ EMIN (input) INT
+ The minimum exponent before (gradual) underflow.
+
+ IEEE (input) INT
+ A int flag specifying whether or not the arithmetic
+ system is thought to comply with the IEEE standard.
+
+ EMAX (output) INT
+ The largest exponent before overflow
+
+ RMAX (output) DOUBLE PRECISION
+ The largest machine floating-point number.
+
+ =====================================================================
+
+
+
+ First compute LEXP and UEXP, two powers of 2 that bound
+ abs(EMIN). We then assume that EMAX + abs(EMIN) will sum
+ approximately to the bound that is closest to abs(EMIN).
+ (EMAX is the exponent of the required number RMAX). */
+ /* Table of constant values */
+ static double c_b5 = 0.;
+
+ /* System generated locals */
+ int i__1;
+ double d__1;
+ /* Local variables */
+ static int lexp;
+ static double oldy;
+ static int uexp, i;
+ static double y, z;
+ static int nbits;
+ extern double dlamc3_(double *, double *);
+ static double recbas;
+ static int exbits, expsum, try__;
+
+
+
+ lexp = 1;
+ exbits = 1;
+L10:
+ try__ = lexp << 1;
+ if (try__ <= -(*emin)) {
+ lexp = try__;
+ ++exbits;
+ goto L10;
+ }
+ if (lexp == -(*emin)) {
+ uexp = lexp;
+ } else {
+ uexp = try__;
+ ++exbits;
+ }
+
+/* Now -LEXP is less than or equal to EMIN, and -UEXP is greater
+ than or equal to EMIN. EXBITS is the number of bits needed to
+ store the exponent. */
+
+ if (uexp + *emin > -lexp - *emin) {
+ expsum = lexp << 1;
+ } else {
+ expsum = uexp << 1;
+ }
+
+/* EXPSUM is the exponent range, approximately equal to
+ EMAX - EMIN + 1 . */
+
+ *emax = expsum + *emin - 1;
+ nbits = exbits + 1 + *p;
+
+/* NBITS is the total number of bits needed to store a
+ floating-point number. */
+
+ if (nbits % 2 == 1 && *beta == 2) {
+
+/* Either there are an odd number of bits used to store a
+ floating-point number, which is unlikely, or some bits are
+
+ not used in the representation of numbers, which is possible
+,
+ (e.g. Cray machines) or the mantissa has an implicit bit,
+ (e.g. IEEE machines, Dec Vax machines), which is perhaps the
+
+ most likely. We have to assume the last alternative.
+ If this is true, then we need to reduce EMAX by one because
+
+ there must be some way of representing zero in an implicit-b
+it
+ system. On machines like Cray, we are reducing EMAX by one
+
+ unnecessarily. */
+
+ --(*emax);
+ }
+
+ if (*ieee) {
+
+/* Assume we are on an IEEE machine which reserves one exponent
+
+ for infinity and NaN. */
+
+ --(*emax);
+ }
+
+/* Now create RMAX, the largest machine number, which should
+ be equal to (1.0 - BETA**(-P)) * BETA**EMAX .
+
+ First compute 1.0 - BETA**(-P), being careful that the
+ result is less than 1.0 . */
+
+ recbas = 1. / *beta;
+ z = *beta - 1.;
+ y = 0.;
+ i__1 = *p;
+ for (i = 1; i <= *p; ++i) {
+ z *= recbas;
+ if (y < 1.) {
+ oldy = y;
+ }
+ y = dlamc3_(&y, &z);
+/* L20: */
+ }
+ if (y >= 1.) {
+ y = oldy;
+ }
+
+/* Now multiply by BETA**EMAX to get RMAX. */
+
+ i__1 = *emax;
+ for (i = 1; i <= *emax; ++i) {
+ d__1 = y * *beta;
+ y = dlamc3_(&d__1, &c_b5);
+/* L30: */
+ }
+
+ *rmax = y;
+ return 0;
+
+/* End of DLAMC5 */
+
+} /* dlamc5_ */
+
+double pow_di(double *ap, int *bp)
+{
+ double pow, x;
+ int n;
+
+ pow = 1;
+ x = *ap;
+ n = *bp;
+
+ if(n != 0){
+ if(n < 0) {
+ n = -n;
+ x = 1/x;
+ }
+ for( ; ; ) {
+ if(n & 01) pow *= x;
+ if(n >>= 1) x *= x;
+ else break;
+ }
+ }
+ return(pow);
+}
+
diff --git a/INSTALL/dlamchtst.c b/INSTALL/dlamchtst.c
new file mode 100644
index 0000000..e589d23
--- /dev/null
+++ b/INSTALL/dlamchtst.c
@@ -0,0 +1,34 @@
+#include <stdio.h>
+
+
+main()
+{
+ /* Local variables */
+ double base, emin, prec, emax, rmin, rmax, t, sfmin;
+ extern double dlamch_(char *);
+ double rnd, eps;
+
+ eps = dlamch_("Epsilon");
+ sfmin = dlamch_("Safe minimum");
+ base = dlamch_("Base");
+ prec = dlamch_("Precision");
+ t = dlamch_("Number of digits in mantissa");
+ rnd = dlamch_("Rounding mode");
+ emin = dlamch_("Minnimum exponent");
+ rmin = dlamch_("Underflow threshold");
+ emax = dlamch_("Largest exponent");
+ rmax = dlamch_("Overflow threshold");
+
+ printf(" Epsilon = %e\n", eps);
+ printf(" Safe minimum = %e\n", sfmin);
+ printf(" Base = %.0f\n", base);
+ printf(" Precision = %e\n", prec);
+ printf(" Number of digits in mantissa = %.0f\n", t);
+ printf(" Rounding mode = %.0f\n", rnd);
+ printf(" Minimum exponent = %.0f\n", emin);
+ printf(" Underflow threshold = %e\n", rmin);
+ printf(" Largest exponent = %.0f\n", emax);
+ printf(" Overflow threshold = %e\n", rmax);
+ printf(" Reciprocal of safe minimum = %e\n", 1./sfmin);
+ return 0;
+}
diff --git a/INSTALL/install.csh b/INSTALL/install.csh
new file mode 100755
index 0000000..57e9e74
--- /dev/null
+++ b/INSTALL/install.csh
@@ -0,0 +1,14 @@
+#! /bin/csh
+
+set ofile = install.out # output file
+
+echo '---- SINGLE PRECISION' >! $ofile
+./testslamch >> $ofile
+echo '' >> $ofile
+echo ---- DOUBLE PRECISION >> $ofile
+./testdlamch >> $ofile
+echo '' >> $ofile
+echo ---- TIMER >> $ofile
+./testtimer >> $ofile
+
+
diff --git a/INSTALL/lsame.c b/INSTALL/lsame.c
new file mode 100644
index 0000000..fba47c6
--- /dev/null
+++ b/INSTALL/lsame.c
@@ -0,0 +1,70 @@
+int lsame_(char *ca, char *cb)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+ Purpose
+ =======
+
+ LSAME returns .TRUE. if CA is the same letter as CB regardless of case.
+
+ Arguments
+ =========
+
+ CA (input) CHARACTER*1
+ CB (input) CHARACTER*1
+ CA and CB specify the single characters to be compared.
+
+ =====================================================================
+*/
+
+ /* System generated locals */
+ int ret_val;
+
+ /* Local variables */
+ int inta, intb, zcode;
+
+ ret_val = *(unsigned char *)ca == *(unsigned char *)cb;
+ if (ret_val) {
+ return ret_val;
+ }
+
+ /* Now test for equivalence if both characters are alphabetic. */
+
+ zcode = 'Z';
+
+ /* Use 'Z' rather than 'A' so that ASCII can be detected on Prime
+ machines, on which ICHAR returns a value with bit 8 set.
+ ICHAR('A') on Prime machines returns 193 which is the same as
+ ICHAR('A') on an EBCDIC machine. */
+
+ inta = *(unsigned char *)ca;
+ intb = *(unsigned char *)cb;
+
+ if (zcode == 90 || zcode == 122) {
+ /* ASCII is assumed - ZCODE is the ASCII code of either lower or
+ upper case 'Z'. */
+ if (inta >= 97 && inta <= 122) inta += -32;
+ if (intb >= 97 && intb <= 122) intb += -32;
+
+ } else if (zcode == 233 || zcode == 169) {
+ /* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or
+ upper case 'Z'. */
+ if (inta >= 129 && inta <= 137 || inta >= 145 && inta <= 153 || inta
+ >= 162 && inta <= 169)
+ inta += 64;
+ if (intb >= 129 && intb <= 137 || intb >= 145 && intb <= 153 || intb
+ >= 162 && intb <= 169)
+ intb += 64;
+ } else if (zcode == 218 || zcode == 250) {
+ /* ASCII is assumed, on Prime machines - ZCODE is the ASCII code
+ plus 128 of either lower or upper case 'Z'. */
+ if (inta >= 225 && inta <= 250) inta += -32;
+ if (intb >= 225 && intb <= 250) intb += -32;
+ }
+ ret_val = inta == intb;
+ return ret_val;
+
+} /* lsame_ */
diff --git a/INSTALL/slamch.c b/INSTALL/slamch.c
new file mode 100644
index 0000000..4e44ad4
--- /dev/null
+++ b/INSTALL/slamch.c
@@ -0,0 +1,982 @@
+#include <stdio.h>
+#define TRUE_ (1)
+#define FALSE_ (0)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define dabs(x) (double)abs(x)
+
+double slamch_(char *cmach)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMCH determines single precision machine parameters.
+
+ Arguments
+ =========
+
+ CMACH (input) CHARACTER*1
+ Specifies the value to be returned by SLAMCH:
+ = 'E' or 'e', SLAMCH := eps
+ = 'S' or 's , SLAMCH := sfmin
+ = 'B' or 'b', SLAMCH := base
+ = 'P' or 'p', SLAMCH := eps*base
+ = 'N' or 'n', SLAMCH := t
+ = 'R' or 'r', SLAMCH := rnd
+ = 'M' or 'm', SLAMCH := emin
+ = 'U' or 'u', SLAMCH := rmin
+ = 'L' or 'l', SLAMCH := emax
+ = 'O' or 'o', SLAMCH := rmax
+
+ where
+
+ eps = relative machine precision
+ sfmin = safe minimum, such that 1/sfmin does not overflow
+ base = base of the machine
+ prec = eps*base
+ t = number of (base) digits in the mantissa
+ rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+ emin = minimum exponent before (gradual) underflow
+ rmin = underflow threshold - base**(emin-1)
+ emax = largest exponent before overflow
+ rmax = overflow threshold - (base**emax)*(1-eps)
+
+ =====================================================================
+*/
+/* >>Start of File<<
+ Initialized data */
+ static int first = TRUE_;
+ /* System generated locals */
+ int i__1;
+ float ret_val;
+ /* Builtin functions */
+ double pow_ri(float *, int *);
+ /* Local variables */
+ static float base;
+ static int beta;
+ static float emin, prec, emax;
+ static int imin, imax;
+ static int lrnd;
+ static float rmin, rmax, t, rmach;
+ extern int lsame_(char *, char *);
+ static float small, sfmin;
+ extern /* Subroutine */ int slamc2_(int *, int *, int *, float
+ *, int *, float *, int *, float *);
+ static int it;
+ static float rnd, eps;
+
+
+
+ if (first) {
+ first = FALSE_;
+ slamc2_(&beta, &it, &lrnd, &eps, &imin, &rmin, &imax, &rmax);
+ base = (float) beta;
+ t = (float) it;
+ if (lrnd) {
+ rnd = 1.f;
+ i__1 = 1 - it;
+ eps = pow_ri(&base, &i__1) / 2;
+ } else {
+ rnd = 0.f;
+ i__1 = 1 - it;
+ eps = pow_ri(&base, &i__1);
+ }
+ prec = eps * base;
+ emin = (float) imin;
+ emax = (float) imax;
+ sfmin = rmin;
+ small = 1.f / rmax;
+ if (small >= sfmin) {
+
+/* Use SMALL plus a bit, to avoid the possibility of rou
+nding
+ causing overflow when computing 1/sfmin. */
+
+ sfmin = small * (eps + 1.f);
+ }
+ }
+
+ if (lsame_(cmach, "E")) {
+ rmach = eps;
+ } else if (lsame_(cmach, "S")) {
+ rmach = sfmin;
+ } else if (lsame_(cmach, "B")) {
+ rmach = base;
+ } else if (lsame_(cmach, "P")) {
+ rmach = prec;
+ } else if (lsame_(cmach, "N")) {
+ rmach = t;
+ } else if (lsame_(cmach, "R")) {
+ rmach = rnd;
+ } else if (lsame_(cmach, "M")) {
+ rmach = emin;
+ } else if (lsame_(cmach, "U")) {
+ rmach = rmin;
+ } else if (lsame_(cmach, "L")) {
+ rmach = emax;
+ } else if (lsame_(cmach, "O")) {
+ rmach = rmax;
+ }
+
+ ret_val = rmach;
+ return ret_val;
+
+/* End of SLAMCH */
+
+} /* slamch_ */
+
+
+/* Subroutine */ int slamc1_(int *beta, int *t, int *rnd, int
+ *ieee1)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC1 determines the machine parameters given by BETA, T, RND, and
+ IEEE1.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ IEEE1 (output) INT
+ Specifies whether rounding appears to be done in the IEEE
+ 'round to nearest' style.
+
+ Further Details
+ ===============
+
+ The routine is based on the routine ENVRON by Malcolm and
+ incorporates suggestions by Gentleman and Marovich. See
+
+ Malcolm M. A. (1972) Algorithms to reveal properties of
+ floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+
+ Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+ that reveal properties of floating point arithmetic units.
+ Comms. of the ACM, 17, 276-277.
+
+ =====================================================================
+*/
+ /* Initialized data */
+ static int first = TRUE_;
+ /* System generated locals */
+ float r__1, r__2;
+ /* Local variables */
+ static int lrnd;
+ static float a, b, c, f;
+ static int lbeta;
+ static float savec;
+ static int lieee1;
+ static float t1, t2;
+ extern double slamc3_(float *, float *);
+ static int lt;
+ static float one, qtr;
+
+
+
+ if (first) {
+ first = FALSE_;
+ one = 1.f;
+
+/* LBETA, LIEEE1, LT and LRND are the local values of BE
+TA,
+ IEEE1, T and RND.
+
+ Throughout this routine we use the function SLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ Compute a = 2.0**m with the smallest positive integer m s
+uch
+ that
+
+ fl( a + 1.0 ) = a. */
+
+ a = 1.f;
+ c = 1.f;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L10:
+ if (c == one) {
+ a *= 2;
+ c = slamc3_(&a, &one);
+ r__1 = -(double)a;
+ c = slamc3_(&c, &r__1);
+ goto L10;
+ }
+/* + END WHILE
+
+ Now compute b = 2.0**m with the smallest positive integer
+m
+ such that
+
+ fl( a + b ) .gt. a. */
+
+ b = 1.f;
+ c = slamc3_(&a, &b);
+
+/* + WHILE( C.EQ.A )LOOP */
+L20:
+ if (c == a) {
+ b *= 2;
+ c = slamc3_(&a, &b);
+ goto L20;
+ }
+/* + END WHILE
+
+ Now compute the base. a and c are neighbouring floating po
+int
+ numbers in the interval ( beta**t, beta**( t + 1 ) ) and
+ so
+ their difference is beta. Adding 0.25 to c is to ensure that
+ it
+ is truncated to beta and not ( beta - 1 ). */
+
+ qtr = one / 4;
+ savec = c;
+ r__1 = -(double)a;
+ c = slamc3_(&c, &r__1);
+ lbeta = c + qtr;
+
+/* Now determine whether rounding or chopping occurs, by addin
+g a
+ bit less than beta/2 and a bit more than beta/2 to
+ a. */
+
+ b = (float) lbeta;
+ r__1 = b / 2;
+ r__2 = -(double)b / 100;
+ f = slamc3_(&r__1, &r__2);
+ c = slamc3_(&f, &a);
+ if (c == a) {
+ lrnd = TRUE_;
+ } else {
+ lrnd = FALSE_;
+ }
+ r__1 = b / 2;
+ r__2 = b / 100;
+ f = slamc3_(&r__1, &r__2);
+ c = slamc3_(&f, &a);
+ if (lrnd && c == a) {
+ lrnd = FALSE_;
+ }
+
+/* Try and decide whether rounding is done in the IEEE 'round
+ to
+ nearest' style. B/2 is half a unit in the last place of the
+two
+ numbers A and SAVEC. Furthermore, A is even, i.e. has last
+bit
+ zero, and SAVEC is odd. Thus adding B/2 to A should not cha
+nge
+ A, but adding B/2 to SAVEC should change SAVEC. */
+
+ r__1 = b / 2;
+ t1 = slamc3_(&r__1, &a);
+ r__1 = b / 2;
+ t2 = slamc3_(&r__1, &savec);
+ lieee1 = t1 == a && t2 > savec && lrnd;
+
+/* Now find the mantissa, t. It should be the integer part
+ of
+ log to the base beta of a, however it is safer to determine
+ t
+ by powering. So we find t as the smallest positive integer
+for
+ which
+
+ fl( beta**t + 1.0 ) = 1.0. */
+
+ lt = 0;
+ a = 1.f;
+ c = 1.f;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L30:
+ if (c == one) {
+ ++lt;
+ a *= lbeta;
+ c = slamc3_(&a, &one);
+ r__1 = -(double)a;
+ c = slamc3_(&c, &r__1);
+ goto L30;
+ }
+/* + END WHILE */
+
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *ieee1 = lieee1;
+ return 0;
+
+/* End of SLAMC1 */
+
+} /* slamc1_ */
+
+
+/* Subroutine */ int slamc2_(int *beta, int *t, int *rnd, float *
+ eps, int *emin, float *rmin, int *emax, float *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC2 determines the machine parameters specified in its argument
+ list.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ EPS (output) FLOAT
+ The smallest positive number such that
+
+ fl( 1.0 - EPS ) .LT. 1.0,
+
+ where fl denotes the computed value.
+
+ EMIN (output) INT
+ The minimum exponent before (gradual) underflow occurs.
+
+ RMIN (output) FLOAT
+ The smallest normalized number for the machine, given by
+ BASE**( EMIN - 1 ), where BASE is the floating point value
+
+ of BETA.
+
+ EMAX (output) INT
+ The maximum exponent before overflow occurs.
+
+ RMAX (output) FLOAT
+ The largest positive number for the machine, given by
+ BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
+
+ value of BETA.
+
+ Further Details
+ ===============
+
+ The computation of EPS is based on a routine PARANOIA by
+ W. Kahan of the University of California at Berkeley.
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ static int c__1 = 1;
+
+ /* Initialized data */
+ static int first = TRUE_;
+ static int iwarn = FALSE_;
+ /* System generated locals */
+ int i__1;
+ float r__1, r__2, r__3, r__4, r__5;
+ /* Builtin functions */
+ double pow_ri(float *, int *);
+ /* Local variables */
+ static int ieee;
+ static float half;
+ static int lrnd;
+ static float leps, zero, a, b, c;
+ static int i, lbeta;
+ static float rbase;
+ static int lemin, lemax, gnmin;
+ static float small;
+ static int gpmin;
+ static float third, lrmin, lrmax, sixth;
+ static int lieee1;
+ extern /* Subroutine */ int slamc1_(int *, int *, int *,
+ int *);
+ extern double slamc3_(float *, float *);
+ extern /* Subroutine */ int slamc4_(int *, float *, int *),
+ slamc5_(int *, int *, int *, int *, int *,
+ float *);
+ static int lt, ngnmin, ngpmin;
+ static float one, two;
+
+
+
+ if (first) {
+ first = FALSE_;
+ zero = 0.f;
+ one = 1.f;
+ two = 2.f;
+
+/* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values
+ of
+ BETA, T, RND, EPS, EMIN and RMIN.
+
+ Throughout this routine we use the function SLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ SLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1.
+*/
+
+ slamc1_(&lbeta, <, &lrnd, &lieee1);
+
+/* Start to find EPS. */
+
+ b = (float) lbeta;
+ i__1 = -lt;
+ a = pow_ri(&b, &i__1);
+ leps = a;
+
+/* Try some tricks to see whether or not this is the correct E
+PS. */
+
+ b = two / 3;
+ half = one / 2;
+ r__1 = -(double)half;
+ sixth = slamc3_(&b, &r__1);
+ third = slamc3_(&sixth, &sixth);
+ r__1 = -(double)half;
+ b = slamc3_(&third, &r__1);
+ b = slamc3_(&b, &sixth);
+ b = dabs(b);
+ if (b < leps) {
+ b = leps;
+ }
+
+ leps = 1.f;
+
+/* + WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP */
+L10:
+ if (leps > b && b > zero) {
+ leps = b;
+ r__1 = half * leps;
+/* Computing 5th power */
+ r__3 = two, r__4 = r__3, r__3 *= r__3;
+/* Computing 2nd power */
+ r__5 = leps;
+ r__2 = r__4 * (r__3 * r__3) * (r__5 * r__5);
+ c = slamc3_(&r__1, &r__2);
+ r__1 = -(double)c;
+ c = slamc3_(&half, &r__1);
+ b = slamc3_(&half, &c);
+ r__1 = -(double)b;
+ c = slamc3_(&half, &r__1);
+ b = slamc3_(&half, &c);
+ goto L10;
+ }
+/* + END WHILE */
+
+ if (a < leps) {
+ leps = a;
+ }
+
+/* Computation of EPS complete.
+
+ Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3
+)).
+ Keep dividing A by BETA until (gradual) underflow occurs. T
+his
+ is detected when we cannot recover the previous A. */
+
+ rbase = one / lbeta;
+ small = one;
+ for (i = 1; i <= 3; ++i) {
+ r__1 = small * rbase;
+ small = slamc3_(&r__1, &zero);
+/* L20: */
+ }
+ a = slamc3_(&one, &small);
+ slamc4_(&ngpmin, &one, &lbeta);
+ r__1 = -(double)one;
+ slamc4_(&ngnmin, &r__1, &lbeta);
+ slamc4_(&gpmin, &a, &lbeta);
+ r__1 = -(double)a;
+ slamc4_(&gnmin, &r__1, &lbeta);
+ ieee = FALSE_;
+
+ if (ngpmin == ngnmin && gpmin == gnmin) {
+ if (ngpmin == gpmin) {
+ lemin = ngpmin;
+/* ( Non twos-complement machines, no gradual under
+flow;
+ e.g., VAX ) */
+ } else if (gpmin - ngpmin == 3) {
+ lemin = ngpmin - 1 + lt;
+ ieee = TRUE_;
+/* ( Non twos-complement machines, with gradual und
+erflow;
+ e.g., IEEE standard followers ) */
+ } else {
+ lemin = min(ngpmin,gpmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if (ngpmin == gpmin && ngnmin == gnmin) {
+ if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1) {
+ lemin = max(ngpmin,ngnmin);
+/* ( Twos-complement machines, no gradual underflow
+;
+ e.g., CYBER 205 ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1 && gpmin == gnmin)
+ {
+ if (gpmin - min(ngpmin,ngnmin) == 3) {
+ lemin = max(ngpmin,ngnmin) - 1 + lt;
+/* ( Twos-complement machines with gradual underflo
+w;
+ no known machine ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else {
+/* Computing MIN */
+ i__1 = min(ngpmin,ngnmin), i__1 = min(i__1,gpmin);
+ lemin = min(i__1,gnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+/* **
+ Comment out this if block if EMIN is ok */
+ if (iwarn) {
+ first = TRUE_;
+ printf("\n\n WARNING. The value EMIN may be incorrect:- ");
+ printf("EMIN = %8i\n",lemin);
+ printf("If, after inspection, the value EMIN looks acceptable");
+ printf("please comment out \n the IF block as marked within the");
+ printf("code of routine SLAMC2, \n otherwise supply EMIN");
+ printf("explicitly.\n");
+ }
+/* **
+
+ Assume IEEE arithmetic if we found denormalised numbers abo
+ve,
+ or if arithmetic seems to round in the IEEE style, determi
+ned
+ in routine SLAMC1. A true IEEE machine should have both thi
+ngs
+ true; however, faulty machines may have one or the other. */
+
+ ieee = ieee || lieee1;
+
+/* Compute RMIN by successive division by BETA. We could comp
+ute
+ RMIN as BASE**( EMIN - 1 ), but some machines underflow dur
+ing
+ this computation. */
+
+ lrmin = 1.f;
+ i__1 = 1 - lemin;
+ for (i = 1; i <= 1-lemin; ++i) {
+ r__1 = lrmin * rbase;
+ lrmin = slamc3_(&r__1, &zero);
+/* L30: */
+ }
+
+/* Finally, call SLAMC5 to compute EMAX and RMAX. */
+
+ slamc5_(&lbeta, <, &lemin, &ieee, &lemax, &lrmax);
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *eps = leps;
+ *emin = lemin;
+ *rmin = lrmin;
+ *emax = lemax;
+ *rmax = lrmax;
+
+ return 0;
+
+
+/* End of SLAMC2 */
+
+} /* slamc2_ */
+
+
+double slamc3_(float *a, float *b)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC3 is intended to force A and B to be stored prior to doing
+
+ the addition of A and B , for use in situations where optimizers
+
+ might hold one of these in a register.
+
+ Arguments
+ =========
+
+ A, B (input) FLOAT
+ The values A and B.
+
+ =====================================================================
+*/
+/* >>Start of File<<
+ System generated locals */
+ float ret_val;
+
+
+
+ ret_val = *a + *b;
+
+ return ret_val;
+
+/* End of SLAMC3 */
+
+} /* slamc3_ */
+
+
+/* Subroutine */ int slamc4_(int *emin, float *start, int *base)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC4 is a service routine for SLAMC2.
+
+ Arguments
+ =========
+
+ EMIN (output) EMIN
+ The minimum exponent before (gradual) underflow, computed by
+
+ setting A = START and dividing by BASE until the previous A
+ can not be recovered.
+
+ START (input) FLOAT
+ The starting point for determining EMIN.
+
+ BASE (input) INT
+ The base of the machine.
+
+ =====================================================================
+*/
+ /* System generated locals */
+ int i__1;
+ float r__1;
+ /* Local variables */
+ static float zero, a;
+ static int i;
+ static float rbase, b1, b2, c1, c2, d1, d2;
+ extern double slamc3_(float *, float *);
+ static float one;
+
+
+
+ a = *start;
+ one = 1.f;
+ rbase = one / *base;
+ zero = 0.f;
+ *emin = 1;
+ r__1 = a * rbase;
+ b1 = slamc3_(&r__1, &zero);
+ c1 = a;
+ c2 = a;
+ d1 = a;
+ d2 = a;
+/* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
+ $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP */
+L10:
+ if (c1 == a && c2 == a && d1 == a && d2 == a) {
+ --(*emin);
+ a = b1;
+ r__1 = a / *base;
+ b1 = slamc3_(&r__1, &zero);
+ r__1 = b1 * *base;
+ c1 = slamc3_(&r__1, &zero);
+ d1 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d1 += b1;
+/* L20: */
+ }
+ r__1 = a * rbase;
+ b2 = slamc3_(&r__1, &zero);
+ r__1 = b2 / rbase;
+ c2 = slamc3_(&r__1, &zero);
+ d2 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d2 += b2;
+/* L30: */
+ }
+ goto L10;
+ }
+/* + END WHILE */
+
+ return 0;
+
+/* End of SLAMC4 */
+
+} /* slamc4_ */
+
+
+/* Subroutine */ int slamc5_(int *beta, int *p, int *emin,
+ int *ieee, int *emax, float *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC5 attempts to compute RMAX, the largest machine floating-point
+ number, without overflow. It assumes that EMAX + abs(EMIN) sum
+ approximately to a power of 2. It will fail on machines where this
+ assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
+
+ EMAX = 28718). It will also fail if the value supplied for EMIN is
+ too large (i.e. too close to zero), probably with overflow.
+
+ Arguments
+ =========
+
+ BETA (input) INT
+ The base of floating-point arithmetic.
+
+ P (input) INT
+ The number of base BETA digits in the mantissa of a
+ floating-point value.
+
+ EMIN (input) INT
+ The minimum exponent before (gradual) underflow.
+
+ IEEE (input) INT
+ A logical flag specifying whether or not the arithmetic
+ system is thought to comply with the IEEE standard.
+
+ EMAX (output) INT
+ The largest exponent before overflow
+
+ RMAX (output) FLOAT
+ The largest machine floating-point number.
+
+ =====================================================================
+
+
+
+ First compute LEXP and UEXP, two powers of 2 that bound
+ abs(EMIN). We then assume that EMAX + abs(EMIN) will sum
+ approximately to the bound that is closest to abs(EMIN).
+ (EMAX is the exponent of the required number RMAX). */
+ /* Table of constant values */
+ static float c_b5 = 0.f;
+
+ /* System generated locals */
+ int i__1;
+ float r__1;
+ /* Local variables */
+ static int lexp;
+ static float oldy;
+ static int uexp, i;
+ static float y, z;
+ static int nbits;
+ extern double slamc3_(float *, float *);
+ static float recbas;
+ static int exbits, expsum, try__;
+
+
+
+ lexp = 1;
+ exbits = 1;
+L10:
+ try__ = lexp << 1;
+ if (try__ <= -(*emin)) {
+ lexp = try__;
+ ++exbits;
+ goto L10;
+ }
+ if (lexp == -(*emin)) {
+ uexp = lexp;
+ } else {
+ uexp = try__;
+ ++exbits;
+ }
+
+/* Now -LEXP is less than or equal to EMIN, and -UEXP is greater
+ than or equal to EMIN. EXBITS is the number of bits needed to
+ store the exponent. */
+
+ if (uexp + *emin > -lexp - *emin) {
+ expsum = lexp << 1;
+ } else {
+ expsum = uexp << 1;
+ }
+
+/* EXPSUM is the exponent range, approximately equal to
+ EMAX - EMIN + 1 . */
+
+ *emax = expsum + *emin - 1;
+ nbits = exbits + 1 + *p;
+
+/* NBITS is the total number of bits needed to store a
+ floating-point number. */
+
+ if (nbits % 2 == 1 && *beta == 2) {
+
+/* Either there are an odd number of bits used to store a
+ floating-point number, which is unlikely, or some bits are
+
+ not used in the representation of numbers, which is possible
+,
+ (e.g. Cray machines) or the mantissa has an implicit bit,
+ (e.g. IEEE machines, Dec Vax machines), which is perhaps the
+
+ most likely. We have to assume the last alternative.
+ If this is true, then we need to reduce EMAX by one because
+
+ there must be some way of representing zero in an implicit-b
+it
+ system. On machines like Cray, we are reducing EMAX by one
+
+ unnecessarily. */
+
+ --(*emax);
+ }
+
+ if (*ieee) {
+
+/* Assume we are on an IEEE machine which reserves one exponent
+
+ for infinity and NaN. */
+
+ --(*emax);
+ }
+
+/* Now create RMAX, the largest machine number, which should
+ be equal to (1.0 - BETA**(-P)) * BETA**EMAX .
+
+ First compute 1.0 - BETA**(-P), being careful that the
+ result is less than 1.0 . */
+
+ recbas = 1.f / *beta;
+ z = *beta - 1.f;
+ y = 0.f;
+ i__1 = *p;
+ for (i = 1; i <= *p; ++i) {
+ z *= recbas;
+ if (y < 1.f) {
+ oldy = y;
+ }
+ y = slamc3_(&y, &z);
+/* L20: */
+ }
+ if (y >= 1.f) {
+ y = oldy;
+ }
+
+/* Now multiply by BETA**EMAX to get RMAX. */
+
+ i__1 = *emax;
+ for (i = 1; i <= *emax; ++i) {
+ r__1 = y * *beta;
+ y = slamc3_(&r__1, &c_b5);
+/* L30: */
+ }
+
+ *rmax = y;
+ return 0;
+
+/* End of SLAMC5 */
+
+} /* slamc5_ */
+
+
+double pow_ri(float *ap, int *bp)
+{
+double pow, x;
+int n;
+
+pow = 1;
+x = *ap;
+n = *bp;
+
+if(n != 0)
+ {
+ if(n < 0)
+ {
+ n = -n;
+ x = 1/x;
+ }
+ for( ; ; )
+ {
+ if(n & 01)
+ pow *= x;
+ if(n >>= 1)
+ x *= x;
+ else
+ break;
+ }
+ }
+return(pow);
+}
diff --git a/INSTALL/slamchtst.c b/INSTALL/slamchtst.c
new file mode 100644
index 0000000..3544004
--- /dev/null
+++ b/INSTALL/slamchtst.c
@@ -0,0 +1,33 @@
+#include <stdio.h>
+
+main()
+{
+ /* Local variables */
+ float base, emin, prec, emax, rmin, rmax, t, sfmin;
+ extern double slamch_(char *);
+ float rnd, eps;
+
+ eps = slamch_("Epsilon");
+ sfmin = slamch_("Safe minimum");
+ base = slamch_("Base");
+ prec = slamch_("Precision");
+ t = slamch_("Number of digits in mantissa");
+ rnd = slamch_("Rounding mode");
+ emin = slamch_("Minnimum exponent");
+ rmin = slamch_("Underflow threshold");
+ emax = slamch_("Largest exponent");
+ rmax = slamch_("Overflow threshold");
+
+ printf(" Epsilon = %e\n", eps);
+ printf(" Safe minimum = %e\n", sfmin);
+ printf(" Base = %.0f\n", base);
+ printf(" Precision = %e\n", prec);
+ printf(" Number of digits in mantissa = %.0f\n", t);
+ printf(" Rounding mode = %.0f\n", rnd);
+ printf(" Minimum exponent = %.0f\n", emin);
+ printf(" Underflow threshold = %e\n", rmin);
+ printf(" Largest exponent = %.0f\n", emax);
+ printf(" Overflow threshold = %e\n", rmax);
+ printf(" Reciprocal of safe minimum = %e\n", 1./sfmin);
+ return 0;
+}
diff --git a/INSTALL/superlu_timer.c b/INSTALL/superlu_timer.c
new file mode 100644
index 0000000..2ef2a4a
--- /dev/null
+++ b/INSTALL/superlu_timer.c
@@ -0,0 +1,45 @@
+/*
+ * Purpose
+ * =======
+ * Returns the time in seconds used by the process.
+ *
+ * Note: the timer function call is machine dependent. Use conditional
+ * compilation to choose the appropriate function.
+ *
+ */
+
+
+#ifdef SUN
+/*
+ * It uses the system call gethrtime(3C), which is accurate to
+ * nanoseconds.
+*/
+#include <sys/time.h>
+
+double SuperLU_timer_() {
+ return ( (double)gethrtime() / 1e9 );
+}
+
+#else
+
+#include <sys/types.h>
+#include <sys/times.h>
+#include <time.h>
+#include <sys/time.h>
+
+#ifndef CLK_TCK
+#define CLK_TCK 60
+#endif
+
+double SuperLU_timer_()
+{
+ struct tms use;
+ double tmp;
+ times(&use);
+ tmp = use.tms_utime;
+ tmp += use.tms_stime;
+ return (double)(tmp) / CLK_TCK;
+}
+
+#endif
+
diff --git a/INSTALL/timertst.c b/INSTALL/timertst.c
new file mode 100644
index 0000000..ddf1bb7
--- /dev/null
+++ b/INSTALL/timertst.c
@@ -0,0 +1,88 @@
+#include <stdio.h>
+
+void mysub(int n, double *x, double *y)
+{
+ return;
+}
+
+main()
+{
+ /* Parameters */
+#define NMAX 100
+#define ITS 10000
+
+ int i, j, iters;
+ double alpha, avg, t1, t2, tnotim;
+ double x[NMAX], y[NMAX];
+ double SuperLU_timer_();
+
+ /* Initialize X and Y */
+ for (i = 0; i < NMAX; ++i) {
+ x[i] = 1.0 / (double)(i+1);
+ y[i] = (double)(NMAX - i) / (double)NMAX;
+ }
+ alpha = 0.315;
+
+ /* Time DAXPY operations */
+ iters = ITS;
+ tnotim = 0.0;
+ while ( tnotim <= 0.0 ) {
+ t1 = SuperLU_timer_();
+ for (j = 0; j < iters; ++j) {
+ for (i = 0; i < NMAX; ++i)
+ y[i] += alpha * x[i];
+ alpha = -alpha;
+ }
+ t2 = SuperLU_timer_();
+ tnotim = t2 - t1;
+ if ( tnotim > 0. ){
+ float ops = 2.0 * iters * NMAX * 1e-6;
+ printf("Time for %d DAXPY ops = %10.3g seconds\n",
+ NMAX*iters, tnotim);
+ printf("DAXPY performance rate = %10.3g mflops\n", ops/tnotim);
+ } else {
+ iters *= 10 ;
+ /* this makes sure we dont keep trying forever */
+ if ( iters > 10000000 ) {
+ printf("*** Error: Time for operations was zero.\n"
+ "\tThe timer may not be working correctly.\n");
+ exit(9);
+ }
+ }
+ }
+
+ t1 = SuperLU_timer_();
+ for (j = 0; j < ITS; ++j) {
+ for (i = 0; i < NMAX; ++i)
+ y[i] += alpha * x[i];
+ alpha = -alpha;
+ }
+ t2 = SuperLU_timer_();
+ tnotim = t2 - t1;
+
+ /* Time 1,000,000 DAXPY operations with SuperLU_timer_()
+ in the outer loop */
+ t1 = SuperLU_timer_();
+ for (j = 0; j < ITS; ++j) {
+ for (i = 0; i < NMAX; ++i)
+ y[i] += alpha * x[i];
+ alpha = -alpha;
+ t2 = SuperLU_timer_();
+ }
+
+ /* Compute the time in milliseconds used by an average call to
+ SuperLU_timer_(). */
+ printf("Including DSECND, time = %10.3g seconds\n", t2-t1);
+ avg = ( (t2 - t1) - tnotim )*1000. / (double)ITS;
+ printf("Average time for DSECND = %10.3g milliseconds\n", avg);
+
+ /* Compute the equivalent number of floating point operations used
+ by an average call to DSECND. */
+ if ( tnotim > 0. )
+ printf("Equivalent floating point ops = %10.3g ops\n",
+ 1000.*avg / tnotim);
+
+ mysub(NMAX, x, y);
+ return 0;
+}
+
diff --git a/INSTALL/ug.ps b/INSTALL/ug.ps
new file mode 100644
index 0000000..7a56054
--- /dev/null
+++ b/INSTALL/ug.ps
@@ -0,0 +1,8591 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
+%%Title: ug.dvi
+%%Pages: 71
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips -o ug.ps ug
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource: TeX output 2003.10.21:1553
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
+psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
+roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
+moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
+begin/SpecialSave save N gsave normalscale currentpoint TR
+ at SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
+CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
+closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
+sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
+}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
+CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
+lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
+/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
+repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
+/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
+currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
+moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
+/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
+1 startangle endangle arc savematrix setmatrix}N end
+
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 600 600 (ug.dvi)
+ at start
+%DVIPSBitmapFont: Fa cmcsc10 10.95 5
+/Fa 5 106 df<B500C093380FFFFCA26E5E0001F1FE00D8007F18F8D977F0163BA2D973
+F81673A3D971FC16E3A2D970FEED01C3A3027FED0383A26E6CEC0703A36E6C140EA26E6C
+141CA36E6C1438A26E6C1470A36E6C14E0A26E6CEB01C0A3037FEB0380A292393F800700
+A392381FC00EA26F6C5AA36F6C5AA26F6C5AA36F6C5AA26FB45AA3705A13F8486C6EC7FC
+D807FFEF0FFEB500F80307B512FC161EA24E3E7BBD5A>77 D<D903FE130690391FFFC00E
+017FEBF81E3901FE01FC3A03F0003F3E4848EB0FFE484813074848130390C71201003E14
+00007E157EA2007C153E12FCA2161EA36C150EA27E7F007F92C7FC7F13F0EA3FFCEBFFC0
+6C13FC6CEBFFC06C14FC6C14FF6C15C06C6C80011F80010380D9003F7F02037F9138003F
+FF15070301138081167F17C0163F00E0151FA3160FA27EA36C1680161F7E17006C5D6C15
+3E6D5C6D14FCD8FDF0495AD8F8FC495A3AF07FC01FC0011FB55AD8E00349C7FC39C0003F
+F02A427ABF38>83 D<003FB912E0A3903BF0003FF0007F01806D48130F48C7ED07F0007E
+1703007C170100781700A300701870A5481838A5C81600B3B14B7E4B7E0103B7FCA33D3D
+7CBC47>I<B8FCA33903FE00016C489038003F80161F160F1607A21603A317C0ED1C01A3
+93C7FCA2153CA215FC90B5FCA3EBFC00153CA2151CA21770A392C712E0A41601A2EE03C0
+A21607160F161F486C14FFB81280A32C2F7CAE33>101 D<B512F8A33803FE006C5AB3B3
+A3487EB512F8A3152F7DAE1B>105 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fb cmssbx10 12 17
+/Fb 17 120 df<EAFFF8AD0D0D788C1E>46 D<EC3FF00103B5FC010F14C0013F14F04980
+90B67E4881489038F03FFF48496C13804A7E48496C13C04A7E4816E0497F003F16F0A400
+7F16F8497FA500FF16FCB3A8007F16F8A36D5BA3003F16F0A36C6C4913E0A26C16C06E5A
+6C6D4813806E5A6CD9F87F13006C90B55A6C5D6D5C6D5C010F14C0010391C7FC9038003F
+F02E497CC637>48 D<ECFFE0010713FC013FEBFF804914E048B67E48814815FE48815A17
+8048010114C0397FFC007F49011F13E048487F4915F0816C5A003F6E13F86C5AA2120F6C
+C77E7EC8FC5DA317F0A25D17E05D17C05D17804B13004B5A5E4B5A4A5B4A5B4A5B4A5B4A
+90C7FC4A5AEC7FF85D4A5A495B495B4990C8FC495A495A495A495AEBFFC0485B4890C9FC
+485A485A48B712F05A4816F8A76C16F07E2D477CC637>50 D<EC7FF0903807FFFE011FEB
+FFC0017F8090B612F848814881488148168048EBE03FDA800F13C04880020014E048487F
+A26F13F05B12FF17F8A281A417FCA75DA3127F6D5BA3003F5C6D5B6C6D5A6E5A6CEBFFFE
+7E6C5C6C5C6C5C013F01C013F8010F130090380010011400A217F0A25DA217E05D17C05D
+D801C04913806D5B486C4913009039FC03FFFE48B6FC5E485D5E6C15C0000192C7FC6C14
+FC013F13F0010790C8FC2E497CC637>57 D<903801FFF8011F13FF90B612E0000381000F
+15FC82A249C66C7E01F86D1380D807E07F5B496D13C090C7FC1206C8FCA60207B5FC49B6
+FC131F137F48B512EF0007EBF80F4813C0481380481300485A5B12FF5BA45D7F5D6C6C5B
+92B5FC383FFF8391B6FC6C14EF6C14CF6C148F6CD9FE071380C613F8D93FC0C8FC2A317D
+AF34>97 D<EC7FFC0107B512C0011F14F0017F14FC90B7FC5A5A5A489038F007FE48EBC0
+004A137E4890C7121E160E491404007F92C7FCA35B12FFAE127F7FA216036C6C5C161F6C
+6D5B6E13FF6CD9F00F138091B6FC7E7E7E6C6CECFE00011F14F8010714C09026007FF8C7
+FC29317CAF31>99 D<EEFFF0A24B13F8B3A2EB01FF011F13C1017F13F190B512FD000391
+B5FC5A5AECF01F48EBC007EC8001481300A2485AA4485AB0127F7FA36C7E5D6E5A6C6D5A
+6CEBF03F91B6FC7E6C14FD6C14F96C6C01F013F0011F13C0D903FEC8FC2D467CC438>I<
+EC7FF80103B57E011F14E0017F8090B612FC48815A489038F03FFF48D9C00F1380EC8003
+48010014C048804915E0A248487FA217F012FFA25BA390B7FCA317E0A201F8C9FCA37F12
+7FA37F003F16C016016C6C14036E13076C6DEB1FE06E137F6C9038F803FF6C90B6FC7E6C
+1680013FECFE00010F14F8010114E09026003FFEC7FC2C317DAF33>I<EC1FFE49B512C0
+1307131F5B5B90B6FCECFC0F48EBF8031501ECF000481500AD003FEBFFE05AB67EA36C5C
+A2000301F0C7FCB3B36C5B7E22467EC521>I<EA3FF8127FEAFFFCB3B3B3ABEA7FF8123F
+0E457BC419>108 D<D83FF0D97FE049B47E007F902603FFFC010F13F026FFF80F01FF01
+3F13FC4A6E487F027F02C1B6FC91B612C301F903E71580DAF80FECE03F9026FBE0079038
+EF801FD9FFC0DAFF0014C04A6C497FA202005C495DA3495DB3AB6C486D496D1380003F6E
+814A2F7AAE57>I<EC3FFC0103B512C0011F14F8498090B7FC4816804816C048D9F81F13
+E048D9C00313F04A7E4890C713F8A24848EC7FFCA2007F16FE49143FA400FF16FFAD007F
+16FE6D147FA36C6CECFFFCA26C6D4813F86E5A6CD9F00F13F06C90B612E0A26C16C0C616
+006D5C011F14F8010714E09026007FFEC7FC30317DAF37>111 D<EDFF80263FF80F13E0
+007F013F13F8486CB512FE01FD8090B71280A217C0ECE07FDA001F13E0497F4915F081A2
+8117F8A281AE5D17F0A25DA217E05D6D4913C06D5B02C0B5128091B612005E5E01FD5C01
+FC14E0023F1380DA07FCC7FC91C9FCB06C5A123F2D427AAE38>I<D83FF013F8007F1303
+38FFF80F141F147FA214FF13F913FBA290B5120014F85C5C5C5C91C7FC5BA35BB3A76C5A
+123F1D2F7AAE25>114 D<EB0FFF017F13F048B512FC000714FF4815C05AA2383FF80390
+39F0007F80151F4848130F15071503ED01006D90C7FC7F13FEEBFFE014FF6C14C015F06C
+80816C806C806C1580C6FC013F14C0130FD9007F13E0140714018012200070147F127812
+7C127ED87F8013FF01E014C038FFFC0390B6FC16801600123F000F5C000314F8C614E001
+0F90C7FC23317DAF2A>I<D83FF8903803FFC0127F486C4913E0B3AD5DA35D5DA26C6C5B
+6D48B5FC6CEBFFF715E76C14C70007028313C06CEBFE0326003FF0C8FC2B2F7AAD38>
+117 D<D83FC0D901F8EC1FE0486CD903FEEC3FF0486C496CEC7FF87F007F4AEDFFF0A283
+6C6C4916E06017C07F001F4A16C06017E06D147F6C027F4A1380A217F06CD980FE160004
+3F5B17F814C06C01C14B5A15FCEE1FFC14E16C01E34B5AA29238F80FFE6C01F75E187F17
+FF9138FFF0076D4C5AA215E0826D5FA215C06D6E5CA34B7E6D90C75CD903FEDA3FFEC7FC
+452E7EAD4A>119 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fc cmtt10 10 10
+/Fc 10 118 df<007FB5FCB612C015F0816C803907E003FEEC00FFED7F80153FED1FC0ED
+0FE0A2150716F0150316F81501A4ED00FCACED01F8A3150316F0A2150716E0150FED1FC0
+153FED7F80EDFF00EC03FE007FB55AB65A5D15C06C91C7FC26337EB22C>68
+D<007FB512F8B612FCA36C14F839000FC000B3B3A5007FB512F8B612FCA36C14F81E3379
+B22C>73 D<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15
+F025337DB22C>76 D<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC00349
+7E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFCEBFF
+C06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1FC0A2
+ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90B55A
+5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>83 D<007FB612FCB712FEA43AFC00
+7E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB22C>I<3B7FFF803F
+FFC0B56C4813E0A36C496C13C03B03F00001F800B3AF6D130300015DA26D130700005D6D
+130F017F495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B9038003F802B3480B22C>
+I<EB03FE90381FFFC0017F13F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B48
+48EB1FC090C7120F5A007E15E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C06D
+EB07E06C7ED80FF0130F6C6CEB3FC001FF13FF000190B512806C1500013F13FC010F13F0
+0101138023247CA32C>101 D<397FF01FE039FFF8FFF801FB13FE90B6FC6C1580000190
+38F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FC
+A2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8
+EC3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>112 D<D87FFEEB3FC0B53801FFF0
+020713F8021F13FC6C5B39003F7FE1ECFF019138FC00F84A13704A13005CA25C5CA391C8
+FCAF007FB512E0B67EA36C5C26247EA32C>114 D<3A7FF003FF80486C487FA3007F7F00
+01EB000FB3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE071300
+29247FA32C>117 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fd cmmi6 6 1
+/Fd 1 106 df<1338137CA2137813701300A7EA0780EA1FC0EA38E01230EA60F0EAC1E0
+A3EA03C0A3EA0780A2EA0F0013041306EA1E0CA21318121CEA1E70EA0FE0EA07800F237D
+A116>105 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fe cmmi10 10 13
+/Fe 13 121 df<147E903803FF8090390FC1C38090391F00EFC0017E137F49133F485A48
+48EB1F8012075B000F143F48481400A2485A5D007F147E90C7FCA215FE485C5AA214015D
+48150CA21403EDF01C16181407007C1538007E010F1330003E131F027B13706C01E113E0
+3A0F83C0F9C03A03FF007F80D800FCEB1F0026267DA42C>97 D<133FEA1FFFA3C67E137E
+A313FE5BA312015BA312035BA31207EBE0FCEBE3FF9038E707C0390FFE03E09038F801F0
+01F013F8EBE000485A15FC5BA2123F90C7FCA214015A127EA2140312FE4814F8A2140715
+F05AEC0FE0A215C0EC1F80143F00781400007C137E5C383C01F86C485A380F07C06CB4C7
+FCEA01FC1E3B7CB924>I<EC3FC0903801FFF0903807E03C90380F800E90383F0007017E
+131F49137F484813FF485A485A120F4913FE001F143848481300A2127F90C8FCA35A5AA4
+5AA315031507007E1406150E003E143C003F14706C14E0390F8007C03907C03F003801FF
+F838003FC020267DA424>I<EB03F0EA01FFA3EA00075CA3130F5CA3131F5CA3133F91C8
+FCA35B017EEB07C0ED1FF0ED783801FEEBE0F89039FC01C1FCEC0383EC07070001130ED9
+F81C13F891383803F091387001E0000349C7FCEBF1C0EBF38001F7C8FCEA07FEA2EBFFE0
+EBE7F8380FE0FEEBC07F6E7E141F001F80D9800F1330A21670003F011F136001001380A2
+16E04815C0007E1481020F1380158300FE903807870048EB03FE0038EB00F8263B7CB92B
+>107 D<EB0FC0EA03FF5AA2EA001F1480A2133FA21400A25BA2137EA213FEA25BA21201
+A25BA21203A25BA21207A25BA2120FA25BA2121FA25BA2123FA290C7FCA25AA2EA7E03A2
+EAFE07130612FCA2130E130C131C1318EA7C38EA3C70EA1FE0EA0780123B7DB919>I<D8
+03E0017F14FE3D07F801FFE003FFC03D0E3C0781F00F03E03D1C3E1E00F83C01F026383F
+38D9FC707F00304914E04A90387DC000007049EB7F8000604991C7FCA200E090C700FE13
+01485A017E5CA200000201140301FE5F495CA203031407000160495C180F03075D120349
+4A011F13601980030F023F13E00007F000C0495C1901031F023E1380000F1803494A1500
+61033F150E001FEF1E1C4991C7EA0FF80007C7000EEC03E043267EA449>I<EC1FC0ECFF
+F8903807E07E90380F801F90393F000F80017E14C0491307484814E0485A4848EB03F012
+0F5B121F48481307A2127F90C7FCA2150F5A4815E0A2151F16C0A248EC3F8016005D157E
+007E5C4A5A003E495A003F495A6C495A6C6C48C7FC3807E07E3801FFF038003F8024267D
+A428>111 D<90390F8003F090391FE00FFC903939F03C1F903A70F8700F80903AE0FDE0
+07C09038C0FF80030013E00001491303018015F05CEA038113015CA2D800031407A25CA2
+0107140FA24A14E0A2010F141F17C05CEE3F80131FEE7F004A137E16FE013F5C6E485A4B
+5A6E485A90397F700F80DA383FC7FC90387E1FFCEC07E001FEC9FCA25BA21201A25BA212
+03A25B1207B512C0A32C3583A42A>I<3903E001F83907F807FE390E3C1E07391C3E381F
+3A183F703F800038EBE07F0030EBC0FF00705B00601500EC007E153CD8E07F90C7FCEAC0
+7EA2120013FE5BA312015BA312035BA312075BA3120F5BA3121F5B0007C9FC21267EA425
+>114 D<14FF010313C090380F80F090383E00380178131C153C4913FC0001130113E0A3
+3903F000F06D13007F3801FFE014FC14FF6C14806D13C0011F13E013039038003FF01407
+1403001E1301127FA24814E0A348EB03C012F800E0EB07800070EB0F006C133E001E13F8
+3807FFE0000190C7FC1E267CA427>I<13F8D803FE1438D8070F147C000E6D13FC121C12
+18003814011230D8701F5C12601503EAE03F00C001005B5BD8007E1307A201FE5C5B150F
+1201495CA2151F120349EC80C0A2153F1681EE0180A2ED7F0303FF130012014A5B3A00F8
+079F0E90397C0E0F1C90393FFC07F8903907F001F02A267EA430>117
+D<01F816F0D803FE9138E001F8D8070F903801F003000ED9800314FC121C121800380207
+13010030EDE000D8701F167C1260030F143CD8E03F163800C001005B5BD8007E131F1830
+01FE5C5B033F1470000117604991C7FCA218E000034A14C049137E17011880170318005F
+03FE1306170E000101015C01F801BF5B3B00FC039F8070903A7E0F0FC0E0903A1FFC03FF
+C0902703F0007FC7FC36267EA43B>119 D<903907E001F090391FF807FC9039783E0E0F
+9039E01F1C1FD801C09038383F803A03800FF07F0100EBE0FF5A000E4A1300000C157E02
+1F133C001C4AC7FC1218A2C7123FA292C8FCA25CA2147EA214FEA24A130CA20101141C00
+1E1518003F5BD87F81143801835C00FF1560010714E03AFE0E7C01C0D87C1C495A277838
+3E0FC7FC391FF00FFC3907C003F029267EA42F>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Ff cmmi12 14.4 4
+/Ff 4 86 df<191C193C193E197E19FEA21801A218031807A2180F8560183D18391871A2
+18E1170118C1DD03817FA2EF07014D7E170E5FA25F177817704D80A24C5A0403147F5F4C
+C7FCA2160E161E161C4C81A25E04F0143F5E4B5AA24B5A150793C8FC030E82A2031FB7FC
+5DA25D0370C8121F5D14015D4A4882A24AC9FC4A160F140E5CA25C147814704A83A2495A
+01031707495AA2130F133F496C4C7E2603FFE0EE3FFFB500FE031FB6FCA260A250557CD4
+58>65 D<020FB812E01AFCF2FF808791260007FEC813F06F48ED3FF8747E0307707E747E
+4C811C80030F82A24C17C0A2151FA25EA2153F1C805E62037F1800624C5E1A0F03FF5F50
+5A93C9485A505A4A4D5A4F5B4B4B90C7FCF10FFC0203EE3FF8F1FFE04B020F138092B700
+FCC8FC5CF1FF8003F8C8EA7FE0F11FF8020FEE07FC737E4B6F7E87021F707FA24B707EA2
+023F84A25DA2147FA25DA214FF6392CA12FFA24961614A4C5BA201034D90C7FC4F5A5C4F
+5A01074D5AF1FFF04A4B5B4E1380010F040F90C8FCF07FFC013F923803FFF8007FB912E0
+BA128006FCC9FC18C052527AD159>I<020FB612FCA4DA000701C0C8FC6F90C9FC5E1507
+A25EA2150FA25EA2151FA25EA2153FA25EA2157FA25EA215FFA25EA25CA293CAFCA25CA2
+5DA21407A25DA2140FA25DA2141FA25DA2023F17781A705D1AF0027F17E0A24B15011AC0
+02FF1603A24B168019075BF10F0092C95AA249173E197E4A167C19FC010716014E5A4A15
+0F181F010FEE7FF0EF03FF013F153F007FB95ABAFCA26145527AD150>76
+D<001FB600C00107B512FCA4D8000F90C9001F13006D48EE0FF84A705A010F715A624A5F
+A2011F170797C7FC5CA2013F5F190E5CA2017F171E191C5CA201FF173C19385CA2481878
+197091CAFCA24818F0615BA200071701615BA2000F1703615BA2001F170796C8FC5BA200
+3F5F180E5BA2007F171E181C5BA2183C00FF17385B18781870A218F06090C91201601703
+4D5A6D93C9FC007F5E171E5F003F5E6D5D001F15016D4A5A6C6CEC0F806C6C4ACAFC6C6C
+147E6C6C495A3A00FFC01FF06DB512C0011F91CBFC010713FC9038007FC04E5477D150>
+85 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fg cmr9 9 44
+/Fg 44 122 df<EC1FE0ECFFFC903803F01E90390FC00780EB1F8090393F000FC0017E13
+1F5BA2485AED0F8092C7FCA9ED0FC0B7FCA33901F8001F150FB3A6486CEB1FE0267FFFC1
+B5FCA328357FB42B>12 D<14C01301EB0380EB0F00130E5B133C5B5BA2485A485AA21207
+5B120F90C7FC5AA2121E123EA3123C127CA55AB0127CA5123C123EA3121E121FA27E7F12
+077F1203A26C7E6C7EA213787F131C7F130FEB0380EB01C01300124A79B71E>40
+D<12C07E1270123C121C7E120F6C7E6C7EA26C7E6C7EA27F1378137C133C133EA2131E13
+1FA37F1480A5EB07C0B0EB0F80A514005BA3131E133EA2133C137C137813F85BA2485A48
+5AA2485A48C7FC120E5A123C12705A5A124A7CB71E>I<123C127EB4FCA21380A2127F12
+3D1201A412031300A25A1206120E120C121C5A5A126009177A8715>44
+D<B512F0A514057F921A>I<123C127E12FFA4127E123C08087A8715>I<EB0FE0EB7FFCEB
+F83E3903E00F803907C007C0EB8003000F14E0391F0001F0A24814F8A2003E1300007E14
+FCA500FE14FEB2007E14FCA56CEB01F8A36C14F0A2390F8003E03907C007C0A23903E00F
+803900F83E00EB7FFCEB0FE01F347DB126>48 D<13075B5B137FEA07FFB5FC13BFEAF83F
+1200B3B3A2497E007FB51280A319327AB126>I<EB3FC0EBFFF0000313FC380F80FF391E
+007F80001CEB3FC048EB1FE048130F15F00060130712FC6C14F87E1403A3007E1307123C
+C7FC15F0A2140F15E0EC1FC0A2EC3F801500147E5C495A5C495A495A495A49C7FC133E13
+3C4913185B485A48481330485A48C7FC001C1470001FB512F05A5AB612E0A31D327CB126
+>I<EB1FE0EBFFFC4813FF3907E03F80390F001FC0001EEB0FE0001CEB07F0123F018013
+F8140313C01380A2381F0007C7FC15F0A2EC0FE015C0141FEC3F80EC7E00EB01F8EB7FE0
+14FCEB003FEC1FC0EC0FE0EC07F015F8140315FC140115FEA3127EB4FCA415FC48130312
+780070EB07F86C14F0003C130F001FEB1FE0390FE03F800003B51200C613FCEB1FE01F34
+7DB126>I<14FE903807FF80011F13E090383F00F0017C13703901F801F8EBF003EA03E0
+1207EA0FC0EC01F04848C7FCA248C8FCA35A127EEB07F0EB1FFC38FE381F9038700F8090
+38E007C039FFC003E0018013F0EC01F8130015FC1400A24814FEA5127EA4127F6C14FCA2
+6C1301018013F8000F14F0EBC0030007EB07E03903E00FC03901F81F806CB51200EB3FFC
+EB0FE01F347DB126>54 D<15E0A34A7EA24A7EA34A7EA3EC0DFE140CA2EC187FA34A6C7E
+A202707FEC601FA202E07FECC00FA2D901807F1507A249486C7EA301066D7EA2010E8001
+0FB5FCA249800118C77EA24981163FA2496E7EA3496E7EA20001821607487ED81FF04A7E
+D8FFFE49B512E0A333367DB53A>65 D<B7FC16E016F83A03FC0003FE0001EC00FFEE7F80
+EE3FC0161F17E0160F17F0A617E0161F17C0EE3F80EE7F0016FEED03FC90B612F05E9039
+FC0007FCED00FEEE3F80EE1FC0EE0FE017F0160717F8160317FCA617F81607A2EE0FF0EE
+1FE0163FEE7FC00003913803FF00B75A16F816C02E337DB236>I<DA03FE130C91393FFF
+801C91B512E0903A03FE01F83C903A0FF0003C7CD91FC0EB0EFCD97F80130701FEC71203
+48481401000315005B4848157C485A173C485A171C123F5B007F160CA390C9FC481600AB
+7E6D150CA3123F7F001F161C17186C7E17386C6C15306C6C15706D15E012016C6CEC01C0
+D97F80EB0380D91FC0EB0F00D90FF0131ED903FE13FC0100B512F0023F13C0DA03FEC7FC
+2E377CB437>I<B77E16F016FE3A01FE0001FF00009138003FC0EE0FE0707E707E707E70
+7E177E177FEF3F80A2EF1FC0A3EF0FE0A418F0AA18E0A3171F18C0A21880173F18005F17
+FE5F4C5AEE07F04C5AEE3FC000014AB45AB748C7FC16F8168034337EB23B>I<B81280A3
+D803FCC7FC0001151FEE07C01603A21601A21600A41760150CA31700A2151CA2153C15FC
+90B5FCA3EBFC00153C151CA2150CA592C8FCAB487EB512FEA32B337DB232>70
+D<B512FEA3D803FEC9FC6C5AB3A9EE0180A416031700A45EA25E5E5E5E16FE00031407B7
+FCA329337DB230>76 D<D8FFFC923801FFF86D5DA20003EFFE00D801BFED06FCA3D99F80
+140CA2D98FC01418A3D987E01430A2D983F01460A3D981F814C0A3D980FCEB0180A2027E
+EB0300A36E1306A26E6C5AA36E6C5AA36E6C5AA26E6C5AA36E6C5AA3913800FD80A2037F
+C7FCA3486C133ED80FF04B7EB5011C90387FFFF8A33D337CB246>I<EC07FC91387FFFC0
+903901FC07F0903907E000FCD90F80133E013FC76C7E017E6E7E496E7E48486E7E48486E
+7EA248486E7E000F8249157E001F167FA24848ED3F80A2007F17C0A290C9121FA24817E0
+AB6C17C06D153FA3003F17806D157FA2001F17006D5D000F5E6C6C4A5AA26C6C4A5A0001
+5E6C6C4A5A017E4A5A6D4A5AD91FC0017FC7FCD907E013FC903901FC07F09039007FFFC0
+DA07FCC8FC33377CB43C>79 D<90381FE00390387FFC0748B5FC3907F01FCF390F8003FF
+48C7FC003E80814880A200788000F880A46C80A27E92C7FC127F13C0EA3FF013FF6C13F0
+6C13FF6C14C06C14F0C680013F7F01037F9038003FFF140302001380157F153FED1FC015
+0F12C0A21507A37EA26CEC0F80A26C15006C5C6C143E6C147E01C05B39F1FC03F800E0B5
+12E0011F138026C003FEC7FC22377CB42B>83 D<007FB712FEA390398007F001D87C00EC
+003E0078161E0070160EA20060160600E01607A3481603A6C71500B3AB4A7E011FB512FC
+A330337DB237>I<B500FE90381FFFF8A3000190C813006C48153C1718B3AF1738017F15
+30A217706D6C1460011F15E06E495A010F14036D6C495A6D6C49C7FCD901FC131E6DB413
+FC91383FFFF0020F13C0020190C8FC35357EB23A>I<EB7F803803FFF0380F80FC381C00
+3E003F133F6D6C7E6E7EA26E7EEA1F00C7FCA4EB01FF131FEBFF873803FC07EA0FF0EA1F
+C0EA3F80127F13004815C05AA3140FA26C131F6C133B3A3F8071F180391FC1E1FF2607FF
+C013003900FE003C22237DA126>97 D<EA03F012FFA312071203AEEC3F80ECFFE09038F3
+C0F89038F7007E01FE7F49EB1F8049EB0FC05BED07E016F0A2150316F8AA16F0150716E0
+A2ED0FC07F6DEB1F8001ECEB3F0001CF137C90388381F8903801FFE0C76CC7FC25357EB3
+2B>I<EB07F8EB3FFF9038FC07C03901F000E03903E003F03807C007120FEA1F80123F90
+380003E04890C7FCA2127E12FEAA127FA26C14187F001F14386D1330000F14706C6C13E0
+3903F001C03900FC0F8090383FFE00EB07F01D237EA122>I<153FEC0FFFA3EC007F81AE
+EB07F0EB3FFCEBFC0F3901F003BF3907E001FF48487E48487F8148C7FCA25A127E12FEAA
+127E127FA27E6C6C5BA26C6C5B6C6C4813803A03F007BFFC3900F81E3FEB3FFCD90FE013
+0026357DB32B>I<EB0FE0EB7FFCEBF83F3903F00F80D807E013C0390FC007E0381F8003
+15F0EA3F0014014814F8127EA212FEA2B6FCA248C8FCA5127E127FA26C1418A26C6C1338
+000F14306D13706C6C13E03901F003C03900FC0F00EB3FFEEB07F01D237EA122>I<EB01
+FCEB07FF90381F078090383E0FC0EB7C1F13FCEA01F8A20003EB070049C7FCACB512F0A3
+D803F0C7FCB3A7487E387FFFE0A31A357FB417>I<151F90391FC07F809039FFF8E3C039
+01F07FC73907E03F033A0FC01F83809039800F8000001F80EB00074880A66C5CEB800F00
+0F5CEBC01F6C6C48C7FCEBF07C380EFFF8380C1FC0001CC9FCA3121EA2121F380FFFFEEC
+FFC06C14F06C14FC4880381F0001003EEB007F4880ED1F8048140FA56C141F007C15006C
+143E6C5C390FC001F83903F007E0C6B51280D91FFCC7FC22337EA126>I<EA03F012FFA3
+12071203AEEC1FC0EC7FF09038F1E0FC9038F3807C9038F7007E13FE497FA25BA25BB348
+6CEB7F80B538C7FFFCA326347EB32B>I<EA0780EA0FC0EA1FE0A4EA0FC0EA0780C7FCAA
+EA07E012FFA3120F1207B3A6EA0FF0B5FCA310337EB215>I<EA07E012FFA3120F1207B3
+B3A7EA0FF0B5FCA310347EB315>108 D<2703F01FE013FF00FF90267FF80313C0903BF1
+E07C0F03E0903BF3803E1C01F02807F7003F387FD803FE1470496D486C7EA2495CA2495C
+B3486C496C487EB53BC7FFFE3FFFF0A33C217EA041>I<3903F01FC000FFEB7FF09038F1
+E0FC9038F3807C3907F7007EEA03FE497FA25BA25BB3486CEB7F80B538C7FFFCA326217E
+A02B>I<EB07F0EB3FFE9038FC1F803901F007C03903C001E000078048486C7E48C7127C
+A248147E003E143E007E143FA300FE1580A8007E1500A36C147EA26C147C6D13FC6C6C48
+5A00075C3903F007E03900FC1F80D93FFEC7FCEB07F021237EA126>I<3903F03F8000FF
+EBFFE09038F3C0F89038F7007ED807FE7F6C48EB1F804914C049130F16E0ED07F0A3ED03
+F8A9150716F0A216E0150F16C06D131F6DEB3F80160001FF13FC9038F381F89038F1FFE0
+D9F07FC7FC91C8FCAA487EB512C0A325307EA02B>I<3803E07C38FFE1FF9038E38F8090
+38E71FC0EA07EEEA03ECA29038FC0F8049C7FCA35BB2487EB512E0A31A217FA01E>114
+D<EBFF06000713CE381F00FE003C133E48131E140E5A1406A27EA200FE90C7FC6C7EEA7F
+FC383FFFC014F0000F7F6C7FC67FEB0FFF1300EC3F8000C0131F140F6C1307A37E15006C
+5B6C130E6C5B38F7807838E1FFE038C07F8019237EA11E>I<1330A51370A313F0A21201
+A212031207381FFFFEB5FCA23803F000AF1403A814073801F806A23800FC0EEB7E1CEB1F
+F8EB07E0182F7FAD1E>I<D803F0133F00FFEB0FFFA30007EB007F000380B35DA35D1201
+6D4813800000903803BFFC90387E073FEB1FFED907F8130026227EA02B>I<B5EBFFF0A3
+D80FF0EB3F800007EC1F000003140E150C6D131C00011418A26C6C5BA26D1370017E1360
+137F6D5BA290381F8180A214C3010F90C7FCA2EB07E6A214FE6D5AA26D5AA36D5AA21460
+24217E9F29>I<B53A1FFF81FFF0A33C07F801FC003F8001F049EB1E0000030100141C81
+6C6C017C1318A26D017E1338000002FE1330A290267E01FF5B159F168090263F030F5BA2
+16C0903A1F8607C180A202C613E390260FCC0390C7FCA2D907FC13F6ECF80116FE6D486C
+5AA36D481378A36D48133034217F9F37>I<B53801FFF8A32603FE0013806C48EB7C0000
+001478017E1370017F5B90383F81C090381F8380D90FC3C7FCEB07E614FE6D5A6D5A6D7E
+80805B9038039F809038071FC09038060FE0EB0C0790381C03F0496C7E01707FEBF00000
+0180000FECFF8026FFFC0313FCA326207F9F29>I<3A7FFF807FF8A33A07F8001FC00003
+EC0F800001EC070015066C6C5BA26D131C017E1318A26D5BA2EC8070011F1360ECC0E001
+0F5BA2903807E180A214F3010390C7FC14FBEB01FEA26D5AA31478A21430A25CA214E05C
+A2495A1278D8FC03C8FCA21306130EEA701CEA7838EA1FF0EA0FC025307F9F29>I
+E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fh cmtt9 9 15
+/Fh 15 122 df<EB07E0EB3FFC497E90B5FC4814803903FC3FC03907F00FE0390FE007F0
+EBC003391F8001F8A248C712FCA2003E147C007E147EA3007C143E00FC143FAC007E147E
+A46C14FCA2EB8001001F14F8EBC003000F14F0EBE0073907F00FE03903FC3FC06CB51280
+6C14006D5A6D5AEB07E020307DAE27>48 D<130E131FA25B5BA25B5A5A127FB5FCA213BF
+EA7E3F1200B3AA003FB512805A15C01580A21A2F79AE27>I<903803F80E90381FFE1F90
+383FFFBF90B6FC5A3803FE0F3807F803497E48487E485A49137FA248C7123FA25A127E15
+1E150012FE5AAA7E127EA2151E007F143F7EA26C7E157F6D137E6C6C13FE3907F001FCEB
+F8033903FE0FF86CB512F06C14E0013F13C06D1300EB03F820307DAE27>67
+D<387FFFFC14FFB612C06C80813907E00FF81407EC01FC6E7EA2157E157F811680151FA3
+16C0150FABED1F80A3153F1600A25D15FEA24A5A4A5A140F007FB55A5DB65A6C91C7FC14
+FC222E7FAD27>I<387FFFC080B5FC7E5CD803F0C8FCB3AAED0780ED0FC0A7007FB6FCA2
+B7FC7E1680222E7FAD27>76 D<90387FC0E03901FFF1F0000713FF5A5AEA3FE0EB801F38
+7F000F007E130712FE5A1403A3EC01E06C90C7FC127E127FEA3FC013F86CB47E6C13F86C
+13FE6CEBFF80C614C0010F13E0010013F0140FEC07F81403140115FC1400127812FCA46C
+EB01F8A26C130390388007F09038F01FE090B5FC15C0150000F85B38701FF81E307CAE27
+>83 D<3A7FFE01FFF8B54813FCA36C486C13F83A07E0001F80B3AB6D133F00031500A26D
+5B0001147E6D13FE6C6C485A90387F87F814FF6D5B010F13C06D5BD901FEC7FC262F80AD
+27>85 D<003FB512FE4814FFA4007EC712FEEC01FCA2EC03F8EC07F0A2003CEB0FE0C7EA
+1FC0A2EC3F80EC7F00A214FE5C1301495A5C1307495A5C131F495A91C7FC5B13FEA2485A
+4848131E153F485A485AA2485A485AA248C7FCB7FCA46C14FE202E7DAD27>90
+D<EB0FF8EB3FFE90B51280000314C04814E0390FFC0FF0391FE003F8EBC001D83F8013FC
+48C7FC127E157E12FEB612FEA415FC00FCC8FC7E127E127F6C143C6D137E6C7E01F013FE
+390FFC07FC6CB5FC000114F86C14F0013F13C0903807FE001F207D9F27>101
+D<153F90391FC0FF80D97FF313C048B612E05A4814EF390FF07F873A1FC01FC3C0EDC000
+EB800F48486C7EA66C6C485AEBC01FA2390FF07F8090B5C7FC5C485BEB7FF0EB1FC090C9
+FCA27F6CB5FC15E015F84814FE4880EB8001007EC7EA3F80007C140F00FC15C0481407A4
+6C140F007C1580007F143F6C6CEB7F009038F807FF6CB55A000714F86C5CC614C0D90FFC
+C7FC23337EA027>103 D<387FE0FFD8FFF313C090B512F0816C800003EB81FE49C67E49
+EB3F8049131F16C049130FA216E01507A6150F16C07F151F6DEB3F80157F6DEBFF009038
+FF83FEECFFFC5D5D01F313C0D9F0FEC7FC91C8FCAC387FFF80B57EA36C5B23317F9F27>
+112 D<397FFC03FC39FFFE0FFF023F13804A13C0007F90B5FC39007FFE1F14F89138F00F
+809138E002004AC7FC5CA291C8FCA2137EAD007FB57EB67EA36C5C22207E9F27>114
+D<133C137EA8007FB512F0B612F8A36C14F0D8007EC7FCAE1518157EA415FE6D13FC1483
+ECFFF86D13F06D13E0010313C0010013001F297EA827>116 D<397FE01FF8486C487EA3
+007F131F00031300B21401A21403EBFC0F6CB612E016F07EEB3FFE90390FF87FE024207F
+9F27>I<3A7FFC0FFF80486C4813C0A36C486C13803A07E000F800000313015D13F00001
+130301F85B1200A26D485A137CA290387E0F80133EA2011F90C7FC5CA2130F149E14BE13
+0714FC1303A25C1301A25CA213035CA213075C1208EA3E0F007F5B131FD87E7FC8FCEA7F
+FE6C5A5B6C5AEA07C022317E9F27>121 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fi cmr6 6 3
+/Fi 3 52 df<13E01201120712FF12F91201B3A7487EB512C0A212217AA01E>49
+D<EA01FC3807FF80381C0FC0383003E0386001F0EB00F812F86C13FCA2147C1278003013
+FCC7FC14F8A2EB01F0EB03E014C0EB0780EB0F00131E13385B5B3801C00CEA0380380600
+185A5A383FFFF85AB512F0A216217CA01E>I<13FF000313C0380F03E0381C00F014F800
+3E13FC147CA2001E13FC120CC712F8A2EB01F0EB03E0EB0FC03801FF00A2380003E0EB00
+F01478147C143E143F1230127812FCA2143E48137E0060137C003813F8381E03F0380FFF
+C00001130018227DA01E>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fj cmtt12 14.4 16
+/Fj 16 118 df<007FB67E16E0B712F816FE826C82832701FE00037F03007FEE3FF8707E
+160F707E1603707EA2701380177F18C0173FA218E0171FA218F0170FA418F81707AE170F
+18F0A4171F18E0A2173F18C0177FA2EFFF80A24C13005E4C5A160F4C5A4C5AEEFFF01503
+007FB75A5FB8C7FC5E5E6C15F0168035497DC83E>68 D<003FB7FC481680B812C0A36C16
+806C1600C7D87F80C7FCB3B3B3A5003FB7FC481680B812C0A36C16806C16002A4976C83E
+>73 D<003FB512C04880B67EA36C5C6C5C26007F80C9FCB3B3AA18C0EF03F0EF07F8AB00
+3FB8FC5AB9FCA36C17F07E35497CC83E>76 D<0103B57E013F14F848B7FC4816804816C0
+4816E04816F0EC800301FCC7127FD83FF0EC1FF849140FA24848EC07FCA2491403A648C8
+EA01FEB3B06D1403007F16FCA56D1407A36C6CEC0FF86D141F6D143F6C6CEC7FF09039FF
+8003FF91B6FC6C16E06C16C06C16806C1600D8003F14F8010314802F4B79C93E>79
+D<DAFFF01378010701FE13FC011FEBFF81017F14E190B612F94815FF5A48EBC03F390FFE
+0003D81FF87F4848EB007F49143F4848141F5B160F00FF150790C8FCA31603A37F705A6C
+6C91C8FCA26C7E7F6C7E13FE380FFFE06C13FE6CEBFFE06C14FE6CECFFE0013F14F8010F
+14FE010380D9007F14C0020380DA003F7F15039238007FF8EE1FFC1607707EA2707E82A2
+1880003E167F127F5AA56D15FF1800A26D5C6D5D6D14036D4A5A01FE4A5A6D6C133F9139
+FC01FFF091B65A5F486C5D011F4AC7FC01075C48C614E00078010F90C8FC314B7AC93E>
+83 D<003FB812FC5AB912FEA590C7EB0001A9007EEE00FCA2C81500B3B3AC49B67E4981
+A56D5D37497DC83E>I<267FFFFE0103B512F0A2B64914F8A36C496D14F0A2C690C83807
+F800B3B3AA6E140FA2017F5E6E141FA2013F5E6E143FA26D6C4A5A6D6C4A5A6E5B6D6C49
+90C7FC903A03FF800FFEEDE03F6D90B55A6D5D023F14E06E5C020791C8FC020113FC9138
+003FE03D4A80C83E>I<EC1FF891B57E010314E0010F14F84980017F8090B7FC48D9F80F
+1380DAC00113C048496C13E04848C7123F4848EC1FF049140F484815F81607484815FCA2
+48481403A24915FEA200FF1501A290B7FCA517FCA290CAFC7FA2127FA27F123F6D15FCA2
+6C6CEC01FE7F6C6C14036C6C14076DEC0FFC6C6D131F6C01E0EB7FF86C9039FC03FFF06D
+B612E06D15C06D158001071500010114FC6D6C13E0020790C7FC2F3679B43E>101
+D<143E147F4A7E497FA56D5B6EC8FC143E91C9FCAC003FB57E5A81A47EC7123FB3B3007F
+B71280B812C0A56C16802A4A76C93E>105 D<ED07FC3B3FFF803FFF804891B512E0B500
+C38002C78002CF806C01DF806C9038FFF80FD8003F9038C003FFED00014A7F4A815C177F
+5CA25CA35CB3A8003FB5D8C07FB51280486EB612C0B66C15E0A36C4A15C06C4A6C14803B
+347FB33E>110 D<EC1FF0ECFFFE01036D7E010F14E04980017F14FC90B67E489038F01F
+FFECC00748D90001138048486D13C04848EC7FE049143F4848EC1FF049140F003F16F849
+1407A24848EC03FCA448C8EA01FEAA6D1403007F16FCA26D1407A2003F16F86D140F6C6C
+EC1FF0A26C6CEC3FE06D147F6C6CECFFC06D5B6CD9C00713806CD9F01F13006C90B55A6D
+5C6D5C010F14E001031480010049C7FCEC1FF02F3679B43E>I<ED07FC3B3FFF803FFF80
+4891B512E0B500C314F802CF8002DF806C90B7FC6CDAF80F1380D8003FD9C00113C092C7
+13E04A143F4AEC1FF04A15F84A140F4AEC07FCA217034A15FE1701A318FF83A95F18FEA2
+80170318FC6E140718F86E140FEF1FF06E143F6EEC7FE06EECFFC0DBC0031380EDF01F92
+B6120002DF14FC02CF5C02C35C02C114C0DAC07F90C7FCED0FF892C9FCB3003FB512C048
+80B67EA36C5C6C5C384F7FB33E>I<EE07FE263FFFF890387FFFC0484AB512E0B5D8FC07
+14F05D4B14F86C5C6C91387FFC0FD80003EBFFC002FD90380007F0DAFFFEEB03E003F890
+C7FC5D5DA25D5DA292C9FCA25CA45CB3A3003FB612FC4881B7FCA37E6C5D35347CB33E>
+114 D<903901FFF00F011F9038FE1F8090B612BF000315FF5A5A5A393FFE003F01F01307
+D87FC0130190C8FC5A48157FA47EEE3F00D87FC091C7FC13F0EA3FFE381FFFF06CEBFFC0
+6C14FE6C6E7EC615E0013F14F8010780D9003F7F02007F03071380030013C0003EED3FE0
+007F151F48150F17F06D1407A37FA26D140F6D15E0161F01FCEC3FC06D14FF9026FFC00F
+138091B612005E485D013F5C6D14E0D8FC0714802778007FF8C7FC2C3677B43E>I<147C
+14FC497EAD003FB712FC5AB87EA36C5EA2260001FEC9FCB3A6173FA2EF7F80A76E14FF6D
+16006F5A9238C007FE91387FF01F92B55A6E5C6E5C6E5C6E1480020149C7FC9138003FF0
+31437DC13E>I<263FFF80EB7FFF4892B5FCB56C4880A36C806C81D8003FEC007FB3AC17
+FFA25E5E80011F140F6E5B02FE90B612806DB812C06D17E083010114FE6DDAF83F13C002
+3F01E01480020790C9FC3B347FB23E>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fk cmex10 10 9
+/Fk 9 113 df<177C17FCEE01F8A2EE03F0EE07E0EE0FC0A2EE1F80EE3F005E167E5E15
+015E15034B5A5E150F5E151F4B5AA24BC7FCA215FEA24A5AA24A5AA24A5AA2140F5D141F
+5D143F5DA2147F92C8FC5CA25C13015C1303A25C1307A3495AA3495AA3133F5CA3137F5C
+A313FF91C9FCA35A5BA31203A25BA31207A35BA3120FA45BA2121FA65BA2123FA85BA212
+7FAE5B12FFB3A62E95688149>48 D<12F87E127EA27E6C7E6C7EA26C7E6C7E7F12016C7E
+7F137E137F6D7E131F80130F806D7EA26D7EA26D7EA26D7EA2147FA26E7EA281141F8114
+0F811407A281140381A2140181140081A28182A36F7EA36F7EA382150FA3821507A38215
+03A3821501A382A281A31780A3167FA317C0A4163FA217E0A6161FA217F0A8160FA217F8
+AE160717FCB3A62E957E8149>I<B47EB3A6127F7FAE123FA27FA8121FA27FA6120FA27F
+A41207A37FA31203A37FA21201A37F7EA380137FA380133FA380131FA36D7EA36D7EA313
+0380A2130180130080A28081143FA281141F81140F811407A26E7EA26E7EA26E7EA2157F
+A26F7EA26F7E150F821507826F7E1501821500167E167F82EE1F80EE0FC0A2EE07E0EE03
+F0EE01F8A2EE00FC177C2E95688349>64 D<EE07FCB3A617F8160FAE17F0A2161FA817E0
+A2163FA617C0A2167FA41780A316FFA31700A35DA25EA315035EA315075EA3150F5EA315
+1F5EA34B5AA34B5AA393C7FC5DA25D14015D1403A25D14075DA2140F5D141F5D143F5DA2
+4AC8FCA214FEA2495AA2495AA2495AA2495A5C131F5C133F49C9FC137E13FE5B485A1203
+5B485A485AA2485A48CAFC127EA25A5A2E957E8349>I<EAFF80B3B3B00934688049>I<EA
+FF80B3B3B00934598049>I<BB12FC86A3D87FC0C9001F7FF0007F6C6C17076C6C050113
+806C6CEF007F1A1F6C6CF00FC06C6C18076C6C1803F201E06C6D17006D6C1860013F1970
+6E18306D7E6D6C18181B006D7E6D7E6D7EA26D7F6E7E6E7EA26E7E6E7E6E7EA26E7E6E7E
+80826F7E6F7EA26F7E6F7E6F5A5EA24B5A5E4BCBFC153E157E5D5D4A5A4A5A14075D4A5A
+4ACCFC143E147E147C5C4948181801031930495A4A18704948186049CC12E0491801017E
+F003C0017C180749180F4848F01F800003197F49EF01FF4848050713004848173F48CA00
+0FB5FC48BA5AA25ABB5AA24D537B7F58>80 D<BF12E08AA38A6C90CCFC0900806C6D1907
+6C6D07007F6C6D1A1F1D076C6DF201FF6C6D747E6C6DF33F801E0F6C6D1B076D6CF303C0
+6D6D1A01F600E06D7F6D6D1B706D1D30816D6D1B186D6D1B007F816E7E6E7FA26E7F6E7F
+6E7FA26E7F6E7F6E7FA26F7E6F7F6F7FA26F7F6F7F81836F7F6F7F167F83707F707F8284
+707F707FA2707F82715A60173F715A604D5A4DCDFC17FEA24C5A4C5A4C5A4C5A4C5A5F16
+3F4CCEFC16FE4B5A4B5A4B5AA24B5A4B5A4B5A4BCFFC15FEA24A5A4A5A4A481B184A481B
+304A5A4B1B70023F1C604ACF12E002FE1B014948F303C049481B074948F30F801E1F4948
+1B7F4948F3FF0049481A0349CE120F01FEF37FFEF403FF48481A7F4848077FB55A48BEFC
+48655AA248655ABFFC666D747B7F78>88 D<1B301B781BF8A2F201F0A2F203E0A2F207C0
+A2F20F80A2F21F00A21A3EA262A262A24F5AA24F5AA24F5AA262190FA24FC7FCA2193EA2
+61A261A24E5AA24E5AA24E5AA24E5AA24EC8FCA2183EA260131001305E13F800014C5A12
+03D80FFC4B5A121DD838FE4B5A12F0D8407F4B5A12004DC9FC6D7E173E6D7E5F6D7E5FA2
+6D6C495AA26D6C495AA26D6C5C1607A26D6C495AA2027F49CAFCA291383F803EA25EEC1F
+C05EEC0FE0EDE1F0EC07F1EDF3E0A26EB45AA26E5BA26E90CBFCA25D157E157C15384D64
+788353>112 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fl cmmi12 12 1
+/Fl 1 66 df<1830187018F0A217011703A24D7EA2170F171FA21737A2176717E717C793
+380187FCA2EE0307EE07031606160CA216181638163004607FA216C0030113011680ED03
+00A21506150E150C5D845D03707F15605DA24A5A4AB7FCA25C0206C87F5C021C157F1418
+5CA25C14E05C495A8549C9FC49163F1306130E5B133C137C01FE4C7ED807FFED01FF007F
+01F0027FEBFFC0B5FC5C42477DC649>65 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fm cmbx12 12 53
+/Fm 53 122 df<ED0FFF4AB512C0020F14F0027F80903A01FFF803FC499038C000FE010F
+EB00034948497E49485B5C495A4C138001FF6E13005CA3705AEE01F893C8FCA74BB51280
+B9FCA5C69038E00003B3B0007FD9FFC1B6FCA538467EC53E>12 D<B612F8A91D097F9A25
+>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA7FFCEA3FF8EA1FF0EA07C00F0F788E1F
+>I<EC3FF849B5FC010F14E0013F14F890397FF01FFC9039FFC007FE4890380001FF4848
+6D1380000716C049147F000F16E049143F001F16F0A2003F16F8A249141F007F16FCA600
+FF16FEB3A3007F16FCA56C6CEC3FF8A3001F16F0A2000F16E06D147F000716C06D14FF6C
+6C4913806C6D4813006C6D485A90397FF01FFC6DB55A010F14E0010314809026003FF8C7
+FC2F427CC038>48 D<EC03C01407141F147FEB03FF133FB6FCA413C3EA0003B3B3ADB712
+FCA5264177C038>I<ECFFE0010F13FE013F6D7E90B612E0000315F82607FC0313FE3A0F
+E0007FFFD81F806D138048C7000F13C0488001C015E001F07F00FF6E13F07F17F881A46C
+5A6C5A6C5AC9FC17F05DA217E05D17C04B13804B1300A2ED1FFC4B5A5E4B5A4B5A4A90C7
+FC4A5A4A5AEC0FF04A5AEC3F804AC7127814FE495A494814F8D907E014F0495A495A49C8
+FC017C140149140348B7FC4816E05A5A5A5A5AB8FC17C0A42D417BC038>I<ECFFF00107
+13FF011F14C0017F14F049C66C7ED803F8EB3FFED807E06D7E81D80FF86D138013FE001F
+16C07FA66C5A6C4815806C485BC814005D5E4B5A4B5A4B5A4A5B020F1380902607FFFEC7
+FC15F815FF16C090C713F0ED3FFCED0FFEEEFF80816F13C017E0A26F13F0A217F8A3EA0F
+C0EA3FF0487EA2487EA217F0A25D17E06C5A494913C05BD83F80491380D81FF0491300D8
+0FFEEBFFFE6CB612F800015D6C6C14C0011F49C7FC010113E02D427BC038>I<163FA25E
+5E5D5DA25D5D5D5DA25D92B5FCEC01F7EC03E7140715C7EC0F87EC1F07143E147E147C14
+F8EB01F0EB03E0130714C0EB0F80EB1F00133E5BA25B485A485A485A120F5B48C7FC123E
+5A12FCB91280A5C8000F90C7FCAC027FB61280A531417DC038>I<0007150301E0143F01
+FFEB07FF91B6FC5E5E5E5E5E16804BC7FC5D15E092C8FC01C0C9FCAAEC3FF001C1B5FC01
+C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01F06D13804915C0497F6C4815E0
+C8FC6F13F0A317F8A4EA0F80EA3FE0487E12FF7FA317F05B5D6C4815E05B007EC74813C0
+123E003F4A1380D81FC0491300D80FF0495AD807FEEBFFFC6CB612F0C65D013F1480010F
+01FCC7FC010113C02D427BC038>I<4AB47E021F13F0027F13FC49B6FC01079038807F80
+90390FFC001FD93FF014C04948137F4948EBFFE048495A5A1400485A120FA248486D13C0
+EE7F80EE1E00003F92C7FCA25B127FA2EC07FC91381FFF8000FF017F13E091B512F89039
+F9F01FFC9039FBC007FE9039FF8003FF17804A6C13C05B6F13E0A24915F0A317F85BA412
+7FA5123FA217F07F121FA2000F4A13E0A26C6C15C06D4913806C018014006C6D485A6C90
+38E01FFC6DB55A011F5C010714C0010191C7FC9038003FF02D427BC038>I<121E121F13
+FC90B712FEA45A17FC17F817F017E017C0A2481680007EC8EA3F00007C157E5E00785D15
+014B5A00F84A5A484A5A5E151FC848C7FC157E5DA24A5A14035D14074A5AA2141F5D143F
+A2147F5D14FFA25BA35B92C8FCA35BA55BAA6D5A6D5A6D5A2F447AC238>I<EC7FF00103
+B5FC010F14C0013F14F090397F801FFC3A01FC0003FE48486D7E497F4848EC7F80163F48
+4815C0A2001F151FA27FA27F7F01FE143F6D158002C0137F02F014006C01FC5B6E485A6C
+9038FF83FCEDE7F86CECFFE06C5D6C92C7FC6D14C06D80010F14F882013F8090B7FC4801
+3F14802607FC0F14C0260FF80314E04848C6FC496D13F0003F141F48481307496D13F815
+0000FF157F90C8123F161F160FA21607A36D15F0127F160F6D15E06C6C141F6DEC3FC06C
+6CEC7F80D80FFE903801FF003A07FFC00FFE6C90B55AC615F0013F14C0010F91C7FC0100
+13F02D427BC038>I<EC7FF0903807FFFE011F6D7E017F14E09039FFE03FF0489038800F
+F848496C7E48488048486D7E001F80003F1680A2484815C08117E0A212FF17F0A617F8A4
+5D127FA3003F5CA26C7E5D6C6C5B12076C6C133E6CEBC07C6CEBFFF8013F5B010F01C013
+F00101130090C8FCA217E05DA2EA03C0D80FF015C0487E486C491380A217004B5A150F5E
+49495A6C48495A01C0EBFFE0260FF0035B6CB65A6C4AC7FC6C14F86C6C13E0D907FEC8FC
+2D427BC038>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F031F80
+161F82033F80ED3E07037E80157C8203FC804B7E02018115F0820203814B137F0207815D
+173F020F814B7F021F8292C77EA24A82023E80027E82027FB7FCA291B87EA2498302F0C8
+FCA20103834A157F0107834A153FA249488284011F8491C97E4984133E017E82B6020FB6
+12F0A54C457CC455>65 D<B9FC18F018FE727E19E026003FFCC700077F05017F716C7E72
+7E727EA2721380A37213C0A74E1380A24E1300A24E5A4E5A4E5A4D5B05075B94B5128091
+B700FCC7FC18F018FF19E002FCC7000113F8716C7EF01FFE727E7213801AC07213E0A272
+13F0A31AF8A71AF0A2601AE0604E13C0604E138095B5120005075BBA12F86119C04EC7FC
+18E045447CC350>I<DCFFF01470031F01FF14F04AB6EAE0010207EDF803023FEDFE0791
+B539E001FF0F4949C7EA3F9F010701F0EC0FFF4901C0804990C87E494881494881494816
+7F4849163F4849161F5A4A160F485B19074890CAFC19035A5BA2007F1801A34994C7FC12
+FFAE127F7F1AF0A2123FA27F6C18011AE06C7F19036C6D17C06E16077E6C6DEE0F806C6D
+EE1F006D6C5E6D6C167E6D6C6C5D6D6D4A5A6D01F0EC07F0010101FEEC1FE06D903AFFF0
+01FF80023F90B6C7FC020715FC020115F0DA001F1480030001F8C8FC44467AC451>I<B9
+FC18F018FE727E19E026003FFEC7001F13F805017F9438003FFF060F7F727F727F727F84
+737E737EA2737EA2737EA21B80A2851BC0A51BE0AD1BC0A51B8061A21B006162193F624F
+5A19FF624E5B06075B4E5B063F90C7FC4DB45A050F13F8BA5A19C04EC8FC18F095C9FC4B
+447CC356>I<BA12F8A485D8001F90C71201EF003F180F180318011800A2197E193EA319
+1EA21778A285A405F890C7FCA316011603161F92B5FCA5ED001F160316011600A2F101E0
+1778A2F103C0A494C7FC1907A21A80A2190FA2191FA2193FF17F0061601807181F4DB5FC
+BBFC61A443447DC34A>I<BA1280A419C026003FFEC7121F1701EF007F183F181F180F18
+0719E01803A31801A3EE01E0F000F0A419001603A31607160F167F91B6FCA59138FE007F
+160F16071603A31601A693C9FCAFB712F0A53C447CC346>I<DCFFF01470031F01FF14F0
+4AB6EAE0010207EDF803023FEDFE0791B539E001FF0F4949C7EA3F9F010701F0EC0FFF49
+01C0804990C87E4948814948814948167F4849163F4849161F5A4A160F485B19074890CA
+FC19035A5BA2007F1801A34994C8FC12FFAD057FB612F0127F7FA3003FDC0001EBF000A2
+7F7EA26C7FA26C7F807E6C7F6C7F6D7E6D6C5D6D6C7E6D6D5C6D01F05C010101FE143F6D
+903AFFF001FF9F023F90B6120F0207EDFC030201EDF000DA001F02C01330030001FCC9FC
+4C467AC458>I<B7D88003B612FEA526003FFEC9EBF800B3A791B9FCA54AC9FCB3AAB7D8
+8003B612FEA54F447CC358>I<B712E0A5D8001F90C7FCB3B3B3A4B712E0A523447DC32A>
+I<B712F0A526003FFECAFCB3B1F00780A4180F1900A460A360A2187EA218FE1701170317
+07171F177FEE03FFB95AA539447CC343>76 D<B500FE067FB512806E95B6FCA26F5EA2D8
+003F50C7FC013D6DEE03DFA2013C6DEE079FA26E6CEE0F1FA26E6C161EA26E6C163CA36E
+6C1678A26E6C16F0A26E6DEC01E0A26E6DEC03C0A36E6DEC0780A26F6CEC0F00A26F6C14
+1EA26F6C5CA36F6C5CA26F6C5CA26F6D485AA26F6D485AA26F6D485AA3706C48C7FCA293
+383FF81EA2706C5AA2706C5AA3706C5AA2705BA2705BA2705BA2B6057FB6128071C7FCA2
+173E171C61447CC36A>I<923807FFC092B512FE0207ECFFC0021F15F091267FFE0013FC
+902601FFF0EB1FFF01070180010313C04990C76C7FD91FFC6E6C7E49486F7E49486F7E01
+FF8348496F7E48496F1380A248496F13C0A24890C96C13E0A24819F04982003F19F8A300
+7F19FC49177FA400FF19FEAD007F19FC6D17FFA3003F19F8A26D5E6C19F0A26E5D6C19E0
+A26C6D4B13C06C19806E5D6C6D4B13006C6D4B5A6D6C4B5A6D6C4B5A6D6C4A5B6D01C001
+075B6D01F0011F5B010101FE90B5C7FC6D90B65A023F15F8020715C002004AC8FC030713
+C047467AC454>79 D<B9FC18F018FE727E19E0D8001F90C7000F7F05017F716C7E727E72
+7E721380A21AC084A21AE0A91AC0A24E1380A21A00604E5A4E5A4D485A050F5B92B712C0
+96C7FC18FC18C092CBFCB3A7B712E0A543447DC34D>I<B812F8EFFFC018F818FE727ED8
+001F90C7003F13E005037F05007F727E727E727EA28684A286A762A24E90C7FCA24E5A61
+187F943801FFF005075B053F138092B7C8FC18F818E018F892C77FEF3FFF050F7F717F71
+7FA2717FA2717FA785A61B0F85A2187F73131F72141EB700E06DEB803E72EBE0FC72EBFF
+F8060114F0726C13E0CC0007138050457DC354>82 D<DAFFE0131C010701FE133C013F90
+38FF807C90B6EAE0FC4815F9489038801FFF3907FC00014848EB007F4848143F4848140F
+491407007F15035B1601160012FF177CA27FA26D153C7F7F6D92C7FC6C7EEBFFE014FE6C
+EBFFF015FF6C15E016FC6C816C6F7E6C826C826C6C81011F810107811300020F80140003
+077FED007F82040F1380828212F082A282A27EA218007EA26C5D6C5E6D14036D5D6D1407
+01F84A5A01FFEC3FF002F8EBFFE0486CB65AD8FC1F92C7FCD8F80714FC48C614F0480107
+138031467AC43E>I<003FBA12E0A59026FE000FEB8003D87FE09338003FF049171F90C7
+1607A2007E1803007C1801A300781800A400F819F8481978A5C81700B3B3A20107B8FCA5
+45437CC24E>I<B76C010FB512F8A526003FFEC93803E000B3B3A9011F17076280190F6D
+606F151F6D95C7FC6D6D5D197E6D6D5D6D6D1403DA7FFC4A5A6EB4EC3FF0020F9039F003
+FFE06E90B61280020193C8FC6E6C14FC030F14E09226007FFEC9FC4D457CC356>I<9038
+01FFE0011F13FE017F6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7EA26F7F
+A36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC1307013F13F19038FFFC01000313E0
+000F1380381FFE00485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEBFFC0
+3A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97
+D<EB7FC0B5FCA512037EB1ED0FF892B57E02C314E002CF14F89139DFC03FFC9139FF000F
+FE02FCEB03FF4A6D13804A15C04A6D13E05CEF7FF0A218F8173FA318FCAC18F8A2177F18
+F0A3EFFFE06E15C06E5B6E491380027C491300496C495A903AFC1FC07FFC496CB512F0D9
+F00314C049C691C7FCC8EA1FF036467DC43E>I<EC3FFC49B512C0010F14F0013F14FC90
+397FF003FE9039FFC001FF0003495A48494813805B120F485AA2485A6F1300007F6E5AED
+00784991C7FCA212FFAC6C7EA3123F6DEC03C0A26C6C1407000F16806D140F6C6DEB1F00
+6C6D133E6C01F05B3A007FFC03F86DB55A010F14C0010391C7FC9038003FF82A2F7CAD32
+>I<EE03FEED07FFA5ED001F160FB1EC3FE0903803FFFC010FEBFF8F013F14CF9039FFF8
+07FF48EBC00148903880007F4890C7123F4848141F49140F121F485AA3127F5BA212FFAC
+127FA37F123FA26C6C141FA26C6C143F0007157F6C6C91B5FC6CD9C00314FC6C9038F01F
+EF6DB5128F011FEBFE0F010713F89026007FC0EBF80036467CC43E>I<EC3FF80103B57E
+010F14E0013F8090397FF83FF89039FFC007FC48496C7E48496C7E48486D1380485A001F
+ED7FC05B003FED3FE0A2127F5B17F0161F12FFA290B7FCA401F0C9FCA5127FA27FA2123F
+17F06C7E16016C6C15E06C6C14036C6DEB07C06C6DEB0F806C01F0EB3F0090397FFE01FE
+011FB55A010714F0010114C09026001FFEC7FC2C2F7DAD33>I<EDFF80020F13E0027F13
+F049B512F849EB8FFC90390FFE0FFE90381FFC1F14F8133FEB7FF0A2ED0FFCEBFFE0ED03
+F0ED00C01600ABB612F8A5C601E0C7FCB3B0007FEBFFE0A527467DC522>I<DAFFE0137E
+010F9039FE03FF80013FEBFF8F90B812C048D9C07F133F489038001FF84848EB0FFC4848
+903907FE1F80001F9238FF0F00496D90C7FCA2003F82A8001F93C7FCA26D5B000F5D6C6C
+495A6C6C495A6C9038C07FF04890B55A1680D8078F49C8FC018013E0000F90CAFCA47F7F
+7F90B612C016FC6CEDFF8017E06C826C16FC7E000382000F82D81FF0C77ED83FC0140748
+48020113808248C9FC177FA46D15FF007F17006D5C6C6C4A5A6C6C4A5AD80FFEEC3FF83B
+07FFC001FFF0000190B612C06C6C92C7FC010F14F8D9007F90C8FC32427DAC38>I<EB7F
+C0B5FCA512037EB1ED07FE92383FFF8092B512E002C114F89139C7F03FFC9138CF801F91
+39DF000FFE14DE14FC4A6D7E5CA25CA35CB3A7B60083B512FEA537457CC43E>I<137C48
+B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFF
+A512037EB3AFB6FCA518467CC520>I<EB7FC0B5FCA512037EB3B3B3A3B61280A519457C
+C420>108 D<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E00281
+6E4880913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C01
+9E6D013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA557
+2D7CAC5E>I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F80
+1F000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC
+3E>I<EC1FFC49B512C0010714F0011F14FC90397FF80FFF9026FFC0017F48496C7F4848
+C7EA3FE000078248486E7E49140F001F82A2003F82491407007F82A400FF1780AA007F17
+00A46C6C4A5AA2001F5E6D141F000F5E6C6C4A5AA26C6C6CEBFFE06C6D485B27007FF80F
+90C7FC6DB55A010F14F8010114C09026001FFCC8FC312F7DAD38>I<90397FC00FF8B590
+B57E02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15
+C04A6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E
+4913806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FC
+ADB67EA536407DAC3E>I<DA3FE0131E902603FFFC133E010F01FF137E013F1480903AFF
+F80FE0FE489038E003F148EBC0014890388000FB4890C7127F49143F001F151F485A160F
+5B127FA3485AAC6C7EA46C7EA26C6C141F163F6C6C147F6C15FF6C6D5A6C9038E003EF6C
+9038F01FCF6DB5128F011FEBFE0F010313F89038007FC091C7FCAD0307B512FCA536407C
+AC3B>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE6C13
+BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>I<90
+391FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E00FE140F
+A215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C15806C
+7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141FA26DEB
+3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD2C>I<
+EB01E0A51303A41307A2130FA2131FA2133F137F13FF1203000F90B51280B7FCA4C601E0
+C7FCB3A3ED01E0A9150302F013C0137F150790393FF80F8090391FFC1F006DB5FC6D13FC
+01015B9038003FE023407EBE2C>I<D97FC049B4FCB50103B5FCA50003EC000F6C81B3A8
+5EA25EA25E7E6E491380017FD901F713FE9138F807E76DB512C7010F1407010313FE9026
+007FF0EBFC00372E7CAC3E>I<B6903803FFFCA5000101E09038003E006C163C80017F5D
+8017F8013F5D6E1301011F5D6E1303010F5D6E13076D5DED800F6D92C7FC15C05E6DEBE0
+1E163E6D143CEDF07C027F1378EDF8F8023F5B15FD021F5B15FF6E5BA36E5BA26E90C8FC
+A26E5AA26E5AA21578362C7EAB3B>I<B5D8FE1FB539801FFFF0A500019027C0003FE0C7
+EA7C007114786E17F86C6F6C5C6E1601017F6E6C5CA26E011F1403013F6F5C6E013F1407
+011F6F5CA26E0179140F010F048090C7FC6E01F95C6D02F0EBC01E15806D902681E07F5B
+18E003C3157C6D9139C03FF07815E76DDA801F5B18F803FF14F96E9039000FFDE018FF6E
+486D5BA36E486D5BA26E486D90C8FCA24B7F02075DA26E48147C4B143C4C2C7EAB51>I<
+B500FE90383FFFF0A5C601F0903803E0006D6C495A013F4A5A6D6C49C7FC6E5B6D6C137E
+6DEB807C6D6D5A6DEBC1F0EDE3E06DEBF7C06EB45A806E90C8FC5D6E7E6E7F6E7FA24A7F
+4A7F8291381F3FFCEC3E1F027C7F4A6C7E49486C7F01036D7F49487E02C08049486C7F49
+C76C7E013E6E7E017E141FB500E090B512FCA5362C7EAB3B>I<B6903803FFFCA5000101
+E09038003E006C163C80017F5D8017F8013F5D6E1301011F5D6E1303010F5D6E13076D5D
+ED800F6D92C7FC15C05E6DEBE01E163E6D143CEDF07C027F1378EDF8F8023F5B15FD021F
+5B15FF6E5BA36E5BA26E90C8FCA26E5AA26E5AA21578A215F85D14015D001F1303D83F80
+5B387FC007D8FFE05B140F92C9FC5C143E495A387FC1F8EB07F06CB45A6C5B000790CAFC
+EA01FC36407EAB3B>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fn cmsy8 8 7
+/Fn 7 107 df<B812C0A32A037A9137>0 D<123C127E12FFA4127E123C08087A9414>I<
+130C131EA50060EB01800078130739FC0C0FC0007FEB3F80393F8C7F003807CCF83801FF
+E038007F80011EC7FCEB7F803801FFE03807CCF8383F8C7F397F0C3F8000FCEB0FC03978
+1E078000601301000090C7FCA5130C1A1D7C9E23>3 D<12E012F812FEEA3F80EA0FE0EA
+03F8EA00FEEB3F80EB0FE0EB03F8EB00FC143FEC0FC0EC07F0EC01FCEC007FED1FC0ED07
+F0ED01FCED007FEE1FC01607161FEE7F00ED01FCED07F0ED1FC0037FC7FCEC01FCEC07F0
+EC0FC0023FC8FC14FCEB03F8EB0FE0EB3F8001FEC9FCEA03F8EA0FE0EA3F80007ECAFC12
+F812E0CBFCAD007FB71280B812C0A22A3B7AAB37>21 D<137813FE1201A3120313FCA3EA
+07F8A313F0A2EA0FE0A313C0121F1380A3EA3F00A3123E127E127CA35AA35A0F227EA413
+>48 D<D93F80EC07F0D9FFF0EC3FFC000301FC91B5FC4801FF903901F80780D80F80903A
+8007C001C03D1E003FC00F8000E0486D6C48C71270003890260FF03E143048902607F83C
+14386E6C48141800606D6C5A00E06D6C48141C48027F150C5E153F6F7E6F7E82151F6C6F
+141C0060DA3DFE1418DB78FF143800704A6C7E003001016D6C1370003849486C6C13F06C
+903B07C00FF001E06C903B0F8007FC07C02807807E0003B512806CB44801001400C601F0
+EC3FFCD93F80EC07F03E1F7C9D47>I<12E0B3B3B3AD034378B114>106
+D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fo cmmi8 8 13
+/Fo 13 121 df<1670A216F01501A24B7EA21507150DA2151915391531ED61FC156015C0
+EC0180A2EC03005C14064A7F167E5C5CA25C14E05C4948137F91B6FC5B0106C7123FA25B
+131C1318491580161F5B5B120112031207000FED3FC0D8FFF8903807FFFEA22F2F7DAE35
+>65 D<013FB6FC17E0903A00FE0007F0EE01FC4AEB007EA2010181A25C1880010316005F
+5CA2010715FEA24A5C4C5A010F4A5A4C5A4AEB1F8004FFC7FC91B512F84914C00280C9FC
+A3133F91CAFCA35B137EA313FE5BA312015BA21203B512E0A2312D7DAC2D>80
+D<000FB8FCA23B1FC003F8003F0100151F001C4A130E123C003801071406123000704A13
+0EA20060010F140C12E0485CA2141FC715005DA2143FA292C8FCA25CA2147EA214FEA25C
+A21301A25CA21303A25CA21307A25C130F131F001FB512F0A2302D7FAC29>84
+D<13F8121FA21201A25BA21203A25BA21207A25BA2120FEBC7E0EB9FF8EBB83C381FF01E
+EBE01F13C09038800F80EA3F00A2123EA2007E131FA2127CA2143F00FC14005AA2147EA2
+147C14FC5C387801F01303495A383C0F806C48C7FCEA0FFCEA03F0192F7DAD1E>98
+D<EB01F8EB0FFE90383E0780EB7C01D801F813C03803F0073807E00FEA0FC00180138012
+1F48C8FCA25A127EA312FE5AA51560007C14E0EC01C0EC03806CEB0F00001E131C380F81
+F83807FFE0C648C7FC1B1F7D9D1F>I<14FCEB03FF90380F839C90381F01BC013E13FCEB
+7C005B1201485A15F8485A1401120F01C013F0A21403121F018013E0A21407A215C0A200
+0F130F141F0007EB3F80EBC07F3803E1FF3800FF9F90383E1F0013005CA2143EA2147E00
+38137C00FC13FC5C495A38F807E038F00F80D87FFEC7FCEA1FF81E2C7E9D22>103
+D<1307EB0F80EB1FC0A2EB0F80EB070090C7FCA9EA01E0EA07F8EA0E3CEA1C3E12381230
+1270EA607EEAE07C12C013FC485A120012015B12035BA21207EBC04014C0120F13801381
+381F01801303EB0700EA0F06131EEA07F8EA01F0122E7EAC18>105
+D<15E0EC01F01403A3EC01C091C7FCA9147CEB03FE9038078F80EB0E07131C013813C013
+30EB700F0160138013E013C0EB801F13001500A25CA2143EA2147EA2147CA214FCA25CA2
+1301A25CA21303A25CA2130700385BEAFC0F5C49C7FCEAF83EEAF0F8EA7FF0EA1F801C3B
+81AC1D>I<131FEA03FFA2EA003FA2133EA2137EA2137CA213FCA25BA2120115F89038F0
+03FCEC0F0E0003EB1C1EEC387EEBE07014E03807E1C09038E3803849C7FC13CEEA0FDC13
+F8A2EBFF80381F9FE0EB83F0EB01F81300481404150C123EA2007E141C1518007CEBF038
+ECF83000FC1470EC78E048EB3FC00070EB0F801F2F7DAD25>I<27078007F0137E3C1FE0
+1FFC03FF803C18F0781F0783E03B3878E00F1E01263079C001B87F26707F8013B0006001
+0013F001FE14E000E015C0485A4914800081021F130300015F491400A200034A13076049
+133E170F0007027EEC8080188149017C131F1801000F02FCEB3F03053E130049495C180E
+001F0101EC1E0C183C010049EB0FF0000E6D48EB03E0391F7E9D3E>109
+D<90387C01F89038FE07FE3901CF8E0F3A03879C0780D907B813C0000713F000069038E0
+03E0EB0FC0000E1380120CA2D8081F130712001400A249130F16C0133EA2017EEB1F80A2
+017C14005D01FC133E5D15FC6D485A3901FF03E09038FB87C0D9F1FFC7FCEBF0FC000390
+C8FCA25BA21207A25BA2120FA2EAFFFCA2232B829D24>112 D<3807C01F390FF07FC039
+1CF8E0E0383879C138307B8738707F07EA607E13FC00E0EB03804848C7FCA2128112015B
+A21203A25BA21207A25BA2120FA25BA2121FA290C8FC120E1B1F7E9D20>114
+D<013F137C9038FFC1FF3A01C1E383803A0380F703C0390700F60F000E13FE4813FC1218
+0038EC0700003049C7FCA2EA200100005BA313035CA301075B5D14C000385CD87C0F1306
+00FC140E011F130C011B131C39F03BE038D8707113F0393FE0FFC0260F803FC7FC221F7E
+9D28>120 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fp cmti10 10.95 63
+/Fp 63 124 df<933807FF80043F13E09338FE00F8DB01F0133EDB07E0130E4B48131F4C
+137F031F14FF4BC7FCA218FE157E1878180015FE5DA31401A25DA414030103B712F0A218
+E0903A0003F000070207140F4B14C0A3171F020F15805DA2173F1800141F5D5F177EA214
+3F92C712FE5FA34A1301027EECF81CA3160302FEECF03C4A1538A21878187013014A0101
+13F018E0933800F1C0EF7F804948EC1F0094C7FCA35C1307A2001E5B127F130F00FF5BA2
+49CAFC12FEEAF81EEA703CEA7878EA1FF0EA07C0385383BF33>12
+D<D801E013F03907F803FC000F130701FC13FE001F130FA4000F13073903D801EC390018
+000CA20138131C01301318017013380160133001E01370491360000114E039038001C001
+001380481303000EEB070048130E485B485B485B4813601F1C70BE2F>34
+D<EA01E0EA07F8120F13FC121FA4120FEA03D8EA0018A2133813301370136013E013C012
+01EA038013005A120E5A5A5A5A5A0E1C6DBE1C>39 D<ED01801507ED0F00151C5D5D5D14
+014A5A4A5A4AC7FC141E143E5C14785C1301495AA2495A5C130F49C8FCA2133EA25BA213
+FC5B12015BA212035B1207A25B120FA25BA2121FA290C9FCA25AA2123EA2127EA2127CA6
+5AAB1278A67EA47EA2120E120F7EA26C7EA26C7E6C7E1360215A73C325>I<14031580A2
+EC01C0EC00E0A21570A215781538153CA3151EA4151FA2150FA7151FA9153FA2153EA315
+7EA2157CA215FCA215F8A21401A215F0A2140315E0A2140715C0A2EC0F80A2141F15005C
+143EA25CA25CA2495A5C1303495A5C130F49C7FC131E5B137C5B5B485A485A485A48C8FC
+121E5A12705A5A205A7FC325>I<EA01E0EA07F8120FA2EA1FFCA4EA0FF8EA0798EA0018
+13381330A21370136013E013C01201EA0380EA07001206120E5A5A5A5A5A0E1C7A891C>
+44 D<387FFFFCA3B5FCA21605799521>I<120FEA3FC0127FA212FFA31380EA7F00123C0A
+0A77891C>I<15FE913807FF8091381F07C091387C01F0ECF000494813F8494813780107
+147C495A49C7FC167E133E137EA25BA2485AA2000315FEA25B000715FCA2491301120FA3
+4848EB03F8A44848EB07F0A448C7EA0FE0A316C0007E141F12FE1680153FA2481500A215
+7EA25DA25D4813015D6C495A127C4A5A4A5A6C49C7FC143E6C5B380FC1F03803FFC0C648
+C8FC273F76BC2E>48 D<15031507150F151F151E153E157EEC01FEEC03FC1407141FEB01
+FF90380FFBF8EB1FC3EB0E07130015F0A2140FA215E0A2141FA215C0A2143FA21580A214
+7FA21500A25CA25CA21301A25CA21303A25CA21307A25CA2130FA25CA2131FA25CEB7FE0
+B612F0A215E0203D77BC2E>I<15FE913803FFC091380F01F091383C00F84A137C4A7F49
+48133F49487F4A148049C7FC5BEB0E0C011E15C0EB1C0EEB3C06133813781370020E133F
+D9F00C148013E0141C0218137F00011600EBC0384A13FEEC600102E05B3A00E3C003F890
+39FF0007F0013C495A90C7485A5E037FC7FC15FC4A5A4A5AEC0FC04AC8FC147E14F8EB03
+E0495A011FC9FC133E49141801F0143C48481438485A1678485A48C85A120E001E4A5AD8
+3FE0130301FF495A397C3FF01FD8780FB55AD8700391C7FCD8F0015B486C6C5A6E5AEC07
+C02A3F79BC2E>I<1638167E16FE16FCA3150116F8A3150316F0A2150716E0A2ED0FC0A3
+ED1F80A216005DA2157EA2157C15FC5D14015D14035D4A5AA24A5AA24AC7FC143EED0380
+91387C0FC014F8ECF01F01011480EB03E014C0903807803F010F1400EB1F00133E495B49
+137E485A485A484813FE48B46C5A4813F04813FE267C00FF130800F090380FFFFC006013
+01C714E0913803F8005DA314075DA3140F5DA3141F5DA3020EC7FC274F7DBC2E>52
+D<157F913801FFE0913807C0F091381F007C023C133C4A133E4A131F1301495A5C1307A2
+495AA2163F011F143EA2167E6E137C16F8ECE00102F013F09138F803E09138FC07C09039
+0FFE0F00ECFFBE6D13F86D5B7F6D7F8101037F90380F9FFFD91F0F1380D97C0713C0497E
+48486C13E03903E0007F4848133F4848131F001F140F90C7FC003E1407A2127E127CA200
+FC15C05AA2ED0F80A2ED1F00153E007C143C157C007E5C6CEB03F0391F8007C0390FE03F
+802607FFFEC7FC000113F838003FC0283F78BC2E>56 D<15FF020713C091381F81E09138
+3E00F002FC13F84948137C495A4948137E010F143E495A133F4A133F017F147F91C7FC5B
+A2485AA216FF12035B16FE150112075B1503A216FC491307A20003140F16F8151F12016D
+133F0000EC7FF015EF90387C01CF90393E079FE090380FFE1FD903F813C090C7123FA216
+80157F160015FEA24A5A001C5C007F1303485C4A5A4A5A4A5A4849C7FC00F8137E00E05B
+6C485A387C07E0383FFFC06C90C8FCEA03F8283F77BC2E>I<131EEB3F80137FEBFFC05A
+A214806C13005B133C90C7FCB3120FEA3FC0127FA212FFA35B6CC7FC123C122777A61C>
+I<171C173C177CA217FCA216011603A21607A24C7EA2161DA216391679167116E1A2ED01
+C1A2ED038115071601150EA2031C7FA24B7EA25D15F05D4A5AA24A5AA24AC7FC5C140E5C
+021FB6FC4A81A20270C7127FA25C13015C495AA249C8FCA2130E131E131C133C5B01F882
+487ED807FEEC01FFB500E0017FEBFF80A25C39417BC044>65 D<49B712C018F818FE903B
+0003FC0001FF9438007F804BEC3FC0A2F01FE014074B15F0180FA2140F5D181FA2021F16
+E05D183F19C0023FED7F804B14FF19004D5A027F4A5A92C7EA07F0EF1FE0EF7F804AD903
+FEC7FC92B512F017FE4AC7EA3F800101ED1FE04A6E7E17078401036F7E5CA30107825CA3
+010F5E4A1407A260011F150F5C4D5A60013F153F4A4A5A4D5A017F4A90C7FC4C5A91C7EA
+0FF849EC3FF0B812C094C8FC16F83C3E7BBD40>I<9339FF8001C0030F13E0033F9038F8
+03809239FF807E07913A03FC001F0FDA0FF0EB071FDA1FC0ECBF00DA7F806DB4FC4AC77E
+495AD903F86E5A495A130F4948157E4948157C495A13FF91C9FC4848167812035B120749
+1670120FA2485A95C7FC485AA3127F5BA312FF5BA490CCFCA2170FA2170EA2171E171C17
+3C173817786C16706D15F04C5A003F5E6D1403001F4B5A6D4AC8FC000F151E6C6C5C6C6C
+14F86C6C495A6C6CEB07C090397FC03F8090261FFFFEC9FC010713F0010013803A4272BF
+41>I<49B712C018F818FE903B0003FE0003FF9438007F804BEC1FC0F00FE0F007F01407
+4BEC03F8F001FCA2140F4BEC00FEA3141F4B15FFA3143F5DA3027F5D5DA219FE14FF92C8
+1203A34917FC4A1507A219F813034A150F19F0A20107EE1FE05CF03FC0A2010FEE7F804A
+16006060011F4B5A4A4A5A4D5AA2013F4B5A4AEC3FC04DC7FC017F15FEEE03FC4AEB0FF0
+01FFEC7FE0B8128004FCC8FC16E0403E7BBD45>I<49B812F8A390260003FEC7121F1807
+4B14031801F000F014075DA3140F5D19E0A2141F4B1338A2EF7801023F027013C04B91C7
+FCA217F0027F5CED80011603160F91B65AA3ED001F49EC07805CA3010392C8FC5CF00380
+4C13070107020E14005C93C75A180E010F161E4A151C183CA2011F5E5C60A2013F15014A
+4A5A1707017F150F4D5A4A147F01FF913807FF80B9FCA295C7FC3D3E7BBD3E>I<49B812
+F0A390260003FEC7123F180F4B1403A2F001E014075DA3140F5D19C0A2141F5D1770EFF0
+03023F02E013804B91C7FCA21601027F5CED8003A2160702FFEB1F8092B5FCA349D9003F
+C8FC4A7F82A20103140E5CA2161E0107141C5CA293C9FC130F5CA3131F5CA3133F5CA213
+7FA25C497EB612E0A33C3E7BBD3B>I<9339FF8001C0030F13E0033F9038F803809239FF
+807E07913A03FC001F0FDA0FF0EB071FDA1FC0ECBF00DA7F806DB4FC4AC77E495AD903F8
+6E5A495A130F4948157E4948157C495A13FF91C9FC4848167812035B1207491670120FA2
+485A95C7FC485AA3127F5BA312FF5BA30303B512FC90C7FCA2DB000190C7FCA25FA21603
+5FA316076C5E7FA2003F150F6D5D121F6D141F000F153F6C6C4A5A6C6C14F76C6CEB01E3
+6CB4EB07C1903A7FC03F81C090391FFFFE00010701F890C8FC010013803A4272BF46>I<
+49B648B6FC495DA2D9000390C7000313004B5D4B5DA2180714074B5DA2180F140F4B5DA2
+181F141F4B5DA2183F143F4B5DA2187F147F4B5DA218FF91B8FC96C7FCA292C712015B4A
+5DA2170313034A5DA2170713074A5DA2170F130F4A5DA2171F131F4A5DA2173F133F4A5D
+A2017F157FA24A5D496C4A7EB66CB67EA3483E7BBD44>I<49B6FC5BA2D9000313005D5D
+A314075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF92C7FCA35B5CA313035CA31307
+5CA3130F5CA3131F5CA3133F5CA2137FA25C497EB67EA3283E7BBD23>I<4AB61280A218
+0091C713C0167F5FA216FF94C7FCA35D5EA315035EA315075EA3150F5EA3151F5EA3153F
+5EA3157FA25EA215FFA293C8FCA25CA25DA2380F8003EA3FC0D87FE05BA21407D8FFC05B
+140F01805B49485A12FC0070495A4A5A6C01FEC9FC383C01FC380F07F03807FFC0C648CA
+FC314079BD30>I<49B6903807FFFE605ED9000390C7000113E04B6E13004B15FC4E5A19
+E002074B5A4BEC0F804EC7FC183C020F5D4B5C4D5AEF07C0021F4AC8FC4B131E5F5F023F
+5C9238C003E0EE07804CC9FC027F5B4B5AEEFF801581ECFF834B7FED0F7FED1E3F49017C
+7FECFEF89138FFE01F03C07F491380ED000F4A805C010714074A80A21603010F815C1601
+83131F4A6D7FA2177F013F825C173F017F82A24A81496C4A7EB6D8800FB512C0A261473E
+7BBD46>I<49B612C0A25FD9000390C8FC5D5DA314075DA3140F5DA3141F5DA3143F5DA3
+147F5DA314FF92C9FCA35B5CA313035C18C0EF01E0010716C05C17031880130F4A140718
+005F131F4A141EA2173E013F5D4A14FC1601017F4A5A16074A131F01FFECFFF0B8FCA25F
+333E7BBD39>I<49B5933807FFFC496062D90003F0FC00505ADBBF805E1A771AEF140703
+3F923801CFE0A2F1039F020FEE071F020E606F6C140E1A3F021E161C021C04385BA2F170
+7F143C023804E090C7FCF001C0629126780FE0495A02705FF00700F00E0114F002E0031C
+5BA2F03803010116704A6C6C5D18E019070103ED01C00280DA03805BA2943807000F1307
+0200020E5C5FDB03F8141F495D010E4B5CA24D133F131E011CDAF9C05CEEFB80197F013C
+6DB4C7FC013895C8FC5E01784A5C13F8486C4A5CD807FE4C7EB500F04948B512FE16E015
+00563E7BBD52>I<902601FFFE020FB5FC496D5CA2D900016D010013C04AEE3F00193E70
+141C193CEC07BFDB3FE01438151F1978020F7FDA0E0F15708219F0EC1E07021C6D5CA203
+031401023C7FDA38015DA2701303EC7800027002805BA2047F130702F014C04A013F91C7
+FCA2715A0101141F4AECF00EA2040F131E010315F84A151C1607EFFC3C0107140391C714
+3817FE040113784915FF010E16708218F0131E011C6F5AA2173F133C01385E171F137813
+F8486C6F5AEA07FEB500F01407A295C8FC483E7BBD44>I<EEFFC0030713F892383F80FE
+9238FC003FDA03F0EB0F804A486D7EDA1F80804AC76C7E027E6E7E4A8149481400494881
+1307495A4948157F133F5C49C9FC4917805B1201485AA212075B000F17FFA25B121F1900
+48485DA448484B5AA34D5AA25B4D5A12FF60171F60007F163F604D5AA24DC7FC5F003F15
+014C5A6D5D001F4B5A4C5A6C6C4A5A4C5A6C6C4AC8FC000315FC6C6C495A6C6CEB07E001
+7FEB1F8090261FC07EC9FC903807FFF801001380394273BF46>I<49B77E18F018FC903B
+0003FE0003FEEF00FF4BEC7F80F03FC00207151F19E05DA2020F16F0A25DA2141FF03FE0
+5DA2023F16C0187F4B1580A2027FEDFF00604B495A4D5A02FF4A5A4D5A92C7EA3FC04CB4
+C7FC4990B512FC17E04ACAFCA21303A25CA21307A25CA2130FA25CA2131FA25CA2133FA2
+5CA2137FA25C497EB67EA33C3E7BBD3E>I<49B612FCEFFF8018F0903B0003FE000FF8EF
+03FE4BEB00FF8419800207ED3FC05DA219E0140F5DA3021FED7FC05DA2F0FF80143F4B15
+004D5A60027F4A5A4B495A4D5AEF3F8002FF02FEC7FC92380007F892B512E01780499038
+000FE04A6D7E707E707E0103814A130083A213075CA25E130F5C5F1603131F5CA3013F02
+0714404A16E05F017F160119C04A01031303496C1680B6D8800113079438FE0F00933800
+7E1ECAEA3FFCEF07F03B407BBD42>82 D<92391FE00380ED7FFC913A01FFFE0700913907
+F01F8F91390FC007DF4AC66CB4FC023E6D5A4A130014FC495A4948147CA2495AA2010F15
+785CA3011F1570A46E91C7FCA2808014FE90380FFFE015FC6DEBFF8016E06D806D806D6C
+7F141F02037FEC003FED07FF1501A281A282A212075A167E120EA2001E15FE5EA25E003E
+14015E003F14034B5A486C5C150F6D495A6D49C8FCD8F9F0137C39F8FE01F839F03FFFF0
+D8E00F13C026C001FEC9FC314279BF33>I<48B9FCA25A903AFE001FF00101F89138E000
+7FD807E0163E49013F141E5B48C75BA2001E147FA2001C4B131C123C003814FFA2007892
+C7FC12704A153C00F01738485CC716001403A25DA21407A25DA2140FA25DA2141FA25DA2
+143FA25DA2147FA25DA214FFA292C9FCA25BA25CA21303A25CEB0FFE003FB67E5AA2383D
+71BC41>I<001FB500F090B512F0485DA226003FF0C7380FFC004AEC03F04A5D715A017F
+1503A24A5DA201FF150795C7FC91C8FCA2485E170E5BA20003161E171C5BA20007163C17
+385BA2000F167817705BA2001F16F05F5BA2003F1501A2495DA2007F1503A2495DA21607
+94C8FC48C8FC5E160E161E6C151C163C5E5E5E6C6C13014B5A001F4A5A6C6C011FC9FC6D
+133E6C6C13F83903FC07F0C6B512C0013F90CAFCEB07F83C406FBD44>I<B500FE91387F
+FFE094B5FC19C00003018091380FFC0049C8EA07F000015F606095C7FC170EA25F173C17
+386D5DA26C5E16015F4C5AA24CC8FC5E160E5E805E137F5E5EA24B5AA24B5A150793C9FC
+ECC00EA2013F5B153C15385DA25D14C15DECC38014E302E7CAFCEB1FEF14EE14FCA25CA2
+5CA25C5C130F5CA291CBFC130E3B406DBD44>I<010C1306011C130E0178133C01E01370
+484813E04913C0000313013907000380000EEB0700000C1306001C130E0018130C003813
+1C003013180070133800601330A200E0137000CFEB678039FFC07FE0A6018013C0397F00
+3F80003CEB1E001F1C69BE2F>92 D<147E49B47E903907C1C38090391F80EFC090383F00
+FF017E137F4914804848133F485AA248481400120F5B001F5C157E485AA215FE007F5C90
+C7FCA21401485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0007E013F13
+E0003E137FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977A72E
+>97 D<EB1FC0EA0FFF5CA2EA003FA291C7FCA25BA2137EA213FEA25BA21201A25BA21203
+A25B147E3907F1FF809038F783E09038EF01F013FE390FF800F8A24913FC49137C485A15
+7E5B15FE123FA290C7FCA248130115FC127EA2140300FE14F85AA2EC07F0A215E048130F
+15C0141F15800078EB3F00127C147E003C5B383E01F8381E03E06C485A6CB4C7FCEA01F8
+1F4076BE2A>I<EC1FC0ECFFF0903803F03C903807C01E90381F800E90383F000F017E13
+3F4913FF485A485A000714FE5B000F14FC48481300A2485AA3127F90C8FCA35A5AA64814
+03007E1407150F151E003E143C15786C14F0EC03E0390F800F803903E07E003801FFF838
+003FC0202977A72A>I<EE3F80ED1FFF1700A2ED007FA2167EA216FEA25EA21501A25EA2
+1503A25EA21507A25E147E903801FF8F903807C1CF90391F80EFC090383F00FF017E137F
+5B48486D5A485AA2485A000F92C7FC5B001F5CA24848137EA215FE127F90C75AA214015A
+485CA2140316384814F0A21407167891380FE070127C021F13F0007E013F5B003E137FEC
+F3E1261F01E35B3A0F8781E3802703FF00FFC7FCD800FC133E294077BE2E>I<EC3F8090
+3801FFE0903807E0F890381F803CEB3E0001FC131E485A485A12074848133E49133C121F
+4848137C15F8EC03F0397F000FE0ECFF809038FFFC00B512C048C8FCA45AA61506150E15
+1E007C143C15786C14F0EC01E06CEB07C0390F801F003807C0FC3801FFF038007F801F29
+76A72A>I<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157EA21780EE0E
+004BC7FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5141F5DA414
+3F92C8FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12FF49C9FCA2
+EAFE1EEAF83C1270EA7878EA3FE0EA0F802A5383BF1C>I<EC03F0EC0FFC91383E0E1C91
+38FC077E903901F003FE1303903807E001D90FC013FCEB1F80A2EB3F004914F8137E01FE
+1303A2484814F0A2150712034914E0A2150F12074914C0A2151FA216805B153F1203ED7F
+006D5BA200015B0000495A9038F80F7E90387C1EFEEB1FF8903807E0FC90C7FC1401A25D
+A21403A25D001C1307007F5C48130F5D4A5A4AC7FC48137E00F85B387C03F0381FFFC0D8
+03FEC8FC273B7CA72A>I<EB01FC13FF5CA21303A25CA21307A25CA2130FA25CA2131FA2
+5CA2133FA291C8FCEC03F890387F0FFE91383E0F80D97E7813C0ECE007D9FFC013E01480
+1400A2485A5BA25B0003140F16C05BA20007141F16805BA2000F143F16005B5D001F147E
+EDFE074913FCA2003F0101130FEDF80E1300161E48ECF01CA2007E1538A200FE15700200
+13E048EC7FC00038EC1F0028407ABE2E>I<1478EB01FCA21303A314F8EB00E01400AD13
+7C48B4FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF03F
+140012005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB80
+E0A2EB81C01383148038078700EA03FEEA00F8163E79BC1C>I<EB01FC13FF5CA21303A2
+5CA21307A25CA2130FA25CA2131FA25CA2133FA291C8FCED03E049EB0FF8ED3C3C017EEB
+707CEDE1FC9038FE01C1EC03839038FC0703140E0001011C13F891383800E04948130014
+60000313E0EBF9C0EBF78001FEC8FC1207EBFFE0EBE7F8EBE0FE000F137F6E7EEBC01F81
+001F130F16701380A2003F15F0021F13E001001380A248148116C0007EEB0F83168000FE
+14879138078F0048EB03FE0038EB00F826407ABE2A>107 D<EB07F0EA03FF14E0A2EA00
+0FA214C0A2131FA21480A2133FA21400A25BA2137EA213FEA25BA21201A25BA21203A25B
+A21207A25BA2120FA25BA2121FA25BA2123FA290C7FCA25A1307127EA2EAFE0F130E12FC
+A2131E131CA2EA7C381378EA3C70EA1FE0EA0780144079BE17>I<D801F0D93F80137F3D
+07FC01FFE003FFC03D0F3E07C1F80F83F03D0E1F0F00FC1E01F8001E011C90387C380000
+1C49D97E707F003C01F05C0038157F4A5C26783FC05C12704A91C7FC91C7127E00F003FE
+1301494A5CEA007EA20301140301FE5F495CA203031407000160495C180F03075D000305
+1F13E0494A1480A2030FEC3F810007F001C0495CA2031F91383E0380120F494AEC0700A2
+033F150E001FEF1E1C4991C7EA0FF80007C7000EEC03E0432979A74A>I<D801F0EB3F80
+3A07FC01FFE03A0F3E07C1F83A0E1F0F00FC001E011C137C001C49137E003C13F012385C
+38783FC012705C91C7FC00F015FE495CEA007EA2150101FE5C5BA2150300015D5B15075E
+0003020F13704914C0A2031F13F00007ED80E05B1681EE01C0120F49EC0380A2EE070000
+1FEC0F0E49EB07FC0007C7EA01F02C2979A733>I<EC1FC0ECFFF8903803F07C90380FC0
+1FEB1F8090393F000F80017E14C0491307484814E0485A12075B000F15F0485AA2485AA2
+ED0FE0127F90C7FCA2151F4815C05AA2ED3F80A2ED7F00A248147E007C5C007E13015D4A
+5A003E495A6C495A4A5A260F803EC7FC3807C0FC3801FFF038003F80242977A72E>I<90
+3903E001F890390FF807FE903A1E7C1E0F80903A1C3E3C07C0013C137801389038E003E0
+EB783F017001C013F0ED80019038F07F0001E015F8147E1603000113FEA2C75AA2010114
+0717F05CA20103140F17E05CA20107EC1FC0A24A1480163F010F15005E167E5E131F4B5A
+6E485A4B5A90393FB80F80DA9C1FC7FCEC0FFCEC03E049C9FCA2137EA213FEA25BA21201
+A25BA21203A2387FFFE0B5FCA22D3A80A72E>I<027E1360903901FF81E0903807C1C390
+391F80E7C090383F00F7017E137F5B4848EB3F80485AA2485A000F15005B121F5D484813
+7EA3007F14FE90C75AA3481301485CA31403485CA314074A5A127C141F007E133F003E49
+5A14FF381F01EF380F879F3903FF1F80EA00FC1300143F92C7FCA35C147EA314FE5CA213
+01130390B512F05AA2233A77A72A>I<D801F013FC3A07FC07FF803A0F3E0F03C0260E1F
+1C13E0001EEB380F001C1370003CEBE01F123814C0D8783F14C00070903880070092C7FC
+91C8FC12F05BEA007EA313FE5BA312015BA312035BA312075BA3120F5BA3121F5B0007C9
+FC232979A726>I<EC7F80903801FFE0903807C0F890381F003C013E131C013C131E017C
+133E49137E15FEA2000114FCA215706D13007FEBFFC014FC6C13FF15806D13C06D13E001
+0F13F01300140F14071403120C123F387F80011403D8FF0013E0A300FCEB07C000F0EB0F
+8012700078EB1F006C133C381F01F83807FFE0C690C7FC1F297AA725>I<EB01C0EB03F0
+1307A25CA2130FA25CA2131FA25CA2133FA291C7FCA2007FB51280B6FC1500D8007EC7FC
+13FEA25BA21201A25BA21203A25BA21207A25BA2120FA25BA2121F141C1380A2003F133C
+1438EB0078147014F05C495AEA1F03495A6C48C7FCEA07FCEA01F0193A78B81E>I<137C
+48B4141C26038F80137EEA0707000E7F001E15FE121CD83C0F5C12381501EA781F007001
+805BA2D8F03F1303140000005D5B017E1307A201FE5C5B150F1201495CA2151F0003EDC1
+C0491481A2153F1683EE0380A2ED7F07000102FF13005C01F8EBDF0F00009038079F0E90
+397C0F0F1C90391FFC07F8903907F001F02A2979A731>I<017CEB01C048B4EB07F03803
+8F80EA0707000E01C013F8121E001C1403EA3C0F0038EC01F0A2D8781F130000705BA2EA
+F03F91C712E012005B017E130116C013FE5B1503000115805BA2ED07001203495B150EA2
+5DA25D1578000114706D5B0000495A6D485AD97E0FC7FCEB1FFEEB03F0252979A72A>I<
+017C167048B491387001FC3A038F8001F8EA0707000E01C015FE001E1403001CEDF000EA
+3C0F0038177C1507D8781F4A133C00701380A2D8F03F130F020049133812005B017E011F
+14784C137013FE5B033F14F0000192C712E05BA2170100034A14C049137E17031880A2EF
+070015FE170E00010101141E01F86D131C0000D9039F5BD9FC076D5A903A3E0F07C1E090
+3A1FFC03FFC0902703F0007FC7FC372979A73C>I<903903F001F890390FFC07FE90393C
+1E0E0F9026780F1C138001F0EBB83FD801E013F89039C007F07FEA0380000714E0D9000F
+140048151C000E4AC7FCA2001E131FA2C75BA2143F92C8FCA35C147EA314FE4A131CA301
+01143C001E1538003F491378D87F811470018314F000FF5D9039077801C039FE0F7C033A
+7C0E3C078027783C1E1EC7FC391FF80FFC3907E003F029297CA72A>I<137C48B4143826
+038F8013FCEA0707000E7F001E1401001C15F8EA3C0F12381503D8781F14F000701380A2
+D8F03F1307020013E012005B017E130F16C013FE5B151F1201491480A2153F000315005B
+A25D157EA315FE5D00011301EBF8030000130790387C1FF8EB3FF9EB07E1EB00035DA214
+07000E5CEA3F80007F495AA24A5AD8FF0090C7FC143E007C137E00705B387801F0383803
+E0381E0FC06CB4C8FCEA03F8263B79A72C>I<D901F01370D907FC13F0010F14E090381F
+FE0190393FFF03C049EB838090387C0FCF9039F803FF009038F0007E49133C000114386C
+48137890C75A4A5A4A5A4A5A4AC7FC141E5C5C5C495A495A495A49C8FC131E4913075B5B
+48485B4848131E485A01F05BD80FFE137C391F1F81F8383E0FFFD83C075B486C5B00705C
+D8F00190C7FC38E0007C24297BA725>I<B8FCA2280278982E>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fq cmsy10 10.95 21
+/Fq 21 113 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0
+A4EA7F80A2EA1E000A0A799B19>I<0060166000F816F06C1501007E15036CED07E06C6C
+EC0FC06C6CEC1F806C6CEC3F006C6C147E6C6C5C6C6C495A017E495A6D495A6D6C485A6D
+6C485A6D6C48C7FC903803F07E6D6C5A903800FDF8EC7FF06E5A6E5AA24A7E4A7EECFDF8
+903801F8FC903803F07E49487E49486C7E49486C7E49486C7E017E6D7E496D7E48486D7E
+4848147E4848804848EC1F804848EC0FC048C8EA07E0007EED03F0481501481500006016
+602C2C73AC47>I<EB03C0A2805CA600F0140F00FC143F00FE147F00FF14FF393FC3C3FC
+390FE187F03903F18FC03900FDBF00EB3FFCEB0FF0EB03C0EB0FF0EB3FFCEBFDBF3903F1
+8FC0390FE187F0393FC3C3FC39FF03C0FF00FE147F00FC143F00F0140F00001400A6805C
+A220277AA92D>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9FCB3A6007FB9
+12E0BA12F0A26C18E03C3C7BBC47>6 D<EB0FFCEB3FFF90B512C0000314F04880488048
+804880A2481580A3B712C0AA6C1580A36C1500A26C5C6C5C6C5C6C5CC614C0013F90C7FC
+EB0FFC22227BA72D>15 D<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C
+18E0CDFCAE007FB912E0BA12F0A26C18E03C287BAA47>17 D<1818187CEF01FCEF07F8EF
+1FF0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FC
+EC07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048
+CBFC5AEA7F80EA3FE0EA0FF8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC
+0FF8EC03FE913800FF80ED3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800
+FF80EF3FE0EF0FF8EF03FC170018381800AE007FB812F8B912FCA26C17F8364878B947>
+20 D<126012F812FEEA7F80EA3FE0EA0FF8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800
+FF80EC3FE0EC0FF8EC03FE913800FF80ED3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8
+EE03FE933800FF80EF3FE0EF0FF8EF03FC1701EF07F8EF1FF0EF7FC0933801FF00EE07FC
+EE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC07FCEC1FF0EC7FC04948C9FC
+EB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CBFC12FC1270CCFCAE007FB812
+F8B912FCA26C17F8364878B947>I<D91FE01620D97FF816703801FFFE486D7E48804814
+F09038E01FF8271F8007FC15F0273E0001FE15E0003CD9007F1401007CDA3FC013030078
+DA0FE014C00070DA07F8130700F0DA03FEEB1F8048913A01FF807F006F90B5FC043F5B70
+5B04075B040113E000409238007F803C157BA047>24 D<140C141EA2143E143CA2147C14
+78A214F8495AA2495A495AA2495A49CDFC133E137EEA01F8485AEA0FE0003FBB12FEBDFC
+A2003F1AFED80FE0CDFCEA03F06C7EEA007E133E7F6D7E6D7EA26D7E6D7EA26D7E1478A2
+147C143CA2143E141EA2140C50307BAE5B>32 D<0207B512E0023F14F049B6FC4915E0D9
+0FFCC8FCEB1FE0017FC9FC13FEEA01F8485A485A5B485A121F90CAFC123EA25AA21278A2
+12F8A25AA2B812E017F0A217E000F0CAFCA27EA21278A2127CA27EA27E7F120F6C7E7F6C
+7E6C7EEA00FE137FEB1FE0EB0FFC0103B612E06D15F0EB003F020714E02C3678B13D>50
+D<176017F01601A2EE03E0A2EE07C0A2EE0F80A2EE1F00A2163EA25EA25EA24B5AA24B5A
+A24B5AA24B5AA24BC7FCA2153EA25DA25DA24A5AA24A5AA24A5AA24A5AA24AC8FCA2143E
+A25CA25CA2495AA2495AA2495AA2495AA249C9FCA2133EA25BA25BA2485AA2485AA2485A
+A2485AA248CAFCA2123EA25AA25AA25A12602C5473C000>54 D<387FFFFCB5FCA300F0C7
+FCB3B3B3B3AD1260165A71C328>100 D<B512F814FCA3C7123CB3B3B3B3AD1418165A7E
+C328>I<153FEC03FFEC0FE0EC3F80EC7E00495A5C495AA2495AB3AA130F5C131F495A91
+C7FC13FEEA03F8EA7FE048C8FCEA7FE0EA03F8EA00FE133F806D7E130F801307B3AA6D7E
+A26D7E80EB007EEC3F80EC0FE0EC03FFEC003F205B7AC32D>I<12FCEAFFC0EA07F0EA01
+FCEA007E6D7E131F6D7EA26D7EB3AA801303806D7E1300147FEC1FC0EC07FEEC00FFEC07
+FEEC1FC0EC7F0014FC1301495A5C13075CB3AA495AA2495A133F017EC7FC485AEA07F0EA
+FFC000FCC8FC205B7AC32D>I<126012F0B3B3B3B3B11260045B76C319>106
+D<0060131800F0133CB3B3B3B3B000601318165A75C32D>I<126012F07EA21278127CA2
+123C123EA2121E121FA27E7FA212077FA212037FA212017FA212007FA21378137CA27FA2
+131E131FA27F80A2130780A2130380A2130180A2130080A21478147CA2143C143EA2141E
+141FA26E7EA2140781A2140381A2140181A2140081A21578157CA2153C153EA2151E151F
+A2811680A2150716C0A21503ED0180225B7BC32D>110 D<1A03F207801A0FA2F21F00A2
+1A3EA262A262A24F5AA24F5AA24F5AA24F5AA24FC7FCA2193EA261A261A24E5AA24E5AA2
+4E5AA24E5AA24EC8FCA2183EA260A260A24D5A131C017C5E01FE15031201D807FF4B5A12
+0E484C5A00787FD8E07F4BC9FC00C07FD8003F153E80011F5D80010F5D8001074A5A8001
+034A5AA26E495A13016E495A7F6F48CAFC147FEDC03E143F6F5A141F6F5A140FEDF1F015
+F9913807FBE015FF6E5BA26E5BA26E90CBFCA2157EA2153C1538495B7B834C>112
+D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fr cmbx12 14.4 52
+/Fr 52 122 df<922601FFFC903801FFE0033F9026FF801F13F84AB6D8E07F13FE020F03
+F9B6FC023FD9C00FB500C0138091277FFC0003D9FE0113C0902601FFE049495A49494949
+4813E04990C714F049484A13E0495A19C0495A7413C0017F17804A6E6E1380719138007E
+007192C7FCAEBCFCA526007FF8C7000301C0C8FCB3B3A7007FB5D8F803B612F0A553547D
+D34E>11 D<B712F0AB240B7F9F2D>45 D<EA07F0487E487E487E487EB51280A76C13006C
+5A6C5A6C5A6C5A1111769025>I<913803FFC0023F13FC91B6FC010315C0010F018113F0
+903A1FFC003FF849486D7E49486D7E49486D7E48496D138048496D13C0A24817E04890C8
+13F0A34817F8A24817FC49157FA3007F17FEA600FF17FFB3A5007F17FEA6003F17FCA26D
+15FFA26C17F8A36C17F0A26C6D4913E0A26C6D4913C06C17806E5B6C6D4913006D6C495A
+D91FFCEB3FF8903A0FFF81FFF06D90B55A01011580D9003F01FCC7FC020313C0384F7BCD
+43>48 D<157815FC14031407141F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3
+B3A6007FB712FEA52F4E76CD43>I<EC3FFE0103B512E0010F14FC013F14FF90B712C048
+D9C07F7F2703FE000F13F8D807F801037FD80FE06D7F48486D7F48488001F01680486C6E
+13C07F486C6E13E07FA27013F0A56C5AA26C5AEA0FF0EA03C0C914E05EA218C05E1880A2
+4C13005F4C5A4B5B5F4B5B5F4B5B4B90C7FC4B5A5E4B5AED7FE04B5A4A5B4A48C8FC4A5A
+5D4A48EB01F04A5AEC3F804AC7FC02FEEC03E0495A495A495A495AD91F80140749C8FC01
+3E150F017FB7FC90B812C05A5A5A5A5A5A5AB9FC1880A4344E79CD43>I<91380FFFC091
+B512FC0107ECFF80011F15E090263FF8077F9026FF800113FC4848C76C7ED803F86E7E49
+1680D807FC8048B416C080486D15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C
+13005FA24C5A4B5B4B5B4B13C04B5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0
+030113F89238007FFE707E7013807013C018E07013F0A218F8A27013FCA218FEA2EA03E0
+EA0FF8487E487E487EB57EA318FCA25E18F891C7FC6C17F0495C6C4816E001F04A13C06C
+484A1380D80FF84A13006CB44A5A6CD9F0075BC690B612F06D5D011F1580010302FCC7FC
+D9001F1380374F7ACD43>I<177C17FEA2160116031607160FA2161F163F167FA216FF5D
+5DA25D5DED1FBFED3F3F153E157C15FCEC01F815F0EC03E01407EC0FC01580EC1F005C14
+7E147C5C1301495A495A5C495A131F49C7FC133E5B13FC485A5B485A1207485A485A90C8
+FC123E127E5ABA12C0A5C96C48C7FCAF020FB712C0A53A4F7CCE43>I<D80380150ED807
+E0157E01FEEC03FED9FFF0137F91B65A5F5F5F5F5F94C7FC5E5E16F016C093C8FC15F801
+E190C9FC01E0CAFCABEC0FFF027F13F001E3B512FE01E76E7E9026FFF8077FDAC0017F49
+C713F8496E7E49143F4981496E7E6C481680C9FC18C08218E0A418F0A3EA0FE0487E487E
+487E487EA418E0A35B6C484A13C05B491680003EC85A003F17006C6C4A5A6D5D6C6C4A5A
+D807F8495BD803FE01075B2701FFC03F5B6C90B65A013F4AC7FC6D14F8010314C0902600
+7FF8C8FC344F79CD43>I<ED0FFF92B512E0020780021F14FC91397FFE03FE903A01FFF0
+007F4901C0EB3F804990C7121F4948EC7FC0494814FF49484913E049485B01FF5C485BA2
+485B5AA2486F13C04A6D1380486F1300177E94C7FC5AA291CAFC5AA21508913801FFF802
+0713FFB54814C04A14F04AC66C7E023C6D7E4A6D7E4A6D7E7013804A15C0A24A15E07013
+F05C18F8A491C714FCA37EA67EA46C17F880A27E18F06C5D18E06C6D15C07E6E4913806C
+6D15006D6C495A6D6CEB7FFC6DB448485A6D90B55A010315C0010092C7FC023F13FC0207
+13C0364F7ACD43>I<121F7F7FEBFF8091B81280A45A1900606060A2606060485F0180C8
+6CC7FC007EC95A4C5A007C4B5A5F4C5A160F4C5A484B5A4C5A94C8FC16FEC812014B5A5E
+4B5A150F4B5AA24B5AA24B5A15FFA24A90C9FCA25C5D1407A2140FA25D141FA2143FA414
+7F5DA314FFA55BAC6D5BA2EC3FC06E5A395279D043>I<913807FFC0027F13FC0103B67E
+010F15E090261FFC0113F8903A3FE0003FFCD97F80EB0FFE49C76C7E48488048486E1380
+000717C04980120F18E0177FA2121F7FA27F7F6E14FF02E015C014F802FE4913806C7FDB
+C00313009238F007FE6C02F85B9238FE1FF86C9138FFBFF06CEDFFE017806C4BC7FC6D80
+6D81010F15E06D81010115FC010781011F81491680EBFFE748018115C048D9007F14E048
+48011F14F048487F48481303030014F8484880161F4848020713FC1601824848157F173F
+A2171FA2170FA218F8A27F007F17F06D151FA26C6CED3FE0001F17C06D157F6C6CEDFF80
+6C6C6C010313006C01E0EB0FFE6C01FCEBFFFC6C6CB612F06D5D010F1580010102FCC7FC
+D9000F13C0364F7ACD43>I<91380FFF8091B512F8010314FE010F6E7E4901037F90267F
+F8007F4948EB3FF048496D7E484980486F7E484980824817805A91C714C05A7013E0A218
+F0B5FCA318F8A618FCA46C5DA37EA25E6C7F6C5DA26C5D6C7F6C6D137B6C6D13F390387F
+F803011FB512E36D14C30103028313F89039007FFE03EC00401500A218F05EA3D801F816
+E0487E486C16C0487E486D491380A218005E5F4C5A91C7FC6C484A5A494A5A49495B6C48
+495BD803FC010F5B9027FF807FFEC7FC6C90B55A6C6C14F06D14C0010F49C8FC010013F0
+364F7ACD43>I<171F4D7E4D7EA24D7EA34C7FA24C7FA34C7FA34C7FA24C7FA34C808304
+7F80167E8304FE804C7E03018116F8830303814C7E03078116E083030F814C7E031F8116
+8083033F8293C77E4B82157E8403FE824B800201835D840203834B800207835D844AB87E
+A24A83A3DA3F80C88092C97E4A84A2027E8202FE844A82010185A24A820103854A820107
+85A24A82010F855C011F717FEBFFFCB600F8020FB712E0A55B547BD366>65
+D<BA12C019FEF1FFC01AF01AFCD8000701F0C7000313FFDE007F7F737F070F7F737F8785
+87858785A287A84F5BA263616361634F5B4F5B077F90C7FC4E485A060713F892B812E097
+C8FC861AF003F0C7000313FE9539003FFF80070F13E0737F07017F87737F747E1C807413
+C0A27413E0A31CF0A386A362A31CE0A2621CC0A250138097B5FC1C004F5B19074F5B073F
+13F04EB55ABC128098C7FC1AF81AC007F8C8FC54527CD160>I<932601FFFCEC01C0047F
+D9FFC013030307B600F81307033F03FE131F92B8EA803F0203DAE003EBC07F020F01FCC7
+383FF0FF023F01E0EC0FF94A01800203B5FC494848C9FC4901F882494982494982494982
+4949824990CA7E494883A2484983485B1B7F485B481A3FA24849181FA3485B1B0FA25AA2
+98C7FC5CA2B5FCAE7EA280A2F307C07EA36C7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D
+606C6D187EA26D6C606D6D4C5A6D6D16036D6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D
+6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1FF80203903AFFE001FFF0020091B612C0033F
+93C8FC030715FCDB007F14E0040101FCC9FC525479D261>I<BA7E19FCF1FF801AF01AFC
+D8000701F0C7000F13FF060014C0071F7F070713F807017F737F747E747F747F86747F74
+7F8886888688A2757EA31D8087A21DC0A51DE0A387A963A31DC0A51D80A2631D00A3515A
+A2646264505B6264505B505B5090C7FCF2FFFE4F5B07075B071F5B96B512C0060F91C8FC
+BB5A1AF01AC007FCC9FC19805B527CD167>I<BC1280A5D8000701F8C7000114C0F0001F
+19071901851A7F1A3F1A1FA2F20FE0A21A07A31A03A318F81BF01A01A497C7FC1701A317
+031707170F177F92B6FCA59238F8007F170F170717031701A317001B3EA31B7CA395C8FC
+A21BFCA21BF8A21A01A31A031BF01A071A0FA21A1F1A3FF27FE0F101FF1907191F0603B5
+FCBCFCA21BC0A34F517CD058>I<BB12FEA5D8000701F8C700077FF0007F191F19078585
+8586861B80A21A1FA31A0FA41BC006F81307A497C7FCA31701A317031707170F177F92B6
+FCA59238F8007F170F170717031701A31700A795C9FCB3B812F8A54A517CD055>I<B8D8
+C003B8FCA5D8000701F8C9001FEBE000B3AE92BAFCA503F8C9121FB3B1B8D8C003B8FCA5
+60527CD169>72 D<B812C0A5D8000701F8C7FCB3B3B3B2B812C0A52A527CD132>I<B812
+F8A5D8000701F8CAFCB3B3A91A7CA41AFC1AF8A51901A31903A219071AF0190FA2191F19
+3F197F19FF180360183F4DB5FCBB12E0A546527CD151>76 D<B600FC073FB512FE6F61A2
+6F96B6FCA2D80007F5C00070EF01EFA202EF6DEF03CFA202E76DEF078FA202E36DEF0F0F
+A202E16D171EA302E06D173CA26F6C1778A26F6C17F0A26F6DED01E0A26F6DED03C0A36F
+6DED0780A26F6DED0F00A26F6D151EA26F6D5DA3706C5DA2706C5DA2706D495AA2706D49
+5AA2706D495AA3706D49C7FCA2706D131EA2706D5BA2716C5BA3716C5BA271EB81E0A271
+EBC3C0A271EBE780A27101FFC8FCA3715BA2715BA2725AA2725AA2D93FFC6F5AB74DB712
+FEA2725AA2725A77527CD180>I<93380FFFC00303B6FC031F15E092B712FC0203D9FC00
+13FF020F01C0010F13C0023F90C7000313F0DA7FFC02007F494848ED7FFE4901E0ED1FFF
+49496F7F49496F7F4990C96C7F49854948707F4948707FA24849717E48864A83481B804A
+83481BC0A2481BE04A83A2481BF0A348497113F8A5B51AFCAF6C1BF86E5FA46C1BF0A26E
+5F6C1BE0A36C6D4D13C0A26C6D4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B6D6D4B5B
+6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0011F13F0
+020F01FC90B512C0020390B7C8FC020016FC031F15E0030392C9FCDB001F13E0565479D2
+65>79 D<BAFC19F819FF1AE086D8000701F0C7001F13FC060113FF726C13807313C0070F
+13E01BF0857313F81BFCA27313FEA41BFFA81BFEA31BFC61A21BF84F13F04F13E0614F13
+C04F13004E485A061F5B92B812F01AC04FC7FC19E003F8CBFCB3AEB812C0A550527CD15C
+>I<91260FFF80130791B500F85B010702FF5B011FEDC03F49EDF07F9026FFFC006D5A48
+01E0EB0FFD4801800101B5FC4848C87E48488149150F001F824981123F4981007F82A284
+12FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15F86CECFF8016FC6CEDFFC017F0
+6C16FC6C16FF6C17C06C836C836D826D82010F821303010082021F16801400030F15C0ED
+007F040714E01600173F050F13F08383A200788200F882A3187FA27EA219E07EA26CEFFF
+C0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A5A02F8EC7FF0903B1FFFC003FF
+E0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048D9007F90C8FC3C5479D24B>83
+D<003FBC1280A59126C0003F9038C0007F49C71607D87FF8060113C001E08449197F4919
+3F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6C994C7FCB3B3AC91B912F0A5
+53517BD05E>I<B800C00103B612FCA5D8000701F8CAEBF000F31F80B3B3B11B3FA26D97
+C7FC81637F1B7E6D6D17FE505A6E7E505A6E6D15076E4D5A6E6D4B5A6E6D4B5A6E01F84B
+5A6E6DDA03FFC8FC6E6CB46CEB0FFE6F9039F001FFF8030F90B65A030316C0DB007F92C9
+FC040F14F8DC007F13805E537CD167>I<B700FC017FB600FE91B612F0A5D8003F01C0C8
+001F01E0C9EBF8006F71EE0FC06D7161876F1C1F6D7196C7FC6F8373606D1E3E6F836D71
+60876F1CFC6D666F4B801F016D66704A806E525A88704A17076E059F5F70021F80080F16
+0F6E6570023F806EDC3E074CC8FC8870027E5F6EDC7C03163E7002FC804F6C167E6E1C7C
+700101814F6C16FC6E745B70010317016E4C6D5D060716C00580496D14036F63DDC00F16
+E04F6D14076F07F05BDDE01F170F6F92C76C5D1DF8DDF03E6E141F6F98C9FCDDF87E16FC
+067C6E5C6FF1FE3EDDFCFC177E6F4A6E147C1DFFDDFFF06E14FC6F62A24E816F62A27049
+6F5BA24E817061A295C97E7061A270487090CAFCA37048705AA24D1601040360A2704870
+5A84537DD18B>87 D<EC7FFF0107B512F0013F14FE90B77E48D9E00F7F2703FE000113F0
+486C6D7F6EEB3FFC48826E131F83707FA36C496D7FA26C90C7FC6C5AC9FCA6037FB5FC02
+0FB6FC91B7FC01071487013FEBF0074913803901FFFC004813F0485B485B485B4890C7FC
+5A5BA2485AA45EA26D5C007F151D163D6C6C02797F6C6D01F113F86C9026C003E1EBFFE0
+6C9026F81FC014F06C90B5487EC6ED001F011F01FC010713E0010101E090C8FC3C387CB6
+41>97 D<EB3FF0B5FCA51203C6FCB3A4923801FFE0030F13FE033FEBFFC092B612F002F3
+01017F913AF7F8003FFEDAFFE0EB0FFF03806D7F92C76C7F4A6E7F4A824A6E7FA2727EA2
+85A28584A31A80AC1A00A44E5AA36118FF616E4A5BA26E4A5B6E4A5B6F495BDACFC04990
+C7FCDA87F0EB7FFC913A03FE03FFF849C6B612E0496D148049011F01FCC8FC90C7000313
+C041547BD24B>I<913801FFF8021FEBFF8091B612F0010315FC010F9038C00FFE903A1F
+FE0001FFD97FFC491380D9FFF05B4817C048495B5C5A485BA2486F138091C7FC486F1300
+705A4892C8FC5BA312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E140F6CEE1F80
+6C6DEC3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A01001580023F
+49C7FC020113E033387CB63C>I<4DB47E0407B5FCA5EE001F1707B3A4913801FFE0021F
+13FC91B6FC010315C7010F9038E03FE74990380007F7D97FFC0101B5FC49487F4849143F
+484980485B83485B5A91C8FC5AA3485AA412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C
+6D5C6C6D49B5FC6D6C4914E0D93FFED90FEFEBFF80903A0FFFC07FCF6D90B5128F0101EC
+FE0FD9003F13F8020301C049C7FC41547CD24B>I<913803FFC0023F13FC49B6FC010715
+C04901817F903A3FFC007FF849486D7E49486D7E4849130F48496D7E48178048497F18C0
+488191C7FC4817E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA27F7EA218E0
+6CEE01F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFE
+EB03FE903A0FFFC03FF8010390B55A010015C0021F49C7FC020113F034387CB63D>I<ED
+3FFC0203B5FC020F14C0023F14E09139FFF81FF0499038C03FF849EB807F49903800FFFC
+495A495AA2495AA2EE7FF8495AEE3FF0EE0FC093C7FCAEB712E0A526007FF8C8FCB3B3A7
+007FB512FEA52E547CD329>I<DA3FFF14FF0103B5D8F00713C0010FDAFC1F13E0013FEC
+FF7F90267FFC0F9038FF9FF09026FFE001EBF83F48496C13E0484990387FF01F4890C7D8
+3FF813E0489338FC0FC0F0078048486E6CC7FCA2003F82A9001F5EA26C6C4A5AA26C5E6C
+6D495A6C6D495A6C6D485BDAFC0F5B4890B6C8FCD803EF14FC01C314F02607C03F90C9FC
+91CBFCA2120FA37FA213F813FE90B7FC6C16F817FF18C06C836C836C836D828448B9FC12
+074848C700031480D81FF8EC003F4848150748486F13C083485A83A56D5D007F18806D5D
+003F18006C6C4B5AD80FFEED1FFC6C6C6CEC7FF86C01E049485A6C01FE011F5B6C6CB712
+80010F03FCC7FC010115E0D9000F01FCC8FC3C4F7CB543>I<EB3FF0B5FCA51203C6FCB3
+A4EE1FFC93B512C0030314F0030F8092391FE07FFC92393F001FFE037C8003F07FDAF1E0
+81ECF3C0DAF7807F8502FFC7FC5CA25CA45CB3ACB6D8F807B612C0A542537BD24B>I<13
+7F497E000313E0487FA2487FA76C5BA26C5BC613806DC7FC90C8FCADEB3FF0B5FCA51201
+7EB3B3A6B612E0A51B547BD325>I<EB3FF0B5FCA51203C6FCB3A54CB512F8A59339003F
+FE00EF1FF0EF3FC04D5A4DC7FCEE03FEEE07F84C5A4C5AEE7FC04CC8FC4B5A4B5AED0FF8
+ED1FE04B7E4B7EECF1FF02F37F02F77F91B6FC83159F030F7F02FE80DAF8077F4A7E6F7F
+6F7F83707E82707F84707F707F82707F84707F177F717E4D13C0B6D8F003B6FCA540537C
+D247>107 D<EB3FF0B5FCA512017EB3B3B3B1B612F0A51C537BD225>I<D93FF0D91FFCED
+FFE0B591B500C0010713FE030302F0011F6D7E030F6E017F8092271FE07FFCD9FF037F92
+2A3F001FFE01F8007F0003027C9126FF03E080C602F06DD90780137FDAF1E0038FC77FDA
+F3C0159EDAF7806D01BC143F07FC8102FFC75C4A5EA24A5EA44A5EB3ACB6D8F807B6D8C0
+3FB512FEA567367BB570>I<D93FF0EB1FFCB591B512C0030314F0030F8092391FE07FFC
+92393F001FFE0003027C80C602F07FDAF1E081ECF3C0DAF7807F8502FFC7FC5CA25CA45C
+B3ACB6D8F807B612C0A542367BB54B>I<913801FFE0021F13FE91B612C0010315F0010F
+9038807FFC903A1FFC000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F488348
+90C86C7EA24883A248486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D5DA26C
+5FA26C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC903A0F
+FF807FFC6D90B55A010015C0023F91C8FC020113E03A387CB643>I<903A3FF001FFE0B5
+010F13FE033FEBFFC092B612F002F301017F913AF7F8007FFE0003D9FFE0EB1FFFC60280
+6D7F92C76C7F4A824A6E7F4A6E7FA2717FA285187F85A4721380AC1A0060A36118FFA261
+5F616E4A5BA26E4A5B6E4A5B6F495B6F4990C7FC03F0EBFFFC9126FBFE075B02F8B612E0
+6F1480031F01FCC8FC030313C092CBFCB1B612F8A5414D7BB54B>I<90397FE003FEB590
+380FFF80033F13E04B13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07FECE780
+14EF150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367CB537>
+114 D<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE0130148487F
+4980127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16C06C15
+F06C816C816C81C681013F1580010F15C01300020714E0EC003F030713F015010078EC00
+7F00F8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB01FE90
+39FFC00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143EA6147E
+A414FEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3
+A9EE07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B
+020313802A4D7ECB34>I<D93FF8913801FFC0B50207B5FCA50003ED001FC61607B3AE5F
+A35FA2017F5D173B177B6D6C14F3DC01E313F06D6CD907C3EBFFC0903A0FFFC03F836D90
+B51203010114FE6D6C13F8020701E091C7FC42377BB54B>I<B600F00107B5FCA5000101
+F8C8EA7FE06C6DED3F00A2017F163E6E157E013F167C6E15FC6D5E6F13016D5E8117036D
+5E6F13076D5E6F130F6D5E6F131F6D93C7FC815F6E6C133E177E023F147C6F13FC6E5C16
+816E5C16C3A26EEBE3E016E76E5C16FF6E5CA26E91C8FCA26F5AA36F5AA26F5AA26F5AA2
+6F5A6F5A40367DB447>I<B6D8E07FB5D8C003B512C0A5000101F0C701F0C7381FF8006E
+027FED07E06C715DA26E023F150F017F705DA26E181F013F4B6C92C7FC6E606D70143E94
+B5FC6F177E6D4A6E137C03C001F315FC6D715B160303E001E114016D020702E05B03F013
+C06D71485A160F03F8D9807F13076D05F85B93381F003F03FC160F027F4902FC5BDBFE3E
+011F131F023F04FE90C8FC167EDBFF7C010F5B6E01FCECFF3E4C6D137E6E5FA24C7F6E5F
+4C7F6E5FA24C7F6E5F4C147FA26E5F93C8123F6F5EA2033E6FC9FC5A367DB461>I<007F
+B500F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A6D4B5A6F495A
+6D6D91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCFC06EEBFF806E
+91C9FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F4A486C7E4A48
+6C7E020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F01076F7E4948
+6E7E49486E7FEBFFF0B500FE49B612C0A542357EB447>I<B600F00107B5FCA5C601F8C8
+EA7FE06EED3F00A26D6C153E187E013F167C6E15FC6D5E6F13016D5E6F13036D5E811707
+6D6D5C170F6D6D5C171F6D93C7FC6F5B027F143E6F137E023F147C6F13FCA26E6D5A1681
+6EEBC1F016C36E5C16E76E5C16FF6E5CA26E91C8FCA36F5AA26F5AA26F5AA26F5AA26F5A
+A35E150F5E151F93C9FC5DD81FC0133E486C137E486C137C486C13FC5D14015D14034A5A
+6C48485A49485A263FC07FCAFCEB81FE6CB45A6C13F000035BC690CBFC404D7DB447>I
+E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fs cmbx12 20.74 11
+/Fs 11 117 df<EE01F0EE07F8160F163F167FED01FF150F153F4AB5FC143F010FB6FCB8
+FCA54A7E14C0EBF000C8FCB3B3B3B3AE007FBA12F0A8447171F061>49
+D<92380FFFE04AB67E020F15F0027F15FE49B87E4917E0010F17F8013F8349D9C01F14FF
+9027FFFC0001814801E06D6C80480180021F804890C86C8048486F8048486F8001FF6F80
+4801C06E8002F081486D18806E816E18C0B5821BE06E81A37214F0A56C5BA36C5B6C5B6C
+5B000313C0C690C9FC90CA15E060A34E14C0A21B80601B0060626295B55A5F624D5C624D
+5C4D91C7FC614D5B4D13F04D5B6194B55A4C49C8FC4C5B4C5B4C13E04C5B604C90C9FCEE
+7FFC4C5A4B5B4B5B4B0180EC0FF04B90C8FC4B5A4B5A4B48ED1FE0EDFFE04A5B4A5B4A90
+C9FC4A48163F4A5ADA3FF017C05D4A48167F4A5A4990CA12FFD903FC160749BAFC5B4919
+805B5B90BBFC5A5A5A5A481A005A5ABCFCA462A44C7176F061>I<923801FFFE033FEBFF
+F84AB7FC020F16E0023F16F84A16FE49B97E49DA003F80010F01F0010714F04901800101
+804948C880D97FF86F7F02E081496C834801FC6F148014FF486E6E14C08181481AE081A9
+6C5C1BC06C4A5C6C5C6D90C815806D5AD90FF85D90CA150062606295B55A4D5C624D5C4D
+5C4D91C7FC4D13FC4D5B4CB512E0047F1480037FB548C8FC92B612F818C018F8F0FF806F
+15F092C7003F13FC050713FF050114C071807213F8727F727F867214801BC07214E01BF0
+A27214F81BFCA37214FEA31BFFEBFF80000313E0487F001F13FC487FA2487FA2B67EA31B
+FEA3601BFCA292C8FC6C1AF84A5D4A18F06C494B14E05C6C01C04B14C06C90C915804E14
+006C6D4B5B6C01F092B55A6C01FC4A5C27007FFFC001075C6D01FE013F14C0010F90B85A
+6D4DC7FC010117F8D9003F16E0020F93C8FC020015F0030749C9FC507378F061>I<F10F
+F04F7E193FA2197F19FF60A260606060A2606095B5FCA25F5F5FA25F5F5F5F18BFEFFF3F
+5EEE03FE17FCEE07F8160FEE1FF0EE3FE017C0167FEEFF804B13005E4B5A15074B5A4B5A
+5E153F4B5A4B5A93C7FC4A5A14034A5A5D4A5A141F4A5A4A5A5D4AC8FC5B495A5C495A13
+0F495A495A5C137F495A4890C9FC5B485A1207485A485A5B123F485A485A90BC12FCA8CB
+02F8C7FCB3A20307B912FCA856727BF161>I<96267FFFE01670063FB6ED01F80503B700
+F01403053F04FC14074CB96C130F040706E0131F043F72133F93BA00FC137F0303DC0007
+6D13FF030F03C09039003FFF814B02FCC8000713C3037F02E0030113F792B600806F6CB5
+FC02034ACA121F4A02F8834A02E0834A4A1701027F4A8391B548CC7E494A85495C4C8549
+88494A85494A85495C8A4991CDFC90B54886A2484A1B7FA2481E3F5D481E1F5D5A1F0FA2
+485CA3481E075DA2F703F0489BC7FCA45DA2B6FCB27EA281A47EA2F703F06FF307F87EA3
+6C80A21F0F7E6F1CF07E6F1B1F7E20E06C6E1B3F816DF57FC06D80F7FF806D806D6E4F13
+006D6E616D525A826D6E4F5A6D6E4F5A6E6D6C4E5A021F6EF0FFE06E6E4D5B6E02F84D5B
+6E02FE050F90C7FC02006E6CEE3FFE6F02F0EEFFFC031F02FE03035B6FDAFFC0021F13E0
+030303FF0103B55A030093B7C8FC043F18FC040718F0040118C0DC003F94C9FC050316F8
+DD003F1580DE007F01F0CAFC757A75F78C>67 D<92383FFFF80207B612E0027F15FC49B8
+7E010717E0011F83499026F0007F13FC4948C7000F7F90B502036D7E486E6D806F6D8072
+7F486E6E7F8486727FA28684A26C5C72806C5C6D90C8FC6D5AEB0FF8EB03E090CAFCA705
+07B6FC041FB7FC0303B8FC157F0203B9FC021FECFE0391B612800103ECF800010F14C049
+91C7FC017F13FC90B512F04814C0485C4891C8FC485B5A485B5C5A5CA2B5FC5CA360A36E
+5DA26C5F6E5D187E6C6D846E4A48806C6D4A4814FC6C6ED90FF0ECFFFC6C02E090263FE0
+7F14FE00019139FC03FFC06C91B6487E013F4B487E010F4B1307010303F01301D9003F02
+80D9003F13FC020101F8CBFC57507ACE5E>97 D<93387FFF80030FB512FC037FECFF804A
+B712E0020716F8021F16FE027FD9F8077F49B5D8C000804991C7003F13E04901FC020F7F
+49496E7F49498049496E7F49496E7F90B55A48727E92C914804884485B1BC048841BE048
+5BA27313F05AA25C5AA21BF885A2B5FCA391BAFCA41BF002F8CCFCA67EA3807EA47E806C
+F103F0F207F86C7F1A0F6C6E17F06C191F6F17E06C6E163F6D6DEE7FC06D6D16FF6D6D4B
+13806D6D4B13006D6D6CEC0FFE6D02E0EC3FFC6D02F8ECFFF86D9126FFC00F5B023F91B6
+5A020F178002034CC7FC020016F8031F15E0030392C8FCDB000F13E04D507BCE58>101
+D<903801FFFCB6FCA8C67E131F7FB3AD95380FFFE095B512FE05036E7E050F15E0053F15
+F84D81932701FFF01F7F4CD900077FDC07FC6D80DC0FF06D80DC1FC07F4C48824CC8FC04
+7E6F7F5EEDFDF85E03FF707F5EA25EA25EA293C9FCA45DB3B3A6B8D8E003B81280A86178
+79F76C>104 D<902601FFFCEC7FFEB6020FB512F0057F14FE4CB712C0040716F0041F82
+047F16FE93B5C66C7F92B500F0010F14C0C66C0380010380011F4AC76C806D4A6E8004F0
+6F7F4C6F7F4C6F7F4C8193C915804B7014C0861DE0A27414F0A27414F8A47513FCA57513
+FEAF5113FCA598B512F8A31DF0621DE0621DC0621D806F5E701800704B5B505B704B5B70
+92B55A04FC4A5C704A5C706C010F5C05E0013F49C7FC9227FE7FFC01B55A70B712F0040F
+16C0040393C8FC040015F8053F14C0050301F0C9FC94CCFCB3A6B812E0A85F6F7ACD6C>
+112 D<902601FFF8EB07FEB691383FFFC094B512F00403804C14FE4C8093261FFC3F1380
+93263FE07F13C0DC7F80B5FCC66C5D011FDAFE0114E06DEBF9FC16F815FB16F016E015FF
+16C07114C05E72138095381FFE0093C76C5AF001E095C8FCA25DA65DB3B3A2B812F8A843
+4E7ACD4F>114 D<15FFA75CA55CA45CA25CA25CA25CA25C91B5FCA25B5B5B131F5B90B9
+FC120FBAFCA6D8000791C9FCB3B3A3F01FE0AE183F7014C07F187F7014806D16FF826D4B
+13006E6D485AEEFE0F6E90B55A020F5D6E5D020115C06E6C5C031F49C7FC030113F03B6E
+7CEC4B>116 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Ft cmss10 10.95 49
+/Ft 49 123 df<14FE903803FF8049EB81FE5B5B5BEB7F83140001FE13015B92C7FC1201
+ADB6EA80FEA6D801FCC7FCB3B027407EBF31>12 D<14FCEB01F8EB03F0EB07E0EB0FC013
+1F1480EB3F005B137E5B12015B1203A2485AA25B120FA25B121FA25B123FA448C7FCA712
+FEB3A2127FA76C7EA4121F7FA2120F7FA212077FA26C7EA212017F1200137E137F7FEB1F
+8014C0130FEB07E0EB03F0EB01F8EB00FC165A79C323>40 D<12FC127E7E6C7E6C7E7F12
+076C7E7F12016C7E7F137E137FA2EB3F80A2131F14C0A2130F14E0A2130714F0A4EB03F8
+A7EB01FCB3A2EB03F8A7EB07F0A414E0130FA214C0131FA21480133FA2EB7F00A2137E13
+FE5B485A12035B485A120F5B485A48C7FC127E5A165A7BC323>I<12FFA80808788719>
+46 D<EB03FCEB0FFF013F13C090B512F048804880EBFE073907F801FE48486C7E497F48
+48EB3F80A249131F003F15C0A290C7120F4815E0A4007E1407A200FE15F0B3A3007FEC0F
+E0A56C6CEB1FC0A36D133F001F15806D137F000F15006D5B6C6C485A3903FE07FC90B5FC
+6C5C6C5C013F13C06D5BD903FCC7FC24407CBD2D>48 D<14C013011307130F137FEA07FF
+B5FCA4139FEAF81F1200B3B3A8B612F8A61D3E78BD2D>I<EB0FF8EB3FFF90B512C04814
+F048804880390FF01FFE391FC003FF4848C6138090C7127F48EC3FC0127EED1FE012FE48
+140F007C15F0123C1238001814071208C8FCA2150FA216E0A2151F16C0153F1680ED7F00
+5D5D4A5A4A5A4A5A4A5A4A5A4A5A4AC7FC14FE495A495A495A495A495A495A49C8FC13FC
+485A485A485A485A485A48C9FC48B612F0B7FCA6243E7CBD2D>I<EB03FCEB1FFF4913C0
+90B57E48803903FE07F83907F801FC496C7E4848137E48487F5B003F158090C7121F4815
+C0A2007E140F00FE15E0A41507A216F0A4150FA2127FA2151F7F003F143F7F6C6C137F6D
+13FF380FF8039038FFBFF76CEBFFE76CECC7E06C140F6C13FCEB3FF090C7FC16C0151FA2
+1680153F16005D157E15FE4A5A1403000C495A000F495A391FC07FE090B55A485C6C91C7
+FC00075B000113F838003FC024407CBD2D>57 D<EC01FE4A7EA34A7FA391380FDFC0159F
+021F7F158FA291383F0FF0A21507027E7FA2150302FC7FA201016D7E14F8A201036D7E5C
+A201076E7E5C010F6E7EA25C011F6E7E5CA2013F6E7E91C7FC49811607137E90B77EA348
+82A2D803F8C7EA01FF825B00071780177F5B000FEE3FC05B001F17E0171F5B003F17F017
+0F90C9FC48EE07F8A200FE17FC17035A363F7DBE3D>65 D<EDFFF0020FEBFF80023F14F0
+91B612FC13035B499038803FF890391FFC0003D93FF01300D97FC01438494814184890C9
+FC485A485A5B120F5B121F5B123F5BA2485AA412FF90CAFCAB7F127FA46C7EA27F121F7F
+120F7F12077F6C7E6C6C15046C6D140C6D6C143CD93FF0147CD91FFCEB01FE90390FFF80
+1F6D90B5FC6D15FC010015F0023F14C0020F1400020013F02F417ABF3A>67
+D<B612F8EDFF8016E016F88290C7EA1FFF03037F03007F707EEE1FF0707E707E1603707E
+A2707EEF7F80A2173F18C0A2171F18E0A2170FA218F0AC18E0171FA318C0173FA2EF7F80
+A2EFFF00A24C5A16034C5A4C5A4C5A4C5AEEFFC003035B031F90C7FC90B65A16F816E016
+8003F8C8FC343F78BE42>I<B8FCA690CAFCB3A390B612FCA690CAFCB3A590B71280A729
+3F78BE36>I<EDFFF0020F13FF023F14E091B612F8010315FE5B49EB803F903A1FFC0003
+FCD93FF01300D97FC0143C4948141C4890C8120C484815005B485A120F5B121F5B123F5B
+A2127F5BA312FF90CAFCA90307B5FCA27F127FA36D90C7127F123FA27F121F7F120F7F12
+076C7E7F6C7E6C7F6D7EEB3FF0D91FFCEB01FF90390FFF801F6D90B6FC7F010015FC023F
+14F0020F1400020013F030417ABF3D>71 D<12FFB3B3B3A9083F78BE19>73
+D<B4FCB3B3B3A390B612F0A6243F78BE31>76 D<D8FFE0EE3FF8A36D167FA26D16FFA200
+FE17FB6D1501A2017EED03F3A36DED07E3A36D6CEC0FC3A26E141F010F1683A26E143F01
+071603A26E147F0103157E6E14FEA2010115FC6E1301A2010015F86E1303027E14F0027F
+1307A26E14E0ED800FA2021F14C0EDC01F020F1480A2EDE03F02071400A26F5A0203137E
+A26E6C5AA3913800FDF8A215FF6F5AA26F5AA36F5A92C8FCA23D3F77BE50>I<D8FFF015
+FEA27FA27FA27F12FE137FA280133F80131F80130F801307801303801301801300808081
+143F81141F81140F81140781140381140181140081811680153F16C0151F16E0150F16F0
+150716F8150316FC1501A2ED00FE16FF167FA2163FA2161FA22F3F78BE40>I<4AB47E02
+0F13F0027F13FE91B6FC010315C04981011F010013F8D93FF8EB1FFCD97FE0EB07FE4A13
+0349486D7E4890C813804848ED7FC049153F4848ED1FE04848ED0FF0A24848ED07F8A249
+1503003F17FCA2491501007F17FEA390CAFC4817FFAC6D5D007F17FEA46D1503003F17FC
+A26D1507001F17F86D150F000F17F06D151F6C6CED3FE0A26C6CED7FC06C6CEDFF806C6D
+4913006E5BD97FF0EB0FFE6D6C495A6DB4EBFFF8010790B512E06D5D010092C7FC6E5B02
+0F13F00201138038437BC043>I<B612F015FEEDFFC08216F890C7EA3FFCED07FEED01FF
+6F1380167FEE3FC0EE1FE0A2160F17F01607A6160F17E0161FA2EE3FC0167FEEFF804B13
+00ED07FEED3FFC90B65A5E16C093C7FC15FC90CAFCB3A92C3F78BE3A>I<B612F015FF16
+C016F016FC90C7EA3FFEED03FF03001380EE3FC0EE1FE0160F17F0160717F81603A51607
+17F0160FA2EE1FE0EE3FC016FF03031380031F130090B65A16F85E16C04BC7FC5DEB0001
+811400816F7E153F82151F826F7EA26F7E1503826F7EA26F7EA2EE7F80163F17C0EE1FE0
+A2EE0FF0A2EE07F8EE03FCA2EE01FE2F3F78BE3B>82 D<ECFFF0010713FF011F14C0017F
+14F890B67E5A48EB803F3A07FC0007F848481301D81FE0EB0078491438003F15184991C7
+FCA248CAFCA67FA26C7E7F7F6C7EEA0FFEEBFFC06C13FC6CEBFFC06C14F86C14FE013F6D
+7E010F80010380D9003F7F02037F9138007FFC150F6F7E15018281821780163FA7EE7F00
+12601270007815FE007C1401007F4A5AD8FFC0130701F0EB1FF801FFEB7FF06C90B55A00
+1F5D000792C7FC00015CD8003F13F8010113C029437CC033>I<B912FEA6C890C8FCB3B3
+B3A2373E7DBD3E>I<B4ED01FCB3B3AB6C6CEC03F8A36C6CEC07F0A26C6CEC0FE0A26C6C
+EC1FC06D143F6C6CEC7F806C6CECFF003A01FF8003FE6C9038E01FFC6DB55A011F14E001
+075C010149C7FC9038003FF02E4178BE3F>I<B46CEE1FC0007FEF3F807F003FEF7F00A2
+7F001F17FE7F000F4C5AA27F00074C5AA26C6C4B5AA27F00014C5AA27F6C4C5A80017F4B
+5AA280013F4BC7FCA26D6C14FEA280010F4A5AA26D6C5C1603A26D6C495AA26D6C5C160F
+A26D6C5C161FA2DA7F805B163FDA3FC090C8FC5EA291381FE07E16FE020F5B15F015F102
+075B15F902035B15FB15FF6E5BA26E5BA36F5A3A3F7FBE3D>I<D87FC0ED0FF86C6CED1F
+F06D16E0001FEE3FC06C6C157F6C6CEDFF806C6C16004C5A6C6C14036C6D5C6D6C495A16
+0F6D6C495A6D6C5C6D6C495A167F6D6C5C6D6C49C7FC0101495A903800FF03ED83FC9138
+7FC7F8EC3FCF91381FEFF0EDFFE06E5B806E5B93C8FC6E5A814A7F5C824A7F91381FEFF0
+15CF91383FC7F891387F83FC9138FF03FE150149486C7E49486D7E0107814A6D7E494813
+1F49486D7E8349486D7E4948130301FF8191C76C7E48486E13800003167F484816C049ED
+3FE04848ED1FF0001F17F849150F4848ED07FC007FEE03FE484816FF90C97E383F7EBE3D
+>88 D<EB0FF890B5FC00031480000F14E04814F0A29038F00FF890388003FC381E000100
+1814FE00101300C812FF157FA7EC7FFF010FB5FC137F48B6FC120748EBF07F383FFC0013
+C048C7FC12FE5AA315FF7E5C387F8007EBE01F6CB6FCA26C147F6C13FC6C13F0000190C7
+FC202B7CA92C>97 D<12FEB3A414FF010713E0011F7F017F7FB67E819038F80FFFEBE001
+D98000138090C7EA7FC0153F48141F16E0150FA3ED07F0AAED0FE0A3151FED3FC07E6DEB
+7F8015FFD9E00313009038F81FFE90B55A485C6D5B6D5B010F1380260001FEC7FC244079
+BE2F>I<49B47E010F13F0013F13FC4913FF90B612805A481300D807FCEB1F00D80FF013
+0748487F4990C7FC123F5B127F90C9FCA312FEAA127FA36C7EA26C6C14406DEB01C06C6C
+13036C6C131F01FF13FF6C90B5FC7E6C6C14806DEBFE00010F13F001011380222B7DA928
+>I<ED07F0B3A4EB07F8EB3FFF4913C748B512F74814FF5A1480390FFC003FD81FF0131F
+49130F48481307A2485A90C7FCA312FEAA127FA37F003F140F7F6C6C131F6D133F6C6C13
+7F9038FF01FF6C90B5FC6C14F76C14E76C148790383FFE07D90FF0C7FC24407DBE2F>I<
+EB03F8EB1FFF017F13C090B57E488048803807FE07390FF801FC9038E000FE4848137E00
+3F143E49133F90C77E5A127EED0F80B7FCA600FCC9FCA37E127EA2127FA26C7EA26C7E6D
+14806C6C1303D807FC131F01FF13FF6C90B5FC7E6C6C14006D13FC010F13E0010190C7FC
+212B7DA928>I<EC1FF0ECFFFC5B13075BA290381FE03C90383F800491C7FC5B137E13FE
+ADB6FCA6C648C7FCB3B01E407FBF1C>I<D903FC133F90390FFF03FF013F13DF4990B512
+8090B7FC5A9026FE07FCC7FC3803F80148486C7E49137EA248487FA86C6C137EA26D13FE
+6C6C485A3901FE07F848B5FC5D485C5D01CF90C8FC380FC3FC0180C9FC7FA212077F90B5
+12F06C14FF16C048814815F85A3A3FE0001FFCD87F80EB03FE90C712016F7E00FE81A56C
+5D6C6C495A6D1303D83FF0EB0FFCD81FFEEB7FF86CB65A6C5D6C5DC692C7FC011F13F801
+0313C0293D7EA82D>I<12FEB3A449B4FC010713C0011F13F0017F13F890B512FCB6FC90
+38F80FFEEBE003EBC00190388000FFA290C7127FA35AB3A9203F79BE2F>I<12FFA81200
+AF127FB3B3A4083F7ABE16>I<12FEB3A5EDFF804A13004A5A4A5A4A5A4A5A4A5A4A5A4A
+5A4990C7FC495A495A495A5C495A495A497E13FFB57E8013FBEBF1FCEBE0FE497E497E49
+6C7E488048131F6E7E8114076E7E8114016E7E157F1680153FED1FC016E0233F79BE2C>
+107 D<12FEB3B3B3A9073F79BE16>I<26FC01FFECFF800107D9C00313E0011FD9F00F13
+F8017FD9F83F7F90B56C487F00FD92B5FC3CFFF80FFFFC07FFD9E003EBF001496C497E49
+6C49EB7F80A290C76C48133FA34892C7FCB3A9392979A848>I<38FC01FF010713C0011F
+13F0017F13F890B512FC12FD39FFF80FFEEBE003EBC00190388000FFA290C7127FA35AB3
+A9202979A82F>I<EB01FE90380FFFC0013F13F0497F90B57E000314FF14033A07F8007F
+804848EB3FC04848EB1FE049130F4848EB07F0A290C712034815F8A2007E140100FE15FC
+A96C14036C15F8A36C6CEB07F06D130FA26C6CEB1FE06C6CEB3FC001FC13FF2607FF0313
+806C90B512006C5C6C5C013F13F0010F13C0D901FEC7FC262B7DA92D>I<14FFD8FE0713
+E0011F7F017F7FB67E819038F80FFFEBE003D98000138090C7EA7FC0153F5AED1FE0A215
+0FA216F01507A8150F16E0A2151FA2ED3FC06C147F6DEBFF805CD9E00313009038F81FFE
+90B55A485C6D5B6D5B010F1380D901FEC7FC90C9FCB1243B79A82F>I<00FC137CEB03FC
+130F131F133F137FEBFFC038FDFE00EAFFF85B5B5BA25BA290C7FCA25AB3A6162979A81F
+>114 D<EB1FF890B51280000314E04814F85A5A393FE00FF0EB8000007F143090C8FCA5
+7F6C7E13F06CB4FC14F06C13FE6C7F000114C06C14E0011F13F013019038001FF81407EC
+03FCA21401A3124012700078EB03F8007E130738FFE01F90B512F015E06C14C0001F1480
+0003EBFE0038003FF01E2B7EA923>I<13FCACB612C0A6D800FCC7FCB3A86D132015E0EB
+7F03ECFFF0A27F15C06D1300EB07F01C357EB321>I<00FE147FB3AC15FFA25C6C5B6C13
+0FEBC03F90B6FC6CEBFE7F6C13FC6C13E0000390C7FC202979A72F>I<B415FE6CEC01FC
+A26C6CEB03F8A27F001FEC07F0A27F000FEC0FE0A26C6CEB1FC0A27F0003EC3F80A26C6C
+14005DA26C6C137E15FEA2017F5B1401013F5B14811483011F5B14C314C7010F5BA29038
+07E7C014EFA26DB45AA36D90C7FCA227287FA72A>I<00FEDA7F80EB0FE0007F6F14C018
+1F15FF6C6C6E148003FB143F140101C013F3001F6FEB7F00140315F1D80FE06E137E03E1
+14FE1407D807F0D9E0FC5B170115C0140FD803F8027E5B1703EC1F8000015F01FC143F17
+070000D93F005C161F01FE1587023E148F017E5E027E130F17CFD93E7C5D013FEC07DFA2
+1478D91FF86DB4C7FCA25C010F5D16013B287FA73E>I<D87F80EB01FE003F5D6C6C495A
+6C6C13076D495A6C6C495A6C6C5C00014A5A6C6C49C7FC017F5B90383F81FEECC1FC9038
+1FE3F890380FE7F06DB45A7F6D5B6D5B92C8FC147E14FF497F81497F903807E7F090380F
+E3F8EB1FC190383F80FC4A7E49137F01FE6D7E48486D7E4848800007140F496D7E48486D
+7E48486D7E003F8148486D7E48C8EA7F80292880A72A>I<B415FE6CEC01FC7F003FEC03
+F87F121FED07F07F000FEC0FE07F1207ED1FC06C7E16806C6C133FA2ED7F006C7E157E01
+7F13FEA26D5B14815D131F14C190380FC3F0A2903807E3E014E7A201035BA2903801F780
+A2EB00FF92C7FCA2147EA3147CA214FC5C13015CA213035C13075CEA200F383C1F80D83F
+FFC8FCA25B5BEA07F0273B7FA72A>I<007FB61280A51600C7EA01FE4A5A14074A5A5D4A
+5A4A5A147F5D4AC7FC495A1303495A5C495A131F495A5C495A49C8FC5A5B485A485A120F
+485A5B485A48B61280B7FCA521287DA728>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fu cmtt10 10.95 89
+/Fu 89 127 df<121C127FEAFF80B3EA7F00B2123EC7FCA8121C127FA2EAFF80A3EA7F00
+A2121C09396DB830>33 D<00101304007C131F00FEEB3F80A26C137FA248133FB2007E14
+00007C7F003C131E00101304191C75B830>I<903907C007C0A2496C487EA8011F131FA2
+02C05BA3007FB7FCA2B81280A36C16006C5D3A007F807F80A2020090C7FCA9495BA2003F
+90B512FE4881B81280A36C1600A22701FC01FCC7FCA300031303A201F85BA76C486C5AA2
+29387DB730>I<1438147C14FCA4EB03FF011F13E090B512FC4880000780481580261FFE
+FD13C09039F0FC3FE0D83FC0131FD87F80EB0FF001001307007E15F800FE14035A1507A3
+6CEC03F0A2007F91C7FC138013C0EA3FF0EA1FFE13FF6C13FF6C14E0000114F86C6C7F01
+1F7F01037F0100148002FD13C09138FC7FE0151FED0FF015070018EC03F8127E1501B4FC
+A35AA26CEC03F07E01801307ED0FE0D83FC0131F01F0EB7FC0D81FFEB512806CB612006C
+5C6C5CC614F0013F13C0D907FEC7FCEB00FCA5147C143825477BBE30>I<D803C0EB01E0
+D80FF01303486C497E487E150F487ED87E7E495AEAFE7F5E486C133FA25E157FA24BC7FC
+6C5A5D387E7E01EA7FFED83FFC5B1403EA1FF86C48485AEA03C0C75B140FA25D141FA24A
+5AA25D147FA292C8FC5CA2495AA25C1303A25C1307A290390FF001E0ED07F84A487E011F
+497EA24A487E133F163F90267F807F1380ED7E1F14005BA25B1201A24848EB7F3F033F13
+004914FF12076F5A5B6F5A6C486D5A0001EC01E029477DBE30>I<EB07E0EB1FF8497E13
+7F497E803801FC7F497E810003131F13F0A6143F92C8FC91387F0FFF9026F87E1F138000
+0113FEEBF9FC13FB4A6C1300D9FFF013C06C13E0151F02C05BEB7F809038FF003F4892C7
+FC485C48EB807E5A15FE391FDFC0FC383F8FE014E1397F07F1F8EB03F300FEEBFBF0EB01
+FF5D7FEDC006027F130F91393F801F8015C06C137F6CEBFFE049EBF83F018701FC130026
+3FFFFBB5FC6C01F15B14E06C9038C03FFC00039038001FF8D801FCEB07E0293A7DB830>
+I<EA07C0EA0FF0EA1FF8A213FCA213FE120F1207EA007EA513FE13FCA2120113F81203EA
+07F0120FEA1FE0127FEAFFC013801300127C12380F1D70B730>I<141E147F14FF5BEB03
+FEEB07FCEB0FF0EB1FE0EB3FC0EB7F80EBFF00485A5B12035B485A120F5BA2485AA2123F
+5BA2127F90C7FCA412FEAD127FA47F123FA27F121FA26C7EA27F12076C7E7F12017F6C7E
+EB7F80EB3FC0EB1FE0EB0FF0EB07FCEB03FEEB01FF7F147F141E184771BE30>I<127812
+FE7E7F6C7E6C7EEA0FF06C7E6C7E6C7E6C7EEB7F80133F14C0131FEB0FE014F01307A2EB
+03F8A214FC1301A214FE1300A4147FAD14FEA4130114FCA2130314F8A2EB07F0A2130F14
+E0EB1FC0133F1480137FEBFF00485A485A485A485AEA3FE0485A485A90C7FC5A12781847
+78BE30>I<14E0497E497EA60038EC0380007EEC0FC0D8FF83EB3FE001C3137F9038F3F9
+FF267FFBFB13C06CB61280000FECFE00000314F86C5C6C6C13C0011F90C7FC017F13C048
+B512F04880000F14FE003FECFF80267FFBFB13C026FFF3F913E09038C3F87F0183133FD8
+7E03EB0FC00038EC0380000091C7FCA66D5A6D5A23277AAE30>I<143EA2147FAF007FB7
+FCA2B81280A36C1600A2C76CC8FCAF143EA229297DAF30>I<EA03E0EA0FF0EA1FF813FC
+EA3FFEA213FFA27EA27E1203EA007FA2137E13FEEA01FC1203EA07F8EA3FF0127FEAFFE0
+EA7F801300123C1019708B30>I<007FB612F0A2B712F8A36C15F0A225077B9E30>I<120F
+EA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C0C6E8B30>I<16F01501ED03F8A2
+1507A2ED0FF0A2ED1FE0A2ED3FC0A2ED7F80A2EDFF00A24A5AA25D1403A24A5AA24A5AA2
+4A5AA24A5AA24A5AA24AC7FCA2495AA25C1303A2495AA2495AA2495AA2495AA2495AA249
+C8FCA2485AA25B1203A2485AA2485AA2485AA2485AA2485AA248C9FCA25AA2127CA22547
+7BBE30>I<14FE903807FFC0497F013F13F8497F90B57E48EB83FF4848C6138049137F48
+48EB3FC04848EB1FE049130F001F15F0491307A24848EB03F8A290C712014815FCA400FE
+EC00FEAD6C14016C15FCA36D1303003F15F8A26D1307001F15F0A26D130F6C6CEB1FE0A2
+6C6CEB3FC06C6CEB7F806D13FF2601FF8313006CEBFFFE6D5B6D5B010F13E06D5BD900FE
+C7FC273A7CB830>I<EB03C0497EA2130FA2131FA2133F137F13FF1203123FB5FCA213EF
+138FEA7E0F1200B3B0003FB512F84814FCB612FEA26C14FC6C14F81F3977B830>I<EB07
+FC90383FFFC090B512F00003804814FE4880261FF80F1380263FE00113C09038C0007F48
+48EB3FE090C7121FED0FF04814075A6C15F81503A3127E1218C8FCA2150716F0150F16E0
+151F16C0153FED7F8015FF4A13005DEC07FC4A5A4A5A4A5A4A5A4A5A4990C7FC495A495A
+EB0FF0EB3FE0495A495A4890C8FC4848EB01F04848EB03F8485AEA1FE048B6FCB7FCA37E
+6C15F025397BB830>I<EB03FF013F13E090B512F84814FE4880481580260FFE0113C090
+38F0007F4848EB1FE0150F16F01507A26C5A6C5AC8FC150F16E0A2151FED3FC0157FEDFF
+8002071300903807FFFE495B5D8115FF6D1480D9000113C09138003FE0ED1FF0ED07F815
+0316FC150116FE1500A21218127EB4FCA2150116FC4814036C15F86C6C13076DEB1FF0D8
+3FF0133F3A1FFE01FFE06CB612C06C15806CECFE00C65C013F13F001031380273A7CB830
+>I<EC03FC4A7E140F141FA2143F147F157E14FEA2EB01FCEB03F8A2EB07F0A2EB0FE0EB
+1FC0A2EB3F80A2EB7F0013FEA2485A485AA2485AA2485A485AA2485AA248C7FC12FEB8FC
+1780A46C1600C8007EC7FCAA91387FFFFE91B6FCA46E5B29397DB830>I<000FB6128048
+15C05AA316800180C8FCAEEB83FF019F13C090B512F015FC8181D9FE0313809039F0007F
+C049133F0180EB1FE06CC7120F000E15F0C81207A216F81503A31218127EA2B4FC150716
+F048140F6C15E06C141F6DEB3FC06D137F3A3FE001FF80261FFC0F13006CB55A6C5C6C5C
+6C14E06C6C1380D90FFCC7FC25397BB730>I<EC0FF8EC7FFF49B51280010714E0131F49
+14F090387FF80F9039FFC007F84813803803FE005B485A4848EB03F0ED01E0484890C7FC
+5B123F5BA2127FEB000C903803FFE0010F13F8D8FF3F13FE48B6FCB7128016C09039FE00
+7FE001F8EB1FF001E0130F49EB07F849EB03FCA290C7120116FE1500A37EA46C7E15016D
+14FC121F6D1303000FEC07F86D130F6C6CEB1FF06DEB3FE03A03FF81FFC06C90B512806C
+15006D5B011F13F8010713E001011380273A7CB830>I<127CB712FC16FEA416FC48C7EA
+0FF816F0ED1FE0007CEC3FC0C8EA7F80EDFF00A24A5A4A5A5D14075D140F5D4A5AA24A5A
+A24AC7FCA25C5C13015CA213035CA213075CA4495AA6131F5CA96D5A6DC8FC273A7CB830
+>I<49B4FC011F13F0017F13FC90B57E0003ECFF804815C048010113E03A1FF8003FF049
+131FD83FC0EB07F8A24848EB03FC90C71201A56D1303003F15F86D13076C6CEB0FF06C6C
+EB1FE0D807FCEB7FC03A03FF83FF806C90B512006C6C13FC011F13F0497F90B512FE4880
+2607FE0013C0D80FF8EB3FE0D81FE0EB0FF04848EB07F8491303007F15FC90C712014815
+FE481400A66C14016C15FC6D1303003F15F86D1307D81FF0EB1FF06D133F3A0FFF01FFE0
+6C90B512C06C1580C6ECFE006D5B011F13F0010190C7FC273A7CB830>I<49B4FC010F13
+E0013F13F890B57E4880488048010113803A0FFC007FC0D81FF0EB3FE04848131F49EB0F
+F048481307A290C7EA03F85A4815FC1501A416FEA37E7E6D1303A26C6C13076C6C130F6D
+133FD80FFC13FF6CB6FC7E6C14FE6C14F9013FEBE1FC010F138190380060011400ED03F8
+A2150716F0150F000F15E0486C131F486CEB3FC0157FEDFF804A1300EC07FE391FF01FFC
+90B55A6C5C6C5C6C1480C649C7FCEB3FF0273A7CB830>I<120FEA3FC0EA7FE0A2EAFFF0
+A4EA7FE0A2EA3FC0EA0F00C7FCAF120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F
+000C276EA630>I<EA03C0EA0FF0EA1FF8A2EA3FFCA4EA1FF8A2EA0FF0EA03C0C7FCAFEA
+03C0EA0FF0121F13F8123F13FCA3121FA2120F12031200120113F8120313F01207EA1FE0
+123FEA7FC0EAFF80EA7F00127E12380E3470A630>I<16F01503ED07F8151F157FEDFFF0
+14034A13C0021F138091383FFE00ECFFF8495B010713C0495BD93FFEC7FC495A3801FFF0
+485B000F13804890C8FCEA7FFC5BEAFFE05B7FEA7FF87FEA1FFF6C7F000313E06C7F3800
+7FFC6D7E90380FFF806D7F010113F06D7FEC3FFE91381FFF80020713C06E13F01400ED7F
+F8151F1507ED03F01500252F7BB230>I<007FB7FCA2B81280A36C16006C5DCBFCA7003F
+B612FE4881B81280A36C1600A229157DA530>I<1278127EB4FC13C07FEA7FF813FEEA1F
+FF6C13C000037F6C13F86C6C7EEB1FFF6D7F010313E06D7F9038007FFC6E7E91380FFF80
+6E13C0020113F080ED3FF8151F153FEDFFF05C020713C04A138091383FFE004A5A903801
+FFF0495B010F13804990C7FCEB7FFC48485A4813E0000F5B4890C8FCEA7FFE13F8EAFFE0
+5B90C9FC127E1278252F7BB230>I<EC1FE0ECFFF8010313FE010F7F4914804914C09039
+7FF03FE09038FF800F4890380007F0D803FC13033A07F801FBF89038F007FF380FE01F4A
+13FCEA1FC0495A003FEBFF0F903800FE07903901FC03FE007FEBF801EA7E03ECF000A2EA
+FE0700FC49137EAA00FE6D13FED87E0314FCA2ECF801D87F0114F8003FEBFC03903900FE
+07F0903880FF0F001F90387FFFE06D6C13C0EA0FE06E13803A07F007FE009038F801F86C
+6CC7127C6CB414FE6CEB800390387FF01F6DB512FC6D14F86D14E0010314C00100EBFE00
+EC1FF0273A7CB830>64 D<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1
+A2011F7FA490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F0003
+8149130FA4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>I<
+007FB512F0B612FE6F7E82826C813A03F8001FF815076F7E1501A26F7EA615015EA24B5A
+1507ED1FF0ED7FE090B65A5E4BC7FC6F7E16E0829039F8000FF8ED03FC6F7E1500167FA3
+EE3F80A6167F1700A25E4B5A1503ED1FFC007FB6FCB75A5E16C05E6C02FCC7FC29387EB7
+30>I<91387F803C903903FFF03E49EBFC7E011F13FE49EBFFFE5B9038FFE07F48EB801F
+3903FE000F484813075B48481303A2484813015B123F491300A2127F90C8FC167C16005A
+5AAC7E7EA2167C6D14FE123FA27F121F6D13016C6C14FCA26C6CEB03F86D13076C6CEB0F
+F03901FF801F6C9038E07FE06DB512C06D14806D1400010713FC6D13F09038007FC0273A
+7CB830>I<003FB512E04814FCB67E6F7E6C816C813A03F8007FF0ED1FF8150F6F7E6F7E
+15016F7EA2EE7F80A2163F17C0161FA4EE0FE0AC161F17C0A3163F1780A2167F17005E4B
+5A15034B5A150F4B5AED7FF0003FB65A485DB75A93C7FC6C14FC6C14E02B387FB730>I<
+007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800A4
+157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>I<003FB7128048
+16C0B8FCA27E7ED801FCC7121FA8EE0F8093C7FCA5153E157FA490B6FCA69038FC007FA4
+153E92C8FCAE383FFFF8487FB5FCA27E6C5B2A387EB730>I<02FF13F00103EBC0F8010F
+13F1013F13FD4913FF90B6FC4813C1EC007F4848133F4848131F49130F485A491307121F
+5B123F491303A2127F90C7FC6F5A92C8FC5A5AA892B5FC4A14805CA26C7F6C6D1400ED03
+F8A27F003F1407A27F121F6D130F120F7F6C6C131FA2D803FE133F6C6C137FECC1FF6C90
+B5FC7F6D13FB010F13F30103EBC1F0010090C8FC293A7DB830>I<3B3FFF800FFFE0486D
+4813F0B56C4813F8A26C496C13F06C496C13E0D803F8C7EAFE00B290B6FCA601F8C7FCB3
+A23B3FFF800FFFE0486D4813F0B56C4813F8A26C496C13F06C496C13E02D387FB730>I<
+007FB6FCB71280A46C1500260007F0C7FCB3B3A8007FB6FCB71280A46C1500213879B730
+>I<D83FFF90380FFF80486D4813C0B56C5AA26C497E6C496C1380D803F0903803F8004B
+5A4B5A151F4B5A5E4BC7FC15FE14014A5A5D4A5A4A5A141F5D4A5A4AC8FC5C13F18101F3
+7F13F790B57E14EFECC7F01483EC03F8140101FE7F496C7E5B157F497F82151F82150F82
+6F7EA26F7E1501821500D83FFF903803FFC0486D4813E0B56C5AA26C497E6C496C13C02B
+387FB730>75 D<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F80EE1FC0A9003F
+B7FC5AB8FCA27E6C16802A387EB730>I<D83FF8ECFFE0486C4913F0486C4913F8A2007F
+16F06C6C4913E00007160001EF14BFEC800FA39039E7C01F3FA4ECE03F01E3133EA2ECF0
+7EA201E1137CA2ECF8FCA201E013F8A214FDEC7DF0A3147FEC3FE0A3EC1FC0A2EC070091
+C7FCADD83FFC903801FFE0486C4913F0B54913F8A26C486D13F06C486D13E02D387FB730
+>I<D83FFC90381FFF80486C4913C0B54913E0A26C6D6C13C06C6E13800003913801F800
+EBF7C0A3EBF3E0A314F013F1A214F8A213F014FCA2147C147EA2143E143FA2141FA21581
+A2140F15C1A2140715E1A2140315F1A21401A215F91400A3157DA3153FEA3FFF481380B5
+EAC01FA26CEB800F6C496C5A2B387EB730>I<90383FFFE048B512FC000714FF48158048
+15C04815E0EBF80001E0133FD87F80EB0FF0A290C71207A44815F8481403B3A96C1407A2
+6C15F0A36D130FA26D131F6C6CEB3FE001F813FF90B6FC6C15C06C15806C1500000114FC
+D8003F13E0253A7BB830>I<007FB512F0B612FE6F7E16E0826C813903F8003FED0FFCED
+03FE15016F7EA2821780163FA6167F17005EA24B5A1503ED0FFCED3FF890B6FC5E5E1680
+4BC7FC15F001F8C9FCB0387FFFC0B57EA46C5B29387EB730>I<90383FFFE048B512FC00
+0714FF4815804815C04815E0EBF80001E0133F4848EB1FF049130F90C71207A44815F848
+1403B3A8147E14FE6CEBFF076C15F0EC7F87A2EC3FC7018013CF9038C01FFFD83FE014E0
+EBF80F90B6FC6C15C06C15806C1500000114FCD8003F7FEB00016E7EA21680157F16C015
+3F16E0151F16F0150FED07E025467BB830>I<003FB57E4814F0B612FC15FF6C816C8126
+03F8017F9138003FF0151F6F7E15071503821501A515035E1507150F4B5A153F4AB45A90
+B65A5E93C7FC5D8182D9F8007FED3FE0151F150F821507A817F8EEF1FCA53A3FFF8003FB
+4801C0EBFFF8B56C7E17F06C496C13E06C49EB7FC0C9EA1F002E397FB730>I<90390FF8
+03C0D97FFF13E048B512C74814F74814FF5A381FF80F383FE001497E4848137F90C7123F
+5A48141FA2150FA37EED07C06C91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114
+F86C80011F13FF01031480D9003F13C014019138007FE0151FED0FF0A2ED07F8A2007C14
+0312FEA56C140716F07F6DEB0FE06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8
+FC7F13F8D8F81F5BD878011380253A7BB830>I<003FB712C04816E0B8FCA43AFE003F80
+0FA8007CED07C0C791C7FCB3B1011FB5FC4980A46D91C7FC2B387EB730>I<3B7FFFC007
+FFFCB56C4813FEA46C496C13FCD803F8C7EA3F80B3B16D147F00011600A36C6C14FE6D13
+016D5CEC800390393FE00FF890391FF83FF06DB55A6D5C6D5C6D91C7FC9038007FFCEC1F
+F02F3980B730>I<D87FFE90380FFFC0B54913E06E5AA24A7E6C486D13C0D807F0903801
+FC00A26D130300035DA46C6C495AA46C6C495AA46D131F6D5CA3EC803F013F5CA46D6C48
+C7FCA490380FE0FEA401075B14F1A301035BA314FB01015BA314FFA26D5BA46E5A6E5A2B
+397EB730>I<D83FFC903801FFE0486C4913F000FF16F8A2007F16F06C486D13E0D81FC0
+9038001FC0000F1680A76D143F00071600A7000390380F803E9039F01FC07EEC3FE0A3EC
+7FF0A2147D0001157CA29039F8FDF8FCA314F8A300005D01F913FCA2ECF07CA201FD137D
+A2017D5CECE03DA3017F133FA2ECC01FA2013F5CA2EC800F6D486C5A2D397FB730>I<3A
+3FFF01FFF84801837F02C77FA202835B6C01015B3A01FC007F806D91C7FC00005C6D5BEB
+7F01EC81FCEB3F8314C3011F5B14E7010F5B14FF6D5BA26D5BA26D5BA26D90C8FCA4497F
+A2497FA2815B81EB0FE781EB1FC381EB3F8181EB7F0081497F49800001143F4980000314
+1F49800007140FD87FFEEB7FFFB590B5128080A25C6C486D130029387DB730>I<D87FFF
+90381FFFC0B56C4813E0A46C496C13C0D803F8903803F8006D1307A26C6C495AA26C6C5C
+151F6D5CEC803F013F5CECC07F011F91C7FCA290380FE0FEA214F101075BA2903803FBF8
+A201015B14FF6D5BA26E5AA36E5AB1903803FFF8497F497FA26D5B6D5B2B387EB730>I<
+001FB612FC4815FE5AA490C7EA03FCED07F816F0150FED1FE016C0153FED7F80003E1500
+C85A4A5A5D14034A5A5D140F4A5A5D143F4A5A92C7FC5C495A5C1303495A5C130F495A5C
+133F495A91C8FC5B4848147C4914FE1203485A5B120F485A5B123F485A90B6FCB7FCA46C
+15FC27387CB730>I<007FB5FCB61280A4150048C8FCB3B3B3A5B6FC1580A46C14001947
+6DBE30>I<127CA212FEA27EA26C7EA26C7EA26C7EA26C7EA26C7EA26C7EA212017FA26C
+7EA26D7EA26D7EA26D7EA26D7EA26D7EA26D7EA2130180A26D7EA26E7EA26E7EA26E7EA2
+6E7EA26E7EA26E7EA2140181A26E7EA2ED7F80A2ED3FC0A2ED1FE0A2ED0FF0A2ED07F8A2
+1503A2ED01F0150025477BBE30>I<007FB5FCB61280A47EC7123FB3B3B3A5007FB5FCB6
+FCA46C140019477DBE30>I<007FB612F0A2B712F8A36C15F0A225077B7D30>95
+D<EB7FF80003B5FC4814C04880488048809038E01FFC9038C003FE14016E7E6C487F6CC7
+7FC8123FA491B5FC130F137F48B6FC12075A48EB803F383FF800EA7FE0138048C7FC5AA4
+157F7E6C6C13FFEBC003263FF01FEBFF8090B712C07E6C14EF000314876CD9FE01138026
+003FE0C8FC2A2A7BA830>97 D<EA3FFC487E12FFA2127F123F1200AAEC03FE91381FFF80
+027F13E091B57E90B612FC82ECFE079138F001FF4A6C13804A137F4AEB3FC091C7121F17
+E049140FA217F01607A8160FA217E07F161F6EEB3FC0A26EEB7F806E13FFDAF003130091
+38FC0FFE91B55A5E495CD97E7F13C0D93C1F90C7FC90380003FC2C3980B730>I<ECFFE0
+010713FC011F7F017F7F90B612804815C048EB807F3907FC003F485A485A49EB1F804848
+EB0F004990C7FC127F90C9FCA25A5AA87E7EA27F003FEC07C06DEB0FE06C7E6D131F6C6C
+14C0D807FE133F9039FFC0FF806C90B5FCC615006D5B011F13F801075B01011380232A7A
+A830>I<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A48
+1303380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F
+003F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01
+C713E0011F010313C0D907FCC8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90
+B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F0491307127F
+90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307
+D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C025
+2A7CA830>I<EDFF80020713E0021F13F05C4A13F891B5FC491387903803FE079138FC03
+F0903907F800C04A1300A8003FB612C04815E0B7FCA36C15C0260007F0C7FCB3A9003FB5
+12FE4880B71280A26C15006C5C25397DB830>I<D903FC13FF90261FFF8713C04913DF90
+B712E05A5A2607FE07138F903AF801FE07C048486C6CC7FCA2497F001F8149133FA56D13
+7F000F92C7FC6D5BA26C6C485AEBFE0790B55A5D485C15C001DF5BD9C3FCC8FC01C0C9FC
+A37F7F6CB512F015FF6C15C04815F0488148813A3FE0001FFE0180130148C8127F007E81
+00FE168048151FA56C153F007FED7F006D5C6C6C495A01F013076CB4EB7FFC6C90B55A6C
+5D000115C06C6C91C7FC011F13FC010113C02B3E7DA730>I<EA3FFC487E12FFA2127F12
+3F1200AAEC01FE91380FFF80023F13E091B57E90B67EA29138FE07FCECF8039138E001FE
+14C0EC8000A291C7FCA25BB3A23B3FFFF81FFFF8486D4813FCB500FE14FEA26C01FC14FC
+6C496C13F82F3880B730>I<14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF848
+7F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C023397AB830>I<EC01C0EC
+07F0A2EC0FF8A3EC07F0A2EC01C091C7FCA990B512F04814F8A47EEB0003B3B3A5EC07F0
+A2123C007EEB0FE0B4131FEC3FC0147F90B512806C14005C6C5B000F13F0000313C01D4E
+7CB830>I<EA7FF8487EA4127F1200AB0203B512804A14C017E0A217C06E14809139001F
+E0004B5A4B5A4BC7FC4A5A4A5AEC0FF84A5A4A5A4A5A4A5A01FD7F90B57E8114F7ECE3F8
+ECC1FCEC81FEEC00FF497F496D7E6F7E826F7E15076F7E6F7E3B7FFFF81FFFE0B56C4813
+F017F8A217F06C496C13E02D387FB730>I<387FFFF8B57EA47EEA0001B3B3A8007FB612
+F0B712F8A46C15F025387BB730>I<02FC137E3B7FC3FF01FF80D8FFEF01877F90B500CF
+7F15DF92B57E6C010F13872607FE07EB03F801FC13FE9039F803FC01A201F013F8A301E0
+13F0B3A23C7FFE0FFF07FF80B548018F13C0A46C486C01071380322881A730>I<EC01FE
+3A3FFC0FFF80267FFE3F13E000FF90B57E90B67E7E6C9038FE07FCC6EBF8039138E001FE
+14C0EC8000A291C7FCA25BB3A23B3FFFF81FFFF8486D4813FCB500FE14FEA26C01FC14FC
+6C496C13F82F2880A730>I<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A
+07FC007FC04848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FE
+EC00FEA86C14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D13
+7F3A07FF01FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>
+I<EC03FE3A3FFC1FFF80267FFE7F13E000FF90B57E90B612FC6C816CEBFE07C69038F001
+FF4A6C13804A137F4AEB3FC091C7121F17E049140FA217F01607A8160FA217E07F161F6E
+EB3FC0A26EEB7F806E13FFDAF00313009138FC0FFE91B55A5E495C6E13C0021F90C7FCEC
+03FC91C9FCAD383FFFF8487FB57EA26C5B6C5B2C3C80A730>I<49B413F8010FEBC1FC01
+3F13F14913FD48B6FC5A481381390FFC007F49131F4848130F491307485A491303127F90
+C7FC15015A5AA77E7E15037FA26C6C1307150F6C6C131F6C6C133F01FC137F3907FF01FF
+6C90B5FC6C14FD6C14F9013F13F1010F13C1903803FE0190C7FCAD92B512F84A14FCA46E
+14F82E3C7DA730>I<ED07F83A3FFF803FFF486DB51280B512C302CF14C06C13DF6C9038
+FFFC3FD8001F13E09238801F809238000F004A90C7FC5C5C5CA25CA45CAF003FB512FC48
+80B7FCA26C5C6C5C2A287EA730>I<90381FFC1E48B5129F000714FF5A5A5A387FF007EB
+800100FEC7FC4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F8
+6C6C7F01037F9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F80
+6D137F9039FC03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<
+EB0780497E131FA9003FB612E04815F0B7FCA36C15E026001FC0C7FCB216F8ED01FCA5EC
+E003010FEB07F814F09138FC1FF06DB512E06D14C016806D14009038007FFCEC1FF02633
+7EB130>I<D83FFCEB3FFC486C497E00FF14FFA2007F147F003F143F00001400B3A41501
+A2150315076D130F903A7FC07FFFF891B612FC6D15FE7F6D4913FC6D9038F87FF8010001
+C0C7FC2F2880A630>I<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C496C13803B01
+F80003F000A26D130700005DA26D130F017E5CA2017F131F6D5CA2EC803F011F91C7FCA2
+6E5A010F137EA2ECE0FE01075BA214F101035BA3903801FBF0A314FF6D5BA36E5A6E5A2B
+277EA630>I<3B3FFFC01FFFE0486D4813F0B515F8A26C16F06C496C13E0D807E0C7EA3F
+00A26D5C0003157EA56D14FE00015DEC0F80EC1FC0EC3FE0A33A00FC7FF1F8A2147DA2EC
+FDF9017C5C14F8A3017E13FBA290393FF07FE0A3ECE03FA2011F5C90390F800F802D277F
+A630>I<3A3FFF81FFFC4801C37FB580A26C5D6C01815BC648C66CC7FC137FEC80FE9038
+3F81FC90381FC3F8EB0FE3ECE7F06DB45A6D5B7F6D5B92C8FC147E147F5C497F81903803
+F7E0EB07E790380FE3F0ECC1F890381F81FC90383F80FE90387F007E017E137F01FE6D7E
+48486D7E267FFF80B5FCB500C1148014E3A214C16C0180140029277DA630>I<3B3FFFC0
+7FFF80486DB512C0B515E0A26C16C06C496C13803B01FC0003F000A2000014076D5C137E
+150F017F5C7F151FD91F805BA214C0010F49C7FCA214E00107137EA2EB03F0157C15FCEB
+01F85DA2EB00F9ECFDF0147D147FA26E5AA36E5AA35DA2143F92C8FCA25C147EA2000F13
+FE486C5AEA3FC1EBC3F81387EB8FF0EBFFE06C5B5C6C90C9FC6C5AEA01F02B3C7EA630>
+I<001FB612FC4815FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7
+485A4A5A4A5A4A5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890
+C7127F485A485A485A485A485A48B7FCB8FCA46C15FE28277DA630>I<ED3FF0913803FF
+F8140F5C147F16F09138FFF00092C7FC495A5CB3A21303495A133F383FFFF0B55A5C91C8
+FC14C080003F7F38003FF813076D7E1301B3A2806D7E15F091387FFFF016F8141F801403
+9138003FF025477BBE30>I<EA7FE0EAFFFE6D7E8014F07EC66C7E13076D7E1301B3A280
+6D7E15E091387FFFE06E13F8801407141F5C4A13E09138FFE00092C7FC495A5CB3A21303
+495A137F387FFFF0B5FC14C05C49C8FCEA7FE025477BBE30>125
+D<017C133848B4137C48EB80FE4813C14813C348EBEFFC397FEFFFF0D8FF8713E0010713
+C0486C1380D87C0113003838007C1F0C78B730>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fv cmmi10 10.95 46
+/Fv 46 123 df<131C013E141F017EEC7FC0ED01FFED07BF01FEEB1E3F03381380491370
+9238E01E0000014948C7FCEC0780D9F80EC8FC5C00035B14F0EBF3C001FFC9FC4813F0EC
+FF8001E013F0EC07FC000FEB00FE157F496D7EA2001F141F17705BA2003F16F0033F13E0
+90C71300A248ED01C0A2007EEC1F03178000FE91380F0700168E48EC07FC0038EC01F02C
+297CA734>20 D<EC1FF0903801FFFC010713FF011F14C090397FC01FE09038FC0007D801
+F01301D803C090C7FC485AA290C9FC5A120EA2120F7E7F3803CFFF6CB57E021FC7FC3803
+DFFE380781E0000EC9FC5A123C5A127012F05AA515066C140E5D00785C007C14F0393F80
+07E06CB55A000791C7FC000113FC38007FE0232B7DA82A>34 D<121EEA7F80A2EAFFC0A4
+EA7F80A2EA1E000A0A798919>58 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A4
+13E013C0A312011380120313005A120E5A1218123812300B1C798919>I<183818FC1703
+EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0EEFF80DB03FEC7FCED0FF8ED3FE0EDFF
+80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FCEB0FF8EB3FE0EBFF80D803FECAFCEA0F
+F8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0FF8EA03FEC66C7EEB3FE0EB0FF8EB03FE
+903800FF80EC3FE0EC0FF8EC03FE913800FF80ED3FE0ED0FF8ED03FE923800FF80EE3FE0
+EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC17001838363678B147>I<ED0180ED03
+C01507A21680150FA216005DA2151E153EA2153C157CA2157815F8A25D1401A25D1403A2
+5D1407A25D140FA24AC7FCA2141E143EA2143C147CA2147814F8A25C1301A25C1303A25C
+1307A25C130FA291C8FC5BA2131E133EA25BA2137813F8A25B1201A25B1203A25B1207A2
+5B120FA290C9FC5AA2121E123EA2123C127CA2127812F8A25A1260225B7BC32D>I<1260
+12F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007FC0EB1FF0EB07FCEB01FF9038007FC0EC1F
+F0EC07FCEC01FF9138007FC0ED1FF0ED07FCED01FF9238007FC0EE1FF0EE07FCEE01FF93
+38007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1FF0EF7FC0933801FF00EE07FCEE1FF0EE7F
+C04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC07FCEC1FF0EC7FC04948C9FCEB07FCEB1F
+F0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CBFC12FC1270363678B147>I<17075F8417
+1FA2173F177FA217FFA25E5EA24C6C7EA2EE0E3F161E161C1638A21670A216E0ED01C084
+ED0380171FED07005D150E5DA25D157815705D844A5A170F4A5A4AC7FC92B6FC5CA2021C
+C7120F143C14384A81A24A140713015C495AA249C8FC5B130E131E4982137C13FED807FF
+ED1FFEB500F00107B512FCA219F83E417DC044>65 D<49B712F818FF19E090260001FEC7
+EA3FF0F007F84B6E7E727E850203815D1A80A20207167F4B15FFA3020F17004B5C611803
+021F5E4B4A5A180FF01FE0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18
+E092C7EA07F84AEC01FE4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA2
+61010F167F4A5E18FF4D90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F0207
+90C8FCB812FC17F094C9FC413E7DBD45>I<49B712F818FF19C0D9000190C7EA3FF0F00F
+F84BEC03FCF000FE197F0203EE3F805DF11FC0A20207EE0FE05D1AF0A2020F16075DA21A
+F8141F5DA2190F143F5DA21AF0147F4B151FA302FF17E092C9123FA21AC049177F5C1A80
+19FF010318005C4E5A61010716034A5E4E5A180F010F4C5A4A5E4E5A4EC7FC011F16FE4A
+4A5AEF07F8013FED0FE0EF3FC04A49B4C8FC017FEC0FFCB812F017C004FCC9FC453E7DBD
+4B>68 D<49B912C0A3D9000190C71201F0003F4B151F190F1A80020316075DA314075D1A
+00A2140F4B1307A24D5B021F020E130E4B92C7FC171EA2023F5C5D177CEE01FC4AB55AA3
+ED800302FF6D5A92C7FCA3495D5C19380401147801034B13704A16F093C85AA201071601
+4A5E180361010F16074A4BC7FCA260011F163E4A157E60013F15014D5A4A140F017F15FF
+B95AA260423E7DBD43>I<49B9FCA3D9000190C7120718004B157F193F191E14035DA314
+075D191CA2140F5D17074D133C021F020E13384B1500A2171E023F141C4B133C177C17FC
+027FEB03F892B5FCA39139FF8003F0ED00011600A2495D5CA2160101035D5CA293C9FC13
+075CA3130F5CA3131F5CA2133FA25C497EB612F8A3403E7DBD3A>I<DC3FF0130E923803
+FFFE031F9038FF801C923A7FF00FC03C913B01FF0001E07CDA07FC903800F0FCDA0FF0EC
+79F8DA3FC0143F4A48141F4AC8120FD903FC16F0495A49481507495A013F17E04A150349
+5A49C9FC4818C05B1203485A1980485AA2485A95C7FC123F5BA2127F5BA312FF5BA3043F
+B512E0A290C8FC9339001FF800170F60A2171F60A36C6C153F60A26C7E177F001F5F7F6C
+6C15FF00075D6C6C4A90C7FC6C6CEC07BF6CB4EC1F1FD97FC0EB7E0F903A1FF803F80E01
+07B5EAE00601010280C8FC9026001FF8C9FC3F427BBF47>I<49B6D8C03FB512F81BF017
+80D900010180C7383FF00093C85B4B5EA2197F14034B5EA219FF14074B93C7FCA260140F
+4B5DA21803141F4B5DA21807143F4B5DA2180F4AB7FC61A20380C7121F14FF92C85BA218
+3F5B4A5EA2187F13034A5EA218FF13074A93C8FCA25F130F4A5DA21703131F4A5DA2013F
+1507A24A5D496C4A7EB6D8E01FB512FCA2614D3E7DBD4C>I<49B612C05BA2D90001EB80
+0093C7FC5DA314035DA314075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF92C8FCA3
+5B5CA313035CA313075CA3130F5CA3131F5CA2133FA25CEBFFE0B612E0A32A3E7DBD28>
+I<92B612E0A39239003FF000161F5FA2163F5FA3167F5FA316FF94C7FCA35D5EA315035E
+A315075EA3150F5EA3151FA25EA2153FA25EA2157FA25EA2D80F8013FFEA3FC0486C91C8
+FCA25CD8FFC05B140301805B49485A00FC5C0070495A0078495A0038495A001E017EC9FC
+380F81FC3803FFE0C690CAFC33407ABD32>I<49B612F0A3D900010180C7FC93C8FC5DA3
+14035DA314075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF92C9FCA35B5C180C181E
+0103161C5C183C183813074A1578187018F0130F4AEC01E0A21703011FED07C04A140F17
+1F013FED3F8017FF4A1303017F021F1300B9FCA25F373E7DBD3E>76
+D<49B56C49B512F81BF0A290C76D9039000FFE004AEE03F0705D735A03DF150302037F03
+8F5E82190791380787FC030793C7FC1503705C140F91260E01FF140EA26F151E021E8002
+1C017F141C83193C023C6D7E02381638161F711378147802706D6C1370A2040714F002F0
+804A01035C8318010101EC01FF4A5E82188313034A91387FC380A2EF3FC7010716E791C8
+001F90C8FC18F718FF4981010E5E1707A2131E011C6F5AA2013C1501137C01FE6F5AEA03
+FFB512FC187818704D3E7DBD49>78 D<49B712F018FF19C0D9000190C76C7EF00FF84BEC
+03FC1801020382727E5DA214071A805DA2140F4E13005DA2021F5E18034B5D1807023F5E
+4E5A4B4A5A4E5A027F4B5A06FEC7FC4BEB03FCEF3FF091B712C005FCC8FC92CBFCA25BA2
+5CA21303A25CA21307A25CA2130FA25CA2131FA25CA2133FA25C497EB612E0A3413E7DBD
+3A>80 D<EE3FF00303B5FC92391FC03FC092397E0007E0DA01F8EB01F8DA07E06D7E4A48
+147EDA3F8080027EC813804AED1FC0EB03F84948ED0FE0130F494816F04A1507494816F8
+137F49C9FC485AA2484817FCA2485A120FA2485AA25B123F19F84848160FA44848EE1FF0
+A3F03FE0A290CAFCF07FC0A2198018FF19004D5AA24D5A606C16074D5A6D01F85C003FD9
+03FE495ADA0F07495A271FC01C0349C7FC9139380180FE260FE030EB81FCEEC3F82607F0
+70EBC7E03B03F86000CFC0D801FCECFF80D800FE4AC8FC90393FF003F890270FF81FE013
+0C0103B5FC9026007FF1141CDA00011418183882607013F017039338FC0FE093B5FC6060
+A26F91C7FC5F705AEE3FF0EE0FC03E527BBF48>I<49B77E18F818FFD90001D900017F94
+38003FE04BEC0FF0727E727E14034B6E7EA30207825DA3020F4B5A5DA24E5A141F4B4A5A
+614E5A023F4B5A4B4A5A06FEC7FCEF03FC027FEC0FF04BEBFF8092B500FCC8FC5F9139FF
+8001FE92C7EA7F80EF1FC084496F7E4A1407A28413035CA2170F13075C60171F130F5CA3
+011F033F5B4AEE038018E0013F17071A004A021F5B496C160EB600E090380FF01E05075B
+716C5ACBEAFFE0F03F8041407DBD45>I<007FB500F090387FFFFE19FC5D26007FE0C700
+0313804A913800FC004A5D187001FF16F0A291C95AA2481601605BA200031603605BA200
+07160795C7FC5BA2000F5E170E5BA2001F161E171C5BA2003F163C17385BA2007F1678A2
+491570A200FF16F0A290C95AA216015F5A16035F16074CC8FC160E161E5E007F5D5E6C4A
+5A6D495A6C6C495A6C6C011FC9FC6C6C137E3903FC03F8C6B512E0013F1380D907FCCAFC
+3F407ABD3E>85 D<027FB5D88007B512C091B6FCA2020101F8C7EBF8009126007FE0EC7F
+804C92C7FC033F157C701478616F6C495A4E5A6F6C495A4EC8FC180E6F6C5B606F6C5B60
+17016F6C485A4D5A6F018FC9FC179E17BCEE7FF85F705AA3707EA283163F167FEEF7FCED
+01E7EEC3FEED0383ED070392380E01FF151E4B6C7F5D5D4A486D7E4A5A4A486D7E92C7FC
+140E4A6E7E5C4A6E7E14F0495A49486E7E1307D91F806E7ED97FC014072603FFE0EC1FFF
+007F01FC49B512FEB55CA24A3E7EBD4B>88 D<EC1F80ECFFE0903903F0707090390FC039
+F890381F801D90383F000F017E5C5B00011407485A48485CA2485A001F140F5E485AA215
+1F007F5D5BA2153F00FF92C7FC90C7FCA25D92387E03805AA215FEEDFC07007E01011400
+14035E6C0107130E140E3A1F801C7C1C000F13783A07C1F03E383A01FFC01FF03A007F00
+07C029297DA730>97 D<EB1FC0EA0FFF5CA2EA003FA291C8FCA25BA2137EA213FEA25BA2
+1201A25BA21203A25BEC3F800007EBFFE09038F3C1F849C67E01FE137E4848133E49133F
+5B491480001F141F5B5BED3FC0123FA290C7FCA248147F1680127EA215FF00FE15005AA2
+4A5AA25D1403485C1407007C5C4A5A5D003C495A003E49C7FC001E137E6C13F8380783F0
+3803FFC0C648C8FC22407CBE27>I<EC07F0EC7FFE903801FC0F903907E0038090390FC0
+01C0D93F8013E090387F000701FE131F485A485A16C0485A000F15804990C7FC121F485A
+A3127F5BA312FF90C9FCA6007E1560007F15E01501ED03C06CEC07806DEB0F00001F141E
+6C6C137C3907E001F03901F01FC06CB5C7FCEB1FF023297DA727>I<EE07F0ED03FF17E0
+A2ED000FA217C0A2161FA21780A2163FA21700A25EA2167EA216FEA25EEC1F80ECFFE190
+3803F07190390FC039F890381F801D90383F000F137E495C00011407485A485A5E485A00
+1F140FA248485CA2151F127F495CA2153F12FF90C790C7FCA25DEE038048147EA215FE16
+07007ED901FC130014035E6C0107130E140E3A1F801C7C1C000F13783A07C1F03E383A01
+FFC01FF03A007F0007C02C407DBE2F>I<EC1FE0ECFFFC903803F01E90380FC00F90393F
+800780D97E0013C0491303EA03F8120749130748481480121F49130F003FEC1F00153E39
+7F8001FCEC1FF090B51280B500F8C7FC90C9FCA45AA616C01501007E1403ED07806CEC0F
+00151E6C5C6C6C13F83907C003E03903E03F802600FFFEC7FCEB3FE022297CA72A>I<16
+3EEEFFC0923803E1E0923807C0F0ED0F811687ED1F8F160F153FA217E092387E038093C7
+FCA45DA514015DA30103B512FCA390260003F0C7FCA314075DA4140F5DA5141F5DA4143F
+92C8FCA45C147EA414FE5CA413015CA4495AA35CEA1E07127F5C12FF495AA200FE90C9FC
+EAF81EEA703EEA7878EA1FF0EA07C02C537CBF2D>I<EB01FC13FF5CA21303A25CA21307
+A25CA2130FA25CA2131FA25CA2133FA291C9FC15FE90397F07FFC091381F03E090397E38
+01F09138F000F8EBFFE04A7F5C91C7FC485AA25BA2484813015E5BA2000714035E5B1507
+120F5E49130F5E121F031F1370491480A2003F023F13F0EE00E090C7FC160148023E13C0
+1603007E1680EE070000FE5DED1F1E48EC0FF80038EC03E02C407CBE34>104
+D<143C14FEA21301A314FCEB00701400AD137E3801FF803803C7C0EA0703000F13E0120E
+121C13071238A2EA780F007013C0A2EAF01F14801200133F14005B137EA213FE5BA21201
+5B0003130E13F0A20007131EEBE01CA2143CEBC0381478147014E013C13803E3C03801FF
+00EA007C173E7EBC1F>I<ED01C0ED07F0A2150FA316E0ED038092C7FCADEC03E0EC0FF8
+EC3C3EEC701EECE01FEB01C001031480EB0780140049133F010E1400131E131C013C5BA2
+90C7127EA215FEA25DA21401A25DA21403A25DA21407A25DA2140FA25DA2141FA25DA214
+3FA292C7FCA25C147EA2001C13FE007F5BEAFF015C495A495A48485A38F81F80D8783EC8
+FCEA3FF8EA0FE0245081BC25>I<EB01FC13FF5CA21303A25CA21307A25CA2130FA25CA2
+131FA25CA2133FA291C9FC16FC49EB03FE92380F0780017EEB3C0FED703F01FE13E09138
+01C07F9038FC0380EC07000001010E14004A131C494890C7FC5C00035BEBF9C0495A01FF
+C9FC5A14F0EBE3FE9038E07F80000FEB1FC06E7EEBC00781001F1303160E1380A2003F15
+1E0207131C010013E0A2485DA2007E01031378167000FE01015B15F1489038007F800038
+023EC7FC29407CBE2F>I<EB07F0EA03FF14E0A2EA000FA214C0A2131FA21480A2133FA2
+1400A25BA2137EA213FEA25BA21201A25BA21203A25BA21207A25BA2120FA25BA2121FA2
+5BA2123FA290C7FCA25AEB0380127EA212FE130700FC1300A25B130EA2EA7C1C133CEA3E
+38EA1FF0EA07C014407DBE1B>I<01F8D907F0EB07F8D803FED93FFEEB1FFE28078F80F8
+1FEB781F3E0F0F81C00F81E00F803E0E07C78007C3C007C0001CD9CF00EBC78002FEDAEF
+007F003C4914FE0038495C49485C12780070495CA200F0494948130F011F600000495CA2
+041F141F013F6091C75B193F043F92C7FC5B017E92C75A197E5E01FE9438FE01C049027E
+14FCA204FE01011303000106F81380495CF20700030115F00003190E494A151E1A1C0303
+5E0007943800F8F0494AEC7FE0D801C0D900E0EC1F804A297EA750>I<01F8EB0FF0D803
+FEEB3FFC3A078F80F03E3A0F0F83C01F3B0E07C7800F80001CEBCF0002FE80003C5B0038
+5B495A127800705BA200F049131F011F5D00005BA2163F013F92C7FC91C7FC5E167E5B01
+7E14FE5EA201FE0101EB03804914F8A203031307000103F013005B170E16E000035E4915
+3C17385F0007913801F1E0496DB45AD801C0023FC7FC31297EA737>I<EC07F8EC7FFE90
+3901FC0F80903907E007E090390FC003F090393F8001F8EB7F0001FEEB00FC485A484814
+FEA2485A120F5B001F15FF485AA2ED01FE127F5BA2150300FF15FC90C7FCA2ED07F8A2ED
+0FF0A2007E15E0007FEC1FC0ED3F80A26CEC7F006C6C13FC4A5A6C6C485A3907E00FC026
+01F03FC7FC3800FFFCEB1FE028297DA72C>I<D907C013FE903A0FF003FF80903A1C7C0F
+07E0903A383C1C03F0903A783E7801F80170EBF0009026F03FE013FC01E05B4B13FE0001
+017F147E01C090C7FC147E17FF000313FEA2C75AA201015C17FE5CA20103140317FC5CA2
+0107EC07F8A24A14F0160F010F15E0161F17C0EE3F80011F15006E137E5E9138B801F890
+393FBC03E091389E0FC0DA07FFC7FCEC01F849C9FCA2137EA213FEA25BA21201A25BA212
+03A2B512E0A3303A84A72E>I<D801F0EB3F80D807FCEBFFE03A0F1F03C0F0000E90380F
+00F8391E0F9E03001C13BC003CEBF807003813F0A226781FE013F000709038C001C092C7
+FC5C12F0133F000090C8FCA35B137EA313FE5BA312015BA312035BA312075BA3120F5BEA
+038025297EA729>114 D<EC1FC0ECFFF8903803E03C903807800E90381E000716804913
+0F49131F153FA201F81400A2151C6D90C7FC7FEBFFE014FE90387FFFC06D7F6D13F86D7F
+13039038001FFE14031400157E000C143E123F487EA248C7123CA25D12FC00F05C007049
+5A0078495A6C495A260F803EC7FC3803FFF838007FC021297CA72B>I<147014FC1301A2
+5CA21303A25CA21307A25CA2130FA25CA2007FB512F0B6FC15E039001F8000133FA291C7
+FCA25BA2137EA213FEA25BA21201A25BA21203A25BA21207EC01C013E01403000F1480A2
+EBC0071500140E141E5C000713385C3803E1E03801FF80D8003EC7FC1C3A7EB821>I<13
+7C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F121C010715801238163FEA780F
+0070491400A2D8F01F5C5C0000157E133F91C712FEA2495C137E150113FE495CA2150300
+01161C4914F0A21507173CEEE038150F031F1378000016706D133F017C017313F0017E01
+E313E0903A3F03C1F1C0903A0FFF007F80D901FCEB1F002E297EA734>I<017E147848B4
+EB01FC2603C7C013FED807031303000F13E0120E121C0107130100381400167ED8780F14
+3E00705B161EEAF01F4A131C1200133F91C7123C16385B137E167801FE14705B16F016E0
+120149EB01C0A2ED0380A2ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807
+FF80D901FCC7FC27297EA72C>I<013EEE0380D9FF800107EB0FE02601C3E090381F801F
+D8038117F0380701F0000E153F001E1600D81C03160F003C170700384BEB03E0D8780714
+7E00705B1801D8F00F14FE4A4914C01200131FDA800114034C1480133F14000303140749
+4A1400137EA26001FE0107140E495C60A360150F017C5E017E011F14F0705B6D0139495A
+6D903970F8038090280FC0E07C0FC7FC903A03FFC01FFC903A007F0007F03C297EA741>
+I<D901F8133FD907FEEBFFE0903A1E0F83C0F0903A3807C780F890397003CF0301E013FE
+D801C0EBFC071203018013F8D8070015F0EE01C0000E4AC7FCA2001E1307A2C75BA2140F
+5DA3141F5DA3143F92380001C0A34A1303001E1680003F017E1307267F80FE14005ED8FF
+81141ED901DF131CD8FE035C3A7C078F80F03A3C0F07C1E03A1FFC03FF802707F0007EC7
+FC2D297EA734>I<02F8130ED903FE131ED90FFF131C49EB803C49EBC0784914F090397E
+07F1E09038F800FF49EB1FC049EB07800001EC0F006C48131E90C75A5D5D4A5A4A5A4A5A
+4AC7FC143E14785C495A495A495A49C8FC011E14E05B5B4913014848EB03C0485AD807F8
+EB078048B4131F3A1F87E07F00391E03FFFE486C5B00785CD870005B00F0EB7FC048011F
+C7FC27297DA72A>122 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fw cmr10 10.95 88
+/Fw 88 125 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907
+F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7
+FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11
+D<EC03FE91383FFF809138FE03E0903903F800F0D90FE013384948137C90393F8001FE90
+387F00035B5BA2485A6F5AED007093C7FCAA16FEB7FCA33901FC000315011500B3AC486C
+497EB5D8F87F13FCA32E407EBF33>I<EC03FF023F13EE9138FE01FEEB03F090380FE003
+EB1FC0EB3F80EB7F005B5B150148481300AEB7FCA3D801FCC7FCB3AE486C497EB5D8F87F
+13FCA32E407EBF33>I<DA03FE49B4FC91273FFF801F13C0913BFE03E07F01F0903C03F0
+00F1FC0078D90FE0D97FF0131C49484948133E4948484913FF494848495A5B491500A248
+485C03016E5A0300153896C7FCAA197FBBFCA3D801FCC738FE00018485B3AC486C496CEC
+FF80B5D8F87FD9FC3F13FEA347407EBF4C>I<001E130F397F803FC000FF137F01C013E0
+A201E013F0A3007F133F391E600F3000001300A401E01370491360A3000114E04913C000
+03130101001380481303000EEB070048130E0018130C0038131C003013181C1C7DBE2D>
+34 D<013F1603D9FFC04B7E2601E0E0150F2607C070151F48486C4BC7FC023E157E4848
+6C15FE48D90FC0EB03FC003ED90EF0EB0FF8DA0F3F13FD007E903A070FFFF1F0007C0200
+EB03E0160000FC6D6C495A170F604DC8FC5F173E5F17FC5F4C5A1603007CD907005B4C5A
+007E150F003E495C020E49C9FC003F5D6C49133E260F803C5B023813FC6C6C485B3A01E0
+E001F03800FFC090273F0003E0133F90C70007ECFFC09339C001E0E0923A0F8007C07003
+1F49487E0400143C033E90381F001C037E497F037C133E4B150F0201027E7F4B137C4A5A
+020702FCEB03805D4A5A141F92C7FC143E147E147C5CA2495A0103037CEB07005C494814
+7E010F033E5B4A160E49C8123F496F5B013E92380F803C49173801FC6F6C5A49923801E0
+E0496FB45A0160043FC7FC41497BC34C>37 D<EC0F80EC7FE0ECF870903803E038010713
+3CECC01CEB0F80011F131E150EA2EB3F00A55D1480A25D157815705D6D6C5A14C1ECC380
+02C7CAFC02EE91387FFFFCEB0FEC14FC4A020713C06D48913801FE006E5DEF00F06D7E01
+074B5A496C5D011D1503D939FF4A5A017093C7FC496D5B0001017F140E496C6C131E0003
+6E131C2607801F143C000F6E5B001F6D6C1370263F000714F0486E485ADA03FE5B913801
+FF03486D495A0487C8FCED7FCFED3FFE6F4814386D5C150F007F6E6C14786D6D6C147000
+3F4A6C14F06D496C6C13E0001F91393E3FC0016C6C903AFC1FF003C03D07FC07F007FC1F
+800001B5D8C001B512006C6C90C7EA7FFCD90FF8EC0FF03E437CC047>I<121EEA7F8012
+FF13C0A213E0A3127FEA1E601200A413E013C0A312011380120313005A120E5A12181238
+12300B1C79BE19>I<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B
+12015B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6
+123E123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB078013
+03EB01C0EB00E014701430145A77C323>I<12C07E12707E7E121E7E6C7E7F12036C7E7F
+12007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307
+A614C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC
+121E121C5A5A5A5A145A7BC323>I<EB03C0A2805CA600F0140F00FC143F00FE147F00FF
+14FF393FC3C3FC390FE187F03903F18FC03900FDBF00EB3FFCEB0FF0EB03C0EB0FF0EB3F
+FCEBFDBF3903F18FC0390FE187F0393FC3C3FC39FF03C0FF00FE147F00FC143F00F0140F
+00001400A6805CA220277AC32D>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000F
+C9FCB3A915063C3C7BB447>I<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E0
+13C0A312011380120313005A120E5A1218123812300B1C798919>I<B512FEA617067F96
+1E>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919>I<ED0180ED03C01507A216
+80150FA216005DA2151E153EA2153C157CA2157815F8A25D1401A25D1403A25D1407A25D
+140FA24AC7FCA2141E143EA2143C147CA2147814F8A25C1301A25C1303A25C1307A25C13
+0FA291C8FC5BA2131E133EA25BA2137813F8A25B1201A25B1203A25B1207A25B120FA290
+C9FC5AA2121E123EA2123C127CA2127812F8A25A1260225B7BC32D>I<EB01FE90380FFF
+C090383F03F090387C00F849137C48487F48487F4848EB0F80A2000F15C04848EB07E0A3
+003F15F0A290C712034815F8A64815FCB3A26C15F8A56C6CEB07F0A3001F15E0A36C6CEB
+0FC0A26C6CEB1F80000315006C6C133E6C6C5B017C5B90383F03F090380FFFC0D901FEC7
+FC263F7DBC2D>I<EB01C013031307131F137FEA07FFB5FC139FEAF81F1200B3B3ACEB7F
+F0B612F8A31D3D78BC2D>I<EB07FC90383FFF8090B512E03903F01FF83907C007FC390F
+0001FE001E6D7E001C1580003CEC7FC05AED3FE01270B4FC6DEB1FF07FA56C5A6CC7FC12
+0CC813E0153FA216C0157F168015FF16004A5A5D4A5A4A5A5D4A5A4A5A4AC7FC147E147C
+5C495A495A495A495A49C71270133E133C5B4914E0485A485A485A48C7120148B6FCA25A
+4815C0B7FCA3243D7CBC2D>I<EB07FC90383FFF809038F80FE03901E003F839078001FC
+D80F007F000E6D7E001E1580D81F80137F486C14C07FA27F5BA2121F6C5AC8138015FF16
+00A24A5AA24A5A5DEC07E04A5A023FC7FCEB1FFCECFF809038000FE0EC07F86E7E6E7E6E
+7E1680ED7FC0A216E0153FA216F0A2120C123F487E487EA316E0A249137F6CC713C01278
+EDFF807E6C4913006C495A3907C007FC3903F80FF0C6B55A013F1380D907F8C7FC243F7C
+BC2D>I<150E151E153EA2157EA215FE1401A21403EC077E1406140E141CA214381470A2
+14E0EB01C0A2EB0380EB0700A2130E5BA25B5BA25B5B1201485A90C7FC5A120E120C121C
+5AA25A5AB8FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<00061403D80780131F01F8
+13FE90B5FC5D5D5D15C092C7FC14FCEB3FE090C9FCACEB01FE90380FFF8090383E03E090
+387001F8496C7E49137E497F90C713800006141FC813C0A216E0150FA316F0A3120C127F
+7F12FFA416E090C7121F12FC007015C012780038EC3F80123C6CEC7F00001F14FE6C6C48
+5A6C6C485A3903F80FE0C6B55A013F90C7FCEB07F8243F7CBC2D>I<EC1FE0ECFFF89038
+03F03E90380FC00F90391F000780133E017EEB1FC049133F4848137F12035B12074848EB
+3F80ED1F00001F91C7FC5BA2123FA3485AA214FE903887FF8039FF8F07E090389C01F090
+38B800FC01B0137E13F0497F16804914C0A2ED1FE0A34914F0A5127FA6123F6D14E0A212
+1FED3FC0A26C6C1480A20007EC7F006C6C137E6C6C5B6C6C485A90387E07F06DB45A010F
+1380D903FCC7FC243F7CBC2D>I<1238123C123F90B612FCA316F85A16F016E00078C712
+010070EC03C0ED078016005D48141E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C
+141EA25CA2147C147814F8A213015C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8
+FC26407BBD2D>I<EB03FC90381FFF8090387C07E09038F001F83901E0007C48487F4848
+7F48C7FCED0F80121E16C0003E1407A4123FA26DEB0F807F6C6C131F6D140001FC133E6C
+6C5B9038FF80786C6D5A6CEBF3E06CEBFF806C91C7FC133F6D13C06D7F013F13F801787F
+48486C7E3903E01FFF48486C1380260F800313C048487E489038007FE0003E143F007E14
+1F007CEC0FF01507481403A31501A46C15E0007C1403A2007E15C06C14076CEC0F806DEB
+1F006C6C133ED807F05B3901FC03F86CB512E0011F1380D903FCC7FC243F7CBC2D>I<EB
+03FCEB1FFF90387E07C09038FC03F048486C7E48486C7E4848137C000F147E4848137F81
+003F15805B007F15C0A2151F12FF16E0A516F0A5127F153FA36C7EA2001F147F120F6C6C
+13FF6D13DF000313013900F8039F90387E0F1FD91FFE13E0EB07F090C7FCA2ED3FC0A416
+80157FD80F801400487E486C13FEA24A5A5D49485AEB8007391E000FE0001F495A260FC0
+7FC7FC3803FFFE6C13F838003FC0243F7CBC2D>I<121EEA7F80A2EAFFC0A4EA7F80A2EA
+1E00C7FCB3121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619>I<121EEA7F80A2EA
+FFC0A4EA7F80A2EA1E00C7FCB3121E127FEAFF80A213C0A4127F121E1200A412011380A3
+120313005A1206120E120C121C5A1230A20A3979A619>I<007FB912E0BA12F0A26C18E0
+CDFCAE007FB912E0BA12F0A26C18E03C167BA147>61 D<ED7FE0913807FFFE91391F801F
+809139780001E0D901E0EB0078D90780141E49C87E011E6F7E0138ED01C0496F7E491670
+0001177848488249D93F80131C28070001FFF07F48902607E07C130F000E90260FC01E7F
+001E90263F00071480001C499038038003003C01FED901C013C0003849ECFE010101EC00
+FF267803F8027F13E000701700495AA200F018F000E01870495AA96D7E12F01270A26D7E
+007818E0263801FC5C01005C003C7F001C017F49EB01C0001E6DEB077F000E903B0FC01E
+3F8380000F903B07E07C1F87006C903A01FFF007FE3C0380003F8001F86D90CAFC6C7E12
+0013707F011EEE03F06D160F6D6CED3FC0D901E0913801FE00D90078EC1FF0913A1F8003
+FF800207B500F8C7FC9126007FFEC8FC3C417BBF47>64 D<15074B7EA34B7EA34B7EA34B
+7EA34B7E15E7A2913801C7FC15C3A291380381FEA34AC67EA3020E6D7EA34A6D7EA34A6D
+7EA34A6D7EA34A6D7EA349486D7E91B6FCA249819138800001A249C87EA24982010E157F
+A2011E82011C153FA2013C820138151FA2017882170F13FC00034C7ED80FFF4B7EB500F0
+010FB512F8A33D417DC044>I<B712FCEEFF8017F00001903980000FF86C6CC7EA03FE70
+7E701380EF7FC0EF3FE0A2EF1FF0A218F8A3170F171FA318F0A2EF3FE0177F18C0EFFF80
+4C1300EE03FCEE0FF8EE7FE091B6C7FC17E091C7EA07FCEE01FE933800FF80EF7FC0EF3F
+E0EF1FF018F8170F18FC1707A218FEA718FC170FA2EF1FF818F0173FEF7FE0EFFFC00403
+138048486C90380FFE00B85A17E094C7FC373E7DBD40>I<DB3FF01306912603FFFE130E
+020F9038FF801E913A3FF007E03E9139FF8000F8D903FEC7EA7C7ED907F8EC1EFE494814
+0FD93FE0140749481403495A91C812014848150012034848167E5B000F173EA24848161E
+A2123F5B180E127FA349160012FFAC127F7F180EA2123FA27F001F171E181C6C7EA20007
+173C6D16386C6C1678000117706C6C16F06EEC01E06D6C15C06D6C1403D90FF0EC07806D
+6CEC1F00D903FE143E902600FF8013F891393FF007F0020FB512C0020391C7FC9138003F
+F037427BBF42>I<B712FCEEFF8017E000019039C0001FF86C6C48EB03FEEE00FF717E71
+7EEF0FE084717E717E170184717EA21980187F19C0A3F03FE0A519F0AB19E0A5F07FC0A2
+1980A218FF19004D5AA24D5A6017074D5A4D5AEF7FC04DC7FCEE03FE48486CEB1FF8B85A
+178004FCC8FC3C3E7DBD45>I<B912E0A300019038C000016C6C48EB001FEF0FF01703A2
+17011700A31870A418381638A41800A21678A216F81501150791B5FCA3EC800715011500
+1678A21638A2180EA3181C93C7FCA4183C1838A21878A318F8EF01F0A21707170F173F48
+486CEB03FFB912E0A3373E7DBD3E>I<B91280A300019038C000036C6C48EB007FEF1FC0
+170F1707A21703A31701A4EF00E0A21638A31800A31678A216F81501150791B5FCA3EC80
+07150115001678A21638A693C8FCAF3801FFE0B612F0A3333E7DBD3B>I<DB3FE0130C91
+2603FFFE131C021F9038FF803C913A7FF00FC07C9139FF0001F0D903FC90380078FC4948
+143DD91FE0141F4948140F4948140701FF15034890C8FC491501485A000716005B000F17
+7C5B001F173CA2485AA2181C127FA25B95C7FC12FFAB041FB512F0127FA26D9139000FFE
+00EF03FC123FA27F121FA26C7EA212077F12036C7E7F6C7F6D6C14076D7E6D6C140FD907
+F8141ED903FEEC3C7C902600FF80EBF83C913A7FF007F01C021FB5EAC00C020391C8FC91
+38003FF03C427BBF47>I<B6D8C01FB512F8A3000101E0C7383FFC0026007F80EC0FF0B3
+A691B7FCA30280C7120FB3A92601FFE0EC3FFCB6D8C01FB512F8A33D3E7DBD44>I<B612
+F0A3C6EBF000EB3FC0B3B3B2EBFFF0B612F0A31C3E7EBD21>I<011FB512FCA3D9000713
+006E5A1401B3B3A6123FEA7F80EAFFC0A44A5A1380D87F005B007C130700385C003C495A
+6C495A6C495A2603E07EC7FC3800FFF8EB3FC026407CBD2F>I<B600C090387FFFFCA300
+0101E0C7000F138026007F80913807FE0018F818E0604D5A4DC7FC173E5F5F4C5A4C5A4C
+5A4C5A4CC8FC163E5E5E4B5A4B5AED07804B7E151F4B7E4B7E15FF913881EFF8913883C7
+FCEC878791388F03FE91389E01FF14BCDAF8007F4A6D7E5C4A6D7E4A6D7EA2707E707EA2
+707E707EA2707F717E84173F717E717EA2717E848419802601FFE04A13C0B600C090B6FC
+A3403E7DBD47>I<B612F8A3000101E0C9FC38007F80B3B0EF0380A517071800A45FA35F
+A25F5F5F4C5A160748486C133FB8FCA3313E7DBD39>I<B500C093B512C0A300016D4BEB
+E000D8007F1880D977F0ED03BFA3D973F8ED073FA3D971FC150EA2D970FE151CA3027F15
+38A36E6C1470A36E6C14E0A26E6CEB01C0A36E6CEB0380A36E6CEB0700A26E6C130EA36E
+6C5BA3037F5BA26F6C5AA36F6C5AA392380FE1C0A3923807F380A26FB4C7FCA36F5AA213
+F8486C6D5AD807FFEFFFE0B500F80178017FEBFFC0A34A3E7CBD53>I<B56C91B512F880
+80D8007F030713006EEC01FC6E6E5A1870EB77FCEB73FEA2EB71FF01707FA26E7E6E7EA2
+6E7E6E7EA26E7E6E7EA26E7E6E7FA26F7E6F7EA26F7E6F7EA26F7E6F7EA26F7E6F1380A2
+EE7FC0EE3FE0A2EE1FF0EE0FF8A2EE07FCEE03FEA2EE01FF7013F0A2177F173FA2171F17
+0FA2170701F81503487ED807FF1501B500F81400A218703D3E7DBD44>I<ED7FE0913807
+FFFE91391FC03F8091397E0007E04948EB03F8D907F0EB00FE4948147F49486E7E49486E
+7E49C86C7E01FE6F7E00018349150300038348486F7EA248486F7EA2001F188049167F00
+3F18C0A3007F18E049163FA300FF18F0AC007F18E06D167FA4003F18C0A26C6CEEFF80A3
+6C6C4B1300A26C6C4B5A00035F6D150700015F6C6C4B5A6D5E6D6C4A5A6D6C4A5A6D6C4A
+C7FC6D6C14FED901FCEB03F8D9007FEB0FE091391FC03F80912607FFFEC8FC9138007FE0
+3C427BBF47>I<B712F8EEFF8017E000019039C0003FF86C6C48EB07FCEE01FE707EEF7F
+80EF3FC018E0A2EF1FF0A218F8A818F0A2EF3FE0A218C0EF7F80EFFF004C5AEE07FCEE3F
+F091B612C04CC7FC0280C9FCB3A73801FFE0B612C0A3353E7DBD3E>I<ED7FE0913807FF
+FE91391FC03F8091397F000FE0D901FCEB03F8D907F0EB00FE4948147F49486E7E49486E
+7E49C86C7E498248486F7E49150300038348486F7EA2000F834981001F1880A24848EE7F
+C0A3007F18E0A249163FA200FF18F0AC007F18E0A26D167FA3003F18C0A26C6CEEFF80A3
+000F18006D5D0007DA0F805B6C6C90393FE003FCED70706C6C496C485A6C6C48486C485A
+017FD9800E5BD93F819038061FC0D91FC19038073F80D90FE14AC7FCD907F1EB03FE9026
+01FDC013F8903A007EE007E091271FF03FC013180207B5FC9139007FE1E0DB0001143883
+711378A2706C13F0EFFF0318FFA27113E0A37113C0711380711300715AEF01F83D527BBF
+47>I<B712C016FCEEFF800001D9C00013E06C6C48EB1FF0EE07FCEE01FE707E84717EA2
+717EA284A760177F606017FF95C7FCEE01FCEE07F8EE1FE0EEFF8091B500FCC8FC16F091
+388001FCED003FEE1FC0707E707E83160383160183A383A484A4F0C004190EA28218E005
+7F131E2601FFE0161CB600C0EB3FF094381FF83805071370CA3801FFE09438003F803F40
+7DBD43>I<D907FC131890391FFF8038017FEBE0783901FC03F83A03F0007CF8D807C013
+3F4848130F001F140748C7FC003E1403007E1401A2007C140012FC1678A46C1538A27EA2
+6C6C14007F7FEA3FF8EBFF806C13F86CEBFF806C14F06C14FC6C14FF6C15C0013F14E001
+0714F0EB007F020713F89138007FFC150FED07FE15031501ED00FFA200E0157FA3163FA2
+7EA3163E7E167E6C157C6C15FC6C15F86D13016DEB03F06DEB07E0D8F9FCEB0FC03AF07F
+803F8090391FFFFE00D8E00713F839C0007FC028427BBF33>I<003FB91280A3903AF000
+7FE001018090393FC0003F48C7ED1FC0007E1707127C00781703A300701701A548EF00E0
+A5C81600B3B14B7E4B7E0107B612FEA33B3D7DBC42>I<B600C090B512F8A3000101E0C7
+0007130026007F80EC01FC715A1870B3B3A4013F16F06E5DA21701011F5E80010F15036E
+4A5A010793C7FC6D6C5C6D6C141E6D6C5C027F14F86E6C485A91390FF00FE00203B51280
+020049C8FCED1FF03D407DBD44>I<B691380FFFFEA3000301E0020113E06C0180913800
+7F806CEF3F00017F163E181C6E153C013F1638A26E1578011F1670A26D6C5DA26E140101
+075EA26E140301035EA26D6C4AC7FCA2806D150EA26F131E027F141CA26F133C023F1438
+A26E6C5BA26F13F0020F5CA2EDF80102075CA26E6C485AA2EDFE07020191C8FCA26F5A6E
+130EA2ED7F9CA216DCED3FF8A36F5AA36F5AA26F5AA36F5A3F407EBD44>I<B500FE017F
+B5D88007B5FCA3000301C0010101E0C713F86C90C849EC3FE07148EC0F807E7215006E14
+3F017F190E84A26D6C60A24D7E6D6C60A2EFE7F86D6C60A2933801C3FC6E18F001076104
+037F6E0281140101036104077F17006D6C4D5AA2040EEB7F806D6C4DC7FCA24CEB3FC0DA
+7F80160EA24CEB1FE003C0161E023F171C047814F0DBE070010F133C021F173804F014F8
+4C1307DA0FF05EA2DBF1C0EB03FCDA07F95EA2DBFB80EB01FEDA03FF6F5AA293C8FCA26E
+5FA24B157F020094C8FCA24B81037C153EA20378151E0338151C58407EBD5D>I<007FB5
+D8C003B512E0A3C649C7EBFC00D93FF8EC3FE06D48EC1F806D6C92C7FC171E6D6C141C6D
+6C143C5F6D6C14706D6D13F04C5ADA7FC05B023F13036F485ADA1FF090C8FC020F5BEDF8
+1E913807FC1C163C6E6C5A913801FF7016F06E5B6F5AA26F7E6F7EA28282153FED3BFEED
+71FF15F103E07F913801C07F0203804B6C7EEC07004A6D7E020E6D7E5C023C6D7E02386D
+7E14784A6D7E4A6D7F130149486E7E4A6E7E130749C86C7E496F7E497ED9FFC04A7E0007
+6DEC7FFFB500FC0103B512FEA33F3E7EBD44>I<B66C0103B51280A3000101F0C8EBF800
+6C6C48ED3FC0725A013F041EC7FC6D7E606D6C15386D6C1578606D6C5D6E14016D5E6D6D
+1303606E6C49C8FC6E6C5B170E6E6C131E171C6E6C5B6E6C137817706E6C13F06F5B6E13
+016EEB83C05FED7FC7DB3FE7C9FC16EFED1FFE5E150F6F5AB3A4ED1FFC020FB512FCA341
+3E7FBD44>I<003FB712F8A391C7EA1FF013F801E0EC3FE00180EC7FC090C8FC003EEDFF
+80A2003C4A1300007C4A5A12784B5A4B5AA200704A5AA24B5A4B5AA2C8485A4A90C7FCA2
+4A5A4A5AA24A5AA24A5A4A5AA24A5A4A5AA24990C8FCA2495A4948141CA2495A495AA249
+5A495A173C495AA24890C8FC485A1778485A484815F8A24848140116034848140F484814
+3FED01FFB8FCA32E3E7BBD38>I<EAFFFCA4EAF000B3B3B3B3ABEAFFFCA40E5B77C319>I<
+486C13C00003130101001380481303000EEB070048130E0018130C0038131C0030131800
+70133800601330A300E01370481360A400CFEB678039FFC07FE001E013F0A3007F133FA2
+003F131F01C013E0390F0007801C1C73BE2D>I<EAFFFCA4EA003CB3B3B3B3ABEAFFFCA4
+0E5B7FC319>I<1318133C137E13FF3801E7803803C3C0380781E0380F00F0001E137848
+133C48131E48130F00601306180D76BD2D>I<EB0FF8EBFFFE3903F01F8039078007E000
+0F6D7E9038E001F8D81FF07F6E7EA3157F6C5AEA0380C8FCA4EC1FFF0103B5FC90381FF8
+7FEB7F803801FC00EA07F8EA0FE0485A485AA248C7FCEE038012FEA315FFA3007F5BEC03
+BF3B3F80071F8700261FC00E13CF3A07F03C0FFE3A01FFF807FC3A003FC001F0292A7DA8
+2D>97 D<EA01FC12FFA3120712031201B1EC03FC91381FFF8091387C07E09039FDE001F0
+9039FFC000FC4A137E91C77E49158049141F17C0EE0FE0A217F0A2160717F8AA17F0A216
+0FA217E0161F17C06D1580EE3F006D5C6E13FE9039F3C001F89039F1E003F09039E0780F
+C09026C03FFFC7FCC7EA07F82D407EBE33>I<49B4FC010F13E090383F00F8017C131E48
+48131F4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB
+6C7EA3003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890
+383F01F090380FFFC0D901FEC7FC222A7DA828>I<ED01FC15FFA3150715031501B114FF
+010713E190381F80F990387E003D49131FD803F81307485A49130348481301121F123F5B
+127FA290C7FCA25AAA7E7FA2123FA26C7E000F14037F000714076C6C497E6C6C497ED800
+7C017913F890383F01F190380FFFC1903A01FE01FC002D407DBE33>I<EB01FE90380FFF
+C090383F03F09038FC01F848486C7E4848137E48487F000F158049131F001F15C0484813
+0FA2127F16E090C7FCA25AA290B6FCA290C9FCA67EA27F123F16E06C7E1501000F15C06C
+6C13036DEB07806C6C1400C66C131E017E5B90381F80F8903807FFE0010090C7FC232A7E
+A828>I<EC1FC0EC7FF8903801F83C903807E07E90380FC0FFEB1FC1EB3F811401137FEC
+00FE01FE137C1500AEB6FCA3C648C7FCB3AE487E007F13FFA320407EBF1C>I<167C9039
+03F801FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F
+6EC7FC49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC0
+26071FFFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C8100
+03813A0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D
+6C6C495A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D>
+I<EA01FC12FFA3120712031201B1EC01FE913807FFC091381E07E091387803F09138E001
+F8D9FDC07F148001FF6D7E91C7FCA25BA25BB3A6486C497EB5D8F87F13FCA32E3F7DBE33
+>I<EA01E0EA07F8A2487EA46C5AA2EA01E0C8FCACEA01FC127FA3120712031201B3AC48
+7EB512F0A3143E7DBD1A>I<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7F
+FFA313017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07
+C0380FFF803801FC00185185BD1C>I<EA01FC12FFA3120712031201B292B51280A39238
+3FFC0016E0168093C7FC153C5D5D4A5AEC07C04A5A4AC8FC143E147F4A7E13FD9038FFDF
+C0EC9FE0140F496C7E01FC7F496C7E1401816E7E81826F7E151F826F7EA282486C14FEB5
+39F07FFFE0A32B3F7EBE30>I<EA01FC12FFA3120712031201B3B3B1487EB512F8A3153F
+7DBE1A>I<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C
+01F80007903BE001F87000FC2603F9C06D487F000101805C01FBD900FF147F91C75B13FF
+4992C7FCA2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F8
+01FE00FF903807FFC091381E07E091387803F000079038E001F82603F9C07F0001138001
+FB6D7E91C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713
+E090381F81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848
+EB01F8A2003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03
+F0A26C6CEB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090
+C7FC282A7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE003F03A07FFC0
+01FC6C496C7E6C90C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1F
+E0A2EE3FC06D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7
+FCEC07F891C9FCAD487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090
+397F00387C01FC131CD803F8130E4848EB0FFC150748481303121F485A1501485AA448C7
+FCAA6C7EA36C7EA2001F14036C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F1
+90380FFFC1903801FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB
+1FF8EC787CECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A548
+7EB512FEA31F287EA724>I<90383FC0603901FFF8E03807C03F381F000F003E1307003C
+1303127C0078130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480
+000114C0D8003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E1401
+6C14E06CEB03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA613
+3CA4137CA213FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038
+FE01C0A2EB7F03013F138090381F8700EB07FEEB01F81B397EB723>I<D801FC14FE00FF
+147FA3000714030003140100011400B3A51501A31503120015076DEB06FF017E010E1380
+6D4913FC90381FC078903807FFE00100903880FE002E297DA733>I<B539E00FFFE0A327
+07FE000313006C48EB00FC5E00015D7F00005DA26D13016D5CA26D6C485AA2ECC007011F
+91C7FCA290380FE00EA2ECF01E0107131CA26D6C5AA2ECFC7801011370A2ECFEF001005B
+A2EC7FC0A36E5AA26EC8FCA3140E2B287EA630>I<B53BC3FFFE03FFF8A3290FFE003FE0
+0013C06C486D48EB3F806C4817006D010F141E00016F131C15076D163C00004A6C1338A2
+017F5E4B7E151DD93F805DED3DFC1538D91FC04A5AED78FE9238707E03D90FE0017F5BED
+E03F02F0140701070387C7FC9138F1C01F02F9148F010315CE9138FB800F02FF14DE6D15
+FCED00076D5DA24A1303027E5CA2027C1301023C5C023813003D287EA642>I<B539F01F
+FFE0A30003D9C00F1300C690388007F8D97F0013E002805BD93FC05B011F49C7FC90380F
+E00EECF01E6D6C5A01035B6D6C5A6E5AEB00FF6E5A6E5A81141F814A7E81147BECF1FC90
+3801E1FEECC0FF01037F49486C7ED90F007F011E6D7E013E130F496D7E01FC80486C8000
+0F4A7EB539803FFFF8A32D277FA630>I<B539E00FFFE0A32707FE000313006C48EB01FC
+6F5A00015D7F00005DA2017F495AA2EC8003013F5CA26D6C48C7FCA26E5A010F130EA26D
+6C5AA2ECF83C01031338A26D6C5AA2ECFEF001005BA2EC7FC0A36E5AA36EC8FCA2140EA2
+141E141C143C1438A2147800181370127EB45BA2495AA248485AD87E07C9FCEA780EEA3C
+3CEA1FF8EA07E02B3A7EA630>I<001FB61280A2EBE0000180140049485A001E495A121C
+4A5A003C495A141F00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC0
+0380A2EB7F80EBFF005A5B484813071207491400485A48485BA248485B4848137F00FF49
+5A90B6FCA221277EA628>I<B812F0A22C0280982D>I<BE12C0A25A0280985B>I
+E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fx cmbx10 10.95 52
+/Fx 52 124 df<EC0780140F141FEC3E0014FE495A495A5C495A130F495A495AA249C7FC
+5B5B1201485AA212075BA2120F5B121FA3485AA4127F5BA512FFB0127FA57F123FA46C7E
+A3120F7F1207A27F1203A26C7E12007F7F6D7EA26D7E6D7E13076D7E806D7E6D7E143EEC
+1F80140F1407195A77C329>40 D<127012F8127C7EEA3F806C7E6C7E12076C7E7F6C7E6C
+7EA2137F80133F806D7EA280130FA280130780A36D7EA4807FA51580B01500A55B5CA449
+5AA35C130F5CA2131F5CA2495A5C137F91C7FC13FEA2485A485A5B485A120F485A485A00
+3EC8FC5A5A1270195A7AC329>I<EA0FC0EA1FE0EA3FF0EA7FF8EAFFFCA6EA7FF8EA3FF0
+EA1FE0EA0FC00E0E798D1D>46 D<ECFFE0010713FC011F13FF017F14C0D9FFE07F489038
+803FF03A03FE000FF848486D7EA248486D7E001F81A348486D1380A3007F16C0A500FF16
+E0B3A2007F16C0A5003F16806D5BA2001F1600A2000F5D6D13076C6C495A6C6C495A6C6D
+485A6C9038E0FFE06DB55A011F91C7FC010713FC010013E02B3D7CBB34>48
+D<140F143F5C495A130F48B5FCB6FCA313F7EAFE071200B3B3A8007FB612F0A5243C78BB
+34>I<903803FF80013F13F890B512FE00036E7E4881260FF80F7F261FC0037F4848C67F
+486C6D7E6D6D7E487E6D6D7EA26F1380A46C5A6C5A6C5A0007C7FCC8FC4B1300A25E153F
+5E4B5AA24B5A5E4A5B4A5B4A48C7FC5D4A5AEC1FE04A5A4A5A9139FF000F80EB01FC495A
+4948EB1F00495AEB1F8049C7FC017E5C5B48B7FC485D5A5A5A5A5AB7FC5EA4293C7BBB34
+>I<903801FFE0010F13FE013F6D7E90B612E04801817F3A03FC007FF8D807F06D7E82D8
+0FFC131F6D80121F7FA56C5A5E6C48133FD801F05CC8FC4B5A5E4B5A4A5B020F5B902607
+FFFEC7FC15F815FEEDFFC0D9000113F06E6C7E6F7E6F7E6F7E1780A26F13C0A217E0EA0F
+C0487E487E487E487EA317C0A25D491580127F49491300D83FC0495A6C6C495A3A0FFE01
+FFF86CB65A6C5DC61580013F49C7FC010313E02B3D7CBB34>I<ED01F815031507A2150F
+151F153FA2157F15FF5C5CA25C5CEC1FBFEC3F3F143E147C14FCEB01F814F0EB03E01307
+EB0FC0EB1F801400133E137E5B485A5B485A1207485A5B48C7FC5A127E5AB812F8A5C838
+7FF800AA49B612F8A52D3C7DBB34>I<EC07FF023F13C049B512F001078049EB03FC9038
+3FF80090397FE001FE9038FFC0034849487E48495AA2485A120FA2485A6F5A003F6E5A6F
+5A92C8FC485AA21402EC3FFE00FF496C7E01F9B512E001FB809138E03FF89039FF800FFC
+4A6C7E825B6F13804915C0A317E05BA4127FA5123FA26D15C0121FA2000F4A13806D1500
+12076C6C495A6C6D485A6C9038E07FF86DB55A6D5C6D1480010749C7FC010013F02B3D7C
+BB34>54 D<ECFFF0010713FE011F6D7E017F14E09039FFC07FF03A01FE001FF848486D7E
+48486D7E1503485A8281121FA27F7F7F6D5B02C05B14F06C6D485A9138FE0FF89138FF9F
+F06CECFFE06C5D5E6C92C7FC6C816D14E0011F80498090B67E48812607FE3F7F48486C14
+80381FF807D9F00114C048486C7E007F8049010F13E0150348487F81167FA2163FA36D15
+C0127FEE7F807F6C6CECFF006C6C5B01FEEB07FE3A0FFFC03FFC6C90B55A000115E06C6C
+5C011F49C7FC010113F02B3D7CBB34>56 D<16FCA24B7EA24B7EA34B7FA24B7FA34B7FA2
+4B7FA34B7F157C03FC7FEDF87FA2020180EDF03F0203804B7E02078115C082020F814B7E
+021F811500824A81023E7F027E81027C7FA202FC814A147F49B77EA34982A2D907E0C700
+1F7F4A80010F835C83011F8391C87E4983133E83017E83017C81B500FC91B612FCA5463F
+7CBE4F>65 D<B812F8EFFF8018F018FC8426003FFCC7EA3FFF050F13807113C07113E083
+19F0A27113F8A719F05FA24D13E019C04D13804D1300EF3FFE933801FFF891B712E01880
+18F818FE02FCC7380FFF80050313C07113E07113F019F8F07FFCA2F03FFEA219FFA38460
+A419FE187FA2F0FFFC4D13F85F4D13F0053F13E0BA12C0190018FC18F095C7FC403E7DBD
+4A>I<922607FFC0130E92B500FC131E020702FF133E023FEDC07E91B7EAE1FE01039138
+803FFB499039F80003FF4901C01300013F90C8127F4948151FD9FFF8150F48491507485B
+4A1503481701485B18004890CAFC197E5A5B193E127FA349170012FFAC127F7F193EA212
+3FA27F6C187E197C6C7F19FC6C6D16F86C6D150119F06C6D15036C6DED07E0D97FFEED0F
+C06D6CED3F80010F01C0ECFF006D01F8EB03FE6D9039FF801FFC010091B55A023F15E002
+071580020002FCC7FC030713C03F407ABE4C>I<B812F8EFFF8018F018FC18FF26003FFC
+C76C13C005077F05017F716C7E727E727E727E721380A27213C0A27213E0A21AF084A21A
+F8A41AFCA5197FA319FFA51AF8A41AF0A2601AE0A24E13C0A24E13804E1300604E5A4E5A
+4D485A050713E0057F5BBA5A4EC7FC18F818C005F8C8FC463E7DBD50>I<BAFCA4198026
+003FFEC7123F1707170183183FA2181FF00FC0A31807EE07C0A3F003E0A3160F95C7FC16
+1F163F16FF91B6FCA54AC6FC163F161F040F147CA2160719F8A593C71201A219F01803A2
+1807A2180FF01FE0183F18FF1703173FBAFCA219C0A33E3D7DBC45>I<B912FEA4842600
+3FFEC77E170F1703170084A284F01F80A3180FA2EE07C0A2F007C0A4040F90C7FCA2161F
+163F16FF91B6FCA54AC6FC163F161F160FA21607A693C9FCACB712E0A53A3D7DBC42>I<
+B71280A526003FFEC7FCB3B3B0B71280A5213E7DBD28>73 D<B712E0A526003FFEC9FCB3
+AD183EA4187E187CA418FCA21701A2EF03F8A21707170F171F177FEE01FF160FB9FC18F0
+A4373E7DBD3F>76 D<B6051FB512C06F5EA26F5EA2D8003F97C7FC6F16F7A26E6CED01E7
+A26E6CED03C7A36E6CED0787A26E6CED0F07A26E6C151EA36E6D143CA26E6D1478A26E6D
+14F0A26F6CEB01E0A36F6CEB03C0A26F6CEB0780A26F6CEB0F00A36F6C131EA26F6D5AA2
+6F6D5AA26F6D5AA393387FF1E0A293383FFBC0A270B45AA37090C7FCA2705AA2705AB600
+C0031FB612C0A2705AA2705A5A3E7CBD63>I<B6037FB512E0A2818181D8003F6D913900
+1F800081A281816E7E6E7F6E7F80826E7F6E7F6E7F6E7F157F826F7F6F7F6F7F6F7F8183
+6F7F6F7F707E701380A27013C07013E07013F07013F87013FCA27013FEEF7FFF71139F71
+13DF8319FF8383838384A28484848484A284B600C080197F193F191FA24B3E7DBD52>I<
+ED3FFF0203B512F0021F14FE027F6E7E902701FFF80713E00107D9C00013F84990C7EA3F
+FCD93FFCEC0FFF49486E7F49486E7F48496E7F4A80488448496F7EA24890C96C7E4884A2
+49161F003F84A34848701380A400FF19C0AD007F19806D5EA3003F1900A26D5E6C60A26C
+6D4B5AA26C6D4B5A6C6D4A5BA26C6D4A5B6C6D4A5B6D6C4A5B6DB4023F90C7FC6D01C0EB
+FFFE0107D9F80713F8010190B612E06D5E021F4AC8FC020314F0DA003F90C9FC42407ABE
+4F>I<B812F017FF18C018F018FC26003FFCC77FEF1FFF7113807113C07113E0A27113F0
+A319F8A819F0A34D13E019C05F4D1380053F1300EFFFFE91B712F860188005FCC7FC4ACA
+FCB3A4B77EA53D3E7DBD47>I<B87E17FCEFFF8018F08428003FFC000113FE9338003FFF
+050F7F717F717FA2858385A761A25F61614D5B4D90C8FCEF3FFE4CB45A91B712F018C04D
+C9FC717E9126FC000F7F040113F0707F717EA2717EA2717EA685A6F207C019C0A271140F
+07E01380B76DEBF01F719038FC3F007190B5FC716C5B061F13F8CB000113E04A3F7DBD4E
+>82 D<903A03FFC001C0011FEBF803017FEBFE0748B6128F4815DF48010013FFD80FF813
+0F48481303497F4848EB007F127F49143F161F12FF160FA27F1607A27F7F01FC91C7FCEB
+FF806C13F8ECFFC06C14FCEDFF806C15E016F86C816C816C816C16806C6C15C07F010715
+E0EB007F020714F0EC003F1503030013F8167F163F127800F8151FA2160FA27EA217F07E
+161F6C16E06D143F01E015C001F8EC7F8001FEEB01FF9026FFE00713004890B55A486C14
+F8D8F81F5CD8F00314C027E0003FFEC7FC2D407ABE3A>I<003FB912FCA5903BFE003FFE
+003FD87FF0EE0FFE01C0160349160190C71500197E127EA2007C183EA400FC183F48181F
+A5C81600B3AF010FB712F8A5403D7CBC49>I<B76C90B61280A526003FFEC9003EC7FCB3
+B3A4197E011F177C80A26D17FC616D6D14014E5A6D6D4A5A6D6D140F6D01F8EC3FC0DA7F
+FEECFF8091273FFFC00F90C8FC020F90B512FC02035D020015E0031F1480030101F8C9FC
+493F7DBD50>I<B600FC020FB512C0A5C66C48C9381F8000013F95C7FC80616D173E6F15
+7E6D177C6F15FC6D5F8118016D6D5D18036D5F6F14076D5F6F140F027F5E81181F023F93
+C8FC6F5C6E153E70137E6E157C8218FC6E6D5B17016E5DEEF0036E5DEEF8076E5D16FC17
+0F037F5CEEFE1F033F91C9FC705A6F133E17BE17FE6F5BA26F5BA26F5BA26F5BA36F5BA2
+705AA270CAFCA24A3F7EBD4F>I<007FB6013FB512F0A5D8001F01C0D9003FC7FC6D6D14
+7E18FE6D6D5C6D6D495A6D4B5A6F13076D6D5C6E6C495A4D5A6EEB803F6E01C090C8FC6E
+147E705A6E13F16EEBF9F86EEBFBF0EEFFE0806F5B5F816F7F81836F7F81834B7F4B7F5D
+83DB3F3F7FED7E1F03FE804B6C7F4A486C7F4A487E0207814B6C7F4A487E4A4880023F6E
+7E92C76C7F027E804A8201016F7F4A6E7F495A49486E7F010F6F7F4A80B600C0017F90B5
+FCA5483E7DBD4F>88 D<903807FFC0013F13F848B6FC48812607FE037F260FF8007F6DEB
+3FF0486C806F7EA36F7EA26C5A6C5AEA01E0C8FC153F91B5FC130F137F3901FFFE0F4813
+E0000F1380381FFE00485A5B485A12FF5BA4151F7F007F143F6D90387BFF806C6C01FB13
+FE391FFF07F36CEBFFE100031480C6EC003FD91FF890C7FC2F2B7DA933>97
+D<13FFB5FCA512077EAFEDFFE0020713FC021FEBFF80027F80DAFF8113F09139FC003FF8
+02F06D7E4A6D7E4A13074A80701380A218C082A318E0AA18C0A25E1880A218005E6E5C6E
+495A6E495A02FCEB7FF0903AFCFF01FFE0496CB55AD9F01F91C7FCD9E00713FCC7000113
+C033407DBE3A>I<EC7FF00107B5FC011F14C0017F14E09039FFF01FF0489038800FF848
+EB001F4848EB3FFC120F485AA2485AA2007FEC1FF849EB0FF0ED03C000FF91C7FCAB127F
+7FA3003F153E7F001F157E6C6C147C6C6C14FC91388001F86C9038C003F0C69038F81FE0
+6DB512C0011F14800107EBFE009038007FF0272B7DA92E>I<EE07F8ED07FFA5ED003F16
+1FAFEC7FF0903807FFFE011FEBFF9F017F14DF9039FFF01FFF48EBC00348EB00014848EB
+007F485A001F153F5B123FA2127F5BA212FFAA127FA37F123FA26C6C147F120F6D14FF6C
+6C01037F6C6D48EBFFE06CEBF03F6C6CB512BF6D143F010713FC010001E0EBE00033407D
+BE3A>I<ECFFF0010713FE011F6D7E017F809039FFE07FE0489038801FF048496C7E4848
+6D7E48486D7E121F491301003F81A2485A6F1380A212FFA290B7FCA401F0C9FCA5127FA2
+7F123FEE0F806C7E161F6C6C15006C6C5C6C6D137E6C9038E001FC6C9038F80FF8013FB5
+5A6D14C0010391C7FC9038007FF8292B7DA930>I<EC07FE91387FFF8049B512C0010714
+E090390FFE3FF0EB1FF090393FE07FF8EB7FC013FF1480A2489038003FF0ED1FE0ED0FC0
+92C7FCAAB612E0A500010180C7FCB3AC007FEBFF80A525407DBF20>I<903A03FF8007F0
+013F9038F83FF8499038FCFFFC48B712FE48018313F93A07FC007FC34848EB3FE1001FED
+F1FC4990381FF0F81700003F81A7001F5DA26D133F000F5D6C6C495A3A03FF83FF8091B5
+C7FC4814FC01BF5BD80F03138090CAFCA2487EA27F13F06CB6FC16F016FC6C15FF17806C
+16C06C16E01207001F16F0393FE000034848EB003F49EC1FF800FF150F90C81207A56C6C
+EC0FF06D141F003F16E001F0147FD81FFC903801FFC02707FF800F13006C90B55AC615F8
+013F14E0010101FCC7FC2F3D7DA834>I<13FFB5FCA512077EAFED1FF8EDFFFE02036D7E
+4A80DA0FE07F91381F007F023C805C4A6D7E5CA25CA35CB3A4B5D8FE0FB512E0A5333F7C
+BE3A>I<EA01F8487E487E487E481380A66C13006C5A6C5A6C5AC8FCA913FFB5FCA51207
+7EB3ABB512F8A515407CBF1D>I<13FFB5FCA512077EB3B3AFB512FCA5163F7CBE1D>108
+D<01FFD91FF8ECFFC0B590B5010713F80203DAC01F13FE4A6E487FDA0FE09026F07F077F
+91261F003FEBF8010007013EDAF9F0806C0178ECFBC04A6DB4486C7FA24A92C7FC4A5CA3
+4A5CB3A4B5D8FE07B5D8F03FEBFF80A551297CA858>I<01FFEB1FF8B5EBFFFE02036D7E
+4A80DA0FE07F91381F007F0007013C806C5B4A6D7E5CA25CA35CB3A4B5D8FE0FB512E0A5
+33297CA83A>I<EC7FF0903803FFFE011FEBFFC0017F14F09039FFE03FF8489038800FFC
+3A03FE0003FE48486D7E000F168048486D13C0A2003F16E049147F007F16F0A400FF16F8
+AA007F16F0A46C6CECFFE0A2001F16C06C6C491380A26C6C4913003A03FF800FFE6C9038
+E03FFC6C6CB512F0011F14C0010791C7FC9038007FF02D2B7DA934>I<01FFEBFFE0B500
+0713FC021FEBFF80027F80DAFF8113F09139FC007FF8000701F06D7E6C496D7E4A130F4A
+6D7E1880A27013C0A38218E0AA4C13C0A318805E18005E6E5C6E495A6E495A02FCEBFFF0
+DAFF035B92B55A029F91C7FC028713FC028113C00280C9FCACB512FEA5333B7DA83A>I<
+DA7FE01378902607FFFC13F8011FEBFF01017F14819039FFF81FC3489038E007E7489038
+8003F74890380001FF48487F001F157F5B003F153F5B127F161FA2485AAA127F7FA36C6C
+143F167F121F6C6C14FF6D5B6C6D5A6CEBC00F6CEBF03F6C6CB512BF6DEBFE3F010713F8
+010013C091C7FCAC030FB512E0A5333B7DA837>I<3901FE01FE00FF903807FF804A13E0
+4A13F0EC3F1F91387C3FF8000713F8000313F0EBFFE0A29138C01FF0ED0FE091388007C0
+92C7FCA391C8FCB3A2B6FCA525297DA82B>I<90383FFC1E48B512BE000714FE5A381FF0
+0F383F800148C7FC007E147EA200FE143EA27E7F6D90C7FC13F8EBFFE06C13FF15C06C14
+F06C806C806C806C80C61580131F1300020713C014000078147F00F8143F151F7EA27E16
+806C143F6D140001E013FF9038F803FE90B55A15F0D8F87F13C026E00FFEC7FC222B7DA9
+29>I<EB07C0A5130FA4131FA3133F137FA213FF5A1207001FEBFFFEB6FCA40001EBC000
+B3151FA96CEBE03EA2017F137EECF8FC90383FFFF86D13F0010713E001001380203B7EB9
+29>I<D9FF80EB0FF8B5EB0FFFA50007EC007F6C153FB3A5167FA316FF6C5C4B7F6C903A
+C007DFFFE09138F01F9F6DB5121F6D13FE010F13F8010101E0EBE000332A7CA83A>I<B5
+00FC90383FFFC0A5000101C0903803E0006E1307A26C5E6E130F017F5D6E131F013F92C7
+FC6E5B011F143E6E137E010F147C6E13FCA26D5C15816D5C15C36D5C15E76D5C15FF6E5B
+A36E90C8FCA26E5AA26E5AA26E5AA26E5AA232287EA737>I<B53CFC3FFFFC03FFFEA500
+03D980009039C0000F806E161F6C037F15006E496C5B6C183E836E48157E017F177C6E48
+6D13FC013F02EF5C83DAFC071401011F02C75CDAFE0FEBFE03010F02835C17FFDAFF1F14
+076D02015C03BF148F6DD9BE005C18CF03FE14DF6D49017F90C7FC18FF6D496D5AA36E48
+6D5AA26E486D5AA36E486D5AA26E486D5A47287EA74C>I<B5D8FC03B51280A5C69026E0
+007FC7FC6E13FE6D6C5B6D6C485A6D6C485A010F13076D6C485AED9FC06DEBFF806D91C8
+FC6D5B6E5AA2143F6E7E140F814A7F4A7F4A7F02FE7F903801FC7F49486C7E02F07F4948
+6C7E49486C7E011F7F49486C7FD97F008001FE6D7FB5D8C007EBFFC0A532287EA737>I<
+B500FC90383FFFC0A5000101C0903803E0006E1307A26C5E6E130F017F5D6E131F013F92
+C7FC6E5B011F143E6E137E010F147C6E13FCA26D5C15816D5C15C36D5C15E76D5C15FF6E
+5BA36E90C8FCA26E5AA26E5AA26E5AA26E5AA35D14075D000E130FD83F805B387FC01FD8
+FFE090C9FC5C143E147E5CEBC1F8387FC3F0387E0FE06CB45A6C5B6C48CAFCEA03F8323B
+7EA737>I<B912E0A43304809A34>123 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fy cmbx12 24.88 36
+/Fy 36 122 df[<18F8EF01FC1707170FEF1FF8EF3FF0EFFFE04C13C04C13804C13004C
+5A161F4C5A4C5A4C5A4B5B5D4B5B5F5D4B90C7FC4B5A157F5E4B5A5C4A5BA24A5B5C5E5C
+5E5C4A90C8FCA24A5AA25B5D5B5D5BA2495BA25B5D5BA25D5BA390B55AA25AA292C9FC5A
+A35C5AA35A5CA35AA35CA25AA65A5CA8B5FCB3A87EA8807EA67EA280A37EA3807EA37E80
+A37E81A27EA26D7FA37F81A27F817FA26D7FA27F817F817FA26E7EA26E7F80828082806E
+7FA26E7F806F7E82153F6F7E6F7F81836F7F816F7F707E707E707E160F707E7013807013
+C07013E0EF3FF0EF1FF8EF0FFC17071701EF00F8>54 206 106 282
+90 40 D[<127C12FE6C7E7F6C7E6C7EEA1FFC6C7E6C7E6C7F6C7F806C7F6D7E6D7E6D7E
+806D7F7F816D7F6D7F817F6E7E816E7EA26E7F82808280826E7FA26E7FA28280828183A2
+6F7FA2838183A28183A36F7FA283A28183A3811880A318C081A318E0A382A218F0A618F8
+82A818FCB3A818F8A85E18F0A618E0A293B5FCA318C0A35D1880A318005DA35F5DA25FA2
+4B5BA35F5DA25F5D5FA24B5BA294C7FC92B5FC5E5C5EA24A5BA24A5B5E5C5E5C5E4A90C8
+FCA24A5A5D4A5A5B5D495B495B5D5B4990C9FC5C495A495A495A485B5C485B4890CAFC48
+5A485AEA3FF0485A485A5B48CBFC127C>54 206 115 282 90 I<EB1FE0EB7FF83801FF
+FE0007EBFF804814C04814E0A24814F0A24814F8A2B612FCA86C14F8A26C14F0A26C14E0
+A26C14C06C14800001EBFE0038007FF8EB1FE01E1E6F9D41>46 D[<EF7FFF041FB512FC
+93B77E030716F0031F16FC037F16FF4AB912C00207DAF00714F04ADA8000804A01FCC700
+1F7F027F496E13FF91B500E0020380494A6E80494A6E804991C96C7F4B8249864949707F
+4B8249864949707FA290B5864B824888A24888A24B824888A24888A44888A4484A7080A5
+4888A9B61B80B3AE6C1D00A96C646F5EA46C64A46C64A36C646F5EA26C64A26C64A26F5E
+6C646D98C7FC6F5E6D626F5E6D626D6D4C5B6F5E6D6E92B55A6D626D6E4A5C6D02F00207
+5C6E6D4A91C8FC6E01FE023F5B020F6D6C90B512F86EDAF0075C020191B712C06E60033F
+4CC9FC030716F003001680041F02FCCAFCDC007F90CBFC>97 137
+119 262 116 48 D[<EF01F8EF07FC170F171F177FEE01FF1607161F93B5FC1503153F02
+03B6FC49B7FCB9FCA615C3ECFC03EBFE00C8FCB3B3B3B3B3AE003FBC12C0A9>82
+135 111 262 116 I[<93381FFFF00303B612E0033F15FC4AB812C0020717F0021F17FC
+027F17FF49BA12C0010719F049DA800F814901F8C715FE4901C0021F804948C800078149
+486F814801F00300814849708048018070804890CA6C806E70804813F002FC7080486D70
+158080486E6F15C0817315E081B6836F19F0A3861DF8A56C5CA26C5CA26C5C6C91CAFC6C
+5B000113F826007FE01AF090CCFC62A21DE0A297B6FC1DC0A24F1580A24F150064A24F5C
+64614F5C644F5C644F91C7FC96B55A4E5C634E5C4E5C4E5C634E49C8FC4E5B4E5B95B55A
+4D14C0624D91C9FC4D13FC4D5B4D5B4D13C04D5B94B5CAFC4C13FC4C5B4C5B4C49ED0FF8
+4C13804C90C9FC4C5A4C48EE1FF04B5B4B13E04B5B4B5B4B90CAFCDB3FFC173F4B4818E0
+4B5A4A5B4A49177F4A90CBFC4A4818FF5D4A485F4A48053F13C04ABBFC91BCFC5B5B5B5B
+491B805B5B90BDFC5A5A5A5A481C005A5ABEFCA464A4>93 135 117
+262 116 I[<933807FFFE93B612F80307EDFF80033F16F092B812FE0203717E020F18E0
+023F844A9026FE003F14FC91B500C0010780010301FCC70001804901F06E6C14C04901C0
+6F8092C97E4948708049488590267FFFC06F808190B500F8846F816F845A81A2486F1880
+A285A282A24C5CA37E1D0093C8FC7E6D5B6D494B5C6D5B6D5B010301C060D9007EC95A91
+CA5DA24F5C6461644F5C96B6C7FC634E5C4E5C4E14E04E5C063F5C95B548C8FC050314F8
+0407B612E00307B712804B4BC9FC19F885F1FFC01AF86F16FF92C86C14C0060714F00601
+14FC7280073F6D7E738073807314F888738085881D807315C0A21DE0861DF0A21DF8A274
+14FCA4D93FF01AFEEBFFFC000313FF4880488048804880A24880A2B67EA21DFCA45014F8
+A34B19F07E97B612E05D6C4A19C0A24B4B15806C5C6C49C948150002F84C5C6C01C0616C
+6D4C5C6C01F84C5C6C01FE4C5C6D6C6C4B5C6D01F04AB65A6D01FF020792C7FC6D02F801
+7F14FC010391B85A010019E0023F1880020F4DC8FC020117F0DA003F1680030303F8C9FC
+DB000F49CAFC>95 137 118 262 116 I[<BFFC1EFEF6FFE01FFCF7FF8020F020FC20FF
+8DC7000392CA001F15E00B0181776C800C1F807814FF0C03818A78818E79808B8E8B8E8B
+8EA27980A4791580AB551500A4555CA26A676A676A555C9CB65AA2545D5492C7FC545C54
+14F80C3F5C545C53B612800B0F4AC8FC0B7F14F80A1FB612E095BBC9FC1FF81F801FF8F7
+FF8020F820FE95CBECFFC00C1F14F00C07807814FE0C006E7E7980798079807980798079
+808E79158023C08B23E08C23F0A223F88CA223FCA38C23FEAB5614FCA55614F8A39DB612
+F0A25515E06723C055158067551500555C555C9CB6FC545D0C075D0C1F15C09BB75A0B0F
+93C7FCC212FC6921E021800EFCC8FC20F020800DF0C9FC0CFCCAFC>143
+142 120 269 165 66 D[<0803B500C0EE01F00703B600FEEE03F8077FDBFFE015070607
+B800FC150F063F05FF151F4DBA00E0143F050F07F8147F053F07FE14FF94BC5B04039326
+F8000FECC003040F4BC86CEBF007043F03C0030F6D5A93B648C900036D5A4B03F0933900
+7FFF3F030703C0051F90B5FC4B92CB7E033F02FC18034B02F08492B648844A0380193F4A
+92CD7E4A4A864A4A864A02F0864A4A864A8991B65A494B874992CF7E4C885B494A885E49
+8B494A88A2495C8D90B65A8D5A5E48217FA24892D1FC223FA25A5DA248211FA3485CFA0F
+F09FC7FCA25AA45DA3B6FCB27EA381A47EA46C80FA07F0FA0FF87EA2817EA36C6F1D1F23
+F07E827E223F6D6E1EE0A26D6E1D7F23C06D6E1DFF7F705213806D806D55130070646D6F
+646D6F515A6E6E1B1F6E6E515A6E6E515A6E6E1BFF6E6E505B6E6E505B6E6F4F5B6E03E0
+4F90C7FC6F6EF13FFE6F02FC4F5A030F02FF4E485A6F03C005075B030103F0051F5B6F03
+FE057F1380043FDAFFE00303B5C8FC040F03FE033F13FC0403DBFFF80107B55A040093B8
+12E0053F1A80050F4FC9FC050119F8DD003F18C0060795CAFCDE007F16F0070393CBFCDF
+000314C0>141 146 115 271 168 I[<BE12FEF5FFFCF6FFC01FFCF7FF8020E020FC20FF
+21C0C700030380C8000116F0E2000F810B0015FE0C1F800C0315C00C00810D3F8079800D
+0714FE79807981796C808C7A807A808F7A807A808C8F7A818DA17E8DA17E8DA17EA27B80
+A2A17E8DA17EA28DA17EA3A113808DA3A113C0A57B15E0A6A113F0B3A2A113E0A569A113
+C0A5A11380A269A2A11300A3575CA2A15AA269A15A69A15AA2575CA15A69A15A9EB6FC56
+92C7FC6B565C68565C565C565C565C9DB65A5592C8FC0D075C555C0D3F5C9CB65A0C0315
+C00C0F5D0C7F92C9FC0B07B612FC52B712F0C212C09ECAFC20FC20F020800DFCCBFC1FE0
+0CFCCCFC53CDFC>156 142 120 269 178 I[<BC12C0A9C7000103E0C8FCB3B3B3B3B3B3
+B0BC12C0A9>74 142 122 269 87 73 D[<BC12F8A9C7000303C0CEFCB3B3B3B3A5F8FF
+80A4672100A667A368A21F07A41F0FA3555AA21F3FA21F7FA21FFFA26666686666666666
+53B5FC65650B1F5C1D7F0A03B6FC1C1F0903B7FCC1FCA468A5>121
+142 120 269 140 76 D[<B900C00C7FB812E0729BB9FC72657265A37265A27265C70003
+A101F8C8FC72F51FEFA2706EF43FCFA3706EF47F8FA2706EF4FF0FA2706EF301FEA3706E
+F303FCA2706EF307F8A2706EF30FF0A2706EF31FE0A3716EF23FC0A2716EF27F80A2716E
+F2FF00A2716E4F5AA3716E4F5AA2716E4F5AA2716E4F5AA3716E4F5AA2726E4E5AA2726E
+4E5AA2726E4EC7FCA3726E4D5AA2726E4D5AA2726E4D5AA2726E4D5AA3726E4D5AA2736E
+4C5AA2736E4C5AA3736E4CC8FCA2736E4B5AA2736E4B5AA2736E4B5AA3736E4B5AA2736E
+4B5AA2746E4A5AA2746E4A5AA3746E4AC9FCA2746E495AA2746E495AA3746E495AA2746E
+495AA2746E495AA2756E485AA3756E485AA2756E48CAFCA275ECF1FEA275ECFBFCA375EC
+FFF8A2755DA2755DA3765CA2765CA27691CBFCA2765BA34A6D715B49B512FEB900FC6F49
+0303BB12E0A2765BA2765BA3775A0B1FC9FC>203 142 120 269
+220 I[<BE12F8F5FFF01EFF1FE01FFCF7FF8020E020F820FEC700030380C8000781E200
+3F15C00B03810B00810C3F8078800C07807880788178818E8B8E8B8E8B8EA28EA28B8EA4
+2380AC2300A46A67A26AA26A676A676A9CB65A6A665492C7FC545C0C1F5C545C9BB612E0
+0B075D0B3F5D0A07B648C8FC95BB12F820E0208055C9FC1FF09CCAFC1EF00BF8CBFC06C0
+D0FCB3B3B2BCFCA9>137 142 120 269 159 80 D[<93260FFFF8163E4BB600E0153F03
+1F03FE5D037FDBFFC05C0203B800F05B020F05FC5B4A05FF5B027FF0C00F91B526FE000F
+ECF01F010302C0D9007F6D5A4991C800076D5A4901FC030090B6FC4901F0163F4949160F
+4901808290B5170192CBFC4849844849181F87484984A2484984874886A248498588A248
+87A388A2B58680A36E85A280A26E8580A2818103F0725A6C6E96C7FC15FE8116E06C15FE
+EEFFE017FF6C17F0F0FF806C18F8F1FFC06C19FCF2FF806C1AE01BF86C1AFE6C747E6D1A
+E0886D866D866D1AFF6D876D87010087806E86020F86020386020086153F030F851501DB
+001F19801601DC000F18C0EF007F060717E0F0003F070316F0F1003F1A0F080315F81A00
+871B1F877514FCA287007F86486C85A288A388A36D86A31EF87FA37F1EF0A26D626D1CE0
+A27F6D5013C0A26E1B806E96B5FC6E1B0002F8606E4E5B6E626E6C5F03E04D5B03F84D5B
+03FE057F5BDBFFC093B55A04F803035C496CD9FF80021F91C7FCD9FC1F02FF49B55AD9F8
+0792B75A496C19F049C66149011F18804901074DC8FC90C817F848031F16C048030003FC
+C9FC007C04011480>102 146 115 271 129 83 D[<BC040FB912C0A9C7000303C0CD00
+1F02E0C7FC9E26007FF8C8FC7C5AB3B3B3B3B36E555AA3848022FF6BA26F65726481696F
+9CC9FC72626F66210F6F6E505AA26F6E505A6F535A6F6E1AFF734E5B706E4E5B70637002
+F04E5B706E063F90CAFC706E4E5A7002FF4D485A04006F04075B7102E0043F5B7102FC4B
+B55A050FDAFF80020F14807103FC0103B6CBFC050192B812FC716C61061F19E006031980
+060006FCCCFC071F17F007011780DF001F03F8CDFCE0001F49CEFC>162
+144 120 269 179 85 D[<BB00E0050FB812F0A9C7001F92CE00014AC7FCE7000F13C072
+09035B6E5590C8FC846E555A846E555AA2846E555A846E555A846F545A84A26F535B846F
+535B856F5390C9FC856F66210F856F535A856F535A856F66217F8570525A8570515B8570
+656886705190CAFC8670515A867064201F8670515A8670515A86716320FF86714F5B8671
+4F5B877198CBFC6787714F5A87714F5A8771621F3F87714F5A87724E5A87724D5B87A272
+4D5B88724D90CCFC88724D5A8872601E1F88724D5A88724D5A88735F1EFF88734B5B1CFF
+734B5B1D837394CDFC1D871DC773EDCFFE1DEF73EDFFFCA2735EA3735EA2745DA2745DA3
+745DA27492CEFCA2745CA3745CA2745CA2745CA3755BA2755BA2755BA27590CFFCA2F303
+FC>164 144 123 269 175 I<93B512FC037FECFFF00207B8FC023F17E091B912F84918
+FE0107727E499126C0007F14E04901E0C7000F80496D020380496D020014FE6F6F7F90B5
+70806F6F8085486E6F807380A27380A28885886C5CA26D4982886D5B6D5B010713C00101
+90CAFC90CCFCA90603B7FC050FB8FC0403B9FC167F0307BAFC153F4AB7EA807F020FEDE0
+00023F02FCC7FC91B612E0010392C8FC4914FC011F14F04914C0495C90B548C9FC485C48
+5C485C485C5A5D485CA24891CAFCA3B6FC5CA397B6FCA461806C60F107EF6C6E150F6F16
+CF6C183F6FDB7F8F806C6EDBFF0F14E06C02FCDA03FE15FE6C6E91260FFC0791B5FC6C6E
+6CD93FF817806C923AF803FFF003013F91B6487E010FEF8000010394C77E010004FC141F
+021F03F0140702010380DA007F1400DA000701F8CDFC695F79DD71>97
+D[<ED1FF0017FB5FCB7FCA9EA003F1307A27FB3B296383FFFC00607B512FE063FECFFE0
+4DB712F8050716FF051F17C0057F17F094B5D8C00F8004F301FCC714FE04F701E0023F7F
+93B50080020F804DC86C14E005F80301804D6F804D707F05808294CA804C717F4C7180A2
+4C71808BA27680A28B88A28BA28BA3888BA52080B02000A56764A267A3676467A2525CA2
+67647062704D91C7FC704D5BA2714C5B7193B55A05F04B5CDCBFF84B5CDC1FFC030F5C4B
+6CB44B91C8FC7001C0027F5B4B6C01F00103B55A4BC601FF013F14F04B6D90B712C04B01
+1F94C9FC4B6D16FC4B010316F092C86C15804A030F02F8CAFC90CB49CBFC>113
+144 121 270 129 I<94387FFFF0041FB612E093B712FE0307707E031F17F092B97E4A18
+FE020784021F9126F8000F14804A0280010014C04A49C74814E049B500F85C494A17F049
+4A5C495C494A4A14F84991C8FC5D495B90B5FC5D5A485C7314F05A4B6F14E05A7314C048
+7214804B93383FFE00F20FF84896C8FCA4485CA5B6FCB07EA281A37EA36C80A37E6F18FE
+6CF201FFA26C6E5F1CFE6C801B076C6EEF0FFC6D7F70EE1FF86DF13FF06D6E167F6D6EEE
+FFE06D02F84B13C06D6E5D6D02FF030F13806D03C0023F1300023F02F0903801FFFC6E91
+26FF801F5B020792B65A6E18C0020060033F4CC7FC030716F8030016C0041F4AC8FCDC00
+7F13C0585F78DD67>I[<F53FE098B6FC4FB7FCA996C77E1B0FA287B3B294383FFF80040F
+B512FC93B71280030716E0031F16F8037F16FE4AB9128702074AC66C13C7021F02E00107
+13F74A91C890B6FC4A01FC153F49B548150F4902E081494A81494A814991CA7E495B8749
+498390B548835A5D5AA2485CA25A5D5AA35AA25D5AA5B6FCB07EA57E81A37EA27EA2817E
+A26C80A26C626C6E5F636D7F6D6D94B6FC6D606D6D1607705D6D6E4B81010102F0157F6D
+6E92B712FE6E01FE020301EF91B512806E6D6C011F13CF020FDAF801B5120F020391B612
+FE6E17F86E6C16E0030F16800301EDFC00DB003F14E0040049C74AC8FC>113
+144 120 270 129 I<94387FFFC0040FB6FC93B712E0030716FC031F16FF037F17C04AB9
+12F00207DAF80380021F912680003F13FE4A49C7000F7F4A01F802038049B5486E804902
+C06E6C7F494A6F7F4991C9FC49727F4949707F4B84498490B548707F5A4B198048855D48
+1CC086481CE05D5A871DF05AA25D5AA21DF887A2B6FCA392BBFCA51DF00380CDFCA77EA4
+817EA37EA2817EA26CF307F06FF00FF87E816C1B1F6F19F06C1B3F6D6DF07FE06D7FF4FF
+C06D6E4C13806D6E5E6D02F04C13006D6EEE1FFE6D6E4C5A6D6C01FFEEFFF86E02E00203
+5B6E02FC021F5B02079126FFC003B55A6E92B7C7FC020060033F17F8030F17E003011780
+DB003F03FCC8FC040315C0DC000F01F8C9FC5D5F7ADD6A>I<F5FFC093260FFFFC030F13
+F04BB600E0027F7F031F03FE49B512FE037F9226FF8007800203B8EAF01F020FDDFC3F15
+804A7148133F027FDA003F90B500F014C091B500F80107ED807F4902E00101ECFC000107
+02806D6C5B93C87E49496F7F49496F7F49496F6D6D1380491A8077130090B5486F6E6C5A
+F503F84875C8FCA2484A6F80A44887AB6C63A46C6E4B5CA26C63A26D6D4B5CA26D97C9FC
+6D6D4B5B6D6D4B5B6D6D4B5B705C010102E049B512E06D02F801075C4902FF013F5C4992
+B648CAFC496002F317F090260FE07F1680031F4BCBFC90261FC00115E0DB000F01FCCCFC
+013F91CFFCA3137FA280A380A28080806E7E15F092B812F06DF0FFE01BFEF3FFC06D1AF8
+1CFE767E6D1BE06D87896D1BFE6D877F6E878A0103BD7E130F013F8890BEFC4802E0C900
+3F814891CBFC4801FC180F48490601804849727E484985884849737F88A2B55A88A66E61
+6C65A26E616C6D4F5B6C656E616C6D4F5B6C6D96B55A6C6D6C05035C6F5FC602F0051F49
+C7FC6D01FC057F5B6DD9FF800303B55A010F02F8033F14E06DDAFFE0010FB65A010192B9
+C8FCD9003F19F8020F19E0020196C9FCDA001F17F0030194CAFCDB000192CBFC6A887ADD
+74>103 D[<ED1FF0017FB5FCB7FCA9EA003F1307A27FB3B2963803FFFC073FEBFFE096B6
+12F8060715FE061F6F7E4E16E095B87E4DD9FC03804DD9C000804D48C76C7FDD0FF880DD
+1FE0824D486E804D5A05FEC881DCF1FC815F04F385EEF7F04D81EEFFC0A24D84A294C9FC
+A25EA35EA45EB3B3AFB9D8E001B912C0A9>114 143 119 270 129
+I[<EC3FC0ECFFF0010313FC497F497F498049804980A290B67EA24881A86C5DA26D5CA2
+6D5C6D5C6D91C8FC6D5B6D5B010013F0EC3FC091CAFCB3A3ED1FF0017FB5FCB7FCA9EA00
+3F1307A27FB3B3B3B0B91280A9>49 144 119 271 65 I[<ED1FF0017FB5FCB7FCA9EA00
+3F1307A27FB3B3B3B3B3B3ACB912C0A9>50 143 119 270 65 108
+D<DB3FE0913803FFFC017FB5033FEBFFE0B792B612F8060715FE061F6F7E4E16E095B87E
+4DD9FC03804DD9C000804D48C76C7FDD0FF880D8003FDB1FE08201074B486E804D5A6D03
+FEC881DCE1FC815F04E385EEE7F04D81EEEFC0A2DCFF8084A294C9FCA25EA35EA45EB3B3
+AFB9D8E001B912C0A9725D77DC81>110 D<94381FFFF00407B612C0047F15FC0303B87E
+030F17E0037F17FC4ABAFC4A9126FC007F80020F02C0010714E04A49C880027F01F8033F
+13FC91B5486F7F4902C003077F494A6F804991C96C80494970804949717F49874949717F
+A290B548717F48884B83481D80A2481DC04B83481DE0A2481DF0A3484A7114F8A4481DFC
+A5B61BFEAF6C1DFCA56C6E4D14F8A36C1DF0A36C1DE06F5F6C1DC0A26C6E4D1480A26C1D
+006F5F6C646D6D4D5B6F94B5FC6D636D6D4C5C6D6E4B5C6D6E4B5C6D02F0031F5C6D6E4B
+91C7FC6D6C01FE92B512FC6ED9FFC001075C6E02FC017F5C020791B812C0020196C8FC6E
+6C17FC031F17F003031780DB007F03FCC9FC040715C0DC001F01F0CAFC675F7ADD74>I<
+DB1FF091381FFFC0017FB50203B6FCB7021F15E095B712FC050316FF050F17C0053F17F0
+94B912FC04F1DAC01F8004F79026FC00018093B500E06D6C14C0D8003F93C86C8001074B
+030F8005F86F806D03E06F804D6F804D8194CA6C7F4C864C71805E7680A27680A27680A2
+8B88A28BA288A28BA4882080B0200064A467A26467A3525CA26764676467647062704D91
+C7FC7094B55AA2714B5C714B5C714B5C05F84B5C71033F5C05FF4B91C8FC06C049B55A04
+FB01F001075C04F801FF017F14F07190B712C0051F94C9FC7116FC050316F0DD007F1580
+060F02F8CAFC060049CBFC96CDFCB3ACB912E0A9718579DC81>I<DD7FFFEE1FE0040FB5
+00F0153F93B600FE157F03076F7E031F04E014FF92B800F85B0203834A715B021F923A00
+7FFF80074A02F0010F13C091B600C001036D5A4992C86D5A4902FCED3FF8494A031F5B49
+4A6F6C5A494AED07FE494A6FB6FC494A8193C9FC90B682484A83A2484A83A2484A83A248
+4A83A25A4B83A25AA25D5AA5B65AB07E81A47EA3817EA26C80A36C62816C62816C626C6E
+5F98B6FC6D7F6D6E5D6D606D6E5D6D6E151F6D6E5D6D6E5D6D02FE913801FFEF6E6D0207
+13CF6E02C0011F138F020F913AFC01FFFE0F020391B612FC020017F0033F16C0030F1600
+030115FCDB003F14E0040049C7FC94C9FCB3AC0703B91280A9718578DC7B>I<DB7FC049
+B47E90B6021F13F8B7027F13FE4DB67E4D15E04D814D814D01077F94263FF00F7F94387F
+C01F4D48487FD8003F16000107DAC1FE491480EEC3FC6D5DEEC7F05F16CF5F16DF4D6D14
+00A204FFC76C5BA2735B4C6E5B735B070013C04C92C8FCA45EA65EB3B3AAB912FCA9515D
+79DC5F>I<92261FFFF814F80203B638C001FC023FEDFC0791B8121F010317FF130F013F
+9038F8001F4990C8FCD9FFF8153F4801E0150F484915034849814890CAFC197F4848173F
+191F485AA2007F180FA31907487EA27FA28002E0705A6E93C8FC14FC14FF15F06CECFF80
+16FCEEFFF06CEEFF8018F06C17FE727E6C18E0856C18FC6C846C727E6C856D84011F846D
+841303010084023F83140F020183EC001FDB007F16801603DC000F15C01700183F060F14
+E0007F1703486C82727E857F85857FA2857F1BC07FA27F1B806D5F7F1B006E5E6E5F6E16
+3F6E4C5A02FC4C5A6E03035B6E6C4A5B03F0023F5B03FF0107B55A01F991B7C7FCD9F07F
+16FCD9E01F16F0D9800716C0D9000193C8FC48D9003F14F8007C020349C9FC4B5F78DD5C
+>I[<ED03FEA81507A5150FA4151FA3153FA2157FA215FFA25CA25C5CA25C5C5C5C91B5FC
+13035B131F017F91B712F00007BAFCBBFCA7C74AC9FCB3B3AAF101FFB1616E17FE82A219
+076E17FC836EEE0FF871131F6E6EEB3FF071137F6E6EEBFFE06EDAFF0313C06E92B51280
+6E1700033F5D6F5D03075D030015E0041F1480040001FCC7FC>72
+132 124 258 90 I<DB0FF8F01FF0017FB594B6FCB74BB7FCA9D8003F94C77E0107190F
+A26D85B3B3B063A463A263A27F6398B6FCA26DF001FB7015036EEF07F3E00FE3806E6D15
+1FE07FC314FF6E6D6CDAFF83EDFFC06E6E010313036E02FCEB3FFE6E91B612FC020017F8
+6F16E0031F16800303EDFE00DB007F14F8040102C093C8FC725E77DC81>I<B800FE017F
+B700F8023FB612F8A9D8000F02F0C8000702C0C9003FEBF800100313806D6E6F7390C7FC
+775E6D69706F6E1607A26D6E6F6277160F6D6970706D161FA26E6E6F61516D163F6E6871
+92B6167FA26E68714A6F15FF6E68714A608A6E9DC8FC714A6F5C6E6771DA0FFD17078A6E
+06F86071021F6F140F6E67714A486C161F8A6F4D6C5F72017F6F143F6F667249486C167F
+8A6F4D6C5F72487113FFA26F02F04A6C4B5B4F17C06F4C6D94C9FCDEF807715AA26F02FC
+496D4B5A070F17F06F4C6D5EDEFE1FEFF80FA26F02FF496E4A5A073F17FC704B6E5D07FF
+EFFE3FA2704B6E4A5A1FFF704B6E5D20FFA27092C86C5DA2704A6F92CAFCA3704A6F5CA2
+704A6F5CA3704A705BA27149705BA37149705BA27149705BA37190CA6C5BA271487190CB
+FC7148715A9D5D7BDBA8>119 D<007FB800C04AB71280A9D800034ACA000791C7FC6D08
+0013F0775A6D6E4E5AA26E6E6064836E4F90C8FC836E4F5A836E4F5AA26E6E4C5AA26E6E
+5F1C3F6E6E5F1C7F836E4F5A846F4D5B846F4D90C9FCA26F6E4A5AA26F6E5D1B0F846F4D
+5A846F4D5A846F4D5AA26F6E4A5AA2706E5C627002C091CAFC6219E0704B5A19F0704B5A
+A2706E485AA2706E485AA27002FE5B1A7F19FF704B5AA2715DA27192CBFCA2715CA2715C
+A3715CA2715CA2715CA2715CA2725BA27290CCFCA3725AA2725AA24E5AA24E5AA261187F
+A24E5AA24D5B13FE2603FF804A90CDFC000F13E0486D4A5A487F486D4A5AA260B56C141F
+4D5AA24D5A17FF604C5B4A4990CEFC6C5D4C5A6C49EB3FFC4A495A6C4948485A9026FE80
+075B270FFFC03F5B6C90B6CFFC6C5D6C15F86C6C5C011F14C0010749D0FC9038007FE071
+857CDB7B>121 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fz cmsy10 10 1
+/Fz 1 14 df<923803FFC0033F13FC4AB67E020715E0913A1FFE007FF8DA7FE0EB07FE4A
+C87ED903FCED3FC0D907F0ED0FE0D90FC0ED03F049486F7E49CA7E017E177E4983498348
+48EF0F80000319C04917074848EF03E0000F19F049170148CC12F8A2001E1978003E197C
+A2003C193C007C193EA20078191EA300F8191FA248190FAA6C191FA20078191EA3007C19
+3EA2003C193C003E197CA2001E1978001F19F8A26C6CEF01F06D1703000719E06C6CEF07
+C06D170F000119806C6CEF1F006D5F017E177E6D5F6D6C4B5A6D6C4B5AD907F0ED0FE0D9
+03FCED3FC0D900FF03FFC7FCDA7FE0EB07FEDA1FFEEB7FF80207B612E002011580DA003F
+01FCC8FC030313C0484E7BBB53>13 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: FA cmr10 10 66
+/FA 66 124 df<EC0FF8EC7FFE903901F80780903907E001C090391F8000E090383F0007
+017E497EA25BA2485A6F5AED018092C8FCA9ED03F0B7FCA33901F8000F1503B3AA486C49
+7E267FFFE0B512C0A32A3B7FBA2E>12 D<DA0FF0EB1FF0DA7FFEEBFFFC903B01F80F83F0
+0F903C07E001CFC00380903C1F8000FF0001C090273F0007FE130F017E4948497EA2495C
+A248485C03076E5A03030203C7FC95C8FCA9F007E0BAFCA33C01F80003F0001F1807B3AA
+486C496C497E267FFFE0B500C1B51280A3413B7FBA45>14 D<121C127FEAFF80A213C0A3
+127F121C1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>39
+D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FC
+A25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E
+1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F
+6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0
+B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7
+FC120E5A5A5A5A5A13527CBD20>I<121C127FEAFF80A213C0A3127F121C1200A4120113
+80A2120313005A1206120E5A5A5A12600A19798817>44 D<B512FCA516057F941C>I<12
+1C127FEAFF80A5EA7F00121C0909798817>I<150C151E153EA2153C157CA2157815F8A2
+15F01401A215E01403A215C01407A21580140FA215005CA2141E143EA2143C147CA21478
+14F8A25C1301A25C1303A2495AA25C130FA291C7FC5BA2131E133EA2133C137CA2137813
+F8A25B1201A25B1203A25B1207A25B120FA290C8FC5AA2121E123EA2123C127CA2127812
+F8A25A12601F537BBD2A>I<EB03F8EB1FFF90387E0FC09038F803E03901E000F0484813
+780007147C48487FA248C77EA2481580A3007EEC0FC0A600FE15E0B3007E15C0A4007F14
+1F6C1580A36C15006D5B000F143EA26C6C5B6C6C5B6C6C485A6C6C485A90387E0FC0D91F
+FFC7FCEB03F8233A7DB72A>I<EB01C013031307131F13FFB5FCA2131F1200B3B3A8497E
+007FB512F0A31C3879B72A>I<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0000E6D7E
+486D7E486D7E123000706D7E126012FCB4EC7F807FA56CC7FC121CC8FCEDFF00A34A5A5D
+14035D4A5A5D140F4A5A4A5A92C7FC147C5C495A495A495A495A91C8FC011EEB01805B5B
+49130348481400485A485A000EC75A000FB6FC5A5A485CB6FCA321387CB72A>I<EB07F8
+EB3FFF4913C03901F80FF03903C007F848486C7E380E0001000F80381FE0006D7FA56C5A
+6C5AC85A1401A25D4A5AA24A5A5DEC0F80027EC7FCEB1FFCECFF809038000FE06E7EEC01
+FC816E7EED7F80A216C0A2153F16E0A2121EEA7F80487EA416C049137F007F1580007EC7
+FC0070ECFF006C495A121E390F8003F83907F00FF00001B512C06C6C90C7FCEB0FF8233A
+7DB72A>I<1538A2157815F8A2140114031407A2140F141F141B14331473146314C31301
+1483EB030313071306130C131C131813301370136013C01201EA038013005A120E120C5A
+123812305A12E0B712F8A3C73803F800AB4A7E0103B512F8A325397EB82A>I<0006140C
+D80780133C9038F003F890B5FC5D5D158092C7FC14FC38067FE090C9FCABEB07F8EB3FFE
+9038780F803907E007E090388003F0496C7E12066E7EC87EA28181A21680A4123E127F48
+7EA490C71300485C12E000605C12700030495A00385C6C1303001E495A6C6C485A3907E0
+3F800001B5C7FC38007FFCEB1FE0213A7CB72A>I<EC3FC0903801FFF0010713FC90380F
+E03E90383F800790387E001F49EB3F804848137F485AA2485A000FEC3F0049131E001F91
+C7FCA2485AA3127F90C9FCEB01FC903807FF8039FF1E07E090383801F0496C7E01607F01
+E0137E497FA249148016C0151FA290C713E0A57EA56C7E16C0A2121FED3F807F000F1500
+6C6C5B15FE6C6C5B6C6C485A3900FE07F090383FFFC06D90C7FCEB03FC233A7DB72A>I<
+12301238123E003FB612E0A316C05A168016000070C712060060140E5D151800E0143848
+5C5D5DC712014A5A92C7FC5C140E140C141C5CA25CA214F0495AA21303A25C1307A2130F
+A3495AA3133FA5137FA96DC8FC131E233B7BB82A>I<EB03F8EB1FFF017F13C09038FC07
+F03901E001F848486C7E4848137C90C77E48141E000E141F001E80A3121FA27F5D01E013
+1E6C6C133E01FC133C6D5B6C6C6C5AECC1E06CEBF3C06C01FFC7FC6C5BEB3FFF6D13C081
+017F13F801F07F3903E07FFE3907801FFF48486C1380481303003E6D13C0003CEB007F00
+7C143F0078EC0FE000F814075A1503A21501A36C15C012781503007C15806CEC07006C5C
+6C6C131ED807E0137C3903F803F0C6B55A013F1380D907FCC7FC233A7DB72A>I<EB03F8
+EB1FFF017F13C09038FC07E03903F803F048486C7E48486C7E49137E121F48487FA2007F
+158090C7FCA248EC1FC0A616E0A56C143FA27F123F001F147FA26C6C13FF3907E001DF00
+03149F3801F0033900FC0F1FD93FFC13C0EB07F090C7FC153F1680A316005D000F147E48
+7E486C5BA24A5A4A5A49485A6C48485A001C495A260F807FC7FC3807FFFC000113F03800
+3FC0233A7DB72A>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00
+121C092479A317>I<EC03FF021F13E09138FC00FCD901E0131ED90780EB0780011EC7EA
+01E00138EC00704981498148488148488190C97E48D901FC1480000ED907FFEB01C0000C
+90391F03C000001C90267E00E013E000184901701360263801F86D13700030496D133001
+03EC0FE0267007E00107133800601718495AA200E0171C484848150CAA6C6C7E1260A26D
+6C151C00701718263003F0130F0101141F00386D013F1338261800FC01771330001C017E
+9038E3F070000C90261F03C113E0000E903A07FF00FFC06CD901FCEB3F006C90CAFC7F6C
+7E6C7E13706D167C011EED03FCD90780EC1FF0D901E0ECFF80D900FC90383FFC00021FB5
+1280020301E0C7FC363C7BBA41>64 D<1538A3157CA315FEA34A7EA34A6C7EA202077FEC
+063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A202707FEC6003A202C07F1501
+A2D901807F81A249C77F167FA20106810107B6FCA24981010CC7121FA2496E7EA3496E7E
+A3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512FEA3373C7DBB3E>I<B7
+12E016FC16FF0001903980007FC06C90C7EA1FE0707E707E707EA2707EA283A75F16035F
+4C5A4C5A4C5A4C5AEEFF8091B500FCC7FCA291C7EA7F80EE1FE0EE07F0707E707E83707E
+A21880177F18C0A7188017FFA24C13005F16034C5AEE1FF8486DEB7FF0B812C094C7FC16
+F832397DB83B>I<913A01FF800180020FEBE003027F13F8903A01FF807E07903A03FC00
+0F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE153F12014848151F484815
+0FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD127F6DED0180A3123F7F
+001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F15386D6C5CD91FE05C6D
+6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F13F002011380313D7BBA
+3C>I<B712C016F816FE000190398001FF806C90C7EA3FE0EE0FF0EE03F8707E707E177F
+A2EF3F8018C0171F18E0170F18F0A3EF07F8A418FCAC18F8A4EF0FF0A218E0A2171F18C0
+EF3F80A2EF7F0017FE4C5A4C5AEE0FF0EE3FE0486DEBFF80B8C7FC16F816C036397DB83F
+>I<B812FCA30001903880000F6C90C71201EE007E173E171E170EA31706A317078316C0
+A394C7FCA31501A21503150F91B5FCA3EC000F15031501A21500A21860A318E093C712C0
+A41701A3EF0380A21707A2170F173F177F486D903807FF00B9FCA333397DB839>I<B812
+F8A30001903880001F6C90C71201EE00FC177C173C171CA2170CA4170E1706A2ED0180A2
+1700A41503A21507151F91B5FCA3EC001F15071503A21501A692C8FCAD4813C0B612C0A3
+2F397DB836>I<DBFF8013C0020FEBF001023F13FC9139FF803F03903A03FC000787D90F
+F0EB03CF4948EB00EF4948147F4948143F49C8121F485A4848150F48481507A248481503
+A2485A1701123F5B007F1600A448481600AB93B6FCA26C7E9338007FE0EF3FC0A2123F7F
+121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D6C14FF6D6C14EFD90FF8EB03C7D903FE
+EB0783903A00FFC03F0191393FFFFC00020F01F0130002001380383D7CBA41>I<B648B5
+12FEA30001902680000313006C90C76C5AB3A491B6FCA391C71201B3A6486D497EB648B5
+12FEA337397DB83E>I<B612C0A3C6EBC0006D5AB3B3AD497EB612C0A31A397EB81E>I<01
+3FB512E0A39039001FFC00EC07F8B3B3A3123FEA7F80EAFFC0A44A5A1380D87F005B0070
+131F6C5C6C495A6C49C7FC380781FC3801FFF038007F80233B7DB82B>I<B649B5FCA300
+0101809038007FF06C90C8EA3F80053EC7FC173C17385F5F4C5A4C5A4CC8FC160E5E5E5E
+5E4B5AED0780030EC9FC5D153E157E15FF5C4A7F4A6C7E140E4A6C7E4A6C7E14704A6C7E
+4A6C7E14804A6C7E6F7EA26F7F707EA2707E707EA2707EA2707E707EA2707E707F848448
+6D497FB6011FEBFF80A339397DB841>I<B612E0A3000101C0C8FC6C90C9FCB3AD1718A5
+17381730A31770A317F0A216011603160FEE1FE0486D13FFB8FCA32D397DB834>I<B593
+3807FFF86E5DA20001F0FC002600DFC0ED1BF8A2D9CFE01533A3D9C7F01563A3D9C3F815
+C3A2D9C1FCEC0183A3D9C0FEEC0303A2027F1406A36E6C130CA36E6C1318A26E6C1330A3
+6E6C1360A26E6C13C0A3913901FC0180A3913900FE0300A2ED7F06A3ED3F8CA2ED1FD8A3
+ED0FF0A3486C6D5A487ED80FFC6D48497EB500C00203B512F8A2ED018045397DB84C>I<
+B5913807FFFE8080C69238007FE06EEC1F80D9DFF0EC0F001706EBCFF8EBC7FCA2EBC3FE
+EBC1FFA201C07F6E7EA26E7E6E7E81140F6E7E8114036E7E168080ED7FC016E0153FED1F
+F0ED0FF8A2ED07FCED03FEA2ED01FF6F1386A2EE7FC6EE3FE6A2EE1FF6EE0FFEA2160716
+03A216011600A2177E486C153E487ED80FFC151EB500C0140EA2170637397DB83E>I<EC
+03FF021F13E09138FE01FC903901F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C
+7E01FE6E7E48486E7E49157E0003167F4848ED3F80A24848ED1FC0A2001F17E049150F00
+3F17F0A3007F17F8491507A300FF17FCAC007F17F86D150FA3003F17F0A26C6CED1FE0A3
+6C6CED3FC0000717806D157F000317006C6C15FEA26C6C4A5A017F4A5A6D6C495A6D6C49
+5AD907E0EB1F80D903F8017FC7FC903900FE01FC91381FFFE0020390C8FC363D7BBA41>
+I<B712C016F816FE000190398001FF806C90C7EA3FC0EE0FE0EE07F0EE03F817FC17FE16
+01A217FFA717FEA2EE03FCA2EE07F817F0EE0FE0EE3FC0923801FF0091B512FC16F091C9
+FCB3A5487FB6FCA330397DB839>I<B612FEEDFFE016F8000190388007FE6C90C76C7EEE
+3FC0707E707E707EA2707EA283A65FA24C5AA24C5A4C5AEE3F8004FFC8FCED07FC91B512
+E05E9138000FF0ED03F8ED00FE82707E707EA2161F83A583A6F00180A217F8160F180348
+6D01071400B66D6C5A04011306933800FE0ECAEA3FFCEF07F0393B7DB83D>82
+D<D90FF813C090383FFE0190B512813903F807E33907E000F74848137F4848133F48C712
+1F003E140F007E1407A2007C140312FC1501A36C1400A37E6D14006C7E7F13F86CB47E6C
+13F8ECFF806C14E06C14F86C14FEC680013F1480010714C0EB007F020713E0EC007FED3F
+F0151F150FED07F8A200C01403A21501A37EA216F07E15036C15E06C14076C15C06C140F
+6DEB1F80D8FBF0EB3F00D8F0FE13FE39E03FFFF8010F13E0D8C00190C7FC253D7CBA2E>
+I<003FB812E0A3D9C003EB001F273E0001FE130348EE01F00078160000701770A3006017
+30A400E01738481718A4C71600B3B0913807FF80011FB612E0A335397DB83C>I<B69038
+07FFFEA3000101809038007FE06C90C8EA1F80EF0F001706B3B2170E6D150C80171C133F
+17186D6C14385F6D6C14F06D6C5C6D6C495A6D6CEB07806D6C49C7FC91387F807E91381F
+FFF8020713E09138007F80373B7DB83E>I<007FB590383FFFFCA3C601F801071380D97F
+E0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C1306160E6D6C5B6DEB
+8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC5D14036E7EA26E7F
+6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91380E03FE140C4A6C7EEC38
+000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E7E130E010C6E7E011C1401
+013C8101FE822607FF80010713E0B500E0013FEBFF80A339397EB83E>88
+D<EB1FE0EBFFFC3803E03F3907000F80390F8007E0486C6C7E13E06E7EA26E7E6C5A6C5A
+C8FCA4147FEB07FFEB3FE0EBFE00EA03F8EA0FF0EA1FC0123F485A90C7FC160C12FEA314
+01A26C13036CEB077C903980063E18383FC01E3A0FE0781FF03A03FFF00FE03A007F8007
+C026277DA52A>97 D<EA03F012FFA3120F1203B0EC1FE0EC7FF89038F1E03E9039F3801F
+809039F7000FC001FEEB07E049EB03F049EB01F85BED00FCA216FEA2167E167FAA167E16
+FEA216FC15016D14F8ED03F07F01EEEB07E001C6EB0FC09039C7801F00903881E07E9038
+00FFF8C7EA1FC0283B7EB92E>I<EB03FC90381FFF8090387E03E03901F80070484813F8
+3907E001FC380FC003A2EA1F80123F90380001F848EB00F01500A2127E12FEAA127E127F
+A26C14067F001F140E6D130C000F141C6C6C13386C6C13706C6C13E039007C07C090381F
+FF00EB07F81F277DA525>I<ED0FC0EC03FFA3EC003F150FB0EB03F8EB1FFF90387E078F
+9038F801EF3903F0007F4848133F4848131FA24848130F123F90C7FC5AA2127E12FEAA12
+7E127FA27EA26C6C131FA26C6C133F6C6C137F6C6CEBEFF03A01F801CFFF39007C078F90
+381FFE0FD907F813C0283B7DB92E>I<EB07F8EB1FFF90387C0FC03901F803E03903F001
+F0D807E013F8380FC0004848137CA248C7127E153E5A153F127E12FEA3B7FCA248C8FCA5
+127EA2127FA26C14037F001F14076C6C13060007140E6D131CD801F013386C6C13709038
+7E03E090381FFF80903803FC0020277EA525>I<147E903803FF8090380FC1E0EB1F8790
+383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8
+A31C3B7FBA19>I<ED03F090390FF00FF890393FFC3C3C9039F81F707C3901F00FE03903
+E007C03A07C003E010000FECF000A248486C7EA86C6C485AA200075C6C6C485A6D485A6D
+48C7FC38073FFC38060FF0000EC9FCA4120FA213C06CB512C015F86C14FE6CECFF804815
+C03A0F80007FE048C7EA0FF0003E140348140116F8481400A56C1401007C15F06CEC03E0
+003F1407D80F80EB0F80D807E0EB3F003901FC01FC39007FFFF0010790C7FC26387EA52A
+>I<EA03F012FFA3120F1203B0EC0FF0EC3FFCECF03F9039F1C01F809039F3800FC0EBF7
+0013FE496D7EA25BA35BB3A3486C497EB500C1B51280A3293A7EB92E>I<EA0380EA0FE0
+487EA56C5AEA0380C8FCAAEA03F012FFA312071203B3AA487EB512C0A312387EB717>I<
+EA03F012FFA3120F1203B1913801FFFCA39138007FC01600157C15705D4A5A4A5A4AC7FC
+141E1438147814FC13F1EBF3FEEBF73F01FE7FEBF81F496C7E8114076E7E6E7E81140015
+7E157F811680ED1FC0486CEB3FF0B500C0B5FCA3283A7EB92C>107
+D<EA03F012FFA3120F1203B3B3AD487EB512C0A3123A7EB917>I<2703F00FF0EB1FE000
+FFD93FFCEB7FF8913AF03F01E07E903BF1C01F83803F3D0FF3800FC7001F802603F70013
+CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA3
+40257EA445>I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F700
+13FE496D7EA25BA35BB3A3486C497EB500C1B51280A329257EA42E>I<EB03FE90380FFF
+8090383E03E09038F800F84848137C48487F48487F4848EB0F80001F15C090C712074815
+E0A2007EEC03F0A400FE15F8A9007E15F0A2007F14076C15E0A26C6CEB0FC0000F15806D
+131F6C6CEB3F006C6C137EC66C13F890387E03F090381FFFC0D903FEC7FC25277EA52A>
+I<3903F01FE000FFEB7FF89038F1E07E9039F3801F803A0FF7000FC0D803FEEB07E049EB
+03F04914F849130116FC150016FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB
+0FE001F614C09039F7803F009038F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328
+357EA42E>I<3807E01F00FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038
+EC03E09038FC0080491300A45BB3A2487EB512F0A31C257EA421>114
+D<EBFF03000313E7380F80FF381E003F487F487F00707F12F0A2807EA27EB490C7FCEA7F
+E013FF6C13E06C13F86C7F00037FC67F01071380EB007F141F00C0EB0FC01407A26C1303
+A37E15806C13077EEC0F00B4131E38F3C07C38E1FFF038C03F801A277DA521>I<1318A5
+1338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215C0A93800FC011580
+EB7C03017E13006D5AEB0FFEEB01F81A347FB220>I<D803F0EB07E000FFEB01FFA3000F
+EB001F00031407B3A4150FA3151F12016D133F0000EC77F86D9038E7FF8090383F03C790
+381FFF87903A03FC07E00029267EA42E>I<B538803FFEA33A0FF8000FF06C48EB07E000
+03EC03C06D148000011500A26C6C1306A26D130E017E130CA26D5BA2EC8038011F1330A2
+6D6C5AA214E001075BA2903803F180A3D901FBC7FCA214FF6D5AA2147CA31438A227257E
+A32C>I<B53A1FFFE03FFEA3260FF8009038000FF86C48017EEB03E018C00003023EEB01
+80A26C6C013FEB0300A36C6CEC8006156FA2017E9038EFC00C15C7A2D93F016D5A158302
+81EBF038D91F831430150102C3EBF87090260FC6001360A2D907E66D5A02EC137CA2D903
+FCEB7F804A133FA2010192C7FC4A7FA20100141E4A130E0260130C37257EA33C>I<B538
+807FFFA33A03FE003FF00001EC1F80000092C7FC017E131C6D13186D6C5AECC070010F5B
+6D6C5AECF180EB03FB6DB4C8FC6D5AA2147F804A7E8114CF903801C7E090380383F09038
+0703F8EB0601496C7E011C137E49137F01787F496D7E486C80000FEC3FF0D8FFFE90B512
+80A329247FA32C>I<B538803FFEA33A0FF8000FF06C48EB07C00003EC03806C7E16007F
+00001406A2017E5BA2137F6D5BA26D6C5AA2ECC070010F1360A26D6C5AA214F101035BA2
+D901FBC7FCA214FF6D5AA2147CA31438A21430A214701460A25CA2EA7C0100FE5B130391
+C8FC1306EAFC0EEA701C6C5AEA1FF0EA0FC027357EA32C>I<B81280A2290280962A>123
+D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: FB cmr7 7 3
+/FB 3 52 df<13381378EA01F8121F12FE12E01200B3AB487EB512F8A215267BA521>49
+D<13FF000313E0380E03F0381800F848137C48137E00787F12FC6CEB1F80A4127CC7FC15
+005C143E147E147C5C495A495A5C495A010EC7FC5B5B903870018013E0EA018039030003
+0012065A001FB5FC5A485BB5FCA219267DA521>I<13FF000313E0380F01F8381C007C00
+30137E003C133E007E133FA4123CC7123E147E147C5C495AEB07E03801FF8091C7FC3800
+01E06D7E147C80143F801580A21238127C12FEA21500485B0078133E00705B6C5B381F01
+F03807FFC0C690C7FC19277DA521>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: FC cmr8 8 13
+/FC 13 118 df<13031307130E131C1338137013F0EA01E013C01203EA0780A2EA0F00A2
+121EA35AA45AA512F8A25AAB7EA21278A57EA47EA37EA2EA0780A2EA03C0120113E0EA00
+F013701338131C130E1307130310437AB11B>40 D<12C07E12707E7E7E120FEA07801203
+13C0EA01E0A2EA00F0A21378A3133CA4131EA5131FA2130FAB131FA2131EA5133CA41378
+A313F0A2EA01E0A2EA03C013801207EA0F00120E5A5A5A5A5A10437CB11B>I<EC0380B3
+A4B812FCA3C7D80380C7FCB3A42E2F7CA737>43 D<EB3FC0EBFFF03803E07C48487E4848
+7E497E001EEB0780A2003E14C0A248EB03E0A500FC14F0B0007C14E0A3007E1307003E14
+C0A36CEB0F806C14006D5A3807C03E3803F0FC3800FFF0EB3FC01C2D7DAB23>48
+D<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23>I<EB7F80
+3801FFF0380780FC380E003F48EB1F8048EB0FC05A0060EB07E012F000FC14F07E1403A3
+007C1307C7FCA215E0140F15C0141F1580EC3F00147E147C5C495A495A495A495A011EC7
+FC5B5B4913305B485A4848136048C7FC000E14E0001FB5FC5A4814C0B6FCA21C2C7DAB23
+>I<EB3FC03801FFF03807C0FC380E007E487FEC1F80003F14C0A2EB800F1300A2000C13
+1FC7FC1580A2EC3F00143E5C5CEB03F0EBFFC014F0EB00FC143FEC1F8015C0140F15E0A2
+EC07F0A21238127C12FEA3EC0FE012F8006014C00070131F6C1480001EEB3F00380780FC
+3801FFF038007FC01C2D7DAB23>I<EB03F8EB0FFE90383E0780EBF8013901F007C03803
+E00FEA07C0EA0F80A2391F00078091C7FC123EA2127EA2127CEB0FC038FC3FF0EBF07C38
+FDC01EB4487E01001380EC07C04814E0A214034814F0A4127CA3127EA2003E14E0140712
+1E001F14C06CEB0F803907801F003803C03E6C6C5A38007FF0EB1FC01C2D7DAB23>54
+D<B812FCA3CBFCADB812FCA32E137C9937>61 D<EB1F80EBFFF03803E0783807C03E380F
+801E381F001FEC0F80123E007E130715C0127C12FCA3B6FCA200FCC8FCA5127EA2003E14
+C0123F6C1301390F80038001C013003803E00F3801F03C38007FF8EB1FC01A207E9E1F>
+101 D<380781F838FF87FEEB8E3FEA0F9CEA07B813B0EBF01EEBE000A45BB0487EB5FCA2
+181E7E9D1C>114 D<1360A413E0A312011203A21207121FB512F0A23803E000AF1418A7
+14383801F03014703800F860EB3FE0EB0F80152A7FA81B>116 D<D807C013F800FF131F
+A2000F130100071300B21401A314033803E007EC0EFC3A01F81CFFC038007FF890391FE0
+F800221F7E9D27>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: FD cmr12 12 34
+/FD 34 122 df<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A3120113
+80120313005A1206120E5A5A5A12600B1D78891B>44 D<121EEA7F80A2EAFFC0A4EA7F80
+A2EA1E000A0A78891B>46 D<14FF010713E090381F81F890383E007C01FC133F4848EB1F
+8049130F4848EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC48
+15FEA54815FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0
+000315C06D130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC
+28447CC131>48 D<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E00
+7FB6FCA3204278C131>I<EB03FE90381FFFC0017F13F03901F80FFC3903C001FE48486C
+7E000EC7EA7F8048EC3FC0ED1FE04815F00030140F007015F800601407126CB415FC7F7F
+1503A46C4813076CC7FCC8FC16F8A2150F16F0151F16E0A2ED3FC0ED7F8016005D5D4A5A
+4A5A4A5A5D4A5A4A5A4AC7FC147C5C5C495A495A495A49C7120C131E5B013814185B5B48
+5A4848143848C81230000E1570001FB612F0A25A5AB712E0A326427BC131>I<49B4FC01
+0F13E0013F13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0F
+E0486C14F8A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE
+4A5AEC03F0EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07
+F816FC150316FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC00701407
+003015F80038140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFF
+F8010F13E0010190C7FC28447CC131>I<14FF010713E0011F13F890387F80FC9038FC00
+7E48487F4848EB1F804848EB0FC0000FEC07E0485AED03F0485A16F8007F140190C713FC
+A25AA216FE1500A516FFA46C5CA36C7E5D121F7F000F5C6C6C130E150C6C6C131C6C6C5B
+D8007C5B90383F01E090390FFF80FE903801FE0090C8FC150116FCA4ED03F8A216F0D80F
+801307486C14E0486C130F16C0ED1F80A249EB3F0049137E001EC75A001C495A000F495A
+3907E01FE06CB51280C649C7FCEB1FF028447CC131>57 D<121EEA7F80A2EAFFC0A4EA7F
+80A2EA1E00C7FCB3A5121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2B78AA1B>I<B8FC17
+F017FC00019039C00007FF6C499038007FC0017FED1FE0EF07F0EF03FC717E717E84727E
+727E727EA2727E85180385A2180185A38584A31A80AD1A00A36061A36118036118076118
+0F614E5A183F614EC7FC18FEEF03FC4D5AEF1FE001FFED7FC0486DD907FFC8FCB812FC17
+F094C9FC41447CC34B>68 D<DB0FFE146092B500C013E0020314F0913A0FFC01FC019139
+3FC0003E02FFC7EA0F83D903FCEC03C74948EC01E74948EC00FF4948157F4948153F4948
+151F49C9120F485A491607120348481603A248481601A248481600A2123FA2491760127F
+A396C7FC485AAD4CB612C06C7EA293C7387FF000725A003F171F7FA2121F7F120FA26C7E
+A26C7E6C7EA26C7E6D7E6D6C153F6D7E6D6C157F6D6C15E7D903FEEC01C7D900FFEC0383
+DA3FE0EB0F01DA0FFCEBFE000203B500F81360020002E090C7FCDB0FFEC9FC42487BC54D
+>71 D<010FB512FEA3D9000313806E130080B3B3AB123F487E487EA44A5A13801300006C
+495A00705C6C13076C5C6C495A6CEB1F802603E07FC7FC3800FFFCEB1FE027467BC332>
+74 D<B612F8A3000101E0C9FC6C6C5A5CB3B31830A418701860A518E0A3EF01C0A21703
+1707A2170F173F177FEE01FF48486C011F1380B9FCA334447CC33D>76
+D<ED1FFC4AB512C0913907F007F091391F8000FC027EC7123FD901F8EC0FC049486E7E49
+486E7E49486E7E49486E7E49C9127E017E8201FE834848707E4848707EA24848707EA200
+0F84491603001F84A24848707EA3007F84A24982A300FF1980AD6C6C4C1300A4003F606D
+1603A2001F60A26C6C4C5AA26C6C4C5AA20003606D161F6C6C4C5A000060017F4CC7FC6E
+5D013F5E6D6C4A5AD907E0EC03F06D6C4A5AD901FCEC1FC0D9007E4AC8FCDA1F8013FC91
+3907F007F00201B512C09126001FFCC9FC41487BC54C>79 D<B712E016FF17C000019039
+C0003FF86C6C48EB03FCEE00FF717E717E717E717E717EA284170384A760A21707604D5A
+A24D5A4D5A4DC8FCEE01FEEE07F8EE3FE091B6C9FC16FC913980007F80EE0FE0707EEE03
+FC707E160083717EA2717EA784A71A6084171FA21AE0716C13C02601FFE002071301B600
+C01680943801FC03943900FE0700CBEA3FFEF007F843467CC348>82
+D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0EB079F49EB03DF48
+486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA26C6C91C7FC7F7FEA
+3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0010F80010180D900
+1F7F14019138001FFF03031380816F13C0167F163F161F17E000C0150FA31607A37EA36C
+16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8F07C495A90393FC0
+0FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>I<B60107B500F890380FFFFE
+A3000301E0D9001F90C813F06C0180DA0FFCED3FC091C86C48ED1F006C871C0E6D6C6E7E
+1C0CA26D6C6F5DA36EDA06FF1538011F1A30A26E020E6D1470010FDB0C7F1560A26E021C
+7F0107DB183F5DA2856D6CDA301F4A5AA36D6C4A6C6C49C7FCA36D6C4A6C6C1306A3DB80
+016E130E027FDA8003140CA2DBC00380023FDA00015CA203E081021F01066D5CA36E6C48
+6E6C5AA36E6C486E6C5AA36F48EC1FE1020360A2DBFE7015F302010160020F90C8FCA2DB
+FFE015FB6E49EC07FEA36F486E5AA36FC86C5AA3031E6F5AA4030C16605F467EC364>87
+D<003FB500E0011FB5FCA3C691C7000713E0D93FFC020190C7FC6D4815FC010F6F5A6D6C
+15E0A26D6C4A5A6D6C5D4DC8FC6D6D5B6E6C13065F6E6C131C6E6C13185F6E6C13706E6C
+13605F913803FE01DA01FF5B4CC9FC6E1387ED7FC616CCED3FFC6F5A5E6F7E6F7EA26F7E
+82A203067F150E92380C7FC04B6C7E15389238301FF04B6C7E15E04B6C7E4A486C7E1403
+4B6C7E02066D7F140E020C6E7E4A6E7E143802306E7E4A6E7E14E04A6E7E49486E7E1303
+49C86C7E496F7F5B496C8201FF83000701E0020313F8B500F8021FEBFFF0A344447EC349
+>I<EB07FC90383FFF809038F80FE03903C003F048C66C7E000E6D7ED80FC0137E486C13
+7F6D6D7EA36F7EA26C5AEA0380C8FCA4EC0FFF49B5FC90380FFE1FEB3FC0EBFF00EA03FC
+485A485A485A485A127F5B176048C7FCA3153FA36D137F007F14EF6D9038C7E0C0003F13
+013A1FE00783F13B07F81E03FF802701FFFC0113003A001FE0007C2B2E7CAC31>97
+D<EA01FC12FFA3120712031201B3EC03FC91380FFF8091383C07E091387001F89039FDE0
+007E02807F01FFEC1F8091C713C049EC0FE049140717F0A2EE03F8A217FCA2160117FEAB
+17FC1603A217F8A2EE07F0A26DEC0FE017C06D141F01FBEC3F80D9F380EB7E00D9E1C05B
+9039E0F001F89039C03C07E09039801FFF80C7D803FCC7FC2F467DC436>I<EC7F809038
+03FFF090380FC07C90383F000F01FCEB03804848EB01C00003140F4848EB1FE049133F12
+0F485AA2485AED1FC0007FEC070092C7FCA290C9FC5AAB7E7FA2123F16307F001F15706C
+6C146016E06C6C14C06C6C13010001EC03806C6CEB0700013F131E90381FC078903807FF
+F001001380242E7DAC2B>I<167FED3FFFA315018182B3EC7F80903803FFF090380FC07C
+90383F000E017E1307496D5AD803F87F48487F5B000F81485AA2485AA2127FA290C8FC5A
+AB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C6C010E13C0013F01
+1C13FE90380FC0F8903803FFE09026007F0013002F467DC436>I<EB01FE903807FFC090
+381F03F090387E00FC49137E48487F485A4848EB1F80000F15C049130F121F484814E015
+07A2007F15F090C7FCA25AA390B6FCA290C9FCA67EA27FA2123F16306C7E1670000F1560
+6D14E06C6C14C0000314016C6CEB03806C6CEB0700013E131E90381F80F8903803FFE001
+0090C7FC242E7DAC2B>I<EA01FC12FFA3120712031201B3EC01FE913807FFC091381E07
+F091383801F802707FECE000D9FDC07F5C01FF147F91C7FCA25BA35BB3A8486CECFF80B5
+D8F83F13FEA32F457DC436>104 D<EA01E0EA07F8A2487EA46C5AA2EA01E0C8FCADEA01
+FC12FFA3120712031201B3B0487EB512F8A315437DC21C>I<EA01FC12FFA31207120312
+01B3B3B3A5487EB512F8A315457DC41C>108 D<D801FC01FFEC1FE000FF010701E0EBFF
+FC913B0F03F801E07F913C3C01FC07803F800007903C7000FE0E001FC0000349D97E1C13
+0F2601FDC0D97F38804A143001FFDA3FF06D7E91C75BA2495DA3495DB3A8486C4A6C497E
+B5D8F81FB50003B512E0A34B2C7DAB52>I<3901FC01FE00FF903807FFC091381E07F091
+383801F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8486CEC
+FF80B5D8F83F13FEA32F2C7DAB36>I<EC7F80903803FFF090380FC0FC90383E001F496D
+7E496D7E48486D7E48486D7E48486D7E000F81A24848147E003F157FA290C87E481680A4
+4816C0AA6C1680A26D147F003F1600A2001F157E6D14FE000F5D6D130100075D6C6C495A
+6C6C495A6C6C495A013E49C7FC90381FC0FE903807FFF89038007F802A2E7DAC31>I<39
+01FC03FC00FF90380FFF8091383C07E091387001F83A07FDE000FE00030180137FD801FF
+EC3F8091C7EA1FC04915E049140F17F0160717F8160317FCA3EE01FEABEE03FCA3EE07F8
+A217F0160F6D15E0EE1FC06D143F17806EEB7E00D9FDC05B9039FCF003F891383C0FE091
+381FFF80DA03FCC7FC91C9FCAE487EB512F8A32F3F7DAB36>I<3903F803F000FFEB1FFC
+EC3C3EEC707F0007EBE0FF3803F9C000015B13FBEC007E153C01FF13005BA45BB3A748B4
+FCB512FEA3202C7DAB26>114 D<90383FE0183901FFFC383907E01F78390F0003F8001E
+1301481300007C1478127800F81438A21518A27EA27E6C6C13006C7E13FC383FFFE06C13
+FC6C13FF6C14C06C14E0C614F0011F13F81300EC0FFC140300C0EB01FE1400157E7E153E
+A27EA36C143C6C147C15786C14F86CEB01F039F38003E039F1F00F8039E07FFE0038C00F
+F01F2E7DAC26>I<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0B6FCA2
+C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030ECC070903807E0E09038
+01FFC09038007F001E3E7EBC26>I<D801FC147F00FFEC3FFFA300071401000380000181
+B3A85EA35DA212006D5B017E9038077F80017F010E13C06D011C13FE90380FC078903803
+FFF09026007F8013002F2D7DAB36>I<B539F001FFFCA3000790C7EA7FE06C48EC1F8000
+011600160E0000150C6D141C6D1418A26E1338013F1430A26D6C5BA26E13E0010F5CA26D
+6C485AA2ECF803010391C7FCA2903801FC06A2ECFE0E0100130CA2EC7F18A215B8EC3FB0
+A2EC1FE0A36E5AA26E5AA36EC8FCA21406A35CA25CA2123C007E5BB4FC5CA25CEAFE0138
+7C0380D87007C9FCEA3C1EEA0FFCEA03F02E3F7EAA33>121 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: FE cmr17 17.28 12
+/FE 12 118 df<120FEA3FC0EA7FE0EAFFF0A213F8A313FC127FEA3FDCEA0F1C1200A713
+3C1338A31378A2137013F0A213E01201EA03C0A2EA078013005A121E5A5AA212300E2874
+E324>39 D<DDFFF015C0040F01FF1401047F14E00303B600F81303030F9038E003FEDB3F
+FCC7007F1307DBFFE0EC0FC002030180913803E00F4A48C83801F01F4A48ED0078DA3FF0
+EE3C3F4A48161E4A48EE0F7F4949EE07FF4990CA7E495A4948834948835C013F197F4948
+183F495A1B1F485B1B0F4890CCFCA248481907A2485A1B03121F5BA2123F1B015BA2127F
+98C8FCA35B12FFB06C7EA24EB712E0A3123F95C7000FEBF0006D06015B64001F857FA212
+0F7F1207A26C7EA26C7FA26C7FA26D7E6D7E131F806D7E6D6C5F6D7E6D6D5E6D7F6E6CEE
+07BFDA3FF8EE0F3FDA0FFCEE1F1F6EB4163E6E01C0EDFC0F020001F0913801F807DB3FFE
+EC0FE092260FFFF09038FF8003030390B538FE0001DB007F02F81300040F02C091C7FC04
+0001F8CAFC5B667AE368>71 D<B712E0A4C60280CAFCD93FFCCBFC131F5CB3B3B21A1CA6
+1A3C1A38A61A78A41AF8A21AF01901A219031907A2190F191F193F197FF001FF1807013F
+043F13E0D9FFFC0203B5FCBBFCA4466279E153>76 D<DA07FF1403023F01F05B49B512FC
+010702FF5B90260FFC0013C0D93FE090380FF01FD97F80EB03F801FEC86C5A4848157E48
+48ED1F7F48486F5A4848815B001F824981003F8290CAFC4883A2007E83A212FE84A384A2
+7EA36D82A26C7EA26D93C7FC6C7E7F7F6C7E6D7E6C13E06C13FCECFFC06C14F86CECFF80
+6C15F86DECFF80011F15E06D15F8010315FE01006F7E021F81020181DA003F80030380DB
+003F7F04037FEE007FEF1FFF71138017037113C083A2F07FE0183FA2181F00E018F0180F
+A41807A27EA47E19E0180F7E19C07E6C171F19806D163F6D17006D5E6D16FE486C5E6D4B
+5AD8FC7F1503D91F80EC0FF026F80FE04A5AD907FCEC7F8029F001FFE003FFC7FC6D6CB5
+12FC48011F14F0020314C0489026001FFEC8FC3C667AE349>83 D<B7031FB512F0A4C691
+CAEBFE00D93FFCEF3FF86D48EF0FE0A2745AA2745AB3B3B3A71A07010F96C7FC80A30107
+601A0E6E171E13031A1C6D6C173C1A386D6D1678626E7E023F4C5A6F4B5A6E6C15076E6C
+4B5A6E6C4BC8FC6E6C153E6E6C15FC9126007FC0495ADB3FF0EB0FF0DB0FFEEB7FC00303
+B6C9FC030014FC043F13F004031380546479E163>85 D<181EEF3FFEEE07FFA4EE000F17
+03A21701B3AAEDFF80020F13F8023F13FE9139FF803F81903A03FC0007C14948EB01E1D9
+1FE0EB00F94948147D4948143D49C8121F4848150F491507120348481503491501120F12
+1F5BA2123F5B127FA45B12FFAD127F7FA3123FA27F121FA26C6C1503A26C6C150712036D
+150F6C6C151F0000163D137F6D6CECF9FF6D6CEB01F1D90FF0D903C113C06D6CD90F81EB
+FF80D901FFEB7F019039007FFFFC021F13E00201010091C7FC41657CE349>100
+D<EC03FE91381FFFE091B512F8903901FE03FE903A07F0007F8049486D7ED93FC06D7E49
+C76C7E496E7E49140348488148481401000782491400000F8283485A1880123F49153FA2
+007F17C0A35BA212FF90B8FCA30180CAFCA9127F7FA3123FA27F121FEF01C06C7E17036C
+6C1680A26C6C15070001EE0F006D150E6C6C151E6D6C5C6D6C5C6D6C5CD907F0EB03E0D9
+03FC495A902700FF803FC7FC91383FFFFC020F13F00201138032417CBF3A>I<133C13FF
+487F487FA66C5B6C90C7FC133C90C8FCB3A2EB03C0EA07FF127FA41201EA007FA2133FB3
+B3AC497E497EB612E0A41B5F7DDE23>105 D<D903C0EB7FC0D807FF903807FFFCB5011F
+13FFDB7F0013C003F8EB1FF0DAC3E0EB07F80001D9C7806D7E26007FCFC76C7E02DE6E7E
+D93FFC6F7E4A6F7E4A82181F4A82727E5C727EA2727EA3727EA41A8084AC4E1300A54E5A
+A2611807A24E5A6E5E181F6E4B5A6E5E187F6E4B5A02DE4A90C7FC02CF4A5ADAC780495A
+DAC3C0EB0FF0DAC1F0EB3FE0913AC07E01FF806FB448C8FC030F13F80300138093CAFCB3
+A3497E497EB612F0A4415B7DBE49>112 D<9039078003F8D807FFEB0FFFB5013F13C092
+387C0FE0913881F01F9238E03FF00001EB838039007F8700148FEB3F8E029CEB1FE0EE0F
+C00298EB030002B890C7FCA214B014F0A25CA55CB3B0497EEBFFF8B612FCA42C3F7CBE33
+>114 D<9139FFE00180010FEBFC03017FEBFF073A01FF001FCFD803F8EB03EFD807E0EB
+01FF48487F4848147F48C8123F003E151F007E150F127CA200FC1507A316037EA27E7F6C
+7E6D91C7FC13F8EA3FFE381FFFF06CEBFF806C14F86C14FF6C15C06C6C14F0011F800107
+14FED9007F7F02031480DA003F13C01503030013E0167F00E0ED1FF0160F17F86C150716
+03A36C1501A37EA26C16F016037E17E06D14076DEC0FC06D1580D8FDF0141FD8F8F8EC7F
+00013E14FC3AF01FC00FF80107B512E0D8E001148027C0003FF8C7FC2D417DBF34>I<D9
+03C0150FD807FFED1FFFB50203B5FCA40001ED0007D8007F1501A2013F81B3B25FA35FA3
+5F011F15066E140E5F130F6E4A7F01075D6D6C494813E0D901FE4948EBFFC0903A00FFC0
+1F8091393FFFFE00020F13F8020001C0EC800042407DBE49>117
+D E
+%EndDVIPSBitmapFont
+end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%PaperSize: A4
+
+%%EndSetup
+%%Page: 0 1
+0 0 bop 1303 1746 a FE(Sup)t(erLU)44 b(Users')f(Guide)807
+2135 y FD(James)33 b(W.)f(Demmel)1614 2099 y FC(1)1916
+2135 y FD(John)g(R.)h(Gilb)s(ert)2596 2099 y FC(2)2897
+2135 y FD(Xiao)m(y)m(e)g(S.)f(Li)3419 2099 y FC(3)1598
+2388 y FD(Septem)m(b)s(er,)h(1999)1358 2504 y(Last)g(up)s(date:)44
+b(Octob)s(er,)33 b(2003)112 4407 y FB(1)149 4437 y FA(Computer)h
+(Science)g(Division,)h(Univ)n(ersit)n(y)e(of)h(California,)h(Berk)n
+(eley)-7 b(,)34 b(CA)g(94720.)53 b(\(demmel at cs.b)r(erk)n(eley)-7
+b(.edu\).)0 4537 y(The)27 b(researc)n(h)d(of)j(Demmel)g(and)g(Li)g(w)n
+(as)e(supp)r(orted)i(in)g(part)f(b)n(y)g(NSF)i(gran)n(t)d(ASC{9313958,)
+e(DOE)k(gran)n(t)e(DE{F)n(G03{)0 4637 y(94ER25219,)d(UT)j(Sub)r(con)n
+(tract)g(No.)g(ORA4466)e(from)i(ARP)-7 b(A)25 b(Con)n(tract)f(No.)h(D)n
+(AAL03{91{C0047,)c(DOE)k(gran)n(t)f(DE{)0 4736 y(F)n(G03{94ER25206,)e
+(and)28 b(NSF)g(Infrastructure)f(gran)n(ts)f(CD)n(A{8722788)e(and)j(CD)
+n(A{9401156.)112 4804 y FB(2)149 4834 y FA(Departmen)n(t)86
+b(of)g(Computer)g(Science,)100 b(Univ)n(ersit)n(y)85
+b(of)h(California,)99 b(San)n(ta)85 b(Barbara,)98 b(CA)86
+b(93106.)0 4933 y(\(gilb)r(ert at cs.ucsb.edu\).)42 b(The)30
+b(researc)n(h)d(of)i(this)h(author)f(w)n(as)f(supp)r(orted)i(in)f(part)
+g(b)n(y)g(the)h(Institute)g(for)f(Mathematics)0 5033
+y(and)20 b(Its)g(Applications)f(at)h(the)g(Univ)n(ersit)n(y)f(of)h
+(Minnesota)f(and)h(in)g(part)f(b)n(y)g(D)n(ARP)-7 b(A)21
+b(Con)n(tract)d(No.)34 b(D)n(ABT63-95-C0087.)0 5133 y(Cop)n(yrigh)n(t)
+413 5130 y(c)390 5133 y Fz(\015)28 b FA(1994-1997)23
+b(b)n(y)k(Xero)n(x)g(Corp)r(oration.)35 b(All)28 b(righ)n(ts)e(reserv)n
+(ed.)112 5200 y FB(3)149 5230 y FA(La)n(wrence)19 b(Berk)n(eley)f
+(National)h(Lab,)i(MS)f(50F1650,)e(1)h(Cyclotron)g(Rd,)i(Berk)n(eley)-7
+b(,)20 b(CA)g(94720.)32 b(\(xiao)n(y)n(e at nersc.go)n(v\).)0
+5330 y(This)21 b(w)n(ork)e(w)n(as)h(supp)r(orted)h(in)g(part)g(b)n(y)g
+(the)g(Director,)h(O\016ce)e(of)h(Adv)-5 b(anced)21 b(Scien)n(ti\014c)g
+(Computing)g(Researc)n(h,)g(Division)0 5429 y(of)g(Mathematical,)i
+(Information,)f(and)f(Computational)g(Sciences)g(of)g(the)h(U.S.)g
+(Departmen)n(t)g(of)f(Energy)f(under)h(con)n(tract)0
+5529 y(n)n(um)n(b)r(er)27 b(DE-A)n(C03-76SF00098.)p eop
+%%Page: 1 2
+1 1 bop 0 945 a Fy(Con)-6 b(ten)g(ts)0 1480 y Fx(1)84
+b(In)m(tro)s(duction)3136 b(3)136 1593 y Fw(1.1)94 b(Purp)s(ose)29
+b(of)i(Sup)s(erLU)66 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(3)136 1706 y(1.2)94
+b(Ov)m(erall)30 b(Algorithm)82 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(4)136 1819
+y(1.3)94 b(What)32 b(the)e(three)h(libraries)c(ha)m(v)m(e)32
+b(in)d(common)85 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(5)345
+1932 y(1.3.1)106 b(Input)29 b(and)h(Output)f(Data)j(F)-8
+b(ormats)66 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(5)345
+2045 y(1.3.2)106 b(T)-8 b(uning)29 b(P)m(arameters)j(for)e(BLAS)55
+b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(6)345 2158
+y(1.3.3)106 b(P)m(erformance)31 b(Statistics)50 b(.)c(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(6)345 2271 y(1.3.4)106
+b(Error)30 b(Handling)51 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(6)345 2384 y(1.3.5)106
+b(Ordering)29 b(the)h(Columns)f(of)h Fv(A)h Fw(for)f(Sparse)f(F)-8
+b(actors)94 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)f(.)131 b(7)345 2497 y(1.3.6)106 b(Iterativ)m(e)32
+b(Re\014nemen)m(t)57 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f
+(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)f(.)131 b(7)345 2610 y(1.3.7)106 b(Error)30 b(Bounds)46
+b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+f(.)131 b(8)345 2722 y(1.3.8)106 b(Solving)29 b(a)i(Sequence)f(of)h
+(Related)f(Linear)g(Systems)e(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(9)345 2835 y(1.3.9)106
+b(In)m(terfacing)31 b(to)g(other)f(languages)35 b(.)46
+b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(9)136 2948 y(1.4)94
+b(Ho)m(w)32 b(the)e(three)h(libraries)c(di\013er)81 b(.)46
+b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h
+(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131
+b(9)345 3061 y(1.4.1)106 b(Input)29 b(and)h(Output)f(Data)j(F)-8
+b(ormats)66 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(9)345
+3174 y(1.4.2)106 b(P)m(arallelism)77 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h
+(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)
+g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(10)345
+3287 y(1.4.3)106 b(Piv)m(oting)30 b(Strategies)h(for)f(Stabilit)m(y)i
+(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(10)345 3400 y(1.4.4)106
+b(Memory)31 b(Managemen)m(t)75 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g
+(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)f(.)85 b(11)345 3513 y(1.4.5)106 b(In)m(terfacing)31
+b(to)g(other)f(languages)35 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(11)136 3626 y(1.5)94 b(P)m(erformance)30 b(.)46 b(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(11)136 3739 y(1.6)94 b(Soft)m(w)m(are)32 b(Status)e(and)g(Av)-5
+b(ailabilit)m(y)81 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(11)136 3852 y(1.7)94 b(Ac)m(kno)m(wledgemen)m(t)25
+b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)f(.)85 b(13)0 4055 y Fx(2)f(Sequen)m(tial)35
+b(Sup)s(erLU)g(\(V)-9 b(ersion)36 b(3.0\))2114 b(14)136
+4168 y Fw(2.1)94 b(Ab)s(out)30 b Fu(SuperLU)49 b Fw(.)c(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)
+g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(14)136 4281 y(2.2)94 b(Ho)m(w)32 b(to)f(call)e(a)i
+Fu(SuperLU)d Fw(routine)c(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)
+h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)f(.)85 b(14)136 4394 y(2.3)94 b(Matrix)31 b(data)g(structures)43
+b(.)j(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(17)136 4507 y(2.4)94 b Fu(Options)29 b Fw(argumen)m(t)68
+b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)
+h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)f(.)85 b(20)136 4620 y(2.5)94 b(P)m(erm)m(utations)65
+b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)
+g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h
+(.)g(.)f(.)h(.)g(.)f(.)85 b(22)345 4733 y(2.5.1)106 b(Ordering)29
+b(for)h(sparsit)m(y)38 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f
+(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)f(.)85 b(22)345 4846 y(2.5.2)106 b(P)m(artial)30
+b(piv)m(oting)g(with)f(threshold)62 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)85 b(23)136 4959 y(2.6)94 b(Symmetric)30 b(Mo)s(de)58
+b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)f(.)85 b(23)136 5072 y(2.7)94 b(Memory)31
+b(managemen)m(t)h(for)e Fv(L)g Fw(and)g Fv(U)83 b Fw(.)46
+b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(23)136 5185
+y(2.8)94 b(User-callable)30 b(routines)91 b(.)46 b(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(24)345
+5297 y(2.8.1)106 b(Driv)m(er)30 b(routines)57 b(.)46
+b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(24)345 5410 y(2.8.2)106 b(Computational)30 b(routines)66
+b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)
+h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(25)345 5523 y(2.8.3)106 b(Utilit)m(y)30 b(routines)48
+b(.)e(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(25)1927 5778 y(1)p eop
+%%Page: 2 3
+2 2 bop 136 280 a Fw(2.9)94 b(Matlab)31 b(in)m(terface)84
+b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)f(.)85 b(27)136 393 y(2.10)49 b(Installation)72
+b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f
+(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(28)345 506 y(2.10.1)61
+b(File)30 b(structure)48 b(.)d(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(28)345 619 y(2.10.2)61
+b(T)-8 b(esting)86 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)
+g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(30)345 732 y(2.10.3)61
+b(P)m(erformance-tuning)30 b(parameters)41 b(.)k(.)h(.)g(.)g(.)f(.)h(.)
+g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)f(.)85 b(31)136 845 y(2.11)49 b(Example)30 b(programs)61
+b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)
+h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)f(.)85 b(32)136 958 y(2.12)49 b(Calling)29 b(from)g(F)-8
+b(ortran)53 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)f(.)85 b(32)0 1162 y Fx(3)f(Multithreaded)35
+b(Sup)s(erLU)g(\(V)-9 b(ersion)36 b(1.1\))1925 b(38)136
+1275 y Fw(3.1)94 b(Ab)s(out)30 b(Sup)s(erLU)p 990 1275
+28 4 v 31 w(MT)60 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)
+h(.)g(.)f(.)h(.)g(.)f(.)85 b(38)136 1387 y(3.2)94 b(Storage)32
+b(t)m(yp)s(es)e(for)h Fv(L)f Fw(and)f Fv(U)53 b Fw(.)46
+b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g
+(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(38)136 1500 y(3.3)94 b(User-callable)30 b(routines)91
+b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)85 b(39)345 1613 y(3.3.1)106 b(Driv)m(er)30 b(routines)57
+b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)85 b(40)345 1726 y(3.3.2)106 b(Computational)30 b(routines)66
+b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)
+h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(40)136 1839 y(3.4)94 b(Installation)72 b(.)46 b(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)
+h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(41)345 1952 y(3.4.1)106 b(File)30 b(structure)48 b(.)d(.)h(.)g(.)g(.)
+f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f
+(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(41)345 2065 y(3.4.2)106 b(P)m(erformance)31 b(issues)49
+b(.)d(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(41)136 2178 y(3.5)94 b(Example)30 b(programs)61 b(.)46
+b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+f(.)85 b(44)136 2291 y(3.6)94 b(P)m(orting)31 b(to)g(other)f(platforms)
+38 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(44)345 2404 y(3.6.1)106 b(Creating)30 b(m)m(ultiple)e(threads)60
+b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)
+g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(44)345
+2517 y(3.6.2)106 b(Use)31 b(of)g(m)m(utexes)57 b(.)46
+b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(45)0 2720 y Fx(4)f(Distributed)35 b(Sup)s(erLU)h(with)e(MPI)h(\(V)-9
+b(ersion)35 b(2.0\))1577 b(46)136 2833 y Fw(4.1)94 b(Ab)s(out)30
+b Fu(SuperLU)p 970 2833 29 4 v 33 w(DIST)36 b Fw(.)45
+b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(46)136 2946 y(4.2)94 b(F)-8 b(ormats)32 b(of)f(the)f(input)f
+(matrices)h Fv(A)g Fw(and)g Fv(B)90 b Fw(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(46)345 3059 y(4.2.1)106 b(Global)30 b(input)81 b(.)45
+b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(46)345 3172 y(4.2.2)106 b(Distributed)29 b(input)i(.)46
+b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(46)136 3285 y(4.3)94 b(Distributed)29 b(data)i(structures)f(for)g
+Fv(L)g Fw(and)g Fv(U)69 b Fw(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g
+(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(47)136 3398 y(4.4)94 b(Pro)s(cess)31 b(grid)e(and)h(MPI)g(comm)m
+(unicator)52 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f
+(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(48)345 3511 y(4.4.1)106 b(2D)32 b(pro)s(cess)d(grid)39
+b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)85 b(48)345 3624 y(4.4.2)106 b(Arbitrary)29 b(grouping)g(of)i(pro)s
+(cesses)40 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(49)136
+3737 y(4.5)94 b(Basic)31 b(steps)f(to)i(solv)m(e)e(a)h(linear)e(system)
+41 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(50)136
+3850 y(4.6)94 b(Algorithmic)29 b(bac)m(kground)58 b(.)46
+b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(54)136 3962 y(4.7)94 b(User-callable)30 b(routines)91
+b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f
+(.)85 b(55)345 4075 y(4.7.1)106 b(Driv)m(er)30 b(routine)23
+b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)
+g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g
+(.)f(.)85 b(55)345 4188 y(4.7.2)106 b(Computational)30
+b(routines)66 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h
+(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(57)345 4301 y(4.7.3)106 b(Utilit)m(y)30 b(routines)48
+b(.)e(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(57)136 4414 y(4.8)94 b(Installation)72 b(.)46 b(.)g(.)f(.)h(.)g(.)
+f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f
+(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(58)345 4527 y(4.8.1)106 b(File)30 b(structure)48
+b(.)d(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+f(.)85 b(58)345 4640 y(4.8.2)106 b(P)m(erformance-tuning)30
+b(parameters)41 b(.)k(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h
+(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85
+b(59)136 4753 y(4.9)94 b(Example)30 b(programs)61 b(.)46
+b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g
+(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)
+f(.)85 b(59)136 4866 y(4.10)49 b(F)-8 b(ortran)32 b(90)f(In)m(terface)
+83 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h
+(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)
+g(.)f(.)85 b(60)345 4979 y(4.10.1)61 b(Callable)29 b(functions)g(in)g
+(the)h(F)-8 b(ortran)31 b(90)h(mo)s(dule)c(\014le)i Ft(spuerlu)p
+2837 4979 28 4 v 33 w(mo)s(d.f90)g Fw(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)
+85 b(64)345 5092 y(4.10.2)61 b(C)30 b(wrapp)s(er)f(functions)g
+(callable)g(b)m(y)h(F)-8 b(ortran)31 b(in)e(\014le)h
+Ft(spuerlu)p 2792 5092 V 33 w(c2f)p 2938 5092 V 33 w(wrap.c)60
+b Fw(.)46 b(.)g(.)f(.)h(.)g(.)f(.)85 b(65)1927 5778 y(2)p
+eop
+%%Page: 3 4
+3 3 bop 0 903 a Fs(Chapter)65 b(1)0 1318 y Fy(In)-6 b(tro)6
+b(duction)0 1800 y Fr(1.1)135 b(Purp)t(ose)45 b(of)g(Sup)t(erLU)0
+2003 y Fw(This)24 b(do)s(cumen)m(t)h(describ)s(es)f(a)i(collection)f
+(of)h(three)f(related)h(ANSI)f(C)g(subroutine)e(libraries)g(for)i
+(solving)f(sparse)0 2116 y(linear)42 b(systems)h(of)h(equations)f
+Fv(AX)55 b Fw(=)47 b Fv(B)5 b Fw(.)80 b(Here)44 b Fv(A)f
+Fw(is)g(a)h(square,)j(nonsingular,)d Fv(n)29 b Fq(\002)f
+Fv(n)43 b Fw(sparse)g(matrix,)0 2228 y(and)c Fv(X)48
+b Fw(and)39 b Fv(B)45 b Fw(are)40 b(dense)g Fv(n)26 b
+Fq(\002)h Fv(nr)s(hs)39 b Fw(matrices,)k(where)c Fv(nr)s(hs)g
+Fw(is)g(the)i(n)m(um)m(b)s(er)d(of)j(righ)m(t-hand)e(sides)g(and)0
+2341 y(solution)g(v)m(ectors.)72 b(Matrix)40 b Fv(A)h
+Fw(need)f(not)h(b)s(e)e(symmetric)h(or)g(de\014nite;)45
+b(indeed,)d(Sup)s(erLU)c(is)h(particularly)0 2454 y(appropriate)h(for)h
+(matrices)g(with)f(v)m(ery)i(unsymmetric)d(structure.)73
+b(All)40 b(three)h(libraries)e(use)i(v)-5 b(ariations)40
+b(of)0 2567 y(Gaussian)28 b(elimination)f(optimized)h(to)h(tak)m(e)i
+(adv)-5 b(an)m(tage)31 b(b)s(oth)e(of)g(sparsit)m(y)f(and)h(the)g
+(computer)g(arc)m(hitecture,)0 2680 y(in)g(particular)g(memory)h
+(hierarc)m(hies)f(\(cac)m(hes\))k(and)c(parallelism.)141
+2793 y(In)34 b(this)f(in)m(tro)s(duction)g(w)m(e)h(refer)g(to)i(all)d
+(three)h(libraries)e(collectiv)m(ely)i(as)h(Sup)s(erLU.)d(The)i(three)h
+(libraries)0 2906 y(within)28 b(Sup)s(erLU)g(are)j(as)g(follo)m(ws.)39
+b(Detailed)31 b(references)f(are)h(also)g(giv)m(en)f(\(see)h(also)g
+([21)q(]\).)136 3094 y Fq(\017)46 b Fx(Sequen)m(tial)24
+b(Sup)s(erLU)d Fw(is)f(designed)f(for)i(sequen)m(tial)f(pro)s(cessors)g
+(with)f(one)i(or)g(more)g(la)m(y)m(ers)g(of)g(memory)227
+3206 y(hierarc)m(h)m(y)30 b(\(cac)m(hes\))j([5].)136
+3394 y Fq(\017)46 b Fx(Multithreaded)j(Sup)s(erLU)g(\()p
+Fu(SuperLU)p 1780 3394 29 4 v 33 w(MT)p Fx(\))41 b Fw(is)h(designed)g
+(for)g(shared)g(memory)h(m)m(ultipro)s(cessors)227 3507
+y(\(SMPs\),)26 b(and)d(can)g(e\013ectiv)m(ely)i(use)e(up)f(to)j(16)f
+(or)g(32)g(parallel)e(pro)s(cessors)h(on)g(su\016cien)m(tly)f(large)i
+(matrices)227 3620 y(in)29 b(order)h(to)h(sp)s(eed)f(up)f(the)i
+(computation)f([6)q(].)136 3808 y Fq(\017)46 b Fx(Distributed)29
+b(Sup)s(erLU)h(\(Sup)s(erLU)p 1681 3808 32 4 v 37 w(DIST\))25
+b Fw(is)f(designed)g(for)h(distributed)e(memory)i(parallel)e(pro-)227
+3920 y(cessors,)41 b(using)36 b(MPI)i([26)q(])g(for)g(in)m(terpro)s
+(cess)f(comm)m(unication.)63 b(It)38 b(can)h(e\013ectiv)m(ely)f(use)g
+(h)m(undreds)e(of)227 4033 y(parallel)29 b(pro)s(cessors)h(on)g
+(su\016cien)m(tly)f(large)h(matrices)h([23)q(,)f(24)q(].)141
+4221 y(T)-8 b(able)34 b(1.1)h(summarizes)e(the)h(curren)m(t)f(status)i
+(of)f(the)g(soft)m(w)m(are.)53 b(All)32 b(the)j(routines)d(are)j
+(implemen)m(ted)d(in)0 4334 y(C,)j(with)g(parallel)e(extensions)i
+(using)f(Pthreads)h(\(POSIX)g(threads)g(for)g(shared-memory)g
+(programming\))g(or)0 4447 y(MPI)30 b(\(for)h(distributed-memory)c
+(programming\).)40 b(W)-8 b(e)32 b(pro)m(vide)d(F)-8
+b(ortran)31 b(in)m(terface)g(for)f(all)g(three)g(libraries.)p
+178 4572 3515 4 v 176 4685 4 113 v 1222 4685 V 1274 4652
+a(Sequen)m(tial)f Fu(SuperLU)p 2095 4685 V 98 w(SuperLU)p
+2489 4652 29 4 v 32 w(MT)p 2804 4685 4 113 v 245 w(SuperLU)p
+3198 4652 29 4 v 32 w(DIST)p 3690 4685 4 113 v 178 4689
+3515 4 v 176 4802 4 113 v 227 4768 a Fw(Platform)p 1222
+4802 V 694 w(serial)p 2095 4802 V 664 w(shared-memory)p
+2804 4802 V 99 w(distributed-memory)p 3690 4802 V 178
+4805 3515 4 v 176 4918 4 113 v 227 4884 a(Language)p
+1222 4918 V 668 w(C)p 2095 4918 V 807 w(C)h(+)g(Pthreads)p
+2804 4918 V 156 w(C)g(+)g(MPI)p 3690 4918 V 176 5031
+V 227 4997 a(\(with)g(F)-8 b(ortran)31 b(in)m(terface\))p
+1222 5031 V 2095 5031 V 974 w(\(or)f(pragmas\))p 2804
+5031 V 3690 5031 V 178 5034 3515 4 v 176 5147 4 113 v
+227 5113 a(Data)i(t)m(yp)s(e)p 1222 5147 V 647 w(real/complex)p
+2095 5147 V 355 w(real)p 2804 5147 V 562 w(real/complex)p
+3690 5147 V 176 5260 V 1222 5260 V 1274 5226 a(single/double)p
+2095 5260 V 340 w(double)p 2804 5260 V 445 w(double)p
+3690 5260 V 178 5263 3515 4 v 1231 5418 a(T)-8 b(able)30
+b(1.1:)42 b(Sup)s(erLU)28 b(soft)m(w)m(are)k(status.)1927
+5778 y(3)p eop
+%%Page: 4 5
+4 4 bop 141 280 a Fw(The)33 b(rest)h(of)f(the)h(In)m(tro)s(duction)e
+(is)h(organized)g(as)h(follo)m(ws.)49 b(Section)34 b(1.2)g(describ)s
+(es)e(the)i(high-lev)m(el)e(algo-)0 393 y(rithm)f(used)h(b)m(y)h(all)e
+(three)i(libraries,)e(p)s(oin)m(ting)f(out)j(some)g(common)g(features)g
+(and)f(di\013erences.)47 b(Section)33 b(1.3)0 506 y(describ)s(es)21
+b(the)i(detailed)e(algorithms,)i(data)h(structures,)f(and)f(in)m
+(terface)h(issues)f(common)g(to)i(all)d(three)i(routines.)0
+619 y(Section)k(1.4)h(describ)s(es)d(ho)m(w)i(the)g(three)h(routines)e
+(di\013er,)g(emphasizing)g(the)h(di\013erences)f(that)i(most)f
+(a\013ect)i(the)0 732 y(user.)38 b(Section)25 b(1.6)h(describ)s(es)d
+(the)i(soft)m(w)m(are)h(status,)h(including)21 b(planned)i(dev)m
+(elopmen)m(ts,)j(bug)f(rep)s(orting,)g(and)0 845 y(licensing.)0
+1131 y Fr(1.2)135 b(Ov)l(erall)47 b(Algorithm)0 1334
+y Fw(A)30 b(simple)f(description)f(of)j(sparse)f(Gaussian)f
+(elimination)f(is)h(as)i(follo)m(ws:)111 1522 y(1.)46
+b(Compute)23 b(a)g Fp(triangular)k(factorization)e Fv(P)1679
+1536 y Fo(r)1718 1522 y Fv(D)1793 1536 y Fo(r)1831 1522
+y Fv(AD)1974 1536 y Fo(c)2009 1522 y Fv(P)2067 1536 y
+Fo(c)2127 1522 y Fw(=)g Fv(LU)10 b Fw(.)38 b(Here)24
+b Fv(D)2703 1536 y Fo(r)2764 1522 y Fw(and)e Fv(D)3008
+1536 y Fo(c)3066 1522 y Fw(are)h(diagonal)f(matrices)227
+1635 y(to)44 b(equilibrate)d(the)j(system,)j Fv(P)1387
+1649 y Fo(r)1468 1635 y Fw(and)c Fv(P)1716 1649 y Fo(c)1794
+1635 y Fw(are)g Fp(p)-5 b(ermutation)47 b(matric)-5 b(es)p
+Fw(.)81 b(Prem)m(ultiplying)39 b Fv(A)44 b Fw(b)m(y)f
+Fv(P)3862 1649 y Fo(r)227 1748 y Fw(reorders)d(the)g(ro)m(ws)g(of)h
+Fv(A)p Fw(,)i(and)c(p)s(ostm)m(ultiplying)d Fv(A)41 b
+Fw(b)m(y)f Fv(P)2376 1762 y Fo(c)2451 1748 y Fw(reorders)f(the)i
+(columns)e(of)h Fv(A)p Fw(.)70 b Fv(P)3675 1762 y Fo(r)3754
+1748 y Fw(and)227 1861 y Fv(P)285 1875 y Fo(c)361 1861
+y Fw(are)41 b(c)m(hosen)g(to)h(enhance)e(sparsit)m(y)-8
+b(,)44 b(n)m(umerical)39 b(stabilit)m(y)-8 b(,)42 b(and)f(parallelism.)
+68 b Fv(L)41 b Fw(is)e(a)i(unit)f(lo)m(w)m(er)227 1974
+y(triangular)30 b(matrix)h(\()p Fv(L)1047 1988 y Fo(ii)1127
+1974 y Fw(=)c(1\))33 b(and)e Fv(U)41 b Fw(is)31 b(an)h(upp)s(er)d
+(triangular)h(matrix.)44 b(The)32 b(factorization)g(can)g(also)227
+2086 y(b)s(e)e(applied)e(to)j(non-square)f(matrices.)111
+2274 y(2.)46 b(Solv)m(e)21 b Fv(AX)32 b Fw(=)25 b Fv(B)g
+Fw(b)m(y)20 b(ev)-5 b(aluating)20 b Fv(X)33 b Fw(=)25
+b Fv(A)1635 2241 y Fn(\000)p FC(1)1729 2274 y Fv(B)30
+b Fw(=)25 b(\()p Fv(D)2037 2241 y Fn(\000)p FC(1)2034
+2297 y Fo(r)2131 2274 y Fv(P)2202 2241 y Fn(\000)p FC(1)2189
+2297 y Fo(r)2297 2274 y Fv(LU)10 b(P)2502 2241 y Fn(\000)p
+FC(1)2489 2297 y Fo(c)2596 2274 y Fv(D)2674 2241 y Fn(\000)p
+FC(1)2671 2297 y Fo(c)2768 2274 y Fw(\))2803 2241 y Fn(\000)p
+FC(1)2898 2274 y Fv(B)29 b Fw(=)c Fv(D)3167 2288 y Fo(c)3202
+2274 y Fw(\()p Fv(P)3295 2288 y Fo(c)3331 2274 y Fw(\()p
+Fv(U)3438 2241 y Fn(\000)p FC(1)3532 2274 y Fw(\()p Fv(L)3629
+2241 y Fn(\000)p FC(1)3724 2274 y Fw(\()p Fv(P)3817 2288
+y Fo(r)3856 2274 y Fw(\()p Fv(D)3966 2288 y Fo(r)4004
+2274 y Fv(B)5 b Fw(\)\)\)\)\).)227 2387 y(This)26 b(is)g(done)i
+(e\016cien)m(tly)f(b)m(y)g(m)m(ultiplying)d(from)j(righ)m(t)g(to)h
+(left)f(in)f(the)i(last)f(expression:)38 b(Scale)27 b(the)h(ro)m(ws)227
+2500 y(of)k Fv(B)k Fw(b)m(y)31 b Fv(D)639 2514 y Fo(r)678
+2500 y Fw(.)44 b(Multiplying)28 b Fv(P)1301 2514 y Fo(r)1339
+2500 y Fv(B)36 b Fw(means)31 b(p)s(erm)m(uting)f(the)i(ro)m(ws)f(of)h
+Fv(D)2713 2514 y Fo(r)2751 2500 y Fv(B)5 b Fw(.)44 b(Multiplying)28
+b Fv(L)3452 2467 y Fn(\000)p FC(1)3546 2500 y Fw(\()p
+Fv(P)3639 2514 y Fo(r)3678 2500 y Fv(D)3753 2514 y Fo(r)3791
+2500 y Fv(B)5 b Fw(\))227 2613 y(means)27 b(solving)e
+Fv(nr)s(hs)g Fw(triangular)g(systems)i(of)f(equations)g(with)g(matrix)f
+Fv(L)i Fw(b)m(y)f(substitution.)37 b(Similarly)-8 b(,)227
+2726 y(m)m(ultiplying)27 b Fv(U)784 2693 y Fn(\000)p
+FC(1)878 2726 y Fw(\()p Fv(L)975 2693 y Fn(\000)p FC(1)1070
+2726 y Fw(\()p Fv(P)1163 2740 y Fo(r)1202 2726 y Fv(D)1277
+2740 y Fo(r)1315 2726 y Fv(B)5 b Fw(\)\))30 b(means)h(solving)e
+(triangular)f(systems)j(with)e Fv(U)10 b Fw(.)141 2913
+y(The)37 b(simplest)f(implemen)m(tation,)j(used)e(b)m(y)g(the)h
+(\\simple)e(driv)m(er)h(routines")g(within)e(Sup)s(erLU)h(and)h(Su-)0
+3026 y(p)s(erLU)p 260 3026 28 4 v 32 w(MT,)30 b(is)g(as)g(follo)m(ws:)0
+3199 y Fx(Simple)k(Driv)m(er)h(Algorithm)111 3387 y Fw(1.)46
+b Fp(Cho)-5 b(ose)29 b Fv(P)591 3401 y Fo(c)652 3387
+y Fp(to)e(or)-5 b(der)29 b(the)e(c)-5 b(olumns)28 b(of)f
+Fv(A)d Fw(to)g(increase)g(the)g(sparsit)m(y)f(of)h(the)g(computed)g
+Fv(L)g Fw(and)f Fv(U)34 b Fw(factors,)227 3500 y(and)c(hop)s(efully)e
+(increase)i(parallelism)d(\(for)k(Sup)s(erLU)p 2142 3500
+V 30 w(MT\).)111 3687 y(2.)46 b Fp(Compute)e(the)f(LU)f(factorization)j
+(of)d Fv(AP)1734 3701 y Fo(c)1770 3687 y Fp(.)72 b Fw(Sup)s(erLU)40
+b(and)g(Sup)s(erLU)p 2816 3687 V 31 w(MT)h(can)g(p)s(erform)f(dynamic)
+227 3800 y(piv)m(oting)33 b(of)h(the)h(ro)m(ws)e(during)f
+(factorization)j(for)e(n)m(umerical)g(stabilit)m(y)-8
+b(,)34 b(computing)f Fv(P)3339 3814 y Fo(r)3377 3800
+y Fw(,)i Fv(L)f Fw(and)f Fv(U)44 b Fw(at)227 3913 y(the)31
+b(same)g(time.)111 4101 y(3.)46 b Fp(Solve)33 b(the)g(system)e
+Fw(using)e Fv(P)1206 4115 y Fo(r)1245 4101 y Fw(,)h Fv(P)1358
+4115 y Fo(c)1393 4101 y Fw(,)h Fv(L)f Fw(and)g Fv(U)40
+b Fw(as)31 b(describ)s(ed)d(ab)s(o)m(v)m(e.)42 b(\()p
+Fv(D)2737 4115 y Fo(r)2801 4101 y Fw(=)25 b Fv(D)2972
+4115 y Fo(c)3032 4101 y Fw(=)g Fv(I)7 b Fw(\))141 4288
+y(The)35 b(simple)d(driv)m(er)i(subroutines)f(for)h(double)g(precision)
+f(real)h(data)i(are)f(called)f Fu(dgssv)g Fw(and)g Fu(pdgssv)f
+Fw(for)0 4401 y(Sup)s(erLU)41 b(and)i(Sup)s(erLU)p 950
+4401 V 31 w(MT,)h(resp)s(ectiv)m(ely)-8 b(.)79 b(The)43
+b(letter)h Fu(d)f Fw(in)f(the)h(subroutine)f(names)h(means)g(double)0
+4514 y(precision)26 b(real;)j(other)f(options)g(are)g
+Fu(s)g Fw(for)g(single)f(precision)f(real,)j Fu(c)e Fw(for)h(single)f
+(precision)f(complex,)j(and)e Fu(z)h Fw(for)0 4627 y(double)23
+b(precision)g(complex.)39 b(The)24 b(subroutine)e(naming)i(sc)m(heme)h
+(is)f(analogous)h(to)h(the)e(one)h(used)f(in)g(LAP)-8
+b(A)m(CK)0 4740 y([1)q(].)141 4853 y(Sup)s(erLU)p 503
+4853 V 31 w(DIST)30 b(do)s(es)g(not)g(include)e(this)i(simple)e(driv)m
+(er.)141 4966 y(There)h(is)f(also)i(an)f(\\exp)s(ert)g(driv)m(er)f
+(subroutine")g(that)i(can)g(pro)m(vide)e(more)i(accurate)g(solutions,)f
+(compute)0 5079 y(error)k(b)s(ounds,)f(and)h(solv)m(e)h(a)g(sequence)g
+(of)g(related)f(linear)f(systems)h(more)h(economically)-8
+b(.)50 b(It)34 b(is)e(a)m(v)-5 b(ailable)33 b(in)0 5192
+y(all)c(three)i(libraries.)0 5365 y Fx(Exp)s(ert)j(Driv)m(er)i
+(Algorithm)1927 5778 y Fw(4)p eop
+%%Page: 5 6
+5 5 bop 111 280 a Fw(1.)46 b Fp(Equilibr)-5 b(ate)33
+b Fw(the)g(matrix)f Fv(A)p Fw(,)i(i.e.)48 b(compute)33
+b(diagonal)f(matrices)g Fv(D)2611 294 y Fo(r)2682 280
+y Fw(and)h Fv(D)2937 294 y Fo(c)3004 280 y Fw(so)g(that)3342
+257 y(^)3318 280 y Fv(A)c Fw(=)g Fv(D)3590 294 y Fo(r)3628
+280 y Fv(AD)3771 294 y Fo(c)3839 280 y Fw(is)227 393
+y(\\b)s(etter)34 b(conditioned")e(than)h Fv(A)p Fw(,)h(i.e.)1615
+370 y(^)1591 393 y Fv(A)1659 360 y Fn(\000)p FC(1)1787
+393 y Fw(is)e(less)g(sensitiv)m(e)h(to)h(p)s(erturbations)c(in)3237
+370 y(^)3213 393 y Fv(A)k Fw(than)e Fv(A)3597 360 y Fn(\000)p
+FC(1)3725 393 y Fw(is)g(to)227 506 y(p)s(erturbations)c(in)i
+Fv(A)p Fw(.)111 693 y(2.)46 b Fp(Pr)-5 b(e)g(or)g(der)27
+b(the)e(r)-5 b(ows)27 b(of)1059 670 y Fw(^)1035 693 y
+Fv(A)e Fp(\(Sup)-5 b(erLU)p 1517 693 28 4 v 34 w(DIST)25
+b(only\))p Fw(,)g(i.e.)37 b(replace)2518 670 y(^)2494
+693 y Fv(A)22 b Fw(b)m(y)f Fv(P)2759 707 y Fo(r)2822
+670 y Fw(^)2798 693 y Fv(A)h Fw(where)f Fv(P)3200 707
+y Fo(r)3260 693 y Fw(is)g(a)h(p)s(erm)m(utation)227 806
+y(matrix.)59 b(W)-8 b(e)38 b(call)d(this)h(step)g(\\static)i(piv)m
+(oting",)g(and)e(it)g(is)g(only)f(done)i(in)e(the)h(distributed)e
+(memory)227 919 y(algorithm.)111 1107 y(3.)46 b Fp(Or)-5
+b(der)47 b(the)g(c)-5 b(olumns)47 b(of)1176 1084 y Fw(^)1152
+1107 y Fv(A)e Fw(to)h(increase)f(the)g(sparsit)m(y)f(of)i(the)f
+(computed)g Fv(L)f Fw(and)h Fv(U)55 b Fw(factors,)50
+b(and)227 1219 y(hop)s(efully)22 b(increase)i(parallelism)d(\(for)k
+(Sup)s(erLU)p 1941 1219 V 30 w(MT)g(and)e(Sup)s(erLU)p
+2672 1219 V 31 w(DIST\).)h(In)g(other)h(w)m(ords,)g(replace)251
+1309 y(^)227 1332 y Fv(A)31 b Fw(b)m(y)476 1309 y(^)452
+1332 y Fv(AP)591 1299 y Fo(T)578 1355 y(c)677 1332 y
+Fw(in)e(Sup)s(erLU)f(and)i(Sup)s(erLU)p 1707 1332 V 31
+w(MT,)g(or)h(replace)2381 1309 y(^)2357 1332 y Fv(A)g
+Fw(b)m(y)f Fv(P)2640 1346 y Fo(c)2699 1309 y Fw(^)2675
+1332 y Fv(AP)2814 1299 y Fo(T)2801 1355 y(c)2900 1332
+y Fw(in)f(Sup)s(erLU)p 3368 1332 V 30 w(DIST,)h(where)227
+1445 y Fv(P)285 1459 y Fo(c)351 1445 y Fw(is)f(a)i(p)s(erm)m(utation)e
+(matrix.)111 1633 y(4.)46 b Fp(Compute)31 b(the)f(LU)g(factorization)i
+(of)1569 1610 y Fw(^)1545 1633 y Fv(A)p Fp(.)39 b Fw(Sup)s(erLU)25
+b(and)i(Sup)s(erLU)p 2598 1633 V 31 w(MT)g(can)h(p)s(erform)e(dynamic)g
+(piv)m(ot-)227 1745 y(ing)k(of)h(the)g(ro)m(ws)g(during)e
+(factorization)i(for)g(n)m(umerical)e(stabilit)m(y)-8
+b(.)42 b(In)30 b(con)m(trast,)i(Sup)s(erLU)p 3462 1745
+V 31 w(DIST)e(uses)227 1858 y(the)36 b(order)f(computed)g(b)m(y)h(the)g
+(preordering)d(step)j(but)f(replaces)g(tin)m(y)g(piv)m(ots)g(b)m(y)h
+(larger)f(n)m(um)m(b)s(ers)f(for)227 1971 y(stabilit)m(y)-8
+b(.)111 2158 y(5.)46 b Fp(Solve)33 b(the)g(system)e Fw(using)e(the)i
+(computed)f(triangular)f(factors.)111 2346 y(6.)46 b
+Fp(Iter)-5 b(atively)31 b(r)-5 b(e\014ne)30 b(the)f(solution)p
+Fw(,)g(again)e(using)e(the)i(computed)g(triangular)e(factors.)41
+b(This)25 b(is)g(equiv)-5 b(alen)m(t)227 2459 y(to)31
+b(Newton's)g(metho)s(d.)111 2646 y(7.)46 b Fp(Compute)30
+b(err)-5 b(or)31 b(b)-5 b(ounds.)40 b Fw(Both)27 b(forw)m(ard)f(and)g
+(bac)m(kw)m(ard)h(error)g(b)s(ounds)d(are)j(computed,)g(as)g(describ)s
+(ed)227 2759 y(b)s(elo)m(w.)141 2945 y(The)36 b(exp)s(ert)g(driv)m(er)g
+(subroutines)e(for)i(double)f(precision)g(real)h(data)i(are)f(called)e
+Fu(dgssvx)p Fw(,)i Fu(pdgssvx)e Fw(and)0 3058 y Fu(pdgssvx)h
+Fw(for)h(Sup)s(erLU,)f(Sup)s(erLU)p 1298 3058 V 31 w(MT)h(and)g(Sup)s
+(erLU)p 2056 3058 V 31 w(DIST,)g(resp)s(ectiv)m(ely)-8
+b(.)63 b(Sequen)m(tial)36 b(Sup)s(erLU)g(also)0 3171
+y(pro)m(vides)f(single)f(precision)g(real)h(\()p Fu(s)p
+Fw(\),)i(single)e(precision)e(complex)j(\()p Fu(c)p Fw(\),)h(and)e
+(double)f(precision)g(complex)i(\()p Fu(z)p Fw(\))0 3284
+y(v)m(ersions.)79 b(Sup)s(erLU)p 781 3284 V 30 w(MT)44
+b(only)e(pro)m(vides)g(double)g(precision)f(real)i(\()p
+Fu(d)p Fw(\).)80 b(Sup)s(erLU)p 3056 3284 V 31 w(DIST)42
+b(pro)m(vides)h(b)s(oth)0 3397 y(double)29 b(precision)f(real)i(\()p
+Fu(d)p Fw(\))h(and)f(complex)g(\()p Fu(z)p Fw(\).)141
+3510 y(The)j(driv)m(er)f(routines)g(are)i(comp)s(osed)f(of)g(sev)m
+(eral)h(lo)m(w)m(er)g(lev)m(el)f(computational)g(routines)f(for)h
+(computing)0 3623 y(p)s(erm)m(utations,)e(computing)f(LU)i
+(factorization,)g(solving)e(triangular)g(systems,)i(and)e(so)i(on.)44
+b(The)30 b(LU)i(factor-)0 3736 y(ization)g(routine)g(for)h(all)f(three)
+h(libraries)d(also)j(handles)e(nonsquare)h(matrices.)48
+b(F)-8 b(or)34 b(large)f(matrices,)h(the)f(LU)0 3849
+y(factorization)f(steps)g(tak)m(es)h(most)f(of)g(the)g(time,)g
+(although)f(c)m(ho)s(osing)h Fv(P)2523 3863 y Fo(c)2590
+3849 y Fw(to)g(order)f(the)h(columns)f(can)h(also)g(b)s(e)0
+3962 y(time-consuming.)0 4248 y Fr(1.3)135 b(What)46
+b(the)f(three)g(libraries)i(ha)l(v)l(e)e(in)g(common)0
+4454 y Fm(1.3.1)112 b(Input)38 b(and)g(Output)g(Data)g(F)-9
+b(ormats)0 4626 y Fw(All)41 b(three)h(libraries)e(accept)j
+Fv(A)g Fw(and)e Fv(B)47 b Fw(as)c(double)d(precision)h(real.)76
+b(\(Sequen)m(tial)42 b(Sup)s(erLU)e(additionally)0 4739
+y(accepts)f(single)d(precision)f(real)i(and)g(b)s(oth)g(single)f(and)h
+(double)e(precision)h(complex.)61 b(Sup)s(erLU)p 3466
+4739 V 31 w(DIST)37 b(also)0 4852 y(accepts)32 b(double)d(precision)f
+(complex.\))141 4965 y Fv(A)j Fw(is)e(stored)h(in)f(a)i(sparse)f(data)h
+(structure)e(according)i(to)g(the)f(struct)g Fu(SuperMatrix)p
+Fw(,)e(whic)m(h)h(is)g(describ)s(ed)0 5077 y(in)36 b(section)h(3.2.)61
+b(In)36 b(particular,)h Fv(A)g Fw(ma)m(y)g(b)s(e)f(supplied)e(in)h
+(either)i(column-compressed)e(format)j(\(\\Harw)m(ell-)0
+5190 y(Bo)s(eing)i(format"\),)j(or)d(ro)m(w-compressed)g(format)g
+(\(i.e.)68 b Fv(A)2105 5157 y Fo(T)2200 5190 y Fw(stored)40
+b(in)e(column-compressed)h(format\).)69 b Fv(B)5 b Fw(,)0
+5303 y(whic)m(h)38 b(is)g(o)m(v)m(erwritten)h(b)m(y)g(the)h(solution)d
+Fv(X)7 b Fw(,)42 b(is)c(stored)h(as)h(a)f(dense)g(matrix)f(in)g
+(column-ma)5 b(jor)38 b(order.)67 b(In)0 5416 y(Sup)s(erLU)p
+362 5416 V 31 w(DIST,)30 b Fv(A)g Fw(and)g Fv(B)35 b
+Fw(can)c(b)s(e)e(either)h(replicated)g(or)g(distributed)d(across)k(all)
+e(pro)s(cesses.)141 5529 y(\(The)h(storage)i(of)f Fv(L)f
+Fw(and)g Fv(U)40 b Fw(di\013ers)29 b(among)i(the)f(three)h(libraries,)d
+(as)i(discussed)f(in)g(section)h(1.4.\))1927 5778 y(5)p
+eop
+%%Page: 6 7
+6 6 bop 0 280 a Fm(1.3.2)112 b(T)-9 b(uning)37 b(P)m(arameters)g(for)h
+(BLAS)0 452 y Fw(All)d(three)h(libraries)d(dep)s(end)i(on)h(ha)m(ving)f
+(high)g(p)s(erformance)g(BLAS)h(\(Basic)h(Linear)e(Algebra)h
+(Subroutine\))0 565 y(libraries)31 b([20)r(,)j(8)q(,)g(7)q(])g(in)f
+(order)h(to)h(get)h(high)d(p)s(erformance.)52 b(In)33
+b(particular,)h(they)h(dep)s(end)d(on)j(matrix-v)m(ector)0
+678 y(m)m(ultiplication)22 b(or)k(matrix-matrix)e(m)m(ultiplication)f
+(of)i(relativ)m(ely)g(small)f(dense)h(matrices.)39 b(The)25
+b(sizes)g(of)g(these)0 791 y(small)41 b(dense)h(matrices)h(can)g(b)s(e)
+e(tuned)h(to)h(matc)m(h)h(the)f(\\sw)m(eet)h(sp)s(ot")e(of)h(the)g
+(BLAS)f(b)m(y)g(setting)h(certain)0 904 y(tuning)30 b(parameters)i
+(describ)s(ed)d(in)h(section)h(2.10.3)j(for)d(Sup)s(erLU,)f(in)g
+(section)h(3.4.2)i(for)e(Sup)s(erLU)p 3522 904 28 4 v
+31 w(MT,)h(and)0 1017 y(in)d(section)i(4.8.2)h(for)e(Sup)s(erLU)p
+1128 1017 V 31 w(DIST.)141 1129 y(\(In)d(addition,)g(Sup)s(erLU)p
+1031 1129 V 30 w(MT)h(and)e(Sup)s(erLU)p 1768 1129 V
+31 w(DIST)h(let)g(one)h(con)m(trol)g(the)f(n)m(um)m(b)s(er)f(of)i
+(parallel)d(pro)s(cesses)0 1242 y(to)31 b(b)s(e)f(used,)g(as)g(describ)
+s(ed)f(in)g(section)h(1.4.\))0 1486 y Fm(1.3.3)112 b(P)m(erformance)37
+b(Statistics)0 1657 y Fw(Most)24 b(of)f(the)g(computational)f(routines)
+g(use)g(a)i(struct)e(to)i(record)f(certain)f(kinds)f(of)i(p)s
+(erformance)f(data,)k(namely)0 1770 y(the)g(time)f(and)g(n)m(um)m(b)s
+(er)f(of)i(\015oating)f(p)s(oin)m(t)g(op)s(erations)g(in)f(eac)m(h)j
+(phase)e(of)h(the)f(computation,)i(and)e(data)h(ab)s(out)0
+1883 y(the)f(sizes)f(of)g(the)h(matrices)f Fv(L)g Fw(and)g
+Fv(U)10 b Fw(.)39 b(These)24 b(statistics)g(are)h(collected)g(during)d
+(the)j(computation.)38 b(A)25 b(statistic)0 1996 y(v)-5
+b(ariable)29 b(is)h(declared)f(with)g(the)i(follo)m(wing)e(t)m(yp)s(e:)
+191 2184 y Fu(typedef)46 b(struct)g({)382 2297 y(int)238
+b(*panel_histo;)44 b(/*)j(histogram)e(of)i(panel)g(size)f(distribution)
+f(*/)382 2410 y(double)94 b(*utime;)332 b(/*)47 b(time)g(spent)f(in)h
+(various)f(phases)g(*/)382 2523 y(float)142 b(*ops;)428
+b(/*)47 b(floating-point)d(operations)h(at)i(various)f(phases)g(*/)382
+2635 y(int)238 b(TinyPivots;)140 b(/*)47 b(number)f(of)h(tiny)g(pivots)
+f(*/)382 2748 y(int)238 b(RefineSteps;)92 b(/*)47 b(number)f(of)h
+(iterative)f(refinement)f(steps)h(*/)191 2861 y(})h(SuperLUStat_t;)141
+3049 y Fw(F)-8 b(or)36 b(b)s(oth)f(Sup)s(erLU)e(and)i(Sup)s(erLU)p
+1463 3049 V 31 w(MT,)h(there)f(is)g(only)f(one)i(cop)m(y)g(of)g(these)g
+(statistics)f(v)-5 b(ariable.)55 b(But)0 3162 y(for)29
+b(Sup)s(erLU)p 500 3162 V 30 w(DIST,)g(eac)m(h)h(pro)s(cess)e(k)m(eeps)
+i(a)f(lo)s(cal)f(cop)m(y)i(of)f(this)e(v)-5 b(ariable,)29
+b(and)f(records)g(its)h(lo)s(cal)f(statistics.)0 3275
+y(W)-8 b(e)41 b(need)e(to)h(use)f(MPI)g(reduction)g(routines)f(to)i
+(\014nd)e(an)m(y)i(global)e(information,)i(suc)m(h)g(as)f(the)h(sum)e
+(of)i(the)0 3388 y(\015oating-p)s(oin)m(t)30 b(op)s(eration)f(coun)m(t)
+i(on)g(all)e(pro)s(cesses.)141 3501 y(Before)37 b(the)f(computation,)h
+(routine)e Fu(StatInit\(\))e Fw(should)h(b)s(e)h(called)g(to)h(mallo)s
+(c)f(storage)i(and)e(p)s(erform)0 3613 y(initialization)21
+b(for)j(the)h(\014elds)d Fu(panel)p 1280 3613 29 4 v
+33 w(histo)p Fw(,)j Fu(utime)p Fw(,)f(and)g Fu(ops)p
+Fw(.)37 b(The)24 b(algorithmic)f(phases)h(are)h(de\014ned)e(b)m(y)h
+(the)0 3726 y(en)m(umeration)32 b(t)m(yp)s(e)g Fu(PhaseType)d
+Fw(in)i Fu(SRC/util.h)p Fw(.)43 b(In)31 b(the)h(end,)g(routine)f
+Fu(StatFree\(\))f Fw(should)g(b)s(e)h(called)g(to)0 3839
+y(free)e(storage)i(of)e(the)g(ab)s(o)m(v)m(e)h(statistics)f(\014elds.)
+39 b(After)29 b(deallo)s(cation,)g(the)g(statistics)g(are)g(no)g
+(longer)g(accessible.)0 3952 y(Therefore,)f(users)d(should)g(extract)k
+(the)e(information)e(they)i(need)f(b)s(efore)h(calling)e
+Fu(StatFree\(\))p Fw(,)g(whic)m(h)g(can)j(b)s(e)0 4065
+y(accomplished)h(b)m(y)h(calling)f Fu(\(P\)StatPrint\(\))p
+Fw(.)141 4178 y(An)42 b(inquiry)d(function)i Fu(dQuerySpace\(\))d
+Fw(is)j(pro)m(vided)g(to)i(compute)f(memory)g(usage)h(statistics.)76
+b(This)0 4291 y(routine)28 b(should)f(b)s(e)h(called)g(after)h(the)g
+Fv(LU)39 b Fw(factorization.)i(It)29 b(calculates)g(the)g(storage)h
+(requiremen)m(t)f(based)f(on)0 4404 y(the)j(size)f(of)g(the)h
+Fv(L)f Fw(and)g Fv(U)40 b Fw(data)31 b(structures)f(and)g(w)m(orking)f
+(arra)m(ys.)0 4647 y Fm(1.3.4)112 b(Error)37 b(Handling)0
+4819 y Fx(In)m(v)-6 b(alid)35 b(argumen)m(ts)f(and)h(\(P\)XERBLA)0
+4991 y Fw(Similar)e(to)j(LAP)-8 b(A)m(CK,)36 b(for)g(all)e(the)i(Sup)s
+(erLU)e(routines,)i(w)m(e)g(c)m(hec)m(k)h(the)f(v)-5
+b(alidit)m(y)34 b(of)i(the)g(input)e(argumen)m(ts)0 5103
+y(to)39 b(eac)m(h)g(routine.)62 b(If)37 b(an)h(illegal)e(v)-5
+b(alue)38 b(is)e(supplied)f(to)k(one)f(of)g(the)g(input)e(argumen)m
+(ts,)k(the)e(error)g(handler)0 5216 y(XERBLA)d(is)f(called,)i(and)e(a)h
+(message)h(is)e(written)g(to)i(the)f(standard)f(output,)i(indicating)d
+(whic)m(h)g(argumen)m(t)0 5329 y(has)f(an)h(illegal)d(v)-5
+b(alue.)47 b(The)32 b(program)g(returns)f(immediately)g(from)h(the)h
+(routine,)f(with)f(a)i(negativ)m(e)h(v)-5 b(alue)32 b(of)0
+5442 y(INF)m(O.)1927 5778 y(6)p eop
+%%Page: 7 8
+7 7 bop 0 280 a Fx(Computational)33 b(failures)i(with)f(INF)m(O)25
+b Fv(>)f Fw(0)0 452 y(A)k(p)s(ositiv)m(e)e(v)-5 b(alue)27
+b(of)h(INF)m(O)g(on)f(return)g(from)g(a)h(routine)e(indicates)h(a)h
+(failure)d(in)h(the)i(course)g(of)g(the)f(computa-)0
+565 y(tion,)j(suc)m(h)h(as)f(a)h(matrix)f(b)s(eing)f(singular,)g(or)h
+(the)h(amoun)m(t)g(of)g(memory)f(\(in)g(b)m(ytes\))h(already)f(allo)s
+(cated)h(when)0 678 y(mallo)s(c)e(fails.)0 918 y Fx(ABOR)-9
+b(T)35 b(on)g(unreco)m(v)m(erable)h(errors)0 1090 y Fw(A)d(macro)g
+Fu(ABORT)e Fw(is)g(de\014ned)h(in)f Fu(SRC/util.h)f Fw(to)j(handle)e
+(unreco)m(v)m(erable)i(errors)f(that)h(o)s(ccur)f(in)g(the)g(middle)0
+1202 y(of)f(the)f(computation,)h(suc)m(h)f(as)g Fu(malloc)f
+Fw(failure.)39 b(The)30 b(default)f(action)i(of)g Fu(ABORT)e
+Fw(is)g(to)i(call)141 1315 y Fu(superlu)p 483 1315 29
+4 v 33 w(abort)p 756 1315 V 33 w(and)p 933 1315 V 33
+w(exit\(char)45 b(*msg\))0 1428 y Fw(whic)m(h)33 b(prin)m(ts)g(an)h
+(error)g(message,)j(the)d(line)f(n)m(um)m(b)s(er)g(and)h(the)h(\014le)e
+(name)h(at)i(whic)m(h)d(the)h(error)g(o)s(ccurs,)i(and)0
+1541 y(calls)30 b(the)g Fu(exit)f Fw(function)g(to)i(terminate)g(the)f
+(program.)141 1654 y(If)d(this)f(t)m(yp)s(e)i(of)g(termination)e(is)g
+(not)i(appropriate)f(in)f(some)i(en)m(vironmen)m(t,)f(users)g(can)h
+(alter)f(the)h(b)s(eha)m(vior)0 1767 y(of)j(the)g(ab)s(ort)g(function.)
+41 b(When)30 b(compiling)f(the)i(Sup)s(erLU)e(library)-8
+b(,)29 b(users)h(ma)m(y)h(c)m(ho)s(ose)h(the)f(C)g(prepro)s(cessor)0
+1880 y(de\014nition)141 1993 y Fu(-DUSER)p 435 1993 V
+33 w(ABORT)46 b(=)i(my)p 946 1993 V 33 w(abort)0 2106
+y Fw(A)m(t)31 b(the)g(same)g(time,)f(users)g(w)m(ould)f(supply)f(the)i
+(follo)m(wing)f Fu(my)p 2175 2106 V 34 w(abort)g Fw(function)141
+2219 y Fu(my)p 243 2219 V 34 w(abort\(char)45 b(*msg\))0
+2332 y Fw(whic)m(h)29 b(o)m(v)m(errides)h(the)h(b)s(eha)m(vior)e(of)i
+Fu(superlu)p 1616 2332 V 32 w(abort)p 1888 2332 V 33
+w(and)p 2065 2332 V 34 w(exit)p Fw(.)0 2575 y Fm(1.3.5)112
+b(Ordering)37 b(the)h(Columns)e(of)i Fl(A)g Fm(for)f(Sparse)h(F)-9
+b(actors)0 2747 y Fw(There)23 b(is)f(a)h(c)m(hoice)h(of)f(orderings)f
+(for)h(the)g(columns)f(of)h Fv(A)g Fw(b)s(oth)f(in)g(the)h(simple)e(or)
+i(exp)s(ert)g(driv)m(er,)h(in)d(section)j(1.2:)136 2934
+y Fq(\017)46 b Fw(Natural)30 b(ordering,)136 3122 y Fq(\017)46
+b Fw(Multiple)28 b(Minim)m(um)h(Degree)j(\(MMD\))g([25)q(])e(applied)f
+(to)i(the)f(structure)g(of)h Fv(A)2966 3089 y Fo(T)3021
+3122 y Fv(A)p Fw(,)136 3310 y Fq(\017)46 b Fw(Multiple)28
+b(Minim)m(um)h(Degree)j(\(MMD\))g([25)q(])e(applied)f(to)i(the)f
+(structure)g(of)h Fv(A)2966 3277 y Fo(T)3041 3310 y Fw(+)20
+b Fv(A)p Fw(,)136 3497 y Fq(\017)46 b Fw(Column)29 b(Appro)m(ximate)h
+(Minim)m(um)e(Degree)k(\(COLAMD\))f([4)q(],)g(and)136
+3685 y Fq(\017)46 b Fw(Use)31 b(a)g Fv(P)536 3699 y Fo(c)601
+3685 y Fw(supplied)c(b)m(y)k(the)f(user)g(as)g(input.)141
+3872 y(COLAMD)k(is)f(designed)g(particularly)f(for)i(unsymmetric)e
+(matrices)i(when)f(partial)g(piv)m(oting)g(is)g(needed,)0
+3985 y(and)27 b(do)s(es)h(not)g(require)f(explicit)f(formation)i(of)g
+Fv(A)1742 3952 y Fo(T)1797 3985 y Fv(A)p Fw(.)40 b(It)28
+b(usually)e(giv)m(es)i(comparable)g(orderings)f(as)h(MMD)h(on)0
+4098 y Fv(A)68 4065 y Fo(T)123 4098 y Fv(A)p Fw(,)i(and)f(is)f(faster.)
+141 4211 y(The)39 b(orderings)f(based)h(on)g(graph)f(partitioning)g
+(heuristics)f(are)i(also)h(p)s(opular,)f(as)h(exempli\014ed)d(in)h(the)
+0 4324 y(METIS)d(pac)m(k)-5 b(age)39 b([19)q(].)59 b(The)35
+b(user)h(can)h(simply)c(input)i(this)g(ordering)g(in)g(the)h(p)s(erm)m
+(utation)g(v)m(ector)i(for)e Fv(P)3840 4338 y Fo(c)3875
+4324 y Fw(.)0 4437 y(Note)30 b(that)f(man)m(y)g(graph)f(partitioning)f
+(algorithms)g(are)i(designed)f(for)g(symmetric)g(matrices.)40
+b(The)28 b(user)g(ma)m(y)0 4550 y(still)e(apply)g(them)i(to)h(the)f
+(structures)f(of)h Fv(A)1507 4517 y Fo(T)1562 4550 y
+Fv(A)g Fw(or)g Fv(A)1835 4517 y Fo(T)1905 4550 y Fw(+)15
+b Fv(A)p Fw(.)40 b(Our)27 b(routines)g Fu(getata\(\))e
+Fw(and)j Fu(at)p 3342 4550 V 33 w(plus)p 3567 4550 V
+34 w(a)f Fw(in)g(the)0 4663 y(\014le)i Fu(get)p 296 4663
+V 34 w(perm)p 522 4663 V 33 w(c.c)h Fw(can)g(b)s(e)g(used)g(to)h(form)f
+Fv(A)1615 4630 y Fo(T)1670 4663 y Fv(A)g Fw(or)h Fv(A)1948
+4630 y Fo(T)2023 4663 y Fw(+)20 b Fv(A)p Fw(.)0 4906
+y Fm(1.3.6)112 b(Iterativ)m(e)36 b(Re\014nemen)m(t)0
+5078 y Fw(Step)45 b(6)g(of)h(the)f(exp)s(ert)g(driv)m(er)f(algorithm,)k
+(iterativ)m(e)e(re\014nemen)m(t,)j(serv)m(es)c(to)h(increase)f
+(accuracy)h(of)g(the)0 5191 y(computed)31 b(solution.)41
+b(Giv)m(en)31 b(the)g(initial)d(appro)m(ximate)k(solution)d
+Fv(x)i Fw(from)g(step)g(5,)g(the)h(algorithm)e(for)g(step)i(6)0
+5304 y(is)d(as)i(follo)m(ws)f(\(where)g Fv(x)g Fw(and)g
+Fv(b)g Fw(are)h(single)e(columns)g(of)h Fv(X)38 b Fw(and)30
+b Fv(B)5 b Fw(,)30 b(resp)s(ectiv)m(ely\):)1927 5778
+y(7)p eop
+%%Page: 8 9
+8 8 bop 190 280 a Fw(Compute)30 b(residual)e Fv(r)g Fw(=)d
+Fv(Ax)20 b Fq(\000)g Fv(b)190 393 y Fw(While)29 b(residual)f(to)s(o)j
+(large)380 506 y(Solv)m(e)f Fv(Ad)c Fw(=)f Fv(r)33 b
+Fw(for)d(correction)h Fv(d)380 619 y Fw(Up)s(date)f(solution)f
+Fv(x)c Fw(=)g Fv(x)20 b Fq(\000)g Fv(d)380 732 y Fw(Up)s(date)30
+b(residual)e Fv(r)g Fw(=)d Fv(Ax)20 b Fq(\000)g Fv(b)190
+845 y Fw(end)30 b(while)141 1057 y(If)e Fv(r)i Fw(and)d(then)h
+Fv(d)g Fw(w)m(ere)g(computed)g(exactly)-8 b(,)30 b(the)e(up)s(dated)f
+(solution)f Fv(x)15 b Fq(\000)g Fv(d)29 b Fw(w)m(ould)d(b)s(e)i(the)g
+(exact)h(solution.)0 1170 y(Roundo\013)h(prev)m(en)m(ts)h(immediate)e
+(con)m(v)m(ergence.)141 1283 y(The)e(criterion)f(\\residual)g(to)s(o)i
+(large")g(in)e(the)i(iterativ)m(e)g(re\014nemen)m(t)f(algorithm)g(ab)s
+(o)m(v)m(e)h(is)f(essen)m(tially)f(that)1537 1488 y Fv(B)5
+b(E)g(R)q(R)25 b Fq(\021)g Fw(max)2016 1545 y Fo(i)2127
+1488 y Fq(j)p Fv(r)2193 1502 y Fo(i)2222 1488 y Fq(j)p
+Fv(=s)2335 1502 y Fo(i)3713 1488 y Fw(\(1.1\))0 1716
+y(exceeds)i(the)f(mac)m(hine)g(roundo\013)g(lev)m(el,)h(or)f(is)f(con)m
+(tin)m(uing)g(to)i(decrease)g(quic)m(kly)e(enough.)39
+b(Here)27 b Fv(s)3419 1730 y Fo(i)3473 1716 y Fw(is)e(the)i(scale)0
+1829 y(factor)1126 1942 y Fv(s)1169 1956 y Fo(i)1222
+1942 y Fw(=)e(\()p Fq(j)p Fv(A)p Fq(j)d(\001)e(j)p Fv(x)p
+Fq(j)h Fw(+)f Fq(j)p Fv(b)p Fq(j)p Fw(\))1876 1956 y
+Fo(i)1930 1942 y Fw(=)2026 1861 y Fk(X)2070 2044 y Fo(j)2161
+1942 y Fq(j)p Fv(A)2254 1956 y Fo(ij)2315 1942 y Fq(j)g(\001)h(j)p
+Fv(x)2483 1956 y Fo(j)2520 1942 y Fq(j)f Fw(+)g Fq(j)p
+Fv(b)2720 1956 y Fo(i)2748 1942 y Fq(j)0 2195 y Fw(In)42
+b(this)f(expression)h Fq(j)p Fv(A)p Fq(j)h Fw(is)e(the)i
+Fv(n)p Fw(-b)m(y-)p Fv(n)f Fw(matrix)g(with)f(en)m(tries)i
+Fq(j)p Fv(A)p Fq(j)2456 2209 y Fo(ij)2562 2195 y Fw(=)j
+Fq(j)p Fv(A)2772 2209 y Fo(ij)2833 2195 y Fq(j)p Fw(,)g
+Fq(j)p Fv(b)p Fq(j)d Fw(and)e Fq(j)p Fv(x)p Fq(j)i Fw(are)g(similarly)0
+2308 y(column)38 b(v)m(ectors)j(of)f(absolute)f(en)m(tries)g(of)g
+Fv(b)h Fw(and)e Fv(x)p Fw(,)k(resp)s(ectiv)m(ely)-8 b(,)42
+b(and)d Fq(j)p Fv(A)p Fq(j)26 b(\001)h(j)p Fv(x)p Fq(j)40
+b Fw(is)e(con)m(v)m(en)m(tional)i(matrix-)0 2421 y(v)m(ector)32
+b(m)m(ultiplication.)141 2534 y(The)e(purp)s(ose)f(of)h(this)f
+(stopping)h(criterion)f(is)g(explained)g(in)g(the)h(next)h(section.)0
+2777 y Fm(1.3.7)112 b(Error)37 b(Bounds)0 2949 y Fw(Step)30
+b(7)h(of)f(the)h(exp)s(ert)f(driv)m(er)f(algorithm)h(computes)g(error)g
+(b)s(ounds.)141 3062 y(It)g(is)f(sho)m(wn)g(in)f([2)q(,)i(27)q(])f
+(that)i Fv(B)5 b(E)g(R)q(R)30 b Fw(de\014ned)e(in)g(Equation)h(1.1)i
+(measures)f(the)f Fp(c)-5 b(omp)g(onentwise)35 b(r)-5
+b(elative)0 3175 y(b)g(ackwar)g(d)46 b(err)-5 b(or)43
+b Fw(of)f(the)h(computed)e(solution.)75 b(This)40 b(means)i(that)h(the)
+f(computed)g Fv(x)g Fw(satis\014es)f(a)i(sligh)m(tly)0
+3288 y(p)s(erturb)s(ed)34 b(linear)h(system)i(of)g(equations)f(\()p
+Fv(A)25 b Fw(+)f Fv(E)5 b Fw(\))p Fv(x)37 b Fw(=)e Fv(b)25
+b Fw(+)f Fv(f)10 b Fw(,)37 b(where)g Fq(j)p Fv(E)2684
+3302 y Fo(ij)2745 3288 y Fq(j)f(\024)f Fv(B)5 b(E)g(R)q(R)25
+b Fq(\001)f(j)p Fv(A)3364 3302 y Fo(ij)3425 3288 y Fq(j)37
+b Fw(and)f Fq(j)p Fv(f)3740 3302 y Fo(i)3768 3288 y Fq(j)g(\024)0
+3401 y Fv(B)5 b(E)g(R)q(R)27 b Fq(\001)f(j)p Fv(b)427
+3415 y Fo(i)456 3401 y Fq(j)40 b Fw(for)f(all)g Fv(i)h
+Fw(and)f Fv(j)5 b Fw(.)69 b(It)39 b(is)g(sho)m(wn)g(in)g([2,)h(30)q(])g
+(that)g(one)g(step)g(of)g(iterativ)m(e)g(re\014nemen)m(t)f(usually)0
+3514 y(reduces)32 b Fv(B)5 b(E)g(R)q(R)33 b Fw(to)g(near)f(mac)m(hine)h
+(epsilon.)45 b(F)-8 b(or)33 b(example,)g(if)e Fv(B)5
+b(E)g(R)q(R)33 b Fw(is)f(4)h(times)f(mac)m(hine)g(epsilon,)f(then)0
+3627 y(the)f(computed)f(solution)f Fv(x)i Fw(is)e(iden)m(tical)h(to)h
+(the)g(solution)e(one)i(w)m(ould)e(get)j(b)m(y)f(c)m(hanging)f(eac)m(h)
+i(nonzero)f(en)m(try)0 3739 y(of)h Fv(A)g Fw(and)f Fv(b)h
+Fw(b)m(y)g(at)h(most)f(4)g(units)f(in)f(their)h(last)h(places,)g(and)f
+(then)h(solving)f(this)g(p)s(erturb)s(ed)e(system)j Fp(exactly)p
+Fw(.)0 3852 y(If)25 b(the)i(nonzero)f(en)m(tries)f(of)h
+Fv(A)g Fw(and)g Fv(b)g Fw(are)g(uncertain)f(in)f(their)h(b)s(ottom)i(2)
+f(bits,)g(then)f(one)i(should)d(generally)h(not)0 3965
+y(exp)s(ect)35 b(a)g(more)g(accurate)h(solution.)52 b(Th)m(us)33
+b Fv(B)5 b(E)g(R)q(R)35 b Fw(is)f(a)g(measure)h(of)g(bac)m(kw)m(ard)g
+(error)f(sp)s(eci\014cally)e(suited)0 4078 y(to)i(solving)f(sparse)g
+(linear)f(systems)i(of)g(equations.)51 b(Despite)34 b(roundo\013,)f
+Fv(B)5 b(E)g(R)q(R)34 b Fw(itself)f(is)g(alw)m(a)m(ys)h(computed)0
+4191 y(to)h(within)d(ab)s(out)h Fq(\006)p Fv(n)h Fw(times)g(mac)m(hine)
+f(epsilon)g(\(and)h(usually)e(m)m(uc)m(h)i(more)g(accurately\))h(and)f
+(so)g Fv(B)5 b(E)g(R)q(R)35 b Fw(is)0 4304 y(quite)30
+b(accurate.)141 4417 y(In)g(addition)e(to)j(bac)m(kw)m(ard)g(error,)g
+(the)f(exp)s(ert)g(driv)m(er)f(computes)i(a)g Fp(forwar)-5
+b(d)35 b(err)-5 b(or)34 b(b)-5 b(ound)1361 4621 y Fv(F)13
+b(E)5 b(R)q(R)26 b Fq(\025)f(k)p Fv(x)1862 4635 y FC(true)2013
+4621 y Fq(\000)20 b Fv(x)p Fq(k)2201 4635 y Fn(1)2276
+4621 y Fv(=)p Fq(k)p Fv(x)p Fq(k)2463 4635 y Fn(1)0 4825
+y Fw(Here)34 b Fq(k)p Fv(x)p Fq(k)360 4839 y Fn(1)466
+4825 y Fq(\021)29 b Fw(max)736 4839 y Fo(i)779 4825 y
+Fq(j)p Fv(x)856 4839 y Fo(i)884 4825 y Fq(j)p Fw(.)50
+b(Th)m(us,)33 b(if)g Fv(F)13 b(E)5 b(R)q(R)31 b Fw(=)f(10)1834
+4792 y Fn(\000)p FC(6)1962 4825 y Fw(then)j(eac)m(h)i(comp)s(onen)m(t)e
+(of)h Fv(x)f Fw(has)g(an)g(error)g(b)s(ounded)0 4938
+y(b)m(y)k(ab)s(out)h(10)491 4905 y Fn(\000)p FC(6)624
+4938 y Fw(times)f(the)g(largest)h(comp)s(onen)m(t)g(of)g
+Fv(x)p Fw(.)62 b(The)37 b(algorithm)g(used)g(to)h(compute)g
+Fv(F)13 b(E)5 b(R)q(R)38 b Fw(is)f(an)0 5051 y(appro)m(ximation;)e(see)
+g([2,)g(17])g(for)e(a)i(discussion.)49 b(Generally)33
+b Fv(F)13 b(E)5 b(R)q(R)35 b Fw(is)e(accurate)i(to)g(within)d(a)i
+(factor)h(of)f(10)0 5164 y(or)c(b)s(etter,)h(whic)m(h)e(is)h(adequate)h
+(to)g(sa)m(y)g(ho)m(w)g(man)m(y)f(digits)f(of)i(the)f(large)h(en)m
+(tries)f(of)g Fv(x)h Fw(are)f(correct.)141 5277 y(\(Sup)s(erLU)p
+538 5277 28 4 v 31 w(DIST's)g(algorithm)g(for)g Fv(F)13
+b(E)5 b(R)q(R)31 b Fw(is)e(sligh)m(tly)g(less)h(reliable)e([24)q(].\))
+1927 5778 y(8)p eop
+%%Page: 9 10
+9 9 bop 0 280 a Fm(1.3.8)112 b(Solving)37 b(a)h(Sequence)g(of)g
+(Related)f(Linear)g(Systems)0 452 y Fw(It)25 b(is)e(v)m(ery)i(common)g
+(to)g(solv)m(e)g(a)g(sequence)g(of)f(related)h(linear)d(systems)j
+Fv(A)2534 419 y FC(\(1\))2628 452 y Fv(X)2710 419 y FC(\(1\))2830
+452 y Fw(=)g Fv(B)3000 419 y FC(\(1\))3094 452 y Fw(,)h
+Fv(A)3213 419 y FC(\(2\))3308 452 y Fv(X)3390 419 y FC(\(2\))3510
+452 y Fw(=)f Fv(B)3680 419 y FC(\(2\))3773 452 y Fw(,)h(...)0
+565 y(rather)j(than)g(just)g(one.)40 b(When)29 b Fv(A)1195
+532 y FC(\(1\))1319 565 y Fw(and)f Fv(A)1562 532 y FC(\(2\))1686
+565 y Fw(are)h(similar)e(enough)i(in)f(sparsit)m(y)g(pattern)h(and/or)g
+(n)m(umerical)0 678 y(en)m(tries,)41 b(it)d(is)g(p)s(ossible)e(to)k(sa)
+m(v)m(e)g(some)g(of)f(the)g(w)m(ork)f(done)h(when)f(solving)f(with)h
+Fv(A)3013 645 y FC(\(1\))3146 678 y Fw(to)i(solv)m(e)f(with)e
+Fv(A)3780 645 y FC(\(2\))3875 678 y Fw(.)0 791 y(This)32
+b(can)j(result)e(in)g(signi\014can)m(t)g(sa)m(vings.)52
+b(Here)35 b(are)g(the)f(options,)h(in)e(increasing)g(order)g(of)i
+(\\reuse)f(of)h(prior)0 904 y(information":)111 1116
+y(1.)46 b Fp(F)-7 b(actor)42 b(fr)-5 b(om)42 b(scr)-5
+b(atch.)67 b Fw(No)39 b(previous)e(information)g(is)h(used.)65
+b(If)38 b(one)h(w)m(ere)g(solving)e(just)i(one)g(linear)227
+1229 y(system,)31 b(or)f(a)h(sequence)g(of)f(unrelated)g(linear)f
+(systems,)h(this)f(is)h(the)g(option)g(to)h(use.)111
+1417 y(2.)46 b Fp(R)-5 b(euse)39 b Fv(P)555 1431 y Fo(c)590
+1417 y Fp(,)h(the)f(c)-5 b(olumn)40 b(p)-5 b(ermutation.)63
+b Fw(The)36 b(user)h(ma)m(y)g(sa)m(v)m(e)i(the)e(column)f(p)s(erm)m
+(utation)g(and)g(reuse)227 1530 y(it.)k(This)27 b(is)h(most)h(useful)e
+(when)h Fv(A)1433 1497 y FC(\(2\))1556 1530 y Fw(has)h(the)g(same)g
+(sparsit)m(y)f(structure)h(as)g Fv(A)3003 1497 y FC(\(1\))3097
+1530 y Fw(,)h(but)e(not)h(necessarily)227 1643 y(the)42
+b(same)g(\(or)g(similar\))e(n)m(umerical)g(en)m(tries.)75
+b(Reusing)40 b Fv(P)2341 1657 y Fo(c)2418 1643 y Fw(sa)m(v)m(es)j(the)f
+(sometimes)g(quite)f(exp)s(ensiv)m(e)227 1755 y(op)s(eration)30
+b(of)h(computing)e(it.)111 1943 y(3.)46 b Fp(R)-5 b(euse)30
+b Fv(P)546 1957 y Fo(c)581 1943 y Fp(,)f Fv(P)696 1957
+y Fo(r)764 1943 y Fp(and)h(data)h(structur)-5 b(es)30
+b(al)5 b(lo)-5 b(c)g(ate)g(d)32 b(for)e Fv(L)f Fp(and)h
+Fv(U)10 b Fp(.)39 b Fw(If)26 b Fv(P)2609 1957 y Fo(r)2674
+1943 y Fw(and)g Fv(P)2905 1957 y Fo(c)2967 1943 y Fw(do)h(not)g(c)m
+(hange,)h(then)f(the)227 2056 y(w)m(ork)i(of)g(building)d(the)j(data)g
+(structures)g(asso)s(ciated)g(with)f Fv(L)h Fw(and)f
+Fv(U)39 b Fw(\(including)26 b(the)j(elimination)d(tree)227
+2169 y([14)q(]\))d(can)g(b)s(e)e(a)m(v)m(oided.)39 b(This)20
+b(is)i(most)g(useful)f(when)g Fv(A)2111 2136 y FC(\(2\))2228
+2169 y Fw(has)h(the)g(same)h(sparsit)m(y)e(structure)h(and)g(similar)
+227 2282 y(n)m(umerical)32 b(en)m(tries)g(as)h Fv(A)1122
+2249 y FC(\(1\))1217 2282 y Fw(.)48 b(When)33 b(the)g(n)m(umerical)e
+(en)m(tries)i(are)g(not)g(similar,)e(one)j(can)f(still)d(use)j(this)227
+2395 y(option,)26 b(but)f(at)h(a)g(higher)e(risk)g(of)i(n)m(umerical)e
+(instabilit)m(y)f(\()p Fv(B)5 b(E)g(R)q(R)26 b Fw(will)d(alw)m(a)m(ys)j
+(rep)s(ort)e(whether)h(or)h(not)227 2508 y(the)31 b(solution)e(w)m(as)i
+(computed)f(stably)-8 b(,)30 b(so)h(one)f(cannot)h(get)h(an)e(unstable)
+f(answ)m(er)i(without)e(w)m(arning\).)111 2695 y(4.)46
+b Fp(R)-5 b(euse)46 b Fv(P)562 2709 y Fo(c)597 2695 y
+Fp(,)j Fv(P)732 2709 y Fo(r)770 2695 y Fp(,)g Fv(L)c
+Fp(and)i Fv(U)10 b Fp(.)83 b Fw(In)44 b(other)g(w)m(ords,)k(w)m(e)d
+(reuse)g(essen)m(tially)e(ev)m(erything.)83 b(This)43
+b(is)h(most)227 2808 y(commonly)27 b(used)f(when)g Fv(A)1167
+2775 y FC(\(2\))1287 2808 y Fw(=)f Fv(A)1451 2775 y FC(\(1\))1546
+2808 y Fw(,)j(but)e Fv(B)1836 2775 y FC(\(2\))1955 2808
+y Fq(6)p Fw(=)f Fv(B)2125 2775 y FC(\(1\))2219 2808 y
+Fw(,)j(i.e.)39 b(when)26 b(only)h(the)g(righ)m(t-hand)f(sides)g
+(di\013er.)227 2921 y(It)40 b(could)e(also)h(b)s(e)f(used)h(when)f
+Fv(A)1440 2888 y FC(\(2\))1573 2921 y Fw(and)h Fv(A)1827
+2888 y FC(\(1\))1961 2921 y Fw(di\013ered)e(just)i(sligh)m(tly)e(in)h
+(n)m(umerical)g(v)-5 b(alues,)41 b(in)d(the)227 3034
+y(hop)s(es)27 b(that)i(iterativ)m(e)f(re\014nemen)m(t)f(con)m(v)m
+(erges)j(\(using)d Fv(A)2219 3001 y FC(\(2\))2341 3034
+y Fw(to)h(compute)g(residuals)e(but)h(the)h(triangular)227
+3147 y(factorization)j(of)g Fv(A)927 3114 y FC(\(1\))1052
+3147 y Fw(to)g(solv)m(e\).)141 3359 y(Because)j(of)e(the)g(di\013eren)m
+(t)g(w)m(a)m(ys)h Fv(L)f Fw(and)g Fv(U)42 b Fw(are)32
+b(computed)g(and)g(stored)g(in)f(the)h(three)h(libraries,)d(these)j(4)0
+3472 y(options)d(are)g(sp)s(eci\014ed)f(sligh)m(tly)g(di\013eren)m
+(tly;)g(see)i(Chapters)f(2)h(through)e(4)i(for)f(details.)0
+3716 y Fm(1.3.9)112 b(In)m(terfacing)37 b(to)g(other)g(languages)0
+3887 y Fw(It)23 b(is)f(p)s(ossible)e(to)k(call)e(all)g(the)h(driv)m
+(ers)e(and)i(the)g(computational)f(routines)g(from)g(F)-8
+b(ortran.)39 b(Ho)m(w)m(ev)m(er,)27 b(curren)m(tly)0
+4000 y(the)37 b(F)-8 b(ortran)38 b(wrapp)s(er)d(functions)g(are)i(not)h
+(complete.)60 b(The)37 b(users)f(are)h(exp)s(ected)g(to)h(lo)s(ok)f(at)
+g(the)g(F)-8 b(ortran)0 4113 y(example)33 b(programs)h(in)e(the)i(F)m
+(OR)-8 b(TRAN/)35 b(directory)-8 b(,)35 b(together)g(with)d(the)i(C)g
+(\\bridge")f(routine,)h(and)f(learn)0 4226 y(ho)m(w)j(to)g(call)f(Sup)s
+(erLU)e(from)i(a)h(F)-8 b(ortran)37 b(program.)56 b(The)35
+b(users)f(can)i(mo)s(dify)e(the)i(C)f(bridge)f(routine)h(to)h(\014t)0
+4339 y(their)29 b(needs.)0 4625 y Fr(1.4)135 b(Ho)l(w)46
+b(the)f(three)h(libraries)g(di\013er)0 4832 y Fm(1.4.1)112
+b(Input)38 b(and)g(Output)g(Data)g(F)-9 b(ormats)0 5003
+y Fw(All)27 b(Sequen)m(tial)g(Sup)s(erLU)e(routines)i(are)i(a)m(v)-5
+b(ailable)27 b(in)g(single)f(and)h(double)g(precision)f(\(real)i(or)g
+(complex\),)h(but)0 5116 y(Sup)s(erLU)p 362 5116 28 4
+v 31 w(MT)h(routines)e(are)j(only)e(a)m(v)-5 b(ailable)29
+b(in)f(double)h(precision)f(real,)i(and)f(Sup)s(erLU)p
+3156 5116 V 31 w(DIST)g(routines)g(are)0 5229 y(a)m(v)-5
+b(ailable)30 b(in)f(double)g(precision)f(\(real)j(or)f(complex\).)141
+5342 y Fv(L)g Fw(and)g Fv(U)40 b Fw(are)31 b(stored)g(in)e(di\013eren)m
+(t)h(formats)g(in)f(the)i(three)f(libraries:)1927 5778
+y(9)p eop
+%%Page: 10 11
+10 10 bop 136 280 a Fq(\017)46 b Fv(L)23 b Fp(and)i Fv(U)33
+b Fp(in)23 b(Se)-5 b(quential)24 b(Sup)-5 b(erLU.)20
+b Fv(L)h Fw(is)e(a)h(\\column-sup)s(erno)s(dal")e(matrix,)k(in)d
+(storage)j(t)m(yp)s(e)e Fu(SCformat)p Fw(.)227 393 y(This)30
+b(means)i(it)f(is)g(stored)h(sparsely)-8 b(,)32 b(with)e(sup)s(erno)s
+(des)f(\(consecutiv)m(e)k(columns)e(with)f(iden)m(tical)h(struc-)227
+506 y(tures\))44 b(stored)g(as)h(dense)e(blo)s(c)m(ks.)81
+b Fv(U)54 b Fw(is)43 b(stored)h(in)f(column-compressed)g(format)h
+Fu(NCformat)p Fw(.)80 b(See)227 619 y(section)31 b(2.3)g(for)f
+(details.)136 807 y Fq(\017)46 b Fv(L)g Fp(and)g Fv(U)56
+b Fp(in)46 b(Sup)-5 b(erLU)p 1119 807 28 4 v 34 w(MT.)44
+b Fw(Because)i(of)e(parallelism,)i(the)f(columns)e(of)i
+Fv(L)f Fw(and)g Fv(U)55 b Fw(ma)m(y)45 b(not)g(b)s(e)227
+920 y(computed)26 b(in)f(consecutiv)m(e)h(order,)h(so)f(they)g(ma)m(y)h
+(b)s(e)e(allo)s(cated)h(and)f(stored)h(out)g(of)g(order.)39
+b(This)24 b(means)227 1033 y(w)m(e)30 b(use)f(the)g(\\column-sup)s
+(erno)s(dal-p)s(erm)m(uted")d(format)k Fu(SCPformat)c
+Fw(for)j Fv(L)g Fw(and)g(\\column-p)s(erm)m(uted")227
+1145 y(format)i Fu(NCPformat)d Fw(for)i Fv(U)10 b Fw(.)41
+b(See)30 b(section)h(3.2)g(for)f(details.)136 1333 y
+Fq(\017)46 b Fv(L)41 b Fp(and)g Fv(U)50 b Fp(in)41 b(Sup)-5
+b(erLU)p 1098 1333 V 34 w(DIST.)38 b Fw(No)m(w)i Fv(L)f
+Fw(and)f Fv(U)49 b Fw(are)39 b(distributed)d(across)j(m)m(ultiple)e
+(pro)s(cessors.)66 b(As)227 1446 y(describ)s(ed)30 b(in)h(detail)g(in)g
+(Sections)h(4.3)h(and)e(4.4,)j(w)m(e)e(use)g(a)h(2D)f(blo)s(c)m
+(k-cyclic)g(format,)h(whic)m(h)e(has)h(b)s(een)227 1559
+y(used)e(for)f(dense)h(matrices)g(in)f(libraries)e(lik)m(e)j(ScaLAP)-8
+b(A)m(CK)30 b([3)q(].)41 b(But)30 b(for)g(sparse)g(matrices,)g(the)h
+(blo)s(c)m(ks)227 1672 y(are)d(no)g(longer)f(iden)m(tical)g(in)f(size,)
+j(and)e(v)-5 b(ary)27 b(dep)s(ending)e(on)j(the)g(sparsit)m(y)f
+(structure)g(of)h Fv(L)g Fw(and)f Fv(U)10 b Fw(.)39 b(The)227
+1785 y(detailed)30 b(storage)i(format)e(is)g(discussed)e(in)h(section)i
+(4.3)g(and)f(illustrated)e(in)h(Figure)h(4.1.)0 2028
+y Fm(1.4.2)112 b(P)m(arallelism)0 2200 y Fw(Sequen)m(tial)40
+b(Sup)s(erLU)f(has)h(no)h(explicit)e(parallelism.)69
+b(Some)41 b(parallelism)c(ma)m(y)42 b(still)c(b)s(e)j(exploited)e(on)i
+(an)0 2313 y(SMP)35 b(b)m(y)g(using)e(a)j(m)m(ultithreaded)d(BLAS)i
+(library)e(if)h(a)m(v)-5 b(ailable.)54 b(But)35 b(it)g(is)f(lik)m(ely)g
+(to)i(b)s(e)e(more)h(e\013ectiv)m(e)i(to)0 2426 y(use)30
+b(Sup)s(erLU)p 519 2426 V 31 w(MT)g(on)g(an)h(SMP)-8
+b(,)30 b(describ)s(ed)f(next.)141 2539 y(Sup)s(erLU)p
+503 2539 V 31 w(MT)f(lets)f(the)h(user)f(c)m(ho)s(ose)i(the)f(n)m(um)m
+(b)s(er)e(of)i(parallel)e(threads)h(to)i(use.)39 b(The)27
+b(mec)m(hanism)g(v)-5 b(aries)0 2651 y(from)30 b(platform)f(to)i
+(platform)f(and)g(is)f(describ)s(ed)f(in)h(section)i(3.6.)141
+2764 y(Sup)s(erLU)p 503 2764 V 31 w(DIST)44 b(not)i(only)e(lets)h(the)h
+(user)e(sp)s(ecify)g(the)h(n)m(um)m(b)s(er)f(of)i(pro)s(cessors,)i(but)
+d(ho)m(w)g(they)h(are)0 2877 y(arranged)32 b(in)m(to)g(a)h(2D)g(grid.)
+45 b(F)-8 b(urthermore,)33 b(MPI)f(p)s(ermits)f(an)m(y)h(subset)g(of)g
+(the)h(pro)s(cessors)f(allo)s(cated)g(to)h(the)0 2990
+y(user)g(ma)m(y)i(b)s(e)e(used)g(for)h(Sup)s(erLU)p 1240
+2990 V 30 w(DIST,)g(not)g(just)f(consecutiv)m(ely)i(n)m(um)m(b)s(ered)d
+(pro)s(cessors)h(\(sa)m(y)i(0)g(through)0 3103 y(P-1\).)42
+b(See)30 b(section)h(4.4)g(for)f(details.)0 3347 y Fm(1.4.3)112
+b(Piv)m(oting)36 b(Strategies)g(for)i(Stabilit)m(y)0
+3518 y Fw(Sequen)m(tial)27 b(Sup)s(erLU)f(and)i(Sup)s(erLU)p
+1357 3518 V 31 w(MT)g(use)g(the)g(same)h(piv)m(oting)e(strategy)-8
+b(,)31 b(called)c Fp(thr)-5 b(eshold)34 b(pivoting)p
+Fw(,)29 b(to)0 3631 y(determine)f(the)h(ro)m(w)g(p)s(erm)m(utation)e
+Fv(P)1327 3645 y Fo(r)1366 3631 y Fw(.)40 b(Supp)s(ose)27
+b(w)m(e)i(ha)m(v)m(e)h(factored)g(the)f(\014rst)f Fv(i)17
+b Fq(\000)g Fw(1)29 b(columns)e(of)i Fv(A)p Fw(,)g(and)g(are)0
+3744 y(seeking)j(the)g(piv)m(ot)h(for)f(column)f Fv(i)p
+Fw(.)46 b(Let)33 b Fv(a)1487 3758 y Fo(mi)1610 3744 y
+Fw(b)s(e)e(a)i(largest)g(en)m(try)f(in)f(magnitude)g(on)i(or)f(b)s(elo)
+m(w)f(the)i(diagonal)0 3857 y(of)c(the)h(partially)d(factored)j
+Fv(A)p Fw(:)40 b Fq(j)p Fv(a)1179 3871 y Fo(mi)1270 3857
+y Fq(j)25 b Fw(=)g(max)1586 3871 y Fo(j)t Fn(\025)p Fo(i)1716
+3857 y Fq(j)p Fv(a)1789 3871 y Fo(j)t(i)1850 3857 y Fq(j)p
+Fw(.)41 b(Dep)s(ending)27 b(on)i(a)h(threshold)d(0)f
+Fv(<)f(u)g Fq(\024)g Fw(1)30 b(input)d(b)m(y)i(the)0
+3970 y(user,)e(the)f(co)s(de)h(will)d(use)i(the)h(diagonal)e(en)m(try)i
+Fv(a)1688 3984 y Fo(ii)1767 3970 y Fw(as)f(the)h(piv)m(ot)f(in)g
+(column)f Fv(i)i Fw(as)f(long)g(as)h Fq(j)p Fv(a)3211
+3984 y Fo(ii)3263 3970 y Fq(j)f(\025)f Fv(u)12 b Fq(\001)g(j)p
+Fv(a)3584 3984 y Fo(mi)3676 3970 y Fq(j)p Fw(,)28 b(and)0
+4083 y(otherwise)i(use)g Fv(a)610 4097 y Fo(mi)701 4083
+y Fw(.)40 b(So)30 b(if)g(the)g(user)g(sets)h Fv(u)25
+b Fw(=)g(1,)31 b Fv(a)1825 4097 y Fo(mi)1946 4083 y Fw(\(or)g(an)f
+(equally)f(large)i(en)m(try\))g(will)c(b)s(e)j(selected)h(as)g(the)0
+4196 y(piv)m(ot;)f(this)f(corresp)s(onds)g(to)i(the)f(classical)g
+Fp(p)-5 b(artial)34 b(pivoting)f(str)-5 b(ate)g(gy)p
+Fw(.)43 b(If)29 b(the)h(user)g(has)g(ordered)f(the)i(matrix)0
+4309 y(so)c(that)g(c)m(ho)s(osing)f(diagonal)g(piv)m(ots)g(is)g
+(particularly)e(go)s(o)s(d)i(for)h(sparsit)m(y)e(or)i(parallelism,)d
+(then)j(smaller)e(v)-5 b(alues)0 4421 y(of)33 b Fv(u)g
+Fw(will)d(tend)i(to)i(c)m(ho)s(ose)g(those)f(diagonal)f(piv)m(ots,)h
+(at)h(the)f(risk)e(of)i(less)f(n)m(umerical)f(stabilit)m(y)-8
+b(.)47 b(Using)32 b Fv(u)e Fw(=)f(0)0 4534 y(guaran)m(tees)35
+b(that)f(the)f(piv)m(ots)h(on)f(the)g(diagonal)g(will)e(b)s(e)i(c)m
+(hosen,)h(unless)e(they)i(are)g(zero.)50 b(The)33 b(error)g(b)s(ound)0
+4647 y Fv(B)5 b(E)g(R)q(R)31 b Fw(measure)f(ho)m(w)g(m)m(uc)m(h)h
+(stabilit)m(y)e(is)g(actually)h(lost.)141 4760 y(Threshold)22
+b(piv)m(oting)h(turns)g(out)i(to)g(b)s(e)f(hard)f(to)i(parallelize)d
+(on)i(distributed)e(memory)i(mac)m(hines,)h(b)s(ecause)0
+4873 y(of)33 b(the)g(\014ne-grain)e(comm)m(unication)i(and)f(dynamic)f
+(data)j(structures)e(required.)46 b(So)32 b(Sup)s(erLU)p
+3382 4873 V 31 w(DIST)g(uses)h(a)0 4986 y(new)f(sc)m(heme)i(called)e
+Fp(static)j(pivoting)f Fw(instead.)47 b(In)32 b(static)h(piv)m(oting)f
+(the)h(piv)m(ot)g(order)f(\()p Fv(P)3163 5000 y Fo(r)3202
+4986 y Fw(\))h(is)f(c)m(hosen)h(b)s(efore)0 5099 y(n)m(umerical)38
+b(factorization,)43 b(using)38 b(a)i(w)m(eigh)m(ted)g(p)s(erfect)g
+(matc)m(hing)f(algorithm)g([9)q(],)j(and)d(k)m(ept)h(\014xed)f(during)0
+5212 y(factorization.)k(Since)31 b(b)s(oth)f(ro)m(w)h(and)g(column)e
+(orders)i(\()p Fv(P)2058 5226 y Fo(r)2128 5212 y Fw(and)f
+Fv(P)2363 5226 y Fo(c)2398 5212 y Fw(\))h(are)h(\014xed)e(b)s(efore)h
+(n)m(umerical)f(factoriza-)0 5325 y(tion,)e(w)m(e)h(can)g(extensiv)m
+(ely)f(optimize)f(the)i(data)f(la)m(y)m(out,)i(load)e(balance,)h(and)e
+(comm)m(unication)h(sc)m(hedule.)39 b(The)0 5438 y(price)e(is)g(a)h
+(higher)f(risk)g(of)h(n)m(umeric)f(instabilit)m(y)-8
+b(,)38 b(whic)m(h)e(is)h(mitigated)h(b)m(y)g(diagonal)f(scaling,)i
+(setting)g(v)m(ery)1905 5778 y(10)p eop
+%%Page: 11 12
+11 11 bop 0 280 a Fw(tin)m(y)27 b(piv)m(ots)h(to)h(larger)e(v)-5
+b(alues,)28 b(and)f(iterativ)m(e)i(re\014nemen)m(t)e([24)q(].)40
+b(Again,)29 b(error)e(b)s(ound)f Fv(B)5 b(E)g(R)q(R)28
+b Fw(measure)g(ho)m(w)0 393 y(m)m(uc)m(h)i(stabilit)m(y)f(is)h
+(actually)g(lost.)0 637 y Fm(1.4.4)112 b(Memory)38 b(Managemen)m(t)0
+808 y Fw(Because)25 b(of)f(\014ll-in)d(of)j(en)m(tries)f(during)f
+(Gaussian)h(elimination,)g Fv(L)g Fw(and)g Fv(U)34 b
+Fw(t)m(ypically)23 b(ha)m(v)m(e)i(man)m(y)f(more)g(nonzero)0
+921 y(en)m(tries)i(than)f Fv(A)p Fw(.)39 b(If)26 b Fv(P)771
+935 y Fo(r)835 921 y Fw(and)f Fv(P)1065 935 y Fo(c)1126
+921 y Fw(are)h(not)g(already)f(kno)m(wn,)h(w)m(e)h(cannot)f(determine)f
+(the)h(n)m(um)m(b)s(er)e(and)h(lo)s(cations)0 1034 y(of)39
+b(these)g(nonzeros)g(b)s(efore)f(p)s(erforming)f(the)i(n)m(umerical)e
+(factorization.)67 b(This)37 b(means)h(that)i(some)f(kind)e(of)0
+1147 y(dynamic)29 b(memory)h(allo)s(cation)g(is)g(needed.)141
+1260 y(Sequen)m(tial)d(Sup)s(erLU)f(lets)h(the)h(user)f(either)h
+(supply)d(a)j(preallo)s(cated)f(space)i Fu(work[])d Fw(of)i(length)f
+Fu(lwork)p Fw(,)g(or)0 1373 y(dep)s(end)h(on)i(mallo)s(c/free.)41
+b(The)29 b(v)-5 b(ariable)29 b Fu(FILL)g Fw(can)i(b)s(e)e(used)g(to)i
+(help)e(the)h(co)s(de)h(predict)e(the)h(amoun)m(t)g(of)h(\014ll,)0
+1486 y(whic)m(h)25 b(can)i(reduce)f(b)s(oth)g(fragmen)m(tation)h(and)f
+(the)g(n)m(um)m(b)s(er)f(of)i(calls)f(to)h(mallo)s(c/free.)39
+b(If)26 b(the)g(initial)e(estimate)0 1599 y(of)39 b(the)g(size)f(of)h
+Fv(L)g Fw(and)f Fv(U)48 b Fw(from)38 b Fu(FILL)g Fw(is)g(to)s(o)h
+(small,)h(the)e(routine)g(allo)s(cates)h(more)g(space)g(and)f(copies)h
+(the)0 1712 y(curren)m(t)34 b Fv(L)g Fw(and)g Fv(U)45
+b Fw(factors)35 b(to)g(the)g(new)f(space)h(and)e(frees)i(the)f(old)g
+(space.)53 b(If)34 b(the)h(routine)e(cannot)i(allo)s(cate)0
+1825 y(enough)30 b(space,)h(it)f(calls)g(a)h(user-sp)s(eci\014able)d
+(routine)h(ABOR)-8 b(T.)31 b(See)f(sections)h(1.3.4)h(for)e(details.)
+141 1937 y(Sup)s(erLU)p 503 1937 28 4 v 31 w(MT)e(is)g(similar,)e
+(except)k(that)f(the)g(curren)m(t)f(alpha)f(v)m(ersion)h(cannot)h
+(reallo)s(cate)g(more)g(space)g(for)0 2050 y Fv(L)f Fw(and)f
+Fv(U)37 b Fw(if)27 b(the)h(initial)d(size)j(estimate)g(from)g
+Fu(FILL)e Fw(is)h(to)s(o)h(small.)39 b(Instead,)28 b(the)g(program)g
+(calls)f(ABOR)-8 b(T)28 b(and)0 2163 y(the)j(user)e(m)m(ust)h(start)h
+(o)m(v)m(er)h(with)d(a)i(larger)f(v)-5 b(alue)30 b(of)g
+Fu(FILL)p Fw(.)g(See)g(section)h(3.4.2.)141 2276 y(Sup)s(erLU)p
+503 2276 V 31 w(DIST)d(actually)g(has)h(a)g(simpler)d(memory)j
+(managemen)m(t)h(c)m(hore,)g(b)s(ecause)e(once)i Fv(P)3415
+2290 y Fo(r)3482 2276 y Fw(and)e Fv(P)3715 2290 y Fo(c)3779
+2276 y Fw(are)0 2389 y(determined,)k(the)g(structures)g(of)g
+Fv(L)g Fw(and)g Fv(U)42 b Fw(can)33 b(b)s(e)e(determined)g(e\016cien)m
+(tly)h(and)g(just)g(the)g(righ)m(t)g(amoun)m(t)h(of)0
+2502 y(memory)k(allo)s(cated)h(using)d(mallo)s(c)i(and)g(later)g(free.)
+62 b(So)37 b(it)g(will)e(call)h(ABOR)-8 b(T)38 b(only)e(if)h(there)g
+(is)f(really)h(not)0 2615 y(enough)30 b(memory)g(a)m(v)-5
+b(ailable)30 b(to)h(solv)m(e)g(the)g(problem.)0 2858
+y Fm(1.4.5)112 b(In)m(terfacing)37 b(to)g(other)g(languages)0
+3030 y Fw(Sequen)m(tial)26 b(Sup)s(erLU)e(has)i(a)h(Matlab)g(in)m
+(terface)g(to)h(the)e(driv)m(er)g(via)g(a)h(MEX)g(\014le.)38
+b(See)27 b(section)g(2.9)g(for)g(details.)0 3316 y Fr(1.5)135
+b(P)l(erformance)0 3519 y Fw(Sup)s(erLU)35 b(library)f(incorp)s(orates)
+i(a)h(n)m(um)m(b)s(er)f(of)h(no)m(v)m(el)g(algorithmic)e(ideas)i(dev)m
+(elop)s(ed)f(recen)m(tly)-8 b(.)60 b(These)37 b(al-)0
+3632 y(gorithms)31 b(also)g(exploit)f(the)i(features)f(of)h(mo)s(dern)e
+(computer)h(arc)m(hitectures,)i(in)d(particular,)g(the)h(m)m(ulti-lev)m
+(el)0 3745 y(cac)m(he)42 b(organization)f(and)g(parallelism.)69
+b(W)-8 b(e)42 b(ha)m(v)m(e)g(conducted)f(extensiv)m(e)h(exp)s(erimen)m
+(ts)d(on)i(v)-5 b(arious)40 b(plat-)0 3858 y(forms,)29
+b(with)g(a)g(large)h(collection)f(of)h(test)g(matrices.)41
+b(The)29 b(Sequen)m(tial)f(Sup)s(erLU)g(ac)m(hiev)m(ed)i(up)f(to)h
+(40\045)g(of)g(the)0 3971 y(theoretical)37 b(\015oating-p)s(oin)m(t)g
+(rate)g(on)g(a)h(n)m(um)m(b)s(er)e(of)h(pro)s(cessors,)h(see)g([5,)g
+(21)q(].)60 b(The)37 b(mega\015op)g(rate)h(usually)0
+4084 y(increases)24 b(with)f(increasing)g(ratio)i(of)f(\015oating-p)s
+(oin)m(t)g(op)s(erations)f(coun)m(t)i(o)m(v)m(er)h(the)f(n)m(um)m(b)s
+(er)e(of)h(nonzeros)h(in)e(the)0 4197 y Fv(L)31 b Fw(and)f
+Fv(U)41 b Fw(factors.)j(The)31 b(parallel)e(LU)i(factorization)g(in)f
+(Sup)s(erLU)p 2372 4197 V 31 w(MT)h(demonstrated)g(5{10)i(fold)d(sp)s
+(eedups)0 4310 y(on)j(a)h(range)g(of)f(commercially)g(p)s(opular)e
+(SMPs,)i(and)g(up)g(to)h(2.5)g(Giga\015ops)f(factorization)h(rate,)h
+(see)f([6)q(,)g(21].)0 4423 y(The)24 b(parallel)f(LU)i(factorization)g
+(in)f(Sup)s(erLU)p 1634 4423 V 30 w(DIST)h(ac)m(hiev)m(ed)g(up)f(to)h
+(100)h(fold)e(sp)s(eedup)f(on)i(a)g(512-pro)s(cessor)0
+4536 y(Cra)m(y)30 b(T3E,)h(and)f(10.2)i(Giga\015ops)e(factorization)h
+(rate,)g(see)g([23)q(].)0 4822 y Fr(1.6)135 b(Soft)l(w)l(are)47
+b(Status)e(and)g(Av)-7 b(ailabilit)l(y)0 5025 y Fw(All)37
+b(three)h(libraries)e(are)j(freely)e(a)m(v)-5 b(ailable)38
+b(for)g(all)f(uses,)j(commercial)f(or)f(noncommercial,)i(sub)5
+b(ject)38 b(to)h(the)0 5138 y(follo)m(wing)f(ca)m(v)m(eats.)69
+b(No)40 b(w)m(arran)m(t)m(y)g(is)e(expressed)g(or)h(implied)d(b)m(y)j
+(the)h(authors,)h(although)d(w)m(e)i(will)c(gladly)0
+5251 y(answ)m(er)43 b(questions)e(and)h(try)h(to)g(\014x)g(all)e(rep)s
+(orted)h(bugs.)77 b(W)-8 b(e)44 b(ask)f(that)g(prop)s(er)e(credit)i(b)s
+(e)f(giv)m(en)g(to)i(the)0 5364 y(authors)30 b(and)g(that)h(a)g(notice)
+f(b)s(e)g(included)e(if)h(an)m(y)i(mo)s(di\014cations)d(are)j(made.)141
+5477 y(The)f(follo)m(wing)f(Cop)m(yrigh)m(t)h(applies)e(to)k(the)e
+(whole)g(Sup)s(erLU)e(soft)m(w)m(are.)1905 5778 y(11)p
+eop
+%%Page: 12 13
+12 12 bop 227 280 a Fw(Cop)m(yrigh)m(t)43 b(\(c\))h(2003,)k(The)43
+b(Regen)m(ts)h(of)f(the)g(Univ)m(ersit)m(y)g(of)g(California,)h
+(through)e(La)m(wrence)227 393 y(Berk)m(eley)36 b(National)e(Lab)s
+(oratory)h(\(sub)5 b(ject)34 b(to)i(receipt)e(of)h(an)m(y)g(required)d
+(appro)m(v)-5 b(als)34 b(from)h(U.S.)227 506 y(Dept.)42
+b(of)30 b(Energy\))227 653 y(All)f(righ)m(ts)h(reserv)m(ed.)227
+800 y(Redistribution)i(and)j(use)f(in)g(source)h(and)g(binary)e(forms,)
+j(with)e(or)h(without)f(mo)s(di\014cation,)h(are)227
+913 y(p)s(ermitted)29 b(pro)m(vided)g(that)i(the)g(follo)m(wing)e
+(conditions)f(are)j(met:)227 1060 y(\(1\))46 b(Redistributions)41
+b(of)j(source)h(co)s(de)g(m)m(ust)f(retain)g(the)h(ab)s(o)m(v)m(e)g
+(cop)m(yrigh)m(t)g(notice,)k(this)43 b(list)227 1172
+y(of)e(conditions)f(and)g(the)h(follo)m(wing)f(disclaimer.)70
+b(\(2\))42 b(Redistributions)37 b(in)j(binary)f(form)i(m)m(ust)227
+1285 y(repro)s(duce)24 b(the)g(ab)s(o)m(v)m(e)i(cop)m(yrigh)m(t)f
+(notice,)h(this)d(list)g(of)i(conditions)e(and)g(the)i(follo)m(wing)e
+(disclaimer)227 1398 y(in)e(the)h(do)s(cumen)m(tation)g(and/or)h(other)
+f(materials)f(pro)m(vided)g(with)g(the)h(distribution.)35
+b(\(3\))23 b(Neither)227 1511 y(the)41 b(name)f(of)g(La)m(wrence)h
+(Berk)m(eley)g(National)f(Lab)s(oratory)-8 b(,)43 b(U.S.)e(Dept.)71
+b(of)40 b(Energy)g(nor)f(the)227 1624 y(names)g(of)f(its)g(con)m
+(tributors)g(ma)m(y)h(b)s(e)e(used)h(to)h(endorse)f(or)h(promote)g(pro)
+s(ducts)e(deriv)m(ed)g(from)227 1737 y(this)30 b(soft)m(w)m(are)h
+(without)f(sp)s(eci\014c)f(prior)g(written)g(p)s(ermission.)227
+1884 y(THIS)37 b(SOFTW)-10 b(ARE)37 b(IS)g(PR)m(O)m(VIDED)i(BY)f(THE)f
+(COPYRIGHT)g(HOLDERS)g(AND)h(CON-)227 1997 y(TRIBUTORS)48
+b("AS)i(IS")f(AND)h(ANY)f(EXPRESS)f(OR)h(IMPLIED)g(W)-10
+b(ARRANTIES,)49 b(IN-)227 2110 y(CLUDING,)f(BUT)f(NOT)f(LIMITED)h(TO,)f
+(THE)g(IMPLIED)h(W)-10 b(ARRANTIES)46 b(OF)h(MER-)227
+2223 y(CHANT)-8 b(ABILITY)21 b(AND)g(FITNESS)e(F)m(OR)h(A)h(P)-8
+b(AR)g(TICULAR)20 b(PURPOSE)f(ARE)h(DISCLAIMED.)227 2335
+y(IN)32 b(NO)f(EVENT)g(SHALL)g(THE)g(COPYRIGHT)g(O)m(WNER)h(OR)e
+(CONTRIBUTORS)g(BE)i(LI-)227 2448 y(ABLE)40 b(F)m(OR)f(ANY)h(DIRECT,)f
+(INDIRECT,)f(INCIDENT)-8 b(AL,)40 b(SPECIAL,)e(EXEMPLAR)-8
+b(Y,)227 2561 y(OR)30 b(CONSEQUENTIAL)f(D)m(AMA)m(GES)j(\(INCLUDING,)f
+(BUT)g(NOT)f(LIMITED)g(TO,)f(PR)m(O-)227 2674 y(CUREMENT)c(OF)h
+(SUBSTITUTE)e(GOODS)h(OR)g(SER)-10 b(VICES;)24 b(LOSS)h(OF)g(USE,)h(D)m
+(A)-8 b(T)g(A,)27 b(OR)227 2787 y(PR)m(OFITS;)k(OR)g(BUSINESS)f(INTERR)
+m(UPTION\))g(HO)m(WEVER)i(CA)m(USED)f(AND)h(ON)f(ANY)227
+2900 y(THEOR)-8 b(Y)36 b(OF)f(LIABILITY,)g(WHETHER)g(IN)h(CONTRA)m(CT,)
+e(STRICT)g(LIABILITY,)h(OR)227 3013 y(TOR)-8 b(T)44 b(\(INCLUDING)g
+(NEGLIGENCE)g(OR)g(OTHER)-10 b(WISE\))43 b(ARISING)h(IN)g(ANY)h(W)-10
+b(A)i(Y)227 3126 y(OUT)37 b(OF)g(THE)f(USE)h(OF)g(THIS)f(SOFTW)-10
+b(ARE,)36 b(EVEN)i(IF)f(AD)m(VISED)g(OF)g(THE)g(POSSI-)227
+3239 y(BILITY)30 b(OF)h(SUCH)e(D)m(AMA)m(GE.)141 3409
+y(Some)i(routines)e(carry)h(the)h(additional)d(notices)j(as)f(follo)m
+(ws.)111 3579 y(1.)46 b(Some)31 b(subroutines)d(carry)i(the)h(follo)m
+(wing)e(notice:)427 3760 y(Cop)m(yrigh)m(t)h(\(c\))i(1994)g(b)m(y)e
+(Xero)m(x)h(Corp)s(oration.)40 b(All)29 b(righ)m(ts)h(reserv)m(ed.)427
+3886 y(THIS)20 b(MA)-8 b(TERIAL)20 b(IS)g(PR)m(O)m(VIDED)h(AS)f(IS,)g
+(WITH)g(ABSOLUTEL)-8 b(Y)20 b(NO)g(W)-10 b(ARRANTY)427
+3999 y(EXPRESSED)30 b(OR)g(IMPLIED.)g(ANY)h(USE)f(IS)f(A)-8
+b(T)31 b(YOUR)f(O)m(WN)h(RISK.)427 4125 y(P)m(ermission)24
+b(is)h(hereb)m(y)h(gran)m(ted)h(to)f(use)g(or)g(cop)m(y)h(this)d
+(program)i(for)g(an)m(y)g(purp)s(ose,)f(pro)m(vided)427
+4238 y(the)30 b(ab)s(o)m(v)m(e)h(notices)f(are)h(retained)e(on)h(all)f
+(copies.)40 b(P)m(ermission)28 b(to)j(mo)s(dify)d(the)i(co)s(de)g(and)f
+(to)427 4351 y(distribute)e(mo)s(di\014ed)g(co)s(de)i(is)f(gran)m(ted,)
+i(pro)m(vided)e(the)h(ab)s(o)m(v)m(e)h(notices)g(are)f(retained,)g(and)
+g(a)427 4464 y(notice)i(that)g(the)f(co)s(de)h(w)m(as)g(mo)s(di\014ed)d
+(is)h(included)f(with)h(the)i(ab)s(o)m(v)m(e)g(cop)m(yrigh)m(t)g
+(notice.)111 4645 y(2.)46 b(The)30 b(MC64)h(routine)f(\()p
+Fx(only)35 b(used)h(in)f(Sup)s(erLU)p 2042 4645 32 4
+v 38 w(DIST)p Fw(\))30 b(carries)g(the)g(follo)m(wing)f(notice:)427
+4825 y(COPYRIGHT)h(\(c\))h(1999)h(Council)d(for)h(the)h(Cen)m(tral)f
+(Lab)s(oratory)g(of)h(the)f(Researc)m(h)i(Coun-)427 4938
+y(cils.)k(All)19 b(righ)m(ts)h(reserv)m(ed.)37 b(P)-8
+b(A)m(CKA)m(GE)22 b(MC64A/AD)g(A)m(UTHORS)e(Iain)f(Du\013)i
+(\(i.du\013 at rl.ac.uk\))427 5051 y(and)30 b(Jac)m(k)m(o)i(Koster)f
+(\(jak at ii.uib.no\))d(LAST)i(UPD)m(A)-8 b(TE)31 b(20/09/99)427
+5177 y(***)h(Conditions)c(on)i(external)h(use)f(***)427
+5303 y(The)j(user)g(shall)f(ac)m(kno)m(wledge)j(the)f(con)m(tribution)e
+(of)i(this)e(pac)m(k)-5 b(age)36 b(in)c(an)m(y)i(publication)d(of)427
+5416 y(material)40 b(dep)s(enden)m(t)f(up)s(on)f(the)i(use)f(of)i(the)f
+(pac)m(k)-5 b(age.)71 b(The)39 b(user)g(shall)g(use)g(reasonable)427
+5529 y(endea)m(v)m(ours)31 b(to)g(notify)f(the)h(authors)f(of)g(the)h
+(pac)m(k)-5 b(age)32 b(of)f(this)e(publication.)1905
+5778 y(12)p eop
+%%Page: 13 14
+13 13 bop 427 280 a Fw(The)31 b(user)f(can)i(mo)s(dify)d(this)h(co)s
+(de)i(but,)f(at)h(no)f(time)g(shall)e(the)j(righ)m(t)e(or)i(title)e(to)
+i(all)e(or)i(an)m(y)427 393 y(part)g(of)g(this)f(pac)m(k)-5
+b(age)34 b(pass)d(to)i(the)f(user.)45 b(The)31 b(user)g(shall)f(mak)m
+(e)j(a)m(v)-5 b(ailable)32 b(free)g(of)g(c)m(harge)427
+506 y(to)26 b(the)g(authors)f(for)g(an)m(y)g(purp)s(ose)f(all)g
+(information)g(relating)g(to)i(an)m(y)g(alteration)f(or)h(addition)427
+619 y(made)36 b(to)h(this)e(pac)m(k)-5 b(age)38 b(for)e(the)g(purp)s
+(oses)e(of)j(extending)e(the)h(capabilities)e(or)i(enhancing)427
+732 y(the)31 b(p)s(erformance)f(of)g(this)f(pac)m(k)-5
+b(age.)427 862 y(The)26 b(user)g(shall)f(not)i(pass)f(this)f(co)s(de)i
+(directly)e(to)i(a)g(third)e(part)m(y)h(without)g(the)h(express)f
+(prior)427 974 y(consen)m(t)35 b(of)f(the)g(authors.)52
+b(Users)33 b(w)m(an)m(ting)h(to)h(licence)f(their)f(o)m(wn)h(cop)m(y)g
+(of)h(these)f(routines)427 1087 y(should)29 b(send)g(email)h(to)h
+(hsl at aeat.co.uk)427 1217 y(None)c(of)g(the)f(commen)m(ts)i(from)e(the)g
+(Cop)m(yrigh)m(t)g(notice)h(up)f(to)h(and)f(including)d(this)i(one)i
+(shall)427 1330 y(b)s(e)j(remo)m(v)m(ed)h(or)g(altered)f(in)f(an)m(y)i
+(w)m(a)m(y)-8 b(.)141 1517 y(All)29 b(three)i(libraries)c(can)k(b)s(e)f
+(obtained)f(from)h(the)h(follo)m(wing)e(URLs:)382 1705
+y Fu(http://crd.lbl.gov/~xiao)o(ye/)o(Supe)o(rLU/)382
+1818 y(http://www.netlib.org/sc)o(ala)o(pack)o(/pro)o(tot)o(ype/)141
+2006 y Fw(In)e(the)h(future,)f(w)m(e)i(will)c(add)i(more)h
+(functionalit)m(y)e(in)g(the)i(soft)m(w)m(are,)i(suc)m(h)d(as)h(sequen)
+m(tial)f(and)g(parallel)f(in-)0 2119 y(complete)d(LU)f(factorizations,)
+j(as)e(w)m(ell)e(as)i(parallel)e(sym)m(b)s(olic)g(and)h(ordering)f
+(algorithms)g(for)i(Sup)s(erLU)p 3631 2119 28 4 v 30
+w(DIST;)0 2231 y(these)31 b(latter)g(routines)e(w)m(ould)g(replace)h
+(MC64)h(and)f(ha)m(v)m(e)i(no)e(restrictions)f(on)i(external)f(use.)141
+2344 y(All)e(bugs)g(rep)s(orts)g(and)g(queries)f(can)i(b)s(e)g
+(e-mailed)f(to)h Fu(xsli at lbl.gov)d Fw(and)i Fu(demmel at cs.berkeley.edu)p
+Fw(.)0 2631 y Fr(1.7)135 b(Ac)l(kno)l(wledgemen)l(t)0
+2834 y Fw(With)34 b(great)i(gratitude,)g(w)m(e)f(ac)m(kno)m(wledge)h
+(Stan)e(Eisenstat)h(and)f(Jo)s(esph)g(Liu)f(for)h(their)g(signi\014can)
+m(t)g(con)m(tri-)0 2947 y(butions)29 b(to)i(the)f(dev)m(elopmen)m(t)h
+(of)g(Sequen)m(tial)e(Sup)s(erLU.)141 3060 y(W)-8 b(e)39
+b(w)m(ould)e(lik)m(e)g(to)i(thank)f(Jinqc)m(hong)f(T)-8
+b(eo)39 b(for)f(helping)d(generate)40 b(the)e(co)s(de)g(in)f(Sequen)m
+(tial)g(Sup)s(erLU)0 3172 y(to)j(w)m(ork)g(with)e(four)h(\015oating-p)s
+(oin)m(t)g(data)h(t)m(yp)s(es.)68 b(W)-8 b(e)41 b(thank)e(Tim)f(Da)m
+(vis)i(for)g(his)e(con)m(tribution)g(of)i(some)0 3285
+y(subroutines)29 b(related)j(to)g(column)e(ordering)g(and)h
+(suggestions)h(on)f(impro)m(ving)f(the)i(routines')e(in)m(terfaces.)45
+b(W)-8 b(e)0 3398 y(thank)34 b(Ed)f(Roth)m(b)s(erg)h(of)g(Silicon)e
+(Graphics)g(for)i(discussions)d(and)j(pro)m(viding)e(us)h(access)i(to)g
+(the)f(SGI)g(P)m(o)m(w)m(er)0 3511 y(Challenge.)53 b(W)-8
+b(e)36 b(Thank)e(Y)-8 b(u)35 b(W)-8 b(ang)37 b(and)d(William)e(F.)k
+(Mitc)m(hell)e(for)h(dev)m(eloping)f(the)h(F)-8 b(ortran)36
+b(90)f(in)m(terface)0 3624 y(for)30 b Fu(SuperLU)p 481
+3624 29 4 v 33 w(DIST)p Fw(.)141 3737 y(W)-8 b(e)35 b(ac)m(kno)m
+(wledge)h(the)e(follo)m(wing)f(organizations)h(that)g(pro)m(vided)f
+(the)h(computer)g(resources)h(during)c(our)0 3850 y(co)s(de)k(dev)m
+(elopmen)m(t:)49 b(NERSC)34 b(at)h(La)m(wrence)h(Berk)m(eley)f
+(National)f(Lab)s(oratory)-8 b(,)37 b(Liv)m(ermore)d(Computing)f(at)0
+3963 y(La)m(wrence)j(Liv)m(ermore)f(National)h(Lab)s(oratory)-8
+b(,)37 b(NCSA)e(at)h(Univ)m(ersit)m(y)f(of)h(Illinois)c(at)k
+(Urbana-Champaign,)0 4076 y(Silicon)30 b(Graphics,)i(and)g(Xero)m(x)i
+(P)m(alo)f(Alto)f(Researc)m(h)i(Cen)m(ter.)48 b(W)-8
+b(e)33 b(thank)g(UC)f(Berk)m(eley)h(and)f(NSF)h(Infras-)0
+4189 y(tructure)d(gran)m(t)h(CD)m(A-9401156)k(for)30
+b(pro)m(viding)e(Berk)m(eley)j(NO)m(W.)1905 5778 y(13)p
+eop
+%%Page: 14 15
+14 14 bop 0 903 a Fs(Chapter)65 b(2)0 1318 y Fy(Sequen)-6
+b(tial)76 b(Sup)6 b(erLU)78 b(\(V)-19 b(ersion)77 b(3.0\))0
+1800 y Fr(2.1)135 b(Ab)t(out)44 b Fj(SuperLU)0 2003 y
+Fw(In)27 b(this)g(c)m(hapter,)j(Sup)s(erLU)25 b(will)h(alw)m(a)m(ys)i
+(mean)g(Sequen)m(tial)f(Sup)s(erLU.)g Fu(SuperLU)f Fw(pac)m(k)-5
+b(age)30 b(con)m(tains)e(a)g(set)h(of)0 2116 y(subroutines)f(to)j(solv)
+m(e)g(sparse)f(linear)f(systems)i Fv(AX)i Fw(=)25 b Fv(B)5
+b Fw(.)41 b(Here)31 b Fv(A)f Fw(is)g(a)h(square,)f(nonsingular,)e
+Fv(n)20 b Fq(\002)g Fv(n)30 b Fw(sparse)0 2228 y(matrix,)i(and)f
+Fv(X)39 b Fw(and)32 b Fv(B)k Fw(are)c(dense)g Fv(n)20
+b Fq(\002)h Fv(nr)s(hs)31 b Fw(matrices,)i(where)e Fv(nr)s(hs)g
+Fw(is)g(the)h(n)m(um)m(b)s(er)e(of)i(righ)m(t-hand)f(sides)0
+2341 y(and)f(solution)f(v)m(ectors.)42 b(Matrix)31 b
+Fv(A)f Fw(need)h(not)f(b)s(e)g(symmetric)g(or)g(de\014nite;)g(indeed,)f
+Fu(SuperLU)g Fw(is)g(particularly)0 2454 y(appropriate)g(for)i
+(matrices)f(with)f(v)m(ery)i(unsymmetric)d(structure.)141
+2567 y(The)40 b(pac)m(k)-5 b(age)42 b(uses)d Fv(LU)50
+b Fw(decomp)s(osition)39 b(with)g(partial)g(\(or)h(threshold\))f(piv)m
+(oting,)j(and)d(forw)m(ard/bac)m(k)0 2680 y(substitutions.)k(The)31
+b(columns)g(of)h Fv(A)g Fw(ma)m(y)h(b)s(e)e(preordered)g(b)s(efore)h
+(factorization)g(\(either)g(b)m(y)g(the)g(user)f(or)h(b)m(y)0
+2793 y Fu(SuperLU)p Fw(\);)g(this)g(preordering)g(for)h(sparsit)m(y)f
+(is)h(completely)g(separate)h(from)f(the)g(factorization.)50
+b(T)-8 b(o)34 b(impro)m(v)m(e)0 2906 y(bac)m(kw)m(ard)42
+b(stabilit)m(y)-8 b(,)44 b(w)m(e)e(pro)m(vide)e(w)m(orking)h(precision)
+f(iterativ)m(e)i(re\014nemen)m(t)f(subroutines)f([2].)75
+b(Routines)0 3019 y(are)34 b(also)f(a)m(v)-5 b(ailable)33
+b(to)h(equilibrate)d(the)j(system,)h(estimate)f(the)f(condition)f(n)m
+(um)m(b)s(er,)h(calculate)h(the)g(relativ)m(e)0 3132
+y(bac)m(kw)m(ard)40 b(error,)h(and)d(estimate)i(error)f(b)s(ounds)e
+(for)i(the)g(re\014ned)f(solutions.)66 b(W)-8 b(e)40
+b(also)f(include)e(a)j(Matlab)0 3245 y(MEX-\014le)27
+b(in)m(terface,)i(so)e(that)h(our)f(factor)h(and)e(solv)m(e)i(routines)
+e(can)i(b)s(e)e(called)h(as)g(alternativ)m(es)g(to)h(those)g(built)0
+3358 y(in)m(to)38 b(Matlab.)63 b(The)38 b Fv(LU)47 b
+Fw(factorization)39 b(routines)d(can)j(handle)d(non-square)h(matrices,)
+j(but)e(the)g(triangular)0 3470 y(solv)m(es)31 b(are)f(p)s(erformed)f
+(only)h(for)g(square)g(matrices.)141 3583 y(The)e(factorization)i
+(algorithm)d(uses)h(a)h(graph)g(reduction)e(tec)m(hnique)i(to)g(reduce)
+f(graph)g(tra)m(v)m(ersal)i(time)e(in)0 3696 y(the)h(sym)m(b)s(olic)e
+(analysis.)39 b(W)-8 b(e)30 b(exploit)e(dense)h(submatrices)e(in)h(the)
+h(n)m(umerical)e(k)m(ernel,)i(and)g(organize)g(compu-)0
+3809 y(tational)i(lo)s(ops)f(in)g(a)h(w)m(a)m(y)h(that)g(reduces)e
+(data)i(mo)m(v)m(emen)m(t)h(b)s(et)m(w)m(een)f(lev)m(els)e(of)i(the)f
+(memory)g(hierarc)m(h)m(y)-8 b(.)42 b(The)0 3922 y(resulting)26
+b(algorithm)h(is)g(highly)e(e\016cien)m(t)k(on)f(mo)s(dern)e(arc)m
+(hitectures.)41 b(The)27 b(p)s(erformance)g(gains)g(are)i(particu-)0
+4035 y(larly)e(eviden)m(t)h(for)h(large)f(problems.)39
+b(There)28 b(are)h(\\tuning)e(parameters")i(to)h(optimize)e(the)g(p)s
+(eak)h(p)s(erformance)0 4148 y(as)i(a)f(function)f(of)i(cac)m(he)h
+(size.)40 b(F)-8 b(or)32 b(a)e(detailed)g(description)e(of)j(the)f
+(algorithm,)g(see)h(reference)g([5].)141 4261 y Fu(SuperLU)e
+Fw(is)h(implemen)m(ted)f(in)h(ANSI)g(C,)h(and)f(m)m(ust)g(b)s(e)h
+(compiled)e(with)g(a)i(standard)f(ANSI)h(C)f(compiler.)0
+4374 y(It)j(includes)d(v)m(ersions)i(for)h(b)s(oth)e(real)i(and)f
+(complex)g(matrices,)i(in)d(b)s(oth)h(single)f(and)h(double)g
+(precision.)45 b(The)0 4487 y(\014le)38 b(names)i(for)f(the)g
+(single-precision)e(real)i(v)m(ersion)g(start)h(with)e(letter)h(\\s")h
+(\(suc)m(h)g(as)f Fu(sgstrf.c)p Fw(\);)j(the)e(\014le)0
+4600 y(names)27 b(for)g(the)g(double-precision)e(real)h(v)m(ersion)h
+(start)h(with)d(letter)j(\\d")f(\(suc)m(h)h(as)f Fu(dgstrf.c)p
+Fw(\);)f(the)i(\014le)e(names)0 4712 y(for)i(the)g(single-precision)d
+(complex)i(v)m(ersion)g(start)i(with)d(letter)i(\\c")i(\(suc)m(h)d(as)h
+Fu(cgstrf.c)p Fw(\);)f(the)i(\014le)d(names)i(for)0 4825
+y(the)j(double-precision)c(complex)j(v)m(ersion)g(start)h(with)e
+(letter)i(\\z")g(\(suc)m(h)g(as)f Fu(zgstrf.c)p Fw(\).)0
+5112 y Fr(2.2)135 b(Ho)l(w)46 b(to)f(call)h(a)f Fj(SuperLU)d
+Fr(routine)0 5315 y Fw(As)26 b(a)g(simple)e(example,)j(let)e(us)h
+(consider)e(ho)m(w)i(to)h(solv)m(e)f(a)g(5)11 b Fq(\002)g
+Fw(5)27 b(sparse)f(linear)e(system)i Fv(AX)33 b Fw(=)25
+b Fv(B)5 b Fw(,)26 b(b)m(y)g(calling)f(a)0 5428 y(driv)m(er)h(routine)h
+Fu(dgssv\(\))p Fw(.)38 b(Figure)27 b(2.1)h(sho)m(ws)f(matrix)g
+Fv(A)p Fw(,)i(and)e(its)g Fv(L)g Fw(and)g Fv(U)37 b Fw(factors.)k(This)
+25 b(sample)i(program)1905 5778 y(14)p eop
+%%Page: 15 16
+15 15 bop 770 300 a Fk(0)770 446 y(B)770 496 y(B)770
+546 y(B)770 596 y(B)770 646 y(B)770 699 y(@)868 368 y
+Fv(s)151 b(u)50 b(u)881 481 y(l)i(u)983 594 y(l)58 b(p)1173
+706 y(e)51 b(u)881 819 y(l)75 b(l)264 b(r)1343 300 y
+Fk(1)1343 446 y(C)1343 496 y(C)1343 546 y(C)1343 596
+y(C)1343 646 y(C)1343 699 y(A)2048 300 y(0)2048 446 y(B)2048
+496 y(B)2048 546 y(B)2048 596 y(B)2048 646 y(B)2048 699
+y(@)2146 368 y Fw(19)p Fv(:)p Fw(00)379 b(21)p Fv(:)p
+Fw(00)123 b(21)p Fv(:)p Fw(00)2191 481 y(0)p Fv(:)p Fw(63)52
+b(21)p Fv(:)p Fw(00)g Fq(\000)p Fw(13)p Fv(:)p Fw(26)f
+Fq(\000)p Fw(13)p Fv(:)p Fw(26)2448 594 y(0)p Fv(:)p
+Fw(57)122 b(23)p Fv(:)p Fw(58)168 b(7)p Fv(:)p Fw(58)3103
+706 y(5)p Fv(:)p Fw(00)52 b(21)p Fv(:)p Fw(00)2191 819
+y(0)p Fv(:)p Fw(63)97 b(0)p Fv(:)p Fw(57)g Fq(\000)p
+Fw(0)p Fv(:)p Fw(24)g Fq(\000)p Fw(0)p Fv(:)p Fw(77)51
+b(34)p Fv(:)p Fw(20)3547 300 y Fk(1)3547 446 y(C)3547
+496 y(C)3547 546 y(C)3547 596 y(C)3547 646 y(C)3547 699
+y(A)764 1045 y Fw(Original)28 b(matrix)i Fv(A)894 b Fw(F)-8
+b(actors)32 b Fv(F)38 b Fw(=)25 b Fv(L)20 b Fw(+)g Fv(U)31
+b Fq(\000)19 b Fv(I)281 1158 y(s)25 b Fw(=)g(19)p Fv(;)15
+b(u)26 b Fw(=)f(21)p Fv(;)15 b(p)26 b Fw(=)f(16)p Fv(;)15
+b(e)27 b Fw(=)e(5)p Fv(;)15 b(r)29 b Fw(=)c(18)p Fv(;)15
+b(l)28 b Fw(=)d(12)919 1368 y(Figure)30 b(2.1:)42 b(A)31
+b(5)20 b Fq(\002)g Fw(5)31 b(matrix)f(and)f(its)h Fv(L)g
+Fw(and)g Fv(U)40 b Fw(factors.)0 1643 y(is)29 b(lo)s(cated)i(in)e
+Fu(SuperLU/EXAMPLE/superlu.c)o(.)141 1755 y Fw(The)h(program)g(\014rst)
+g(initializes)e(the)i(three)h(arra)m(ys,)g Fu(a[],)47
+b(asub[])28 b Fw(and)i Fu(xa[])p Fw(,)g(whic)m(h)f(store)i(the)g
+(nonzero)0 1868 y(co)s(e\016cien)m(ts)23 b(of)f(matrix)f
+Fv(A)p Fw(,)j(their)d(ro)m(w)i(indices,)f(and)f(the)h(indices)f
+(indicating)e(the)k(b)s(eginning)c(of)j(eac)m(h)h(column)e(in)0
+1981 y(the)29 b(co)s(e\016cien)m(t)g(and)f(ro)m(w)h(index)e(arra)m(ys.)
+40 b(This)27 b(storage)j(format)f(is)e(called)h(compressed)g(column)g
+(format,)h(also)0 2094 y(kno)m(wn)k(as)i(Harw)m(ell-Bo)s(eing)e(format)
+h([10)q(].)52 b(Next,)36 b(the)e(t)m(w)m(o)h(utilit)m(y)d(routines)h
+Fu(dCreate)p 3123 2094 29 4 v 33 w(CompCol)p 3492 2094
+V 32 w(Matrix\(\))0 2207 y Fw(and)28 b Fu(dCreate)p 517
+2207 V 32 w(Dense)p 789 2207 V 33 w(Matrix\(\))e Fw(are)j(called)e(to)i
+(set)g(up)f(the)g(matrix)g(structures)f(for)h Fv(A)h
+Fw(and)f Fv(B)5 b Fw(,)28 b(resp)s(ectiv)m(ely)-8 b(.)0
+2320 y(The)29 b(routine)f Fu(set)p 648 2320 V 34 w(default)p
+1018 2320 V 32 w(options\(\))f Fw(sets)j(the)g(default)e(v)-5
+b(alues)29 b(to)h(the)g(input)d Fu(options)h Fw(argumen)m(t.)41
+b(This)0 2433 y(con)m(trols)d(ho)m(w)f(the)g(matrix)g(will)e(b)s(e)h
+(factorized)i(and)f(ho)m(w)g(the)g(system)h(will)c(b)s(e)j(solv)m(ed.)
+61 b(After)38 b(calling)e(the)0 2546 y Fu(SuperLU)c Fw(routine)h
+Fu(dgssv\(\))p Fw(,)g(the)i Fv(B)j Fw(matrix)c(is)f(o)m(v)m(erwritten)h
+(b)m(y)g(the)h(solution)d(matrix)i Fv(X)7 b Fw(.)52 b(In)33
+b(the)h(end,)h(all)0 2659 y(the)c(dynamically)d(allo)s(cated)i(data)h
+(structures)f(are)h(de-allo)s(cated)f(b)m(y)g(calling)f(v)-5
+b(arious)30 b(utilit)m(y)e(routines.)141 2772 y Fu(SuperLU)h
+Fw(can)h(p)s(erform)f(more)i(general)f(tasks,)h(whic)m(h)e(will)f(b)s
+(e)i(explained)e(later.)0 2984 y Fu(#include)46 b("dsp_defs.h")0
+3210 y(main\(int)g(argc,)g(char)h(*argv[]\))0 3323 y({)0
+3436 y(/*)48 3549 y(*)g(Purpose)48 3662 y(*)g(=======)48
+3775 y(*)48 3887 y(*)g(This)g(is)g(the)g(small)f(5x5)h(example)f(used)h
+(in)g(the)g(Sections)e(1)j(and)f(2)g(of)g(the)48 4000
+y(*)g(User's)f(Guide)h(to)g(illustrate)e(how)i(to)g(call)g(a)g(SuperLU)
+f(routine,)f(and)i(the)48 4113 y(*)g(matrix)f(data)h(structures)e(used)
+i(by)g(SuperLU.)48 4226 y(*)48 4339 y(*/)191 4452 y(SuperMatrix)e(A,)i
+(L,)g(U,)g(B;)191 4565 y(double)141 b(*a,)47 b(*rhs;)191
+4678 y(double)141 b(s,)48 b(u,)f(p,)g(e,)g(r,)g(l;)191
+4791 y(int)285 b(*asub,)47 b(*xa;)191 4904 y(int)285
+b(*perm_r;)46 b(/*)h(row)g(permutations)e(from)h(partial)g(pivoting)g
+(*/)191 5017 y(int)285 b(*perm_c;)46 b(/*)h(column)f(permutation)f
+(vector)h(*/)191 5130 y(int)285 b(nrhs,)47 b(info,)f(i,)h(m,)h(n,)f
+(nnz,)f(permc_spec;)191 5242 y(superlu_options_t)d(options;)191
+5355 y(SuperLUStat_t)h(stat;)1905 5778 y Fw(15)p eop
+%%Page: 16 17
+16 16 bop 191 280 a Fu(/*)47 b(Initialize)e(matrix)h(A.)h(*/)191
+393 y(m)g(=)h(n)f(=)h(5;)191 506 y(nnz)f(=)g(12;)191
+619 y(if)g(\()h(!\(a)e(=)i(doubleMalloc\(nnz\)\))43 b(\))k
+(ABORT\("Malloc)d(fails)j(for)g(a[]."\);)191 732 y(if)g(\()h(!\(asub)e
+(=)h(intMalloc\(nnz\)\))d(\))j(ABORT\("Malloc)d(fails)j(for)g
+(asub[]."\);)191 845 y(if)g(\()h(!\(xa)e(=)i(intMalloc\(n+1\)\))43
+b(\))48 b(ABORT\("Malloc)c(fails)i(for)h(xa[]."\);)191
+958 y(s)g(=)h(19.0;)e(u)i(=)f(21.0;)f(p)i(=)f(16.0;)g(e)g(=)h(5.0;)e(r)
+i(=)f(18.0;)g(l)g(=)g(12.0;)191 1071 y(a[0])g(=)g(s;)g(a[1])g(=)g(l;)g
+(a[2])g(=)h(l;)f(a[3])f(=)i(u;)f(a[4])g(=)g(l;)g(a[5])g(=)g(l;)191
+1184 y(a[6])g(=)g(u;)g(a[7])g(=)g(p;)g(a[8])g(=)h(u;)f(a[9])f(=)i(e;)f
+(a[10]=)f(u;)h(a[11]=)f(r;)191 1297 y(asub[0])g(=)h(0;)g(asub[1])f(=)i
+(1;)f(asub[2])f(=)h(4;)g(asub[3])f(=)i(1;)191 1409 y(asub[4])e(=)h(2;)g
+(asub[5])f(=)i(4;)f(asub[6])f(=)h(0;)g(asub[7])f(=)i(2;)191
+1522 y(asub[8])e(=)h(0;)g(asub[9])f(=)i(3;)f(asub[10]=)e(3;)i
+(asub[11]=)f(4;)191 1635 y(xa[0])g(=)i(0;)f(xa[1])f(=)i(3;)f(xa[2])f(=)
+i(6;)f(xa[3])f(=)i(8;)f(xa[4])f(=)i(10;)f(xa[5])f(=)h(12;)191
+1861 y(/*)g(Create)f(matrix)g(A)i(in)f(the)g(format)f(expected)f(by)j
+(SuperLU.)d(*/)191 1974 y(dCreate_CompCol_Matrix\(&)o(A,)d(m,)47
+b(n,)g(nnz,)g(a,)g(asub,)f(xa,)h(SLU_NC,)f(SLU_D,)g(SLU_GE\);)191
+2200 y(/*)h(Create)f(right-hand)f(side)i(matrix)f(B.)h(*/)191
+2313 y(nrhs)g(=)g(1;)191 2426 y(if)g(\()h(!\(rhs)e(=)h(doubleMalloc\(m)
+d(*)k(nrhs\)\))e(\))h(ABORT\("Malloc)d(fails)j(for)g(rhs[]."\);)191
+2539 y(for)g(\(i)g(=)g(0;)h(i)f(<)h(m;)f(++i\))f(rhs[i])g(=)i(1.0;)191
+2652 y(dCreate_Dense_Matrix\(&B,)41 b(m,)47 b(nrhs,)g(rhs,)f(m,)h
+(SLU_DN,)f(SLU_D,)g(SLU_GE\);)191 2877 y(if)h(\()h(!\(perm_r)d(=)j
+(intMalloc\(m\)\))c(\))j(ABORT\("Malloc)d(fails)j(for)g(perm_r[]."\);)
+191 2990 y(if)g(\()h(!\(perm_c)d(=)j(intMalloc\(n\)\))c(\))j
+(ABORT\("Malloc)d(fails)j(for)g(perm_c[]."\);)191 3216
+y(/*)g(Set)g(the)g(default)f(input)g(options.)g(*/)191
+3329 y(set_default_options\(&opt)o(ions)o(\);)191 3442
+y(options.ColPerm)e(=)j(NATURAL;)191 3668 y(/*)g(Initialize)e(the)i
+(statistics)e(variables.)g(*/)191 3781 y(StatInit\(&stat\);)191
+4006 y(dgssv\(&options,)f(&A,)i(perm_c,)g(perm_r,)g(&L,)h(&U,)g(&B,)g
+(&stat,)f(&info\);)191 4232 y(dPrint_CompCol_Matrix\("A)o(",)c(&A\);)
+191 4345 y(dPrint_CompCol_Matrix\("U)o(",)g(&U\);)191
+4458 y(dPrint_SuperNode_Matrix\()o("L",)f(&L\);)191 4571
+y(print_int_vec\("\\nperm_r")o(,)h(m,)47 b(perm_r\);)191
+4797 y(/*)g(De-allocate)e(storage)h(*/)191 4910 y(SUPERLU_FREE)e
+(\(rhs\);)191 5023 y(SUPERLU_FREE)g(\(perm_r\);)191 5136
+y(SUPERLU_FREE)g(\(perm_c\);)191 5248 y(Destroy_CompCol_Matrix\(&)o
+(A\);)191 5361 y(Destroy_SuperMatrix_Stor)o(e\(&B)o(\);)191
+5474 y(Destroy_SuperNode_Matrix)o(\(&L\))o(;)1905 5778
+y Fw(16)p eop
+%%Page: 17 18
+17 17 bop 191 280 a Fu(Destroy_CompCol_Matrix\(&)o(U\);)191
+393 y(StatFree\(&stat\);)0 506 y(})0 793 y Fr(2.3)135
+b(Matrix)46 b(data)f(structures)0 996 y Fu(SuperLU)22
+b Fw(uses)i(a)g(principal)d(data)k(structure)e Fu(SuperMatrix)e
+Fw(\(de\014ned)j(in)e Fu(SRC/supermatrix.h)p Fw(\))e(to)25
+b(represen)m(t)0 1108 y(a)30 b(general)g(matrix,)f(sparse)g(or)h
+(dense.)40 b(Figure)29 b(2.2)i(giv)m(es)f(the)g(sp)s(eci\014cation)e
+(of)i(the)g Fu(SuperMatrix)c Fw(structure.)0 1221 y(The)34
+b Fu(SuperMatrix)d Fw(structure)j(con)m(tains)h(t)m(w)m(o)h(lev)m(els)e
+(of)g(\014elds.)51 b(The)34 b(\014rst)g(lev)m(el)g(de\014nes)g(all)f
+(the)i(prop)s(erties)0 1334 y(of)j(a)f(matrix)g(whic)m(h)f(are)i(indep)
+s(enden)m(t)e(of)h(ho)m(w)h(it)f(is)f(stored)i(in)e(memory)-8
+b(.)62 b(In)37 b(particular,)h(it)f(sp)s(eci\014es)f(the)0
+1447 y(follo)m(wing)22 b(three)h(orthogonal)h(prop)s(erties:)36
+b(storage)25 b(t)m(yp)s(e)e(\()p Fu(Stype)p Fw(\))g(indicates)f(the)i
+(t)m(yp)s(e)f(of)h(the)f(storage)i(sc)m(heme)0 1560 y(in)d
+Fu(*Store)p Fw(;)i(data)g(t)m(yp)s(e)g(\()p Fu(Dtype)p
+Fw(\))e(enco)s(des)i(the)f(four)g(precisions;)h(mathematical)f(t)m(yp)s
+(e)h(\()p Fu(Mtype)p Fw(\))f(sp)s(eci\014es)f(some)0
+1673 y(mathematical)30 b(prop)s(erties.)39 b(The)30 b(second)g(lev)m
+(el)g(\()p Fu(*Store)p Fw(\))f(p)s(oin)m(ts)g(to)i(the)f(actual)g
+(storage)i(used)d(to)i(store)g(the)0 1786 y(matrix.)60
+b(W)-8 b(e)38 b(asso)s(ciate)g(with)e(eac)m(h)j Fu(Stype)46
+b(XX)36 b Fw(a)i(storage)g(format)g(called)e Fu(XXformat)p
+Fw(,)h(suc)m(h)g(as)g Fu(NCformat)p Fw(,)0 1899 y Fu(SCformat)p
+Fw(,)28 b(etc.)141 2012 y(The)40 b Fu(SuperMatrix)e Fw(t)m(yp)s(e)j(so)
+g(de\014ned)e(can)i(accommo)s(date)i(v)-5 b(arious)40
+b(t)m(yp)s(es)g(of)h(matrix)f(structures)h(and)0 2125
+y(appropriate)i(op)s(erations)h(to)h(b)s(e)e(applied)f(on)i(them,)k
+(although)c(curren)m(tly)f Fu(SuperLU)g Fw(implemen)m(ts)f(only)i(a)0
+2238 y(subset)30 b(of)g(this)g(collection.)40 b(Sp)s(eci\014cally)-8
+b(,)28 b(matrices)j Fv(A)p Fw(,)g Fv(L)p Fw(,)f Fv(U)10
+b Fw(,)31 b Fv(B)5 b Fw(,)30 b(and)f Fv(X)38 b Fw(can)31
+b(ha)m(v)m(e)g(the)g(follo)m(wing)e(t)m(yp)s(es:)p 536
+2367 2799 4 v 534 2479 4 113 v 912 2479 V 1273 2446 a
+Fv(A)p 1699 2479 V 563 w(L)p 2167 2479 V 377 w(U)p 2587
+2479 V 333 w(B)p 2960 2479 V 300 w(X)p 3333 2479 V 536
+2483 2799 4 v 534 2596 4 113 v 585 2562 a Fu(Stype)p
+912 2596 V 138 w(SLU)p 1113 2562 29 4 v 34 w(NC)g Fw(or)i
+Fu(SLU)p 1528 2562 V 33 w(NR)p 1699 2596 4 113 v 147
+w(SLU)p 1948 2562 29 4 v 34 w(SC)p 2167 2596 4 113 v
+170 w(SLU)p 2392 2562 29 4 v 34 w(NC)p 2587 2596 4 113
+v 123 w(SLU)p 2789 2562 29 4 v 33 w(DN)p 2960 2596 4
+113 v 99 w(SLU)p 3161 2562 29 4 v 34 w(DN)p 3333 2596
+4 113 v 534 2709 V 585 2675 a(Dtype)825 2642 y FC(1)p
+912 2709 V 1236 2675 a Fw(an)m(y)p 1699 2709 V 487 w(an)m(y)p
+2167 2709 V 303 w(an)m(y)p 2587 2709 V 256 w(an)m(y)p
+2960 2709 V 231 w(an)m(y)p 3333 2709 V 534 2821 V 585
+2788 a Fu(Mtype)p 912 2821 V 345 w(SLU)p 1320 2788 29
+4 v 34 w(GE)p 1699 2821 4 113 v 306 w(SLU)p 1900 2788
+29 4 v 34 w(TRLU)p 2167 2821 4 113 v 98 w(SLU)p 2368
+2788 29 4 v 34 w(TRU)p 2587 2821 4 113 v 99 w(SLU)p 2789
+2788 29 4 v 33 w(GE)p 2960 2821 4 113 v 99 w(SLU)p 3161
+2788 29 4 v 34 w(GE)p 3333 2821 4 113 v 536 2825 2799
+4 v 141 2996 a Fw(In)f(what)g(follo)m(ws,)g(w)m(e)h(illustrate)d(the)j
+(storage)h(sc)m(hemes)f(de\014ned)e(b)m(y)h Fu(Stype)p
+Fw(.)40 b(F)-8 b(ollo)m(wing)29 b(C's)i(con)m(v)m(en)m(tion,)0
+3109 y(all)e(arra)m(y)i(indices)e(and)g(lo)s(cations)h(b)s(elo)m(w)g
+(are)h(zero-based.)136 3321 y Fq(\017)46 b Fv(A)33 b
+Fw(ma)m(y)f(ha)m(v)m(e)i(storage)f(t)m(yp)s(e)g Fu(SLU)p
+1410 3321 29 4 v 33 w(NC)f Fw(or)g Fu(SLU)p 1828 3321
+V 34 w(NR)o Fw(.)46 b(The)32 b Fu(SLU)p 2361 3321 V 33
+w(NC)g Fw(format)g(is)g(the)g(same)h(as)f(the)g(Harw)m(ell-)227
+3434 y(Bo)s(eing)f(sparse)f(matrix)f(format)i([10)q(],)g(that)g(is,)f
+(the)g(compressed)g(column)f(storage.)418 3659 y Fu(typedef)46
+b(struct)g({)609 3772 y(int)95 b(nnz;)237 b(/*)47 b(number)g(of)g
+(nonzeros)e(in)i(the)g(matrix)f(*/)609 3885 y(void)h(*nzval;)93
+b(/*)47 b(array)g(of)g(nonzero)f(values)g(packed)g(by)h(column)f(*/)609
+3998 y(int)95 b(*rowind;)45 b(/*)i(array)g(of)g(row)g(indices)f(of)h
+(the)g(nonzeros)e(*/)609 4111 y(int)95 b(*colptr;)45
+b(/*)i(colptr[j])f(stores)g(the)h(location)e(in)i(nzval[])f(and)h
+(rowind[])1420 4224 y(which)g(starts)f(column)g(j.)h(It)g(has)g(ncol+1)
+f(entries,)1420 4337 y(and)h(colptr[ncol])e(=)i(nnz.)g(*/)418
+4450 y(})h(NCformat;)227 4675 y Fw(The)30 b Fu(SLU)p
+564 4675 V 34 w(NR)f Fw(format)i(is)f(the)g(compressed)g(ro)m(w)h
+(storage)h(de\014ned)d(b)s(elo)m(w.)418 4900 y Fu(typedef)46
+b(struct)g({)609 5012 y(int)95 b(nnz;)237 b(/*)47 b(number)g(of)g
+(nonzeros)e(in)i(the)g(matrix)f(*/)609 5125 y(void)h(*nzval;)93
+b(/*)47 b(array)g(of)g(nonzero)f(values)g(packed)g(by)h(row)g(*/)609
+5238 y(int)95 b(*colind;)45 b(/*)i(array)g(of)g(column)f(indices)g(of)h
+(the)g(nonzeros)f(*/)609 5351 y(int)95 b(*rowptr;)45
+b(/*)i(rowptr[j])f(stores)g(the)h(location)e(in)i(nzval[])f(and)h
+(colind[])p 0 5433 1560 4 v 104 5487 a Fi(1)138 5518
+y Fh(Dtype)27 b Fg(can)f(b)r(e)f(one)h(of)h Fh(SLU)p
+956 5518 24 4 v 29 w(S)p Fg(,)f Fh(SLU)p 1188 5518 V
+29 w(D)p Fg(,)g Fh(SLU)p 1420 5518 V 29 w(C)g Fg(or)g
+Fh(SLU)p 1725 5518 V 28 w(Z)q Fg(.)1905 5778 y Fw(17)p
+eop
+%%Page: 18 19
+18 18 bop 0 606 a Fu(typedef)46 b(struct)g({)191 719
+y(Stype_t)g(Stype;)g(/*)h(Storage)f(type:)g(indicates)f(the)i(storage)f
+(format)g(of)h(*Store.)f(*/)191 832 y(Dtype_t)g(Dtype;)g(/*)h(Data)g
+(type.)f(*/)191 944 y(Mtype_t)g(Mtype;)g(/*)h(Mathematical)d(type)j(*/)
+191 1057 y(int)95 b(nrow;)237 b(/*)47 b(number)f(of)h(rows)g(*/)191
+1170 y(int)95 b(ncol;)237 b(/*)47 b(number)f(of)h(columns)f(*/)191
+1283 y(void)h(*Store;)141 b(/*)47 b(pointer)f(to)h(the)g(actual)f
+(storage)g(of)h(the)g(matrix)f(*/)0 1396 y(})h(SuperMatrix;)0
+1622 y(typedef)f(enum)g({)191 1735 y(SLU_NC,)380 b(/*)47
+b(column-wise,)d(not)j(supernodal)e(*/)191 1848 y(SLU_NR,)380
+b(/*)47 b(row-wise,)e(not)i(supernodal)e(*/)191 1961
+y(SLU_SC,)380 b(/*)47 b(column-wise,)d(supernodal)h(*/)191
+2074 y(SLU_SR,)380 b(/*)47 b(row-wise,)e(supernodal)g(*/)191
+2186 y(SLU_NCP,)332 b(/*)47 b(column-wise,)d(not)j(supernodal,)e
+(permuted)h(by)h(columns)1002 2299 y(\(After)f(column)g(permutation,)f
+(the)i(consecutive)e(columns)g(of)1050 2412 y(nonzeros)h(may)g(not)h
+(be)h(stored)e(contiguously.)e(*/)191 2525 y(SLU_DN,)380
+b(/*)47 b(Fortran)f(style)g(column-wise)f(storage)h(for)h(dense)f
+(matrix)g(*/)191 2638 y(SLU_NR_loc)236 b(/*)47 b(distributed)e
+(compressed)g(row)i(format)f(*/)0 2751 y(})h(Stype_t;)0
+2977 y(typedef)f(enum)g({)191 3090 y(SLU_S,)428 b(/*)47
+b(single)f(*/)191 3203 y(SLU_D,)428 b(/*)47 b(double)f(*/)191
+3316 y(SLU_C,)428 b(/*)47 b(single-complex)d(*/)191 3428
+y(SLU_Z)476 b(/*)47 b(double-complex)d(*/)0 3541 y(})j(Dtype_t;)0
+3767 y(typedef)f(enum)g({)191 3880 y(SLU_GE,)380 b(/*)47
+b(general)f(*/)191 3993 y(SLU_TRLU,)284 b(/*)47 b(lower)f(triangular,)f
+(unit)i(diagonal)e(*/)191 4106 y(SLU_TRUU,)284 b(/*)47
+b(upper)f(triangular,)f(unit)i(diagonal)e(*/)191 4219
+y(SLU_TRL,)332 b(/*)47 b(lower)f(triangular)f(*/)191
+4332 y(SLU_TRU,)332 b(/*)47 b(upper)f(triangular)f(*/)191
+4445 y(SLU_SYL,)332 b(/*)47 b(symmetric,)e(store)h(lower)h(half)f(*/)
+191 4558 y(SLU_SYU,)332 b(/*)47 b(symmetric,)e(store)h(upper)h(half)f
+(*/)191 4670 y(SLU_HEL,)332 b(/*)47 b(Hermitian,)e(store)h(lower)h
+(half)f(*/)191 4783 y(SLU_HEU)380 b(/*)47 b(Hermitian,)e(store)h(upper)
+h(half)f(*/)0 4896 y(})h(Mtype_t;)1142 5305 y Fw(Figure)30
+b(2.2:)42 b Fu(SuperMatrix)27 b Fw(data)k(structure.)1905
+5778 y(18)p eop
+%%Page: 19 20
+19 19 bop 1420 280 a Fu(which)47 b(starts)f(row)h(j.)g(It)g(has)g
+(nrow+1)f(entries,)1420 393 y(and)h(rowptr[nrow])e(=)i(nnz.)g(*/)418
+506 y(})h(NRformat;)227 700 y Fw(The)31 b(factorization)i(and)e(solv)m
+(e)g(routines)g(in)f Fu(SuperLU)g Fw(are)i(designed)e(to)i(handle)f
+(column-wise)e(storage)227 813 y(only)-8 b(.)41 b(If)30
+b(the)g(input)f(matrix)g Fv(A)i Fw(is)e(in)g(ro)m(w-orien)m(ted)i
+(storage,)h(i.e.,)f(in)e Fu(SLU)p 2829 813 29 4 v 34
+w(NR)g Fw(format,)i(then)g(the)f(driv)m(er)227 926 y(routines)35
+b(\()p Fu(dgssv\(\))f Fw(and)h Fu(dgssvx\(\))p Fw(\))e(actually)i(p)s
+(erform)g(the)g Fv(LU)46 b Fw(decomp)s(osition)34 b(on)h
+Fv(A)3456 893 y Fo(T)3512 926 y Fw(,)i(whic)m(h)d(is)227
+1038 y(column-wise,)26 b(and)h(solv)m(e)g(the)g(system)g(using)e(the)j
+Fv(L)2059 1005 y Fo(T)2140 1038 y Fw(and)f Fv(U)2386
+1005 y Fo(T)2467 1038 y Fw(factors.)41 b(The)26 b(data)i(structures)e
+(holding)227 1151 y Fv(L)e Fw(and)f Fv(U)33 b Fw(on)24
+b(output)f(are)h(di\013eren)m(t)f(\(sw)m(app)s(ed\))g(from)h(the)f
+(data)i(structures)e(y)m(ou)h(get)g(from)g(column-wise)227
+1264 y(input.)37 b(F)-8 b(or)25 b(more)f(detailed)f(descriptions)f(ab)s
+(out)i(this)f(pro)s(cess,)i(please)f(refer)g(to)h(the)f(leading)f
+(commen)m(ts)227 1377 y(of)31 b(the)f(routines)g Fu(dgssv\(\))e
+Fw(and)i Fu(dgssvx\(\))p Fw(.)227 1522 y(Alternativ)m(ely)-8
+b(,)45 b(the)d(users)f(ma)m(y)i(call)e(a)h(utilit)m(y)e(routine)h
+Fu(dCompRow)p 2691 1522 V 32 w(to)p 2819 1522 V 34 w(CompCol\(\))f
+Fw(to)i(con)m(v)m(ert)i(the)227 1635 y(input)30 b(matrix)h(in)f
+Fu(SLU)p 1025 1635 V 34 w(NR)h Fw(format)h(to)h(another)e(matrix)h(in)e
+Fu(SLU)p 2479 1635 V 33 w(NC)i Fw(format,)g(b)s(efore)f(calling)g(Sup)s
+(erLU.)227 1748 y(The)f(de\014nition)e(of)j(this)e(routine)g(is)418
+1942 y Fu(void)47 b(dCompRow_to_CompCol\(int)41 b(m,)47
+b(int)g(n,)h(int)e(nnz,)1611 2054 y(double)g(*a,)h(int)g(*colind,)f
+(int)h(*rowptr,)1611 2167 y(double)f(**at,)h(int)g(**rowind,)e(int)i
+(**colptr\);)227 2361 y Fw(This)25 b(con)m(v)m(ersion)i(tak)m(es)h
+(time)e(prop)s(ortional)e(to)j(the)g(n)m(um)m(b)s(er)e(of)i(nonzeros)f
+(in)f Fv(A)p Fw(.)40 b(Ho)m(w)m(ev)m(er,)29 b(it)d(requires)227
+2474 y(storage)32 b(for)e(a)h(separate)g(cop)m(y)h(of)e(matrix)g
+Fv(A)p Fw(.)136 2651 y Fq(\017)46 b Fv(L)32 b Fw(is)f(a)i(sup)s(erno)s
+(dal)c(matrix)j(with)f(the)h(storage)i(t)m(yp)s(e)e Fu(SLU)p
+2296 2651 V 33 w(SC)p Fw(.)46 b(Due)32 b(to)h(the)g(sup)s(erno)s(dal)c
+(structure,)j Fv(L)227 2764 y Fw(is)e(in)f(fact)i(stored)g(as)f(a)h
+(sparse)f(blo)s(c)m(k)g(lo)m(w)m(er)g(triangular)f(matrix)h([5)q(].)418
+2977 y Fu(typedef)46 b(struct)g({)609 3090 y(int)95 b(nnz;)524
+b(/*)47 b(number)f(of)h(nonzeros)f(in)h(the)g(matrix)f(*/)609
+3203 y(int)95 b(nsuper;)380 b(/*)47 b(index)f(of)h(the)g(last)g
+(supernode)e(*/)609 3316 y(void)i(*nzval;)380 b(/*)47
+b(array)f(of)h(nonzero)f(values)g(packed)g(by)i(column)e(*/)609
+3429 y(int)95 b(*nzval_colptr;)44 b(/*)j(nzval_colptr[j])c(stores)k
+(the)f(location)g(in)1707 3542 y(nzval[])g(which)g(starts)g(column)g(j)
+i(*/)609 3655 y(int)95 b(*rowind;)332 b(/*)47 b(array)f(of)h
+(compressed)e(row)i(indices)f(of)1707 3767 y(rectangular)f(supernodes)g
+(*/)609 3880 y(int)95 b(*rowind_colptr;/*)43 b(rowind_colptr[j])g
+(stores)j(the)h(location)f(in)1707 3993 y(rowind[])f(which)i(starts)f
+(column)g(j)h(*/)609 4106 y(int)95 b(*col_to_sup;)140
+b(/*)47 b(col_to_sup[j])d(is)j(the)g(supernode)e(number)h(to)1707
+4219 y(which)g(column)g(j)i(belongs)e(*/)609 4332 y(int)95
+b(*sup_to_col;)140 b(/*)47 b(sup_to_col[s])d(points)i(to)h(the)g
+(starting)f(column)1707 4445 y(of)h(the)g(s-th)g(supernode)e(*/)418
+4558 y(})j(SCformat;)136 4771 y Fq(\017)e Fw(Both)25
+b Fv(B)j Fw(and)23 b Fv(X)31 b Fw(are)24 b(stored)g(as)g(con)m(v)m(en)m
+(tional)h(t)m(w)m(o-dimensional)e(arra)m(ys)h(in)e(column-ma)5
+b(jor)23 b(order,)i(with)227 4884 y(the)31 b(storage)h(t)m(yp)s(e)e
+Fu(SLU)p 1052 4884 V 34 w(DN)o Fw(.)418 5077 y Fu(typedef)46
+b(struct)g({)609 5190 y(int)h(lda;)238 b(/*)47 b(leading)f(dimension)f
+(*/)609 5303 y(void)i(*nzval;)f(/*)h(array)f(of)h(size)g(lda-by-ncol)e
+(to)i(represent)1373 5416 y(a)g(dense)g(matrix)f(*/)418
+5529 y(})i(DNformat;)1905 5778 y Fw(19)p eop
+%%Page: 20 21
+20 20 bop 141 280 a Fw(Figure)30 b(2.3)h(sho)m(ws)g(the)f(data)h
+(structures)f(for)g(the)h(example)f(matrices)g(in)f(Figure)h(2.1.)141
+393 y(F)-8 b(or)31 b(a)g(description)d(of)j Fu(NCPformat)p
+Fw(,)d(see)j(section)g(2.5.1.)0 680 y Fr(2.4)135 b Fj(Options)42
+b Fr(argumen)l(t)0 883 y Fu(Options)33 b Fx(Argumen)m(t)0
+1054 y Fw(The)g Fu(options)f Fw(argumen)m(t)i(is)e(the)i(input)e
+(argumen)m(t)i(to)g(con)m(trol)g(the)g(b)s(eha)m(viour)e(of)i(the)g
+(libraries.)48 b(The)33 b(user)0 1167 y(can)27 b(tell)f(the)h(solv)m
+(ers)f(ho)m(w)h(the)g(linear)e(systems)i(should)e(b)s(e)h(solv)m(ed)g
+(based)h(on)f(some)h(kno)m(wn)f(c)m(haracteristics)i(of)0
+1280 y(the)34 b(system.)49 b(F)-8 b(or)34 b(example,)g(for)g
+(diagonally)d(dominan)m(t)i(matrices,)h(c)m(ho)s(osing)g(the)f
+(diagonal)g(piv)m(ots)g(ensures)0 1393 y(stabilit)m(y;)i(there)f(is)g
+(no)g(need)g(for)g(n)m(umerical)e(piv)m(oting)i(\(i.e.,)i
+Fv(P)2254 1407 y Fo(r)2326 1393 y Fw(can)e(b)s(e)g(an)g(Iden)m(tit)m(y)
+g(matrix\).)52 b(In)34 b(another)0 1506 y(situation)42
+b(where)g(a)i(sequence)f(of)g(matrices)g(with)e(the)i(same)h(sparsit)m
+(y)e(pattern)h(need)g(b)s(e)f(factorized,)47 b(the)0
+1619 y(column)25 b(p)s(erm)m(utation)h Fv(P)889 1633
+y Fo(c)951 1619 y Fw(\(and)g(also)h(the)g(ro)m(w)f(p)s(erm)m(utation)g
+Fv(P)2236 1633 y Fo(r)2275 1619 y Fw(,)h(if)f(the)h(n)m(umerical)e(v)-5
+b(alues)26 b(are)h(similar\))d(need)0 1732 y(b)s(e)g(computed)f(only)h
+(once,)i(and)e(reused)f(thereafter.)39 b(In)24 b(these)g(cases,)j(the)d
+(solv)m(ers')g(p)s(erformance)g(can)g(b)s(e)g(m)m(uc)m(h)0
+1845 y(impro)m(v)m(ed)30 b(o)m(v)m(er)i(using)d(the)i(default)f
+(settings.)41 b Fu(Options)29 b Fw(is)g(implemen)m(ted)g(as)i(a)g(C)f
+(structure)h(con)m(taining)f(the)0 1958 y(follo)m(wing)f(\014elds:)136
+2145 y Fq(\017)46 b Fu(Fact)227 2258 y Fw(Sp)s(eci\014es)32
+b(whether)h(or)h(not)g(the)g(factored)h(form)e(of)h(the)g(matrix)f
+Fv(A)h Fw(is)f(supplied)d(on)k(en)m(try)-8 b(,)36 b(and)d(if)f(not,)227
+2371 y(ho)m(w)c(the)f(matrix)g Fv(A)g Fw(will)e(b)s(e)h(factorized)i
+(base)f(on)h(the)f(previous)f(history)-8 b(,)27 b(suc)m(h)g(as)h
+(factor)g(from)f(scratc)m(h,)227 2484 y(reuse)j Fv(P)518
+2498 y Fo(c)584 2484 y Fw(and/or)g Fv(P)945 2498 y Fo(r)983
+2484 y Fw(,)h(or)f(reuse)g(the)h(data)g(structures)f(of)g
+Fv(L)g Fw(and)g Fv(U)10 b Fw(.)136 2672 y Fq(\017)46
+b Fu(Trans)227 2784 y Fw(Sp)s(eci\014es)29 b(whether)h(to)h(solv)m(e)g
+(the)f(transp)s(osed)f(system.)136 2972 y Fq(\017)46
+b Fu(Equil)227 3085 y Fw(Sp)s(eci\014es)29 b(whether)h(to)h
+(equilibrate)d(the)j(system)f(\(scale)h Fv(A)p Fw('s)g(ro)m(ws)f(and)g
+(columns)f(to)i(ha)m(v)m(e)h(unit)d(norm\).)136 3273
+y Fq(\017)46 b Fu(ColPerm)227 3386 y Fw(Sp)s(eci\014es)29
+b(ho)m(w)h(to)h(p)s(erm)m(ute)f(the)h(columns)e(of)h(the)h(matrix)f
+(for)g(sparsit)m(y)f(preserv)-5 b(ation.)136 3573 y Fq(\017)46
+b Fu(IterRefine)227 3686 y Fw(Sp)s(eci\014es)d(whether)h(to)i(p)s
+(erform)d(iterativ)m(e)i(re\014nemen)m(t,)j(and)d(in)e(what)h
+(precision)f(to)j(compute)f(the)227 3799 y(residual.)136
+3987 y Fq(\017)h Fu(SymmetricMode)227 4100 y Fw(Sp)s(eci\014es)29
+b(whether)h(to)h(use)f(the)g(symmetric)g(mo)s(de.)136
+4287 y Fq(\017)46 b Fu(DiagPivotThresh)227 4400 y Fw(Sp)s(eci\014es)29
+b(the)i(threshold)d(used)i(for)g(a)h(diagonal)e(en)m(try)i(to)g(b)s(e)f
+(an)g(acceptable)i(piv)m(ot.)136 4588 y Fq(\017)46 b
+Fu(PrintStat)227 4701 y Fw(Sp)s(eci\014es)29 b(whether)h(to)h(prin)m(t)
+e(the)h(solv)m(er's)h(statistics.)141 4888 y(The)f(routine)f
+Fu(set)p 791 4888 29 4 v 34 w(default)p 1161 4888 V 32
+w(options\(\))f Fw(sets)j(the)g(follo)m(wing)d(default)i(v)-5
+b(alues:)191 5076 y Fu(Fact)667 b(=)47 b(DOFACT)476 b(/*)47
+b(factor)f(from)h(scratch)f(*/)191 5189 y(Trans)619 b(=)47
+b(NOTRANS)191 5302 y(Equil)619 b(=)47 b(YES)191 5415
+y(ColPerm)523 b(=)47 b(COLAMD)191 5528 y(SymmetricMode)235
+b(=)47 b(NO)1905 5778 y Fw(20)p eop
+%%Page: 21 22
+21 21 bop 136 1014 a Fq(\017)46 b Fu(A)i(=)f({)h(Stype)e(=)h(SLU_NC;)f
+(Dtype)h(=)g(SLU_D;)f(Mtype)h(=)g(SLU_GE;)f(nrow)g(=)i(5;)f(ncol)g(=)g
+(5;)514 1127 y(*Store)f(=)h({)h(nnz)f(=)g(12;)1039 1240
+y(nzval)f(=)h([)h(19.00,)e(12.00,)g(12.00,)g(21.00,)g(12.00,)g(12.00,)g
+(21.00,)1516 1353 y(16.00,)g(21.00,)g(5.00,)g(21.00,)h(18.00)f(];)1039
+1466 y(rowind)g(=)h([)h(0,)f(1,)g(4,)g(1,)g(2,)h(4,)f(0,)g(2,)g(0,)g
+(3,)g(3,)h(4)f(];)1039 1579 y(colptr)f(=)h([)h(0,)f(3,)g(6,)g(8,)g(10,)
+g(12)g(];)943 1692 y(})418 1805 y(})136 2105 y Fq(\017)f
+Fu(U)i(=)f({)h(Stype)e(=)h(SLU_NC;)f(Dtype)h(=)g(SLU_D;)f(Mtype)h(=)g
+(SLU_TRU;)f(nrow)g(=)i(5;)f(ncol)f(=)i(5;)514 2218 y(*Store)e(=)h({)h
+(nnz)f(=)g(11;)1039 2331 y(nzval)f(=)h([)h(21.00,)e(-13.26,)g(7.58,)g
+(21.00)h(];)1039 2444 y(rowind)f(=)h([)h(0,)f(1,)g(2,)g(0)h(];)1039
+2557 y(colptr)e(=)h([)h(0,)f(0,)g(0,)g(1,)g(4,)h(4)f(];)943
+2670 y(})418 2783 y(})136 3083 y Fq(\017)f Fu(L)i(=)f({)h(Stype)e(=)h
+(SLU_SC;)f(Dtype)h(=)g(SLU_D;)f(Mtype)h(=)g(SLU_TRLU;)e(nrow)i(=)g(5;)h
+(ncol)e(=)i(5;)514 3196 y(*Store)e(=)h({)h(nnz)f(=)g(11;)1039
+3309 y(nsuper)f(=)h(2;)1039 3422 y(nzval)f(=)h([)h(19.00,)e(0.63,)g
+(0.63,)h(21.00,)f(0.57,)g(0.57,)h(-13.26,)1516 3535 y(23.58,)f(-0.24,)g
+(5.00,)g(-0.77,)h(21.00,)f(34.20)g(];)1039 3648 y(nzval_colptr)e(=)k([)
+f(0)g(3,)h(6,)f(9,)g(11,)g(13)g(];)1039 3761 y(rowind)f(=)h([)h(0,)f
+(1,)g(4,)g(1,)g(2,)h(4,)f(3,)g(4)g(];)1039 3873 y(rowind_colptr)d(=)j
+([)h(0,)f(3,)g(6,)g(6,)g(8,)h(8)f(];)1039 3986 y(col_to_sup)e(=)i([)h
+(0,)f(1,)g(1,)g(2,)g(2)h(];)1039 4099 y(sup_to_col)d(=)i([)h(0,)f(1,)g
+(3,)g(5)h(];)943 4212 y(})418 4325 y(})0 4734 y Fw(Figure)43
+b(2.3:)69 b(The)44 b(data)g(structures)g(for)g(a)g(5)30
+b Fq(\002)f Fw(5)44 b(matrix)f(and)h(its)f Fv(LU)54 b
+Fw(factors,)48 b(as)c(represen)m(ted)g(in)f(the)0 4846
+y Fu(SuperMatrix)27 b Fw(data)k(structure.)41 b(Zero-based)30
+b(indexing)e(is)i(used.)1905 5778 y(21)p eop
+%%Page: 22 23
+22 22 bop 191 280 a Fu(DiagPivotThresh)139 b(=)47 b(1.0)620
+b(/*)47 b(partial)f(pivoting)g(*/)191 393 y(IterRefine)379
+b(=)47 b(NOREFINE)191 506 y(PrintStat)427 b(=)47 b(YES)141
+694 y Fw(The)34 b(other)h(p)s(ossible)d(v)-5 b(alues)35
+b(for)f(eac)m(h)i(\014eld)d(are)i(do)s(cumen)m(ted)g(in)e(the)i(source)
+g(co)s(de)g Fu(SRC/util.h)p Fw(.)50 b(The)0 807 y(users)30
+b(can)g(reset)h(eac)m(h)h(default)d(v)-5 b(alue)30 b(according)g(to)i
+(their)d(needs.)0 1093 y Fr(2.5)135 b(P)l(erm)l(utations)0
+1296 y Fw(Tw)m(o)28 b(p)s(erm)m(utation)f(matrices)g(are)h(in)m(v)m
+(olv)m(ed)g(in)e(the)i(solution)e(pro)s(cess.)40 b(In)27
+b(fact,)i(the)f(actual)g(factorization)g(w)m(e)0 1409
+y(p)s(erform)h(is)h Fv(P)494 1423 y Fo(r)532 1409 y Fv(AP)671
+1376 y Fo(T)658 1432 y(c)752 1409 y Fw(=)c Fv(LU)10 b
+Fw(,)30 b(where)h Fv(P)1360 1423 y Fo(r)1428 1409 y Fw(is)f(determined)
+f(from)i(partial)e(piv)m(oting)h(\(with)g(a)h(threshold)e(piv)m(oting)0
+1522 y(option\),)f(and)e Fv(P)572 1536 y Fo(c)634 1522
+y Fw(is)f(a)i(column)f(p)s(erm)m(utation)g(c)m(hosen)h(either)f(b)m(y)h
+(the)g(user)f(or)h Fu(SuperLU)p Fw(,)e(usually)f(to)k(mak)m(e)g(the)0
+1635 y Fv(L)j Fw(and)g Fv(U)41 b Fw(factors)33 b(as)e(sparse)g(as)h(p)s
+(ossible.)42 b Fv(P)1611 1649 y Fo(r)1680 1635 y Fw(and)31
+b Fv(P)1916 1649 y Fo(c)1983 1635 y Fw(are)g(represen)m(ted)h(b)m(y)f
+(t)m(w)m(o)i(in)m(teger)f(v)m(ectors)h Fu(perm)p 3730
+1635 29 4 v 33 w(r[])0 1748 y Fw(and)d Fu(perm)p 375
+1748 V 33 w(c[])p Fw(,)g(whic)m(h)f(are)i(the)f(p)s(erm)m(utations)g
+(of)g(the)h(in)m(tegers)f(\(0)c(:)g Fv(m)20 b Fq(\000)g
+Fw(1\))31 b(and)f(\(0)c(:)f Fv(n)20 b Fq(\000)g Fw(1\),)31
+b(resp)s(ectiv)m(ely)-8 b(.)0 1991 y Fm(2.5.1)112 b(Ordering)37
+b(for)h(sparsit)m(y)0 2163 y Fw(Column)i(reordering)h(for)g(sparsit)m
+(y)g(is)g(completely)h(separate)h(from)e(the)h Fv(LU)52
+b Fw(factorization.)76 b(The)41 b(column)0 2276 y(p)s(erm)m(utation)32
+b Fv(P)581 2290 y Fo(c)649 2276 y Fw(should)f(b)s(e)i(applied)d(b)s
+(efore)j(calling)e(the)j(factorization)f(routine)f Fu(dgstrf\(\))p
+Fw(.)47 b(In)32 b(principle,)0 2389 y(an)m(y)27 b(ordering)e(heuristic)
+f(used)i(for)g(symmetric)g(matrices)g(can)h(b)s(e)e(applied)f(to)k
+Fv(A)2798 2356 y Fo(T)2853 2389 y Fv(A)e Fw(\(or)h Fv(A)12
+b Fw(+)g Fv(A)3321 2356 y Fo(T)3403 2389 y Fw(if)25 b(the)i(matrix)0
+2502 y(is)d(nearly)g(structurally)e(symmetric\))j(to)g(obtain)f
+Fv(P)1756 2516 y Fo(c)1791 2502 y Fw(.)39 b(Curren)m(tly)-8
+b(,)25 b(w)m(e)g(pro)m(vide)f(the)h(follo)m(wing)e(ordering)h(options)0
+2614 y(through)30 b Fu(options)e Fw(argumen)m(t.)41 b(The)30
+b Fu(options.ColPerm)c Fw(\014eld)j(can)i(tak)m(e)h(the)e(follo)m(wing)
+f(v)-5 b(alues:)136 2802 y Fq(\017)46 b Fu(NATURAL)p
+Fw(:)29 b(use)h(natural)f(ordefring)g(\(i.e.,)i Fv(P)1744
+2816 y Fo(c)1805 2802 y Fw(=)25 b Fv(I)7 b Fw(\).)136
+2990 y Fq(\017)46 b Fu(MMD)p 377 2990 V 34 w(AT)p 507
+2990 V 34 w(PLUS)p 733 2990 V 33 w(A)p Fw(:)30 b(use)g(minim)m(um)e
+(degree)j(ordering)e(on)h(the)h(structure)f(of)g Fv(A)2913
+2957 y Fo(T)2989 2990 y Fw(+)20 b Fv(A)p Fw(.)136 3177
+y Fq(\017)46 b Fu(MMD)p 377 3177 V 34 w(ATA)p Fw(:)30
+b(use)g(minim)m(um)d(degree)k(ordering)e(on)i(the)f(structure)g(of)h
+Fv(A)2654 3144 y Fo(T)2709 3177 y Fv(A)p Fw(.)136 3365
+y Fq(\017)46 b Fu(COLAMD)p Fw(:)29 b(use)h(appro)m(ximate)h(minim)m(um)
+c(degree)k(column)f(ordering.)136 3553 y Fq(\017)46 b
+Fu(MY)p 329 3553 V 34 w(PERMC)p Fw(:)30 b(use)h(the)g(ordering)f(giv)m
+(en)i(in)e(the)h(p)s(erm)m(utation)f(v)m(ector)j Fu(perm)p
+2823 3553 V 33 w(c[])p Fw(,)e(whic)m(h)f(is)g(input)g(b)m(y)h(the)227
+3666 y(user.)141 3853 y(If)23 b Fu(options.ColPerm)18
+b Fw(is)k(set)h(to)h(the)f(last)g(v)-5 b(alue,)24 b(the)f(library)d
+(will)h(use)h(the)h(p)s(erm)m(utation)f(v)m(ector)j Fu(perm)p
+3730 3853 V 33 w(c[])0 3966 y Fw(as)32 b(an)f(input,)g(whic)m(h)f(ma)m
+(y)i(b)s(e)f(obtained)g(from)h(an)m(y)g(other)g(ordering)e(algorithm.)
+43 b(F)-8 b(or)33 b(example,)f(the)g(nested-)0 4079 y(dissection)d(t)m
+(yp)s(e)i(of)f(ordering)f(co)s(des)i(include)d(Metis)i([18)r(],)g
+(Chaco)h([15)q(])g(and)f(Scotc)m(h)h([28)q(].)141 4192
+y(Alternativ)m(ely)-8 b(,)44 b(the)d(users)g(can)g(pro)m(vide)f(their)h
+(o)m(wn)g(column)f(p)s(erm)m(utation)g(v)m(ector.)75
+b(F)-8 b(or)42 b(example,)h(it)0 4305 y(ma)m(y)32 b(b)s(e)f(an)g
+(ordering)f(suitable)g(for)h(the)g(underlying)e(ph)m(ysical)g(problem.)
+42 b(Both)32 b(driv)m(er)e(routines)h Fu(dgssv)f Fw(and)0
+4418 y Fu(dgssvx)f Fw(tak)m(e)j Fu(perm)p 712 4418 V
+33 w(c[])d Fw(as)i(an)f(input)f(argumen)m(t.)141 4531
+y(After)f(p)s(erm)m(utation)f Fv(P)952 4545 y Fo(c)1015
+4531 y Fw(is)f(applied)g(to)i Fv(A)p Fw(,)h(w)m(e)f(use)f
+Fu(SLU)p 2084 4531 V 34 w(NCP)g Fw(format)h(to)g(represen)m(t)g(the)g
+(p)s(erm)m(uted)f(matrix)0 4644 y Fv(AP)139 4611 y Fo(T)126
+4666 y(c)194 4644 y Fw(,)39 b(in)c(whic)m(h)g(the)i(consecutiv)m(e)h
+(columns)d(of)i(nonzeros)f(ma)m(y)i(not)e(b)s(e)g(stored)h(con)m
+(tiguously)f(in)f(memory)-8 b(.)0 4756 y(Therefore,)37
+b(w)m(e)e(need)g(t)m(w)m(o)i(separate)f(arra)m(ys)g(of)f(p)s(oin)m
+(ters,)h Fu(colbeg[])d Fw(and)i Fu(colend[])p Fw(,)f(to)i(indicate)f
+(the)g(b)s(e-)0 4869 y(ginning)28 b(and)i(end)g(of)g(eac)m(h)i(column)d
+(in)g Fu(nzval[])f Fw(and)i Fu(rowind[])p Fw(.)191 5057
+y Fu(typedef)46 b(struct)g({)382 5170 y(int)94 b(nnz;)238
+b(/*)47 b(number)f(of)h(nonzeros)f(in)h(the)g(matrix)f(*/)382
+5283 y(void)g(*nzval;)94 b(/*)47 b(array)g(of)g(nonzero)f(values,)f
+(packed)h(by)i(column)e(*/)382 5396 y(int)94 b(*rowind;)46
+b(/*)h(array)g(of)g(row)g(indices)e(of)j(the)f(nonzeros)e(*/)382
+5509 y(int)94 b(*colbeg;)46 b(/*)h(colbeg[j])e(points)i(to)g(the)g
+(location)e(in)i(nzval[])f(and)h(rowind[])1905 5778 y
+Fw(22)p eop
+%%Page: 23 24
+23 23 bop 1193 280 a Fu(which)47 b(starts)f(column)g(j)h(*/)382
+393 y(int)94 b(*colend;)46 b(/*)h(colend[j])e(points)i(to)g(one)g(past)
+f(the)h(location)f(in)h(nzval[])1193 506 y(and)g(rowind[])f(which)g
+(ends)h(column)f(j)h(*/)191 619 y(})g(NCPformat;)0 858
+y Fm(2.5.2)112 b(P)m(artial)36 b(piv)m(oting)g(with)g(threshold)0
+1030 y Fw(W)-8 b(e)41 b(ha)m(v)m(e)f(included)d(a)j(threshold)e(piv)m
+(oting)h(parameter)h Fv(u)g Fq(2)h Fw([0)p Fv(;)15 b
+Fw(1])41 b(to)f(con)m(trol)g(n)m(umerical)e(stabilit)m(y)-8
+b(.)67 b(The)0 1142 y(user)42 b(can)h(c)m(ho)s(ose)g(to)g(use)g(a)f(ro)
+m(w)h(p)s(erm)m(utation)f(obtained)g(from)g(a)h(previous)e
+(factorization.)77 b(\(The)43 b(argu-)0 1255 y(men)m(t)38
+b Fu(options.Fact)45 b(=)i(SamePattern)p 1487 1255 29
+4 v 32 w(SameRowPerm)34 b Fw(should)i(b)s(e)h(passed)h(to)g(the)g
+(factorization)h(routine)0 1368 y Fu(dgstrf\(\))p Fw(.\))59
+b(The)36 b(piv)m(oting)g(subroutine)f Fu(dpivotL\(\))g
+Fw(c)m(hec)m(ks)j(whether)e(this)g(c)m(hoice)i(of)f(piv)m(ot)g
+(satis\014es)g(the)0 1481 y(threshold;)g(if)d(not,)k(it)d(will)e(try)j
+(the)f(diagonal)g(elemen)m(t.)57 b(If)35 b(neither)g(of)h(the)g(ab)s(o)
+m(v)m(e)g(satis\014es)f(the)h(threshold,)0 1594 y(the)30
+b(maxim)m(um)e(magnitude)g(elemen)m(t)i(in)e(the)i(column)e(will)f(b)s
+(e)h(used)h(as)g(the)h(piv)m(ot.)40 b(The)29 b(pseudo-co)s(de)g(of)h
+(the)0 1707 y(piv)m(oting)g(p)s(olicy)e(for)i(column)g
+Fv(j)35 b Fw(is)30 b(giv)m(en)g(b)s(elo)m(w.)207 1890
+y(\(1\))92 b(compute)31 b Fv(thr)s(esh)25 b Fw(=)g Fv(u)30
+b Fq(j)p Fv(a)1325 1904 y Fo(mj)1425 1890 y Fq(j)p Fw(,)h(where)e
+Fq(j)p Fv(a)1841 1904 y Fo(mj)1941 1890 y Fq(j)c Fw(=)g(max)2256
+1904 y Fo(i)p Fn(\025)p Fo(j)2387 1890 y Fq(j)p Fv(a)2460
+1904 y Fo(ij)2521 1890 y Fq(j)p Fw(;)207 2116 y(\(2\))92
+b Fx(if)30 b Fw(user)g(sp)s(eci\014es)f(piv)m(ot)h(ro)m(w)h
+Fv(k)i Fx(and)e Fq(j)p Fv(a)1808 2131 y Fo(k)r(j)1883
+2116 y Fq(j)26 b(\025)f Fv(thr)s(esh)30 b Fx(and)g Fv(a)2571
+2131 y Fo(k)r(j)2672 2116 y Fq(6)p Fw(=)24 b(0)31 b Fx(then)621
+2229 y Fw(piv)m(ot)g(ro)m(w)f(=)25 b Fv(k)s Fw(;)414
+2342 y Fx(else)35 b(if)65 b Fq(j)p Fv(a)814 2356 y Fo(j)t(j)883
+2342 y Fq(j)26 b(\025)f Fv(thr)s(esh)30 b Fx(and)h Fv(a)1572
+2356 y Fo(j)t(j)1666 2342 y Fq(6)p Fw(=)25 b(0)30 b Fx(then)621
+2455 y Fw(piv)m(ot)h(ro)m(w)f(=)25 b Fv(j)5 b Fw(;)414
+2568 y Fx(else)621 2681 y Fw(piv)m(ot)31 b(ro)m(w)f(=)25
+b Fv(m)p Fw(;)414 2793 y Fx(endif)p Fw(;)141 2977 y(Tw)m(o)31
+b(sp)s(ecial)e(v)-5 b(alues)29 b(of)i Fv(u)f Fw(result)g(in)f(the)h
+(follo)m(wing)f(t)m(w)m(o)j(strategies:)136 3140 y Fq(\017)46
+b Fv(u)26 b Fw(=)f(0)p Fv(:)p Fw(0:)41 b(either)30 b(use)g(user-sp)s
+(eci\014ed)f(piv)m(ot)h(order)g(if)f(a)m(v)-5 b(ailable,)30
+b(or)g(else)h(use)f(diagonal)f(piv)m(ot;)136 3318 y Fq(\017)46
+b Fv(u)26 b Fw(=)f(1)p Fv(:)p Fw(0:)41 b(classical)30
+b(partial)f(piv)m(oting.)0 3599 y Fr(2.6)135 b(Symmetric)46
+b(Mo)t(de)0 3802 y Fw(In)34 b(man)m(y)i(applications,)f(matrix)f
+Fv(A)h Fw(ma)m(y)h(b)s(e)f(diagonally)e(dominan)m(t)i(or)g(nearly)f
+(so.)56 b(In)34 b(this)g(case,)k(piv)m(oting)0 3915 y(on)d(the)g
+(diagonal)f(is)g(su\016cien)m(t)h(for)g(stabilit)m(y)e(and)i(is)f
+(preferable)g(for)g(sparsit)m(y)h(than)f(o\013-diagonal)i(piv)m(oting.)
+0 4028 y(T)-8 b(o)36 b(do)f(this,)g(the)h(user)e(can)h(set)h(a)g(small)
+d(\(less-than-one\))j(diagonal)f(piv)m(ot)g(threshold)e(\(e.g.,)39
+b(0.0,)e(0.01\))h(and)0 4141 y(c)m(ho)s(ose)d(an)f(\()p
+Fv(A)525 4108 y Fo(T)604 4141 y Fw(+)22 b Fv(A)p Fw(\){based)35
+b(column)e(p)s(erm)m(utation)g(algorithm.)51 b(W)-8 b(e)35
+b(call)f(this)f(setting)h Fp(symmetric)j(mo)-5 b(de)p
+Fw(.)0 4254 y(In)30 b(this)f(case,)j(the)e Fu(options.SymmetricMode)42
+b(=)48 b(YES)29 b Fw(m)m(ust)h(b)s(e)g(set.)141 4367
+y(Note)35 b(that,)g(when)e(an)g(diagonal)g(en)m(try)h(is)f(smaller)f
+(than)h(the)h(threshold,)f(the)h(co)s(de)g(will)d(still)g(c)m(ho)s(ose)
+k(an)0 4480 y(o\013-diagonal)g(piv)m(ot.)52 b(That)35
+b(is,)g(the)f(ro)m(w)h(p)s(erm)m(utation)e Fv(P)2051
+4494 y Fo(r)2124 4480 y Fw(ma)m(y)i(not)g(b)s(e)f(Iden)m(tit)m(y)-8
+b(.)53 b(Please)35 b(refer)f(to)h([22)r(])f(for)0 4593
+y(more)d(discussion)c(on)k(the)f(symmetric)g(mo)s(de.)0
+4874 y Fr(2.7)135 b(Memory)45 b(managemen)l(t)i(for)e
+Ff(L)g Fr(and)f Ff(U)0 5077 y Fw(In)33 b(the)i(sparse)e
+Fv(LU)44 b Fw(algorithm,)35 b(the)f(amoun)m(t)g(of)h(space)f(needed)g
+(to)h(hold)e(the)h(data)h(structures)e(of)i Fv(L)f Fw(and)f
+Fv(U)0 5190 y Fw(cannot)d(b)s(e)g(accurately)g(predicted)f(prior)f(to)i
+(the)g(factorization.)42 b(The)29 b(dynamically)e(gro)m(wing)j(arra)m
+(ys)g(include)0 5303 y(those)k(for)f(the)g(nonzero)h(v)-5
+b(alues)33 b(\()p Fu(nzval[])p Fw(\))f(and)h(the)g(compressed)g(ro)m(w)
+h(indices)d(\()p Fu(rowind[])p Fw(\))h(of)h Fv(L)p Fw(,)h(and)f(for)0
+5416 y(the)e(nonzero)f(v)-5 b(alues)30 b(\()p Fu(nzval[])p
+Fw(\))f(and)h(the)g(ro)m(w)h(indices)d(\()p Fu(rowind[])p
+Fw(\))h(of)i Fv(U)10 b Fw(.)141 5529 y(Tw)m(o)31 b(alternativ)m(e)f
+(memory)h(mo)s(dels)e(are)i(presen)m(ted)f(to)h(the)g(user:)1905
+5778 y(23)p eop
+%%Page: 24 25
+24 24 bop 136 280 a Fq(\017)46 b Fw(system-lev)m(el)31
+b({)g(based)f(on)g(C's)g(dynamic)f(allo)s(cation)h(capabilit)m(y)f(\()p
+Fu(malloc/free)p Fw(\);)136 467 y Fq(\017)46 b Fw(user-lev)m(el)34
+b({)h(based)g(on)f(a)i(user-supplied)31 b Fu(work[])i
+Fw(arra)m(y)i(of)g(size)f Fu(lwork)g Fw(\(in)f(b)m(ytes\).)55
+b(This)33 b(is)h(similar)227 579 y(to)g(F)-8 b(ortran-st)m(yle)33
+b(handling)d(of)j(w)m(ork)g(space.)48 b Fu(Work[])30
+b Fw(is)i(organized)h(as)f(a)h(t)m(w)m(o-ended)h(stac)m(k,)h(one)e(end)
+227 692 y(holding)i(the)j Fv(L)f Fw(and)f Fv(U)47 b Fw(data)38
+b(structures,)h(the)e(other)h(end)e(holding)f(the)j(auxiliary)d(arra)m
+(ys)i(of)g(kno)m(wn)227 805 y(size.)141 989 y(Except)45
+b(for)g(the)g(di\013eren)m(t)f(w)m(a)m(ys)h(to)h(allo)s(cate/deallo)s
+(cate)g(space,)j(the)c(logical)f(view)g(of)h(the)g(memory)0
+1102 y(organization)30 b(is)g(the)g(same)h(for)f(b)s(oth)g(sc)m(hemes.)
+41 b(No)m(w)31 b(w)m(e)g(describ)s(e)e(the)i(p)s(olicies)d(in)h(the)h
+(memory)h(mo)s(dule.)141 1215 y(A)m(t)k(the)f(outset)h(of)f(the)g
+(factorization,)h(w)m(e)g(guess)e(there)i(will)c(b)s(e)i
+Fu(FILL*nnz\(A\))e Fw(\014lls)g(in)i(the)h(factors)h(and)0
+1328 y(allo)s(cate)25 b(corresp)s(onding)d(storage)k(for)e(the)h(ab)s
+(o)m(v)m(e)h(four)d(arra)m(ys,)j(where)e Fu(nnz\(A\))f
+Fw(is)g(the)i(n)m(um)m(b)s(er)e(of)i(nonzeros)f(in)0
+1441 y(original)19 b(matrix)g Fv(A)p Fw(,)k(and)d Fu(FILL)f
+Fw(is)h(an)g(in)m(teger,)j(sa)m(y)e(20.)38 b(\(The)20
+b(v)-5 b(alue)20 b(of)h Fu(FILL)e Fw(can)i(b)s(e)f(set)g(in)g(an)g
+(inquiry)d(function)0 1554 y Fu(sp)p 102 1554 29 4 v
+34 w(ienv\(\))p Fw(,)32 b(see)h(section)g(2.10.3.\))50
+b(If)32 b(this)f(initial)f(request)j(exceeds)h(the)e(ph)m(ysical)g
+(memory)g(constrain)m(t,)i(the)0 1667 y Fu(FILL)22 b
+Fw(factor)j(is)d(rep)s(eatedly)h(reduced,)i(and)e(attempts)h(are)g
+(made)f(to)i(allo)s(cate)f(smaller)e(arra)m(ys,)j(un)m(til)d(the)i
+(initial)0 1780 y(allo)s(cation)30 b(succeeds.)141 1893
+y(During)c(the)i(factorization,)h(if)d(an)m(y)i(arra)m(y)g(size)f
+(exceeds)h(the)g(allo)s(cated)f(b)s(ound,)f(w)m(e)i(expand)f(it)g(as)h
+(follo)m(ws.)0 2006 y(W)-8 b(e)32 b(\014rst)f(allo)s(cate)g(a)h(c)m(h)m
+(unk)f(of)g(new)g(memory)g(of)g(size)g Fu(EXPAND)f Fw(times)h(the)g
+(old)f(size,)i(then)f(cop)m(y)h(the)f(existing)0 2118
+y(data)22 b(in)m(to)f(the)g(new)f(memory)-8 b(,)24 b(and)c(then)h(free)
+g(the)g(old)f(storage.)40 b(The)20 b(extra)i(cop)m(ying)f(is)f
+(necessary)-8 b(,)24 b(b)s(ecause)d(the)0 2231 y(factorization)27
+b(algorithm)f(requires)f(that)i(eac)m(h)h(of)f(the)g(aforemen)m(tioned)
+g(four)f(data)h(structures)f(b)s(e)g Fp(c)-5 b(ontiguous)0
+2344 y Fw(in)40 b(memory)-8 b(.)75 b(The)41 b(v)-5 b(alues)41
+b(of)h Fu(FILL)f Fw(and)g Fu(EXPAND)f Fw(are)i(normally)d(set)k(to)f
+(20)h(and)e(1.5,)k(resp)s(ectiv)m(ely)-8 b(.)75 b(See)0
+2457 y Fu(xmemory.c)28 b Fw(for)i(details.)141 2570 y(After)38
+b(factorization,)h(w)m(e)f(do)f(not)h(garbage-collect)h(the)e(extra)h
+(space)g(that)g(ma)m(y)g(ha)m(v)m(e)g(b)s(een)f(allo)s(cated.)0
+2683 y(Th)m(us,)24 b(there)f(will)e(b)s(e)h(external)i(fragmen)m
+(tation)f(in)f(the)i Fv(L)f Fw(and)f Fv(U)34 b Fw(data)23
+b(structures.)38 b(The)23 b(settings)g(of)g Fu(FILL)g
+Fw(and)0 2796 y Fu(EXPAND)30 b Fw(should)g(tak)m(e)j(in)m(to)f(accoun)m
+(t)i(the)e(trade-o\013)h(b)s(et)m(w)m(een)f(the)g(n)m(um)m(b)s(er)f(of)
+h(expansions)e(and)h(the)h(amoun)m(t)0 2909 y(of)f(fragmen)m(tation.)
+141 3022 y(Arra)m(ys)k(of)h(kno)m(wn)f(size,)h(suc)m(h)f(as)h(v)-5
+b(arious)34 b(column)g(p)s(oin)m(ters)g(and)h(w)m(orking)f(arra)m(ys,)k
+(are)d(allo)s(cated)h(just)0 3135 y(once.)41 b(All)29
+b(dynamically-allo)s(cated)g(w)m(orking)h(arra)m(ys)g(are)h(freed)f
+(after)h(factorization.)0 3420 y Fr(2.8)135 b(User-callable)47
+b(routines)0 3623 y Fw(The)40 b(naming)f(con)m(v)m(en)m(tions,)44
+b(calling)39 b(sequences)h(and)g(functionalit)m(y)f(of)h(these)h
+(routines)e(mimic)g(the)h(corre-)0 3736 y(sp)s(onding)24
+b(LAP)-8 b(A)m(CK)26 b(soft)m(w)m(are)i([1].)40 b(In)25
+b(the)i(routine)e(names,)i(suc)m(h)f(as)g Fu(dgstrf)p
+Fw(,)g(w)m(e)h(use)e(the)i(t)m(w)m(o)g(letters)g Fu(GS)e
+Fw(to)0 3849 y(denote)34 b Fp(gener)-5 b(al)36 b(sp)-5
+b(arse)35 b Fw(matrices.)50 b(The)33 b(leading)f(letter)p
+Fu(x)i Fw(stands)f(for)g Fu(S,)47 b(D,)g(C)p Fw(,)34
+b(or)f Fu(Z)p Fw(,)g(sp)s(ecifying)f(the)h(data)0 3962
+y(t)m(yp)s(e.)0 4205 y Fm(2.8.1)112 b(Driv)m(er)37 b(routines)0
+4376 y Fw(W)-8 b(e)27 b(pro)m(vide)f(t)m(w)m(o)i(t)m(yp)s(es)e(of)g
+(driv)m(er)f(routines)h(for)g(solving)f(systems)h(of)g(linear)f
+(equations.)39 b(The)26 b(driv)m(er)f(routines)0 4489
+y(can)31 b(handle)e(b)s(oth)g(column-)h(and)f(ro)m(w-orien)m(ted)i
+(storage)h(sc)m(hemes.)136 4673 y Fq(\017)46 b Fw(A)30
+b(simple)d(driv)m(er)i Fu(dgssv\(\))p Fw(,)f(whic)m(h)g(solv)m(es)i
+(the)g(system)f Fv(AX)k Fw(=)25 b Fv(B)34 b Fw(b)m(y)c(factorizing)f
+Fv(A)h Fw(and)f(o)m(v)m(erwriting)227 4786 y Fv(B)35
+b Fw(with)29 b(the)i(solution)e Fv(X)7 b Fw(.)136 4972
+y Fq(\017)46 b Fw(An)c(exp)s(ert)h(driv)m(er)e Fu(dgssvx\(\))p
+Fw(,)j(whic)m(h,)g(in)d(addition)g(to)i(the)g(ab)s(o)m(v)m(e,)k(also)c
+(p)s(erforms)e(the)h(follo)m(wing)227 5085 y(functions)29
+b(\(some)i(of)g(them)f(optionally\):)330 5271 y Fx({)45
+b Fw(solv)m(e)31 b Fv(A)718 5238 y Fo(T)773 5271 y Fv(X)i
+Fw(=)25 b Fv(B)5 b Fw(;)330 5416 y Fx({)45 b Fw(equilibrate)35
+b(the)i(system)g(\(scale)g Fv(A)p Fw('s)g(ro)m(ws)f(and)g(columns)g(to)
+h(ha)m(v)m(e)h(unit)d(norm\))i(if)e Fv(A)i Fw(is)f(p)s(o)s(orly)427
+5529 y(scaled;)1905 5778 y(24)p eop
+%%Page: 25 26
+25 25 bop 330 280 a Fx({)45 b Fw(estimate)h(the)e(condition)g(n)m(um)m
+(b)s(er)f(of)i Fv(A)p Fw(,)j(c)m(hec)m(k)e(for)f(near-singularit)m(y)-8
+b(,)47 b(and)c(c)m(hec)m(k)k(for)d(piv)m(ot)427 393 y(gro)m(wth;)330
+539 y Fx({)h Fw(re\014ne)30 b(the)h(solution)e(and)g(compute)i(forw)m
+(ard)f(and)g(bac)m(kw)m(ard)g(error)g(b)s(ounds.)141
+727 y(These)e(driv)m(er)f(routines)h(co)m(v)m(er)i(all)d(the)i
+(functionalit)m(y)e(of)h(the)h(computational)f(routines.)39
+b(W)-8 b(e)29 b(exp)s(ect)g(that)0 840 y(most)35 b(users)f(can)g
+(simply)e(use)j(these)g(driv)m(er)e(routines)g(to)j(ful\014ll)31
+b(their)i(tasks)i(with)e(no)i(need)f(to)h(b)s(other)f(with)0
+953 y(the)d(computational)f(routines.)0 1196 y Fm(2.8.2)112
+b(Computational)36 b(routines)0 1368 y Fw(The)22 b(users)g(can)i(in)m
+(v)m(ok)m(e)g(the)f(follo)m(wing)e(computational)i(routines,)g(instead)
+f(of)h(the)g(driv)m(er)f(routines,)i(to)f(directly)0
+1481 y(con)m(trol)43 b(the)g(b)s(eha)m(vior)f(of)h Fu(SuperLU)p
+Fw(.)f(The)g(computational)g(routines)g(can)h(only)f(handle)g
+(column-orien)m(ted)0 1594 y(storage.)136 1806 y Fq(\017)k
+Fu(dgstrf\(\))p Fw(:)39 b(F)-8 b(actorize.)227 1957 y(This)31
+b(implemen)m(ts)f(the)j(\014rst-time)e(factorization,)j(or)e(later)g
+(re-factorization)h(with)e(the)h(same)h(nonzero)227 2069
+y(pattern.)56 b(In)35 b(re-factorizations,)i(the)f(co)s(de)g(has)f(the)
+g(abilit)m(y)f(to)i(use)f(the)h(same)g(column)e(p)s(erm)m(utation)227
+2182 y Fv(P)285 2196 y Fo(c)349 2182 y Fw(and)27 b(ro)m(w)i(p)s(erm)m
+(utation)e Fv(P)1272 2196 y Fo(r)1339 2182 y Fw(obtained)h(from)g(a)g
+(previous)f(factorization.)41 b(Sev)m(eral)28 b(scalar)h(argumen)m(ts)
+227 2295 y(con)m(trol)21 b(ho)m(w)g(the)g Fv(LU)30 b
+Fw(decomp)s(osition)20 b(and)g(the)h(n)m(umerical)e(piv)m(oting)h
+(should)e(b)s(e)i(p)s(erformed.)36 b Fu(dgstrf\(\))227
+2408 y Fw(can)31 b(handle)e(non-square)h(matrices.)136
+2596 y Fq(\017)46 b Fu(dgstrs\(\))p Fw(:)39 b(T)-8 b(riangular)28
+b(solv)m(e.)227 2746 y(This)f(tak)m(es)j(the)f Fv(L)f
+Fw(and)h Fv(U)38 b Fw(triangular)27 b(factors,)j(the)f(ro)m(w)g(and)f
+(column)f(p)s(erm)m(utation)h(v)m(ectors,)j(and)d(the)227
+2859 y(righ)m(t-hand)h(side)h(to)h(compute)g(a)f(solution)f(matrix)h
+Fv(X)38 b Fw(of)30 b Fv(AX)j Fw(=)25 b Fv(B)35 b Fw(or)30
+b Fv(A)2823 2826 y Fo(T)2879 2859 y Fv(X)i Fw(=)25 b
+Fv(B)5 b Fw(.)136 3047 y Fq(\017)46 b Fu(dgscon\(\))p
+Fw(:)39 b(Estimate)30 b(condition)f(n)m(um)m(b)s(er.)227
+3197 y(Giv)m(en)41 b(the)g(matrix)f Fv(A)g Fw(and)g(its)g(factors)i
+Fv(L)e Fw(and)g Fv(U)10 b Fw(,)43 b(this)d(estimates)h(the)g(condition)
+e(n)m(um)m(b)s(er)g(in)h(the)227 3310 y(one-norm)30 b(or)g(in\014nit)m
+(y-norm.)38 b(The)29 b(algorithm)g(is)g(due)g(to)i(Hager)g(and)e
+(Higham)h([16)q(],)g(and)g(is)e(the)j(same)227 3423 y(as)g
+Fu(CONDEST)d Fw(in)h(sparse)h(Matlab.)136 3610 y Fq(\017)46
+b Fu(dgsequ\(\)/dlaqgs\(\))p Fw(:)36 b(Equilibrate.)227
+3761 y Fu(dgsequ)31 b Fw(\014rst)h(computes)g(the)h(ro)m(w)g(and)f
+(column)f(scalings)g Fv(D)2388 3775 y Fo(r)2459 3761
+y Fw(and)h Fv(D)2713 3775 y Fo(c)2780 3761 y Fw(whic)m(h)f(w)m(ould)h
+(mak)m(e)h(eac)m(h)h(ro)m(w)227 3874 y(and)28 b(eac)m(h)h(column)d(of)i
+(the)h(scaled)e(matrix)h Fv(D)1809 3888 y Fo(r)1847 3874
+y Fv(AD)1990 3888 y Fo(c)2053 3874 y Fw(ha)m(v)m(e)h(equal)e(norm.)39
+b Fu(dlaqgs)27 b Fw(then)g(applies)f(them)i(to)227 3986
+y(the)j(original)f(matrix)g Fv(A)h Fw(if)f(it)h(is)f(indeed)f(badly)h
+(scaled.)42 b(The)31 b(equilibrated)d Fv(A)j Fw(o)m(v)m(erwrites)h(the)
+f(original)227 4099 y Fv(A)p Fw(.)136 4287 y Fq(\017)46
+b Fu(dgsrfs\(\))p Fw(:)39 b(Re\014ne)30 b(solution.)227
+4437 y(Giv)m(en)g Fv(A)p Fw(,)h(its)f(factors)h Fv(L)f
+Fw(and)f Fv(U)10 b Fw(,)31 b(and)e(an)h(initial)e(solution)h
+Fv(X)7 b Fw(,)30 b(this)g(do)s(es)f(iterativ)m(e)i(re\014nemen)m(t,)f
+(using)227 4550 y(the)k(same)f(precision)e(as)j(the)f(input)e(data.)50
+b(It)33 b(also)g(computes)h(forw)m(ard)e(and)h(bac)m(kw)m(ard)g(error)g
+(b)s(ounds)227 4663 y(for)d(the)h(re\014ned)e(solution.)0
+4907 y Fm(2.8.3)112 b(Utilit)m(y)35 b(routines)0 5078
+y Fw(The)29 b(utilit)m(y)f(routines)h(can)g(help)g(users)f(create)k
+(and)c(destro)m(y)j(the)e Fu(SuperLU)f Fw(matrices)i(easily)-8
+b(.)40 b(These)29 b(routines)0 5191 y(reside)g(in)g(t)m(w)m(o)j
+(places:)41 b Fu(SRC/util.c)27 b Fw(con)m(tains)k(the)f(routines)g
+(that)h(are)f(precision-indep)s(enden)m(t;)0 5304 y Fu(SRC/)p
+Fq(f)p Fu(s,d,c,z)p Fq(g)p Fu(util.c)e Fw(con)m(tains)k(the)g(routines)
+f(dep)s(enden)m(t)g(on)g(precision.)44 b(Here,)33 b(w)m(e)f(list)e(the)
+j(protot)m(yp)s(es)0 5417 y(of)e(these)f(routines.)1905
+5778 y(25)p eop
+%%Page: 26 27
+26 26 bop 191 280 a Fu(/*)47 b(Create)f(a)i(supermatrix)c(in)k
+(compressed)d(column)h(format.)f(A)j(is)f(the)g(output.)f(*/)191
+393 y(dCreate_CompCol_Matrix\(S)o(uper)o(Mat)o(rix)41
+b(*A,)47 b(int)g(m,)g(int)g(n,)g(int)g(nnz,)1289 506
+y(double)f(*nzval,)g(int)g(*rowind,)g(int)h(*colptr,)1289
+619 y(Stype_t)e(stype,)i(Dtype_t)e(dtype,)h(Mtype_t)g(mtype\);)191
+845 y(/*)h(Create)f(a)i(supermatrix)c(in)k(compressed)d(row)h(format.)g
+(A)i(is)f(the)g(output.)f(*/)191 958 y(dCreate_CompRow_Matrix\(S)o
+(uper)o(Mat)o(rix)41 b(*A,)47 b(int)g(m,)g(int)g(n,)g(int)g(nnz,)1289
+1071 y(double)f(*nzval,)g(int)g(*colind,)g(int)h(*rowptr,)1289
+1184 y(Stype_t)e(stype,)i(Dtype_t)e(dtype,)h(Mtype_t)g(mtype\);)191
+1409 y(/*)h(Copy)g(matrix)f(A)h(into)g(matrix)f(B,)h(both)g(in)g
+(compressed)e(column)h(format.)g(*/)191 1522 y
+(dCopy_CompCol_Matrix\(Sup)o(erMa)o(tri)o(x)c(*A,)47
+b(SuperMatrix)e(*B\);)191 1748 y(/*)i(Create)f(a)i(supermatrix)c(in)k
+(dense)e(format.)g(X)h(is)g(the)g(output.*/)191 1861
+y(dCreate_Dense_Matrix\(Sup)o(erMa)o(tri)o(x)42 b(*X,)47
+b(int)g(m,)g(int)g(n,)g(double)f(*x,)h(int)g(ldx,)1193
+1974 y(Stype_t)f(stype,)g(Dtype_t)g(dtype,)g(Mtype_t)g(mtype\);)191
+2200 y(/*)h(Create)f(a)i(supermatrix)c(in)k(supernodal)d(format.)g(L)j
+(is)f(the)g(output.)f(*/)191 2313 y(dCreate_SuperNode_Matrix)o(\(Sup)o
+(erM)o(atri)o(x)c(*L,)47 b(int)g(m,)g(int)g(n,)g(int)g(nnz,)1384
+2426 y(double)f(*nzval,)g(int)h(*nzval_colptr,)d(int)j(*rowind,)1384
+2539 y(int)g(*rowind_colptr,)d(int)j(*col_to_sup,)d(int)j(*sup_to_col,)
+1384 2652 y(Stype_t)f(stype,)g(Dtype_t)g(dtype,)g(Mtype_t)g(mtype\);)
+191 2877 y(/*)h(Convert)f(the)h(compressed)e(row)i(fromat)f(to)h(the)g
+(compressed)e(column)h(format.)g(*/)191 2990 y
+(dCompRow_to_CompCol\(int)41 b(m,)48 b(int)e(n,)i(int)f(nnz,)1145
+3103 y(double)g(*a,)f(int)h(*colind,)f(int)h(*rowptr,)1145
+3216 y(double)g(**at,)f(int)h(**rowind,)e(int)i(**colptr\);)191
+3442 y(/*)g(Print)f(a)i(supermatrix)d(in)i(compressed)e(column)h
+(format.)g(*/)191 3555 y(dPrint_CompCol_Matrix\(ch)o(ar)c(*what,)k
+(SuperMatrix)e(*A\);)191 3781 y(/*)j(Print)f(a)i(supermatrix)d(in)i
+(supernodal)e(format.)h(*/)191 3894 y(dPrint_SuperNode_Matrix\()o(char)
+41 b(*what,)46 b(SuperMatrix)f(*A\);)191 4119 y(/*)i(Print)f(a)i
+(supermatrix)d(in)i(dense)f(format.)g(*/)191 4232 y
+(dPrint_Dense_Matrix\(char)41 b(*what,)46 b(SuperMatrix)f(*A\);)191
+4458 y(/*)i(Deallocate)e(the)i(storage)f(structure)f(*Store.)h(*/)191
+4571 y(Destroy_SuperMatrix_Stor)o(e\(Su)o(per)o(Matr)o(ix)c(*A\);)191
+4797 y(/*)47 b(Deallocate)e(the)i(supermatrix)e(structure)g(in)i
+(compressed)e(column)h(format.)g(*/)191 4910 y
+(Destroy_CompCol_Matrix\(S)o(uper)o(Mat)o(rix)41 b(*A\))191
+5136 y(/*)47 b(Deallocate)e(the)i(supermatrix)e(structure)g(in)i
+(supernodal)e(format.)h(*/)191 5248 y(Destroy_SuperNode_Matrix)o(\(Sup)
+o(erM)o(atri)o(x)c(*A\))191 5474 y(/*)47 b(Deallocate)e(the)i
+(supermatrix)e(structure)g(in)i(permuted)f(compressed)f(column)h
+(format.)g(*/)1905 5778 y Fw(26)p eop
+%%Page: 27 28
+27 27 bop 191 280 a Fu(Destroy_CompCol_Permuted)o(\(Sup)o(erM)o(atri)o
+(x)42 b(*A\))191 506 y(/*)47 b(Deallocate)e(the)i(supermatrix)e
+(structure)g(in)i(dense)g(format.)e(*/)191 619 y
+(Destroy_Dense_Matrix\(Sup)o(erMa)o(tri)o(x)d(*A\))0
+906 y Fr(2.9)135 b(Matlab)46 b(in)l(terface)0 1108 y
+Fw(In)36 b(the)h Fu(SuperLU)n(/MATLAB)e Fw(sub)s(directory)-8
+b(,)37 b(w)m(e)g(ha)m(v)m(e)h(dev)m(elop)s(ed)e(a)h(set)g(of)g
+(MEX-\014les)g(in)m(terface)g(to)g(Matlab.)0 1221 y(T)m(yping)23
+b Fu(make)h Fw(in)f(this)h(directory)g(pro)s(duces)f(executables)i(to)g
+(b)s(e)f(in)m(v)m(ok)m(ed)h(in)f(Matlab.)39 b(The)24
+b(curren)m(t)g Fu(Makefile)0 1334 y Fw(is)c(set)h(up)e(so)i(that)g(the)
+f(MEX-\014les)h(are)f(compatible)g(with)f(Matlab)i(V)-8
+b(ersion)20 b(5.)38 b(The)20 b(user)g(should)e(edit)i
+Fu(Makefile)0 1447 y Fw(for)34 b(Matlab)h(V)-8 b(ersion)34
+b(4)h(compatibilit)m(y)-8 b(.)52 b(Righ)m(t)35 b(no)m(w,)g(only)f(the)h
+(factor)g(routine)f Fu(dgstrf\(\))e Fw(and)i(the)h(simple)0
+1560 y(driv)m(er)42 b(routine)g Fu(dgssv\(\))f Fw(are)i(callable)f(b)m
+(y)g(in)m(v)m(oking)h Fu(superlu)e Fw(and)h Fu(lusolve)f
+Fw(in)g(Matlab,)47 b(resp)s(ectiv)m(ely)-8 b(.)0 1673
+y Fu(Superlu)26 b Fw(and)h Fu(lusolve)e Fw(corresp)s(ond)i(to)h(the)g
+(t)m(w)m(o)h(Matlab)e(built-in)e(functions)h Fu(lu)h
+Fw(and)g Fq(n)f Fw(.)39 b(In)27 b(Matlab,)i(when)0 1786
+y(y)m(ou)i(t)m(yp)s(e)381 1899 y Fu(help)47 b(superlu)0
+2012 y Fw(y)m(ou)31 b(will)c(\014nd)i(the)i(follo)m(wing)e(description)
+f(ab)s(out)i Fu(superlu)p Fw('s)f(functionalit)m(y)f(and)i(ho)m(w)h(to)
+g(use)f(it.)95 2199 y Fu(SUPERLU)46 b(:)i(Supernodal)d(LU)i
+(factorization)95 2425 y(Executive)f(summary:)95 2651
+y([L,U,p])g(=)i(superlu\(A\))474 b(is)47 b(like)g([L,U,P])f(=)h
+(lu\(A\),)f(but)h(faster.)95 2764 y([L,U,prow,pcol])d(=)k(superlu\(A\))
+92 b(preorders)46 b(the)g(columns)g(of)h(A)h(by)f(min)g(degree,)1718
+2877 y(yielding)f(A\(prow,pcol\))e(=)k(L*U.)95 3103 y(Details)e(and)h
+(options:)95 3329 y(With)g(one)g(input)f(and)h(two)g(or)g(three)g
+(outputs,)e(SUPERLU)h(has)h(the)g(same)g(effect)f(as)h(LU,)95
+3441 y(except)g(that)f(the)h(pivoting)f(permutation)e(is)k(returned)d
+(as)i(a)h(vector,)e(not)g(a)i(matrix:)95 3667 y([L,U,p])e(=)i
+(superlu\(A\))d(returns)h(unit)g(lower)h(triangular)e(L,)i(upper)f
+(triangular)f(U,)573 3780 y(and)i(permutation)d(vector)i(p)i(with)f
+(A\(p,:\))f(=)h(L*U.)95 3893 y([L,U])g(=)g(superlu\(A\))e(returns)h
+(permuted)g(triangular)f(L)i(and)g(upper)f(triangular)f(U)573
+4006 y(with)h(A)i(=)f(L*U.)95 4232 y(With)g(a)h(second)e(input,)g(the)h
+(columns)e(of)j(A)f(are)g(permuted)f(before)g(factoring:)95
+4458 y([L,U,prow])f(=)j(superlu\(A,psparse\))43 b(returns)j(triangular)
+f(L)i(and)g(U)g(and)g(permutation)573 4571 y(prow)f(with)h
+(A\(prow,psparse\))d(=)j(L*U.)95 4683 y([L,U])g(=)g
+(superlu\(A,psparse\))c(returns)j(permuted)f(triangular)g(L)j(and)f
+(triangular)e(U)573 4796 y(with)h(A\(:,psparse\))f(=)i(L*U.)95
+4909 y(Here)g(psparse)f(will)h(normally)e(be)i(a)h(user-supplied)c
+(permutation)h(matrix)h(or)h(vector)95 5022 y(to)h(be)f(applied)f(to)h
+(the)g(columns)f(of)h(A)g(for)g(sparsity.)93 b(COLMMD)46
+b(is)h(one)g(way)g(to)g(get)95 5135 y(such)g(a)h(permutation;)c(see)j
+(below)f(to)h(make)g(SUPERLU)f(compute)g(it)h(automatically.)95
+5248 y(\(If)g(psparse)f(is)h(a)h(permutation)d(matrix,)g(the)i(matrix)f
+(factored)g(is)h(A*psparse'.\))95 5474 y(With)g(a)h(fourth)e(output,)f
+(a)j(column)e(permutation)f(is)i(computed)e(and)i(applied:)1905
+5778 y Fw(27)p eop
+%%Page: 28 29
+28 28 bop 95 393 a Fu([L,U,prow,pcol])44 b(=)k(superlu\(A,psparse\))90
+b(returns)46 b(triangular)f(L)i(and)g(U)h(and)573 506
+y(permutations)c(prow)j(and)g(pcol)f(with)h(A\(prow,pcol\))d(=)k(L*U.)
+573 619 y(Here)e(psparse)g(is)h(a)h(user-supplied)c(column)i
+(permutation)f(for)i(sparsity,)573 732 y(and)g(the)g(matrix)f(factored)
+f(is)i(A\(:,psparse\))e(\(or)i(A*psparse')e(if)i(the)573
+845 y(input)f(is)h(a)h(permutation)c(matrix\).)94 b(Output)46
+b(pcol)g(is)i(a)f(permutation)573 958 y(that)f(first)h(performs)e
+(psparse,)h(then)g(postorders)f(the)i(etree)g(of)g(the)573
+1071 y(column)f(intersection)e(graph)j(of)g(A.)95 b(The)47
+b(postorder)e(does)i(not)f(affect)573 1184 y(sparsity,)f(but)i(makes)f
+(supernodes)f(in)i(L)h(consecutive.)95 1297 y([L,U,prow,pcol])c(=)k
+(superlu\(A,0\))c(is)j(the)g(same)g(as)g(...)g(=)g(superlu\(A,I\);)d
+(it)k(does)573 1409 y(not)f(permute)e(for)i(sparsity)f(but)h(it)g(does)
+g(postorder)e(the)i(etree.)95 1522 y([L,U,prow,pcol])d(=)k
+(superlu\(A\))d(is)i(the)g(same)f(as)h(...)g(=)h
+(superlu\(A,colmmd\(A\)\);)573 1635 y(it)f(uses)g(column)f(minimum)f
+(degree)i(to)g(permute)f(columns)f(for)i(sparsity,)573
+1748 y(then)f(postorders)f(the)i(etree)g(and)g(factors.)0
+1936 y Fw(F)-8 b(or)31 b(a)g(description)d(ab)s(out)i
+Fu(lusolve)p Fw('s)f(functionalit)m(y)g(and)g(ho)m(w)i(to)g(use)f(it,)g
+(y)m(ou)h(can)g(t)m(yp)s(e)381 2049 y Fu(help)47 b(lusolve)95
+2261 y(LUSOLVE)f(:)i(Solve)e(linear)g(systems)g(by)h(supernodal)e(LU)i
+(factorization.)95 2487 y(x)h(=)f(lusolve\(A,)e(b\))j(returns)d(the)i
+(solution)f(to)h(the)g(linear)f(system)g(A*x)h(=)g(b,)286
+2600 y(using)g(a)g(supernodal)e(LU)i(factorization)e(that)h(is)h
+(faster)f(than)h(Matlab's)286 2713 y(builtin)f(LU.)95
+b(This)46 b(m-file)h(just)f(calls)h(a)g(mex)g(routine)f(to)h(do)g(the)g
+(work.)95 2939 y(By)h(default,)d(A)j(is)f(preordered)e(by)i(column)f
+(minimum)g(degree)g(before)g(factorization.)95 3052 y(Optionally,)f
+(the)i(user)g(can)g(supply)f(a)h(desired)f(column)g(ordering:)95
+3277 y(x)i(=)f(lusolve\(A,)e(b,)j(pcol\))e(uses)h(pcol)f(as)h(a)h
+(column)e(permutation.)286 3390 y(It)i(still)e(returns)g(x)h(=)h(A\\b,)
+e(but)h(it)g(factors)f(A\(:,pcol\))f(\(if)i(pcol)g(is)g(a)286
+3503 y(permutation)e(vector\))h(or)h(A*Pcol)f(\(if)h(Pcol)g(is)g(a)g
+(permutation)e(matrix\).)95 3729 y(x)j(=)f(lusolve\(A,)e(b,)j(0\))f
+(suppresses)e(the)i(default)e(minimum)h(degree)g(ordering;)286
+3842 y(that)h(is,)g(it)g(forces)f(the)h(identity)f(permutation)e(on)k
+(columns.)141 4055 y Fw(Tw)m(o)35 b(M-\014les)g Fu(trysuperlu.m)d
+Fw(and)i Fu(trylusolve.m)e Fw(are)k(written)e(to)i(test)f(the)h
+(correctness)g(of)f Fu(superlu)0 4167 y Fw(and)i Fu(lusolve)p
+Fw(.)62 b(In)38 b(addition)e(to)j(testing)f(the)g(residual)e(norms,)k
+(they)e(also)g(test)h(the)f(function)f(in)m(v)m(o)s(cations)0
+4280 y(with)29 b(v)-5 b(arious)29 b(n)m(um)m(b)s(er)g(of)i
+(input/output)e(argumen)m(ts.)0 4567 y Fr(2.10)136 b(Installation)0
+4773 y Fm(2.10.1)113 b(File)36 b(structure)0 4945 y Fw(The)30
+b(top)g(lev)m(el)h(Sup)s(erLU/)d(directory)i(is)g(structured)f(as)i
+(follo)m(ws:)191 5132 y Fu(SuperLU/README)187 b(instructions)44
+b(on)k(installation)191 5245 y(SuperLU/CBLAS/)187 b(needed)46
+b(BLAS)h(routines)e(in)i(C,)h(not)f(necessarily)d(fast)191
+5358 y(SuperLU/EXAMPLE/)91 b(example)46 b(programs)191
+5471 y(SuperLU/INSTALL/)91 b(test)47 b(machine)e(dependent)h
+(parameters;)e(this)j(Users')f(Guide)1905 5778 y Fw(28)p
+eop
+%%Page: 29 30
+29 29 bop 191 280 a Fu(SuperLU/MAKE_INC/)43 b(sample)j
+(machine-specific)d(make.inc)j(files)191 393 y(SuperLU/MATLAB/)139
+b(Matlab)46 b(mex-file)g(interface)191 506 y(SuperLU/SRC/)283
+b(C)47 b(source)g(code,)f(to)h(be)g(compiled)f(into)g(the)h(superlu.a)f
+(library)191 619 y(SuperLU/TESTING/)91 b(driver)46 b(routines)g(to)h
+(test)f(correctness)191 732 y(SuperLU/Makefile)91 b(top)47
+b(level)f(Makefile)g(that)g(does)h(installation)e(and)h(testing)191
+845 y(SuperLU/make.inc)91 b(compiler,)45 b(compile)h(flags,)g(library)g
+(definitions)f(and)i(C)1050 958 y(preprocessor)d(definitions,)h
+(included)g(in)j(all)f(Makefiles)141 1145 y Fw(Before)34
+b(installing)29 b(the)k(pac)m(k)-5 b(age,)35 b(y)m(ou)e(ma)m(y)g(need)f
+(to)h(edit)f Fu(SuperLU/make.inc)c Fw(for)k(y)m(our)h(system.)47
+b(This)0 1258 y(mak)m(e)39 b(include)d(\014le)h(is)f(referenced)i
+(inside)e(eac)m(h)j(of)f(the)g Fu(Makefiles)d Fw(in)i(the)h(v)-5
+b(arious)37 b(sub)s(directories.)61 b(As)38 b(a)0 1371
+y(result,)25 b(there)g(is)f(no)h(need)f(to)i(edit)e(the)h
+Fu(Makefiles)d Fw(in)i(the)h(sub)s(directories.)36 b(All)24
+b(information)f(that)i(is)f(mac)m(hine)0 1484 y(sp)s(eci\014c)29
+b(has)h(b)s(een)g(de\014ned)f(in)g Fu(make.inc)p Fw(.)141
+1597 y(Sample)h(mac)m(hine-sp)s(eci\014c)g Fu(make.inc)f
+Fw(are)i(pro)m(vided)f(in)f(the)j Fu(MAKE)p 2535 1597
+29 4 v 33 w(INC/)e Fw(sub)s(directory)f(for)i(sev)m(eral)g(sys-)0
+1710 y(tems,)g(including)d(IBM)j(RS/6000,)i(DEC)d(Alpha,)g(SunOS)f
+(4.x,)i(SunOS)e(5.x)i(\(Solaris\),)f(HP-P)-8 b(A)32 b(and)e(SGI)g(Iris)
+0 1823 y(4.x.)40 b(When)27 b(y)m(ou)h(ha)m(v)m(e)h(selected)e(the)h
+(mac)m(hine)f(on)g(whic)m(h)f(y)m(ou)i(wish)d(to)j(install)e(Sup)s
+(erLU,)f(y)m(ou)j(ma)m(y)g(cop)m(y)g(the)0 1936 y(appropriate)j(sample)
+g(include)f(\014le)h(\(if)h(one)g(is)f(presen)m(t\))i(in)m(to)f
+Fu(make.inc)p Fw(.)43 b(F)-8 b(or)33 b(example,)g(if)e(y)m(ou)h(wish)f
+(to)h(run)0 2049 y(Sup)s(erLU)c(on)j(an)f(IBM)h(RS/6000,)h(y)m(ou)f
+(can)f(do:)381 2162 y Fu(cp)47 b(MAKE)p 722 2162 V 34
+w(INC/make.rs6k)d(make.inc)141 2275 y Fw(F)-8 b(or)36
+b(systems)e(other)h(than)g(those)g(listed)e(ab)s(o)m(v)m(e,)k(sligh)m
+(t)d(mo)s(di\014cations)f(to)i(the)g Fu(make.inc)d Fw(\014le)i(will)e
+(need)0 2387 y(to)f(b)s(e)f(made.)41 b(In)29 b(particular,)g(the)i
+(follo)m(wing)e(three)h(items)g(should)f(b)s(e)g(examined:)111
+2575 y(1.)46 b(The)30 b(BLAS)g(library)-8 b(.)227 2688
+y(If)20 b(there)h(is)e(a)i(BLAS)f(library)e(a)m(v)-5
+b(ailable)20 b(on)g(y)m(our)h(mac)m(hine,)h(y)m(ou)f(ma)m(y)g(de\014ne)
+e(the)i(follo)m(wing)e(in)g Fu(make.inc)p Fw(:)467 2838
+y Fu(BLASDEF)46 b(=)i(-DUSE)p 1191 2838 V 33 w(VENDOR)p
+1512 2838 V 32 w(BLAS)467 2939 y(BLASLIB)e(=)i(<BLAS)e(library)g(you)h
+(wish)f(to)h(link)g(with>)227 3089 y Fw(The)32 b Fu(CBLAS/)e
+Fw(sub)s(directory)g(con)m(tains)i(the)g(part)g(of)g(the)h(C)e(BLAS)h
+(needed)g(b)m(y)f(the)i Fu(SuperLU)d Fw(pac)m(k)-5 b(age.)227
+3202 y(Ho)m(w)m(ev)m(er,)43 b(these)c(co)s(des)f(are)h(in)m(tended)e
+(for)h(use)g(only)f(if)h(there)g(is)f(no)i(faster)f(implemen)m(tation)f
+(of)i(the)227 3315 y(BLAS)30 b(already)g(a)m(v)-5 b(ailable)30
+b(on)g(y)m(our)h(mac)m(hine.)40 b(In)30 b(this)f(case,)j(y)m(ou)e
+(should)f(do)h(the)h(follo)m(wing:)301 3502 y(1\))46
+b(In)30 b Fu(make.inc)p Fw(,)e(unde\014ne)h(\(commen)m(t)j(out\))f
+(BLASDEF,)g(de\014ne:)667 3632 y Fu(BLASLIB)46 b(=)i
+(../blas$\(PLAT\).a)301 3778 y Fw(2\))e(In)30 b(the)g
+Fu(SuperLU)p Fw(/)f(directory)-8 b(,)31 b(t)m(yp)s(e:)667
+3908 y Fu(make)47 b(blaslib)427 4037 y Fw(to)31 b(mak)m(e)h(the)e(BLAS)
+h(library)c(from)j(the)h(routines)e(in)g(the)i Fu(CBLAS/)d
+Fw(sub)s(directory)-8 b(.)111 4225 y(2.)46 b(C)30 b(prepro)s(cessor)g
+(de\014nition)e Fu(CDEFS)p Fw(.)227 4338 y(In)22 b(the)i(header)e
+(\014le)g Fu(SRC/Cnames.h)p Fw(,)g(w)m(e)h(use)g(macros)g(to)h
+(determine)e(ho)m(w)h(C)f(routines)g(should)f(b)s(e)h(named)227
+4451 y(so)31 b(that)g(they)f(are)h(callable)e(b)m(y)i(F)-8
+b(ortran.)1671 4418 y FC(2)1752 4451 y Fw(The)29 b(p)s(ossible)f
+(options)i(for)g Fu(CDEFS)f Fw(are:)336 4638 y Fq(\017)46
+b Fu(-DAdd)p 673 4638 V 33 w Fw(:)41 b(F)-8 b(ortran)31
+b(exp)s(ects)g(a)f(C)g(routine)g(to)h(ha)m(v)m(e)h(an)e(underscore)f(p)
+s(ost\014xed)h(to)h(the)f(name;)336 4784 y Fq(\017)46
+b Fu(-DNoChange)p Fw(:)38 b(F)-8 b(ortran)31 b(exp)s(ects)g(a)g(C)f
+(routine)f(name)i(to)g(b)s(e)e(iden)m(tical)h(to)h(that)g(compiled)d(b)
+m(y)j(C;)336 4930 y Fq(\017)46 b Fu(-DUpCase)p Fw(:)39
+b(F)-8 b(ortran)31 b(exp)s(ects)g(a)f(C)g(routine)g(name)g(to)h(b)s(e)f
+(all)f(upp)s(ercase.)111 5118 y(3.)46 b(The)30 b(Matlab)h(MEX-\014le)f
+(in)m(terface.)227 5231 y(The)25 b Fu(MATLAB/)e Fw(sub)s(directory)g
+(includes)g(Matlab)j(C)f(MEX-\014les,)h(so)f(that)h(our)f(factor)h(and)
+e(solv)m(e)i(routines)p 0 5310 1560 4 v 104 5364 a Fi(2)138
+5396 y Fg(Some)33 b(v)n(endor-supplied)g(BLAS)g(libraries)i(do)f(not)g
+(ha)n(v)n(e)f(C)h(in)n(terfaces.)61 b(So)34 b(the)f(re-naming)g(is)i
+(needed)e(in)h(order)g(for)g(the)0 5487 y Fh(SuperLU)27
+b Fg(BLAS)e(calls)j(\(in)d(C\))h(to)g(in)n(terface)g(with)g(the)g(F)-6
+b(ortran-st)n(yle)25 b(BLAS.)1905 5778 y Fw(29)p eop
+%%Page: 30 31
+30 30 bop 227 280 a Fw(can)27 b(b)s(e)f(called)g(as)h(alternativ)m(es)h
+(to)f(those)g(built)e(in)m(to)i(Matlab.)39 b(In)27 b(the)f(\014le)g
+Fu(SuperLU/make.inc)p Fw(,)e(de\014ne)227 393 y(MA)-8
+b(TLAB)32 b(to)f(b)s(e)e(the)i(directory)f(in)f(whic)m(h)g(Matlab)i(is)
+e(installed)f(on)i(y)m(our)h(system,)g(for)f(example:)467
+543 y Fu(MATLAB)46 b(=)i(/usr/local/matlab)227 693 y
+Fw(A)m(t)32 b(the)e(Sup)s(erLU/)f(directory)-8 b(,)31
+b(t)m(yp)s(e:)498 843 y Fu(make)46 b(matlabmex)227 993
+y Fw(to)25 b(build)20 b(the)k(MEX-\014le)g(in)m(terface.)39
+b(After)24 b(y)m(ou)g(ha)m(v)m(e)h(built)d(the)i(in)m(terface,)h(y)m
+(ou)g(ma)m(y)f(go)g(to)h(the)f Fu(MATLAB/)227 1106 y
+Fw(sub)s(directory)29 b(to)i(test)g(the)f(correctness)i(b)m(y)e(t)m
+(yping)g(\(in)f(Matlab\):)467 1256 y Fu(trysuperlu)467
+1406 y(trylusolve)141 1593 y Fw(A)36 b Fu(Makefile)e
+Fw(is)h(pro)m(vided)g(in)f(eac)m(h)j(sub)s(directory)-8
+b(.)56 b(The)36 b(installation)e(can)i(b)s(e)f(done)h(completely)g
+(auto-)0 1706 y(matically)29 b(b)m(y)i(simply)d(t)m(yping)h
+Fu(make)h Fw(at)h(the)f(top)h(lev)m(el.)0 1949 y Fm(2.10.2)113
+b(T)-9 b(esting)0 2121 y Fw(The)30 b(test)h(programs)f(in)f
+Fu(SuperLU/INSTALL)d Fw(sub)s(directory)j(test)i(t)m(w)m(o)h(routines:)
+136 2307 y Fq(\017)46 b Fu(slamch\(\)/dlamch\(\))23 b
+Fw(determines)j(prop)s(erties)g(of)h(the)h(\015oating-p)s(oin)m(t)f
+(arithmetic)f(at)i(run-time)e(\(b)s(oth)227 2420 y(single)45
+b(and)h(double)f(precision\),)k(suc)m(h)c(as)i(the)f(mac)m(hine)g
+(epsilon,)j(under\015o)m(w)c(threshold,)k(o)m(v)m(er\015o)m(w)227
+2533 y(threshold,)29 b(and)h(related)g(parameters;)136
+2720 y Fq(\017)46 b Fu(SuperLU)p 569 2720 29 4 v 33 w(timer)p
+842 2720 V 33 w(\(\))30 b Fw(returns)g(the)h(time)f(in)g(seconds)h
+(used)f(b)m(y)g(the)h(pro)s(cess.)42 b(This)29 b(function)h(ma)m(y)h
+(need)227 2833 y(to)g(b)s(e)f(mo)s(di\014ed)e(to)j(run)e(on)i(y)m(our)f
+(mac)m(hine.)141 3020 y(The)23 b(test)h(programs)f(in)f(the)i
+Fu(SuperLU/TESTING)19 b Fw(sub)s(directory)j(are)h(designed)g(to)h
+(test)g(all)e(the)i(functions)e(of)0 3133 y(the)28 b(driv)m(er)f
+(routines,)h(esp)s(ecially)f(the)h(exp)s(ert)g(driv)m(ers.)39
+b(The)27 b(Unix)h(shell)e(script)h(\014les)g Fu(xtest.csh)f
+Fw(are)j(used)e(to)0 3245 y(in)m(v)m(ok)m(e)33 b(tests)g(with)e(v)-5
+b(arying)31 b(parameter)i(settings.)46 b(The)31 b(input)f(matrices)i
+(include)e(an)i(actual)h(sparse)f(matrix)0 3358 y Fu
+(SuperLU/EXAMPLE/g10)i Fw(of)40 b(dimension)d(100)28
+b Fq(\002)e Fw(100,)1918 3325 y FC(3)2000 3358 y Fw(and)39
+b(n)m(umerous)g(matrices)g(with)f(sp)s(ecial)h(prop)s(erties)0
+3471 y(from)30 b(the)g(LAP)-8 b(A)m(CK)31 b(test)g(suite.)40
+b(T)-8 b(able)30 b(2.1)i(describ)s(es)c(the)j(prop)s(erties)e(of)h(the)
+h(test)g(matrices.)141 3584 y(F)-8 b(or)40 b(eac)m(h)g(command)f(line)f
+(option)g(sp)s(eci\014ed)g(in)g Fu(dtest.csh)p Fw(,)h(the)g(test)h
+(program)f Fu(ddrive)e Fw(reads)i(in)f(or)0 3697 y(generates)f(an)e
+(appropriate)g(matrix,)h(calls)f(the)g(driv)m(er)g(routines,)g(and)g
+(computes)h(a)g(n)m(um)m(b)s(er)e(of)i(test)g(ratios)0
+3810 y(to)k(v)m(erify)e(that)h(eac)m(h)h(op)s(eration)f(has)f(p)s
+(erformed)g(correctly)-8 b(.)67 b(If)38 b(the)h(test)h(ratio)f(is)f
+(smaller)f(than)i(a)g(preset)0 3923 y(threshold,)29 b(the)i(op)s
+(eration)f(is)f(considered)g(to)j(b)s(e)d(correct.)42
+b(Eac)m(h)32 b(test)f(matrix)f(is)f(sub)5 b(ject)30 b(to)i(the)e(tests)
+h(listed)0 4036 y(in)e(T)-8 b(able)30 b(2.2.)141 4149
+y(Let)k Fv(r)j Fw(b)s(e)c(the)h(residual)e Fv(r)h Fw(=)e
+Fv(b)22 b Fq(\000)h Fv(Ax)p Fw(,)35 b(and)e(let)h Fv(m)1921
+4163 y Fo(i)1982 4149 y Fw(b)s(e)g(the)g(n)m(um)m(b)s(er)e(of)i
+(nonzeros)g(in)f(ro)m(w)h Fv(i)g Fw(of)g Fv(A)p Fw(.)51
+b(Then)0 4262 y(the)31 b(comp)s(onen)m(t)m(wise)f(bac)m(kw)m(ard)h
+(error)f Fv(B)5 b(E)g(R)q(R)30 b Fw(and)g(forw)m(ard)g(error)g
+Fv(F)13 b(E)5 b(R)q(R)31 b Fw([1)q(])f(are)h(calculated)f(b)m(y:)1341
+4512 y Fv(B)5 b(E)g(R)q(R)26 b Fw(=)f(max)1820 4570 y
+Fo(i)2157 4451 y Fq(j)p Fv(r)s Fq(j)2251 4465 y Fo(i)p
+1942 4491 551 4 v 1942 4575 a Fw(\()p Fq(j)p Fv(A)p Fq(j)32
+b(j)p Fv(x)p Fq(j)20 b Fw(+)g Fq(j)p Fv(b)p Fq(j)p Fw(\))2464
+4589 y Fo(i)2533 4512 y Fv(:)1443 4833 y(F)13 b(E)5 b(R)q(R)26
+b Fw(=)1857 4771 y Fq(jj)31 b(j)p Fv(A)2031 4738 y Fn(\000)p
+FC(1)2126 4771 y Fq(j)f Fv(f)40 b Fq(jj)2316 4785 y Fn(1)p
+1857 4812 534 4 v 2010 4895 a Fq(jj)p Fv(x)p Fq(jj)2162
+4909 y Fn(1)2432 4833 y Fv(:)0 5048 y Fw(Here,)30 b Fv(f)38
+b Fw(is)28 b(a)h(nonnegativ)m(e)g(v)m(ector)h(whose)f(comp)s(onen)m(ts)
+g(are)g(computed)g(as)g Fv(f)2749 5062 y Fo(i)2801 5048
+y Fw(=)c Fq(j)p Fv(r)s Fq(j)2991 5062 y Fo(i)3037 5048
+y Fw(+)16 b Fv(m)3204 5062 y Fo(i)3261 5048 y Fv(")29
+b Fw(\()p Fq(j)p Fv(A)p Fq(j)h(j)p Fv(x)p Fq(j)17 b Fw(+)g
+Fq(j)p Fv(b)p Fq(j)p Fw(\))3846 5062 y Fo(i)3875 5048
+y Fw(,)0 5161 y(and)38 b(the)h(norm)f(in)g(the)h(n)m(umerator)g(is)f
+(estimated)h(using)e(the)j(same)f(subroutine)e(used)h(for)g(estimating)
+h(the)0 5274 y(condition)27 b(n)m(um)m(b)s(er.)38 b Fv(B)5
+b(E)g(R)q(R)29 b Fw(measures)f(the)g(smallest)f(relativ)m(e)h(p)s
+(erturbation)f(one)h(can)g(mak)m(e)i(to)e(eac)m(h)i(en)m(try)p
+0 5352 1560 4 v 104 5406 a Fi(3)138 5438 y Fg(Matrix)h
+Fh(g10)h Fg(is)f(\014rst)f(generated)h(with)g(the)f(structure)h(of)g
+(the)f(10-b)n(y-10)h(\014v)n(e-p)r(oin)n(t)e(grid,)j(and)f(random)e(n)n
+(umerical)i(v)l(alues.)0 5529 y(The)26 b(columns)f(are)h(then)f(p)r
+(erm)n(uted)f(b)n(y)h(COLMMD)h(ordering)g(from)g(Matlab.)1905
+5778 y Fw(30)p eop
+%%Page: 31 32
+31 31 bop 190 254 1541 4 v 188 367 4 113 v 239 333 a
+Fw(Matrix)31 b(t)m(yp)s(e)p 765 367 V 100 w(Description)p
+1729 367 V 190 370 1541 4 v 188 483 4 113 v 239 449 a(0)p
+765 483 V 533 w(sparse)f(matrix)f Fu(g10)p 1729 483 V
+188 596 V 239 562 a Fw(1)p 765 596 V 533 w(diagonal)p
+1729 596 V 188 709 V 239 675 a(2)p 765 709 V 533 w(upp)s(er)f
+(triangular)p 1729 709 V 188 822 V 239 788 a(3)p 765
+822 V 533 w(lo)m(w)m(er)i(triangular)p 1729 822 V 188
+935 V 239 901 a(4)p 765 935 V 533 w(random,)f Fv(\024)d
+Fw(=)f(2)p 1729 935 V 188 1048 V 239 1014 a(5)p 765 1048
+V 533 w(\014rst)k(column)g(zero)p 1729 1048 V 188 1161
+V 239 1127 a(6)p 765 1161 V 533 w(last)h(column)f(zero)p
+1729 1161 V 188 1274 V 239 1240 a(7)p 765 1274 V 533
+w(last)h Fv(n=)p Fw(2)h(columns)e(zero)p 1729 1274 V
+188 1387 4 114 v 239 1353 a(8)p 765 1387 V 533 w(random,)g
+Fv(\024)d Fw(=)1349 1280 y Fk(p)p 1432 1280 205 4 v 73
+x Fw(0)p Fv(:)p Fw(1)p Fv(=")p 1729 1387 4 114 v 188
+1500 4 113 v 239 1466 a Fw(9)p 765 1500 V 533 w(random,)j
+Fv(\024)d Fw(=)f(0)p Fv(:)p Fw(1)p Fv(=")p 1729 1500
+V 188 1613 V 239 1579 a Fw(10)p 765 1613 V 488 w(scaled)30
+b(near)g(under\015o)m(w)p 1729 1613 V 188 1726 V 239
+1692 a(11)p 765 1726 V 488 w(scaled)g(near)g(o)m(v)m(er\015o)m(w)p
+1729 1726 V 190 1729 1541 4 v 0 1983 a(T)-8 b(able)37
+b(2.1:)56 b(Prop)s(erties)36 b(of)i(the)g(test)g(matrices.)62
+b Fv(")38 b Fw(is)0 2096 y(the)30 b(mac)m(hine)f(epsilon)e(and)i
+Fv(\024)h Fw(is)f(the)g(condition)f(n)m(um-)0 2209 y(b)s(er)h(of)i
+(matrix)f Fv(A)p Fw(.)41 b(Matrix)31 b(t)m(yp)s(es)f(with)f(one)i(or)g
+(more)0 2322 y(columns)43 b(set)h(to)h(zero)g(are)g(used)e(to)i(test)g
+(the)f(error)0 2435 y(return)29 b(co)s(des.)p 1950 201
+2257 4 v 1948 314 4 113 v 2000 280 a(T)-8 b(est)31 b(T)m(yp)s(e)p
+2453 314 V 99 w(T)-8 b(est)31 b(ratio)p 3525 314 V 685
+w(Routines)p 4205 314 V 1950 317 2257 4 v 1948 430 4
+113 v 2000 396 a(0)p 2453 430 V 459 w Fq(jj)p Fv(LU)g
+Fq(\000)20 b Fv(A)p Fq(jj)p Fv(=)p Fw(\()p Fv(n)p Fq(jj)p
+Fv(A)p Fq(jj)p Fv(")p Fw(\))p 3525 430 V 278 w Fu(dgstrf)p
+4205 430 V 1948 543 V 2000 509 a Fw(1)p 2453 543 V 459
+w Fq(jj)p Fv(b)h Fq(\000)f Fv(Ax)p Fq(jj)p Fv(=)p Fw(\()p
+Fq(jj)p Fv(A)p Fq(jj)28 b(jj)p Fv(x)p Fq(jj)p Fv(")p
+Fw(\))p 3525 543 V 196 w Fu(dgssv)p Fw(,)h Fu(dgssvx)p
+4205 543 V 1948 656 V 2000 622 a Fw(2)p 2453 656 V 459
+w Fq(jj)p Fv(x)21 b Fq(\000)f Fv(x)2770 589 y Fn(\003)2809
+622 y Fq(jj)p Fv(=)p Fw(\()p Fq(jj)p Fv(x)3041 589 y
+Fn(\003)3082 622 y Fq(jj)p Fv(\024")p Fw(\))p 3525 656
+V 315 w Fu(dgssvx)p 4205 656 V 1948 769 V 2000 735 a
+Fw(3)p 2453 769 V 459 w Fq(jj)p Fv(x)h Fq(\000)f Fv(x)2770
+702 y Fn(\003)2809 735 y Fq(jj)p Fv(=)p Fw(\()p Fq(jj)p
+Fv(x)3041 702 y Fn(\003)3082 735 y Fq(jj)26 b Fv(F)13
+b(E)5 b(R)q(R)q Fw(\))p 3525 769 V 100 w Fu(dgssvx)p
+4205 769 V 1948 881 V 2000 848 a Fw(4)p 2453 881 V 459
+w Fv(B)g(E)g(R)q(R)q(=")p 3525 881 V 699 w Fu(dgssvx)p
+4205 881 V 1950 885 2257 4 v 1950 1140 a Fw(T)-8 b(able)26
+b(2.2:)39 b(T)m(yp)s(es)26 b(of)g(tests.)40 b Fv(x)3040
+1107 y Fn(\003)3105 1140 y Fw(is)25 b(the)h(true)f(solution,)1950
+1253 y Fv(F)13 b(E)5 b(R)q(R)46 b Fw(is)e(the)h(error)g(b)s(ound,)i
+(and)d Fv(B)5 b(E)g(R)q(R)45 b Fw(is)f(the)1950 1365
+y(bac)m(kw)m(ard)31 b(error.)0 2692 y(of)d(A)f(and)g(of)h(b)f(so)h
+(that)g(the)f(computed)h(solution)e(is)g(an)i(exact)h(solution)d(of)h
+(the)h(p)s(erturb)s(ed)d(problem.)38 b Fv(F)13 b(E)5
+b(R)q(R)0 2805 y Fw(is)35 b(an)g(estimated)h(b)s(ound)e(on)i(the)g
+(error)f Fq(k)p Fv(x)1553 2772 y Fn(\003)1617 2805 y
+Fq(\000)23 b Fv(x)p Fq(k)1808 2819 y Fn(1)1883 2805 y
+Fv(=)p Fq(k)p Fv(x)p Fq(k)2070 2819 y Fn(1)2146 2805
+y Fw(,)38 b(where)d Fv(x)2529 2772 y Fn(\003)2604 2805
+y Fw(is)g(the)h(true)f(solution.)56 b(F)-8 b(or)36 b(further)0
+2918 y(details)29 b(on)i(error)f(analysis)f(and)g(error)h(b)s(ounds)e
+(estimation,)j(see)g([1,)g(Chapter)f(4])h(and)60 b([2].)0
+3161 y Fm(2.10.3)113 b(P)m(erformance-tuning)36 b(parameters)0
+3333 y Fu(SuperLU)31 b Fw(c)m(ho)s(oses)k(suc)m(h)e(mac)m(hine-dep)s
+(enden)m(t)f(parameters)i(as)g(blo)s(c)m(k)f(size)g(b)m(y)g(calling)f
+(an)i(inquiry)c(function)0 3446 y Fu(sp)p 102 3446 29
+4 v 34 w(ienv\(\))p Fw(,)i(whic)m(h)g(ma)m(y)i(b)s(e)e(set)i(to)g
+(return)e(di\013eren)m(t)g(v)-5 b(alues)33 b(on)g(di\013eren)m(t)f(mac)
+m(hines.)49 b(The)32 b(declaration)h(of)0 3559 y(this)c(function)g(is)
+141 3732 y Fu(int)47 b(sp)p 434 3732 V 34 w(ienv\(int)e(ispec\);)141
+3905 y(Ispec)29 b Fw(sp)s(eci\014es)g(the)i(parameter)g(to)g(b)s(e)e
+(returned,)h(\(See)h(reference)g([5])g(for)f(their)f(de\014nitions.\))
+318 4092 y(isp)s(ec)d(=)k(1:)42 b(the)30 b(panel)g(size)g(\()p
+Fv(w)r Fw(\))540 4205 y(=)g(2:)42 b(the)30 b(relaxation)g(parameter)h
+(to)g(con)m(trol)g(sup)s(erno)s(de)d(amalgamation)j(\()p
+Fv(r)s(el)r(ax)p Fw(\))540 4318 y(=)f(3:)42 b(the)30
+b(maxim)m(um)f(allo)m(w)m(able)h(size)g(for)h(a)f(sup)s(erno)s(de)e(\()
+p Fv(maxsup)p Fw(\))540 4431 y(=)i(4:)42 b(the)30 b(minim)m(um)e(ro)m
+(w)i(dimension)e(for)i(2D)h(blo)s(c)m(king)e(to)j(b)s(e)d(used)h(\()p
+Fv(r)s(ow)r(bl)r(k)s Fw(\))540 4544 y(=)g(5:)42 b(the)30
+b(minim)m(um)e(column)h(dimension)f(for)i(2D)h(blo)s(c)m(king)e(to)i(b)
+s(e)f(used)g(\()p Fv(col)r(bl)r(k)s Fw(\))540 4657 y(=)g(6:)42
+b(the)30 b(estimated)h(\014lls)d(factor)j(for)f(L)h(and)e(U,)i
+(compared)f(with)f(A)141 4844 y(Users)e(are)g(encouraged)g(to)g(mo)s
+(dify)e(this)g(subroutine)g(to)i(set)g(the)g(tuning)e(parameters)i(for)
+f(their)g(o)m(wn)h(lo)s(cal)0 4957 y(en)m(vironmen)m(t.)53
+b(The)33 b(optimal)h(v)-5 b(alues)34 b(dep)s(end)e(mainly)h(on)h(the)h
+(cac)m(he)h(size)e(and)g(the)h(BLAS)f(sp)s(eed.)52 b(If)34
+b(y)m(our)0 5070 y(system)d(has)g(a)g(v)m(ery)h(small)d(cac)m(he,)34
+b(or)d(if)f(y)m(ou)h(w)m(an)m(t)h(to)g(e\016cien)m(tly)f(utilize)e(the)
+i(closest)h(cac)m(he)g(in)e(a)i(m)m(ultilev)m(el)0 5183
+y(cac)m(he)h(organization,)f(y)m(ou)g(should)d(pa)m(y)j(sp)s(ecial)e
+(atten)m(tion)i(to)g(these)g(parameter)g(settings.)43
+b(In)31 b(our)g(tec)m(hnical)0 5296 y(pap)s(er)e([5)q(],)i(w)m(e)g
+(describ)s(ed)d(a)i(detailed)g(metho)s(dology)g(for)g(setting)h(these)g
+(parameters)f(for)g(high)f(p)s(erformance.)141 5409 y(The)35
+b Fv(r)s(el)r(ax)g Fw(parameter)h(is)f(usually)e(set)j(b)s(et)m(w)m
+(een)g(4)g(and)f(8.)56 b(The)35 b(other)h(parameter)f(v)-5
+b(alues)35 b(whic)m(h)f(giv)m(e)0 5522 y(go)s(o)s(d)c(p)s(erformance)g
+(on)g(sev)m(eral)h(mac)m(hines)f(are)h(listed)e(in)g(T)-8
+b(able)30 b(2.3.)42 b(In)29 b(a)i(sup)s(erno)s(de-panel)d(up)s(date,)h
+(if)h(the)1905 5778 y(31)p eop
+%%Page: 32 33
+32 32 bop 616 292 2668 4 v 614 392 4 100 v 1181 392 V
+1299 362 a FA(On-c)n(hip)99 b(External)p 3282 392 V 614
+491 V 747 461 a(Mac)n(hine)p 1181 491 V 317 w(Cac)n(he)192
+b(Cac)n(he)120 b Fe(w)102 b(maxsup)d(r)r(ow)r(bl)r(k)104
+b(col)r(bl)r(k)p 3282 491 V 616 495 2668 4 v 614 594
+4 100 v 666 564 a FA(RS/6000-590)p 1181 594 V 175 w(256)26
+b(KB)371 b({)140 b(8)267 b(100)223 b(200)j(40)p 3282
+594 V 614 694 V 666 664 a(MIPS)27 b(R8000)p 1181 694
+V 223 w(16)f(KB)208 b(4)27 b(MB)100 b(20)266 b(100)223
+b(800)185 b(100)p 3282 694 V 614 793 V 666 764 a(Alpha)28
+b(21064)p 1181 793 V 272 w(8)f(KB)136 b(512)27 b(KB)140
+b(8)267 b(100)223 b(400)j(40)p 3282 793 V 614 893 V 666
+863 a(Alpha)28 b(21164)p 1181 893 V 151 w(8)f(KB-L1)207
+b(4)27 b(MB)100 b(16)308 b(50)223 b(100)j(40)p 3282 893
+V 614 993 V 1181 993 V 1233 963 a(96)26 b(KB-L2)p 3282
+993 V 614 1092 V 666 1062 a(Sparc)h(20)p 1181 1092 V
+373 w(16)f(KB)208 b(1)27 b(MB)141 b(8)267 b(100)223 b(400)j(50)p
+3282 1092 V 614 1192 V 666 1162 a(UltraSparc-I)p 1181
+1192 V 234 w(16)26 b(KB)136 b(512)27 b(KB)140 b(8)267
+b(100)223 b(400)j(40)p 3282 1192 V 614 1292 V 666 1262
+a(Cra)n(y)26 b(J90)p 1181 1292 V 550 w({)371 b({)140
+b(1)267 b(100)182 b(1000)i(100)p 3282 1292 V 616 1295
+2668 4 v 624 1489 a Fw(T)-8 b(able)30 b(2.3:)42 b(T)m(ypical)29
+b(blo)s(c)m(king)g(parameter)i(v)-5 b(alues)30 b(for)g(sev)m(eral)h
+(mac)m(hines.)0 1752 y(up)s(dating)i(sup)s(erno)s(de)f(is)i(to)s(o)i
+(large)f(to)h(\014t)e(in)g(cac)m(he,)k(then)c(a)h(2D)h(blo)s(c)m(k)e
+(partitioning)f(of)i(the)g(sup)s(erno)s(de)e(is)0 1865
+y(used,)e(in)f(whic)m(h)g Fv(r)s(ow)r(bl)r(k)35 b Fw(and)30
+b Fv(col)r(bl)r(k)35 b Fw(determine)30 b(that)i(a)g(blo)s(c)m(k)f(of)g
+(size)h Fv(r)s(ow)r(bl)r(k)24 b Fq(\002)c Fv(col)r(bl)r(k)35
+b Fw(is)30 b(used)h(to)h(up)s(date)0 1978 y(curren)m(t)e(panel.)141
+2091 y(If)25 b Fv(col)r(bl)r(k)k Fw(is)24 b(set)i(greater)g(than)f
+Fv(maxsup)p Fw(,)h(then)f(the)g(program)g(will)e(nev)m(er)i(use)g(2D)h
+(blo)s(c)m(king.)38 b(F)-8 b(or)26 b(example,)0 2204
+y(for)g(the)h(Cra)m(y)f(J90)h(\(whic)m(h)e(do)s(es)h(not)h(ha)m(v)m(e)g
+(cac)m(he\),)i Fv(w)f Fw(=)d(1)i(and)e(1D)j(blo)s(c)m(king)d(giv)m(e)h
+(go)s(o)s(d)h(p)s(erformance;)g(more)0 2317 y(lev)m(els)j(of)g(blo)s(c)
+m(king)g(only)f(increase)h(o)m(v)m(erhead.)0 2600 y Fr(2.11)136
+b(Example)46 b(programs)0 2803 y Fw(In)40 b(the)g Fu(SuperLU/EXAMPLE/)c
+Fw(sub)s(directory)-8 b(,)42 b(w)m(e)e(presen)m(t)h(a)f(few)h(sample)e
+(programs)h(to)h(illustrate)e(ho)m(w)h(to)0 2916 y(use)45
+b(v)-5 b(arious)44 b(functions)g(pro)m(vded)g(in)g Fu(SuperLU)p
+Fw(.)g(The)g(users)h(can)g(mo)s(dify)f(these)h(examples)g(to)h(suit)e
+(their)0 3029 y(applications.)39 b(Here)31 b(are)g(the)f(brief)f
+(descriptions)f(of)j(the)f(double)f(precision)g(v)m(ersion)h(of)g(the)h
+(examples:)136 3202 y Fq(\017)46 b Fu(dlinsol)p Fw(:)39
+b(use)30 b(simple)e(driv)m(er)i Fu(dgssv\(\))e Fw(to)j(solv)m(e)g(a)g
+(linear)d(system)j(one)f(time.)136 3384 y Fq(\017)46
+b Fu(dlinsol1)p Fw(:)39 b(use)30 b(simple)e(driv)m(er)h
+Fu(dgssv\(\))g Fw(in)g(the)h(symmetric)g(mo)s(de.)136
+3565 y Fq(\017)46 b Fu(dlinsolx)p Fw(:)39 b(use)30 b
+Fu(dgssvx\(\))e Fw(with)h(the)i(full)d(\(default\))i(set)h(of)f
+(options)g(to)h(solv)m(e)g(a)g(linear)d(system.)136 3747
+y Fq(\017)46 b Fu(dlinsolx1)p Fw(:)38 b(use)31 b Fu(dgssvx\(\))d
+Fw(to)j(factorize)g Fv(A)g Fw(\014rst,)f(then)g(solv)m(e)g(the)h
+(system)f(later.)136 3929 y Fq(\017)46 b Fu(dlinsolx2)p
+Fw(:)64 b(use)43 b Fu(dgssvx\(\))d Fw(to)k(solv)m(e)f(systems)h(rep)s
+(eatedly)e(with)g(the)h(same)g(sparsit)m(y)g(pattern)g(of)227
+4042 y(matrix)30 b(A.)136 4223 y Fq(\017)46 b Fu(superlu)p
+Fw(:)39 b(the)31 b(small)d(5x5)k(sample)d(program)h(in)f(Section)i
+(2.2.)141 4396 y(In)23 b(this)f(directory)-8 b(,)25 b(a)f
+Fu(Makefile)d Fw(is)h(pro)m(vided)g(to)i(generate)h(the)f(executables,)
+h(and)e(a)h Fu(README)d Fw(\014le)i(describ)s(es)0 4509
+y(ho)m(w)30 b(to)i(run)c(these)j(examples.)0 4793 y Fr(2.12)136
+b(Calling)46 b(from)f(F)-11 b(ortran)0 4996 y Fw(The)35
+b Fu(SuperLU/FORTRAN/)d Fw(sub)s(directory)h(con)m(tains)k(an)e
+(example)h(of)g(using)e Fu(SuperLU)g Fw(from)h(a)i(F)-8
+b(ortran)36 b(pro-)0 5109 y(gram.)41 b(The)30 b(General)g(rules)f(for)h
+(mixing)f(F)-8 b(ortran)31 b(and)e(C)h(programs)g(are)h(as)g(follo)m
+(ws.)136 5303 y Fq(\017)46 b Fw(Argumen)m(ts)31 b(in)e(C)h(are)g
+(passed)g(b)m(y)h(v)-5 b(alue,)30 b(while)e(in)h(F)-8
+b(ortran)31 b(are)g(passed)f(b)m(y)g(reference.)41 b(So)31
+b(w)m(e)f(alw)m(a)m(ys)227 5416 y(pass)23 b(the)h(address)e(\(as)i(a)f
+(p)s(oin)m(ter\))g(in)f(the)h(C)g(calling)f(routine.)37
+b(\(Y)-8 b(ou)24 b(cannot)g(mak)m(e)g(a)g(call)e(with)g(n)m(um)m(b)s
+(ers)227 5529 y(directly)29 b(in)g(the)i(parameters.\))1905
+5778 y(32)p eop
+%%Page: 33 34
+33 33 bop 136 280 a Fq(\017)46 b Fw(F)-8 b(ortran)44
+b(uses)f(1-based)g(arra)m(y)h(addressing,)h(while)c(C)i(uses)f
+(0-based.)80 b(Therefore,)46 b(the)e(ro)m(w)f(indices)227
+393 y(\()p Fu(rowind[])p Fw(\))26 b(and)h(the)g(in)m(teger)h(p)s(oin)m
+(ters)e(to)j(arra)m(ys)e(\()p Fu(colptr[])p Fw(\))f(should)g(b)s(e)g
+(adjusted)h(b)s(efore)g(they)h(are)227 506 y(passed)i(in)m(to)h(a)f(C)g
+(routine.)141 703 y(Because)25 b(of)f(the)g(ab)s(o)m(v)m(e)h(language)g
+(di\013erences,)f(in)f(order)g(to)i(em)m(b)s(ed)e Fu(SuperLU)f
+Fw(in)g(a)j(F)-8 b(ortran)24 b(en)m(vironmen)m(t,)0 816
+y(users)k(are)h(required)e(to)i(use)f(\\wrapp)s(er")g(routines)g(\(in)f
+(C\))i(for)f(all)g(the)g Fu(SuperLU)f Fw(routines)h(that)h(will)d(b)s
+(e)i(called)0 929 y(from)i(F)-8 b(ortran)32 b(programs.)41
+b(The)30 b(example)g Fu(c)p 1579 929 29 4 v 34 w(fortran)p
+1949 929 V 33 w(dgssv.c)f Fw(in)g(the)i Fu(FORTRAN/)d
+Fw(directory)i(sho)m(ws)h(ho)m(w)g(a)0 1042 y(wrapp)s(er)e(program)h
+(should)e(b)s(e)i(written.)40 b(This)28 b(program)i(is)g(listed)f(b)s
+(elo)m(w.)0 1238 y Fu(#include)46 b("dsp_defs.h")0 1464
+y(#define)g(HANDLE_SIZE)92 b(8)0 1690 y(typedef)46 b(struct)g({)191
+1803 y(SuperMatrix)f(*L;)191 1916 y(SuperMatrix)g(*U;)191
+2029 y(int)i(*perm_c;)191 2142 y(int)g(*perm_r;)0 2255
+y(})g(factors_t;)0 2480 y(int)0 2593 y(c_fortran_dgssv_\(int)42
+b(*iopt,)k(int)h(*n,)g(int)g(*nnz,)f(int)h(*nrhs,)f(double)h(*values,)
+811 2706 y(int)g(*rowind,)f(int)h(*colptr,)e(double)h(*b,)h(int)g
+(*ldb,)811 2819 y(int)g(factors[HANDLE_SIZE],)42 b(/*)47
+b(a)h(handle)e(containing)f(the)i(pointer)2195 2932 y(to)h(the)f
+(factored)e(matrices)h(*/)811 3045 y(int)h(*info\))0
+3271 y({)0 3384 y(/*)48 3497 y(*)g(This)g(routine)f(can)h(be)g(called)f
+(from)g(Fortran.)48 3610 y(*)48 3723 y(*)h(iopt)g(\(input\))f(int)48
+3835 y(*)286 b(Specifies)45 b(the)i(operation:)48 3948
+y(*)286 b(=)47 b(1,)g(performs)f(LU)h(decomposition)d(for)j(the)g
+(first)g(time)48 4061 y(*)286 b(=)47 b(2,)g(performs)f(triangular)f
+(solve)48 4174 y(*)286 b(=)47 b(3,)g(free)g(all)g(the)g(storage)f(in)h
+(the)g(end)48 4287 y(*)48 4400 y(*)g(factors)f(\(input/output\))e
+(integer)i(array)g(of)h(size)g(8)48 4513 y(*)286 b(If)47
+b(iopt)g(==)g(1,)g(it)g(is)g(an)h(output)e(and)h(contains)e(the)i
+(pointer)f(pointing)f(to)48 4626 y(*)954 b(the)47 b(structure)e(of)i
+(the)g(factored)f(matrices.)48 4739 y(*)286 b(Otherwise,)45
+b(it)i(it)g(an)g(input.)48 4852 y(*)48 4965 y(*/)191
+5077 y(SuperMatrix)e(A,)i(AC,)g(B;)191 5190 y(SuperMatrix)e(*L,)i(*U;)
+191 5303 y(int)g(*perm_r;)e(/*)j(row)e(permutations)f(from)i(partial)e
+(pivoting)h(*/)191 5416 y(int)h(*perm_c;)e(/*)j(column)e(permutation)e
+(vector)i(*/)191 5529 y(int)h(*etree;)93 b(/*)48 b(column)e
+(elimination)e(tree)j(*/)1905 5778 y Fw(33)p eop
+%%Page: 34 35
+34 34 bop 191 280 a Fu(SCformat)45 b(*Lstore;)191 393
+y(NCformat)g(*Ustore;)191 506 y(int)285 b(i,)48 b(panel_size,)c
+(permc_spec,)h(relax;)191 619 y(trans_t)93 b(trans;)191
+732 y(double)141 b(drop_tol)46 b(=)h(0.0;)191 845 y(mem_usage_t)140
+b(mem_usage;)191 958 y(superlu_options_t)43 b(options;)191
+1071 y(SuperLUStat_t)h(stat;)191 1184 y(factors_t)h(*LUfactors;)191
+1409 y(trans)h(=)i(NOTRANS;)191 1635 y(if)f(\()h(*iopt)e(==)h(1)h(\))f
+({)g(/*)h(LU)f(decomposition)d(*/)382 1861 y(/*)j(Set)g(the)g(default)f
+(input)g(options.)g(*/)382 1974 y(set_default_options\(&opt)o(ion)o
+(s\);)382 2200 y(/*)h(Initialize)e(the)i(statistics)e(variables.)g(*/)
+382 2313 y(StatInit\(&stat\);)382 2539 y(/*)i(Adjust)f(to)h(0-based)f
+(indexing)g(*/)382 2652 y(for)h(\(i)g(=)g(0;)h(i)f(<)g(*nnz;)g(++i\))f
+(--rowind[i];)382 2764 y(for)h(\(i)g(=)g(0;)h(i)f(<=)g(*n;)g(++i\))g
+(--colptr[i];)382 2990 y(dCreate_CompCol_Matrix\(&)o(A,)41
+b(*n,)47 b(*n,)g(*nnz,)g(values,)e(rowind,)h(colptr,)1480
+3103 y(SLU_NC,)f(SLU_D,)h(SLU_GE\);)382 3216 y(L)h(=)h(\(SuperMatrix)c
+(*\))j(SUPERLU_MALLOC\()d(sizeof\(SuperMatrix\))f(\);)382
+3329 y(U)k(=)h(\(SuperMatrix)c(*\))j(SUPERLU_MALLOC\()d
+(sizeof\(SuperMatrix\))f(\);)382 3442 y(if)k(\()g(!\(perm_r)f(=)h
+(intMalloc\(*n\)\))d(\))k(ABORT\("Malloc)c(fails)i(for)h(perm_r[]."\);)
+382 3555 y(if)g(\()g(!\(perm_c)f(=)h(intMalloc\(*n\)\))d(\))k
+(ABORT\("Malloc)c(fails)i(for)h(perm_c[]."\);)382 3668
+y(if)g(\()g(!\(etree)f(=)i(intMalloc\(*n\)\))c(\))j(ABORT\("Malloc)d
+(fails)j(for)g(etree[]."\);)382 3894 y(/*)430 4006 y(*)g(Get)g(column)f
+(permutation)f(vector)h(perm_c[],)f(according)g(to)j(permc_spec:)430
+4119 y(*)142 b(permc_spec)45 b(=)j(0:)f(natural)f(ordering)430
+4232 y(*)142 b(permc_spec)45 b(=)j(1:)f(minimum)f(degree)g(on)h
+(structure)e(of)j(A'*A)430 4345 y(*)142 b(permc_spec)45
+b(=)j(2:)f(minimum)f(degree)g(on)h(structure)e(of)j(A'+A)430
+4458 y(*)142 b(permc_spec)45 b(=)j(3:)f(approximate)e(minimum)h(degree)
+g(for)h(unsymmetric)d(matrices)430 4571 y(*/)382 4684
+y(permc_spec)h(=)i(3;)382 4797 y(get_perm_c\(permc_spec,)42
+b(&A,)k(perm_c\);)382 5023 y(sp_preorder\(&options,)c(&A,)47
+b(perm_c,)f(etree,)g(&AC\);)382 5248 y(panel_size)f(=)i(sp_ienv\(1\);)
+382 5361 y(relax)f(=)i(sp_ienv\(2\);)1905 5778 y Fw(34)p
+eop
+%%Page: 35 36
+35 35 bop 382 280 a Fu(dgstrf\(&options,)43 b(&AC,)k(drop_tol,)e
+(relax,)h(panel_size,)716 393 y(etree,)g(NULL,)g(0,)i(perm_c,)d
+(perm_r,)h(L,)h(U,)h(&stat,)e(info\);)382 619 y(if)h(\()g(*info)g(==)g
+(0)g(\))h({)573 732 y(Lstore)e(=)h(\(SCformat)f(*\))h(L->Store;)573
+845 y(Ustore)f(=)h(\(NCformat)f(*\))h(U->Store;)573 958
+y(printf\("No)e(of)i(nonzeros)e(in)j(factor)e(L)h(=)h(\045d\\n",)e
+(Lstore->nnz\);)573 1071 y(printf\("No)f(of)i(nonzeros)e(in)j(factor)e
+(U)h(=)h(\045d\\n",)e(Ustore->nnz\);)573 1184 y(printf\("No)f(of)i
+(nonzeros)e(in)j(L+U)f(=)g(\045d\\n",)f(Lstore->nnz)f(+)i
+(Ustore->nnz\);)573 1297 y(dQuerySpace\(L,)d(U,)j(&mem_usage\);)573
+1409 y(printf\("L\\\\U)d(MB)j(\045.3f\\ttotal)e(MB)i(needed)f
+(\045.3f\\texpansions)e(\045d\\n",)907 1522 y(mem_usage.for_lu/1e6,)e
+(mem_usage.total_needed/1)o(e6,)907 1635 y(mem_usage.expansions\);)382
+1748 y(})47 b(else)g({)573 1861 y(printf\("dgstrf\(\))c(error)j
+(returns)g(INFO=)h(\045d\\n",)f(*info\);)573 1974 y(if)h(\()g(*info)g
+(<=)g(*n)g(\))h({)f(/*)g(factorization)d(completes)i(*/)716
+2087 y(dQuerySpace\(L,)e(U,)j(&mem_usage\);)716 2200
+y(printf\("L\\\\U)d(MB)k(\045.3f\\ttotal)c(MB)j(needed)g
+(\045.3f\\texpansions)c(\045d\\n",)1002 2313 y(mem_usage.for_lu/1e6,)f
+(mem_usage.total_needed/1e)o(6,)1002 2426 y(mem_usage.expansions\);)573
+2539 y(})382 2652 y(})382 2877 y(/*)47 b(Restore)f(to)h(1-based)f
+(indexing)f(*/)382 2990 y(for)i(\(i)g(=)g(0;)h(i)f(<)g(*nnz;)g(++i\))f
+(++rowind[i];)382 3103 y(for)h(\(i)g(=)g(0;)h(i)f(<=)g(*n;)g(++i\))g
+(++colptr[i];)382 3329 y(/*)g(Save)g(the)g(LU)g(factors)f(in)h(the)g
+(factors)e(handle)i(*/)382 3442 y(LUfactors)e(=)j(\(factors_t*\))c
+(SUPERLU_MALLOC\(sizeof\(fa)o(ctor)o(s_t\))o(\);)382
+3555 y(LUfactors->L)g(=)k(L;)382 3668 y(LUfactors->U)c(=)k(U;)382
+3781 y(LUfactors->perm_c)43 b(=)k(perm_c;)382 3894 y(LUfactors->perm_r)
+c(=)k(perm_r;)382 4006 y(factors[0])e(=)i(\(int\))g(LUfactors;)382
+4232 y(/*)g(Free)g(un-wanted)e(storage)h(*/)382 4345
+y(SUPERLU_FREE\(etree\);)382 4458 y(Destroy_SuperMatrix_Stor)o(e\(&)o
+(A\);)382 4571 y(Destroy_CompCol_Permuted)o(\(&A)o(C\);)382
+4684 y(StatFree\(&stat\);)191 4910 y(})h(else)g(if)g(\()h(*iopt)e(==)h
+(2)h(\))f({)h(/*)f(Triangular)e(solve)h(*/)382 5023 y(/*)h(Initialize)e
+(the)i(statistics)e(variables.)g(*/)382 5136 y(StatInit\(&stat\);)382
+5361 y(/*)i(Extract)f(the)h(LU)g(factors)f(in)h(the)g(factors)f(handle)
+g(*/)382 5474 y(LUfactors)f(=)j(\(factors_t*\))c(factors[0];)1905
+5778 y Fw(35)p eop
+%%Page: 36 37
+36 36 bop 382 280 a Fu(L)47 b(=)h(LUfactors->L;)382 393
+y(U)f(=)h(LUfactors->U;)382 506 y(perm_c)e(=)h(LUfactors->perm_c;)382
+619 y(perm_r)f(=)h(LUfactors->perm_r;)382 845 y
+(dCreate_Dense_Matrix\(&B,)41 b(*n,)47 b(*nrhs,)f(b,)h(*ldb,)g(SLU_DN,)
+e(SLU_D,)h(SLU_GE\);)382 1071 y(/*)h(Solve)f(the)h(system)f(A*X=B,)g
+(overwriting)f(B)j(with)e(X.)h(*/)382 1184 y(dgstrs)f(\(trans,)g(L,)h
+(U,)g(perm_c,)f(perm_r,)g(&B,)h(&stat,)f(info\);)382
+1409 y(Destroy_SuperMatrix_Stor)o(e\(&)o(B\);)382 1522
+y(StatFree\(&stat\);)191 1748 y(})h(else)g(if)g(\()h(*iopt)e(==)h(3)h
+(\))f({)h(/*)f(Free)f(storage)g(*/)382 1861 y(/*)h(Free)g(the)g(LU)g
+(factors)f(in)h(the)g(factors)e(handle)i(*/)382 1974
+y(LUfactors)e(=)j(\(factors_t*\))c(factors[0];)382 2087
+y(SUPERLU_FREE)g(\(LUfactors->perm_r\);)382 2200 y(SUPERLU_FREE)g
+(\(LUfactors->perm_c\);)382 2313 y(Destroy_SuperNode_Matrix)o(\(LU)o
+(fact)o(ors-)o(>L\))o(;)382 2426 y(Destroy_CompCol_Matrix\(L)o(Ufa)o
+(ctor)o(s->U)o(\);)382 2539 y(SUPERLU_FREE)g(\(LUfactors->L\);)382
+2652 y(SUPERLU_FREE)g(\(LUfactors->U\);)382 2764 y(SUPERLU_FREE)g
+(\(LUfactors\);)191 2877 y(})j(else)g({)382 2990 y(fprintf\(stderr,)c
+("Invalid)j(iopt=\045d)g(passed)g(to)h(c_fortran_dgssv\(\)\\n"\);)382
+3103 y(exit\(-1\);)191 3216 y(})0 3329 y(})141 3526 y
+Fw(Since)25 b(the)h(matrix)g(structures)f(in)g(C)g(cannot)i(b)s(e)e
+(directly)g(returned)g(to)h(F)-8 b(ortran,)28 b(w)m(e)f(use)e(a)i
+(handle)d(named)0 3639 y Fu(factors)36 b Fw(to)i(access)h(those)f
+(structures.)61 b(The)37 b(handle)f(is)h(essen)m(tially)f(an)h(in)m
+(teger)h(p)s(oin)m(ter)f(p)s(oin)m(ting)f(to)i(the)0
+3752 y(factored)22 b(matrices)f(obtained)f(from)g Fu(SuperLU)p
+Fw(.)f(So)i(the)g(factored)h(matrices)f(are)g(opaque)g(ob)5
+b(jects)22 b(to)f(the)g(F)-8 b(ortran)0 3864 y(program,)30
+b(but)g(can)h(only)e(b)s(e)h(manipulated)e(from)i(the)h(C)f(wrapp)s(er)
+e(program.)141 3977 y(The)i(F)-8 b(ortran)31 b(program)f
+Fu(FORTRAN/f77)p 1556 3977 29 4 v 32 w(main.f)e Fw(sho)m(ws)i(ho)m(w)h
+(a)f(F)-8 b(ortran)32 b(program)e(ma)m(y)h(call)0 4090
+y Fu(c)p 54 4090 V 34 w(fortran)p 424 4090 V 33 w(dgssv\(\))p
+Fw(,)g(and)g(is)h(listed)f(b)s(elo)m(w.)46 b(A)32 b Fu(README)f
+Fw(\014le)h(in)f(this)g(directory)h(describ)s(es)e(ho)m(w)j(to)g
+(compile)0 4203 y(and)d(run)f(this)g(program.)286 4400
+y Fu(program)46 b(f77_main)286 4513 y(integer)g(maxn,)h(maxnz)286
+4626 y(parameter)f(\()h(maxn)g(=)g(10000,)f(maxnz)h(=)g(100000)f(\))286
+4739 y(integer)g(rowind\(maxnz\),)e(colptr\(maxn\))286
+4852 y(real*8)94 b(values\(maxnz\),)44 b(b\(maxn\))286
+4965 y(integer)i(n,)h(nnz,)g(nrhs,)f(ldb,)h(info)286
+5077 y(integer)f(factors\(8\),)f(iopt)0 5190 y(*)0 5303
+y(*)238 b(Read)47 b(the)g(matrix)f(file)h(in)g(Harwell-Boeing)d(format)
+286 5416 y(call)j(hbcode1\(n,)e(n,)i(nnz,)g(values,)f(rowind,)f
+(colptr\))0 5529 y(*)1905 5778 y Fw(36)p eop
+%%Page: 37 38
+37 37 bop 286 280 a Fu(nrhs)47 b(=)g(1)286 393 y(ldb)g(=)h(n)286
+506 y(do)g(i)f(=)g(1,)h(n)430 619 y(b\(i\))e(=)i(1)286
+732 y(enddo)0 845 y(*)0 958 y(*)f(First,)g(factorize)e(the)i(matrix.)f
+(The)g(factors)g(are)h(stored)f(in)h(factor\(\))f(handle.)286
+1071 y(iopt)h(=)g(1)286 1184 y(call)g(c_fortran_dgssv\()c(iopt,)k(n,)g
+(nnz,)g(nrhs,)f(values,)g(rowind,)g(colptr,)239 1297
+y($)1049 b(b,)48 b(ldb,)e(factors,)g(info)g(\))0 1409
+y(*)286 1522 y(if)i(\(info)e(.eq.)h(0\))g(then)430 1635
+y(write)f(\(*,*\))g('Factorization)e(succeeded')286 1748
+y(else)430 1861 y(write\(*,*\))h('INFO)h(from)h(factorization)d(=)j(',)
+g(info)286 1974 y(endif)0 2087 y(*)0 2200 y(*)g(Second,)f(solve)h(the)g
+(system)f(using)g(the)h(existing)e(factors.)286 2313
+y(iopt)i(=)g(2)286 2426 y(call)g(c_fortran_dgssv\()c(iopt,)k(n,)g(nnz,)
+g(nrhs,)f(values,)g(rowind,)g(colptr,)239 2539 y($)1049
+b(b,)48 b(ldb,)e(factors,)g(info)g(\))0 2652 y(*)286
+2764 y(if)i(\(info)e(.eq.)h(0\))g(then)430 2877 y(write)f(\(*,*\))g
+('Solve)g(succeeded')430 2990 y(write)g(\(*,*\))g(\(b\(i\),)g(i=1,)h
+(10\))286 3103 y(else)430 3216 y(write\(*,*\))e('INFO)h(from)h
+(triangular)e(solve)h(=)h(',)h(info)286 3329 y(endif)0
+3555 y(*)f(Last,)g(free)f(the)h(storage)f(allocated)f(inside)i(SuperLU)
+286 3668 y(iopt)g(=)g(3)286 3781 y(call)g(c_fortran_dgssv\()c(iopt,)k
+(n,)g(nnz,)g(nrhs,)f(values,)g(rowind,)g(colptr,)239
+3894 y($)1049 b(b,)48 b(ldb,)e(factors,)g(info)g(\))0
+4006 y(*)286 4119 y(stop)286 4232 y(end)1905 5778 y Fw(37)p
+eop
+%%Page: 38 39
+38 38 bop 0 903 a Fs(Chapter)65 b(3)0 1318 y Fy(Multithreaded)78
+b(Sup)6 b(erLU)77 b(\(V)-19 b(ersion)78 b(1.1\))0 1800
+y Fr(3.1)135 b(Ab)t(out)44 b(Sup)t(erLU)p 1262 1800 41
+4 v 48 w(MT)0 2003 y Fw(Among)34 b(the)g(v)-5 b(arious)33
+b(steps)h(of)h(the)f(solution)e(pro)s(cess)i(in)f(the)h(sequen)m(tial)f
+(Sup)s(erLU,)f(the)i Fv(LU)44 b Fw(factorization)0 2116
+y(dominates)38 b(the)i(computation;)j(it)38 b(usually)f(tak)m(es)k
+(more)e(than)f(95\045)i(of)f(the)g(sequen)m(tial)f(run)m(time)g(for)h
+(large)0 2228 y(sparse)22 b(linear)f(systems.)38 b(W)-8
+b(e)23 b(ha)m(v)m(e)h(designed)d(and)h(implemen)m(ted)e(an)j(algorithm)
+e(to)i(p)s(erform)e(the)h(factorization)0 2341 y(in)35
+b(parallel)f(on)i(mac)m(hines)g(with)f(a)i(shared)e(address)h(space)g
+(and)g(m)m(ultithreading.)56 b(The)36 b(parallel)e(algorithm)0
+2454 y(is)k(based)g(on)g(the)h(e\016cien)m(t)g(sequen)m(tial)f
+(algorithm)g(implemen)m(ted)f(in)g(Sup)s(erLU.)g(Although)h(w)m(e)h
+(attempted)0 2567 y(to)c(minimize)c(the)j(amoun)m(t)g(of)g(c)m(hanges)h
+(to)g(the)f(sequen)m(tial)f(co)s(de,)i(there)f(are)h(still)c(a)k(n)m
+(um)m(b)s(er)d(of)i(non-trivial)0 2680 y(mo)s(di\014cations)39
+b(to)i(the)g(serial)e(Sup)s(erLU,)g(mostly)h(related)g(to)h(the)g
+(matrix)f(data)h(structures)f(and)g(memory)0 2793 y(organization.)g
+(All)26 b(these)i(c)m(hanges)h(are)f(summarized)e(in)h(T)-8
+b(able)27 b(3.1)i(and)e(their)g(impacts)g(on)g(p)s(erformance)h(are)0
+2906 y(studied)j(thoroughly)h(in)f([6)q(,)i(21)q(].)48
+b(In)32 b(this)g(part)h(of)g(the)g(Users')g(Guide,)f(w)m(e)h(describ)s
+(e)f(only)g(the)h(c)m(hanges)g(that)0 3019 y(the)c(user)g(should)e(b)s
+(e)h(a)m(w)m(are)j(of.)40 b(Other)29 b(than)g(these)g(di\013erences,)g
+(most)h(of)f(the)g(material)g(in)f(c)m(hapter)h(2)h(is)e(still)0
+3132 y(applicable.)p 170 3340 3560 4 v 168 3453 4 113
+v 220 3419 a(Construct)p 987 3453 V 423 w(P)m(arallel)i(algorithm)p
+3728 3453 V 170 3456 3560 4 v 168 3569 4 113 v 220 3535
+a(panel)p 987 3569 V 605 w(restricted)g(so)h(it)f(do)s(es)g(not)g(con)m
+(tain)h(branc)m(hings)e(in)g(the)i(elimination)c(tree)p
+3728 3569 V 168 3682 V 220 3648 a(sup)s(erno)s(de)p 987
+3682 V 411 w(restricted)j(to)h(b)s(e)f(a)h(fundamen)m(tal)e(sup)s(erno)
+s(de)f(in)h(the)i(elimination)d(tree)p 3728 3682 V 168
+3795 V 220 3761 a(sup)s(erno)s(de)g(storage)p 987 3795
+V 101 w(use)i(either)g(static)h(or)f(dynamic)g(upp)s(er)e(b)s(ound)g
+(\(section)j(3.4.2\))p 3728 3795 V 168 3908 V 220 3874
+a(pruning)d(&)i(DFS)p 987 3908 V 199 w(use)g(b)s(oth)g
+Fv(G)p Fw(\()p Fv(L)1578 3841 y Fo(T)1634 3874 y Fw(\))g(and)g(pruned)e
+Fv(G)p Fw(\()p Fv(L)2352 3841 y Fo(T)2408 3874 y Fw(\))j(to)g(a)m(v)m
+(oid)g(lo)s(c)m(king)p 3728 3908 V 170 3911 3560 4 v
+402 4105 a(T)-8 b(able)30 b(3.1:)42 b(The)30 b(di\013erences)g(b)s(et)m
+(w)m(een)h(the)f(parallel)f(and)g(the)i(sequen)m(tial)f(algorithms.)0
+4473 y Fr(3.2)135 b(Storage)46 b(t)l(yp)t(es)g(for)f
+Ff(L)f Fr(and)h Ff(U)0 4676 y Fw(As)28 b(in)e(the)i(sequen)m(tial)f(co)
+s(de,)h(the)g(t)m(yp)s(e)g(for)f(the)h(factored)h(matrices)e
+Fv(L)h Fw(and)f Fv(U)38 b Fw(is)26 b Fu(SuperMatrix)f
+Fw(\(Figure)i(2.2\),)0 4789 y(ho)m(w)m(ev)m(er,)48 b(their)42
+b(storage)j(formats)e(\(stored)h(in)e Fu(*Store)p Fw(\))g(are)h(c)m
+(hanged.)80 b(In)42 b(the)i(parallel)d(algorithm,)46
+b(the)0 4902 y(adjacen)m(t)36 b(panels)e(of)h(the)g(columns)f(ma)m(y)h
+(b)s(e)g(assigned)f(to)i(di\013eren)m(t)e(pro)s(cesses,)i(and)f(they)g
+(ma)m(y)g(b)s(e)f(\014nished)0 5015 y(and)25 b(put)g(in)f(global)h
+(memory)h(out)g(of)g(order.)38 b(That)26 b(is,)g(the)g(consecutiv)m(e)g
+(columns)f(or)g(sup)s(erno)s(des)e(ma)m(y)k(not)f(b)s(e)0
+5128 y(stored)k(con)m(tiguously)g(in)f(memory)-8 b(.)41
+b(Th)m(us,)29 b(in)g(addition)g(to)i(the)f(p)s(oin)m(ters)f(to)i(the)g
+(b)s(eginning)c(of)k(eac)m(h)g(column)0 5240 y(or)h(sup)s(erno)s(de,)f
+(w)m(e)i(need)f(p)s(oin)m(ters)f(to)i(the)f(end)g(of)g(the)h(column)e
+(or)h(sup)s(erno)s(de.)44 b(In)32 b(particular,)f(the)h(storage)0
+5353 y(t)m(yp)s(e)f(for)f Fv(L)g Fw(is)f Fu(SCP)h Fw(\(Sup)s(erno)s
+(de,)e(Column-wise)g(and)i(P)m(erm)m(uted\),)h(de\014ned)e(as:)191
+5529 y Fu(typedef)46 b(struct)g({)1905 5778 y Fw(38)p
+eop
+%%Page: 39 40
+39 39 bop 382 280 a Fu(int)94 b(nnz;)477 b(/*)47 b(number)f(of)h
+(nonzeros)f(in)h(the)g(matrix)f(*/)382 393 y(int)94 b(nsuper;)333
+b(/*)47 b(number)f(of)h(supernodes)e(*/)382 506 y(void)h(*nzval;)333
+b(/*)47 b(pointer)f(to)h(array)f(of)h(nonzero)f(values,)1432
+619 y(packed)g(by)h(column)f(*/)382 732 y(int)h(*nzval_colbeg;)d(/*)j
+(nzval_colbeg[j])c(points)k(to)g(beginning)e(of)i(column)f(j)1432
+845 y(in)h(nzval[])f(*/)382 958 y(int)h(*nzval_colend;)d(/*)j
+(nzval_colend[j])c(points)k(to)g(one)g(past)f(the)h(last)1432
+1071 y(element)f(of)h(column)f(j)h(in)h(nzval[])d(*/)382
+1184 y(int)i(*rowind;)332 b(/*)47 b(pointer)f(to)h(array)f(of)h
+(compressed)e(row)i(indices)f(of)1432 1297 y(the)h(supernodes)e(*/)382
+1409 y(int)i(*rowind_colbeg;/*)c(rowind_colbeg[j])g(points)j(to)h
+(beginning)f(of)h(column)f(j)1432 1522 y(in)h(rowind[])f(*/)382
+1635 y(int)h(*rowind_colend;/*)c(rowind_colend[j])g(points)j(to)h(one)g
+(past)g(the)g(last)1432 1748 y(element)f(of)h(column)f(j)h(in)h
+(rowind[])d(*/)382 1861 y(int)i(*col_to_sup;)140 b(/*)47
+b(col_to_sup[j])d(is)j(the)g(supernode)e(number)h(to)i(which)1432
+1974 y(column)e(j)h(belongs)f(*/)382 2087 y(int)h(*sup_to_colbeg;/*)c
+(sup_to_colbeg[s])g(points)j(to)h(the)g(first)g(column)1432
+2200 y(of)g(the)g(s-th)g(supernode)e(/)382 2313 y(int)i
+(*sup_to_colend;/*)c(sup_to_colend[s])g(points)j(to)h(one)g(past)g(the)
+g(last)1432 2426 y(column)f(of)h(the)g(s-th)g(supernode)e(*/)191
+2539 y(})i(SCPformat;)141 2729 y Fw(The)30 b(storage)i(t)m(yp)s(e)e
+(for)h Fv(U)40 b Fw(is)29 b Fu(NCP)p Fw(,)h(de\014ned)f(as:)191
+2899 y Fu(typedef)46 b(struct)g({)382 3012 y(int)94 b(nnz;)238
+b(/*)47 b(number)f(of)h(nonzeros)f(in)h(the)g(matrix)f(*/)382
+3124 y(void)g(*nzval;)94 b(/*)47 b(pointer)f(to)h(array)g(of)g(nonzero)
+f(values,)f(packed)h(by)i(column)e(*/)382 3237 y(int)94
+b(*rowind;)46 b(/*)h(pointer)f(to)h(array)g(of)g(row)g(indices)e(of)j
+(the)f(nonzeros)e(*/)382 3350 y(int)94 b(*colbeg;)46
+b(/*)h(colbeg[j])e(points)i(to)g(the)g(location)e(in)i(nzval[])f(and)h
+(rowind[])1193 3463 y(which)g(starts)f(column)g(j)h(*/)382
+3576 y(int)94 b(*colend;)46 b(/*)h(colend[j])e(points)i(to)g(one)g
+(past)f(the)h(location)f(in)h(nzval[])1193 3689 y(and)g(rowind[])f
+(which)g(ends)h(column)f(j)h(*/)191 3802 y(})g(NCPformat;)141
+3971 y Fw(The)41 b(table)g(b)s(elo)m(w)f(summarizes)g(the)i(data)g(and)
+e(storage)j(t)m(yp)s(es)e(of)g(all)f(the)i(matrices)f(in)m(v)m(olv)m
+(ed)g(in)f(the)0 4084 y(parallel)28 b(routines:)p 570
+4191 2760 4 v 568 4304 4 113 v 907 4304 V 1268 4270 a
+Fv(A)p 1694 4304 V 563 w(L)p 2162 4304 V 377 w(U)p 2583
+4304 V 334 w(B)p 2955 4304 V 299 w(X)p 3328 4304 V 570
+4308 2760 4 v 568 4420 4 113 v 620 4387 a Fu(Stype)p
+907 4420 V 98 w(SLU)p 1108 4387 29 4 v 34 w(NC)i Fw(or)g
+Fu(SLU)p 1523 4387 V 34 w(NR)p 1694 4420 4 113 v 123
+w(SLU)p 1920 4387 29 4 v 33 w(SCP)p 2162 4420 4 113 v
+123 w(SLU)p 2364 4387 29 4 v 33 w(NCP)p 2583 4420 4 113
+v 99 w(SLU)p 2784 4387 29 4 v 34 w(DN)p 2955 4420 4 113
+v 99 w(SLU)p 3157 4387 29 4 v 33 w(DN)p 3328 4420 4 113
+v 568 4533 V 620 4500 a(Dtype)p 907 4533 V 330 w(SLU)p
+1340 4500 29 4 v 33 w(D)p 1694 4533 4 113 v 402 w(SLU)p
+1967 4500 29 4 v 34 w(D)p 2162 4533 4 113 v 219 w(SLU)p
+2412 4500 29 4 v 33 w(D)p 2583 4533 4 113 v 171 w(SLU)p
+2808 4500 29 4 v 34 w(D)p 2955 4533 4 113 v 147 w(SLU)p
+3181 4500 29 4 v 33 w(D)p 3328 4533 4 113 v 568 4646
+V 620 4612 a(Mtype)p 907 4646 V 306 w(SLU)p 1316 4612
+29 4 v 33 w(GE)p 1694 4646 4 113 v 307 w(SLU)p 1896 4612
+29 4 v 33 w(TRLU)p 2162 4646 4 113 v 99 w(SLU)p 2364
+4612 29 4 v 33 w(TRU)p 2583 4646 4 113 v 99 w(SLU)p 2784
+4612 29 4 v 34 w(GE)p 2955 4646 4 113 v 99 w(SLU)p 3157
+4612 29 4 v 33 w(GE)p 3328 4646 4 113 v 570 4650 2760
+4 v 0 4874 a Fr(3.3)135 b(User-callable)47 b(routines)0
+5077 y Fw(As)38 b(in)f(the)h(sequen)m(tial)g(Sup)s(erLU,)e(w)m(e)j(pro)
+m(vide)e(b)s(oth)h(computational)g(routines)f(and)g(driv)m(er)g
+(routines.)63 b(T)-8 b(o)0 5190 y(name)40 b(those)g(routines)f(that)i
+(in)m(v)m(olv)m(e)f(parallelization)d(in)i(the)h(call-graph,)i(w)m(e)e
+(prep)s(end)e(a)i(letter)h Fu(p)e Fw(to)i(the)0 5303
+y(names)34 b(of)h(their)e(sequen)m(tial)h(coun)m(terparts,)i(for)f
+(example)f Fu(pdgstrf)p Fw(.)51 b(F)-8 b(or)35 b(the)f(purely)f(sequen)
+m(tial)h(routines,)0 5416 y(w)m(e)44 b(use)f(the)g(same)g(names)h(as)f
+(b)s(efore.)79 b(Here,)47 b(w)m(e)d(only)e(list)g(the)h(routines)f
+(that)i(are)f(di\013eren)m(t)g(from)g(the)0 5529 y(sequen)m(tial)30
+b(ones.)1905 5778 y(39)p eop
+%%Page: 40 41
+40 40 bop 0 280 a Fm(3.3.1)112 b(Driv)m(er)37 b(routines)0
+452 y Fw(W)-8 b(e)27 b(pro)m(vide)f(t)m(w)m(o)i(t)m(yp)s(es)e(of)g
+(driv)m(er)f(routines)h(for)g(solving)f(systems)h(of)g(linear)f
+(equations.)39 b(The)26 b(driv)m(er)f(routines)0 565
+y(can)31 b(handle)e(b)s(oth)g(column-)h(and)f(ro)m(w-orien)m(ted)i
+(storage)h(sc)m(hemes.)136 753 y Fq(\017)46 b Fw(A)33
+b(simple)e(driv)m(er)g Fu(pdgssv)p Fw(,)h(whic)m(h)f(solv)m(es)i(the)g
+(system)f Fv(AX)37 b Fw(=)29 b Fv(B)37 b Fw(b)m(y)32
+b(factorizing)h Fv(A)g Fw(and)f(o)m(v)m(erwriting)227
+865 y Fv(B)j Fw(with)29 b(the)i(solution)e Fv(X)7 b Fw(.)136
+1053 y Fq(\017)46 b Fw(An)29 b(exp)s(ert)g(driv)m(er)f
+Fu(pdgssvx)p Fw(,)g(whic)m(h,)g(in)g(addition)g(to)i(the)f(ab)s(o)m(v)m
+(e,)i(also)f(p)s(erforms)d(the)j(follo)m(wing)e(func-)227
+1166 y(tions)i(\(some)h(of)g(them)f(optionally\):)330
+1354 y Fx({)45 b Fw(solv)m(e)31 b Fv(A)718 1321 y Fo(T)773
+1354 y Fv(X)i Fw(=)25 b Fv(B)5 b Fw(;)330 1500 y Fx({)45
+b Fw(equilibrate)35 b(the)i(system)g(\(scale)g Fv(A)p
+Fw('s)g(ro)m(ws)f(and)g(columns)g(to)h(ha)m(v)m(e)h(unit)d(norm\))i(if)
+e Fv(A)i Fw(is)f(p)s(o)s(orly)427 1613 y(scaled;)330
+1759 y Fx({)45 b Fw(estimate)h(the)e(condition)g(n)m(um)m(b)s(er)f(of)i
+Fv(A)p Fw(,)j(c)m(hec)m(k)e(for)f(near-singularit)m(y)-8
+b(,)47 b(and)c(c)m(hec)m(k)k(for)d(piv)m(ot)427 1872
+y(gro)m(wth;)330 2018 y Fx({)h Fw(re\014ne)30 b(the)h(solution)e(and)g
+(compute)i(forw)m(ard)f(and)g(bac)m(kw)m(ard)g(error)g(b)s(ounds.)0
+2261 y Fm(3.3.2)112 b(Computational)36 b(routines)0 2433
+y Fw(The)f(user)g(can)h(in)m(v)m(ok)m(e)g(the)g(follo)m(wing)e
+(computational)h(routines)f(to)j(directly)d(con)m(trol)i(the)f(b)s(eha)
+m(vior)g(of)h(Su-)0 2546 y(p)s(erLU.)30 b(The)h(computational)g
+(routines)f(can)h(only)g(handle)e(column-orien)m(ted)i(storage.)44
+b(Except)32 b(for)f(the)g(par-)0 2659 y(allel)37 b(factorization)i
+(routine)f Fu(pdgstrf)p Fw(,)h(all)e(the)i(other)g(routines)e(are)i
+(iden)m(tical)e(to)j(those)f(app)s(eared)f(in)f(the)0
+2772 y(sequen)m(tial)30 b(sup)s(erlu.)136 2984 y Fq(\017)46
+b Fu(pdgstrf)p Fw(:)39 b(F)-8 b(actorize)32 b(\(in)e(parallel\).)227
+3134 y(This)h(implemen)m(ts)f(the)j(\014rst-time)e(factorization,)j(or)
+e(later)g(re-factorization)h(with)e(the)h(same)h(nonzero)227
+3247 y(pattern.)56 b(In)35 b(re-factorizations,)i(the)f(co)s(de)g(has)f
+(the)g(abilit)m(y)f(to)i(use)f(the)h(same)g(column)e(p)s(erm)m(utation)
+227 3360 y Fv(P)285 3374 y Fo(c)349 3360 y Fw(and)27
+b(ro)m(w)i(p)s(erm)m(utation)e Fv(P)1272 3374 y Fo(r)1339
+3360 y Fw(obtained)h(from)g(a)g(previous)f(factorization.)41
+b(Sev)m(eral)28 b(scalar)h(argumen)m(ts)227 3473 y(con)m(trol)d(ho)m(w)
+e(the)i Fv(LU)34 b Fw(decomp)s(osition)24 b(and)g(the)h(n)m(umerical)e
+(piv)m(oting)h(should)f(b)s(e)i(p)s(erformed.)37 b Fu(pdgstrf)227
+3586 y Fw(can)31 b(handle)e(non-square)h(matrices.)136
+3774 y Fq(\017)46 b Fu(dgstrs)p Fw(:)39 b(T)-8 b(riangular)29
+b(solv)m(e.)227 3924 y(This)e(tak)m(es)j(the)f Fv(L)f
+Fw(and)h Fv(U)38 b Fw(triangular)27 b(factors,)j(the)f(ro)m(w)g(and)f
+(column)f(p)s(erm)m(utation)h(v)m(ectors,)j(and)d(the)227
+4037 y(righ)m(t-hand)h(side)h(to)h(compute)g(a)f(solution)f(matrix)h
+Fv(X)38 b Fw(of)30 b Fv(AX)j Fw(=)25 b Fv(B)35 b Fw(or)30
+b Fv(A)2823 4004 y Fo(T)2879 4037 y Fv(X)i Fw(=)25 b
+Fv(B)5 b Fw(.)136 4224 y Fq(\017)46 b Fu(dgscon)p Fw(:)39
+b(Estimate)31 b(condition)e(n)m(um)m(b)s(er.)227 4375
+y(Giv)m(en)41 b(the)g(matrix)f Fv(A)g Fw(and)g(its)g(factors)i
+Fv(L)e Fw(and)g Fv(U)10 b Fw(,)43 b(this)d(estimates)h(the)g(condition)
+e(n)m(um)m(b)s(er)g(in)h(the)227 4488 y(one-norm)30 b(or)g(in\014nit)m
+(y-norm.)38 b(The)29 b(algorithm)g(is)g(due)g(to)i(Hager)g(and)e
+(Higham)h([16)q(],)g(and)g(is)e(the)j(same)227 4601 y(as)g
+Fu(condest)d Fw(in)h(sparse)h(Matlab.)136 4788 y Fq(\017)46
+b Fu(dgsequ/dlaqgs)p Fw(:)37 b(Equilibrate.)227 4938
+y Fu(dgsequ)31 b Fw(\014rst)h(computes)g(the)h(ro)m(w)g(and)f(column)f
+(scalings)g Fv(D)2388 4952 y Fo(r)2459 4938 y Fw(and)h
+Fv(D)2713 4952 y Fo(c)2780 4938 y Fw(whic)m(h)f(w)m(ould)h(mak)m(e)h
+(eac)m(h)h(ro)m(w)227 5051 y(and)28 b(eac)m(h)h(column)d(of)i(the)h
+(scaled)e(matrix)h Fv(D)1809 5065 y Fo(r)1847 5051 y
+Fv(AD)1990 5065 y Fo(c)2053 5051 y Fw(ha)m(v)m(e)h(equal)e(norm.)39
+b Fu(dlaqgs)27 b Fw(then)g(applies)f(them)i(to)227 5164
+y(the)j(original)f(matrix)g Fv(A)h Fw(if)f(it)h(is)f(indeed)f(badly)h
+(scaled.)42 b(The)31 b(equilibrated)d Fv(A)j Fw(o)m(v)m(erwrites)h(the)
+f(original)227 5277 y Fv(A)p Fw(.)1905 5778 y(40)p eop
+%%Page: 41 42
+41 41 bop 136 280 a Fq(\017)46 b Fu(dgsrfs)p Fw(:)39
+b(Re\014ne)30 b(solution.)227 431 y(Giv)m(en)g Fv(A)p
+Fw(,)h(its)f(factors)h Fv(L)f Fw(and)f Fv(U)10 b Fw(,)31
+b(and)e(an)h(initial)e(solution)h Fv(X)7 b Fw(,)30 b(this)g(do)s(es)f
+(iterativ)m(e)i(re\014nemen)m(t,)f(using)227 544 y(the)k(same)f
+(precision)e(as)j(the)f(input)e(data.)50 b(It)33 b(also)g(computes)h
+(forw)m(ard)e(and)h(bac)m(kw)m(ard)g(error)g(b)s(ounds)227
+656 y(for)d(the)h(re\014ned)e(solution.)0 943 y Fr(3.4)135
+b(Installation)0 1149 y Fm(3.4.1)112 b(File)37 b(structure)0
+1321 y Fw(The)30 b(top)g(lev)m(el)h(Sup)s(erLU)p 918
+1321 28 4 v 30 w(MT/)g(directory)f(is)f(structured)h(as)g(follo)m(ws:)
+191 1508 y Fu(SuperLU_MT/README)186 b(instructions)45
+b(on)i(installation)191 1621 y(SuperLU_MT/CBLAS/)186
+b(needed)46 b(BLAS)h(routines)e(in)j(C,)f(not)g(necessarily)d(fast)191
+1734 y(SuperLU_MT/EXAMPLE/)90 b(example)46 b(programs)191
+1847 y(SuperLU_MT/INSTALL/)90 b(test)47 b(machine)f(dependent)f
+(parameters;)g(the)i(Users')f(Guide)191 1960 y(SuperLU_MT/SRC/)282
+b(C)48 b(source)e(code,)g(to)h(be)g(compiled)f(into)h(superlu_mt.a)d
+(library)191 2073 y(SuperLU_MT/TESTING/)90 b(driver)46
+b(routines)g(to)h(test)g(correctness)191 2186 y(SuperLU_MT/Makefile)90
+b(top)47 b(level)f(Makefile)g(that)h(does)f(installation)f(and)i
+(testing)191 2299 y(SuperLU_MT/make.inc)90 b(compiler,)45
+b(compile)h(flags,)g(library)g(definitions)f(and)i(C)1193
+2412 y(preprocessor)e(definitions,)f(included)i(in)h(all)g(Makefiles.)
+141 2599 y Fw(W)-8 b(e)27 b(ha)m(v)m(e)f(p)s(orted)f(the)h(parallel)d
+(programs)j(to)g(a)g(n)m(um)m(b)s(er)e(of)h(platforms,)h(whic)m(h)e
+(are)i(re\015ected)g(in)e(the)i(mak)m(e)0 2712 y(include)37
+b(\014les)h(pro)m(vided)f(in)h(the)h(top)g(lev)m(el)g(directory)-8
+b(,)41 b(for)e(example,)i Fu(make.sun,)k(make.sgi,)g(make.cray)0
+2825 y(and)i(make.pthreads)p Fw(.)c(If)33 b(y)m(ou)f(are)h(using)e(one)
+i(of)g(these)g(mac)m(hines,)g(suc)m(h)f(as)h(a)g(Sun,)e(y)m(ou)i(can)g
+(simply)d(cop)m(y)0 2938 y Fu(make.sun)h Fw(in)m(to)j
+Fu(make.inc)d Fw(b)s(efore)i(compiling.)48 b(If)33 b(y)m(ou)h(are)g
+(not)g(using)e(an)m(y)i(of)f(the)h(mac)m(hines)f(to)h(whic)m(h)e(w)m(e)
+0 3051 y(ha)m(v)m(e)g(p)s(orted,)e(y)m(ou)g(will)e(need)i(to)h(read)f
+(section)h(3.6)g(ab)s(out)g(the)f(p)s(orting)f(instructions.)141
+3164 y(The)e(rest)g(of)h(the)f(installation)f(and)g(testing)i(pro)s
+(cedure)e(is)g(similar)f(to)j(that)g(describ)s(ed)d(in)h(section)h
+(2.10)i(for)0 3277 y(the)36 b(serial)e(Sup)s(erLU.)g(Then,)i(y)m(ou)g
+(can)g(t)m(yp)s(e)g Fu(make)f Fw(at)h(the)g(top)g(lev)m(el)f(directory)
+h(to)g(\014nish)d(installation.)55 b(In)0 3390 y(the)31
+b Fu(SuperLU)p 499 3390 29 4 v 32 w(MT/TESTING)d Fw(sub)s(directory)-8
+b(,)29 b(y)m(ou)h(can)h(t)m(yp)s(e)f Fu(pdtest.csh)e
+Fw(to)j(p)s(erform)e(testings.)0 3633 y Fm(3.4.2)112
+b(P)m(erformance)37 b(issues)0 3805 y Fx(Memory)e(managemen)m(t)d(for)j
+Fv(L)g Fx(and)g Fv(U)0 3976 y Fw(In)29 b(the)h(sequen)m(tial)g(Sup)s
+(erLU,)e(four)h(data)i(arra)m(ys)f(asso)s(ciated)h(with)d(the)i
+Fv(L)g Fw(and)f Fv(U)40 b Fw(factors)31 b(can)f(b)s(e)g(expanded)0
+4089 y(dynamically)-8 b(,)31 b(as)i(describ)s(ed)d(in)h(section)i(2.7.)
+48 b(In)32 b(the)g(parallel)f(co)s(de,)i(the)g(expansion)e(is)g(hard)h
+(and)g(costly)g(to)0 4202 y(implemen)m(t,)26 b(b)s(ecause)h(when)f(a)h
+(pro)s(cess)f(detects)i(that)f(an)f(arra)m(y)i(b)s(ound)c(is)i
+(exceeded,)i(it)f(has)f(to)h(send)f(a)h(signal)0 4315
+y(to)k(and)e(susp)s(end)e(the)j(execution)g(of)g(the)g(other)g(pro)s
+(cesses.)40 b(Then)29 b(the)h(detecting)g(pro)s(cess)g(can)g(pro)s
+(ceed)f(with)0 4428 y(the)i(arra)m(y)f(expansion.)40
+b(After)31 b(the)f(expansion,)g(this)f(pro)s(cess)h(m)m(ust)g(w)m(ak)m
+(e)i(up)d(all)g(the)i(susp)s(ended)d(pro)s(cesses.)141
+4541 y(In)20 b(this)g(release)i(of)f(the)g(parallel)f(co)s(de,)j(w)m(e)
+e(ha)m(v)m(e)i(not)e(y)m(et)h(implemen)m(ted)e(the)h(ab)s(o)m(v)m(e)h
+(expansion)e(mec)m(hanism.)0 4654 y(F)-8 b(or)38 b(no)m(w,)i(the)e
+(user)e(m)m(ust)i(pre-determine)e(an)i(estimated)f(size)h(for)f(eac)m
+(h)i(of)f(the)f(four)g(arra)m(ys)h(through)f(the)0 4767
+y(inquiry)e(function)i Fu(sp)p 787 4767 V 34 w(ienv\(\))p
+Fw(.)62 b(There)38 b(are)g(t)m(w)m(o)i(in)m(terpretations)d(for)h(eac)m
+(h)h(in)m(teger)g(v)-5 b(alue)37 b Fu(FILL)g Fw(returned)0
+4880 y(b)m(y)e(calling)e(this)h(function)g(with)f Fu(ispec)47
+b(=)g(6,)g(7,)h(or)f(8)p Fw(.)54 b(A)35 b(negativ)m(e)h(n)m(um)m(b)s
+(er)e(is)g(in)m(terpreted)g(as)h(the)g(\014lls)0 4993
+y(gro)m(wth)g(factor,)h(that)f(is,)f(the)g(program)g(will)e(allo)s
+(cate)i Fu(\(-FILL\)*nnz\(A\))c Fw(elemen)m(ts)35 b(for)f(the)g
+(corresp)s(onding)0 5105 y(arra)m(y)-8 b(.)42 b(A)30
+b(p)s(ositiv)m(e)f(n)m(um)m(b)s(er)g(is)h(in)m(terpreted)f(as)i(the)f
+(true)g(amoun)m(t)h(the)g(user)e(w)m(an)m(ts)i(to)g(allo)s(cate,)g
+(that)g(is,)f(the)0 5218 y(program)24 b(will)e(allo)s(cate)k
+Fu(FILL)d Fw(elemen)m(ts)i(for)f(the)h(corresp)s(onding)e(arra)m(y)-8
+b(.)40 b(In)24 b(b)s(oth)g(cases,)j(if)c(the)i(initial)d(request)0
+5331 y(exceeds)38 b(the)e(ph)m(ysical)g(memory)g(constrain)m(t,)j(the)e
+(sizes)f(of)h(the)g(arra)m(ys)g(are)g(rep)s(eatedly)f(reduced)g(un)m
+(til)f(the)0 5444 y(initial)28 b(allo)s(cation)h(succeeds.)1905
+5778 y(41)p eop
+%%Page: 42 43
+42 42 bop 141 280 a Fu(int)47 b(sp)p 434 280 29 4 v 34
+w(ienv\(int)e(ispec\);)141 453 y(Ispec)29 b Fw(sp)s(eci\014es)g(the)i
+(parameter)g(to)g(b)s(e)e(returned:)318 637 y(isp)s(ec)d(=)k
+Fv(:)15 b(:)g(:)540 750 y Fw(=)30 b(6:)42 b(size)30 b(of)g(the)h(arra)m
+(y)g(to)g(store)g(the)f(v)-5 b(alues)30 b(of)h(the)f
+Fv(L)g Fw(sup)s(erno)s(des)e(\()p Fu(nzval)p Fw(\))540
+863 y(=)i(7:)42 b(size)30 b(of)g(the)h(arra)m(y)g(to)g(store)g(the)f
+(columns)f(in)g(U)i(\()p Fu(nzval/rowind)p Fw(\))540
+976 y(=)f(8:)42 b(size)30 b(of)g(the)h(arra)m(y)g(to)g(store)g(the)f
+(subscripts)e(of)j(the)f Fv(L)h Fw(sup)s(erno)s(des)d(\()p
+Fu(rowind)p Fw(\);)141 1159 y(If)38 b(the)h(actual)g(\014ll)d(exceeds)j
+(an)m(y)g(arra)m(y)g(size,)i(the)d(program)h(will)c(ab)s(ort)k(with)e
+(a)i(message)g(sho)m(wing)f(the)0 1272 y(curren)m(t)45
+b(column)f(when)g(failure)f(o)s(ccurs,)48 b(and)d(indicating)e(ho)m(w)i
+(man)m(y)g(elemen)m(ts)g(are)g(needed)g(up)f(to)i(the)0
+1385 y(curren)m(t)40 b(column.)69 b(The)40 b(user)f(ma)m(y)i(reset)g(a)
+g(larger)f(\014ll)e(parameter)i(for)g(this)g(arra)m(y)g(and)g(then)g
+(restart)h(the)0 1498 y(program.)141 1611 y(T)-8 b(o)41
+b(mak)m(e)g(the)g(storage)g(allo)s(cation)f(more)g(e\016cien)m(t)h(for)
+f(the)g(sup)s(erno)s(des)e(in)h Fv(L)p Fw(,)k(w)m(e)e(devised)e(a)h(sp)
+s(ecial)0 1724 y(storage)34 b(sc)m(heme.)47 b(The)32
+b(need)g(for)g(this)f(sp)s(ecial)g(treatmen)m(t)j(and)e(ho)m(w)g(w)m(e)
+h(implemen)m(t)e(it)h(are)h(fully)d(explained)0 1837
+y(and)23 b(studied)e(in)h([6)q(,)h(21)q(].)39 b(Here,)25
+b(w)m(e)f(only)f(sk)m(etc)m(h)h(the)g(main)e(idea.)38
+b(Recall)23 b(that)h(the)f(parallel)e(algorithm)i(assigns)0
+1950 y(one)39 b(panel)g(of)g(columns)f(to)h(one)h(pro)s(cess.)66
+b(Tw)m(o)40 b(consecutiv)m(e)g(panels)e(ma)m(y)h(b)s(e)g(assigned)f(to)
+i(t)m(w)m(o)g(di\013eren)m(t)0 2062 y(pro)s(cesses,)28
+b(ev)m(en)g(though)f(they)h(ma)m(y)g(b)s(elong)e(to)i(the)g(same)f(sup)
+s(erno)s(de)e(disco)m(v)m(ered)j(later.)40 b(Moreo)m(v)m(er,)30
+b(a)e(third)0 2175 y(panel)33 b(ma)m(y)h(b)s(e)f(\014nished)e(b)m(y)i
+(a)h(third)e(pro)s(cess)h(and)g(put)g(in)f(memory)i(b)s(et)m(w)m(een)g
+(these)g(t)m(w)m(o)h(panels,)f(resulting)0 2288 y(in)c(the)i(columns)f
+(of)h(a)g(sup)s(erno)s(de)d(b)s(eing)h(noncon)m(tiguous)i(in)e(memory)
+-8 b(.)45 b(This)30 b(is)h(undesirable,)f(b)s(ecause)h(then)0
+2401 y(w)m(e)h(cannot)g(directly)f(call)f(BLAS)i(routines)e(using)g
+(this)h(sup)s(erno)s(de)e(unless)h(w)m(e)i(pa)m(y)g(the)g(cost)g(of)g
+(cop)m(ying)g(the)0 2514 y(columns)22 b(in)m(to)i(con)m(tiguous)f
+(memory)h(\014rst.)37 b(T)-8 b(o)24 b(o)m(v)m(ercome)i(this)c(problem,)
+i(w)m(e)g(exploited)e(the)i(observ)-5 b(ation)23 b(that)0
+2627 y(the)j(nonzero)h(structure)e(for)h Fv(L)g Fw(is)f(con)m(tained)h
+(in)f(that)h(of)h(the)f(Householder)f(matrix)g Fv(H)33
+b Fw(from)26 b(the)g(Householder)0 2740 y(sparse)h Fv(QR)i
+Fw(transformation)e([11)q(,)h(12)q(].)40 b(F)-8 b(urthermore,)28
+b(it)f(can)h(b)s(e)f(sho)m(wn)g(that)i(a)f(fundamen)m(tal)e(sup)s(erno)
+s(de)g(of)0 2853 y Fv(L)j Fw(is)g(alw)m(a)m(ys)h(con)m(tained)g(in)e(a)
+i(fundamen)m(tal)f(sup)s(erno)s(de)e(of)j Fv(H)7 b Fw(.)40
+b(This)28 b(con)m(tainmen)m(t)j(prop)s(ert)m(y)e(is)f(true)i(for)f(for)
+0 2966 y(an)m(y)d(ro)m(w)g(p)s(erm)m(utation)g Fv(P)912
+2980 y Fo(r)976 2966 y Fw(in)e Fv(P)1135 2980 y Fo(r)1174
+2966 y Fv(A)h Fw(=)g Fv(LU)10 b Fw(.)39 b(Therefore,)27
+b(w)m(e)g(can)f(pre-allo)s(cate)g(storage)i(for)d(the)i
+Fv(L)e Fw(sup)s(erno)s(des)0 3079 y(based)30 b(on)g(the)g(size)g(of)g
+Fv(H)37 b Fw(sup)s(erno)s(des.)h(F)-8 b(ortunately)g(,)31
+b(there)g(exists)e(a)i(fast)f(algorithm)f(\(almost)i(linear)d(in)h(the)
+0 3192 y(n)m(um)m(b)s(er)g(of)i(nonzeros)f(of)h Fv(A)p
+Fw(\))f(to)i(compute)e(the)h(size)f(of)h Fv(H)37 b Fw(and)30
+b(the)g(sup)s(erno)s(des)e(partition)h(in)g Fv(H)37 b
+Fw([13)r(].)141 3304 y(In)g(practice,)j(the)e(ab)s(o)m(v)m(e)h(static)f
+(prediction)e(is)h(fairly)f(tigh)m(t)i(for)f(most)h(problems.)61
+b(Ho)m(w)m(ev)m(er,)42 b(for)c(some)0 3417 y(others,)44
+b(the)d(n)m(um)m(b)s(er)e(of)i(nonzeros)g(in)e Fv(H)48
+b Fw(greatly)41 b(exceeds)g(the)g(n)m(um)m(b)s(er)f(of)g(nonzeros)h(in)
+f Fv(L)p Fw(.)71 b(T)-8 b(o)41 b(handle)0 3530 y(this)f(situation,)i(w)
+m(e)g(implemen)m(ted)d(an)i(algorithm)e(that)j(still)c(uses)j(the)g
+(sup)s(erno)s(des)d(partition)i(in)f Fv(H)7 b Fw(,)44
+b(but)0 3643 y(dynamically)33 b(searc)m(hes)j(the)f(sup)s(erno)s(dal)d
+(graph)i(of)h Fv(L)g Fw(to)h(obtain)e(a)i(m)m(uc)m(h)f(tigh)m(ter)g(b)s
+(ound)e(for)i(the)g(storage.)0 3756 y(T)-8 b(able)30
+b(6)h(in)e([6)q(])h(demonstrates)h(the)f(storage)i(e\016ciency)f(ac)m
+(hiev)m(ed)g(b)m(y)f(b)s(oth)g(static)h(and)f(dynamic)f(approac)m(h.)
+141 3869 y(In)k(summary)-8 b(,)34 b(our)f(program)g(tries)g(to)h(use)f
+(the)h(static)g(prediction)e(\014rst)g(for)i(the)f Fv(L)h
+Fw(sup)s(erno)s(des.)47 b(In)33 b(this)0 3982 y(case,)41
+b(w)m(e)e(ignore)e(the)h(in)m(teger)h(v)-5 b(alue)37
+b(giv)m(en)h(in)f(the)h(function)f Fu(sp)p 2353 3982
+V 34 w(ienv\(6\))p Fw(,)h(and)f(simply)f(use)h(the)i(nonzero)0
+4095 y(coun)m(t)32 b(of)g Fv(H)7 b Fw(.)44 b(If)31 b(the)g(user)g
+(\014nds)f(that)i(the)f(size)h(of)f Fv(H)39 b Fw(is)30
+b(to)s(o)i(large,)h(he)e(can)h(in)m(v)m(ok)m(e)g(the)g(dynamic)e
+(algorithm)0 4208 y(at)h(run)m(time)e(b)m(y)i(setting)f(the)h(follo)m
+(wing)d(UNIX)j(shell)e(en)m(vironmen)m(t)h(v)-5 b(ariable:)141
+4381 y Fu(setenv)46 b(SuperLU)p 817 4381 V 33 w(DYNAMIC)p
+1186 4381 V 32 w(SNODE)p 1458 4381 V 33 w(STORE)g(1)0
+4554 y Fw(The)35 b(dynamic)g(algorithm)g(incurs)f(run)m(time)h(o)m(v)m
+(erhead.)59 b(F)-8 b(or)36 b(example,)i(this)c(o)m(v)m(erhead)k(is)d
+(usually)e(b)s(et)m(w)m(een)0 4666 y(2\045)e(and)e(15\045)i(on)g(a)f
+(single)f(pro)s(cessor)h(RS/6000-590)k(for)c(a)h(range)g(of)f(test)h
+(matrices.)0 4906 y Fx(Symmetric)i(structure)j(pruning)0
+5077 y Fw(In)24 b(b)s(oth)g(serial)g(and)g(parallel)f(algorithms,)i(w)m
+(e)g(ha)m(v)m(e)h(implemen)m(ted)d(Eisenstat)i(and)f(Liu's)g(symmetric)
+g(pruning)0 5190 y(idea)d(of)g(represen)m(ting)g(the)g(graph)g
+Fv(G)p Fw(\()p Fv(L)1346 5157 y Fo(T)1402 5190 y Fw(\))g(b)m(y)g(a)h
+(reduced)f(graph)f Fv(G)2291 5157 y Fn(0)2315 5190 y
+Fw(,)j(and)e(thereb)m(y)g(reducing)f(the)i(DFS)f(tra)m(v)m(ersal)0
+5303 y(time.)40 b(A)31 b(subtle)e(di\016cult)m(y)g(arises)h(in)f(the)h
+(parallel)f(implemen)m(tation.)141 5416 y(When)44 b(the)h(o)m(wning)e
+(pro)s(cess)h(of)h(a)g(panel)e(starts)i(DFS)f(\(depth-\014rst)g(searc)m
+(h\))h(on)g Fv(G)3233 5383 y Fn(0)3301 5416 y Fw(built)d(so)i(far,)k
+(it)0 5529 y(only)39 b(sees)h(the)g(partial)f(graph,)j(b)s(ecause)e
+(the)g(part)g(of)g Fv(G)2068 5496 y Fn(0)2131 5529 y
+Fw(corresp)s(onding)e(to)j(the)f(busy)f(panels)f(do)m(wn)i(the)1905
+5778 y(42)p eop
+%%Page: 43 44
+43 43 bop 0 280 a Fw(elimination)39 b(tree)k(is)e(not)i(y)m(et)g
+(complete.)76 b(So)42 b(the)g(structural)f(prediction)f(at)j(this)e
+(stage)i(can)g(miss)e(some)0 393 y(nonzeros.)67 b(After)40
+b(p)s(erforming)d(the)i(up)s(dates)f(from)h(the)g(\014nished)e(sup)s
+(erno)s(des,)i(the)h(pro)s(cess)e(will)f(w)m(ait)i(for)0
+506 y(all)f(the)i(busy)e(descendan)m(t)i(panels)e(to)j(\014nish)c(and)h
+(p)s(erform)g(more)i(up)s(dates)e(from)h(them.)68 b(No)m(w,)43
+b(w)m(e)d(mak)m(e)0 619 y(a)d(conserv)-5 b(ativ)m(e)37
+b(assumption)e(that)j(all)d(these)i(busy)e(panels)h(will)e(up)s(date)h
+(the)i(curren)m(t)f(panel)g(so)h(that)g(their)0 732 y(nonzero)31
+b(structures)e(are)i(included)d(in)h(the)h(curren)m(t)h(panel.)141
+845 y(This)i(appro)m(ximate)i(sc)m(heme)g(w)m(orks)g(\014ne)f(for)g
+(most)h(problems.)51 b(Ho)m(w)m(ev)m(er,)38 b(w)m(e)d(found)f(that)h
+(this)e(conser-)0 958 y(v)-5 b(atism)29 b(ma)m(y)g(sometimes)g(cause)h
+(a)f(large)h(n)m(um)m(b)s(er)d(of)j(structural)d(zeros)j(\(they)g(are)f
+(related)g(to)h(the)f(sup)s(erno)s(de)0 1071 y(amalgamation)36
+b(p)s(erformed)e(at)i(the)g(b)s(ottom)f(of)h(the)g(elimination)c
+(tree\))37 b(to)f(b)s(e)f(included)e(and)h(they)i(in)e(turn)0
+1184 y(are)d(propagated)g(through)e(the)i(rest)g(of)f(the)h
+(factorization.)141 1297 y(W)-8 b(e)31 b(ha)m(v)m(e)g(implemen)m(ted)d
+(an)i(exact)h(structural)e(prediction)f(sc)m(heme)j(to)f(o)m(v)m
+(ercome)i(this)d(problem.)39 b(In)29 b(this)0 1409 y(sc)m(heme,)40
+b(when)35 b(eac)m(h)k(n)m(umerical)c(nonzero)i(is)f(scattered)i(in)m
+(to)f(the)g(sparse)g(accum)m(ulator)g(arra)m(y)-8 b(,)40
+b(w)m(e)d(set)h(the)0 1522 y(o)s(ccupied)27 b(\015ag)i(as)f(w)m(ell.)39
+b(Later)29 b(when)e(w)m(e)i(accum)m(ulate)g(the)f(up)s(dates)f(from)h
+(the)g(busy)f(descendan)m(t)i(panels,)e(w)m(e)0 1635
+y(c)m(hec)m(k)h(the)f(o)s(ccupied)e(\015ags)h(to)i(determine)d(the)i
+(exact)g(nonzero)g(structure.)39 b(This)25 b(sc)m(heme)i(a)m(v)m(oids)g
+(unnecessary)0 1748 y(zero)35 b(propagation)f(at)g(the)g(exp)s(ense)g
+(of)g(run)m(time)f(o)m(v)m(erhead,)j(b)s(ecause)e(setting)g(the)g(o)s
+(ccupied)f(\015ags)h(m)m(ust)g(b)s(e)0 1861 y(done)c(in)f(the)i(inner)d
+(lo)s(op)i(of)g(the)h(n)m(umeric)e(up)s(dates.)141 1974
+y(W)-8 b(e)36 b(recommend)e(that)h(the)f(user)g(use)g(the)h(appro)m
+(ximate)f(sc)m(heme)h(\(b)m(y)g(default\))f(\014rst.)52
+b(If)33 b(the)i(user)f(\014nds)0 2087 y(that)i(the)f(amoun)m(t)h(of)f
+(\014ll)e(from)i(the)g(parallel)e(factorization)j(is)e(substan)m
+(tially)f(greater)k(than)d(that)i(from)f(the)0 2200 y(sequen)m(tial)f
+(factorization,)j(he)e(can)h(then)e(use)h(the)g(accurate)i(sc)m(heme.)
+55 b(T)-8 b(o)35 b(in)m(v)m(ok)m(e)h(the)g(second)f(sc)m(heme,)i(the)0
+2313 y(user)30 b(should)e(recompile)h(the)i(co)s(de)g(b)m(y)f
+(de\014ning)e(the)j(macro:)141 2486 y Fu(-D)47 b(SCATTER)p
+626 2486 29 4 v 33 w(FOUND)0 2659 y Fw(for)30 b(the)h(C)f(prepro)s
+(cessor.)0 2893 y Fx(The)35 b(inquiry)g(function)h Fu(sp)p
+1088 2893 V 33 w(ienv\(\))0 3064 y Fw(F)-8 b(or)37 b(some)f(user)g(con)
+m(trollable)f(constan)m(ts,)k(suc)m(h)d(as)g(the)h(blo)s(c)m(king)e
+(parameters)h(and)g(the)g(size)g(of)g(the)h(global)0
+3177 y(storage)h(for)e Fv(L)g Fw(and)g Fv(U)10 b Fw(,)38
+b(Sup)s(erLU)p 1243 3177 28 4 v 31 w(MT)e(calls)g(the)g(inquiry)e
+(function)h Fu(sp)p 2609 3177 29 4 v 33 w(ienv\(\))g
+Fw(to)i(retriev)m(e)g(their)e(v)-5 b(alues.)0 3290 y(The)30
+b(declaration)g(of)g(this)g(function)f(is)141 3463 y
+Fu(int)47 b(sp)p 434 3463 V 34 w(ienv\(int)e(ispec\).)141
+3636 y Fw(The)30 b(full)e(meanings)i(of)g(the)h(returned)e(v)-5
+b(alues)30 b(are)g(as)h(follo)m(ws:)318 3792 y(isp)s(ec)26
+b(=)k(1:)42 b(the)30 b(panel)g(size)g Fv(w)540 3905 y
+Fw(=)g(2:)42 b(the)30 b(relaxation)g(parameter)h(to)g(con)m(trol)g(sup)
+s(erno)s(de)d(amalgamation)j(\()p Fv(r)s(el)r(ax)p Fw(\))540
+4018 y(=)f(3:)42 b(the)30 b(maxim)m(um)f(allo)m(w)m(able)h(size)g(for)h
+(a)f(sup)s(erno)s(de)e(\()p Fv(maxsup)p Fw(\))540 4131
+y(=)i(4:)42 b(the)30 b(minim)m(um)e(ro)m(w)i(dimension)e(for)i(2D)h
+(blo)s(c)m(king)e(to)j(b)s(e)d(used)h(\()p Fv(r)s(ow)r(bl)r(k)s
+Fw(\))540 4244 y(=)g(5:)42 b(the)30 b(minim)m(um)e(column)h(dimension)f
+(for)i(2D)h(blo)s(c)m(king)e(to)i(b)s(e)f(used)g(\()p
+Fv(col)r(bl)r(k)s Fw(\))540 4357 y(=)g(6:)42 b(size)30
+b(of)g(the)h(arra)m(y)g(to)g(store)g(the)f(v)-5 b(alues)30
+b(of)h(the)f(L)g(sup)s(erno)s(des)e(\()p Fv(nz)t(v)s(al)r
+Fw(\))540 4470 y(=)i(7:)42 b(size)30 b(of)g(the)h(arra)m(y)g(to)g
+(store)g(the)f(columns)f(in)g(U)i(\()p Fv(nz)t(v)s(al)r(=r)s(ow)r(ind)p
+Fw(\))540 4583 y(=)f(8:)42 b(size)30 b(of)g(the)h(arra)m(y)g(to)g
+(store)g(the)f(subscripts)e(of)j(the)f(L)h(sup)s(erno)s(des)d(\()p
+Fv(r)s(ow)r(ind)p Fw(\))141 4739 y(W)-8 b(e)22 b(should)d(tak)m(e)k(in)
+m(to)e(accoun)m(t)h(the)g(trade-o\013)g(b)s(et)m(w)m(een)f(cac)m(he)i
+(reuse)e(and)f(amoun)m(t)i(of)f(parallelism)d(in)h(order)0
+4852 y(to)k(set)g(the)g(appropriate)e Fv(w)k Fw(and)d
+Fv(maxsup)p Fw(.)37 b(Since)21 b(the)i(parallel)d(algorithm)i(assigns)f
+(one)i(panel)e(factorization)i(to)0 4965 y(one)f(pro)s(cess,)i(large)e
+(v)-5 b(alues)21 b(ma)m(y)h(constrain)g(concurrency)-8
+b(,)24 b(ev)m(en)e(though)g(they)g(ma)m(y)g(b)s(e)g(go)s(o)s(d)f(for)h
+(unipro)s(cessor)0 5077 y(p)s(erformance.)39 b(W)-8 b(e)30
+b(recommend)e(that)h Fv(w)h Fw(and)e Fv(maxsup)g Fw(b)s(e)f(set)i(a)g
+(bit)e(smaller)g(than)h(the)g(b)s(est)g(v)-5 b(alues)28
+b(used)f(in)0 5190 y(the)k(sequen)m(tial)e(co)s(de.)141
+5303 y(The)j(settings)h(for)g(parameters)g(2,)h(4)f(and)f(5)h(are)h
+(the)f(same)g(as)g(those)g(describ)s(ed)e(in)g(section)i(2.10.3.)50
+b(The)0 5416 y(settings)30 b(for)g(parameters)h(6,)g(7)g(and)f(8)g(are)
+h(discussed)e(in)g(section)h(3.4.2.)141 5529 y(In)c(the)h(\014le)f
+Fu(SRC/sp)p 841 5529 V 32 w(ienv.c)p Fw(,)g(w)m(e)h(pro)m(vide)f
+(sample)g(settings)h(of)g(these)g(parameters)g(for)f(sev)m(eral)h(mac)m
+(hines.)1905 5778 y(43)p eop
+%%Page: 44 45
+44 44 bop 169 292 3562 4 v 167 405 4 113 v 844 405 V
+2158 405 V 2209 371 a Fw(Programming)p 2845 405 V 144
+w(En)m(vironmen)m(t)p 3729 405 V 167 518 V 219 484 a(mak)m(e.inc)p
+844 518 V 328 w(Platforms)p 2158 518 V 925 w(Mo)s(del)p
+2845 518 V 439 w(V)-8 b(ariable)p 3729 518 V 169 521
+3562 4 v 167 634 4 113 v 219 600 a(mak)m(e.pthreads)p
+844 634 V 100 w(Mac)m(hines)31 b(with)e(POSIX)g(threads)p
+2158 634 V 99 w(pthreads)p 2845 634 V 3729 634 V 167
+747 V 219 713 a(mak)m(e.sun)p 844 747 V 307 w(Sun)g(Ultra)h(En)m
+(terprise)p 2158 747 V 482 w(Solaris)f(threads)p 2845
+747 V 3729 747 V 167 860 V 219 826 a(mak)m(e.alpha)p
+844 860 V 227 w(DEC)h(Alpha)g(Serv)m(ers)p 2158 860 V
+532 w(DECthreads)p 2845 860 V 3729 860 V 167 973 V 219
+939 a(mak)m(e.sgi)p 844 973 V 338 w(SGI)g(P)m(o)m(w)m(er)i(Challenge)p
+2158 973 V 467 w(parallel)d(C)p 2845 973 V 297 w Fu(MPC)p
+3046 939 29 4 v 34 w(NUM)p 3224 939 V 33 w(THREADS)p
+3729 973 4 113 v 167 1086 V 219 1052 a Fw(mak)m(e.origin)p
+844 1086 V 216 w(SGI/Cra)m(y)i(Origin2000)p 2158 1086
+V 456 w(parallel)e(C)p 2845 1086 V 297 w Fu(MP)p 2998
+1052 29 4 v 34 w(SET)p 3176 1052 V 34 w(NUMTHREADS)p
+3729 1086 4 113 v 167 1199 V 219 1165 a Fw(mak)m(e.cra)m(y)p
+844 1199 V 279 w(Cra)m(y)i(C90/J90)p 2158 1199 V 753
+w(microtasking)p 2845 1199 V 178 w Fu(NCPUS)p 3729 1199
+V 169 1202 3562 4 v 829 1396 a Fw(T)-8 b(able)30 b(3.2:)42
+b(Platforms)30 b(on)g(whic)m(h)f(Sup)s(erLU)p 2428 1396
+28 4 v 31 w(MT)h(w)m(as)h(tested.)0 1671 y Fr(3.5)135
+b(Example)46 b(programs)0 1874 y Fw(In)c(the)g Fu(SuperLU)p
+636 1874 29 4 v 33 w(MT/EXAMPLE/)d Fw(sub)s(directory)-8
+b(,)44 b(w)m(e)e(presen)m(t)h(a)g(few)f(sample)f(programs)h(to)h
+(illustrate)e(the)0 1987 y(complete)30 b(calling)f(sequences)h(to)g
+(use)g(the)f(simple)f(and)h(exp)s(ert)h(driv)m(ers)e(to)j(solv)m(e)f
+(systems)g(of)g(equations.)40 b(Ex-)0 2100 y(amples)25
+b(are)h(also)g(giv)m(en)g(to)h(illustrate)d(ho)m(w)i(to)g(p)s(erform)f
+(a)h(sequence)g(of)g(factorizations)h(for)e(the)h(matrices)g(with)0
+2213 y(the)33 b(same)h(sparsit)m(y)e(pattern,)i(and)e(ho)m(w)h(Sup)s
+(erLU)p 1817 2213 28 4 v 31 w(MT)g(can)g(b)s(e)g(in)m(tegrated)g(in)m
+(to)g(the)g(other)h(m)m(ultithreaded)0 2326 y(application)c(suc)m(h)i
+(that)g(threads)g(are)g(created)h(only)e(once.)46 b(A)32
+b Fu(Makefile)d Fw(is)i(pro)m(vided)g(to)h(generate)i(the)e(exe-)0
+2439 y(cutables.)45 b(A)32 b Fu(README)e Fw(\014le)h(in)g(this)g
+(directory)g(sho)m(ws)h(ho)m(w)g(to)g(run)f(these)h(examples.)45
+b(The)31 b(leading)g(commen)m(t)0 2551 y(in)e(eac)m(h)j(routine)d
+(describ)s(es)g(the)h(functionalit)m(y)f(of)i(the)f(example.)0
+2838 y Fr(3.6)135 b(P)l(orting)46 b(to)g(other)f(platforms)0
+3041 y Fw(W)-8 b(e)32 b(ha)m(v)m(e)g(pro)m(vided)d(the)i(parallel)d(in)
+m(terfaces)k(for)e(a)h(n)m(um)m(b)s(er)e(of)i(shared)f(memory)g(mac)m
+(hines.)41 b(T)-8 b(able)31 b(3.2)g(lists)0 3154 y(the)37
+b(platforms)e(on)h(whic)m(h)f(w)m(e)i(ha)m(v)m(e)h(tested)f(the)f
+(library)-8 b(,)36 b(and)g(the)h(resp)s(ectiv)m(e)f Fu(make.inc)e
+Fw(\014les.)58 b(The)36 b(most)0 3267 y(p)s(ortable)e(in)m(terface)h
+(for)f(shared)g(memory)h(programming)f(is)f(POSIX)h(threads)g([29)r(],)
+i(since)e(no)m(w)m(ada)m(ys)i(man)m(y)0 3380 y(commercial)28
+b(UNIX)h(op)s(erating)g(systems)f(ha)m(v)m(e)i(supp)s(ort)d(for)i(it.)
+39 b(W)-8 b(e)30 b(call)e(our)g(POSIX)g(threads)g(in)m(terface)i(the)0
+3492 y Fu(Pthreads)j Fw(in)m(terface.)55 b(T)-8 b(o)35
+b(use)g(this)f(in)m(terface,)j(y)m(ou)e(can)g(cop)m(y)h
+Fu(make.pthreads)31 b Fw(in)m(to)k Fu(make.inc)e Fw(and)h(then)0
+3605 y(compile)f(the)i(library)-8 b(.)50 b(In)34 b(the)g(last)h(column)
+e(of)h(T)-8 b(able)34 b(3.2,)j(w)m(e)e(list)e(the)h(run)m(time)f(en)m
+(vironmen)m(t)h(v)-5 b(ariable)33 b(to)0 3718 y(b)s(e)c(set)h(in)e
+(order)g(to)i(use)f(m)m(ultiple)e(CPUs.)40 b(F)-8 b(or)30
+b(example,)g(to)g(use)f(4)h(CPUs)e(on)i(the)f(Origin2000,)g(y)m(ou)h
+(need)f(to)0 3831 y(set)i(the)f(follo)m(wing)f(b)s(efore)h(running)e
+(the)j(program:)141 4004 y Fu(setenv)46 b(MP)p 577 4004
+29 4 v 34 w(SET)p 755 4004 V 34 w(NUMTHREADS)f(4)141
+4177 y Fw(In)22 b(the)h(source)g(co)s(de,)i(all)d(the)h(platform)f(sp)s
+(eci\014c)g(constructs)h(are)g(enclosed)g(in)e(the)i(C)g
+Fu(#ifdef)e Fw(prepro)s(cessor)0 4290 y(statemen)m(t.)53
+b(If)33 b(y)m(our)h(platform)f(is)f(di\013eren)m(t)i(from)f(an)m(y)h
+(one)g(listed)e(in)h(T)-8 b(able)33 b(3.2,)j(y)m(ou)e(need)g(to)g(go)h
+(to)f(these)0 4403 y(places)22 b(and)f(create)j(the)e(parallel)e
+(constructs)i(suitable)e(for)i(y)m(our)g(mac)m(hine.)37
+b(The)22 b(t)m(w)m(o)h(constructs,)h(concurrency)0 4516
+y(and)30 b(sync)m(hronization,)f(are)i(explained)e(in)g(the)h(follo)m
+(wing)f(t)m(w)m(o)j(subsections,)d(resp)s(ectiv)m(ely)-8
+b(.)0 4759 y Fm(3.6.1)112 b(Creating)37 b(m)m(ultiple)e(threads)0
+4931 y Fw(Righ)m(t)44 b(no)m(w,)k(only)43 b(the)h(factorization)h
+(routine)e Fu(pdgstrf)f Fw(is)h(parallelized,)i(since)e(this)g(is)g
+(the)i(most)f(time-)0 5044 y(consuming)25 b(part)i(in)e(the)h(whole)g
+(solution)f(pro)s(cess.)39 b(There)26 b(is)g(one)h(single)e(thread)h
+(of)h(con)m(trol)g(on)f(en)m(tering)h(and)0 5157 y(exiting)i
+Fu(pdgstrf)p Fw(.)39 b(Inside)28 b(this)h(routine,)g(more)i(than)e(one)
+i(thread)f(ma)m(y)g(b)s(e)g(created.)41 b(All)29 b(the)h(newly)f
+(created)0 5270 y(threads)j(b)s(egin)f(b)m(y)i(calling)e(the)i(thread)f
+(function)f Fu(pdgstrf)p 2141 5270 V 33 w(thread)f Fw(and)i(they)h(are)
+g(concurren)m(tly)f(executed)0 5382 y(on)37 b(m)m(ultiple)e(pro)s
+(cessors.)61 b(The)36 b(thread)h(function)f Fu(pdgstrf)p
+2179 5382 V 32 w(thread)g Fw(exp)s(ects)h(a)h(single)e(argumen)m(t)h
+(of)h(t)m(yp)s(e)0 5495 y Fu(void*)p Fw(,)29 b(whic)m(h)g(is)h(a)g(p)s
+(oin)m(ter)g(to)h(the)g(structure)e(con)m(taining)h(all)g(the)g(shared)
+g(data)h(ob)5 b(jects.)1905 5778 y(44)p eop
+%%Page: 45 46
+45 45 bop 449 292 3002 4 v 447 405 4 113 v 499 371 a
+Fw(Mutex)p 1059 405 V 354 w(Critical)29 b(region)p 3449
+405 V 449 408 3002 4 v 447 521 4 113 v 499 487 a Fu(ULOCK)p
+1059 521 V 371 w Fw(allo)s(cate)i(storage)h(for)e(a)h(column)e(of)i
+(matrix)e Fv(U)p 3449 521 V 447 634 V 499 600 a Fu(LLOCK)p
+1059 634 V 371 w Fw(allo)s(cate)i(storage)h(for)e(ro)m(w)h(subscripts)d
+(of)i(matrix)g Fv(L)p 3449 634 V 447 747 V 499 713 a
+Fu(LULOCK)p 1059 747 V 323 w Fw(allo)s(cate)h(storage)h(for)e(the)h(v)
+-5 b(alues)29 b(of)i(the)g(sup)s(erno)s(des)p 3449 747
+V 447 860 V 499 826 a Fu(NSUPER)p 793 826 29 4 v 33 w(LOCK)p
+1059 860 4 113 v 98 w Fw(incremen)m(t)f(sup)s(erno)s(de)e(n)m(um)m(b)s
+(er)h Fu(nsuper)p 3449 860 V 447 973 V 499 939 a(SCHED)p
+745 939 29 4 v 33 w(LOCK)p 1059 973 4 113 v 146 w Fw(in)m(v)m(ok)m(e)j
+Fu(Scheduler\(\))27 b Fw(whic)m(h)i(ma)m(y)i(up)s(date)f(global)f(task)
+i(queue)p 3449 973 V 449 976 3002 4 v 1309 1170 a(T)-8
+b(able)30 b(3.3:)42 b(Fiv)m(e)30 b(m)m(utex)h(v)-5 b(ariables.)0
+1428 y Fm(3.6.2)112 b(Use)38 b(of)g(m)m(utexes)0 1599
+y Fw(Although)c(the)g(threads)h Fu(pdgstrf)p 1237 1599
+29 4 v 32 w(thread)e Fw(execute)j(indep)s(enden)m(tly)31
+b(of)k(eac)m(h)h(other,)g(they)f(share)f(the)h(same)0
+1712 y(address)j(space)h(and)g(can)g(comm)m(unicate)g(e\016cien)m(tly)g
+(through)f(shared)g(v)-5 b(ariables.)65 b(Problems)37
+b(ma)m(y)j(arise)e(if)0 1825 y(t)m(w)m(o)32 b(threads)f(try)f(to)i
+(access)g(\(at)g(least)f(one)g(is)f(to)h(mo)s(dify\))f(the)h(shared)f
+(data)h(at)h(the)f(same)g(time.)42 b(Therefore,)0 1938
+y(w)m(e)33 b(m)m(ust)f(ensure)f(that)i(all)e(memory)h(accesses)h(to)g
+(the)g(same)f(data)h(are)f(m)m(utually)f(exclusiv)m(e.)45
+b(There)32 b(are)h(\014v)m(e)0 2051 y(critical)25 b(regions)h(in)f(the)
+h(program)h(that)f(m)m(ust)h(b)s(e)e(protected)j(b)m(y)e(m)m(utual)f
+(exclusion.)38 b(Since)25 b(w)m(e)i(w)m(an)m(t)g(to)g(allo)m(w)0
+2164 y(di\013eren)m(t)g(pro)s(cessors)g(to)i(en)m(ter)f(di\013eren)m(t)
+g(critical)e(regions)i(sim)m(ultaneously)-8 b(,)26 b(w)m(e)j(use)e
+(\014v)m(e)h(m)m(utex)g(v)-5 b(ariables)27 b(as)0 2277
+y(listed)g(in)g(T)-8 b(able)28 b(3.3.)41 b(The)28 b(user)f(should)g
+(prop)s(erly)f(initialize)f(them)k(in)e(routine)g Fu(ParallelInit)p
+Fw(,)f(and)h(destro)m(y)0 2390 y(them)j(in)f(routine)h
+Fu(ParallelFinalize)p Fw(.)36 b(Both)31 b(these)g(routines)e(are)i(in)e
+(\014le)g Fu(pxgstrf)p 3035 2390 V 33 w(synch.c)p Fw(.)1905
+5778 y(45)p eop
+%%Page: 46 47
+46 46 bop 0 903 a Fs(Chapter)65 b(4)0 1318 y Fy(Distributed)77
+b(Sup)6 b(erLU)78 b(with)f(MPI)0 1567 y(\(V)-19 b(ersion)77
+b(2.0\))0 2049 y Fr(4.1)135 b(Ab)t(out)44 b Fj(SuperLU)p
+1166 2049 37 4 v 41 w(DIST)0 2252 y Fw(In)31 b(this)g(part,)h(w)m(e)g
+(describ)s(e)e(the)i Fu(SuperLU)p 1506 2252 29 4 v 33
+w(DIST)e Fw(library)g(designed)g(for)i(distributed)d(memory)i(parallel)
+f(com-)0 2365 y(puters.)47 b(The)32 b(parallel)e(programming)i(mo)s
+(del)f(is)h(SPMD.)h(The)f(library)e(is)h(implemen)m(ted)h(in)f(ANSI)h
+(C,)g(using)0 2478 y(MPI)39 b([26)r(])g(for)h(comm)m(unication,)h(and)e
+(so)h(is)e(highly)g(p)s(ortable.)67 b(W)-8 b(e)40 b(ha)m(v)m(e)h
+(tested)g(the)e(co)s(de)h(on)f(a)h(n)m(um)m(b)s(er)0
+2590 y(of)34 b(platforms,)h(including)30 b(Cra)m(y)k(T3E,)h(IBM)f(SP)-8
+b(,)35 b(and)e(Berk)m(eley)i(NO)m(W.)g(The)f(library)d(includes)h
+(routines)h(to)0 2703 y(handle)k(b)s(oth)i(real)f(and)h(complex)f
+(matrices)h(in)f(double)f(precision.)65 b(The)38 b(parallel)f(routine)h
+(names)h(for)g(the)0 2816 y(double-precision)27 b(real)j(v)m(ersion)f
+(start)i(with)d(letters)i(\\p)s(d")g(\(suc)m(h)g(as)g
+Fu(pdgstrf)p Fw(\);)f(the)h(parallel)e(routine)h(names)0
+2929 y(for)h(double-precision)e(complex)i(v)m(ersion)g(start)g(with)g
+(letters)g(\\pz")h(\(suc)m(h)g(as)f Fu(pzgstrf)p Fw(\).)0
+3216 y Fr(4.2)135 b(F)-11 b(ormats)46 b(of)f(the)g(input)g(matrices)h
+Ff(A)e Fr(and)h Ff(B)0 3419 y Fw(W)-8 b(e)35 b(pro)m(vide)d(t)m(w)m(o)j
+(input)d(in)m(terfaces)i(for)f(matrices)g Fv(A)h Fw(and)f
+Fv(B)5 b Fw(.)50 b(One)33 b(is)f(the)i(global)f(in)m(terface,)i
+(another)e(is)g(an)0 3531 y(en)m(tirely)d(distributed)d(in)m(terface.)0
+3775 y Fm(4.2.1)112 b(Global)37 b(input)0 3947 y Fw(The)d(input)e
+(matrices)i Fv(A)g Fw(and)f Fv(B)39 b Fw(are)34 b(globally)f(a)m(v)-5
+b(ailable)33 b(\(replicated\))h(on)g(all)f(the)h(pro)s(cesses.)52
+b(The)33 b(storage)0 4059 y(t)m(yp)s(e)i(for)f Fv(A)g
+Fw(is)g Fu(SLU)p 700 4059 V 33 w(NC)p Fw(,)h(as)g(in)e(sequen)m(tial)h
+(case)i(\(see)f(Section)f(2.3\).)55 b(The)34 b(user-callable)f
+(routines)g(with)g(this)0 4172 y(in)m(terface)k(all)e(ha)m(v)m(e)j(the)
+f(names)f(\\xxxxxxx)p 1556 4172 28 4 v 33 w(ABglobal".)59
+b(If)36 b(there)h(is)e(su\016cien)m(t)h(memory)-8 b(,)39
+b(this)c(in)m(terface)i(is)0 4285 y(faster)27 b(than)g(the)g
+(distributed)d(input)h(in)m(terface)j(describ)s(ed)d(in)g(the)j(next)f
+(section,)h(b)s(ecause)f(the)g(latter)g(requires)0 4398
+y(more)k(data)g(re-distribution)c(at)k(di\013eren)m(t)f(stages)h(of)g
+(the)f(algorithm.)0 4642 y Fm(4.2.2)112 b(Distributed)36
+b(input)0 4813 y Fw(Both)e(input)d(matrices)j Fv(A)f
+Fw(and)g Fv(B)k Fw(are)d(distributed)c(among)k(all)e(the)i(pro)s
+(cesses.)49 b(They)33 b(use)g(the)g(same)h(distri-)0
+4926 y(bution)e(based)i(on)f(blo)s(c)m(k)h(ro)m(ws.)51
+b(That)33 b(is,)h(eac)m(h)h(pro)s(cess)f(o)m(wns)f(a)h(blo)s(c)m(k)g
+(of)g(consecutiv)m(e)g(ro)m(ws)g(of)g Fv(A)g Fw(and)f
+Fv(B)5 b Fw(.)0 5039 y(Eac)m(h)28 b(lo)s(cal)e(part)g(of)i(sparse)e
+(matrix)g Fv(A)h Fw(is)f(stored)h(in)f(a)h(compressed)g(ro)m(w)g
+(format,)h(called)e Fu(SLU)p 3289 5039 29 4 v 34 w(NR)p
+3419 5039 V 33 w(loc)g Fw(storage)0 5152 y(t)m(yp)s(e,)31
+b(whic)m(h)e(is)g(de\014ned)g(b)s(elo)m(w.)191 5340 y
+Fu(typedef)46 b(struct)g({)382 5452 y(int)h(nnz_loc;)93
+b(/*)47 b(number)f(of)h(nonzeros)f(in)h(the)g(local)f(submatrix)g(*/)
+1905 5778 y Fw(46)p eop
+%%Page: 47 48
+47 47 bop 382 280 a Fu(int)47 b(m_loc;)189 b(/*)47 b(number)f(of)h
+(rows)g(local)f(to)i(this)e(process)g(*/)382 393 y(int)h(fst_row;)93
+b(/*)47 b(row)g(number)f(of)h(the)g(first)g(row)g(in)g(the)g(local)f
+(submatrix)f(*/)382 506 y(void)h(*nzval;)94 b(/*)47 b(pointer)f(to)h
+(array)g(of)g(nonzero)f(values,)f(packed)h(by)i(row)f(*/)382
+619 y(int)g(*rowptr;)93 b(/*)47 b(pointer)f(to)h(array)g(of)g
+(beginning)e(of)i(rows)g(in)g(nzval[])1193 732 y(and)g(colind[])93
+b(*/)382 845 y(int)47 b(*colind;)93 b(/*)47 b(pointer)f(to)h(array)g
+(of)g(column)f(indices)g(of)h(the)g(nonzeros)e(*/)191
+958 y(})i(NRformat_loc;)141 1145 y Fw(Let)31 b Fv(m)384
+1159 y Fo(i)442 1145 y Fw(b)s(e)e(the)i(n)m(um)m(b)s(er)e(of)h(ro)m(ws)
+g(o)m(wned)g(b)m(y)g(the)h Fv(i)p Fw(th)f(pro)s(cess.)40
+b(Then)29 b(the)i(global)e(ro)m(w)h(dimension)e(for)i
+Fv(A)0 1258 y Fw(is)k Fv(nr)s(ow)g Fw(=)440 1194 y Fk(P)528
+1220 y Fo(P)10 b Fn(\000)p FC(1)528 1284 y Fo(i)p FC(=0)692
+1258 y Fv(m)772 1272 y Fo(i)800 1258 y Fw(.)53 b(The)34
+b(global)g(column)g(dimension)e(is)h Fv(ncol)r Fw(.)53
+b(Both)35 b Fv(nr)s(ow)i Fw(and)d Fv(ncol)i Fw(are)f(recorded)f(in)0
+1371 y(the)d(higher)e(lev)m(el)h Fu(SuperMatrix)d Fw(data)k(structure,)
+f(see)h(Figure)f(2.2.)42 b(The)30 b(utilit)m(y)e(routine)0
+1484 y Fu(dCreate)p 342 1484 29 4 v 32 w(CompRowLoc)p
+854 1484 V 32 w(Matrix)p 1174 1484 V 33 w(dist)h Fw(can)j(help)d(the)i
+(user)f(to)i(create)g(the)f(structure)f(for)h Fv(A)p
+Fw(.)42 b(The)30 b(de\014nition)0 1597 y(of)h(this)e(routine)g(is)95
+1785 y Fu(void)47 b(dCreate_CompRowLoc_Matrix)o(_di)o(st\(S)o(uper)o
+(Mat)o(rix)41 b(*A,)47 b(int)g(m,)g(int)g(n,)1814 1898
+y(int)g(nnz_loc,)e(int)i(m_loc,)f(int)h(fst_row,)1814
+2011 y(double)f(*nzval,)g(int)g(*colind,)g(int)h(*rowptr,)1814
+2123 y(Stype_t)e(stype,)i(Dtype_t)e(dtype,)h(Mtype_t)g(mtype\);)0
+2311 y Fw(where,)30 b(the)h(\014rst)e(argumen)m(t)i(is)f(output)g(and)f
+(the)i(rest)f(are)h(inputs.)141 2424 y(The)41 b(lo)s(cal)g(full)e
+(matrix)h Fv(B)46 b Fw(is)41 b(stored)g(in)f(the)i(standard)e(F)-8
+b(ortran)42 b(st)m(yle)g(column)e(ma)5 b(jor)42 b(format,)i(with)0
+2537 y(dimension)28 b Fv(m)p 515 2537 28 4 v 32 w(l)r(oc)21
+b Fq(\002)f Fv(nr)s(hs)p Fw(,)29 b(and)h Fv(l)r(db)h
+Fw(refers)f(to)h(the)f(lo)s(cal)g(leading)f(dimension)f(in)h(the)i(lo)s
+(cal)e(storage.)0 2823 y Fr(4.3)135 b(Distributed)46
+b(data)g(structures)f(for)g Ff(L)f Fr(and)h Ff(U)0 3026
+y Fw(W)-8 b(e)34 b(distribute)d(b)s(oth)h Fv(L)h Fw(and)g
+Fv(U)43 b Fw(matrices)33 b(in)e(a)j(t)m(w)m(o-dimensional)e(blo)s(c)m
+(k-cyclic)g(fashion.)48 b(W)-8 b(e)34 b(\014rst)e(iden)m(tify)0
+3139 y(the)38 b(sup)s(erno)s(de)d(b)s(oundary)g(based)i(on)h(the)f
+(nonzero)h(structure)f(of)h Fv(L)p Fw(.)62 b(This)35
+b(sup)s(erno)s(de)h(partition)g(is)g(then)0 3252 y(used)27
+b(as)h(the)g(blo)s(c)m(k)f(partition)g(in)f(b)s(oth)h(ro)m(w)h(and)f
+(column)g(dimensions)e(for)i(b)s(oth)g Fv(L)h Fw(and)f
+Fv(U)10 b Fw(.)40 b(The)27 b(size)h(of)g(eac)m(h)0 3365
+y(blo)s(c)m(k)k(is)f(matrix)h(dep)s(enden)m(t.)46 b(It)32
+b(should)f(b)s(e)h(clear)g(that)h(all)e(the)i(diagonal)f(blo)s(c)m(ks)f
+(are)i(square)f(and)g(full)e(\(w)m(e)0 3478 y(store)38
+b(zeros)h(from)e Fv(U)48 b Fw(in)36 b(the)i(upp)s(er)e(triangle)h(of)h
+(the)g(diagonal)f(blo)s(c)m(k\),)i(whereas)f(the)g(o\013-diagonal)g
+(blo)s(c)m(ks)0 3591 y(ma)m(y)h(b)s(e)f(rectangular)h(and)f(ma)m(y)h
+(not)g(b)s(e)f(full.)63 b(The)38 b(matrix)g(in)f(Figure)h(4.1)i
+(illustrates)d(suc)m(h)h(a)h(partition.)0 3704 y(By)34
+b(blo)s(c)m(k-cyclic)g(mapping)f(w)m(e)h(mean)g(blo)s(c)m(k)g(\()p
+Fv(I)7 b(;)15 b(J)9 b Fw(\))35 b(\(0)e Fq(\024)e Fv(I)7
+b(;)15 b(J)41 b Fq(\024)31 b Fv(N)i Fq(\000)22 b Fw(1\))35
+b(is)e(mapp)s(ed)g(in)m(to)h(the)h(pro)s(cess)e(at)0
+3817 y(co)s(ordinate)23 b Fq(f)p Fv(I)31 b(mod)24 b Fu(nprow)n
+Fv(;)15 b(J)33 b(mod)24 b Fu(npcol)n Fq(g)g Fw(of)g(the)f
+Fu(nprow)5 b Fq(\002)h Fu(npcol)22 b Fw(2D)i(pro)s(cess)f(grid.)37
+b(Using)23 b(this)f(mapping,)0 3930 y(a)32 b(blo)s(c)m(k)f
+Fv(L)p Fw(\()p Fv(I)7 b(;)15 b(J)9 b Fw(\))33 b(in)e(the)g
+(factorization)i(is)e(only)f(needed)i(b)m(y)f(the)h(ro)m(w)g(of)g(pro)s
+(cesses)f(that)i(o)m(wn)e(blo)s(c)m(ks)g(in)g(ro)m(w)0
+4042 y Fv(I)7 b Fw(.)41 b(Similarly)-8 b(,)27 b(a)k(blo)s(c)m(k)f
+Fv(U)10 b Fw(\()p Fv(I)d(;)15 b(J)9 b Fw(\))31 b(is)f(only)f(needed)h
+(b)m(y)h(the)f(column)f(of)i(pro)s(cesses)f(that)h(o)m(wn)f(blo)s(c)m
+(ks)g(in)f(column)0 4155 y Fv(J)9 b Fw(.)141 4268 y(In)43
+b(this)f(2D)i(mapping,)h(eac)m(h)g(blo)s(c)m(k)e(column)f(of)i
+Fv(L)f Fw(resides)f(on)h(more)h(than)f(one)h(pro)s(cess,)i(namely)-8
+b(,)47 b(a)0 4381 y(column)41 b(of)h(pro)s(cesses.)76
+b(F)-8 b(or)43 b(example)f(in)f(Figure)h(4.1,)k(the)c(second)h(blo)s(c)
+m(k)e(column)g(of)i Fv(L)f Fw(resides)f(on)h(the)0 4494
+y(column)37 b(pro)s(cesses)i Fq(f)p Fw(1,)j(4)p Fq(g)p
+Fw(.)66 b(Pro)s(cess)38 b(4)h(only)f(o)m(wns)g(t)m(w)m(o)i(nonzero)f
+(blo)s(c)m(ks,)h(whic)m(h)e(are)h(not)g(con)m(tiguous)f(in)0
+4607 y(the)d(global)f(matrix.)52 b(The)34 b(sc)m(hema)i(on)e(the)h
+(righ)m(t)f(of)h(Figure)f(4.1)h(depicts)f(the)h(data)g(structure)f(to)i
+(store)f(the)0 4720 y(nonzero)30 b(blo)s(c)m(ks)g(on)f(a)i(pro)s(cess.)
+40 b(Besides)29 b(the)h(n)m(umerical)f(v)-5 b(alues)29
+b(stored)h(in)f(a)h(F)-8 b(ortran-st)m(yle)31 b(arra)m(y)g
+Fu(nzval[])0 4833 y Fw(in)25 b(column)h(ma)5 b(jor)27
+b(order,)g(w)m(e)g(need)g(the)g(information)e(to)i(in)m(terpret)f(the)h
+(lo)s(cation)f(and)h(ro)m(w)f(subscript)f(of)i(eac)m(h)0
+4946 y(nonzero.)43 b(This)29 b(is)h(stored)i(in)d(an)i(in)m(teger)h
+(arra)m(y)f Fu(index[])p Fw(,)f(whic)m(h)f(includes)g(the)i
+(information)f(for)g(the)i(whole)0 5059 y(blo)s(c)m(k)e(column)f(and)h
+(for)g(eac)m(h)h(individual)26 b(blo)s(c)m(k)k(in)f(it.)40
+b(Note)32 b(that)f(man)m(y)f(o\013-diagonal)h(blo)s(c)m(ks)f(are)g
+(zero)i(and)0 5172 y(hence)27 b(not)g(stored.)40 b(Neither)27
+b(do)g(w)m(e)g(store)h(the)f(zeros)h(in)e(a)h(nonzero)g(blo)s(c)m(k.)39
+b(Both)28 b(lo)m(w)m(er)f(and)g(upp)s(er)e(triangles)0
+5285 y(of)i(the)g(diagonal)g(blo)s(c)m(k)f(are)i(stored)f(in)f(the)h
+Fv(L)g Fw(data)h(structure.)39 b(A)27 b(pro)s(cess)f(o)m(wns)h
+Fq(d)p Fv(N)r(=)p Fu(npcol)p Fq(e)h Fw(blo)s(c)m(k)e(columns)0
+5397 y(of)31 b Fv(L)p Fw(,)f(so)h(it)e(needs)h Fq(d)p
+Fv(N)r(=)p Fu(nprow)p Fq(e)h Fw(pairs)e(of)i Fu(index/nzval)c
+Fw(arra)m(ys.)1905 5778 y(47)p eop
+%%Page: 48 49
+48 48 bop 810 189 a
+ 17997903 12787959 0 0 37429821 28417720 startTexFig
+ 810 189 a
+%%BeginDocument: lu_2d.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: lu_2d.eps
+%%Creator: fig2dev Version 3.2.3 Patchlevel
+%%CreationDate: Wed Feb 6 16:10:43 2002
+%%For: xiaoye at lotus.CS.Berkeley.EDU (Xiaoye Li,531 Soda,3-4205,)
+%%BoundingBox: 0 0 569 432
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 432 moveto 0 0 lineto 569 0 lineto 569 432 lineto closepath clip newpath
+-35.0 469.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+%%Page: 1 1
+10 setmiterlimit
+ 0.06000 0.06000 sc
+% Polyline
+7.500 slw
+n 4575 2475 m 4725 2475 l 4725 2625 l 4575 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 4200 2325 m 4350 2325 l 4350 2625 l 4200 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 3300 2325 m 3450 2325 l 3450 2625 l 3300 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 4050 2175 m 4200 2175 l 4200 2625 l 4050 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 2850 3075 m 3000 3075 l 3000 3525 l 2850 3525 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 3900 4725 m 4725 4725 l 4725 5550 l 3900 5550 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 3450 4275 m 3900 4275 l 3900 4725 l 3450 4725 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 1200 5775 m 1800 5775 l 1800 6075 l 1200 6075 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 1200 3675 m 1800 3675 l 1800 3825 l 1200 3825 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 3075 2175 m 3225 2175 l 3225 2625 l 3075 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 2700 2325 m 2850 2325 l 2850 2625 l 2700 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 3150 3000 m 3300 3000 l 3300 3525 l 3150 3525 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 4725 5550 m 5400 5550 l 5400 6225 l 4725 6225 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 2700 3525 m 3450 3525 l 3450 4275 l 2700 4275 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 1800 2625 m 2700 2625 l 2700 3525 l 1800 3525 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 1200 2025 m 1800 2025 l 1800 2625 l 1200 2625 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 600 1425 m 1200 1425 l 1200 2025 l 600 2025 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 1200 2850 m 1800 2850 l 1800 3225 l 1200 3225 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+% Polyline
+n 1200 4050 m 1800 4050 l 1800 4200 l 1200 4200 l
+ cp gs col7 0.75 shd ef gr gs col0 s gr
+/Times-Roman ff 360.00 scf sf
+825 7050 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 7050 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 7650 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 7650 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+2025 7050 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+6225 4050 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 1875 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4275 1875 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+6225 6150 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 2475 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 1875 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+2175 3150 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 3975 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+5025 6000 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4200 6000 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 6000 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 6000 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+2175 6000 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 6000 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4950 5250 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 5250 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 5250 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 5250 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 5250 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 3975 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 4650 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4950 4650 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4200 4650 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 4650 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+2175 4650 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 4650 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 4650 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4950 3975 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 3975 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4950 3150 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4275 3150 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 3150 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 3150 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 3975 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 3150 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4950 2475 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 2475 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3600 2475 m
+gs 1 -1 sc (4) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+825 2475 m
+gs 1 -1 sc (3) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+4950 1875 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 6000 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+2175 1875 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+3000 1875 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 3150 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 360.00 scf sf
+1425 1875 m
+gs 1 -1 sc (1) col0 sh gr
+% Polyline
+n 8550 4875 m 8551 4873 l 8555 4870 l 8560 4864 l 8569 4855 l 8581 4843 l
+ 8595 4829 l 8612 4813 l 8630 4795 l 8651 4777 l 8672 4758 l
+ 8695 4740 l 8719 4723 l 8744 4707 l 8770 4692 l 8797 4678 l
+ 8827 4667 l 8858 4658 l 8891 4652 l 8925 4650 l 8961 4653 l
+ 8994 4660 l 9021 4670 l 9042 4683 l 9057 4698 l 9068 4713 l
+ 9074 4729 l 9078 4746 l 9081 4763 l 9084 4779 l 9088 4796 l
+ 9094 4812 l 9104 4827 l 9118 4842 l 9138 4855 l 9163 4865 l
+ 9192 4872 l 9225 4875 l 9258 4872 l 9287 4865 l 9311 4855 l
+ 9330 4842 l 9342 4827 l 9350 4812 l 9354 4796 l 9356 4779 l
+ 9356 4762 l 9357 4746 l 9359 4729 l 9364 4713 l 9374 4698 l
+ 9390 4683 l 9413 4670 l 9443 4660 l 9481 4653 l 9525 4650 l
+ 9563 4652 l 9601 4657 l 9639 4664 l 9675 4674 l 9710 4685 l
+ 9744 4698 l 9776 4712 l 9808 4727 l 9839 4743 l 9869 4760 l
+ 9898 4777 l 9925 4793 l 9951 4809 l 9975 4825 l 9996 4838 l
+ 10013 4850 l 10027 4859 l 10038 4866 l 10045 4871 l 10048 4874 l
+
+ 10050 4875 l gs col-1 s gr
+% Polyline
+n 6150 7125 m 6151 7123 l 6155 7120 l 6160 7114 l 6169 7104 l 6180 7092 l
+ 6195 7076 l 6212 7058 l 6232 7038 l 6253 7016 l 6277 6994 l
+ 6301 6971 l 6326 6949 l 6352 6928 l 6379 6908 l 6407 6889 l
+ 6436 6872 l 6466 6857 l 6498 6844 l 6531 6834 l 6566 6827 l
+ 6600 6825 l 6636 6828 l 6669 6836 l 6696 6848 l 6718 6863 l
+ 6735 6880 l 6746 6899 l 6754 6919 l 6758 6939 l 6761 6960 l
+ 6763 6981 l 6764 7002 l 6766 7023 l 6770 7043 l 6777 7063 l
+ 6787 7081 l 6801 7097 l 6820 7110 l 6843 7120 l 6870 7126 l
+ 6900 7125 l 6930 7118 l 6957 7106 l 6980 7089 l 6999 7070 l
+ 7013 7049 l 7023 7026 l 7030 7003 l 7034 6979 l 7036 6955 l
+ 7038 6931 l 7039 6907 l 7042 6884 l 7046 6860 l 7054 6837 l
+ 7065 6816 l 7082 6795 l 7104 6778 l 7131 6763 l 7164 6754 l
+ 7200 6750 l 7232 6752 l 7263 6759 l 7294 6770 l 7323 6784 l
+ 7352 6801 l 7379 6819 l 7405 6840 l 7430 6862 l 7455 6886 l
+ 7478 6910 l 7501 6935 l 7523 6961 l 7545 6986 l 7565 7011 l
+ 7583 7035 l 7600 7056 l 7614 7075 l 7626 7092 l 7635 7104 l
+ 7642 7114 l 7646 7120 l 7649 7123 l
+ 7650 7125 l gs col-1 s gr
+/Times-Roman ff 300.00 scf sf
+2700 7200 m
+gs 1 -1 sc (Process Mesh) col-1 sh gr
+/Times-Roman ff 300.00 scf sf
+2100 825 m
+gs 1 -1 sc (Global Matrix) col-1 sh gr
+/Times-Roman ff 750.00 scf sf
+1725 5025 m
+gs 1 -1 sc (L) col-1 sh gr
+/Times-Roman ff 360.00 scf sf
+2175 2475 m
+gs 1 -1 sc (5) col-1 sh gr
+% Polyline
+ [60] 0 sd
+n 7650 6375 m
+ 8550 4275 l gs col-1 s gr [] 0 sd
+/Times-Roman ff 360.00 scf sf
+4200 3975 m
+gs 1 -1 sc (5) col-1 sh gr
+/Times-Roman ff 360.00 scf sf
+2175 5250 m
+gs 1 -1 sc (5) col-1 sh gr
+/Times-Roman ff 360.00 scf sf
+4200 5250 m
+gs 1 -1 sc (5) col-1 sh gr
+/Times-Roman ff 750.00 scf sf
+3675 3225 m
+gs 1 -1 sc (U) col-1 sh gr
+% Polyline
+ [60] 0 sd
+n 7650 5025 m
+ 8550 2775 l gs col-1 s gr [] 0 sd
+% Polyline
+n 600 1425 m
+ 5400 6225 l gs col-1 s gr
+/Times-Roman ff 360.00 scf sf
+4200 2475 m
+gs 1 -1 sc (5) col-1 sh gr
+% Polyline
+ [60] 0 sd
+n 7650 4275 m
+ 8550 2775 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 7650 3075 m
+ 8550 1425 l gs col-1 s gr [] 0 sd
+% Polyline
+n 8550 4275 m
+ 10050 4275 l gs col-1 s gr
+% Polyline
+ [60] 0 sd
+n 9750 1425 m
+ 9750 4725 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 9450 1425 m
+ 9450 4650 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 9150 1425 m
+ 9150 4875 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 8850 1425 m
+ 8850 4650 l gs col-1 s gr [] 0 sd
+% Polyline
+n 10050 1425 m
+ 10050 4875 l gs col-1 s gr
+% Polyline
+n 8550 1425 m
+ 8550 4875 l gs col-1 s gr
+% Polyline
+n 8550 2775 m
+ 10050 2775 l gs col-1 s gr
+% Polyline
+n 8550 1425 m
+ 10050 1425 l gs col-1 s gr
+% Polyline
+n 6150 5025 m
+ 7650 5025 l gs col-1 s gr
+% Polyline
+n 6150 3075 m
+ 7650 3075 l gs col-1 s gr
+% Polyline
+30.000 slw
+n 6150 6375 m
+ 7650 6375 l gs col-1 s gr
+% Polyline
+n 6150 4275 m
+ 7650 4275 l gs col-1 s gr
+% Polyline
+60.000 slw
+n 6150 2325 m
+ 7650 2325 l gs col-1 s gr
+% Polyline
+7.500 slw
+n 6150 1425 m
+ 7650 1425 l gs col-1 s gr
+% Polyline
+n 7650 1425 m
+ 7650 7125 l gs col-1 s gr
+% Polyline
+n 6150 1425 m
+ 6150 7125 l gs col-1 s gr
+% Polyline
+ [60] 0 sd
+n 600 7200 m
+ 2400 7200 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 1800 6600 m
+ 1800 7800 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 1200 6600 m
+ 1200 7800 l gs col-1 s gr [] 0 sd
+/Times-Roman ff 360.00 scf sf
+2025 7650 m
+gs 1 -1 sc (5) col-1 sh gr
+% Polyline
+n 600 1425 m 5400 1425 l 5400 6225 l 600 6225 l
+ cp gs col-1 s gr
+% Polyline
+ [60] 0 sd
+n 600 2625 m
+ 5400 2625 l gs col-1 s gr [] 0 sd
+% Polyline
+n 1200 1425 m
+ 1200 6225 l gs col-1 s gr
+% Polyline
+ [60] 0 sd
+n 2700 2625 m
+ 4575 2625 l gs col-1 s gr [] 0 sd
+% Polyline
+n 4571 5400 m 4579 5400 l gs col-1 s gr
+% Polyline
+ [60] 0 sd
+n 600 3525 m
+ 5400 3525 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 600 4275 m
+ 5400 4275 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 600 4725 m
+ 5400 4725 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 600 5550 m
+ 5400 5550 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 4725 6225 m
+ 4725 1425 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 600 2025 m
+ 5400 2025 l gs col-1 s gr [] 0 sd
+% Polyline
+n 1800 1425 m
+ 1800 6225 l gs col-1 s gr
+/Times-Roman ff 360.00 scf sf
+2175 3975 m
+gs 1 -1 sc (5) col-1 sh gr
+% Polyline
+ [60] 0 sd
+n 2700 6225 m
+ 2700 1425 l gs col-1 s gr [] 0 sd
+% Polyline
+ [60] 0 sd
+n 3450 6225 m
+ 3450 1425 l gs col-1 s gr [] 0 sd
+/Times-Roman ff 300.00 scf sf
+6600 1275 m
+gs 1 -1 sc (index) col-1 sh gr
+/Times-Roman ff 300.00 scf sf
+5850 825 m
+gs 1 -1 sc (Storage of block column of L) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 1725 m
+gs 1 -1 sc (# of blocks) col-1 sh gr
+/Times-Roman ff 300.00 scf sf
+8850 1275 m
+gs 1 -1 sc (nzval) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 2625 m
+gs 1 -1 sc (block #) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 3300 m
+gs 1 -1 sc (row subscripts) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 3600 m
+gs 1 -1 sc (i1) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 3870 m
+gs 1 -1 sc (i2) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 2925 m
+gs 1 -1 sc (# of full rows) col-1 sh gr
+/Times-Roman ff 300.00 scf sf
+6600 4875 m
+gs 1 -1 sc ( ) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 4575 m
+gs 1 -1 sc (block #) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 5250 m
+gs 1 -1 sc (row subscripts) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 5550 m
+gs 1 -1 sc (i1) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 5820 m
+gs 1 -1 sc (i2) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 4875 m
+gs 1 -1 sc (# of full rows) col-1 sh gr
+/Times-Roman ff 210.00 scf sf
+6225 2100 m
+gs 1 -1 sc (LDA of nzval) col-1 sh gr
+% Polyline
+ [60] 0 sd
+n 3900 6225 m
+ 3900 1425 l gs col-1 s gr [] 0 sd
+% Polyline
+n 600 6600 m 2400 6600 l 2400 7800 l 600 7800 l
+ cp gs col-1 s gr
+$F2psEnd
+rs
+
+%%EndDocument
+
+ endTexFig
+ 50 2005 a Fw(Figure)30 b(4.1:)42 b(The)30 b(2)g(blo)s(c)m(k-cyclic)g
+(la)m(y)m(out)h(and)f(the)h(data)g(structure)f(to)h(store)g(a)g(lo)s
+(cal)e(blo)s(c)m(k)h(column)f(of)i Fv(L)p Fw(.)141 2280
+y(F)-8 b(or)34 b Fv(U)10 b Fw(,)34 b(w)m(e)f(use)g(a)g(ro)m(w)g(orien)m
+(ted)g(storage)h(for)f(the)g(blo)s(c)m(k)f(ro)m(ws)h(o)m(wned)g(b)m(y)g
+(a)g(pro)s(cess,)h(although)e(for)h(the)0 2393 y(n)m(umerical)24
+b(v)-5 b(alues)24 b(within)f(eac)m(h)k(blo)s(c)m(k)d(w)m(e)i(still)d
+(use)i(column)f(ma)5 b(jor)26 b(order.)38 b(Similar)22
+b(to)k Fv(L)p Fw(,)h(w)m(e)e(also)h(use)f(a)g(pair)0
+2506 y(of)30 b Fu(index/nzval)d Fw(arra)m(ys)j(to)g(store)g(a)h(blo)s
+(c)m(k)e(ro)m(w)h(of)g Fv(U)10 b Fw(.)40 b(Due)30 b(to)g(asymmetry)-8
+b(,)31 b(eac)m(h)g(nonzero)f(blo)s(c)m(k)f(in)g Fv(U)39
+b Fw(has)0 2619 y(the)26 b(skyline)e(structure)i(as)g(sho)m(wn)g(in)e
+(Figure)i(4.1)h(\(see)g([5)q(])f(for)f(details)h(on)f(the)i(skyline)d
+(structure\).)39 b(Therefore,)0 2732 y(the)34 b(organization)g(of)f
+(the)h Fu(index[])e Fw(arra)m(y)i(is)f(di\013eren)m(t)g(from)g(that)i
+(for)e Fv(L)p Fw(,)i(whic)m(h)d(w)m(e)i(omit)g(sho)m(wing)e(in)h(the)0
+2845 y(\014gure.)0 3131 y Fr(4.4)135 b(Pro)t(cess)45
+b(grid)g(and)g(MPI)f(comm)l(unicator)0 3334 y Fw(All)31
+b(MPI)i(applications)e(b)s(egin)g(with)g(a)i(default)f(comm)m
+(unication)g(domain)f(that)i(includes)e(all)g(pro)s(cesses,)i(sa)m(y)0
+3447 y Fv(N)73 3461 y Fo(p)113 3447 y Fw(,)28 b(of)g(this)e(parallel)g
+(job.)39 b(The)27 b(default)g(comm)m(unicator)h Fu(MPI)p
+2178 3447 29 4 v 33 w(COMM)p 2403 3447 V 34 w(WORLD)e
+Fw(represen)m(ts)h(this)f(comm)m(unication)0 3560 y(domain.)39
+b(The)28 b Fv(N)616 3574 y Fo(p)684 3560 y Fw(pro)s(cesses)h(are)g
+(iden)m(ti\014ed)e(as)h(a)h(linear)e(arra)m(y)i(of)g(pro)s(cess)f(IDs)h
+(in)e(the)i(range)g(0)41 b Fv(:)15 b(:)g(:)42 b(N)3686
+3574 y Fo(p)3742 3560 y Fq(\000)16 b Fw(1.)0 3803 y Fm(4.4.1)112
+b(2D)38 b(pro)s(cess)g(grid)0 3975 y Fw(F)-8 b(or)30
+b Fu(SuperLU)p 504 3975 V 33 w(DIST)e Fw(library)-8 b(,)28
+b(w)m(e)j(create)g(a)f(new)f(pro)s(cess)g(group)g(deriv)m(ed)g(from)g
+(an)h(existing)f(group)g(using)f Fv(N)3860 3989 y Fo(g)0
+4088 y Fw(pro)s(cesses.)61 b(There)37 b(is)f(a)i(go)s(o)s(d)f(reason)g
+(to)h(use)f(a)h(new)e(group)h(rather)g(than)g Fu(MPI)p
+2891 4088 V 33 w(COMM)p 3116 4088 V 34 w(WORLD)p Fw(,)f(that)i(is,)g
+(the)0 4201 y(message)30 b(passing)d(calls)h(of)g(the)h(Sup)s(erLU)e
+(library)f(will)f(b)s(e)j(isolated)g(from)g(those)h(in)f(other)g
+(libraries)e(or)j(in)e(the)0 4314 y(user's)34 b(co)s(de.)53
+b(F)-8 b(or)35 b(b)s(etter)g(scalabilit)m(y)e(of)i(the)f
+Fv(LU)44 b Fw(factorization,)37 b(w)m(e)e(map)f(the)h(1D)g(arra)m(y)g
+(of)g Fv(N)3463 4328 y Fo(g)3537 4314 y Fw(pro)s(cesses)0
+4426 y(in)m(to)30 b(a)g(logical)f(2D)h(pro)s(cess)f(grid.)40
+b(This)27 b(grid)i(will)e(ha)m(v)m(e)k Fu(nprow)d Fw(pro)s(cess)h(ro)m
+(ws)h(and)f Fu(npcol)f Fw(pro)s(cess)h(columns,)0 4539
+y(suc)m(h)g(that)i Fu(nprow)17 b Fq(\003)j Fu(npcol)k
+Fw(=)h Fv(N)1156 4553 y Fo(g)1196 4539 y Fw(.)40 b(A)30
+b(pro)s(cess)f(can)h(b)s(e)f(referenced)h(either)f(b)m(y)h(its)f(rank)g
+(in)g(the)h(new)f(group)g(or)0 4652 y(b)m(y)e(its)f(co)s(ordinates)g
+(within)f(the)i(grid.)38 b(The)26 b(routine)g Fu(superlu)p
+2214 4652 V 33 w(gridinit)e Fw(maps)i(already-existing)g(pro)s(cesses)0
+4765 y(to)31 b(a)g(2D)g(pro)s(cess)f(grid.)191 4978 y
+Fu(superlu_gridinit\(MPI_Com)o(m)42 b(Bcomm,)k(int)h(nprow,)f(int)h
+(npcol,)f(gridinfo_t)f(*grid\);)141 5190 y Fw(This)32
+b(pro)s(cess)g(grid)h(will)d(use)j(the)h(\014rst)e Fu(nprow)21
+b Fq(\003)i Fu(npcol)31 b Fw(pro)s(cesses)j(from)e(the)i(base)f(MPI)h
+(comm)m(unicator)0 5303 y Fu(Bcomm)p Fw(,)27 b(and)g(assign)g(them)h
+(to)g(the)g(grid)e(in)h(a)h(ro)m(w-ma)5 b(jor)28 b(ordering.)38
+b(The)28 b(input)d(argumen)m(t)j Fu(Bcomm)f Fw(is)f(an)i(MPI)0
+5416 y(comm)m(unicator)h(represen)m(ting)f(the)h(existing)f(base)h
+(group)f(up)s(on)f(whic)m(h)h(the)h(new)f(group)g(will)e(b)s(e)j
+(formed.)39 b(F)-8 b(or)1905 5778 y(48)p eop
+%%Page: 49 50
+49 49 bop 0 280 a Fw(example,)28 b(it)f(can)h(b)s(e)f
+Fu(MPI)p 902 280 29 4 v 34 w(COMM)p 1128 280 V 33 w(WORLD)p
+Fw(.)f(The)h(output)h(argumen)m(t)g Fu(grid)e Fw(represen)m(ts)i(the)f
+(deriv)m(ed)g(group)g(to)i(b)s(e)0 393 y(used)h(in)f
+Fu(SuperLU)p 656 393 V 32 w(DIST)p Fw(.)h Fu(Grid)f Fw(is)g(a)i
+(structure)f(con)m(taining)g(the)g(follo)m(wing)f(\014elds:)143
+561 y Fu(struct)46 b({)334 674 y(MPI_Comm)g(comm;)380
+b(/*)47 b(MPI)g(communicator)e(for)i(this)f(group)h(*/)334
+787 y(int)g(iam;)667 b(/*)47 b(my)g(process)f(rank)h(in)g(this)g(group)
+142 b(*/)334 900 y(int)47 b(nprow;)571 b(/*)47 b(number)f(of)i(process)
+d(rows)477 b(*/)334 1013 y(int)47 b(npcol;)571 b(/*)47
+b(number)f(of)i(process)d(columns)333 b(*/)334 1125 y(superlu_scope_t)
+44 b(rscp;)i(/*)h(process)f(row)h(scope)715 b(*/)334
+1238 y(superlu_scope_t)44 b(cscp;)i(/*)h(process)f(column)g(scope)572
+b(*/)143 1351 y(})48 b(grid;)141 1519 y Fw(In)34 b(the)g
+Fv(LU)44 b Fw(factorization,)36 b(some)e(comm)m(unications)g(o)s(ccur)g
+(only)f(among)h(the)h(pro)s(cesses)f(in)f(a)h(ro)m(w)g(\(col-)0
+1632 y(umn\),)25 b(not)g(among)g(all)f(pro)s(cesses.)38
+b(F)-8 b(or)26 b(this)d(purp)s(ose,)h(w)m(e)h(in)m(tro)s(duce)f(t)m(w)m
+(o)i(pro)s(cess)e(subgroups,)g(namely)g Fu(rscp)0 1745
+y Fw(\(ro)m(w)31 b(scop)s(e\))h(and)e Fu(cscp)g Fw(\(column)g(scop)s
+(e\).)43 b(F)-8 b(or)32 b Fu(rscp)e Fw(\()p Fu(cscp)p
+Fw(\))h(subgroup,)e(all)h(pro)s(cesses)h(in)f(a)h(ro)m(w)g(\(column\))0
+1858 y(participate)f(in)f(the)h(comm)m(unication.)141
+1971 y(The)j(macros)h Fu(MYROW\(iam,)45 b(grid\))33 b
+Fw(and)g Fu(MYCOL\(iam,)45 b(grid\))32 b Fw(giv)m(e)i(the)g(ro)m(w)g
+(and)f(column)f(co)s(ordinates)0 2083 y(in)d(the)i(2D)g(grid)e(of)h
+(the)h(pro)s(cess)f(who)g(has)g(rank)g Fu(iam)p Fw(.)124
+2320 y Fp(NOTE:)e(A)n(l)5 b(l)29 b(pr)-5 b(o)g(c)g(esses)32
+b(in)d(the)h(b)-5 b(ase)30 b(gr)-5 b(oup,)31 b(including)f(those)g(not)
+g(in)g(the)f(new)h(gr)-5 b(oup,)31 b(must)f(c)-5 b(al)5
+b(l)30 b(this)h(grid)0 2433 y(cr)-5 b(e)g(ation)35 b(r)-5
+b(outine.)45 b(This)34 b(is)f(r)-5 b(e)g(quir)g(e)g(d)35
+b(by)f(the)f(MPI)g(r)-5 b(outine)34 b Fu(MPI)p 2294 2433
+V 34 w(Comm)p 2520 2433 V 33 w(create)e Fp(to)i(cr)-5
+b(e)g(ate)34 b(a)g(new)f(c)-5 b(ommuni-)0 2546 y(c)g(ator.)0
+2785 y Fm(4.4.2)112 b(Arbitrary)36 b(grouping)i(of)f(pro)s(cesses)0
+2957 y Fw(It)k(is)f(sometimes)h(desirable)e(to)j(divide)d(up)h(the)h
+(pro)s(cesses)f(in)m(to)h(sev)m(eral)h(subgroups,)g(eac)m(h)g(of)f
+(whic)m(h)f(p)s(er-)0 3070 y(forms)35 b(indep)s(enden)m(t)e(w)m(ork)i
+(of)h(a)f(single)f(application.)54 b(In)35 b(this)f(situation,)i(w)m(e)
+f(cannot)h(simply)d(use)i(the)h(\014rst)0 3183 y Fu(nprow)20
+b Fq(\003)h Fu(npcol)30 b Fw(pro)s(cesses)h(to)i(de\014ne)d(the)i
+(grid.)43 b(A)32 b(more)f(sophisticated)g(pro)s(cess-to-grid)g(mapping)
+f(routine)0 3296 y Fu(superlu)p 342 3296 V 32 w(gridmap)f
+Fw(is)g(designed)g(to)j(create)f(a)g(grid)e(with)g(pro)s(cesses)i(of)f
+(arbitrary)f(ranks.)191 3484 y Fu(superlu_gridmap\(MPI_Comm)41
+b(Bcomm,)46 b(int)h(nprow,)f(int)h(npcol,)955 3597 y(int)f(usermap[],)f
+(int)i(ldumap,)f(gridinfo_t)f(*grid\);)141 3786 y Fw(The)26
+b(arra)m(y)h Fu(usermap[])c Fw(con)m(tains)k(the)f(pro)s(cesses)g(to)h
+(b)s(e)f(used)f(in)g(the)i(newly)e(created)i(grid.)38
+b Fu(usermap[])24 b Fw(is)0 3899 y(indexed)19 b(lik)m(e)g(a)i(F)-8
+b(ortran-st)m(yle)22 b(2D)f(arra)m(y)f(with)f Fu(ldumap)g
+Fw(as)h(the)h(leading)e(dimension.)35 b(So)20 b Fu(usermap[i+j)p
+Fq(\003)p Fu(ldumap])0 4011 y Fw(\(i.e.,)44 b Fu(usermap\(i,j\))38
+b Fw(in)i(F)-8 b(ortran)41 b(notation\))h(holds)d(the)i(pro)s(cess)g
+(rank)f(to)i(b)s(e)e(placed)h(in)e Fq(f)p Fw(i,)44 b(j)p
+Fq(g)d Fw(p)s(osition)0 4124 y(of)g(the)f(2D)h(pro)s(cess)f(grid.)70
+b(After)40 b(grid)g(creation,)j(this)c(subset)h(of)h(pro)s(cesses)f(is)
+f(logically)g(n)m(um)m(b)s(ered)g(in)h(a)0 4237 y(consisten)m(t)46
+b(manner)e(with)g(the)h(initial)e(set)i(of)h(pro)s(cesses;)53
+b(that)45 b(is,)k(they)c(ha)m(v)m(e)h(the)g(ranks)e(in)g(the)i(range)0
+4350 y(0)f Fv(:)15 b(:)g(:)46 b Fu(nprow)20 b Fq(\003)i
+Fu(npcol)f Fq(\000)g Fw(1)34 b(in)d(the)i(new)f(grid.)47
+b(F)-8 b(or)34 b(example,)f(if)f(w)m(e)h(w)m(an)m(t)h(to)g(map)e(6)h
+(pro)s(cesses)g(with)f(ranks)0 4463 y(11)49 b Fv(:)15
+b(:)g(:)49 b Fw(16)36 b(in)m(to)f(a)h(2)24 b Fq(\002)f
+Fw(3)35 b(grid,)g(w)m(e)h(de\014ne)e Fu(usermap)d Fw(=)i
+Fq(f)p Fw(11)p Fv(;)15 b Fw(14)p Fv(;)g Fw(12)p Fv(;)g
+Fw(15)p Fv(;)g Fw(13)q Fv(;)g Fw(16)q Fq(g)41 b Fw(and)35
+b Fu(ldumap)c Fw(=)i(2.)55 b(Suc)m(h)35 b(a)0 4576 y(mapping)29
+b(is)g(sho)m(wn)h(b)s(elo)m(w)1809 4736 y(0)146 b(1)f(2)p
+1737 4773 572 4 v 1641 4849 a(0)p 1735 4883 4 113 v 101
+w(11)p 1926 4883 V 100 w(12)p 2116 4883 V 101 w(13)p
+2307 4883 V 1737 4886 572 4 v 1641 4962 a(1)p 1735 4995
+4 113 v 101 w(14)p 1926 4995 V 100 w(15)p 2116 4995 V
+101 w(16)p 2307 4995 V 1737 4999 572 4 v 137 5190 a Fp(NOTE:)39
+b(A)n(l)5 b(l)39 b(pr)-5 b(o)g(c)g(esses)42 b(in)e(the)h(b)-5
+b(ase)40 b(gr)-5 b(oup,)43 b(including)d(those)h(not)g(in)f(the)g(new)g
+(gr)-5 b(oup,)43 b(must)e(c)-5 b(al)5 b(l)40 b(this)0
+5303 y(r)-5 b(outine.)141 5416 y Fu(Superlu)p 483 5416
+29 4 v 33 w(gridinit)39 b Fw(simply)h(calls)h Fu(superlu)p
+1792 5416 V 33 w(gridmap)f Fw(with)h Fu(usermap[])e Fw(holding)h(the)j
+(\014rst)e Fu(nprow)27 b Fq(\003)0 5529 y Fu(npcol)i
+Fw(pro)s(cess)h(ranks.)1905 5778 y(49)p eop
+%%Page: 50 51
+50 50 bop 0 280 a Fr(4.5)135 b(Basic)45 b(steps)h(to)f(solv)l(e)h(a)f
+(linear)h(system)0 483 y Fw(In)39 b(this)h(section,)j(w)m(e)d(use)g(a)h
+(complete)f(sample)g(program)g(to)g(illustrate)f(the)h(basic)g(steps)g
+(required)e(to)j(use)0 596 y Fu(SuperLU)p 342 596 29
+4 v 32 w(DIST)p Fw(.)36 b(This)g(program)g(is)g(listed)g(b)s(elo)m(w,)i
+(and)e(is)g(also)h(a)m(v)-5 b(ailable)36 b(as)h Fu(EXAMPLE/pddrive.c)32
+b Fw(in)k(the)0 709 y(source)48 b(co)s(de)g(distribution.)89
+b(All)46 b(the)i(routines)e(m)m(ust)i(include)d(the)j(header)g(\014le)e
+Fu(superlu)p 3375 709 V 33 w(ddefs.h)g Fw(\(or)0 822
+y Fu(superlu)p 342 822 V 32 w(zdefs.h)p Fw(,)32 b(the)h(complex)f(coun)
+m(terpart\))i(whic)m(h)d(con)m(tains)i(the)g(de\014nitions)d(of)j(the)g
+(data)g(t)m(yp)s(es,)h(the)0 935 y(macros)d(and)f(the)g(function)f
+(protot)m(yp)s(es.)0 1126 y Fu(#include)46 b(<math.h>)0
+1238 y(#include)g("superlu_ddefs.h")0 1464 y(main\(int)g(argc,)g(char)h
+(*argv[]\))0 1577 y(/*)48 1690 y(*)g(Purpose)48 1803
+y(*)g(=======)48 1916 y(*)48 2029 y(*)g(The)g(driver)f(program)g
+(PDDRIVE.)48 2142 y(*)48 2255 y(*)h(This)g(example)f(illustrates)e(how)
+j(to)g(use)g(PDGSSVX)f(with)h(the)g(full)48 2368 y(*)g(\(default\))e
+(options)h(to)h(solve)g(a)g(linear)f(system.)48 2480
+y(*)48 2593 y(*)h(Five)g(basic)f(steps)h(are)f(required:)48
+2706 y(*)143 b(1.)47 b(Initialize)e(the)i(MPI)g(environment)d(and)j
+(the)g(SuperLU)f(process)g(grid)48 2819 y(*)143 b(2.)47
+b(Set)g(up)g(the)g(input)f(matrix)g(and)h(the)g(right-hand)e(side)48
+2932 y(*)143 b(3.)47 b(Set)g(the)g(options)e(argument)48
+3045 y(*)143 b(4.)47 b(Call)f(pdgssvx)48 3158 y(*)143
+b(5.)47 b(Release)f(the)h(process)e(grid)i(and)g(terminate)e(the)i(MPI)
+g(environment)48 3271 y(*)48 3384 y(*)g(On)g(the)g(Cray)g(T3E,)g(the)f
+(program)g(may)h(be)g(run)g(by)g(typing)48 3497 y(*)190
+b(mpprun)46 b(-n)i(<procs>)d(pddrive)h(-r)h(<proc)g(rows>)f(-c)h(<proc)
+g(columns>)e(<input_file>)48 3610 y(*)48 3723 y(*/)0
+3835 y({)191 3948 y(superlu_options_t)e(options;)191
+4061 y(SuperLUStat_t)h(stat;)191 4174 y(SuperMatrix)h(A;)191
+4287 y(ScalePermstruct_t)e(ScalePermstruct;)191 4400
+y(LUstruct_t)i(LUstruct;)191 4513 y(SOLVEstruct_t)f(SOLVEstruct;)191
+4626 y(gridinfo_t)h(grid;)191 4739 y(double)141 b(*berr;)191
+4852 y(double)g(*b,)47 b(*xtrue;)191 4965 y(int_t)189
+b(m,)48 b(n,)f(nnz;)191 5077 y(int_t)189 b(nprow,)47
+b(npcol;)191 5190 y(int)285 b(iam,)47 b(info,)f(ldb,)h(ldx,)g(nrhs;)191
+5303 y(char)237 b(trans[1];)191 5416 y(char)g(**cpp,)47
+b(c;)191 5529 y(FILE)g(*fp,)f(*fopen\(\);)1905 5778 y
+Fw(50)p eop
+%%Page: 51 52
+51 51 bop 191 393 a Fu(nprow)46 b(=)i(1;)95 b(/*)47 b(Default)f
+(process)f(rows.)285 b(*/)191 506 y(npcol)46 b(=)i(1;)95
+b(/*)47 b(Default)f(process)f(columns.)141 b(*/)191 619
+y(nrhs)47 b(=)g(1;)143 b(/*)47 b(Number)f(of)h(right-hand)e(side.)h(*/)
+191 845 y(/*)h(-------------------------)o(---)o(----)o(----)o(---)o
+(----)o(----)o(---)o(----)o(----)o(--)334 958 y(INITIALIZE)e(MPI)i
+(ENVIRONMENT.)334 1071 y(-------------------------)o(---)o(----)o(----)
+o(---)o(----)o(----)o(---)o(----)o(----)o(--*)o(/)191
+1184 y(MPI_Init\()e(&argc,)h(&argv)h(\);)191 1409 y(/*)g(Parse)f
+(command)g(line)h(argv[].)f(*/)191 1522 y(for)h(\(cpp)f(=)i(argv+1;)e
+(*cpp;)g(++cpp\))g({)382 1635 y(if)h(\()g(**cpp)g(==)g('-')g(\))g({)573
+1748 y(c)g(=)h(*\(*cpp+1\);)573 1861 y(++cpp;)573 1974
+y(switch)e(\(c\))h({)668 2087 y(case)g('h':)859 2200
+y(printf\("Options:\\n"\);)859 2313 y(printf\("\\t-r)e(<int>:)h
+(process)f(rows)190 b(\(default)46 b(\045d\)\\n",)g(nprow\);)859
+2426 y(printf\("\\t-c)f(<int>:)h(process)f(columns)h(\(default)g
+(\045d\)\\n",)g(npcol\);)859 2539 y(exit\(0\);)859 2652
+y(break;)668 2764 y(case)h('r':)f(nprow)h(=)g(atoi\(*cpp\);)859
+2877 y(break;)668 2990 y(case)g('c':)f(npcol)h(=)g(atoi\(*cpp\);)859
+3103 y(break;)573 3216 y(})382 3329 y(})g(else)g({)g(/*)h(Last)e(arg)h
+(is)g(considered)e(a)j(filename)d(*/)573 3442 y(if)i(\()g(!\(fp)g(=)g
+(fopen\(*cpp,)e("r"\)\))i(\))g({)764 3555 y(ABORT\("File)d(does)j(not)g
+(exist"\);)573 3668 y(})573 3781 y(break;)382 3894 y(})191
+4006 y(})191 4232 y(/*)g(-------------------------)o(---)o(----)o(----)
+o(---)o(----)o(----)o(---)o(----)o(----)o(--)334 4345
+y(INITIALIZE)e(THE)i(SUPERLU)f(PROCESS)g(GRID.)334 4458
+y(-------------------------)o(---)o(----)o(----)o(---)o(----)o(----)o
+(---)o(----)o(----)o(--*)o(/)191 4571 y(superlu_gridinit\(MPI_COM)o
+(M_WO)o(RLD)o(,)c(nprow,)k(npcol,)g(&grid\);)191 4797
+y(/*)h(Bail)g(out)g(if)g(I)g(do)g(not)g(belong)f(in)i(the)f(grid.)f(*/)
+191 4910 y(iam)h(=)g(grid.iam;)191 5023 y(if)g(\()h(iam)e(>=)i(nprow)e
+(*)h(npcol)g(\))g(goto)g(out;)191 5248 y(/*)g
+(-------------------------)o(---)o(----)o(----)o(---)o(----)o(----)o
+(---)o(----)o(----)o(--)334 5361 y(GET)g(THE)g(MATRIX)f(FROM)h(FILE)f
+(AND)h(SETUP)g(THE)f(RIGHT)h(HAND)f(SIDE.)334 5474 y
+(-------------------------)o(---)o(----)o(----)o(---)o(----)o(----)o
+(---)o(----)o(----)o(--*)o(/)1905 5778 y Fw(51)p eop
+%%Page: 52 53
+52 52 bop 191 280 a Fu(dcreate_matrix\(&A,)43 b(nrhs,)j(&b,)h(&ldb,)f
+(&xtrue,)g(&ldx,)h(fp,)f(&grid\);)191 506 y(if)h(\()h(!\(berr)e(=)h
+(doubleMalloc_dist\(nrhs\)\))41 b(\))382 619 y(ABORT\("Malloc)j(fails)i
+(for)h(berr[]."\);)191 845 y(/*)g(-------------------------)o(---)o
+(----)o(----)o(---)o(----)o(----)o(---)o(----)o(----)o(--)334
+958 y(NOW)g(WE)g(SOLVE)g(THE)f(LINEAR)h(SYSTEM.)334 1071
+y(-------------------------)o(---)o(----)o(----)o(---)o(----)o(----)o
+(---)o(----)o(----)o(--*)o(/)191 1297 y(/*)g(Set)g(the)g(default)f
+(input)g(options.)g(*/)191 1409 y(set_default_options_dist)o(\(&op)o
+(tio)o(ns\);)191 1635 y(m)h(=)h(A.nrow;)191 1748 y(n)f(=)h(A.ncol;)191
+1974 y(/*)f(Initialize)e(ScalePermstruct)f(and)j(LUstruct.)e(*/)191
+2087 y(ScalePermstructInit\(m,)d(n,)47 b(&ScalePermstruct\);)191
+2200 y(LUstructInit\(m,)d(n,)j(&LUstruct\);)191 2426
+y(/*)g(Initialize)e(the)i(statistics)e(variables.)g(*/)191
+2539 y(PStatInit\(&stat\);)191 2764 y(/*)i(Call)g(the)g(linear)f
+(equation)f(solver.)h(*/)191 2877 y(pdgssvx\(&options,)d(&A,)k
+(&ScalePermstruct,)c(b,)k(ldb,)g(nrhs,)f(&grid,)573 2990
+y(&LUstruct,)f(&SOLVEstruct,)f(berr,)i(&stat,)g(&info\);)191
+3329 y(/*)h(Check)f(the)h(accuracy)f(of)h(the)g(solution.)e(*/)191
+3442 y(pdinf_norm_error\(iam,)d(\(\(NRformat_loc)i
+(*\)A.Store\)->m_loc,)1002 3555 y(nrhs,)j(b,)g(ldb,)f(xtrue,)h(ldx,)f
+(&grid\);)191 3781 y(PStatPrint\(&options,)c(&stat,)k(&grid\);)380
+b(/*)47 b(Print)g(the)g(statistics.)d(*/)191 4006 y(/*)j
+(-------------------------)o(---)o(----)o(----)o(---)o(----)o(----)o
+(---)o(----)o(----)o(--)334 4119 y(DEALLOCATE)e(STORAGE.)334
+4232 y(-------------------------)o(---)o(----)o(----)o(---)o(----)o
+(----)o(---)o(----)o(----)o(--*)o(/)191 4458 y(PStatFree\(&stat\);)191
+4571 y(Destroy_CompRowLoc_Matri)o(x_di)o(st\()o(&A\);)191
+4684 y(ScalePermstructFree\(&Sca)o(lePe)o(rms)o(truc)o(t\);)191
+4797 y(Destroy_LU\(n,)f(&grid,)i(&LUstruct\);)191 4910
+y(LUstructFree\(&LUstruct\);)191 5023 y(if)h(\()h
+(options.SolveInitialize)o(d)42 b(\))47 b({)382 5136
+y(dSolveFinalize\(&options,)41 b(&SOLVEstruct\);)191
+5248 y(})191 5361 y(SUPERLU_FREE\(b\);)191 5474 y
+(SUPERLU_FREE\(xtrue\);)1905 5778 y Fw(52)p eop
+%%Page: 53 54
+53 53 bop 191 280 a Fu(SUPERLU_FREE\(berr\);)191 506
+y(/*)47 b(-------------------------)o(---)o(----)o(----)o(---)o(----)o
+(----)o(---)o(----)o(----)o(--)334 619 y(RELEASE)f(THE)h(SUPERLU)f
+(PROCESS)f(GRID.)334 732 y(-------------------------)o(---)o(----)o
+(----)o(---)o(----)o(----)o(---)o(----)o(----)o(--*)o(/)0
+845 y(out:)191 958 y(superlu_gridexit\(&grid\);)191 1184
+y(/*)i(-------------------------)o(---)o(----)o(----)o(---)o(----)o
+(----)o(---)o(----)o(----)o(--)334 1297 y(TERMINATES)e(THE)i(MPI)g
+(EXECUTION)e(ENVIRONMENT.)334 1409 y(-------------------------)o(---)o
+(----)o(----)o(---)o(----)o(----)o(---)o(----)o(----)o(--*)o(/)191
+1522 y(MPI_Finalize\(\);)0 1748 y(})141 1961 y Fw(Fiv)m(e)31
+b(basic)f(steps)g(are)h(required)d(to)j(call)f(a)h(Sup)s(erLU)d
+(routine:)111 2148 y(1.)46 b(Initialize)29 b(the)h(MPI)g(en)m(vironmen)
+m(t)g(and)g(the)h(Sup)s(erLU)d(pro)s(cess)i(grid.)227
+2261 y(This)f(is)g(ac)m(hiev)m(ed)i(b)m(y)g(the)f(calls)g(to)h(the)f
+(MPI)h(routine)e Fu(MPI)p 2317 2261 29 4 v 34 w(Init\(\))f
+Fw(and)i(the)h(Sup)s(erLU)d(routine)227 2374 y Fu(superlu)p
+569 2374 V 33 w(gridinit\(\))p Fw(.)36 b(In)24 b(this)f(example,)j(the)
+f(comm)m(unication)f(domain)g(for)g(Sup)s(erLU)f(is)h(built)f(up)s(on)
+227 2487 y(the)37 b(MPI)f(default)g(comm)m(unicator)h
+Fu(MPI)p 1666 2487 V 33 w(COMM)p 1891 2487 V 34 w(WORLD)p
+Fw(.)e(In)h(general,)i(it)e(can)h(b)s(e)f(built)e(up)s(on)h(an)m(y)i
+(MPI)227 2600 y(comm)m(unicator.)k(Section)30 b(4.4)i(con)m(tains)f
+(the)f(details)f(ab)s(out)i(this)e(step.)111 2788 y(2.)46
+b(Set)31 b(up)e(the)i(input)d(matrix)i(and)g(the)g(righ)m(t-hand)f
+(side.)227 2901 y(This)37 b(example)i(uses)f(the)h(in)m(terface)g(with)
+f(the)h(distributed)d(input)h(matrices,)k(see)e(Section)g(4.2.2.)68
+b(In)227 3013 y(most)31 b(practical)e(applications,)g(the)h(matrices)g
+(can)g(b)s(e)f(generated)i(on)f(eac)m(h)h(pro)s(cess)f(without)f(the)h
+(need)227 3126 y(to)25 b(ha)m(v)m(e)h(a)f(cen)m(tralized)f(place)h(to)g
+(hold)e(them.)39 b(But)24 b(for)h(this)e(example,)j(w)m(e)f(let)f(pro)s
+(cess)g(0)h(read)f(the)h(input)227 3239 y(matrix)i(stored)g(on)g(disk)f
+(in)g(Harw)m(ell-Bo)s(eing)h(format)h([10)q(])f(\(a.k.a.)41
+b(compressed)27 b(column)g(storage\),)j(and)227 3352
+y(distribute)37 b(it)j(to)g(all)e(the)i(other)g(pro)s(cesses,)i(so)e
+(that)g(eac)m(h)h(pro)s(cess)e(only)g(o)m(wns)g(a)h(blo)s(c)m(k)f(of)h
+(ro)m(ws)g(of)227 3465 y(matrix.)g(The)27 b(righ)m(t-hand)g(side)g
+(matrix)h(is)f(generated)i(so)g(that)g(the)f(exact)i(solution)d(matrix)
+g(consists)h(of)227 3578 y(all)i(ones.)40 b(The)30 b(subroutine)f
+Fu(dcreate)p 1571 3578 V 32 w(matrix\(\))f Fw(accomplishes)i(this)f
+(task.)111 3766 y(3.)46 b(Initialize)29 b(the)h(input)f(argumen)m(ts:)
+41 b Fu(options,)k(ScalePermstruct,)e(LUstruct,)j(stat)p
+Fw(.)227 3879 y(The)28 b(input)e(argumen)m(t)j Fu(options)d
+Fw(con)m(trols)j(ho)m(w)f(the)g(linear)f(system)h(w)m(ould)f(b)s(e)h
+(solv)m(ed|use)f(equilibra-)227 3991 y(tion)h(or)h(not,)g(ho)m(w)g(to)g
+(order)f(the)h(ro)m(ws)f(and)g(the)h(columns)e(of)i(the)g(matrix,)f
+(use)h(iterativ)m(e)g(re\014nemen)m(t)f(or)227 4104 y(not.)58
+b(The)35 b(subroutine)f Fu(set)p 1239 4104 V 34 w(default)p
+1609 4104 V 32 w(options)p 1977 4104 V 33 w(dist\(\))g
+Fw(sets)i(the)h Fu(options)d Fw(argumen)m(t)i(so)g(that)h(the)227
+4217 y(solv)m(er)h(p)s(erforms)f(all)g(the)h(functionalit)m(y)-8
+b(.)63 b(Y)-8 b(ou)38 b(can)h(also)f(set)g(it)g(up)f(according)h(to)h
+(y)m(our)f(o)m(wn)g(needs,)227 4330 y(see)32 b(section)f(4.7.1)i(for)e
+(the)h(\014elds)d(of)j(this)e(structure.)42 b Fu(ScalePermstruct)27
+b Fw(is)j(the)i(data)g(structure)e(that)227 4443 y(stores)38
+b(the)g(sev)m(eral)g(v)m(ectors)h(describing)d(the)h(transformations)g
+(done)h(to)g Fv(A)p Fw(.)62 b Fu(LUstruct)36 b Fw(is)g(the)i(data)227
+4556 y(structure)31 b(in)f(whic)m(h)g(the)h(distributed)e
+Fv(L)i Fw(and)f Fv(U)41 b Fw(factors)32 b(are)g(stored.)44
+b Fu(Stat)30 b Fw(is)g(a)i(structure)e(collecting)227
+4669 y(the)h(statistics)f(ab)s(out)g(run)m(time)f(and)h(\015op)g(coun)m
+(t,)h(etc.)111 4857 y(4.)46 b(Call)29 b(the)i(Sup)s(erLU)d(routine)h
+Fu(pdgssvx\(\))p Fw(.)111 5044 y(5.)46 b(Release)31 b(the)g(pro)s(cess)
+f(grid)f(and)h(terminate)g(the)h(MPI)f(en)m(vironmen)m(t.)227
+5157 y(After)42 b(the)g(computation)g(on)g(a)g(pro)s(cess)g(grid)e(has)
+i(b)s(een)f(completed,)k(the)d(pro)s(cess)f(grid)g(should)f(b)s(e)227
+5270 y(released)26 b(b)m(y)f(a)h(call)f(to)h(the)g(Sup)s(erLU)d
+(routine)i Fu(superlu)p 2210 5270 V 32 w(gridexit\(\))p
+Fw(.)37 b(When)25 b(all)f(computations)i(ha)m(v)m(e)227
+5383 y(b)s(een)k(completed,)h(the)f(MPI)g(routine)g Fu(MPI)p
+1730 5383 V 33 w(Finalize\(\))e Fw(should)g(b)s(e)i(called.)1905
+5778 y(53)p eop
+%%Page: 54 55
+54 54 bop 0 280 a Fr(4.6)135 b(Algorithmic)46 b(bac)l(kground)0
+483 y Fw(Although)33 b(partial)f(piv)m(oting)h(is)f(used)h(in)f(b)s
+(oth)h(sequen)m(tial)g(and)g(shared-memory)g(parallel)f(factorization)i
+(al-)0 596 y(gorithms,)c(it)f(is)g(not)i(used)e(in)g(the)h
+(distributed-memory)d(parallel)h(algorithm,)i(b)s(ecause)g(it)g
+(requires)e(dynamic)0 709 y(adaptation)j(of)f(data)h(structure)f(and)g
+(load)g(balancing,)f(and)h(so)h(is)e(hard)g(to)i(mak)m(e)h(it)e
+(scalable.)40 b(W)-8 b(e)32 b(use)e(alter-)0 822 y(nativ)m(e)e(tec)m
+(hniques)g(to)h(stabilize)d(the)i(algorithm,)g(suas)g(as)g(statically)f
+(piv)m(ot)h(large)g(elemen)m(ts)h(to)f(the)g(diagonal,)0
+935 y(single-precision)37 b(diagonal)i(adjustmen)m(t)h(to)g(a)m(v)m
+(oid)h(small)d(piv)m(ots,)k(and)d(iterativ)m(e)i(re\014nemen)m(t.)69
+b(Figure)39 b(4.2)0 1048 y(sk)m(etc)m(hes)29 b(our)e(GESP)h(algorithm)e
+(\(Gaussian)i(elimination)d(with)h(Static)i(Piv)m(oting\).)40
+b(Numerical)26 b(exp)s(erimen)m(ts)0 1161 y(sho)m(w)k(that)h(for)f(a)h
+(wide)e(range)i(of)g(problems,)d(GESP)i(is)g(as)g(stable)g(as)h(GEPP)f
+([24)q(].)998 1429 y(Figure)g(4.2:)42 b(The)30 b(outline)f(of)h(the)h
+(GESP)f(algorithm.)157 1642 y(\(1\))h(P)m(erform)f(ro)m(w/column)g
+(equilibration)d(and)j(ro)m(w)g(p)s(erm)m(utation:)40
+b Fv(A)26 b Fq( )f Fv(P)2869 1656 y Fo(r)2927 1642 y
+Fq(\001)c Fv(D)3048 1656 y Fo(r)3106 1642 y Fq(\001)g
+Fv(A)f Fq(\001)h Fv(D)3361 1656 y Fo(c)3396 1642 y Fw(,)313
+1755 y(where)30 b Fv(D)651 1769 y Fo(r)720 1755 y Fw(and)f
+Fv(D)971 1769 y Fo(c)1037 1755 y Fw(are)h(diagonal)g(matrices)g(and)g
+Fv(P)2151 1769 y Fo(r)2220 1755 y Fw(is)f(a)i(ro)m(w)f(p)s(erm)m
+(utation)g(c)m(hosen)313 1868 y(to)h(mak)m(e)h(the)e(diagonal)g(large)g
+(compared)h(to)g(the)f(o\013-diagonal.)157 1981 y(\(2\))h(Find)e(a)i
+(column)e(p)s(erm)m(utation)g Fv(P)1491 1995 y Fo(c)1557
+1981 y Fw(to)i(preserv)m(e)f(sparsit)m(y:)40 b Fv(A)26
+b Fq( )f Fv(P)2665 1995 y Fo(c)2720 1981 y Fq(\001)c
+Fv(A)f Fq(\001)h Fv(P)2971 1948 y Fo(T)2958 2003 y(c)157
+2093 y Fw(\(3\))31 b(P)m(erform)f(sym)m(b)s(olic)f(analysis)g(to)i
+(determine)f(the)g(nonzero)h(structures)f(of)g Fv(L)g
+Fw(and)g Fv(U)10 b Fw(.)157 2206 y(\(4\))31 b(F)-8 b(actorize)32
+b Fv(A)26 b Fw(=)f Fv(L)20 b Fq(\001)g Fv(U)41 b Fw(with)29
+b(con)m(trol)i(of)f(diagonal)g(magnitude:)470 2319 y
+Fx(if)g Fw(\()h Fq(j)p Fv(a)700 2333 y Fo(ii)752 2319
+y Fq(j)26 b Fv(<)899 2254 y Fq(p)p 974 2254 43 4 v 974
+2319 a Fv(")21 b Fq(\001)f(k)p Fv(A)p Fq(k)1240 2333
+y FC(1)1311 2319 y Fw(\))31 b Fx(then)626 2432 y Fw(set)g
+Fv(a)816 2446 y Fo(ii)899 2432 y Fw(to)1010 2367 y Fq(p)p
+1086 2367 V 65 x Fv(")20 b Fq(\001)h(k)p Fv(A)p Fq(k)1352
+2446 y FC(1)470 2545 y Fx(endif)157 2658 y Fw(\(5\))31
+b(P)m(erform)f(triangular)f(solutions)g(using)g Fv(L)h
+Fw(and)g Fv(U)10 b Fw(.)157 2771 y(\(6\))31 b(If)f(needed,)g(use)g(an)h
+(iterativ)m(e)f(solv)m(er)h(lik)m(e)e(GMRES)i(or)f(iterativ)m(e)h
+(re\014nemen)m(t)f(\(sho)m(wn)g(b)s(elo)m(w\))470 2884
+y Fx(iterate)p Fw(:)626 2997 y Fv(r)e Fw(=)d Fv(b)20
+b Fq(\000)g Fv(A)h Fq(\001)f Fv(x)649 b(:)15 b(:)g(:)31
+b Fw(sparse)f(matrix-v)m(ector)i(m)m(ultiply)626 3110
+y(Solv)m(e)f Fv(A)20 b Fq(\001)g Fv(dx)26 b Fw(=)f Fv(r)525
+b(:)15 b(:)g(:)31 b Fw(triangular)e(solution)626 3238
+y Fv(ber)s(r)f Fw(=)d(max)1085 3252 y Fo(i)1287 3193
+y Fn(j)p Fo(r)r Fn(j)1361 3203 y Fd(i)p 1138 3217 397
+4 v 1138 3270 a FC(\()p Fn(j)p Fo(A)p Fn(j\001j)p Fo(x)p
+Fn(j)p FC(+)p Fn(j)p Fo(b)p Fn(j)p FC(\))1510 3280 y
+Fd(i)1785 3238 y Fv(:)15 b(:)g(:)31 b Fw(comp)s(onen)m(t)m(wise)g(bac)m
+(kw)m(ard)g(error)626 3365 y Fx(if)g Fw(\()f Fv(ber)s(r)e(>)d(")31
+b Fw(and)e Fv(ber)s(r)f Fq(\024)1622 3330 y FC(1)p 1622
+3345 36 4 v 1622 3397 a(2)1687 3365 y Fq(\001)21 b Fv(l)r(astber)s(r)32
+b Fw(\))f Fx(then)783 3478 y Fv(x)25 b Fw(=)g Fv(x)20
+b Fw(+)g Fv(dx)783 3591 y(l)r(astber)s(r)27 b Fw(=)e
+Fv(ber)s(r)783 3704 y Fx(goto)35 b(iterate)626 3817 y(endif)157
+3930 y Fw(\(7\))c(If)f(desired,)f(estimate)i(the)g(condition)e(n)m(um)m
+(b)s(er)g(of)h Fv(A)141 4253 y Fw(W)-8 b(e)29 b(ha)m(v)m(e)g
+(parallelized)d(the)i(most)g(time-consuming)e(steps)i(\(4\))h(to)g
+(\(7\).)41 b(The)27 b(prepro)s(cessing)f(and)h(analysis)0
+4366 y(steps)33 b(\(1\))g(to)h(\(3\))f(are)h(mostly)e(p)s(erformed)f
+(sequen)m(tially)g(at)j(presen)m(t.)47 b(If)32 b(the)h(distributed)d
+(input)h(in)m(terface)i(is)0 4479 y(used)h(\(Section)h(4.2.2\),)j(w)m
+(e)e(\014rst)e(gather)h(the)g(distributed)d(graph)i(of)h
+Fv(A)g Fw(\(and)g(the)g(v)-5 b(alue)34 b(of)h Fv(A)g
+Fw(if)f(step)h(\(1\))h(is)0 4592 y(needed\))30 b(on)m(to)i(one)f(pro)s
+(cessor.)40 b(W)-8 b(ork)31 b(is)f(underw)m(a)m(y)f(to)j(remo)m(v)m(e)f
+(this)f(sequen)m(tial)f(b)s(ottlenec)m(k.)141 4705 y(Step)c(\(1\))g(is)
+f(accomplished)f(b)m(y)i(a)g(w)m(eigh)m(ted)g(bipartite)e(matc)m(hing)i
+(algorithm)f(due)g(to)h(Du\013)g(and)f(Koster)h([9].)0
+4818 y(Curren)m(tly)-8 b(,)34 b(pro)s(cess)f(0)h(computes)g
+Fv(P)1302 4832 y Fo(r)1374 4818 y Fw(and)f(then)g(broadcasts)h(it)g(to)
+g(all)f(the)h(other)g(pro)s(cesses.)50 b(F)-8 b(or)35
+b(step)f(\(2\),)0 4931 y(w)m(e)d(pro)m(vide)f(sev)m(eral)g(ordering)g
+(options,)g(suc)m(h)g(as)h(m)m(ultiple)d(minim)m(um)f(degree)32
+b(ordering)d([25)q(])i(on)f(the)h(graphs)0 5044 y(of)k
+Fv(A)24 b Fw(+)f Fv(A)362 5011 y Fo(T)417 5044 y Fw(.)56
+b(The)35 b(user)f(can)i(use)f(an)m(y)g(other)h(ordering)e(in)g(place)h
+(of)g(these,)j(suc)m(h)c(as)i(an)f(ordering)f(based)h(on)0
+5157 y(graph)27 b(partitioning.)38 b(\(Note,)30 b(since)d(w)m(e)h(will)
+e(piv)m(ot)h(on)h(the)g(diagonal)f(in)f(step)i(\(4\),)i(an)d(ordering)g
+(based)g(on)h(the)0 5269 y(structure)g(of)i Fv(A)17 b
+Fw(+)g Fv(A)732 5236 y Fo(T)816 5269 y Fw(almost)29 b(alw)m(a)m(ys)h
+(yields)d(sparser)h(factors)i(than)f(that)g(based)g(on)g(the)g
+(structure)f(of)h Fv(A)3751 5236 y Fo(T)3807 5269 y Fv(A)p
+Fw(.)0 5382 y(This)i(is)g(di\013eren)m(t)i(from)f(Sup)s(erLU)e(and)i
+(Sup)s(erLU)p 1810 5382 28 4 v 31 w(MT,)h(where)f(w)m(e)h(can)g(piv)m
+(ot)f(o\013-diagonal.\))48 b(In)32 b(this)g(step,)0 5495
+y(ev)m(ery)f(pro)s(cess)f(runs)f(the)h(same)h(algorithm)f(indep)s
+(enden)m(tly)-8 b(.)1905 5778 y(54)p eop
+%%Page: 55 56
+55 55 bop 0 280 a Fr(4.7)135 b(User-callable)47 b(routines)0
+487 y Fm(4.7.1)112 b(Driv)m(er)37 b(routine)0 658 y Fw(There)20
+b(are)g(t)m(w)m(o)i(driv)m(er)d(routines)g(to)i(solv)m(e)g(systems)f
+(of)h(linear)d(equations,)k(whic)m(h)d(are)i(named)f
+Fu(pdgssvx)p 3566 658 29 4 v 32 w(ABglobal)0 771 y Fw(for)32
+b(the)g(global)g(input)e(in)m(terface,)j(and)f Fu(pdgssvx)e
+Fw(for)i(the)g(distributed)d(in)m(terface.)47 b(W)-8
+b(e)33 b(recommend)f(that)h(the)0 884 y(general)39 b(users,)i(esp)s
+(ecially)d(the)h(b)s(eginners,)h(use)f(a)g(driv)m(er)f(routine)h
+(rather)g(than)g(the)g(computational)g(rou-)0 997 y(tines,)f(b)s
+(ecause)f(correctly)g(using)e(the)i(driv)m(er)f(routine)f(do)s(es)i
+(not)g(require)e(thorough)i(understanding)d(of)j(the)0
+1110 y(underlying)d(data)j(structures.)59 b(Although)36
+b(the)h(in)m(terface)h(of)f(these)g(routines)f(are)h(simple,)f(w)m(e)i
+(exp)s(ect)f(their)0 1223 y(ric)m(h)i(functionalit)m(y)f(can)i(meet)h
+(the)f(requiremen)m(ts)f(of)h(most)g(applications.)67
+b Fu(Pdgssvx)p 3112 1223 V 33 w(ABglobal)p Fw(/)p Fu(pdgssvx)0
+1336 y Fw(p)s(erform)29 b(the)i(follo)m(wing)d(functions:)136
+1520 y Fq(\017)46 b Fw(Equilibrate)27 b(the)i(system)g(\(scale)h
+Fv(A)p Fw('s)f(ro)m(ws)g(and)g(columns)f(to)h(ha)m(v)m(e)i(unit)c
+(norm\))i(if)f Fv(A)h Fw(is)g(p)s(o)s(orly)e(scaled;)136
+1706 y Fq(\017)46 b Fw(Find)29 b(a)i(ro)m(w)f(p)s(erm)m(utation)g(that)
+h(mak)m(es)g(diagonal)f(of)g Fv(A)h Fw(large)f(relativ)m(e)h(to)g(the)f
+(o\013-diagonal;)136 1892 y Fq(\017)46 b Fw(Find)29 b(a)i(column)e(p)s
+(erm)m(utation)h(that)h(preserv)m(es)f(the)h(sparsit)m(y)e(of)i(the)f
+Fv(L)g Fw(and)g Fv(U)40 b Fw(factors;)136 2078 y Fq(\017)46
+b Fw(Solv)m(e)31 b(the)f(system)h Fv(AX)i Fw(=)25 b Fv(B)34
+b Fw(for)d Fv(X)37 b Fw(b)m(y)31 b(factoring)f Fv(A)h
+Fw(follo)m(w)m(ed)f(b)m(y)g(forw)m(ard)g(and)f(bac)m(k)j
+(substitutions;)136 2264 y Fq(\017)46 b Fw(Re\014ne)30
+b(the)h(solution)e Fv(X)7 b Fw(.)0 2504 y Fx(Options)35
+b(argumen)m(t)0 2675 y Fw(One)26 b(imp)s(ortan)m(t)g(input)f(argumen)m
+(t)i(to)g Fu(pdgssvx)p 1705 2675 V 33 w(ABglobal)p Fw(/)p
+Fu(pdgssvx)22 b Fw(is)k Fu(options)p Fw(,)g(whic)m(h)f(con)m(trols)i
+(ho)m(w)g(the)0 2788 y(linear)c(system)i(will)d(b)s(e)i(solv)m(ed.)39
+b(Although)23 b(the)i(algorithm)f(presen)m(ted)g(in)g(Figure)g(4.2)i
+(consists)e(of)h(sev)m(en)g(steps,)0 2901 y(for)36 b(some)h(matrices)f
+(not)h(all)e(steps)h(are)h(needed)e(to)i(get)h(accurate)g(solution.)57
+b(F)-8 b(or)37 b(example,)g(for)f(diagonally)0 3014 y(dominan)m(t)j
+(matrices,)k(c)m(ho)s(osing)d(the)h(diagonal)e(piv)m(ots)h(ensures)g
+(the)g(stabilit)m(y;)k(there)c(is)g(no)g(need)g(for)g(ro)m(w)0
+3127 y(piv)m(oting)f(in)f(step)h(\(1\).)70 b(In)39 b(another)g
+(situation)g(where)g(a)h(sequence)g(of)f(matrices)h(with)e(the)i(same)g
+(sparsit)m(y)0 3240 y(pattern)35 b(need)g(b)s(e)f(factorized,)j(the)f
+(column)d(p)s(erm)m(utation)i Fv(P)2189 3254 y Fo(c)2259
+3240 y Fw(\(and)f(also)h(the)h(ro)m(w)f(p)s(erm)m(utation)f
+Fv(P)3586 3254 y Fo(r)3624 3240 y Fw(,)j(if)d(the)0 3353
+y(n)m(umerical)d(v)-5 b(alues)33 b(are)g(similar\))d(need)j(b)s(e)f
+(computed)h(only)f(once,)j(and)d(reused)g(thereafter.)49
+b(\()p Fv(P)3402 3367 y Fo(r)3473 3353 y Fw(and)33 b
+Fv(P)3711 3367 y Fo(c)3779 3353 y Fw(are)0 3466 y(implemen)m(ted)39
+b(as)i(p)s(erm)m(utation)f(v)m(ectors)i Fu(perm)p 1718
+3466 V 34 w(r)e Fw(and)g Fu(perm)p 2219 3466 V 34 w(c)p
+Fw(.\))71 b(F)-8 b(or)42 b(the)f(ab)s(o)m(v)m(e)h(examples,)h(p)s
+(erforming)0 3578 y(all)g(sev)m(en)i(steps)f(do)s(es)f(more)i(w)m(ork)f
+(than)g(necessary)-8 b(.)82 b Fu(Options)42 b Fw(is)i(used)f(to)i
+(accommo)s(date)h(the)e(v)-5 b(arious)0 3691 y(requiremen)m(ts)29
+b(of)i(applications;)e(it)h(con)m(tains)g(the)h(follo)m(wing)e
+(\014elds:)136 3875 y Fq(\017)46 b Fu(Fact)227 3988 y
+Fw(This)31 b(option)g(sp)s(eci\014es)g(whether)h(or)g(not)h(the)f
+(factored)h(form)f(of)g(the)h(matrix)e Fv(A)i Fw(is)e(supplied)e(on)j
+(en)m(try)-8 b(,)227 4101 y(and)41 b(if)f(not,)k(ho)m(w)d(the)g(matrix)
+g Fv(A)g Fw(will)d(b)s(e)j(factored)h(base)f(on)g(some)h(assumptions)d
+(of)i(the)g(previous)227 4214 y(history)-8 b(.)40 b Fu(fact)30
+b Fw(can)g(b)s(e)g(one)h(of:)330 4400 y Fx({)45 b Fu(DOFACT)p
+Fw(:)29 b(the)i(matrix)e Fv(A)i Fw(will)d(b)s(e)h(factorized)i(from)f
+(scratc)m(h.)330 4545 y Fx({)45 b Fu(SamePattern)p Fw(:)51
+b(the)37 b(matrix)g Fv(A)g Fw(will)d(b)s(e)i(factorized)i(assuming)d
+(that)j(a)f(factorization)h(of)f(a)g(ma-)427 4658 y(trix)i(with)f(the)h
+(same)h(sparsit)m(y)f(pattern)g(w)m(as)h(p)s(erformed)e(prior)f(to)j
+(this)f(one.)67 b(Therefore,)42 b(this)427 4771 y(factorization)31
+b(will)d(reuse)i(column)f(p)s(erm)m(utation)h(v)m(ector)i
+Fu(perm)p 2670 4771 V 33 w(c)p Fw(.)330 4915 y Fx({)45
+b Fu(SampPattern)p 961 4915 V 32 w(SameRowPerm)p Fw(:)c(the)32
+b(matrix)g Fv(A)g Fw(will)e(b)s(e)i(factorized)g(assuming)f(that)i(a)g
+(factoriza-)427 5028 y(tion)h(of)h(a)g(matrix)f(with)f(the)i(same)g
+(sparsit)m(y)f(pattern)h(and)f(similar)e(n)m(umerical)h(v)-5
+b(alues)34 b(w)m(as)h(p)s(er-)427 5141 y(formed)f(prior)e(to)i(this)f
+(one.)51 b(Therefore,)35 b(this)e(factorization)h(will)d(reuse)j(b)s
+(oth)f(ro)m(w)h(and)f(column)427 5254 y(p)s(erm)m(utation)i(v)m(ectors)
+i Fu(perm)p 1465 5254 V 34 w(r)e Fw(and)g Fu(perm)p 1956
+5254 V 33 w(c)p Fw(,)i(b)s(oth)f(ro)m(w)f(and)h(column)e(scaling)h
+(factors)i Fv(D)3680 5268 y Fo(r)3754 5254 y Fw(and)427
+5367 y Fv(D)502 5381 y Fo(c)537 5367 y Fw(,)31 b(and)f(the)g
+(distributed)e(data)j(structure)f(set)g(up)g(from)g(the)g(previous)f
+(sym)m(b)s(olic)g(factorization.)330 5511 y Fx({)45 b
+Fu(FACTORED)p Fw(:)29 b(the)h(factored)h(form)f(of)h
+Fv(A)f Fw(is)g(input.)1905 5778 y(55)p eop
+%%Page: 56 57
+56 56 bop 136 280 a Fq(\017)46 b Fu(Equil)227 393 y Fw(This)29
+b(option)h(sp)s(eci\014es)f(whether)g(to)j(equilibrate)c(the)i(system.)
+136 567 y Fq(\017)46 b Fu(ColPerm)227 680 y Fw(This)29
+b(option)h(sp)s(eci\014es)f(the)h(column)f(ordering)h(metho)s(d)f(for)h
+(\014ll)f(reduction.)330 854 y Fx({)45 b Fu(NATURAL)p
+Fw(:)29 b(natural)g(ordering.)330 986 y Fx({)45 b Fu(MMD)p
+577 986 29 4 v 34 w(AT)p 707 986 V 34 w(PLUS)p 933 986
+V 33 w(A)p Fw(:)30 b(minim)m(um)e(degree)j(ordering)e(on)h(the)h
+(structure)f(of)g Fv(A)2956 953 y Fo(T)3032 986 y Fw(+)20
+b Fv(A)p Fw(.)330 1119 y Fx({)45 b Fu(MMD)p 577 1119
+V 34 w(ATA)p Fw(:)30 b(minim)m(um)d(degree)k(ordering)e(on)i(the)f
+(structure)g(of)h Fv(A)2697 1086 y Fo(T)2752 1119 y Fv(A)p
+Fw(.)330 1251 y Fx({)45 b Fu(COLAMD)p Fw(:)29 b(appro)m(ximate)i(minim)
+m(um)c(degree)k(column)f(ordering.)330 1383 y Fx({)45
+b Fu(MY)p 529 1383 V 34 w(PERMC)p Fw(:)29 b(use)h(the)h(ordering)e(giv)
+m(en)h(in)f Fu(perm)p 2065 1383 V 34 w(c)h Fw(input)e(b)m(y)i(the)h
+(user.)136 1557 y Fq(\017)46 b Fu(RowPerm)227 1670 y
+Fw(This)29 b(option)h(sp)s(eci\014es)f(ho)m(w)h(to)h(p)s(erm)m(ute)f
+(ro)m(ws)g(of)h(the)f(original)f(matrix.)330 1844 y Fx({)45
+b Fu(NATURAL)p Fw(:)29 b(use)h(the)h(natural)e(ordering.)330
+1976 y Fx({)45 b Fu(LargeDiag)p Fw(:)d(use)33 b(a)f(w)m(eigh)m(ted)h
+(bipartite)e(matc)m(hing)i(algorithm)e(to)i(p)s(erm)m(ute)f(the)g(ro)m
+(ws)h(to)g(mak)m(e)427 2089 y(the)e(diagonal)e(large)i(relativ)m(e)f
+(to)i(the)e(o\013-diagonal.)330 2221 y Fx({)45 b Fu(MY)p
+529 2221 V 34 w(PERMR)p Fw(:)29 b(use)h(the)h(ordering)e(giv)m(en)h(in)
+f Fu(perm)p 2065 2221 V 34 w(r)h Fw(input)e(b)m(y)i(the)h(user.)136
+2395 y Fq(\017)46 b Fu(ReplaceTinyPivot)227 2508 y Fw(This)19
+b(option)h(sp)s(eci\014es)f(whether)h(to)i(replace)e(the)h(tin)m(y)f
+(diagonals)g(b)m(y)2610 2443 y Fq(p)p 2685 2443 43 4
+v 2685 2508 a Fv(")r Fq(\001)q(jj)p Fv(A)p Fq(jj)h Fw(during)e
+Fv(LU)30 b Fw(factorization.)136 2682 y Fq(\017)46 b
+Fu(IterRefine)227 2795 y Fw(This)29 b(option)h(sp)s(eci\014es)f(ho)m(w)
+h(to)h(p)s(erform)e(iterativ)m(e)i(re\014nemen)m(t.)330
+2969 y Fx({)45 b Fu(NO)p Fw(:)30 b(no)h(iterativ)m(e)f(re\014nemen)m
+(t.)330 3101 y Fx({)45 b Fu(DOUBLE)p Fw(:)29 b(accum)m(ulate)i
+(residual)e(in)g(double)g(precision.)330 3233 y Fx({)45
+b Fu(EXTRA)p Fw(:)29 b(accum)m(ulate)j(residual)c(in)h(extra)i
+(precision.)39 b(\()p Fp(not)34 b(yet)e(implemente)-5
+b(d.)p Fw(\))136 3407 y Fq(\017)46 b Fu(SolveInitialized)26
+b Fw(\(Used)31 b(only)e(b)m(y)i(the)f(distributed)e(input)g(in)m
+(terface\))227 3520 y(This)h(option)h(sp)s(eci\014es)f(whether)g(the)i
+(initialization)c(has)j(b)s(een)g(p)s(erformed)f(to)i(the)g(triangular)
+d(solv)m(e.)136 3694 y Fq(\017)46 b Fu(RefineInitialized)26
+b Fw(\(Used)31 b(only)e(b)m(y)h(the)h(distributed)c(input)i(in)m
+(terface\))227 3807 y(This)21 b(option)h(sp)s(eci\014es)e(whether)i
+(the)h(initialization)c(has)j(b)s(een)f(p)s(erformed)g(to)i(the)g
+(sparse)f(matrix-v)m(ector)227 3920 y(m)m(ultiplication)28
+b(routine)h(needed)h(in)f(the)i(iterativ)m(e)f(re\014nemen)m(t.)136
+4094 y Fq(\017)46 b Fu(PrintStat)227 4207 y Fw(Sp)s(eci\014es)29
+b(whether)h(to)h(prin)m(t)e(the)h(solv)m(er's)h(statistics.)141
+4360 y(There)36 b(is)g(a)i(routine)d(named)i Fu(set)p
+1360 4360 29 4 v 33 w(default)p 1729 4360 V 33 w(options)p
+2098 4360 V 32 w(dist\(\))e Fw(that)j(sets)f(the)g(default)f(v)-5
+b(alues)36 b(of)h(these)0 4473 y(options,)30 b(whic)m(h)f(are:)191
+4626 y Fu(fact)667 b(=)47 b(DOFACT)524 b(/*)47 b(factor)f(from)h
+(scratch)f(*/)191 4739 y(equil)619 b(=)47 b(YES)191 4852
+y(colperm)523 b(=)47 b(MMD_AT_PLUS_A)191 4965 y(rowperm)523
+b(=)47 b(LargeDiag)380 b(/*)47 b(use)g(MC64)g(*/)191
+5077 y(ReplaceTinyPivot)91 b(=)47 b(YES)191 5190 y(IterRefine)379
+b(=)47 b(DOUBLE)191 5303 y(SolveInitialized)91 b(=)47
+b(NO)191 5416 y(RefineInitialized)c(=)k(NO)191 5529 y(PrintStat)427
+b(=)47 b(YES)1905 5778 y Fw(56)p eop
+%%Page: 57 58
+57 57 bop 0 280 a Fm(4.7.2)112 b(Computational)36 b(routines)0
+452 y Fw(The)45 b(exp)s(erienced)f(users)g(can)h(in)m(v)m(ok)m(e)i(the)
+e(follo)m(wing)f(computational)g(routines)g(to)i(directly)e(con)m(trol)
+i(the)0 565 y(b)s(eha)m(vior)29 b(of)i Fu(SuperLU)p 817
+565 29 4 v 32 w(DIST)f Fw(in)f(order)h(to)h(meet)g(their)e(requiremen)m
+(ts.)136 753 y Fq(\017)46 b Fu(pdgstrf\(\))p Fw(:)38
+b(F)-8 b(actorize)33 b(in)c(parallel.)227 865 y(This)h(routine)g
+(factorizes)i(the)f(input)f(matrix)g Fv(A)i Fw(\(or)f(the)h(scaled)f
+(and)f(p)s(erm)m(uted)g Fv(A)p Fw(\).)44 b(It)31 b(assumes)g(that)227
+978 y(the)g(distributed)d(data)j(structures)f(for)g Fv(L)h
+Fw(and)f Fv(U)40 b Fw(factors)32 b(are)f(already)f(set)h(up,)f(and)g
+(the)h(initial)d(v)-5 b(alues)227 1091 y(of)32 b Fv(A)f
+Fw(are)h(loaded)e(in)m(to)i(the)f(data)h(structures.)43
+b(If)31 b(not,)h(the)f(routine)f Fu(symbfact\(\))f Fw(should)g(b)s(e)i
+(called)f(to)227 1204 y(determine)37 b(the)g(nonzero)h(patterns)f(of)h
+(the)f(factors,)j(and)d(the)g(routine)g Fu(pddistribute\(\))c
+Fw(should)j(b)s(e)227 1317 y(called)30 b(to)h(distribute)d(the)i
+(matrix.)40 b Fu(Pdgstrf\(\))28 b Fw(can)j(factor)g(non-square)f
+(matrices.)136 1505 y Fq(\017)46 b Fu(pdgstrs\(\)/pdgstrs)p
+1049 1505 V 30 w(Bglobal\(\))p Fw(:)38 b(T)-8 b(riangular)29
+b(solv)m(e)h(in)f(parallel.)227 1618 y(This)39 b(routine)h(solv)m(es)g
+(the)h(system)g(b)m(y)f(forw)m(ard)g(and)g(bac)m(k)h(substitutions)d
+(using)h(the)i(the)g Fv(L)f Fw(and)g Fv(U)227 1731 y
+Fw(factors)c(computed)e(b)m(y)g Fu(pdgstrf\(\))p Fw(.)50
+b Fu(Pdgstrs\(\))32 b Fw(tak)m(es)k(distributed)31 b
+Fv(B)5 b Fw(.)53 b(F)-8 b(or)35 b Fu(pdgstrs)p 3419 1731
+V 32 w(Bglobal\(\))p Fw(,)227 1843 y Fv(B)g Fw(m)m(ust)30
+b(b)s(e)g(globally)f(a)m(v)-5 b(ailable)30 b(on)g(all)f(pro)s(cesses.)
+136 2031 y Fq(\017)46 b Fu(pdgsrfs\(\)/pdgsrfs)p 1049
+2031 V 30 w(ABXglobal\(\))p Fw(:)38 b(Re\014ne)30 b(solution)f(in)g
+(parallel.)227 2144 y(Giv)m(en)44 b Fv(A)p Fw(,)49 b(its)43
+b(factors)j Fv(L)e Fw(and)f Fv(U)10 b Fw(,)48 b(and)c(an)g(initial)e
+(solution)h Fv(X)7 b Fw(,)48 b(this)43 b(routine)h(p)s(erforms)e
+(iterativ)m(e)227 2257 y(re\014nemen)m(t.)f Fu(Pdgsrfs\(\))27
+b Fw(tak)m(es)k(distributed)c Fv(A)p Fw(,)j Fv(B)k Fw(and)29
+b Fv(X)7 b Fw(.)41 b(F)-8 b(or)31 b Fu(pdgsrfs)p 2921
+2257 V 32 w(ABXglobal\(\))p Fw(,)c Fv(A)p Fw(,)j Fv(B)35
+b Fw(and)227 2370 y Fv(X)j Fw(m)m(ust)30 b(b)s(e)g(globally)f(a)m(v)-5
+b(ailable)30 b(on)g(all)f(pro)s(cesses.)0 2613 y Fm(4.7.3)112
+b(Utilit)m(y)35 b(routines)0 2785 y Fw(The)28 b(follo)m(wing)e(utilit)m
+(y)h(routines)g(can)h(help)f(users)g(create)j(and)e(destro)m(y)g(the)h
+Fu(SuperLU)p 3023 2785 V 32 w(DIST)e Fw(matrices.)40
+b(These)0 2898 y(routines)27 b(reside)g(in)g(three)i(places:)39
+b Fu(SRC/util.c)p Fw(,)26 b Fu(SRC/)p Fq(f)p Fu(d,z)p
+Fq(g)p Fu(util.c)p Fw(,)g(and)i Fu(SRC/pd,zutil.c)p Fw(.)36
+b(Most)29 b(of)g(the)0 3011 y(utilit)m(y)38 b(routines)h(in)g(sequen)m
+(tial)g Fu(SuperLU)g Fw(can)h(also)g(b)s(e)f(used)h(in)e
+Fu(SuperLU)p 2742 3011 V 33 w(DIST)h Fw(for)g(the)i(lo)s(cal)e(data,)k
+(see)0 3124 y(Section)27 b(2.8.3.)41 b(Here,)28 b(w)m(e)g(only)d(list)h
+(those)h(new)g(routines)e(sp)s(eci\014c)h(to)h Fu(SuperLU)p
+2803 3124 V 33 w(DIST)p Fw(.)f(Note)i(that)f(in)f(order)g(to)0
+3237 y(a)m(v)m(oid)34 b(name)g(clash)e(b)s(et)m(w)m(een)j
+Fu(SuperLU)c Fw(and)i Fu(SuperLU)p 1963 3237 V 32 w(DIST)p
+Fw(,)g(w)m(e)h(app)s(end)e(\\)p 2751 3237 V 35 w Fu(dist)p
+Fw(")g(to)j(eac)m(h)f(routine)f(name)0 3349 y(in)c Fu(SuperLU)p
+448 3349 V 33 w(DIST)p Fw(.)191 3562 y Fu(/*)47 b(Create)f(a)i
+(supermatrix)c(in)k(distributed)c(compressed)h(row)i(format.)f(A)h(is)h
+(output.)d(*/)191 3675 y(dCreate_CompRowLoc_Matri)o(x_di)o(st\()o(Supe)
+o(rMat)o(rix)c(*A,)47 b(int_t)f(m,)i(int_t)e(n,)1670
+3788 y(int_t)h(nnz_loc,)e(int_t)i(m_loc,)f(int_t)g(fst_row,)1670
+3901 y(double)h(*nzval,)e(int_t)i(*colind,)e(int_t)i(*rowptr,)1670
+4014 y(Stype_t)f(stype,)g(Dtype_t)g(dtype,)g(Mtype_t)g(mtype\);)191
+4239 y(/*)h(Deallocate)e(the)i(supermatrix)e(in)i(distributed)e
+(compressed)g(row)i(format.)e(*/)191 4352 y(Destroy_CompRowLoc_Matri)o
+(x_di)o(st\()o(Supe)o(rMat)o(rix)c(*A\);)191 4578 y(/*)47
+b(Allocate)f(storage)f(in)j(*ScalePermstruct.)43 b(*/)191
+4691 y(ScalePermstructInit\(cons)o(t)f(int_t)k(m,)h(const)g(int_t)f(n,)
+1145 4804 y(ScalePermstruct_t)e(*ScalePermstruct\);)191
+5030 y(/*)j(Deallocate)e(ScalePermstruct)f(*/)191 5143
+y(ScalePermstructFree\(Scal)o(ePer)o(mst)o(ruct)o(_t)e
+(*ScalePermstruct\);)191 5369 y(/*)47 b(Allocate)f(storage)f(in)j
+(*LUstruct.)d(*/)191 5481 y(LUstructInit\(const)e(int_t)j(m,)h(const)g
+(int_t)f(n,)h(LUstruct_t)e(*LUstruct\);)1905 5778 y Fw(57)p
+eop
+%%Page: 58 59
+58 58 bop 191 393 a Fu(/*)47 b(Deallocate)e(the)i(distributed)e(L)i(&)h
+(U)f(factors)f(in)h(*LUstruct.)e(*/)191 506 y(Destroy_LU\(int_t)e(n,)k
+(gridinfo_t)e(*grid,)i(LUstruct_t)e(*LUstruct\);)191
+732 y(/*)i(Deallocate)e(*LUstruct.)g(*/)191 845 y
+(LUstructFree\(LUstruct_t)c(*LUstruct\);)191 1071 y(/*)47
+b(Initialize)e(the)i(statistics)e(variable.)g(*/)191
+1184 y(PStatInit\(SuperLUStat_t)c(*stat\);)191 1409 y(/*)47
+b(Print)f(the)h(statistics.)e(*/)191 1522 y(PStatPrint\(superlu_optio)o
+(ns_t)c(*options,)k(SuperLUStat_t)f(*stat,)716 1635 y(gridinfo_t)h
+(*grid\);)191 1861 y(/*)i(Deallocate)e(the)i(statistics)e(variable.)g
+(*/)191 1974 y(PStatFree\(SuperLUStat_t)c(*stat\);)0
+2258 y Fr(4.8)135 b(Installation)0 2464 y Fm(4.8.1)112
+b(File)37 b(structure)0 2636 y Fw(The)30 b(top)g(lev)m(el)h(Sup)s(erLU)
+p 918 2636 28 4 v 30 w(DIST/)g(directory)e(is)h(structured)f(as)i
+(follo)m(ws:)191 2810 y Fu(SuperLU_DIST/README)186 b(instructions)44
+b(on)j(installation)191 2923 y(SuperLU_DIST/CBLAS/)186
+b(needed)46 b(BLAS)g(routines)g(in)h(C,)g(not)g(necessarily)e(fast)191
+3036 y(SuperLU_DIST/EXAMPLE/)90 b(example)45 b(programs)191
+3149 y(SuperLU_DIST/INSTALL/)90 b(test)46 b(machine)g(dependent)f
+(parameters;)g(the)i(Users')f(Guide.)191 3261 y(SuperLU_DIST/SRC/)282
+b(C)47 b(source)f(code,)h(to)g(be)g(compiled)e(into)i(a)h(library)191
+3374 y(SuperLU_DIST/Makefile)90 b(top)47 b(level)f(Makefile)f(that)i
+(does)g(installation)d(and)j(testing)191 3487 y(SuperLU_DIST/MAKE_INC)
+90 b(sample)46 b(machine-specific)d(make.inc)j(files)191
+3600 y(SuperLU_DIST/make.inc)90 b(compiler,)45 b(compile)h(flags,)g
+(library)g(definitions)e(and)j(C)1289 3713 y(preprocessor)d
+(definitions,)h(included)g(in)i(all)g(Makefiles.)1289
+3826 y(\(You)f(may)h(need)g(to)g(edit)g(it)g(to)g(be)g(suitable)f(for)h
+(your)1336 3939 y(system)f(before)h(compiling)e(the)i(whole)f
+(package.\))141 4113 y Fw(Before)33 b(installing)d(the)i(pac)m(k)-5
+b(age,)35 b(y)m(ou)e(ma)m(y)g(need)f(to)h(edit)f Fu(SuperLU)p
+2574 4113 29 4 v 32 w(DIST/make.inc)d Fw(for)j(y)m(our)h(system.)0
+4226 y(This)27 b(mak)m(e)k(include)c(\014le)h(is)g(referenced)i(inside)
+d(eac)m(h)j(of)g(the)f(Mak)m(e\014les)h(in)e(the)h(v)-5
+b(arious)29 b(sub)s(directories.)37 b(As)30 b(a)0 4339
+y(result,)e(there)i(is)e(no)h(need)f(to)i(edit)e(the)i(Mak)m(e\014les)f
+(in)f(the)h(sub)s(directories.)38 b(All)27 b(information)h(that)h(is)f
+(mac)m(hine)0 4452 y(sp)s(eci\014c)h(has)h(b)s(een)g(de\014ned)f(in)g
+(this)g(include)g(\014le.)141 4565 y(Sample)20 b(mac)m(hine-sp)s
+(eci\014c)f Fu(make.inc)g Fw(are)i(pro)m(vided)e(in)h(the)h
+Fu(MAKE)p 2463 4565 V 33 w(INC/)f Fw(directory)g(for)h(sev)m(eral)g
+(platforms,)0 4678 y(suc)m(h)30 b(as)h(Cra)m(y)g(T3E)g(and)f(IBM)h(SP)
+-8 b(.)31 b(When)g(y)m(ou)g(ha)m(v)m(e)h(selected)f(the)g(mac)m(hine)f
+(to)i(whic)m(h)d(y)m(ou)j(wish)d(to)i(install)0 4790
+y Fu(superlud)p Fw(,)c(y)m(ou)i(ma)m(y)h(cop)m(y)f(the)g(appropriate)f
+(sample)g(include)f(\014le)h(\(if)g(one)h(is)f(presen)m(t\))h(in)m(to)g
+Fu(make.inc)p Fw(.)38 b(F)-8 b(or)0 4903 y(example,)30
+b(if)g(y)m(ou)g(wish)f(to)i(run)e(on)h(a)h(Cra)m(y)f(T3E,)h(y)m(ou)g
+(can)f(do:)381 5016 y Fu(cp)47 b(MAKE)p 722 5016 V 34
+w(INC/make.t3e)d(make.inc)141 5129 y Fw(F)-8 b(or)39
+b(the)g(systems)g(other)g(than)f(those)h(listed)e(ab)s(o)m(v)m(e,)42
+b(sligh)m(t)c(mo)s(di\014cations)f(to)i(the)g Fu(make.inc)d
+Fw(\014le)i(will)0 5242 y(need)30 b(to)h(b)s(e)f(made.)41
+b(In)29 b(particular,)g(the)i(follo)m(wing)e(items)h(should)e(b)s(e)i
+(examined:)111 5416 y(1.)46 b(The)30 b(BLAS)g(library)-8
+b(.)227 5529 y(If)20 b(there)h(is)e(a)i(BLAS)f(library)e(a)m(v)-5
+b(ailable)20 b(on)g(y)m(our)h(mac)m(hine,)h(y)m(ou)f(ma)m(y)g(de\014ne)
+e(the)i(follo)m(wing)e(in)g Fu(make.inc)p Fw(:)1905 5778
+y(58)p eop
+%%Page: 59 60
+59 59 bop 467 280 a Fu(BLASDEF)46 b(=)i(-DUSE)p 1191
+280 29 4 v 33 w(VENDOR)p 1512 280 V 32 w(BLAS)467 380
+y(BLASLIB)e(=)i(<BLAS)e(library)g(you)h(wish)f(to)h(link)g(with>)227
+530 y Fw(The)41 b Fu(CBLAS/)e Fw(sub)s(directory)h(con)m(tains)h(the)g
+(part)g(of)h(the)f(BLAS)g(\(in)g(C\))g(needed)g(b)m(y)g
+Fu(SuperLU)p 3683 530 V 32 w(DIST)227 643 y Fw(pac)m(k)-5
+b(age.)41 b(Ho)m(w)m(ev)m(er,)26 b(these)e(routines)e(are)h(in)m
+(tended)f(for)h(use)g(only)f(if)g(there)h(is)f(no)h(faster)g(implemen)m
+(tation)227 756 y(of)31 b(the)f(BLAS)h(already)f(a)m(v)-5
+b(ailable)29 b(on)i(y)m(our)f(mac)m(hine.)40 b(In)30
+b(this)f(case,)j(y)m(ou)f(should)d(do)i(the)h(follo)m(wing:)301
+942 y(1\))46 b(In)30 b(mak)m(e.inc,)h(unde\014ne)e(\(commen)m(t)i
+(out\))g(BLASDEF,)g(de\014ne:)667 1071 y Fu(BLASLIB)46
+b(=)i(../blas$\(PLAT\).a)301 1216 y Fw(2\))e(A)m(t)32
+b(the)e(top)h(lev)m(el)f(Sup)s(erLU)p 1446 1216 28 4
+v 31 w(DIST)f(directory)-8 b(,)31 b(t)m(yp)s(e:)667 1345
+y Fu(make)47 b(blaslib)427 1474 y Fw(to)31 b(create)h(the)f(BLAS)f
+(library)e(from)i(the)h(routines)e(in)g Fu(CBLAS/)f Fw(sub)s(directory)
+-8 b(.)111 1660 y(2.)46 b(C)30 b(prepro)s(cessor)g(de\014nition)e
+Fu(CDEFS)p Fw(.)227 1773 y(In)22 b(the)i(header)e(\014le)g
+Fu(SRC/Cnames.h)p Fw(,)g(w)m(e)h(use)g(macros)g(to)h(determine)e(ho)m
+(w)h(C)f(routines)g(should)f(b)s(e)h(named)227 1886 y(so)31
+b(that)g(they)f(are)h(callable)e(b)m(y)i(F)-8 b(ortran.)1671
+1853 y FC(1)1752 1886 y Fw(The)29 b(p)s(ossible)f(options)i(for)g
+Fu(CDEFS)f Fw(are:)336 2072 y Fq(\017)46 b Fu(-DAdd)p
+673 2072 29 4 v 33 w Fw(:)41 b(F)-8 b(ortran)31 b(exp)s(ects)g(a)f(C)g
+(routine)g(to)h(ha)m(v)m(e)h(an)e(underscore)f(p)s(ost\014xed)h(to)h
+(the)f(name;)336 2217 y Fq(\017)46 b Fu(-DNoChange)p
+Fw(:)38 b(F)-8 b(ortran)31 b(exp)s(ects)g(a)g(C)f(routine)f(name)i(to)g
+(b)s(e)e(iden)m(tical)h(to)h(that)g(compiled)d(b)m(y)j(C;)336
+2362 y Fq(\017)46 b Fu(-DUpCase)p Fw(:)39 b(F)-8 b(ortran)31
+b(exp)s(ects)g(a)f(C)g(routine)g(name)g(to)h(b)s(e)f(all)f(upp)s
+(ercase.)141 2549 y(A)36 b Fu(Makefile)e Fw(is)h(pro)m(vided)g(in)f
+(eac)m(h)j(sub)s(directory)-8 b(.)56 b(The)36 b(installation)e(can)i(b)
+s(e)f(done)h(completely)g(auto-)0 2661 y(matically)29
+b(b)m(y)i(simply)d(t)m(yping)h Fu(make)h Fw(at)h(the)f(top)h(lev)m(el.)
+0 2904 y Fm(4.8.2)112 b(P)m(erformance-tuning)37 b(parameters)0
+3076 y Fw(Similar)26 b(to)j(sequen)m(tial)f(Sup)s(erLU,)f(sev)m(eral)i
+(p)s(erformance)f(related)g(parameters)h(are)g(set)h(in)d(the)i
+(inquiry)d(func-)0 3189 y(tion)k Fu(sp)p 289 3189 V 34
+w(ienv\(\))p Fw(.)39 b(The)30 b(declaration)g(of)g(this)f(function)g
+(is)141 3362 y Fu(int)47 b(sp)p 434 3362 V 34 w(ienv\(int)e(ispec\);)
+141 3535 y(Ispec)29 b Fw(sp)s(eci\014es)g(the)i(parameter)g(to)g(b)s(e)
+e(returned)1928 3502 y FC(2)1967 3535 y Fw(:)318 3719
+y(isp)s(ec)d(=)k(2:)42 b(the)30 b(relaxation)g(parameter)h(to)g(con)m
+(trol)g(sup)s(erno)s(de)d(amalgamation)540 3832 y(=)i(3:)42
+b(the)30 b(maxim)m(um)f(allo)m(w)m(able)h(size)g(for)h(a)f(blo)s(c)m(k)
+540 3945 y(=)g(6:)42 b(the)30 b(estimated)h(\014lls)d(factor)j(for)f
+(the)h(adjacency)g(structures)f(of)g Fv(L)h Fw(and)e
+Fv(U)141 4130 y Fw(The)24 b(v)-5 b(alues)23 b(to)h(b)s(e)g(returned)e
+(ma)m(y)j(b)s(e)e(set)i(di\013eren)m(tly)d(on)i(di\013eren)m(t)f(mac)m
+(hines.)39 b(The)23 b(setting)h(of)g(maxim)m(um)0 4243
+y(blo)s(c)m(k)c(size)h(\(parameter)h(3\))g(should)d(tak)m(e)j(in)m(to)f
+(accoun)m(t)h(the)f(lo)s(cal)g(Lev)m(el)g(3)g(BLAS)g(sp)s(eed,)h(the)f
+(load)g(balance)g(and)0 4355 y(the)30 b(degree)g(of)f(parallelism.)37
+b(Small)28 b(blo)s(c)m(k)h(size)g(ma)m(y)h(result)e(in)g(b)s(etter)h
+(load)g(balance)h(and)e(more)i(parallelism,)0 4468 y(but)g(p)s(o)s(or)f
+(individual)d(no)s(de)k(p)s(erformance,)f(and)h(vice)h(v)m(ersa)g(for)f
+(large)g(blo)s(c)m(k)g(size.)0 4754 y Fr(4.9)135 b(Example)46
+b(programs)0 4957 y Fw(In)27 b(the)h Fu(SuperLU)p 607
+4957 V 33 w(DIST/EXAMPLE/)c Fw(directory)-8 b(,)28 b(w)m(e)h(presen)m
+(t)f(a)g(few)g(sample)f(programs)g(to)i(illustrate)d(the)i(com-)0
+5070 y(plete)e(calling)g(sequences)h(to)g(use)f(the)h(exp)s(ert)f(driv)
+m(er)g(to)h(solv)m(e)g(systems)g(of)g(equations.)39 b(These)26
+b(include)f(ho)m(w)h(to)0 5183 y(set)33 b(up)e(the)i(pro)s(cess)e(grid)
+h(and)f(the)i(input)d(matrix,)i(ho)m(w)h(to)g(obtain)f(a)g
+(\014ll-reducing)e(ordering.)45 b(A)32 b Fu(Makefile)p
+0 5261 1560 4 v 104 5315 a Fi(1)138 5346 y Fg(Some)h(v)n
+(endor-supplied)g(BLAS)g(libraries)i(do)f(not)g(ha)n(v)n(e)f(C)h(in)n
+(terfaces.)61 b(So)34 b(the)f(re-naming)g(is)i(needed)e(in)h(order)g
+(for)g(the)0 5438 y(Sup)r(erLU)24 b(BLAS)i(calls)h(\(in)e(C\))h(to)g
+(in)n(terface)h(with)f(the)f(F)-6 b(ortran-st)n(yle)25
+b(BLAS.)104 5497 y Fi(2)138 5529 y Fg(The)h(n)n(um)n(b)r(ering)e(of)j
+(2,)f(3)g(and)f(6)h(is)g(consisten)n(t)h(with)f(that)f(used)g(in)h(Sup)
+r(erLU)e(and)i(Sup)r(erLU)p 2950 5529 24 4 v 26 w(MT.)1905
+5778 y Fw(59)p eop
+%%Page: 60 61
+60 60 bop 0 280 a Fw(is)36 b(pro)m(vided)g(to)i(generate)h(the)e
+(executables.)61 b(A)38 b Fu(README)d Fw(\014le)h(in)g(this)g
+(directory)h(sho)m(ws)g(ho)m(w)g(to)h(run)d(these)0 393
+y(examples.)53 b(The)34 b(leading)g(commen)m(t)h(in)e(eac)m(h)j
+(routine)e(describ)s(es)f(the)i(functionalit)m(y)e(of)h(the)h(example.)
+53 b(The)0 506 y(t)m(w)m(o)26 b(basic)e(examples)g(are)h
+Fu(pddrive)p 1262 506 29 4 v 32 w(ABglobal\(\))d Fw(and)i
+Fu(pddrive\(\))p Fw(.)36 b(The)24 b(\014rst)g(sho)m(ws)g(ho)m(w)g(to)i
+(use)e(the)h(global)0 619 y(input)j(in)m(terface,)k(and)d(the)i(second)
+f(sho)m(ws)g(ho)m(w)h(to)g(use)f(the)h(distributed)c(input)h(in)m
+(terface.)0 906 y Fr(4.10)136 b(F)-11 b(ortran)44 b(90)i(In)l(terface)0
+1108 y Fw(W)-8 b(e)43 b(dev)m(elop)s(ed)e(a)h(complete)g(F)-8
+b(ortran)42 b(90)h(in)m(terface)f(for)g Fu(SuperLU)p
+2430 1108 V 32 w(DIST)p Fw(.)f(All)f(the)i(in)m(terface)g(\014les)f
+(and)g(an)0 1221 y(example)35 b(driv)m(er)g(program)g(are)h(lo)s(cated)
+g(in)e(the)i Fu(SuperLU)p 2092 1221 V 32 w(DIST/FORTRAN/)c
+Fw(directory)-8 b(.)56 b(T)-8 b(able)35 b(4.1)i(lists)d(all)0
+1334 y(the)d(\014les.)50 1504 y FA(f)p 80 1504 25 4 v
+30 w(p)r(ddriv)n(e.f90)397 b(An)28 b(example)f(F)-7 b(ortran)27
+b(driv)n(er)f(routine.)50 1703 y(sup)r(erlu)p 321 1703
+V 30 w(mo)r(d.f90)272 b(F)-7 b(ortran)26 b(90)h(mo)r(dule)h(that)g
+(de\014nes)f(the)h(in)n(terface)f(functions)h(to)g(access)e
+Fc(SuperLU)p 3564 1703 27 4 v 29 w(DIST)p FA('s)909 1803
+y(data)h(structures.)50 2002 y(sup)r(erlupara.f90)298
+b(It)28 b(con)n(tains)e(parameters)g(that)i(corresp)r(ond)e(to)i
+Fc(SuperLU)p 2772 2002 V 28 w(DIST)p FA('s)e(en)n(ums.)50
+2201 y(h)n(b)r(co)r(de1.f90)429 b(F)-7 b(ortran)26 b(function)i(for)g
+(reading)e(a)h(sparse)f(Harw)n(ell-Bo)r(eing)g(matrix)h(from)909
+2301 y(the)h(\014le.)50 2500 y(sup)r(erlu)p 321 2500
+25 4 v 30 w(c2f)p 455 2500 V 29 w(wrap.c)189 b(C)28 b(wrapp)r(er)e
+(functions,)i(callable)f(from)g(F)-7 b(ortran.)36 b(The)28
+b(functions)f(fall)909 2600 y(in)n(to)g(three)h(classes:)35
+b(1\))28 b(Those)f(that)g(allo)r(cate)g(a)g(structure)g(and)h(return)
+909 2699 y(a)f(handle,)h(or)e(deallo)r(cate)h(the)h(memory)f(of)g(a)h
+(structure.)36 b(2\))27 b(Those)g(that)909 2799 y(get)g(or)g(set)h(the)
+g(v)-5 b(alue)27 b(of)h(a)f(comp)r(onen)n(t)g(of)h(a)f(struct.)37
+b(3\))27 b(Those)g(that)909 2898 y(are)g(wrapp)r(ers)f(for)h
+Fc(SuperLU)p 1846 2898 27 4 v 28 w(DIST)f FA(functions.)50
+3098 y(dcreate)p 319 3098 25 4 v 29 w(dist)p 482 3098
+V 30 w(matrix.c)99 b(C)28 b(function)g(for)f(distributing)g(the)h
+(matrix)g(in)f(a)h(distributed)909 3197 y(compressed)e(ro)n(w)h
+(format.)524 3382 y Fw(T)-8 b(able)30 b(4.1:)42 b(The)30
+b(F)-8 b(ortran)31 b(90)g(in)m(terface)g(\014les)e(and)h(an)g(example)g
+(driv)m(er)g(routine.)141 3612 y(Note)h(that)f(in)e(this)h(in)m
+(terface,)h(all)e(ob)5 b(jects)31 b(\(suc)m(h)e(as)h
+Ft(grid)p Fw(,)g Ft(options)p Fw(,)g(etc.\))42 b(in)28
+b Fu(SuperLU)p 3210 3612 29 4 v 32 w(DIST)h Fw(are)h
+Fp(op)-5 b(aque)p Fw(,)0 3725 y(meaning)39 b(their)f(size)h(and)g
+(structure)g(are)h(not)g(visible)d(to)j(the)f(F)-8 b(ortran)40
+b(user.)68 b(These)39 b(opaque)g(ob)5 b(jects)41 b(are)0
+3838 y(allo)s(cated,)g(deallo)s(cated)d(and)g(op)s(erated)h(in)e(the)h
+(C)g(side)g(and)g(not)g(directly)f(accessible)i(from)f(F)-8
+b(ortran)39 b(side.)0 3951 y(They)33 b(can)h(only)e(b)s(e)h(accessed)i
+(via)e Fp(hand)5 b(les)43 b Fw(that)34 b(exist)f(in)f(F)-8
+b(ortran's)34 b(user)f(space.)51 b(In)33 b(F)-8 b(ortran,)35
+b(all)e(handles)0 4064 y(ha)m(v)m(e)24 b(t)m(yp)s(e)g
+Ft(INTEGER)p Fw(.)f(Sp)s(eci\014cally)-8 b(,)23 b(in)f(our)g(in)m
+(terface,)k(the)d(size)g(of)g(F)-8 b(ortran)24 b(handle)e(is)g
+(de\014ned)g(b)m(y)i Ft(sup)s(erlu)p 3762 4064 28 4 v
+32 w(ptr)0 4176 y Fw(in)38 b Ft(sup)s(erlupa)m(ra.f90)p
+Fw(.)68 b(F)-8 b(or)40 b(di\013eren)m(t)f(systems,)j(the)e(size)f(migh)
+m(t)g(need)h(to)g(b)s(e)f(c)m(hanged.)68 b(Then)39 b(using)e(these)0
+4289 y(handles,)27 b(F)-8 b(ortran)30 b(user)d(can)i(call)f(C)g(wrapp)s
+(er)e(routines)i(to)h(manipulate)e(the)h(opaque)h(ob)5
+b(jects.)41 b(F)-8 b(or)29 b(example,)0 4402 y(y)m(ou)d(can)g(call)f
+Ft(f)p 524 4402 V 32 w(create)p 784 4402 V 34 w(gridinfo\(grid)p
+1285 4402 V 33 w(handle\))h Fw(to)g(allo)s(cate)g(memory)g(for)f
+(structure)g Ft(grid)p Fw(,)i(and)e(return)f(a)i(handle)0
+4515 y Ft(grid)p 150 4515 V 33 w(handle)p Fw(.)141 4628
+y(The)e(sample)g(program)g(illustrates)e(the)j(basic)f(steps)g
+(required)f(to)i(use)f Fu(SuperLU)p 2936 4628 29 4 v
+33 w(DIST)f Fw(in)g(F)-8 b(ortran)25 b(to)h(solv)m(e)0
+4741 y(systems)i(of)g(equations.)39 b(These)28 b(include)d(ho)m(w)j(to)
+h(set)f(up)f(the)h(pro)s(cessor)f(grid)g(and)g(the)h(input)e(matrix,)h
+(ho)m(w)h(to)0 4854 y(call)e(the)h(linear)e(equation)i(solv)m(er.)39
+b(This)25 b(program)i(is)f(listed)f(b)s(elo)m(w,)i(and)f(is)g(also)g(a)
+m(v)-5 b(ailable)27 b(as)g Ft(f)p 3348 4854 28 4 v 32
+w(p)s(ddrive.f90)g Fw(in)0 4967 y(the)34 b(sub)s(directory)-8
+b(.)48 b(Note)34 b(that)g(the)g(routine)e(m)m(ust)i(include)d(the)i
+(moudle)f Ft(sup)s(erlu)p 2923 4967 V 33 w(mo)s(d)h Fw(whic)m(h)f(con)m
+(tains)i(the)0 5080 y(de\014nitions)25 b(of)i(all)f(parameters)i(and)e
+(the)h(F)-8 b(ortran)28 b(wrapp)s(er)e(functions.)38
+b(A)27 b Ft(Mak)m(e\014le)h Fw(is)e(pro)m(vided)g(to)h(generate)0
+5193 y(the)k(executable.)41 b(A)30 b Ft(README)g Fw(\014le)f(in)g(this)
+h(directory)f(sho)m(ws)i(ho)m(w)f(to)h(run)e(the)i(example.)286
+5405 y Fu(program)46 b(f_pddrive)0 5518 y(!)1905 5778
+y Fw(60)p eop
+%%Page: 61 62
+61 61 bop 0 280 a Fu(!)47 b(Purpose)0 393 y(!)g(=======)0
+506 y(!)0 619 y(!)g(The)g(driver)f(program)g(F_PDDRIVE.)0
+732 y(!)0 845 y(!)h(This)g(example)f(illustrates)f(how)i(to)g(use)g
+(F_PDGSSVX)e(with)i(the)f(full)0 958 y(!)h(\(default\))f(options)g(to)h
+(solve)f(a)i(linear)e(system.)0 1071 y(!)0 1184 y(!)h(Seven)g(basic)f
+(steps)h(are)f(required:)0 1297 y(!)143 b(1.)47 b(Create)f(C)i
+(structures)d(used)h(in)h(SuperLU)0 1409 y(!)143 b(2.)47
+b(Initialize)e(the)i(MPI)g(environment)e(and)i(the)f(SuperLU)g(process)
+g(grid)0 1522 y(!)143 b(3.)47 b(Set)g(up)g(the)g(input)f(matrix)h(and)f
+(the)h(right-hand)e(side)0 1635 y(!)143 b(4.)47 b(Set)g(the)g(options)f
+(argument)0 1748 y(!)143 b(5.)47 b(Call)g(f_pdgssvx)0
+1861 y(!)143 b(6.)47 b(Release)f(the)h(process)f(grid)g(and)h
+(terminate)e(the)i(MPI)g(environment)0 1974 y(!)143 b(7.)47
+b(Release)f(all)h(structures)0 2087 y(!)286 2200 y(use)g(superlu_mod)
+286 2313 y(include)f('mpif.h')286 2426 y(implicit)g(none)286
+2539 y(integer)g(maxn,)h(maxnz,)f(maxnrhs)286 2652 y(parameter)g(\()h
+(maxn)g(=)g(10000,)f(maxnz)h(=)g(100000,)f(maxnrhs)g(=)h(10)g(\))286
+2764 y(integer)f(rowind\(maxnz\),)e(colptr\(maxn\))286
+2877 y(real*8)94 b(values\(maxnz\),)44 b(b\(maxn\),)i(berr\(maxnrhs\))
+286 2990 y(integer)g(n,)h(m,)h(nnz,)e(nrhs,)h(ldb,)f(i,)h(ierr,)g
+(info,)f(iam)286 3103 y(integer)g(nprow,)g(npcol)286
+3216 y(integer)g(init)286 3442 y(integer\(superlu_ptr\))d(::)k(grid)286
+3555 y(integer\(superlu_ptr\))c(::)k(options)286 3668
+y(integer\(superlu_ptr\))c(::)k(ScalePermstruct)286 3781
+y(integer\(superlu_ptr\))c(::)k(LUstruct)286 3894 y
+(integer\(superlu_ptr\))c(::)k(SOLVEstruct)286 4006 y
+(integer\(superlu_ptr\))c(::)k(A)286 4119 y(integer\(superlu_ptr\))c
+(::)k(stat)0 4458 y(!)g(Create)g(Fortran)e(handles)h(for)h(the)g(C)g
+(structures)e(used)i(in)g(SuperLU_DIST)286 4571 y(call)g
+(f_create_gridinfo\(grid\))286 4684 y(call)g(f_create_options\(options)
+o(\))286 4797 y(call)g(f_create_ScalePermstruct)o(\(Sca)o(lePe)o(rms)o
+(truc)o(t\))286 4910 y(call)g(f_create_LUstruct\(LUstru)o(ct\))286
+5023 y(call)g(f_create_SOLVEstruct\(SOL)o(VEst)o(ruct)o(\))286
+5136 y(call)g(f_create_SuperMatrix\(A\))286 5248 y(call)g
+(f_create_SuperLUStat\(sta)o(t\))0 5474 y(!)g(Initialize)e(MPI)i
+(environment)1905 5778 y Fw(61)p eop
+%%Page: 62 63
+62 62 bop 286 280 a Fu(call)47 b(mpi_init\(ierr\))0 506
+y(!)g(Initialize)e(the)i(SuperLU_DIST)e(process)h(grid)286
+619 y(nprow)h(=)g(2)286 732 y(npcol)g(=)g(2)286 845 y(call)g
+(f_superlu_gridinit\(MPI_C)o(OMM_)o(WORL)o(D,)41 b(nprow,)47
+b(npcol,)f(grid\))0 1071 y(!)h(Bail)g(out)g(if)g(I)h(do)f(not)g(belong)
+f(in)h(the)g(grid.)286 1184 y(call)g(get_GridInfo\(grid,)c(iam=iam\))
+286 1297 y(if)48 b(\()f(iam)g(>=)g(nprow)f(*)i(npcol)e(\))i(then)430
+1409 y(go)f(to)g(100)286 1522 y(endif)286 1635 y(if)h(\()f(iam)g(==)g
+(0)h(\))f(then)430 1748 y(write\(*,*\))e(')i(Process)f(grid)g(',)i
+(nprow,)e(')h(X)h(',)f(npcol)286 1861 y(endif)0 2087
+y(!)g(Read)g(Harwell-Boeing)d(matrix,)i(and)h(adjust)f(the)h(pointers)e
+(and)i(indices)0 2200 y(!)g(to)h(0-based)d(indexing,)h(as)h(required)e
+(by)j(C)f(routines.)286 2313 y(if)h(\()f(iam)g(==)g(0)h(\))f(then)430
+2426 y(open\(file)e(=)i("g20.rua",)e(status)h(=)i("old",)e(unit)h(=)g
+(5\))430 2539 y(call)f(hbcode1\(m,)f(n,)i(nnz,)g(values,)f(rowind,)g
+(colptr\))430 2652 y(close\(unit)f(=)i(5\))0 2764 y(!)430
+2877 y(do)g(i)g(=)h(1,)f(n+1)573 2990 y(colptr\(i\))e(=)i(colptr\(i\))f
+(-)h(1)430 3103 y(enddo)430 3216 y(do)g(i)g(=)h(1,)f(nnz)573
+3329 y(rowind\(i\))e(=)i(rowind\(i\))f(-)h(1)430 3442
+y(enddo)286 3555 y(endif)0 3781 y(!)g(Distribute)e(the)i(matrix)f(to)i
+(the)f(gird)286 3894 y(call)95 b(f_dcreate_matrix_dist\(A)o(,)42
+b(m,)47 b(n,)g(nnz,)g(values,)f(rowind,)g(colptr,)f(grid\))0
+4119 y(!)i(Setup)g(the)g(right)f(hand)h(side)286 4232
+y(nrhs)g(=)g(1)286 4345 y(call)95 b(get_CompRowLoc_Matrix\(A)o(,)42
+b(nrow_loc=ldb\))286 4458 y(do)48 b(i)f(=)g(1,)h(ldb)430
+4571 y(b\(i\))e(=)i(1.0)286 4684 y(enddo)0 4910 y(!)f(Set)g(the)g
+(default)f(input)g(options)286 5023 y(call)h(f_set_default_options\(op)
+o(tion)o(s\))0 5248 y(!)g(Change)g(one)f(or)i(more)e(options)0
+5361 y(!)286 b(call)47 b(set_superlu_options\(opt)o(ions)o(,Fac)o(t=F)o
+(ACTO)o(RED\))1905 5778 y Fw(62)p eop
+%%Page: 63 64
+63 63 bop 0 280 a Fu(!)47 b(Initialize)e(ScalePermstruct)f(and)j
+(LUstruct)286 393 y(call)g(get_SuperMatrix\(A,nrow=m)o(,nco)o(l=n\))286
+506 y(call)g(f_ScalePermstructInit\(m,)41 b(n,)47 b(ScalePermstruct\))
+286 619 y(call)g(f_LUstructInit\(m,)c(n,)k(LUstruct\))0
+845 y(!)g(Initialize)e(the)i(statistics)e(variables)286
+958 y(call)i(f_PStatInit\(stat\))0 1184 y(!)g(Call)g(the)g(linear)f
+(equation)g(solver)286 1297 y(call)h(f_pdgssvx\(options,)c(A,)k
+(ScalePermstruct,)c(b,)48 b(ldb,)e(nrhs,)h(&)1002 1409
+y(grid,)g(LUstruct,)e(SOLVEstruct,)f(berr,)j(stat,)f(info\))286
+1635 y(if)i(\(info)e(==)h(0\))g(then)430 1748 y(write)f(\(*,*\))g
+('Backward)g(error:)g(',)h(\(berr\(i\),)e(i)j(=)f(1,)g(nrhs\))286
+1861 y(else)430 1974 y(write\(*,*\))e('INFO)h(from)h(f_pdgssvx)e(=)i
+(',)g(info)286 2087 y(endif)0 2313 y(!)g(Deallocate)e(SuperLU)h
+(allocated)g(storage)286 2426 y(call)h(f_PStatFree\(stat\))286
+2539 y(call)g(f_Destroy_CompRowLoc_Mat)o(rix_)o(dist)o(\(A\))286
+2652 y(call)g(f_ScalePermstructFree\(Sc)o(aleP)o(erms)o(tru)o(ct\))286
+2764 y(call)g(f_Destroy_LU\(n,)d(grid,)i(LUstruct\))286
+2877 y(call)h(f_LUstructFree\(LUstruct\))286 2990 y(call)g
+(get_superlu_options\(opti)o(ons,)41 b(SolveInitialized=init\))286
+3103 y(if)48 b(\(init)e(==)h(YES\))g(then)430 3216 y(call)f
+(f_dSolveFinalize\(options,)41 b(SOLVEstruct\))286 3329
+y(endif)0 3555 y(!)47 b(Release)f(the)h(SuperLU)f(process)g(grid)0
+3668 y(100)142 b(call)47 b(f_superlu_gridexit\(grid\))0
+3894 y(!)g(Terminate)f(the)h(MPI)g(execution)e(environment)286
+4006 y(call)i(mpi_finalize\(ierr\))0 4232 y(!)g(Destroy)f(all)h(C)h
+(structures)286 4345 y(call)f(f_destroy_gridinfo\(grid\))286
+4458 y(call)g(f_destroy_options\(option)o(s\))286 4571
+y(call)g(f_destroy_ScalePermstruc)o(t\(Sc)o(aleP)o(erm)o(stru)o(ct\))
+286 4684 y(call)g(f_destroy_LUstruct\(LUstr)o(uct\))286
+4797 y(call)g(f_destroy_SOLVEstruct\(SO)o(LVEs)o(truc)o(t\))286
+4910 y(call)g(f_destroy_SuperMatrix\(A\))286 5023 y(call)g
+(f_destroy_SuperLUStat\(st)o(at\))286 5248 y(stop)286
+5361 y(end)141 5529 y Fw(Similar)20 b(to)k(the)f(driv)m(er)e(routine)h
+Ft(p)s(ddrive.c)h Fw(in)e(C,)i(sev)m(en)h(basic)e(steps)g(are)i
+(required)d(to)i(call)f(a)i Fu(SuperLU)p 3683 5529 29
+4 v 32 w(DIST)1905 5778 y Fw(63)p eop
+%%Page: 64 65
+64 64 bop 0 280 a Fw(routine)29 b(in)g(F)-8 b(ortran:)111
+463 y(1.)46 b(Create)34 b(C)f(structures)g(used)f(in)g(Sup)s(erLU:)f
+Ft(grid)p Fw(,)j Ft(options)p Fw(,)h Ft(ScaleP)m(ermstruct)p
+Fw(,)g Ft(LUstruct)p Fw(,)e Ft(SOL)-10 b(VEstruct)p Fw(,)227
+576 y Ft(A)31 b Fw(and)g Ft(stat)p Fw(.)42 b(This)29
+b(is)i(ac)m(hiev)m(ed)h(b)m(y)f(the)g(calls)f(to)i(the)g(C)f(wrapp)s
+(er)e Fp(\\cr)-5 b(e)g(ate")38 b Fw(routines)30 b Ft(f)p
+3333 576 28 4 v 33 w(create)p 3594 576 V 33 w(XXX\(\))p
+Fw(,)227 689 y(where)g Ft(XXX)f Fw(is)h(the)g(name)h(of)f(the)h
+(corresp)s(onding)d(structure.)111 875 y(2.)46 b(Initialize)23
+b(the)i(MPI)g(en)m(vironmen)m(t)f(and)g(the)h(Sup)s(erLU)e(pro)s(cess)h
+(grid.)38 b(This)22 b(is)i(ac)m(hiev)m(ed)i(b)m(y)e(the)h(calls)f(to)
+227 988 y Ft(mpi)p 373 988 V 33 w(init\(\))g Fw(and)g(the)g(C)g(wrapp)s
+(er)f(routine)g Ft(f)p 1721 988 V 33 w(sup)s(erlu)p 2026
+988 V 32 w(gridinit\(\))p Fw(.)39 b(Note)25 b(that)g
+Ft(f)p 2893 988 V 33 w(sup)s(erlu)p 3198 988 V 32 w(gridinit\(\))f
+Fw(requires)227 1101 y(the)35 b(n)m(um)m(b)s(ers)f(of)h(ro)m(w)g(and)f
+(column)g(of)h(the)g(pro)s(cess)f(grid.)53 b(In)34 b(this)g(example,)i
+(w)m(e)f(set)h(them)e(to)i(b)s(e)e(2,)227 1214 y(resp)s(ectiv)m(ely)-8
+b(.)111 1400 y(3.)46 b(Set)37 b(up)f(the)h(input)d(matrix)i(and)h(the)f
+(righ)m(t-hand)g(side.)59 b(This)35 b(example)h(uses)g(the)h
+(distributed)d(input)227 1512 y(in)m(terface,)f(so)e(w)m(e)h(need)f(to)
+i(con)m(v)m(ert)g(the)e(input)f(matrix)g(to)j(the)e(distributed)e
+(compressed)i(ro)m(w)g(format.)227 1625 y(Pro)s(cess)40
+b(0)h(\014rst)e(reads)h(the)g(input)e(matrix)h(stored)h(on)g(disk)f(in)
+g(Harw)m(ell-Bo)s(eing)g(format)i(b)m(y)e(calling)227
+1738 y(F)-8 b(ortran)40 b(routine)d Ft(hb)s(co)s(de1\(\))p
+Fw(.)68 b(The)38 b(\014le)g(name)h(in)e(this)h(example)g(is)g
+Fu(g20.rua)p Fw(.)64 b(Then)37 b(all)h(pro)s(cesses)227
+1851 y(call)c(a)g(C)f(wrapp)s(er)g(routine)g Ft(f)p 1287
+1851 V 32 w(dcreate)p 1594 1851 V 34 w(dist)p 1765 1851
+V 32 w(matrix\(\))h Fw(to)g(distribute)e(the)i(matrix)f(to)i(all)e(the)
+h(pro)s(cesses)227 1964 y(distributed)28 b(b)m(y)j(blo)s(c)m(k)g(ro)m
+(ws.)43 b(The)31 b(righ)m(t-hand)e(side)i(matrix)f(in)g(this)g(example)
+h(is)f(a)h(column)f(v)m(ector)j(of)227 2077 y(all)g(ones.)52
+b(Note)35 b(that,)h(b)s(efore)d(setting)h(the)h(righ)m(t-hand)d(side,)i
+(w)m(e)h(use)f Ft(get)p 2879 2077 V 33 w(CompRo)m(wLo)s(c)p
+3434 2077 V 35 w(Matrix\(\))f Fw(to)227 2190 y(get)f(the)e(n)m(um)m(b)s
+(er)f(of)i(lo)s(cal)f(ro)m(ws)g(in)f(the)i(distributed)c(matrix)j
+Fv(A)p Fw(.)227 2339 y Fp(One)k(imp)-5 b(ortant)37 b(note)e(is)f(that)i
+(al)5 b(l)35 b(the)g(C)f(r)-5 b(outines)35 b(use)f(0-b)-5
+b(ase)g(d)36 b(indexing)f(scheme.)47 b(Ther)-5 b(efor)g(e,)36
+b(after)227 2452 y(pr)-5 b(o)g(c)g(ess)40 b(0)e(r)-5
+b(e)g(ads)40 b(the)e(matrix)h(in)f(c)-5 b(ompr)g(esse)g(d)40
+b(c)-5 b(olumn)39 b(format,)i(we)c(de)-5 b(cr)g(ement)40
+b(its)d(c)-5 b(olumn)39 b(p)-5 b(ointers)227 2565 y(\()p
+Fu(colptr)p Fp(\))32 b(and)h(r)-5 b(ow)34 b(indic)-5
+b(es)33 b(\()p Fu(rowind)p Fp(\))e(by)i(1)g(so)g(they)g(b)-5
+b(e)g(c)g(ome)34 b(0-b)-5 b(ase)g(d)34 b(indexing.)111
+2751 y Fw(4.)46 b(Set)35 b(the)g(input)d(argumen)m(ts:)49
+b Ft(options)p Fw(,)36 b Ft(ScaleP)m(ermstruct)p Fw(,)h
+Ft(LUstruct)p Fw(,)e(and)f Ft(stat)p Fw(.)52 b(The)34
+b(input)e(argumen)m(t)227 2864 y Ft(options)23 b Fw(con)m(trols)h(ho)m
+(w)e(the)h(linear)f(system)h(w)m(ould)e(b)s(e)i(slo)m(v)m(ed.)38
+b(The)23 b(routine)f Ft(f)p 2925 2864 V 32 w(set)p 3065
+2864 V 33 w(default)p 3359 2864 V 32 w(options)p 3665
+2864 V 33 w(dist\(\))227 2977 y Fw(sets)h(the)g Ft(options)g
+Fw(argumen)m(t)g(so)g(that)g(the)g(slo)m(v)m(er)g(p)s(erforms)e(all)g
+(the)i(functionalities.)36 b(Y)-8 b(ou)23 b(can)g(also)f(set)h(it)227
+3090 y(according)g(to)g(y)m(our)f(o)m(wn)h(needs,)h(using)d(a)i(call)f
+(to)h(the)g(F)-8 b(ortran)23 b(routine)e Ft(set)p 2829
+3090 V 33 w(sup)s(erlu)p 3134 3090 V 32 w(options\(\))p
+Fw(.)39 b Ft(LUstruct)227 3203 y Fw(is)32 b(the)i(data)f(struture)g(in)
+e(whic)m(h)h(the)h(distributed)d Fv(L)j Fw(and)g Fv(U)43
+b Fw(factors)34 b(are)f(stored.)49 b Ft(ScaleP)m(ermstruct)34
+b Fw(is)227 3315 y(the)h(data)g(struture)e(in)g(whic)m(h)g(sev)m(eral)i
+(v)m(ectors)h(describing)c(the)i(transformations)g(done)g(to)h(matrix)f
+Fv(A)227 3428 y Fw(are)i(stored.)56 b Ft(stat)35 b Fw(is)f(a)i
+(structure)f(collecting)g(the)h(statistcs)g(ab)s(out)f(run)m(time)g
+(and)g(\015op)f(coun)m(t.)57 b(These)227 3541 y(three)31
+b(structures)f(can)g(b)s(e)g(set)h(b)m(y)f(calling)f(the)i(C)f(wrapp)s
+(er)e Fp(\\init")36 b Fw(routines)30 b Ft(f)p 2991 3541
+V 32 w(XXXInit)p Fw(.)111 3727 y(5.)46 b(Call)29 b(the)i(C)f(wrapp)s
+(er)e(routine)i Ft(f)p 1375 3727 V 32 w(p)s(dgssvx\(\))h
+Fw(to)g(solv)m(e)f(the)h(equation.)111 3913 y(6.)46 b(Release)23
+b(the)e(pro)s(cess)h(grid)e(and)h(terminate)h(the)g(MPI)g(en)m
+(vironmen)m(t.)37 b(After)22 b(the)g(computation)f(on)h(a)g(pro-)227
+4026 y(cess)f(grid)e(has)h(b)s(een)g(completed,)i(the)f(pro)s(cess)e
+(grid)g(should)g(b)s(e)g(released)h(b)m(y)h(a)f(call)g(to)h
+Ft(f)p 3214 4026 V 32 w(spuerlu)p 3515 4026 V 33 w(gridexit\(\))p
+Fw(.)227 4139 y(When)30 b(all)e(computations)h(ha)m(v)m(e)i(b)s(een)e
+(completed,)h(the)f(C)g(wrapp)s(er)f(routine)h Ft(mpi)p
+3129 4139 V 32 w(\014nalize\(\))g Fw(should)f(b)s(e)227
+4252 y(called.)111 4437 y(7.)46 b(Deallo)s(cate)22 b(all)d(the)i
+(structures.)36 b(First)20 b(w)m(e)h(need)f(to)h(deallo)s(cate)f(the)h
+(storage)h(allo)s(cated)e(b)m(y)g Fu(SuperLU)p 3723 4437
+29 4 v 32 w(DIST)227 4550 y Fw(b)m(y)j(a)g(set)h(of)f
+Fp(\\fr)-5 b(e)g(e")29 b Fw(calls.)37 b(Note)24 b(that)g(this)d(should)
+g(b)s(e)h(called)g(b)s(efore)h Ft(f)p 2660 4550 28 4
+v 32 w(spuerlu)p 2961 4550 V 33 w(gridexit\(\))p Fw(,)i(since)e(some)g
+(of)227 4663 y(the)30 b Fp(\\fr)-5 b(e)g(e")35 b Fw(calls)28
+b(use)h(the)h(grid.)39 b(Then)28 b(w)m(e)h(call)g(the)g(C)g(wrapp)s(er)
+e Fp(\\destr)-5 b(oy")37 b Fw(routines)28 b Ft(f)p 3316
+4663 V 33 w(destro)m(y)p 3619 4663 V 33 w(XXX\(\))227
+4776 y Fw(to)49 b(destro)m(y)f(all)f(the)g(F)-8 b(ortran)49
+b(handles.)91 b(Note)49 b(that)f Ft(f)p 2257 4776 V 33
+w(destro)m(y)p 2560 4776 V 33 w(gridinfo\(\))h Fw(should)c(b)s(e)j
+(called)e(after)227 4889 y Ft(f)p 260 4889 V 33 w(spuerlu)p
+562 4889 V 32 w(gridexit\(\))p Fw(.)0 5132 y Fm(4.10.1)113
+b(Callable)36 b(functions)h(in)g(the)g(F)-9 b(ortran)37
+b(90)h(mo)s(dule)e(\014le)h Fb(spuerlu)p 3105 5132 33
+4 v 40 w(mo)s(d.f90)0 5303 y Fw(The)20 b(F)-8 b(ortran)21
+b(90)g(mo)s(dule)d Fu(superlu)p 1260 5303 29 4 v 33 w(mod)h
+Fw(con)m(tains)i(the)f(in)m(terface)h(routines)e(that)i(can)g
+(manipulate)d(a)j Fu(SuperLU)p 3857 5303 V 32 w(DIST)0
+5416 y Fw(ob)5 b(ject)29 b(from)e(F)-8 b(ortran.)40 b(The)27
+b(ob)5 b(ject)29 b(is)e(p)s(oin)m(ted)f(to)i(b)m(y)g(the)g(corresp)s
+(onding)d(handle)i(input)e(to)k(these)f(routines.)0 5529
+y(The)39 b(routines)g(are)g(divided)e(in)m(to)j(t)m(w)m(o)h(sets.)69
+b(One)39 b(set)h(is)e(to)j(get)g(the)e(prop)s(erties)f(of)i(an)f(ob)5
+b(ject,)43 b(with)c(the)1905 5778 y(64)p eop
+%%Page: 65 66
+65 65 bop 0 280 a Fw(routine)31 b(names)h(\\)p Fu(get)p
+790 280 29 4 v 34 w(XXX\(\))p Fw(".)44 b(Another)31 b(set)i(is)e(to)h
+(set)g(some)h(prop)s(erties)d(for)h(an)h(ob)5 b(ject,)33
+b(with)e(the)h(routine)0 393 y(names)c(\\)p Fu(set)p
+471 393 V 34 w(XXX\(\))p Fw(".)38 b(These)28 b(functions)e(ha)m(v)m(e)j
+(optional)e(argumen)m(ts,)i(so)e(the)h(users)f(do)h(not)g(ha)m(v)m(e)g
+(to)h(pro)m(vide)0 506 y(the)37 b(full)d(set)j(of)f(parameters.)59
+b Fu(Superlu)p 1451 506 V 33 w(mod)35 b Fw(mo)s(dule)g(uses)h
+Fu(superluparam)p 2765 506 V 31 w(mod)g Fw(mo)s(dule)f(that)i
+(de\014nes)e(all)0 619 y(the)30 b(in)m(teger)g(constan)m(ts)i(corresp)s
+(onding)27 b(to)k(the)f(en)m(umeration)g(constan)m(ts)h(in)d
+Fu(SuperLU)p 3081 619 V 33 w(DIST)p Fw(.)h(Belo)m(w)h(are)h(the)0
+732 y(calling)e(sequences)i(of)f(all)f(the)i(routines.)0
+945 y Fu(subroutine)45 b(get_GridInfo\(grid,)e(iam,)j(nprow,)h(npcol\))
+95 1057 y(integer\(superlu_ptr\))c(::)k(grid)95 1170
+y(integer,)f(optional)g(::)h(iam,)f(nprow,)g(npcol)0
+1396 y(subroutine)f(get_SuperMatrix\(A,)e(nrow,)j(ncol\))95
+1509 y(integer\(superlu_ptr\))d(::)k(A)95 1622 y(integer,)f(optional)g
+(::)h(nrow,)f(ncol)0 1848 y(subroutine)f(set_SuperMatrix\(A,)e(nrow,)j
+(ncol\))95 1961 y(integer\(superlu_ptr\))d(::)k(A)95
+2074 y(integer,)f(optional)g(::)h(nrow,)f(ncol)0 2299
+y(subroutine)f(get_CompRowLoc_Matrix\(A,)c(nrow,)47 b(ncol,)f(nnz_loc,)
+f(nrow_loc,)h(fst_row\))95 2412 y(integer\(superlu_ptr\))d(::)k(A)95
+2525 y(integer,)f(optional)g(::)h(nrow,)f(ncol,)g(nnz_loc,)g(nrow_loc,)
+f(fst_row)0 2751 y(subroutine)g(set_CompRowLoc_Matrix\(A,)c(nrow,)47
+b(ncol,)f(nnz_loc,)f(nrow_loc,)h(fst_row\))95 2864 y
+(integer\(superlu_ptr\))d(::)k(A)95 2977 y(integer,)f(optional)g(::)h
+(nrow,)f(ncol,)g(nnz_loc,)g(nrow_loc,)f(fst_row)0 3203
+y(subroutine)g(get_superlu_options\(opt,)c(Fact,)47 b(Trans,)f(Equil,)g
+(RowPerm,)f(&)1480 3316 y(ColPerm,)g(ReplaceTinyPivot,)e(IterRefine,)i
+(&)1480 3429 y(SolveInitialized,)e(RefineInitialized\))0
+3542 y(integer\(superlu_ptr\))f(::)47 b(opt)95 3654 y(integer,)f
+(optional)g(::)h(Fact,)f(Trans,)g(Equil,)g(RowPerm,)g(ColPerm,)f(&)1098
+3767 y(ReplaceTinyPivot,)e(IterRefine,)i(SolveInitialized,)e(&)1098
+3880 y(RefineInitialized)0 4106 y(subroutine)i
+(set_superlu_options\(opt,)c(Fact,)47 b(Trans,)f(Equil,)g(RowPerm,)f(&)
+1480 4219 y(ColPerm,)g(ReplaceTinyPivot,)e(IterRefine,)i(&)1480
+4332 y(SolveInitialized,)e(RefineInitialized\))95 4445
+y(integer\(superlu_ptr\))g(::)k(opt)95 4558 y(integer,)f(optional)g(::)
+h(Fact,)f(Trans,)g(Equil,)g(RowPerm,)g(ColPerm,)f(&)1098
+4671 y(ReplaceTinyPivot,)e(IterRefine,)i(SolveInitialized,)e(&)1098
+4784 y(RefineInitialized)0 5027 y Fm(4.10.2)113 b(C)37
+b(wrapp)s(er)h(functions)f(callable)f(b)m(y)i(F)-9 b(ortran)37
+b(in)g(\014le)g Fb(spuerlu)p 3051 5027 33 4 v 39 w(c2f)p
+3227 5027 V 40 w(wrap.c)0 5199 y Fw(This)26 b(\014le)g(con)m(tains)i
+(the)g(F)-8 b(ortran-callable)27 b(C)g(functions)f(whic)m(h)g(wraps)h
+(around)f(the)i(user-callable)e(C)h(routines)0 5311 y(in)f
+Fu(SuperLU)p 445 5311 29 4 v 32 w(DIST)p Fw(.)g(The)h(functions)f(are)h
+(divided)e(in)m(to)i(three)g(classes:)39 b(1\))28 b(allo)s(cate)g(a)f
+(C)g(structure)g(and)f(return)0 5424 y(a)31 b(handle)e(to)j(F)-8
+b(ortran,)31 b(or)g(deallo)s(cate)g(the)g(memory)g(of)f(of)h(a)g(C)f
+(structure)h(giv)m(en)f(its)g(F)-8 b(ortran)32 b(handle;)d(2\))j(get)
+1905 5778 y(65)p eop
+%%Page: 66 67
+66 66 bop 0 280 a Fw(or)29 b(set)g(the)g(v)-5 b(alue)28
+b(of)h(certain)f(\014elds)f(of)i(a)g(C)f(structure)h(giv)m(en)f(its)g
+(F)-8 b(ortran)30 b(handle;)e(3\))h(wrapp)s(er)e(functions)g(for)0
+393 y(the)k Fu(SuperLU)p 499 393 29 4 v 32 w(DIST)e Fw(C)h(functions.)
+39 b(Belo)m(w)31 b(are)g(the)g(calling)e(sequences)h(of)h(these)g
+(routines.)0 561 y Fu(/*)47 b(functions)e(that)i(allocate)f(memory)g
+(for)h(a)g(structure)e(and)i(return)f(a)i(handle)e(*/)0
+674 y(void)h(f_create_gridinfo\(fptr)41 b(*handle\))0
+787 y(void)47 b(f_create_options\(fptr)42 b(*handle\))0
+900 y(void)47 b(f_create_ScalePermstruc)o(t\(fp)o(tr)41
+b(*handle\))0 1013 y(void)47 b(f_create_LUstruct\(fptr)41
+b(*handle\))0 1126 y(void)47 b(f_create_SOLVEstruct\(fp)o(tr)42
+b(*handle\))0 1238 y(void)47 b(f_create_SuperMatrix\(fp)o(tr)42
+b(*handle\))0 1351 y(void)47 b(f_create_SuperLUStat\(fp)o(tr)42
+b(*handle\))0 1577 y(/*)47 b(functions)e(that)i(free)g(the)g(memory)f
+(allocated)f(by)i(the)g(above)f(functions)g(*/)0 1690
+y(void)h(f_destroy_gridinfo\(fptr)41 b(*handle\))0 1803
+y(void)47 b(f_destroy_options\(fptr)41 b(*handle\))0
+1916 y(void)47 b(f_destroy_ScalePermstru)o(ct\(f)o(ptr)41
+b(*handle\))0 2029 y(void)47 b(f_destroy_LUstruct\(fptr)41
+b(*handle\))0 2142 y(void)47 b(f_destroy_SOLVEstruct\(f)o(ptr)41
+b(*handle\))0 2255 y(void)47 b(f_destroy_SuperMatrix\(f)o(ptr)41
+b(*handle\))0 2368 y(void)47 b(f_destroy_SuperLUStat\(f)o(ptr)41
+b(*handle\))0 2593 y(/*)47 b(functions)e(that)i(get)g(or)g(set)g
+(certain)f(fields)g(in)h(a)h(C)f(structure.)e(*/)0 2706
+y(void)i(f_get_gridinfo\(fptr)42 b(*grid,)k(int)h(*iam,)g(int)f
+(*nprow,)g(int)h(*npcol\))0 2819 y(void)g(f_get_SuperMatrix\(fptr)41
+b(*A,)47 b(int)g(*nrow,)f(int)h(*ncol\))0 2932 y(void)g
+(f_set_SuperMatrix\(fptr)41 b(*A,)47 b(int)g(*nrow,)f(int)h(*ncol\))0
+3045 y(void)g(f_get_CompRowLoc_Matrix)o(\(fpt)o(r)42
+b(*A,)47 b(int)g(*m,)f(int)h(*n,)g(int)g(*nnz_loc,)1814
+3158 y(int)g(*m_loc,)e(int)i(*fst_row\))0 3271 y(void)g
+(f_set_CompRowLoc_Matrix)o(\(fpt)o(r)42 b(*A,)47 b(int)g(*m,)f(int)h
+(*n,)g(int)g(*nnz_loc,)1814 3384 y(int)g(*m_loc,)e(int)i(*fst_row\))0
+3497 y(void)g(f_get_superlu_options\(f)o(ptr)41 b(*opt,)47
+b(int)g(*Fact,)f(int)h(*Trans,)e(int)i(*Equil,)1289 3610
+y(int)g(*RowPerm,)e(int)i(*ColPerm,)e(int)i(*ReplaceTinyPivot,)1289
+3723 y(int)g(*IterRefine,)d(int)j(*SolveInitialized,)1289
+3835 y(int)g(*RefineInitialized\))0 3948 y(void)g
+(f_set_superlu_options\(f)o(ptr)41 b(*opt,)47 b(int)g(*Fact,)f(int)h
+(*Trans,)e(int)i(*Equil,)1289 4061 y(int)g(*RowPerm,)e(int)i(*ColPerm,)
+e(int)i(*ReplaceTinyPivot,)1289 4174 y(int)g(*IterRefine,)d(int)j
+(*SolveInitialized,)1289 4287 y(int)g(*RefineInitialized\))0
+4513 y(/*)g(wrappers)f(for)h(SuperLU_DIST)d(routines)i(*/)0
+4626 y(void)h(f_dCreate_CompRowLoc_Ma)o(trix)o(_di)o(st\(f)o(ptr)41
+b(*A,)47 b(int)g(*m,)g(int)g(*n,)g(int)g(*nnz_loc,)1814
+4739 y(int)g(*m_loc,)e(int)i(*fst_row,)f(double)g(*nzval,)1814
+4852 y(int)h(*colind,)e(int)i(*rowptr,)f(int)g(*stype,)1814
+4965 y(int)h(*dtype,)e(int)i(*mtype\))0 5077 y(void)g
+(f_set_default_options\(f)o(ptr)41 b(*options\))0 5190
+y(void)47 b(f_superlu_gridinit\(int)41 b(*Bcomm,)46 b(int)h(*nprow,)f
+(int)h(*npcol,)f(fptr)g(*grid\))0 5303 y(void)h
+(f_superlu_gridexit\(fptr)41 b(*grid\))0 5416 y(void)47
+b(f_ScalePermstructInit\(i)o(nt)42 b(*m,)k(int)h(*n,)g(fptr)g
+(*ScalePermstruct\))0 5529 y(void)g(f_ScalePermstructFree\(f)o(ptr)41
+b(*ScalePermstruct\))1905 5778 y Fw(66)p eop
+%%Page: 67 68
+67 67 bop 0 280 a Fu(void)47 b(f_PStatInit\(fptr)c(*stat\))0
+393 y(void)k(f_PStatFree\(fptr)c(*stat\))0 506 y(void)k
+(f_LUstructInit\(int)42 b(*m,)47 b(int)g(*n,)g(fptr)g(*LUstruct\))0
+619 y(void)g(f_LUstructFree\(fptr)42 b(*LUstruct\))0
+732 y(void)47 b(f_Destroy_LU\(int)c(*n,)k(fptr)g(*grid,)f(fptr)g
+(*LUstruct\))0 845 y(void)h(f_Destroy_CompRowLoc_Ma)o(trix)o(_di)o
+(st\(f)o(ptr)41 b(*A\))0 958 y(void)47 b(f_dSolveFinalize\(fptr)42
+b(*options,)j(fptr)i(*SOLVEstruct\))0 1071 y(void)g(f_pdgssvx\(fptr)d
+(*options,)h(fptr)h(*A,)h(fptr)g(*ScalePermstruct,)c(double)j(*B,)716
+1184 y(int)h(*ldb,)f(int)h(*nrhs,)f(fptr)h(*grid,)f(fptr)h(*LUstruct,)
+716 1297 y(fptr)g(*SOLVEstruct,)d(double)i(*berr,)g(fptr)h(*stat,)f
+(int)h(*info\))0 1409 y(void)g(f_check_malloc\(int)42
+b(*iam\))1905 5778 y Fw(67)p eop
+%%Page: 68 69
+68 68 bop 0 945 a Fy(Bibliograph)-6 b(y)45 1390 y Fw([1])47
+b(E.)25 b(Anderson,)g(Z.)g(Bai,)i(C.)e(Bisc)m(hof,)h(J.)f(Demmel,)i(J.)
+e(Dongarra,)i(J.)e(Du)g(Croz,)i(A.)e(Green)m(baum,)h(S.)f(Ham-)187
+1502 y(marling,)i(A.)h(McKenney)-8 b(,)29 b(S.)e(Ostrouc)m(ho)m(v,)i
+(and)e(D.)i(Sorensen.)35 b Fp(LAP)-7 b(A)n(CK)29 b(Users')h(Guide,)h(R)
+-5 b(ele)g(ase)31 b(2.0)p Fw(.)187 1615 y(SIAM,)f(Philadelphia,)d
+(1995.)42 b(324)32 b(pages.)45 1803 y([2])47 b(M.)31
+b(Arioli,)e(J.)i(W.)g(Demmel,)h(and)e(I.)h(S.)f(Du\013.)42
+b(Solving)29 b(sparse)i(linear)e(systems)i(with)e(sparse)h(bac)m(kw)m
+(ard)187 1916 y(error.)40 b Fp(SIAM)32 b(J.)g(Matrix)h(A)n(nal.)g
+(Appl.)p Fw(,)e(10\(2\):165{190,)36 b(April)28 b(1989.)45
+2104 y([3])47 b(L.)33 b(S.)g(Blac)m(kford,)h(J.)f(Choi,)f(E.)h(D'Azev)m
+(edo,)k(J.)32 b(Demmel,)i(I.)f(Dhillon,)f(J.)h(Dongarra,)h(S.)f
+(Hammarling,)187 2216 y(G.)g(Henry)-8 b(,)34 b(A.)g(P)m(etitet,)h(K.)e
+(Stanley)-8 b(,)34 b(D.)g(W)-8 b(alk)m(er,)35 b(and)d(R.)h(C.)g(Whaley)
+-8 b(.)49 b Fp(Sc)-5 b(aLAP)e(A)n(CK)35 b(Users')f(Guide)p
+Fw(.)187 2329 y(SIAM,)c(Philadelphia,)d(1997.)42 b(325)32
+b(pages.)45 2517 y([4])47 b(Timoth)m(y)c(A.)g(Da)m(vis,)48
+b(John)42 b(R.)h(Gilb)s(ert,)i(Stefan)f(I.)f(Larimore,)j(and)d(Esmond)f
+(Ng.)80 b(A)44 b(column)e(ap-)187 2630 y(pro)m(ximate)32
+b(minim)m(um)e(degree)j(ordering)e(algorithm.)46 b(T)-8
+b(ec)m(hnical)32 b(Rep)s(ort)g(TR-00-005,)j(Computer)d(and)187
+2743 y(Information)42 b(Sciences)g(Departmen)m(t,)48
+b(Univ)m(ersit)m(y)42 b(of)h(Florida,)j(2000.)80 b(submitted)41
+b(to)j Fp(A)n(CM)f(T)-7 b(r)i(ans.)187 2856 y(Math.)33
+b(Softwar)-5 b(e)p Fw(.)45 3043 y([5])47 b(James)24 b(W.)g(Demmel,)i
+(Stanley)d(C.)h(Eisenstat,)h(John)e(R.)h(Gilb)s(ert,)g(Xiao)m(y)m(e)i
+(S.)d(Li,)i(and)e(Joseph)g(W.)i(H.)f(Liu.)187 3156 y(A)j(sup)s(erno)s
+(dal)d(approac)m(h)k(to)g(sparse)e(partial)g(piv)m(oting.)35
+b Fp(SIAM)29 b(J.)g(Matrix)h(A)n(nalysis)g(and)h(Applic)-5
+b(ations)p Fw(,)187 3269 y(20\(3\):720{755,)36 b(1999.)45
+3457 y([6])47 b(James)41 b(W.)g(Demmel,)j(John)39 b(R.)i(Gilb)s(ert,)h
+(and)e(Xiao)m(y)m(e)i(S.)f(Li.)70 b(An)41 b(async)m(hronous)f(parallel)
+f(sup)s(ern-)187 3570 y(o)s(dal)d(algorithm)g(for)g(sparse)h(gaussian)f
+(elimination.)57 b Fp(SIAM)38 b(J.)g(Matrix)h(A)n(nalysis)g(and)h
+(Applic)-5 b(ations)p Fw(,)187 3683 y(20\(4\):915{952,)36
+b(1999.)45 3870 y([7])47 b(J.)25 b(Dongarra,)j(J.)d(Du)h(Croz,)h(I.)e
+(S.)h(Du\013,)g(and)f(S.)g(Hammarling.)32 b(A)26 b(Set)f(of)h(Lev)m(el)
+g(3)g(Basic)g(Linear)e(Algebra)187 3983 y(Subprograms.)39
+b Fp(A)n(CM)31 b(T)-7 b(r)i(ans.)34 b(Math.)f(Soft.)p
+Fw(,)e(16:1{17,)j(1990.)45 4171 y([8])47 b(J.)31 b(Dongarra,)h(J.)e(Du)
+h(Croz,)g(S.)g(Hammarling,)f(and)g(Ric)m(hard)g(J.)h(Hanson.)41
+b(An)31 b(Extended)f(Set)h(of)g(F)m(OR-)187 4284 y(TRAN)c(Basic)g
+(Linear)f(Algebra)h(Subprograms.)34 b Fp(A)n(CM)28 b(T)-7
+b(r)i(ans.)31 b(Math.)f(Soft.)p Fw(,)f(14\(1\):1{17,)j(Marc)m(h)c
+(1988.)45 4471 y([9])47 b(Iain)32 b(S.)h(Du\013)g(and)g(Jac)m(k)m(o)i
+(Koster.)49 b(The)33 b(design)f(and)g(use)h(of)g(algorithms)f(for)h(p)s
+(erm)m(uting)f(large)h(en)m(tries)187 4584 y(to)28 b(the)g(diagonal)f
+(of)h(sparse)g(matrices.)36 b Fp(SIAM)30 b(J.)f(Matrix)i(A)n(nalysis)g
+(and)g(Applic)-5 b(ations)p Fw(,)30 b(20\(4\):889{901,)187
+4697 y(1999.)0 4885 y([10])47 b(I.S.)26 b(Du\013,)h(R.G.)f(Grimes,)h
+(and)e(J.G.)i(Lewis.)32 b(Users')26 b(guide)f(for)h(the)g(Harw)m
+(ell-Bo)s(eing)g(sparse)f(matrix)h(col-)187 4998 y(lection)e(\(release)
+h(1\).)32 b(T)-8 b(ec)m(hnical)24 b(Rep)s(ort)g(RAL-92-086,)29
+b(Rutherford)23 b(Appleton)h(Lab)s(oratory)-8 b(,)26
+b(Decem)m(b)s(er)187 5111 y(1992.)0 5298 y([11])47 b(Alan)29
+b(George,)i(Joseph)e(Liu,)f(and)h(Esmond)f(Ng.)40 b(A)29
+b(data)h(structure)f(for)g(sparse)g(QR)g(and)g(LU)h(factoriza-)187
+5411 y(tions.)40 b Fp(SIAM)32 b(J.)g(Sci.)g(Stat.)h(Comput.)p
+Fw(,)f(9:100{121,)j(1988.)1905 5778 y(68)p eop
+%%Page: 69 70
+69 69 bop 0 280 a Fw([12])47 b(Alan)38 b(George)h(and)f(Esmond)f(Ng.)65
+b(Sym)m(b)s(olic)37 b(factorization)i(for)f(sparse)g(Gaussian)f
+(elimination)f(with)187 393 y(partial)29 b(piv)m(oting.)40
+b Fp(SIAM)32 b(J.)g(Sci.)g(Stat.)h(Comput.)p Fw(,)f(8\(6\):877{898,)k
+(1987.)0 578 y([13])47 b(J.)32 b(R.)g(Gilb)s(ert,)f(X.)i(S.)e(Li,)h(E.)
+g(G.)h(Ng,)g(and)f(B.)h(W.)f(P)m(eyton.)47 b(Computing)31
+b(ro)m(w)h(and)g(column)f(coun)m(ts)h(for)187 691 y(sparse)e
+Fv(QR)h Fw(and)f Fv(LU)40 b Fw(factorization.)h Fp(BIT)p
+Fw(,)31 b(41\(4\):693{710,)36 b(2001.)0 875 y([14])47
+b(J.)24 b(R.)g(Gilb)s(ert)f(and)h(E.)g(G.)h(Ng.)31 b(Predicting)23
+b(structure)h(in)f(nonsymmetric)g(sparse)h(matrix)f(factorizations.)187
+988 y(In)34 b(Alan)h(George,)j(John)d(R.)g(Gilb)s(ert,)g(and)g(Joseph)f
+(W.)i(H.)g(Liu,)f(editors,)h Fp(Gr)-5 b(aph)40 b(The)-5
+b(ory)38 b(and)g(Sp)-5 b(arse)187 1101 y(Matrix)33 b(Computation)p
+Fw(,)g(pages)e(107{139.)j(Springer-V)-8 b(erlag,)29 b(1993.)0
+1285 y([15])47 b(B.)66 b(Hendric)m(kson)e(and)h(R.)h(Leland.)144
+b(The)65 b(CHA)m(CO)g(User's)g(Guide.)g(V)-8 b(ersion)65
+b(1.0.)146 b(T)-8 b(ec)m(hni-)187 1398 y(cal)56 b(Rep)s(ort)f
+(SAND93-2339)k Fq(\017)e Fw(UC-405,)63 b(Sandia)55 b(National)h(Lab)s
+(oratories,)62 b(Albuquerque,)e(1993.)187 1511 y(h)m
+(ttp://www.cs.sandia.go)m(v/)p Fq(\030)p Fw(bahendr/c)m(haco.h)m(tml.)0
+1695 y([16])47 b(N.)40 b(J.)f(Higham.)68 b(Algorithm)39
+b(674:)60 b(F)m(OR)-8 b(TRAN)41 b(co)s(des)f(for)f(estimating)g(the)h
+(one-norm)g(of)g(a)g(real)f(or)187 1808 y(complex)30
+b(matrix,)g(with)f(applications)f(to)k(condition)d(estimation.)40
+b Fp(A)n(CM)31 b(T)-7 b(r)i(ans.)34 b(Math.)f(Soft.)p
+Fw(,)e(14:381{)187 1921 y(396,)h(1988.)0 2105 y([17])47
+b(N.)31 b(J.)f(Higham.)40 b Fp(A)-5 b(c)g(cur)g(acy)33
+b(and)h(Stability)f(of)g(Numeric)-5 b(al)33 b(A)n(lgorithms)p
+Fw(.)42 b(SIAM,)31 b(1996.)0 2290 y([18])47 b(G.)22 b(Karypis)e(and)h
+(V.)h(Kumar.)k Fa(Me)-15 b(T)g(iS)24 b Fp({)h(A)g(Softwar)-5
+b(e)26 b(Package)f(for)g(Partitioning)h(Unstructur)-5
+b(e)g(d)26 b(Gr)-5 b(aphs,)187 2402 y(Partitioning)24
+b(Meshes,)h(and)g(Computing)f(Fil)5 b(l-R)-5 b(e)g(ducing)24
+b(Or)-5 b(derings)25 b(of)e(Sp)-5 b(arse)25 b(Matric)-5
+b(es)24 b({)g(V)-7 b(ersion)24 b(4.0)p Fw(.)187 2515
+y(Univ)m(ersit)m(y)29 b(of)i(Minnesota,)g(Septem)m(b)s(er)e(1998.)43
+b(h)m(ttp://www-users.cs.umn.edu/)p Fq(\030)p Fw(k)-5
+b(arypis/metis.)0 2700 y([19])47 b(George)35 b(Karypis)c(and)h(Vipin)f
+(Kumar.)48 b(Serial)31 b(and)h(parallel)g(soft)m(w)m(are)i(pac)m(k)-5
+b(ages)35 b(for)e(partitioning)e(un-)187 2813 y(structured)39
+b(graphs)h(and)g(for)h(computing)e(\014ll-reducing)f(orderings)h(of)i
+(sparse)f(matrices.)71 b(AHPCR)m(C,)187 2925 y(Univ)m(ersit)m(y)29
+b(of)i(Minnesota.)g(h)m(ttp://www.arc.umn.edu/soft)m(w)m(are/.)0
+3110 y([20])47 b(C.)39 b(La)m(wson,)j(R.)e(Hanson,)i(D.)e(Kincaid,)g
+(and)f(F.)h(Krogh.)68 b(Basic)40 b(Linear)e(Algebra)h(Subprograms)f
+(for)187 3223 y(Fortran)30 b(usage.)42 b Fp(A)n(CM)31
+b(T)-7 b(r)i(ans.)34 b(Math.)f(Soft.)p Fw(,)e(5:308{323,)k(1979.)0
+3407 y([21])47 b(Xiao)m(y)m(e)41 b(S.)f(Li.)68 b(Sparse)39
+b(Gaussian)g(elimination)e(on)j(high)e(p)s(erformance)h(computers.)69
+b(T)-8 b(ec)m(hnical)39 b(Re-)187 3520 y(p)s(ort)c(UCB//CSD-96-919,)40
+b(Computer)35 b(Science)g(Division,)g(U.C.)h(Berk)m(eley)-8
+b(,)38 b(Septem)m(b)s(er)d(1996.)58 b(Ph.D)187 3633 y(dissertation.)0
+3817 y([22])47 b(Xiao)m(y)m(e)29 b(S.)e(Li.)35 b(An)27
+b(o)m(v)m(erview)g(of)h(Sup)s(erLU:)e(Algorithms,)g(implemen)m(tation,)
+h(and)g(user)g(in)m(terface.)36 b(T)-8 b(ec)m(h-)187
+3930 y(nical)29 b(Rep)s(ort)h(LBNL-53848,)j(La)m(wrence)e(Berk)m(eley)h
+(National)e(Lab)s(oratory)-8 b(,)31 b(Septem)m(b)s(er)f(2003.)0
+4114 y([23])47 b(Xiao)m(y)m(e)35 b(S.)f(Li)f(and)g(James)h(W.)h
+(Demmel.)51 b(Making)34 b(sparse)g(Gaussian)f(elimination)e(scalable)i
+(b)m(y)h(static)187 4227 y(piv)m(oting.)40 b(In)30 b
+Fp(Pr)-5 b(o)g(c)g(e)g(e)g(dings)34 b(of)f(SC98:)43 b(High)32
+b(Performanc)-5 b(e)34 b(Networking)f(and)h(Computing)g(Confer)-5
+b(enc)g(e)p Fw(,)187 4340 y(Orlando,)29 b(Florida,)g(No)m(v)m(em)m(b)s
+(er)j(7{13)g(1998.)0 4524 y([24])47 b(Xiao)m(y)m(e)35
+b(S.)f(Li)f(and)g(James)h(W.)g(Demmel.)51 b(Sup)s(erLU)p
+2089 4524 28 4 v 31 w(DIST:)33 b(A)h(scalable)f(distributed-memory)e
+(sparse)187 4637 y(direct)d(solv)m(er)h(for)g(unsymmetric)e(linear)g
+(systems.)39 b Fp(A)n(CM)29 b(T)-7 b(r)i(ans.)33 b(Mathematic)-5
+b(al)33 b(Softwar)-5 b(e)p Fw(,)32 b(29\(2\):110{)187
+4750 y(140,)g(June)d(2003.)0 4935 y([25])47 b(Joseph)39
+b(W.H.)j(Liu.)68 b(Mo)s(di\014cation)39 b(of)h(the)g(minim)m(um)e
+(degree)i(algorithm)g(b)m(y)g(m)m(ultiple)d(elimination.)187
+5048 y Fp(A)n(CM)31 b(T)-7 b(r)i(ans.)34 b(Math.)f(Softwar)-5
+b(e)p Fw(,)33 b(11:141{153,)i(1985.)0 5232 y([26])47
+b(Message)32 b(Passing)d(In)m(terface)j(\(MPI\))f(forum.)40
+b(h)m(ttp://www.mpi-forum.org/.)0 5416 y([27])47 b(W.)25
+b(Oettli)e(and)g(W.)i(Prager.)31 b(Compatibilit)m(y)21
+b(of)k(appro)m(ximate)f(solution)f(of)h(linear)e(equations)i(with)f
+(giv)m(en)187 5529 y(error)30 b(b)s(ounds)e(for)i(co)s(e\016cien)m(ts)h
+(and)f(righ)m(t)g(hand)f(sides.)40 b Fp(Num.)32 b(Math.)p
+Fw(,)f(6:405{409,)j(1964.)1905 5778 y(69)p eop
+%%Page: 70 71
+70 70 bop 0 280 a Fw([28])47 b(F)-8 b(rancois)33 b(P)m(ellegrini.)44
+b(Scotc)m(h)34 b(3.4)g(user's)e(guide.)46 b(T)-8 b(ec)m(h)33
+b(rep)s(ort)f(1264-01,)k(LaBRI,)d(URM)g(CNRS)f(5800,)187
+393 y(Univ)m(ersit)m(y)d(Bordeaux)i(I,)f(F)-8 b(rance,)32
+b(No)m(v)m(em)m(b)s(er)g(2001.)42 b(h)m(ttp://www.labri.fr/)p
+Fq(\030)p Fw(p)s(elegrin/scotc)m(h.)0 581 y([29])47 b(POSIX)f(System)h
+(Application)f(Arogram)i(In)m(terface:)75 b(Threads)47
+b(extension)g([C)g(Language],)53 b(POSIX)187 694 y(1003.1c)33
+b(draft)d(4.)41 b(IEEE)30 b(Standards)f(Departmen)m(t.)0
+881 y([30])47 b(R.D.)32 b(Sk)m(eel.)44 b(Iterativ)m(e)33
+b(re\014nemen)m(t)e(implies)e(n)m(umerical)h(stabilit)m(y)g(for)i
+(Gaussian)e(elimination.)42 b Fp(Mathe-)187 994 y(matics)33
+b(of)g(Computation)p Fw(,)g(35\(151\):817{832)q(,)j(1980.)1905
+5778 y(70)p eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/MAKE_INC/make.alpha b/MAKE_INC/make.alpha
new file mode 100644
index 0000000..f354d12
--- /dev/null
+++ b/MAKE_INC/make.alpha
@@ -0,0 +1,46 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _alpha
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB = -ldxml
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = cc
+CFLAGS = -O2
+FORTRAN = f77
+FFLAGS = -O
+LOADER = cc
+LOADOPTS = -O2
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
diff --git a/MAKE_INC/make.cray b/MAKE_INC/make.cray
new file mode 100644
index 0000000..d8841ed
--- /dev/null
+++ b/MAKE_INC/make.cray
@@ -0,0 +1,53 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: November 15, 1997 Version 1.1
+#
+# Modified: September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _cray
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+#
+#
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB =
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = cc
+CFLAGS = -D_CRAY -O3 -h aggress
+#CFLAGS = -O3 -h scalar3,aggress,split,unroll,inline3 -D_CRAY
+PTROPT = -h restrict=a
+FORTRAN = f77
+FFLAGS = -O
+LOADER = cc
+LOADOPTS =
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DUpCase
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/local/matlab
diff --git a/MAKE_INC/make.hppa b/MAKE_INC/make.hppa
new file mode 100644
index 0000000..04e9d34
--- /dev/null
+++ b/MAKE_INC/make.hppa
@@ -0,0 +1,54 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _hppa
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB = -lblas -lcl
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = echo
+#
+# Compiler and optimization
+#
+CC = gcc
+CFLAGS = -O3
+FORTRAN = f77
+FFLAGS = -O
+LOADER = gcc
+LOADOPTS = -O3
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DNoChange
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
+
diff --git a/MAKE_INC/make.inc b/MAKE_INC/make.inc
new file mode 100644
index 0000000..83ffb02
--- /dev/null
+++ b/MAKE_INC/make.inc
@@ -0,0 +1,52 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _linux
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASLIB = ../blas$(PLAT).a
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = gcc
+CFLAGS = -O2
+FORTRAN = g77
+FFLAGS = -O2
+LOADER = gcc
+LOADOPTS =
+
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DAdd_
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
+
diff --git a/MAKE_INC/make.linux b/MAKE_INC/make.linux
new file mode 100644
index 0000000..0d17a92
--- /dev/null
+++ b/MAKE_INC/make.linux
@@ -0,0 +1,52 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _linux
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASLIB = ../blas$(PLAT).a
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = gcc
+CFLAGS = -O2
+FORTRAN = g77
+FFLAGS = -O2
+LOADER = gcc
+LOADOPTS =
+
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DAdd__
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
+
diff --git a/MAKE_INC/make.rs6k b/MAKE_INC/make.rs6k
new file mode 100644
index 0000000..389b9cc
--- /dev/null
+++ b/MAKE_INC/make.rs6k
@@ -0,0 +1,58 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _rs6k
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+#
+# If you don't have ESSL, you can use the following blaslib instead:
+# BLASLIB = -lblas -lxlf -lxlf90
+# which may be slower than ESSL
+#
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB = -lessl
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = xlc
+CFLAGS = -O3
+FORTRAN = xlf
+FFLAGS = -O3
+LOADER = xlc
+LOADOPTS = -bmaxdata:0x80000000
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DNoChange
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/local/matlab
+
+
diff --git a/MAKE_INC/make.sgi b/MAKE_INC/make.sgi
new file mode 100644
index 0000000..606b5aa
--- /dev/null
+++ b/MAKE_INC/make.sgi
@@ -0,0 +1,51 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _sgi
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASLIB = ../blas$(PLAT).a
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = echo
+
+CC = cc
+CFLAGS = -O2
+NOOPTS =
+FORTRAN = f77
+FFLAGS = -O
+LOADER = cc
+LOADOPTS =
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DAdd_
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/local/matlab
diff --git a/MAKE_INC/make.solaris b/MAKE_INC/make.solaris
new file mode 100644
index 0000000..feaad46
--- /dev/null
+++ b/MAKE_INC/make.solaris
@@ -0,0 +1,51 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _solaris
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASLIB = ../blas$(PLAT).a
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = cc
+CFLAGS = -xO3 -xcg92
+FORTRAN = f77
+FFLAGS = -O
+LOADER = cc
+LOADOPTS = -xO3
+
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DAdd_
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
diff --git a/MAKE_INC/make.sp b/MAKE_INC/make.sp
new file mode 100644
index 0000000..03417e3
--- /dev/null
+++ b/MAKE_INC/make.sp
@@ -0,0 +1,58 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _sp
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+#
+# If you don't have ESSL, you can use the following blaslib instead:
+# BLASLIB = -lblas -lxlf -lxlf90
+# which may be slower than ESSL
+#
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB = -lessl
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = xlc
+CFLAGS = -O3 -qarch=pwr3 -qalias=allptrs
+FORTRAN = xlf
+FFLAGS = -O3 -qarch=pwr3
+LOADER = xlc
+LOADOPTS = -bmaxdata:0x80000000
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DNoChange
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/local/matlab
+
+
diff --git a/MAKE_INC/make.sun4 b/MAKE_INC/make.sun4
new file mode 100644
index 0000000..7ed5661
--- /dev/null
+++ b/MAKE_INC/make.sun4
@@ -0,0 +1,56 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _sun4
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASLIB = ../blas$(PLAT).a
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+#
+# Compiler and optimization
+#
+CC = gcc
+CFLAGS = -O3
+FORTRAN = f77
+FFLAGS = -O
+LOADER = gcc
+LOADOPTS = -O3
+
+#
+# C preprocessor defs for compilation for the Fortran interface
+# (-DNoChange, -DAdd_, -DUpCase, or -DAdd__)
+#
+CDEFS = -DAdd_
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
+
+
+
diff --git a/MATLAB/Makefile b/MATLAB/Makefile
new file mode 100644
index 0000000..d4c94d5
--- /dev/null
+++ b/MATLAB/Makefile
@@ -0,0 +1,20 @@
+include ../make.inc
+
+LUSRC = ../SRC
+HEADER = -I$(LUSRC) -I$(MATLAB)/extern/include
+#
+# For Matlab Version 4 compatibility: comment out -DV5, add -V4 in FFLAGS
+FLAGS = -O -DV5
+
+all: mexlusolve mexsuperlu
+
+mexlusolve: mexlusolve.c ../$(SUPERLULIB)
+ ${MATLAB}/bin/mex $(HEADER) ${FLAGS} mexlusolve.c \
+ ../$(SUPERLULIB) $(BLASLIB) -lm
+
+mexsuperlu: mexsuperlu.c ../$(SUPERLULIB)
+ ${MATLAB}/bin/mex $(HEADER) ${FLAGS} mexsuperlu.c \
+ ../$(SUPERLULIB) $(BLASLIB) -lm
+
+clean:
+ rm -f *.o *.mex*
diff --git a/MATLAB/README b/MATLAB/README
new file mode 100644
index 0000000..7e84851
--- /dev/null
+++ b/MATLAB/README
@@ -0,0 +1,20 @@
+This directory contains the following Matlab script files,
+which can be invoked in Matlab:
+
+ superlu.m Supernodal LU factorization
+ lusolve.m Solve linear systems by supernodal LU factorization
+ trysuperlu.m Test the Matlab interface to SUPERLU
+ trylusolve.m Test the Matlab interface to LUSOLVE
+ copyright.m Complete copyright and licensing notice
+
+Say HELP SUPERLU and HELP LUSOLVE to Matlab for details.
+
+--------
+| NOTE |
+--------
+ The Makefile is set up so that the MEX-files are compatible with Matlab
+ Version 5. For Version 4 compatibility, you need to change
+ FLAGS = -O -DV5
+ to
+ FLAGS = -O -V4
+ in Makefile.
diff --git a/MATLAB/airfoil2.mat b/MATLAB/airfoil2.mat
new file mode 100644
index 0000000..6f41ef2
Binary files /dev/null and b/MATLAB/airfoil2.mat differ
diff --git a/MATLAB/babble.m b/MATLAB/babble.m
new file mode 100644
index 0000000..24401cf
--- /dev/null
+++ b/MATLAB/babble.m
@@ -0,0 +1,2 @@
+% BABBLE Set the sparse monitor flag to very verbose.
+spparms('spumoni', 2);
\ No newline at end of file
diff --git a/MATLAB/burble.m b/MATLAB/burble.m
new file mode 100644
index 0000000..f137588
--- /dev/null
+++ b/MATLAB/burble.m
@@ -0,0 +1,2 @@
+% BURBLE Set the sparse monitor flag to extremely verbose.
+spparms('spumoni', 3);
\ No newline at end of file
diff --git a/MATLAB/copyright.m b/MATLAB/copyright.m
new file mode 100644
index 0000000..2e3e5f3
--- /dev/null
+++ b/MATLAB/copyright.m
@@ -0,0 +1,14 @@
+%
+% Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+%
+% THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+% EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+%
+% Permission is hereby granted to use or copy this program for any
+% purpose, provided the above notices are retained on all copies.
+% Permission to modify the code and to distribute modified code is
+% granted, provided the above notices are retained, and a notice that
+% the code was modified is included with the above copyright notice.
+%
+
+help copyright
diff --git a/MATLAB/hbo.m b/MATLAB/hbo.m
new file mode 100644
index 0000000..30467af
--- /dev/null
+++ b/MATLAB/hbo.m
@@ -0,0 +1,119 @@
+function [A,xy,B,hbtype,rhstype] = hbo(file)
+%HBO Read and process a Harwell-Boeing sparse matrix file.
+% A = HBO('matfile') gets the sparse matrix from the specified .mat file.
+%
+% [A,xy,B,hbtype,rhstype] = HBO('matfile') also gets:
+% xy: node coordinates (if present)
+% B: right-hand sides, starting guesses, or exact solutions (if present)
+% hbtype: matrix type, which will be one of the following three-letter
+% codes: CSA, PRA, PSA, PSE, PUA, RRA, RSA, RUA, RZA, UNK
+% rhstype: a description of B, for which see the user's guide.
+%
+% In addition to reading the file, HBO assembles any unassembled matrices,
+% symmetrizes any symmetric matrices, and implicitizes any explicit zeros.
+%
+% HBO .mat files are created from Harwell-Boeing data files by the
+% stand-alone Fortran process, HBO2MAT. These .mat files contain:
+%
+% For assembled, type xxA, matrices:
+% A - the sparse matrix.
+% hbtitle - The first 72 characters of the first "card".
+% hbname - The matrix name, same as file name without .mat.
+% hbtype - One of those three letter codes.
+% hbfill - If present, the value inserted in pattern matrices.
+% hbzero - If present, the value inserted for explicit zeros.
+% rhstype - If present, the right hand side type.
+% xy - If present, a matrix whose rows are node coordinates.
+% B - If present, a matrix whose columns are right-hand
+% sides, etc.
+%
+% For unassembled, xxE, matrices:
+% hbtitle - The first 72 characters of the first "card".
+% hbname - The matrix name, same as file name without .mat.
+% hbtype - Only type PSE exists in current collection.
+% varind and elptr - The indices specifying the locations
+% of the constituent elements.
+%
+% Say "help harwell" for more information about the collection.
+% See also HBOLIST, HBOFIND.
+
+% Cleve Moler, The MathWorks, 4/2/94.
+
+load(file)
+
+if ~exist('hbtype')
+ hbtype = 'UNK';
+ A = A;
+
+% PSE - Pattern symmetric unassembled
+elseif strcmp(hbtype,'PSE')
+ n1 = length(elptr);
+ elptr(n1) = [];
+ J = varind;
+ I = zeros(size(J));
+ I(elptr) = ones(size(elptr));
+ I = cumsum(I);
+ A = sparse(I,J,1);
+ A = A'*A;
+
+% RSA - Real symmetric
+elseif strcmp(hbtype,'RSA')
+ A = A + A' - diag(diag(A));
+
+% RZA - Real skew symmetric
+elseif strcmp(hbtype,'RZA')
+ A = A - A';
+
+% RUA - Real unsymmetric
+elseif strcmp(hbtype,'RUA')
+ A = A;
+
+% RRA - Real rectangular
+elseif strcmp(hbtype,'RRA')
+ A = A;
+
+% CSA - Complex symmetric
+elseif strcmp(hbtype,'CSA')
+ A = A + A' - diag(diag(A));
+
+% PSA - Pattern symmetric
+elseif strcmp(hbtype,'PSA')
+ A = A + A' - diag(diag(A));
+
+% PUA - Pattern unsymmetric
+elseif strcmp(hbtype,'PUA')
+ A = A;
+
+% PRA - Pattern rectangular
+elseif strcmp(hbtype,'PRA')
+ A = A;
+
+else
+ error(['Harwell-Boeing type ' hbtype ' unexpected.'])
+end
+
+% Remove any explict zeros
+
+if exist('hbzero')
+ k = find(A == hbzero);
+ A(k) = sparse(length(k),1);
+end
+
+% Get any right-hand side vectors or coordinates.
+
+if exist('xyz')
+ xy = xyz;
+end;
+
+if ~exist('xy')
+ xy = [];
+end;
+
+if ~exist('B')
+ B = [];
+ rhstype = 'NON';
+end;
+
+if ~exist('rhstype')
+ rhstype = 'UNK';
+end;
diff --git a/MATLAB/isperm.m b/MATLAB/isperm.m
new file mode 100644
index 0000000..afcf9e6
--- /dev/null
+++ b/MATLAB/isperm.m
@@ -0,0 +1,9 @@
+function result = isperm(p)
+% ISPERM Is the argument a permutation?
+
+result = 0;
+if min(size(p)) > 1, return, end;
+ds = diff(sort(p));
+if any(ds ~= 1), return, end;
+if min(p) ~= 1, return, end;
+result = 1;
diff --git a/MATLAB/lusolve.m b/MATLAB/lusolve.m
new file mode 100644
index 0000000..a536652
--- /dev/null
+++ b/MATLAB/lusolve.m
@@ -0,0 +1,62 @@
+function x = lusolve(A,b,Pcol)
+% LUSOLVE : Solve linear systems by supernodal LU factorization.
+%
+% x = lusolve(A, b) returns the solution to the linear system A*x = b,
+% using a supernodal LU factorization that is faster than Matlab's
+% builtin LU. This m-file just calls a mex routine to do the work.
+%
+% By default, A is preordered by column minimum degree before factorization.
+% Optionally, the user can supply a desired column ordering:
+%
+% x = lusolve(A, b, pcol) uses pcol as a column permutation.
+% It still returns x = A\b, but it factors A(:,pcol) (if pcol is a
+% permutation vector) or A*Pcol (if Pcol is a permutation matrix).
+%
+% x = lusolve(A, b, 0) suppresses the default minimum degree ordering;
+% that is, it forces the identity permutation on columns.
+%
+% See also SUPERLU.
+%
+% John Gilbert, 6 April 1995
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+
+[m,n] = size(A);
+if m ~= n
+ error('matrix must be square');
+end;
+[mb,nb] = size(b);
+if mb ~= n
+ error('right-hand side must have same row dimension as matrix');
+end;
+if n == 0
+ x = [];
+ return;
+end;
+
+% As necessary, compute the column permutation, and
+% convert it from a permutation vector to a permutation matrix
+% to fit the internal data structures of mexlusolve.
+if nargin < 3
+ Pcol = colmmd(A);
+end;
+if isempty(Pcol) | Pcol == 0
+ Pcol = speye(n);
+end;
+if min(size(Pcol)) == 1
+ Pcol = sparse(1:n,Pcol,1,n,n);
+end;
+
+% Make sure the matrices are sparse and the vector is full.
+if ~issparse(A)
+ A = sparse(A);
+end;
+if issparse(b)
+ b = full(b);
+end;
+if ~issparse(Pcol)
+ Pcol = sparse(Pcol);
+end;
+
+x = mexlusolve(A,b,Pcol);
diff --git a/MATLAB/mexlusolve.c b/MATLAB/mexlusolve.c
new file mode 100644
index 0000000..f7ceeb2
--- /dev/null
+++ b/MATLAB/mexlusolve.c
@@ -0,0 +1,149 @@
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include <stdio.h>
+#include "mex.h"
+#include "dsp_defs.h"
+
+#ifdef V5
+#define MatlabMatrix mxArray
+#else /* V4 */
+#define MatlabMatrix Matrix
+#endif
+
+
+/* Aliases for input and output arguments */
+#define A_in prhs[0]
+#define b_in prhs[1]
+#define Pc_in prhs[2]
+#define x_out plhs[0]
+
+#define verbose (SPUMONI>0)
+#define babble (SPUMONI>1)
+#define burble (SPUMONI>2)
+
+void mexFunction(
+ int nlhs, /* number of expected outputs */
+ MatlabMatrix *plhs[], /* matrix pointer array returning outputs */
+ int nrhs, /* number of inputs */
+#ifdef V5
+ const MatlabMatrix *prhs[] /* matrix pointer array for inputs. */
+#else /* V4 */
+ MatlabMatrix *prhs[] /* matrix pointer array for inputs */
+#endif
+ )
+{
+ int SPUMONI; /* ... as should the sparse monitor flag */
+#ifdef V5
+ double FlopsInSuperLU; /* ... as should the flop counter. */
+#else /* V4 */
+ Real FlopsInSuperLU; /* ... as should the flop counter */
+#endif
+ extern flops_t LUFactFlops(SuperLUStat_t*);
+ extern flops_t LUSolveFlops(SuperLUStat_t*);
+
+ /* Arguments to dgssv(). */
+ SuperMatrix A;
+ SuperMatrix B;
+ SuperMatrix L, U;
+ int m, n, nnz;
+ int numrhs;
+ double *vb, *x;
+ double *val;
+ int *rowind;
+ int *colptr;
+ int *perm_r, *perm_c;
+ int info;
+ MatlabMatrix *X, *Y; /* args to calls back to Matlab */
+ int i, mexerr;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+ /* Check number of arguments passed from Matlab. */
+ if (nrhs != 3) {
+ mexErrMsgTxt("LUSOLVE requires 3 input arguments.");
+ } else if (nlhs != 1) {
+ mexErrMsgTxt("LUSOLVE requires 1 output argument.");
+ }
+
+ /* Read the Sparse Monitor Flag */
+ X = mxCreateString("spumoni");
+ mexerr = mexCallMATLAB(1, &Y, 1, &X, "sparsfun");
+ SPUMONI = mxGetScalar(Y);
+#ifdef V5
+ mxDestroyArray(Y);
+ mxDestroyArray(X);
+#else
+ mxFreeMatrix(Y);
+ mxFreeMatrix(X);
+#endif
+
+ m = mxGetM(A_in);
+ n = mxGetN(A_in);
+ numrhs = mxGetN(b_in);
+ if ( babble ) printf("m=%d, n=%d, numrhs=%d\n", m, n, numrhs);
+ vb = mxGetPr(b_in);
+#ifdef V5
+ x_out = mxCreateDoubleMatrix(m, numrhs, mxREAL);
+#else
+ x_out = mxCreateFull(m, numrhs, REAL);
+#endif
+ x = mxGetPr(x_out);
+ perm_r = (int *) mxCalloc(m, sizeof(int));
+ perm_c = mxGetIr(Pc_in);
+
+ val = mxGetPr(A_in);
+ rowind = mxGetIr(A_in);
+ colptr = mxGetJc(A_in);
+ nnz = colptr[n];
+ dCreate_CompCol_Matrix(&A, m, n, nnz, val, rowind, colptr,
+ SLU_NC, SLU_D, SLU_GE);
+ dCopy_Dense_Matrix(m, numrhs, vb, m, x, m);
+ dCreate_Dense_Matrix(&B, m, numrhs, x, m, SLU_DN, SLU_D, SLU_GE);
+
+ FlopsInSuperLU = 0;
+
+ set_default_options(&options);
+ options.ColPerm = MY_PERMC;
+ StatInit(&stat);
+
+ /* Call simple driver */
+ if ( verbose )
+ mexPrintf("Call LUSOLVE, use SUPERLU to factor first ...\n");
+ dgssv(&options, &A, perm_c, perm_r, &L, &U, &B, &stat, &info);
+
+#if 0 /* FLOPS is not available in the new Matlab. */
+ /* Tell Matlab how many flops we did. */
+ FlopsInSuperLU += LUFactFlops(&stat) + LUSolveFlops(&stat);
+ if ( verbose ) mexPrintf("LUSOLVE flops: %.f\n", FlopsInSuperLU);
+ mexerr = mexCallMATLAB(1, &X, 0, NULL, "flops");
+ *(mxGetPr(X)) += FlopsInSuperLU;
+ mexerr = mexCallMATLAB(1, &Y, 1, &X, "flops");
+#ifdef V5
+ mxDestroyArray(Y);
+ mxDestroyArray(X);
+#else
+ mxFreeMatrix(Y);
+ mxFreeMatrix(X);
+#endif
+#endif
+
+ /* Construct Matlab solution matrix. */
+ if ( !info ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ if ( babble ) printf("Destroy L & U from SuperLU...\n");
+ } else {
+ mexErrMsgTxt("Error returned from C dgssv().");
+ }
+
+ mxFree(perm_r);
+ StatFree(&stat);
+
+ return;
+
+}
diff --git a/MATLAB/mexlusolve.m b/MATLAB/mexlusolve.m
new file mode 100644
index 0000000..0d07e65
--- /dev/null
+++ b/MATLAB/mexlusolve.m
@@ -0,0 +1,13 @@
+function x = mexlusolve(A,b,Pcol)
+% MEXLUSOLVE : Supernodal LU factor-and-solve.
+%
+% MEXLUSOLVE is the mex-file version of the supernodal solver.
+% The user will normally call LUSOLVE, which calls MEXLUSOLVE.
+% See LUSOLVE for a description of parameters.
+
+% Above is the text for HELP MEXLUSOLVE; the following will be executed
+% only if the mex-file appropriate for the machine can't be found.
+
+disp('Warning: Executable mexlusolve.mex not found for this architecture.');
+disp('The supernodal LU package seems not to be installed (or built for Matlab).');
+x = zeros(size(A,2),1);
diff --git a/MATLAB/mexopts.sh.old b/MATLAB/mexopts.sh.old
new file mode 100755
index 0000000..9cc708d
--- /dev/null
+++ b/MATLAB/mexopts.sh.old
@@ -0,0 +1,234 @@
+#
+# mexopts.sh Shell script for configuring MEX-file creation script,
+# mex.
+#
+# usage: Do not call this file directly; it is sourced by the
+# mex shell script. Modify only if you don't like the
+# defaults after running mex. No spaces are allowed
+# around the '=' in the variable assignment.
+#
+# SELECTION_TAGs occur in template option files and are used by MATLAB
+# tools, such as mex and mbuild, to determine the purpose of the contents
+# of an option file. These tags are only interpreted when preceded by '#'
+# and followed by ':'.
+#
+#SELECTION_TAG_MEX_OPT: Template Options file for building MEXfiles using the native compiler
+#
+# Copyright (c) 1984-1998 by The MathWorks, Inc.
+# All Rights Reserved.
+# $Revision: 1.40 $ $Date: 1997/12/05 20:18:39 $
+#----------------------------------------------------------------------------
+#
+ case "$Arch" in
+ Undetermined)
+#----------------------------------------------------------------------------
+# Change this line if you need to specify the location of the MATLAB
+# root directory. The cmex script needs to know where to find utility
+# routines so that it can determine the architecture; therefore, this
+# assignment needs to be done while the architecture is still
+# undetermined.
+#----------------------------------------------------------------------------
+ MATLAB="$MATLAB"
+ ;;
+ alpha)
+#----------------------------------------------------------------------------
+ CC='cc'
+ CFLAGS='-ieee -std1'
+ CLIBS=''
+ COPTIMFLAGS='-O2 -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS='-shared'
+ FLIBS='-lUfor -lfor -lFutil'
+ FOPTIMFLAGS='-O2'
+ FDEBUGFLAGS='-g'
+#
+ LD='ld'
+ LDFLAGS="-expect_unresolved '*' -shared -hidden -exported_symbol $ENTRYPOINT -exported_symbol mexVersion"
+ LDOPTIMFLAGS=''
+ LDDEBUGFLAGS=''
+#----------------------------------------------------------------------------
+ ;;
+ hp700)
+#----------------------------------------------------------------------------
+ CC='cc'
+ CFLAGS='+z -D_HPUX_SOURCE -Aa +DA1.1'
+ CLIBS=''
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS='+z +DA1.1'
+ FLIBS=''
+ FOPTIMFLAGS='-O'
+ FDEBUGFLAGS='-g'
+#
+ LD='ld'
+ LDFLAGS="-b +e $ENTRYPOINT +e mexVersion"
+ LDOPTIMFLAGS=''
+ LDDEBUGFLAGS=''
+#----------------------------------------------------------------------------
+ ;;
+ ibm_rs)
+#----------------------------------------------------------------------------
+ CC='cc'
+ CFLAGS='-qlanglvl=ansi'
+ CLIBS='-lm'
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS=''
+ FLIBS="$MATLAB/extern/lib/ibm_rs/fmex1.o -lm"
+ FOPTIMFLAGS='-O'
+ FDEBUGFLAGS='-g'
+#
+ LD='cc'
+ LDFLAGS="-bI:$MATLAB/extern/lib/ibm_rs/exp.ibm_rs -bE:$MATLAB/extern/lib/ibm_rs/$MAPFILE -bM:SRE -e $ENTRYPOINT"
+ LDOPTIMFLAGS='-s'
+ LDDEBUGFLAGS=''
+#----------------------------------------------------------------------------
+ ;;
+ lnx86)
+#----------------------------------------------------------------------------
+ CC='gcc'
+ CFLAGS=''
+ CLIBS=''
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+# Use these flags for using f2c and gcc for Fortan MEX-Files
+#
+ FC='f2c'
+ FOPTIMFLAGS=''
+ FFLAGS=''
+ FDEBUGFLAGS='-g'
+ FLIBS='-lf2c -Wl,--defsym,MAIN__=mexfunction_'
+#
+# Use these flags for using the Absoft F77 Fortran Compiler
+#
+ # FC='f77'
+ # FOPTIMFLAGS=''
+ # FFLAGS='-f -N1 -N9 -N70'
+ # FDEBUGFLAGS='-gg'
+ # FLIBS='-lf77'
+#
+ LD='gcc'
+ LDFLAGS='-shared -rdynamic'
+ LDOPTIMFLAGS=''
+ LDDEBUGFLAGS=''
+#----------------------------------------------------------------------------
+ ;;
+ sgi)
+#----------------------------------------------------------------------------
+ CC='cc'
+ CFLAGS='-ansi -mips2'
+ CLIBS=''
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS=''
+ FLIBS=''
+ FOPTIMFLAGS='-O'
+ FDEBUGFLAGS='-g'
+#
+ LD='ld'
+ LDFLAGS="-shared -U -Bsymbolic -exported_symbol $ENTRYPOINT -exported_symbol mexVersion"
+ LDOPTIMFLAGS=''
+ LDDEBUGFLAGS=''
+ ;;
+#----------------------------------------------------------------------------
+ sgi64)
+# R8000 only: The default action of mex is to generate full MIPS IV
+# (R8000) instruction set.
+#----------------------------------------------------------------------------
+ CC='cc'
+ CFLAGS='-ansi -mips4 -64'
+ CLIBS=''
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS='-mips4 -64'
+ FLIBS=''
+ FOPTIMFLAGS='-O'
+ FDEBUGFLAGS='-g'
+#
+ LD='ld'
+ LDFLAGS="-mips4 -64 -shared -U -Bsymbolic -exported_symbol $ENTRYPOINT -exported_symbol mexVersion"
+ LDOPTIMFLAGS=''
+ LDDEBUGFLAGS=''
+ ;;
+#----------------------------------------------------------------------------
+ sol2)
+#----------------------------------------------------------------------------
+ CC='cc'
+ CFLAGS='-dalign'
+ CLIBS=''
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS='-dalign'
+ FLIBS=''
+ FOPTIMFLAGS='-O'
+ FDEBUGFLAGS='-g'
+#
+ LD='/usr/ccs/bin/ld'
+ LDFLAGS="-G -M $MATLAB/extern/lib/sol2/$MAPFILE"
+ LDOPTIMFLAGS=''
+ LDDEBUGFLAGS=''
+#----------------------------------------------------------------------------
+ ;;
+ sun4)
+#----------------------------------------------------------------------------
+# A dry run of the appropriate compiler is done in the mex script to
+# generate the correct library list. Use -v option to see what
+# libraries are actually being linked in.
+#----------------------------------------------------------------------------
+ CC='acc'
+ CFLAGS='-DMEXSUN4'
+ CLIBS="$MATLAB/extern/lib/sun4/libmex.a -lm"
+ COPTIMFLAGS='-O -DNDEBUG'
+ CDEBUGFLAGS='-g'
+#
+ FC='f77'
+ FFLAGS=''
+ FLIBS="$MATLAB/extern/lib/sun4/libmex.a -lm"
+ FOPTIMFLAGS='-O'
+ FDEBUGFLAGS='-g'
+#
+ LD='ld'
+ LDFLAGS='-d -r -u _mex_entry_pt -u _mexFunction'
+ LDOPTIMFLAGS='-x'
+ LDDEBUGFLAGS=''
+#----------------------------------------------------------------------------
+ ;;
+ esac
+#############################################################################
+#
+# Architecture independent lines:
+#
+# Set and uncomment any lines which will apply to all architectures.
+#
+#----------------------------------------------------------------------------
+# CC="$CC"
+# CFLAGS="$CFLAGS"
+# COPTIMFLAGS="$COPTIMFLAGS"
+# CDEBUGFLAGS="$CDEBUGFLAGS"
+# CLIBS="$CLIBS"
+#
+# FC="$FC"
+# FFLAGS="$FFLAGS"
+# FOPTIMFLAGS="$FOPTIMFLAGS"
+# FDEBUGFLAGS="$FDEBUGFLAGS"
+# FLIBS="$FLIBS"
+#
+# LD="$LD"
+# LDFLAGS="$LDFLAGS"
+# LDOPTIMFLAGS="$LDOPTIMFLAGS"
+# LDDEBUGFLAGS="$LDDEBUGFLAGS"
+#----------------------------------------------------------------------------
+#############################################################################
diff --git a/MATLAB/mexsuperlu.c b/MATLAB/mexsuperlu.c
new file mode 100644
index 0000000..0da4a9e
--- /dev/null
+++ b/MATLAB/mexsuperlu.c
@@ -0,0 +1,264 @@
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include <stdio.h>
+#include "mex.h"
+#include "dsp_defs.h"
+
+
+#ifdef V5
+#define MatlabMatrix mxArray
+#else /* V4 */
+#define MatlabMatrix Matrix
+#endif
+
+
+
+/* Aliases for input and output arguments */
+#define A_in prhs[0]
+#define Pc_in prhs[1]
+#define L_out plhs[0]
+#define U_out plhs[1]
+#define Pr_out plhs[2]
+#define Pc_out plhs[3]
+
+void LUextract(SuperMatrix *, SuperMatrix *, double *, int *, int *,
+ double *, int *, int *, int *, int*);
+
+#define verbose (SPUMONI>0)
+#define babble (SPUMONI>1)
+#define burble (SPUMONI>2)
+
+void mexFunction(
+ int nlhs, /* number of expected outputs */
+ MatlabMatrix *plhs[], /* matrix pointer array returning outputs */
+ int nrhs, /* number of inputs */
+#ifdef V5
+ const MatlabMatrix *prhs[] /* matrix pointer array for inputs */
+#else /* V4 */
+ MatlabMatrix *prhs[] /* matrix pointer array for inputs */
+#endif
+ )
+{
+ int SPUMONI; /* ... as should the sparse monitor flag */
+#ifdef V5
+ double FlopsInSuperLU; /* ... as should the flop counter */
+#else
+ Real FlopsInSuperLU; /* ... as should the flop counter */
+#endif
+ extern flops_t LUFactFlops(SuperLUStat_t *);
+
+ /* Arguments to C dgstrf(). */
+ SuperMatrix A;
+ SuperMatrix Ac; /* Matrix postmultiplied by Pc */
+ SuperMatrix L, U;
+ int m, n, nnz;
+ double *val;
+ int *rowind;
+ int *colptr;
+ int *etree, *perm_r, *perm_c;
+ int panel_size, relax;
+ double thresh = 1.0; /* diagonal pivoting threshold */
+ double drop_tol = 0.0; /* drop tolerance parameter */
+ int info;
+ MatlabMatrix *X, *Y; /* args to calls back to Matlab */
+ int i, mexerr;
+ double *dp;
+ double *Lval, *Uval;
+ int *Lrow, *Urow;
+ int *Lcol, *Ucol;
+ int nnzL, nnzU, snnzL, snnzU;
+ superlu_options_t options;
+ SuperLUStat_t stat;
+
+ /* Check number of arguments passed from Matlab. */
+ if (nrhs != 2) {
+ mexErrMsgTxt("SUPERLU requires 2 input arguments.");
+ } else if (nlhs != 4) {
+ mexErrMsgTxt("SUPERLU requires 4 output arguments.");
+ }
+
+ /* Read the Sparse Monitor Flag */
+ X = mxCreateString("spumoni");
+ mexerr = mexCallMATLAB(1, &Y, 1, &X, "sparsfun");
+ SPUMONI = mxGetScalar(Y);
+#ifdef V5
+ mxDestroyArray(Y);
+ mxDestroyArray(X);
+#else
+ mxFreeMatrix(Y);
+ mxFreeMatrix(X);
+#endif
+
+ m = mxGetM(A_in);
+ n = mxGetN(A_in);
+ etree = (int *) mxCalloc(n, sizeof(int));
+ perm_r = (int *) mxCalloc(m, sizeof(int));
+ perm_c = mxGetIr(Pc_in);
+ val = mxGetPr(A_in);
+ rowind = mxGetIr(A_in);
+ colptr = mxGetJc(A_in);
+ nnz = colptr[n];
+ dCreate_CompCol_Matrix(&A, m, n, nnz, val, rowind, colptr,
+ SLU_NC, SLU_D, SLU_GE);
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ thresh = 1.0;
+ drop_tol = 0.0;
+ FlopsInSuperLU = 0;
+
+ set_default_options(&options);
+ StatInit(&stat);
+
+ if ( verbose ) mexPrintf("Apply column perm to A and compute etree...\n");
+ sp_preorder(&options, &A, perm_c, etree, &Ac);
+
+ if ( verbose ) {
+ mexPrintf("LU factorization...\n");
+ mexPrintf("\tpanel_size %d, relax %d, diag_pivot_thresh %.2g\n",
+ panel_size, relax, thresh);
+ }
+ dgstrf(&options, &Ac, drop_tol, relax, panel_size, etree,
+ NULL, 0, perm_c, perm_r, &L, &U, &stat, &info);
+
+ if ( verbose ) mexPrintf("INFO from dgstrf %d\n", info);
+
+#if 0 /* FLOPS is not available in the new Matlab. */
+ /* Tell Matlab how many flops we did. */
+ FlopsInSuperLU += LUFactFlops(&stat);
+ if (verbose) mexPrintf("SUPERLU flops: %.f\n", FlopsInSuperLU);
+ mexerr = mexCallMATLAB(1, &X, 0, NULL, "flops");
+ *(mxGetPr(X)) += FlopsInSuperLU;
+ mexerr = mexCallMATLAB(1, &Y, 1, &X, "flops");
+#ifdef V5
+ mxDestroyArray(Y);
+ mxDestroyArray(X);
+#else
+ mxFreeMatrix(Y);
+ mxFreeMatrix(X);
+#endif
+#endif
+
+ /* Construct output arguments for Matlab. */
+ if ( info >= 0 && info <= n ) {
+#ifdef V5
+ Pr_out = mxCreateDoubleMatrix(m, 1, mxREAL);
+#else
+ Pr_out = mxCreateFull(m, 1, REAL);
+#endif
+ dp = mxGetPr(Pr_out);
+ for (i = 0; i < m; *dp++ = (double) perm_r[i++]+1);
+#ifdef V5
+ Pc_out = mxCreateDoubleMatrix(n, 1, mxREAL);
+#else
+ Pc_out = mxCreateFull(n, 1, REAL);
+#endif
+ dp = mxGetPr(Pc_out);
+ for (i = 0; i < n; *dp++ = (double) perm_c[i++]+1);
+
+ /* Now for L and U */
+ nnzL = ((SCformat*)L.Store)->nnz; /* count diagonals */
+ nnzU = ((NCformat*)U.Store)->nnz;
+
+#ifdef V5
+ L_out = mxCreateSparse(m, n, nnzL, mxREAL);
+#else
+ L_out = mxCreateSparse(m, n, nnzL, REAL);
+#endif
+ Lval = mxGetPr(L_out);
+ Lrow = mxGetIr(L_out);
+ Lcol = mxGetJc(L_out);
+
+#ifdef V5
+ U_out = mxCreateSparse(m, n, nnzU, mxREAL);
+#else
+ U_out = mxCreateSparse(m, n, nnzU, REAL);
+#endif
+ Uval = mxGetPr(U_out);
+ Urow = mxGetIr(U_out);
+ Ucol = mxGetJc(U_out);
+
+ LUextract(&L, &U, Lval, Lrow, Lcol, Uval, Urow, Ucol, &snnzL, &snnzU);
+
+ Destroy_CompCol_Permuted(&Ac);
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+
+ if (babble) mexPrintf("factor nonzeros: %d unsqueezed, %d squeezed.\n",
+ nnzL + nnzU, snnzL + snnzU);
+ } else {
+ mexErrMsgTxt("Error returned from C dgstrf().");
+ }
+
+ mxFree(etree);
+ mxFree(perm_r);
+ StatFree(&stat);
+ return;
+}
+
+void
+LUextract(SuperMatrix *L, SuperMatrix *U, double *Lval, int *Lrow,
+ int *Lcol, double *Uval, int *Urow, int *Ucol, int *snnzL,
+ int *snnzU)
+{
+ int i, j, k;
+ int upper;
+ int fsupc, istart, nsupr;
+ int lastl = 0, lastu = 0;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *SNptr;
+
+ Lstore = L->Store;
+ Ustore = U->Store;
+ Lcol[0] = 0;
+ Ucol[0] = 0;
+
+ /* for each supernode */
+ for (k = 0; k <= Lstore->nsuper; ++k) {
+
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ upper = 1;
+
+ /* for each column in the supernode */
+ for (j = fsupc; j < L_FST_SUPC(k+1); ++j) {
+ SNptr = &((double*)Lstore->nzval)[L_NZ_START(j)];
+
+ /* Extract U */
+ for (i = U_NZ_START(j); i < U_NZ_START(j+1); ++i) {
+ Uval[lastu] = ((double*)Ustore->nzval)[i];
+ /* Matlab doesn't like explicit zero. */
+ if (Uval[lastu] != 0.0) Urow[lastu++] = U_SUB(i);
+ }
+ for (i = 0; i < upper; ++i) { /* upper triangle in the supernode */
+ Uval[lastu] = SNptr[i];
+ /* Matlab doesn't like explicit zero. */
+ if (Uval[lastu] != 0.0) Urow[lastu++] = L_SUB(istart+i);
+ }
+ Ucol[j+1] = lastu;
+
+ /* Extract L */
+ Lval[lastl] = 1.0; /* unit diagonal */
+ Lrow[lastl++] = L_SUB(istart + upper - 1);
+ for (i = upper; i < nsupr; ++i) {
+ Lval[lastl] = SNptr[i];
+ /* Matlab doesn't like explicit zero. */
+ if (Lval[lastl] != 0.0) Lrow[lastl++] = L_SUB(istart+i);
+ }
+ Lcol[j+1] = lastl;
+
+ ++upper;
+
+ } /* for j ... */
+
+ } /* for k ... */
+
+ *snnzL = lastl;
+ *snnzU = lastu;
+}
diff --git a/MATLAB/mexsuperlu.m b/MATLAB/mexsuperlu.m
new file mode 100644
index 0000000..c755ff9
--- /dev/null
+++ b/MATLAB/mexsuperlu.m
@@ -0,0 +1,17 @@
+function [L,U,prow,pcol] = mexsuperlu(A,psparse);
+% MEXSUPERLU : Supernodal LU factorization
+%
+% MEXSUPERLU is the mex-file version of the supernodal factorization.
+% The user will normally call SUPERLU, which calls MEXSUPERLU.
+% See SUPERLU for a description of parameters.
+
+% Above is the text for HELP MEXSUPERLU; the following will be executed
+% only if the mex-file appropriate for the machine can't be found.
+
+disp('Warning: Executable mexsuperlu.mex not found for this architecture.');
+disp('The supernodal LU package seems not to be installed for Matlab.');
+n = max(size(A));
+L = sparse(n,n);
+U = sparse(n,n);
+prow = 1:n;
+pcol = 1:n;
diff --git a/MATLAB/permutation.m b/MATLAB/permutation.m
new file mode 100644
index 0000000..0ced40b
--- /dev/null
+++ b/MATLAB/permutation.m
@@ -0,0 +1,59 @@
+% PERMUTATION : Helpful notes on permutation matrices and vectors.
+%
+%
+% There are two ways to represent permutations in Matlab.
+%
+% A *permutation matrix* is a square matrix P that is zero except for exactly
+% one 1 in each row and each column. A *permutation vector* is a 1 by n
+% or n by 1 vector p that contains each of the integers 1:n exactly once.
+%
+%
+% Let A be any n by n matrix, P be an n by n permutation matrix, and p be
+% a permutation vector of length n. Then:
+%
+% P*A is a permutation of the rows of A.
+% A*P' is the same permutation of the columns of A. Remember the transpose!
+%
+% A(p,:) is a permutation of the rows of A.
+% A(:,p) is the same permutation of the columns of A.
+%
+%
+% Matrix P and column vector p represent the same permutation if and only if
+% any of the following three equivalent conditions holds:
+%
+% p = P*(1:n)' or P = sparse(1:n,p,1,n,n) or P = I(p,:),
+%
+% where I = speye(n,n) is the identity matrix of the right size.
+%
+%
+% The inverse of a permutation matrix is its transpose:
+%
+% Pinv = inv(P) = P'
+%
+% The inverse of a permutation vector can be computed by a one-liner:
+%
+% pinv(p) = 1:n;
+%
+% (This works only if pinv doesn't already exist, or exists with the correct
+% dimensions. To be safe, say: pinv=zeros(1,n); pinv(p)=1:n; )
+%
+%
+% Products of permutations go one way for matrices and the other way for
+% vectors. If P1, P2, and P3 are permutation matrices and p1, p2, and p3
+% are the corresponding permutation vectors, then
+%
+% P1 = P2 * P3 if and only if p1 = p3(p2).
+%
+%
+% Permutation vectors are a little more compact to store and efficient
+% to apply than sparse permutation matrices (and much better than full
+% permutation matrices). A sparse permutation matrix takes about twice
+% the memory of a permutation vector. The Matlab function LU returns
+% a permutation matrix (sparse if the input was sparse); most other
+% built-in Matlab functions return permutation vectors, including
+% SYMRCM, SYMMMD, COLMMD, DMPERM, and ETREE.
+
+% John Gilbert, 6 April 1995
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+
+help permutation
diff --git a/MATLAB/resetrandoms.m b/MATLAB/resetrandoms.m
new file mode 100644
index 0000000..f818359
--- /dev/null
+++ b/MATLAB/resetrandoms.m
@@ -0,0 +1,10 @@
+function resetrandoms
+% RESETRANDOMS : Initialize random number generators for repeatability.
+%
+% John Gilbert, 1994.
+% Copyright (c) 1990-1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+rand('seed',0);
+randn('seed',0);
+
diff --git a/MATLAB/smallmesh.mat b/MATLAB/smallmesh.mat
new file mode 100644
index 0000000..41dd5d8
Binary files /dev/null and b/MATLAB/smallmesh.mat differ
diff --git a/MATLAB/spart2.m b/MATLAB/spart2.m
new file mode 100644
index 0000000..90d6f02
--- /dev/null
+++ b/MATLAB/spart2.m
@@ -0,0 +1,28 @@
+function [r,s] = spart2(A)
+% SPART2 : supernode partition
+%
+% [r,x] = spart2(A) partitions the columns of A according to supernode
+% definition 2:
+% A supernode in A = L+U is a sequence of adjacent columns in which
+% the diagonal block of L is full,
+% and below the diagonal all the columns (of L) have the same row structure.
+% Output: row and column partitions r and s suitable for SPYPART(A,r,s)
+%
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+
+[nr,nc] = size(A);
+A = spones(A);
+A = tril(A) | speye(nr,nc);
+
+A1 = tril([zeros(nr,1) A]);
+A2 = [A ones(nr,1)];
+
+signature = sum(xor(A1,A2));
+r = find(signature);
+r = r';
+if nargout > 1,
+ s = r;
+ r = [1 nr+1];
+end;
diff --git a/MATLAB/spypart.m b/MATLAB/spypart.m
new file mode 100644
index 0000000..c83ee54
--- /dev/null
+++ b/MATLAB/spypart.m
@@ -0,0 +1,35 @@
+function spypart(S, rp, cp);
+%SPYPART Spy plot with partitioning.
+% SPYPART(S,rp,cp) plots the sparsity pattern of a matrix S,
+% with lines marking a block partition described by
+% rp (rows) and cp (columns).
+% If S is square, cp may be omitted and defaults to rp.
+%
+% Partitions are specified as in the output of DMPERM:
+% There are length(rp)-1 row blocks, of sizes diff(rp), with rp(1)=1.
+
+% Copyright (c) 1984-98 by The MathWorks, Inc.
+% $Revision: 5.3 $ $Date: 1997/11/21 23:27:12 $
+
+if (nargin < 3), cp = rp; end
+
+spy(S)
+hold on
+
+[m,n] = size(S);
+if length(rp) > 2
+ k = length(rp)-2;
+ X = [zeros(1,k); n+ones(1,k)];
+ Y = rp(2:k+1) - 0.5;
+ Y = [Y; Y];
+ plot(X,Y,'w-')
+end
+if length(cp) > 2
+ k = length(cp)-2;
+ X = cp(2:k+1) - .5;
+ X = [X; X];
+ Y = [zeros(1,k); m+ones(1,k)];
+ plot(X,Y,'w-')
+end
+axis('ij')
+hold off
diff --git a/MATLAB/superlu.m b/MATLAB/superlu.m
new file mode 100644
index 0000000..40cae36
--- /dev/null
+++ b/MATLAB/superlu.m
@@ -0,0 +1,143 @@
+function [L,U,prow,pcol] = superlu(A,psparse)
+% SUPERLU : Supernodal LU factorization
+%
+% Executive summary:
+%
+% [L,U,p] = superlu(A) is like [L,U,P] = lu(A), but faster.
+% [L,U,prow,pcol] = superlu(A) preorders the columns of A by min degree,
+% yielding A(prow,pcol) = L*U.
+%
+% Details and options:
+%
+% With one input and two or three outputs, SUPERLU has the same effect as LU,
+% except that the pivoting permutation is returned as a vector, not a matrix:
+%
+% [L,U,p] = superlu(A) returns unit lower triangular L, upper triangular U,
+% and permutation vector p with A(p,:) = L*U.
+% [L,U] = superlu(A) returns permuted triangular L and upper triangular U
+% with A = L*U.
+%
+% With a second input, the columns of A are permuted before factoring:
+%
+% [L,U,prow] = superlu(A,psparse) returns triangular L and U and permutation
+% prow with A(prow,psparse) = L*U.
+% [L,U] = superlu(A,psparse) returns permuted triangular L and triangular U
+% with A(:,psparse) = L*U.
+% Here psparse will normally be a user-supplied permutation matrix or vector
+% to be applied to the columns of A for sparsity. COLMMD is one way to get
+% such a permutation; see below to make SUPERLU compute it automatically.
+% (If psparse is a permutation matrix, the matrix factored is A*psparse'.)
+%
+% With a fourth output, a column permutation is computed and applied:
+%
+% [L,U,prow,pcol] = superlu(A,psparse) returns triangular L and U and
+% permutations prow and pcol with A(prow,pcol) = L*U.
+% Here psparse is a user-supplied column permutation for sparsity,
+% and the matrix factored is A(:,psparse) (or A*psparse' if the
+% input is a permutation matrix). Output pcol is a permutation
+% that first performs psparse, then postorders the etree of the
+% column intersection graph of A. The postorder does not affect
+% sparsity, but makes supernodes in L consecutive.
+% [L,U,prow,pcol] = superlu(A,0) is the same as ... = superlu(A,I); it does
+% not permute for sparsity but it does postorder the etree.
+% [L,U,prow,pcol] = superlu(A) is the same as ... = superlu(A,colmmd(A));
+% it uses column minimum degree to permute columns for sparsity,
+% then postorders the etree and factors.
+%
+% This m-file calls the mex-file MEXSUPERLU to do the work.
+%
+% See also COLMMD, LUSOLVE.
+%
+% John Gilbert, 6 April 1995.
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+% Note on permutation matrices and vectors:
+%
+% Names beginning with p are permutation vectors;
+% names beginning with P are the corresponding permutation matrices.
+%
+% Thus A(pfoo,pbar) is the same as Pfoo*A*Pbar'.
+%
+% We don't actually form any permutation matrices except Psparse,
+% but matrix notation is easier to untangle in the comments.
+
+
+[m,n] = size(A);
+if m ~= n
+ error('matrix must be square.');
+end;
+if n == 0
+ L = []; U = []; prow = []; pcol = [];
+ return;
+end;
+
+% If necessary, compute the column sparsity permutation.
+if nargin < 2
+ if nargout >= 4
+ psparse = colmmd(A);
+ else
+ psparse = 1:n;
+ end;
+end;
+if max(size(psparse)) <= 1
+ psparse = 1:n;
+end;
+
+% Compute the permutation-matrix version of psparse,
+% which fits the internal data structures of mexsuperlu.
+if min(size(psparse)) == 1
+ Psparse = sparse(1:n,psparse,1,n,n);
+else
+ Psparse = psparse;
+ psparse = Psparse*[1:n]';
+end;
+
+% Make sure the matrices are sparse.
+if ~issparse(A)
+ A = sparse(A);
+end;
+if ~issparse(Psparse)
+ Psparse = sparse(Psparse);
+end;
+
+
+% The output permutations from the mex-file are dense permutation vectors.
+[L,U,prowInv,pcolInv] = mexsuperlu(A,Psparse);
+prow = zeros(1,n);
+prow(prowInv) = 1:n;
+pcol = zeros(1,n);
+pcol(pcolInv) = 1:n;
+
+% We now have
+%
+% Prow*A*Psparse'*Post' = L*U (1)
+% Pcol' = Psparse'*Post'
+%
+% (though we actually have the vectors, not the matrices, and
+% we haven't computed Post explicitly from Pcol and Psparse).
+% Now we figure out what the user really wanted returned,
+% and rewrite (1) accordingly.
+
+if nargout == 4
+ % Return both row and column permutations.
+ % This is what we've already got.
+ % (1) becomes Prow*A*Pcol' = L*U.
+elseif nargout == 3
+ % Return row permutation only. Fold the postorder perm
+ % but not the sparsity perm into it, and into L and U.
+ % This preserves triangularity of L and U.
+ % (1) becomes (Post'*Prow) * A * Psparse' = (Post'*L*Post) * (Post'*U*Post).
+ postInv = pcolInv(psparse);
+ prow = prow(postInv);
+ L = L(postInv,postInv);
+ U = U(postInv,postInv);
+else % nargout <= 2
+ % Return no permutations. Fold the postorder perm but
+ % not the sparsity perm into L and U. Fold the pivoting
+ % perm into L, which destroys its triangularity.
+ % (1) becomes A * Psparse' = (Prow'*L*Post) * (Post'*U*Post).
+ postInv = pcolInv(psparse);
+ L = L(prowInv,postInv);
+ U = U(postInv,postInv);
+end;
diff --git a/MATLAB/time.m b/MATLAB/time.m
new file mode 100644
index 0000000..8286451
--- /dev/null
+++ b/MATLAB/time.m
@@ -0,0 +1,12 @@
+function y = time()
+%TIME Timestamp.
+% S = TIME returns a string containing the date and time.
+
+% Copyright (c) 1984-93 by The MathWorks, Inc.
+
+t = clock;
+base = t(1) - rem(t(1),100);
+months = ['Jan';'Feb';'Mar';'Apr';'May';'Jun';
+ 'Jul';'Aug';'Sep';'Oct';'Nov';'Dec'];
+y = [int2str(t(3)),'-',months(t(2),:),'-',int2str(t(1)-base), ...
+ ' ',int2str(t(4)),':', int2str(t(5)),':', int2str(t(6))];
diff --git a/MATLAB/try2.m b/MATLAB/try2.m
new file mode 100644
index 0000000..69cd276
--- /dev/null
+++ b/MATLAB/try2.m
@@ -0,0 +1,68 @@
+function info = try2(A,pin);
+% TRY2 : test SUPERLU with 2 outputs
+%
+% info = try2(A,pin);
+% normally info is the residual norm;
+% but info is at least 10^6 if U is not triangular
+% or if the factors contain explicit zeros.
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+
+n = max(size(A));
+info = 0;
+
+if nargin == 1
+ [l,u] = superlu(A);
+elseif nargin == 2
+ [l,u] = superlu(A,pin);
+else
+ error('requires 1 or 2 inputs');
+end;
+
+figure(2); spy(l); title('L');
+figure(1); spy(u); title('U');
+drawnow;
+
+format compact
+disp('SUPERLU with 2 outputs:');
+if any(any(triu(l,1)))
+ disp('L is *NOT* lower triangular.');
+else
+ disp('L is lower triangular.');
+end;
+if nnz(l) == nnz(l+l)
+ disp('L has no explicit zeros.');
+else
+ disp('L contains explicit zeros.');
+ info = info+10^6;
+end;
+if any(any(tril(u,-1)))
+ disp('U is *NOT* upper triangular.');
+ info = info + 10^6;
+else
+ disp('U is upper triangular.');
+end;
+if nnz(u) == nnz(u+u)
+ disp('U has no explicit zeros.');
+else
+ disp('U contains explicit zeros.');
+ info = info+10^6;
+end;
+
+if nargin == 1
+ rnorm = norm(A - l*u,inf);
+ fprintf(1,'||A - L*U|| = %d\n', rnorm);
+elseif size(pin) == [n n]
+ rnorm = norm(A*pin' - l*u,inf);
+ fprintf(1,'||A*PIN'' - L*U|| = %d\n', rnorm);
+elseif max(size(pin)) == n
+ rnorm = norm(A(:,pin) - l*u,inf);
+ fprintf(1,'||A(:,PIN) - L*U|| = %d\n', rnorm);
+else
+ rnorm = norm(A - l*u,inf);
+ fprintf(1,'||A - L*U|| = %d\n', rnorm);
+end;
+
+info = info + rnorm;
+disp(' ');
diff --git a/MATLAB/try3.m b/MATLAB/try3.m
new file mode 100644
index 0000000..3c51107
--- /dev/null
+++ b/MATLAB/try3.m
@@ -0,0 +1,82 @@
+function info = try3(A,pin);
+% TRY3 : test SUPERLU with 3 outputs
+%
+% info = try3(A,pin);
+% normally info is the residual norm;
+% but info is at least 10^6 if the factors are not triangular,
+% or the permutation isn't a permutation.
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+
+n = max(size(A));
+info = 0;
+
+if nargin == 1
+ [l,u,pr] = superlu(A);
+elseif nargin == 2
+ [l,u,pr] = superlu(A,pin);
+else
+ error('requires 1 or 2 inputs');
+end;
+
+figure(2); spy(l); title('L');
+figure(1); spy(u); title('U');
+drawnow;
+
+format compact
+disp('SUPERLU with 3 outputs:');
+if any(any(triu(l,1)))
+ disp('L is *NOT* lower triangular.');
+ info = info + 10^6;
+else
+ disp('L is lower triangular.');
+end;
+if nnz(l) == nnz(l+l)
+ disp('L has no explicit zeros.');
+else
+ disp('L contains explicit zeros.');
+ info = info+10^6;
+end;
+if any(any(tril(u,-1)))
+ disp('U is *NOT* upper triangular.');
+ info = info + 10^6;
+else
+ disp('U is upper triangular.');
+end;
+if nnz(u) == nnz(u+u)
+ disp('U has no explicit zeros.');
+else
+ disp('U contains explicit zeros.');
+ info = info+10^6;
+end;
+if pr == [1:n]
+ disp('PROW is the identity permutation.');
+elseif isperm(pr)
+ disp('PROW is a non-identity permutation.');
+else
+ disp('PROW is *NOT* a permutation.');
+ info = info + 10^6;
+end;
+
+if nargin == 1
+ rnorm = norm(A(pr,:) - l*u,inf);
+ fprintf(1,'||A(PROW,:) - L*U|| = %d\n', rnorm);
+elseif size(pin) == [n n]
+ rnorm = norm(A(pr,:)*pin' - l*u,inf);
+ fprintf(1,'||A(PROW,:)*PIN'' - L*U|| = %d\n', rnorm);
+elseif max(size(pin)) == n
+ rnorm = norm(A(pr,pin) - l*u,inf);
+ fprintf(1,'||A(PROW,PIN) - L*U|| = %d\n', rnorm);
+ if pr == pin
+ disp('PROW is the same as the input permutation.');
+ else
+ disp('PROW is different from the input permutation.');
+ end;
+else
+ rnorm = norm(A(pr,:) - l*u,inf);
+ fprintf(1,'||A(PROW,:) - L*U|| = %d\n', rnorm);
+end;
+
+info = info + rnorm;
+disp(' ');
diff --git a/MATLAB/try4.m b/MATLAB/try4.m
new file mode 100644
index 0000000..78041ee
--- /dev/null
+++ b/MATLAB/try4.m
@@ -0,0 +1,79 @@
+function info = try4(A,pin);
+% TRY4 : test SUPERLU with 4 outputs
+%
+% info = try4(A,pin);
+% normally info is the residual norm;
+% but info is at least 10^6 if the factors are not triangular,
+% or the permutations aren't permutations.
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+
+n = max(size(A));
+info = 0;
+
+if nargin == 1
+ [l,u,pr,pc] = superlu(A);
+elseif nargin == 2
+ [l,u,pr,pc] = superlu(A,pin);
+else
+ error('requires 1 or 2 inputs');
+end;
+
+% DOES NOT WORK IN MATLAB 5, NOT YET KNOW WHY -- XSL 5-25-98
+% figure(2); [r,s] = spart2(l); spypart(l,r,s); title('L');
+figure(2); spy(l); title('L');
+figure(1); spy(u); title('U');
+drawnow;
+
+format compact
+disp('SUPERLU with 4 outputs:');
+if any(any(triu(l,1)))
+ disp('L is *NOT* lower triangular.');
+ info = info + 10^6;
+else
+ disp('L is lower triangular.');
+end;
+if nnz(l) == nnz(l+l)
+ disp('L has no explicit zeros.');
+else
+ disp('L contains explicit zeros.');
+ info = info+10^6;
+end;
+if any(any(tril(u,-1)))
+ disp('U is *NOT* upper triangular.');
+ info = info + 10^6;
+else
+ disp('U is upper triangular.');
+end;
+if nnz(u) == nnz(u+u)
+ disp('U has no explicit zeros.');
+else
+ disp('U contains explicit zeros.');
+ info = info+10^6;
+end;
+if pr == [1:n]
+ disp('PROW is the identity permutation.');
+elseif isperm(pr)
+ disp('PROW is a non-identity permutation.');
+else
+ disp('PROW is *NOT* a permutation.');
+ info = info + 10^6;
+end;
+if pc == [1:n]
+ disp('PCOL is the identity permutation.');
+elseif isperm(pc)
+ disp('PCOL is a non-identity permutation.');
+else
+ disp('PCOL is *NOT* a permutation.');
+ info = info + 10^6;
+end;
+if pr == pc
+ disp('PROW and PCOL are the same.')
+else
+ disp('PROW and PCOL are different.')
+end;
+rnorm = norm(A(pr,pc) - l*u,inf);
+fprintf(1,'||A(PROW,PCOL) - L*U|| = %d\n', rnorm);
+info = info + rnorm;
+disp(' ');
diff --git a/MATLAB/trylusolve.m b/MATLAB/trylusolve.m
new file mode 100644
index 0000000..08ae152
--- /dev/null
+++ b/MATLAB/trylusolve.m
@@ -0,0 +1,137 @@
+function failed = trylusolve(A,b);
+% TRYLUSOLVE : Test the Matlab interface to lusolve.
+%
+% failed = trylusolve;
+% This runs several tests on lusolve, using a matrix with the
+% structure of "smallmesh". It returns a list of failed tests.
+%
+% failed = trylusolve(A);
+% failed = trylusolve(A,b);
+% This times the solution of a system with the given matrix,
+% both with lusolve and with Matlab's builtin "\" operator.
+% Usually, "\" will be faster for triangular or symmetric postive
+% definite matrices, and lusolve will be faster otherwise.
+%
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+disp(' ');
+disp(['Testing LUSOLVE on ' time]);
+disp(' ');
+
+format compact
+resetrandoms;
+if nargin == 0
+ A = hbo('smallmesh');
+end;
+[n,m] = size(A);
+if n~=m, error('matrix must be square'), end;
+
+failed = [];
+ntest = 0;
+tol = 100 * eps * n^2;
+
+if nargin >= 1 % Just try a solve with the given input matrix.
+ ntest=ntest+1;
+ v = spparms;
+ spparms('spumoni',1);
+ fprintf('Matrix size: %d by %d with %d nonzeros.\n',n,m,nnz(A));
+ disp(' ');
+ if nargin == 1
+ b = rand(n,1);
+ end;
+ tic; x=A\b; t1=toc;
+ fprintf('A\\b time = %d seconds.\n',t1);
+ disp(' ');
+ tic; x=lusolve(A,b); t2=toc;
+ fprintf('LUSOLVE time = %d seconds.\n',t2);
+ disp(' ');
+ ratio = t1/t2;
+ fprintf('Ratio = %d\n',ratio);
+ residual_norm = norm(A*x-b,inf)/norm(A,inf)
+ disp(' ');
+ if residual_norm > tol
+ disp('*** FAILED ***'); failed = [failed ntest];
+ end;
+ spparms(v);
+ return;
+end;
+
+% With no inputs, try several tests on the small mesh.
+
+
+A = sprandn(A);
+p = randperm(n);
+I = speye(n);
+P = I(p,:);
+b = rand(n,2);
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0.\n',ntest);
+x = lusolve(A,b,0);
+residual_norm = norm(A*x-b,inf)
+disp(' ');
+if residual_norm > tol
+ disp('*** FAILED ***'), disp(' '), failed = [failed ntest];
+end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given as vector.\n',ntest);
+x = lusolve(A,b,p);
+residual_norm = norm(A*x-b,inf)
+disp(' ');
+if residual_norm > tol
+ disp('*** FAILED ***^G'), disp(' '), failed = [failed ntest];
+end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given as matrix.\n',ntest);
+x = lusolve(A,b,P);
+residual_norm = norm(A*x-b,inf)
+disp(' ');
+if residual_norm > tol
+ disp('*** FAILED ***'), disp(' '), failed = [failed ntest];
+end;
+
+ntest=ntest+1;
+fprintf('Test %d: No input perm (colmmd done internally).\n',ntest);
+x = lusolve(A,b);
+residual_norm = norm(A*x-b,inf)
+disp(' ');
+if residual_norm > tol
+ disp('*** FAILED ***'), disp(' '), failed = [failed ntest];
+end;
+
+ntest=ntest+1;
+fprintf('Test %d: Empty matrix.\n',ntest);
+x = lusolve([],[]);
+disp(' ');
+% if max(size(x))
+if length(x)
+ x
+ disp('*** FAILED ***^G'), disp(' ');
+ failed = [failed ntest];
+end;
+
+ntest=ntest+1;
+fprintf('Test %d: Timing versus \\ on the 3-element airfoil matrix.\n',ntest);
+A = hbo('airfoil2');
+n = max(size(A));
+A = sprandn(A);
+b = rand(n,1);
+tic; x=A\b; t1=toc;
+fprintf('A\\b time = %d seconds.\n',t1);
+tic; x=lusolve(A,b); t2=toc;
+fprintf('LUSOLVE time = %d seconds.\n',t2);
+ratio = t1/t2;
+fprintf('Ratio = %d\n',ratio);
+disp(' ');
+if ratio < 1, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+
+nfailed = length(failed);
+if nfailed
+ fprintf('\n%d tests failed.\n\n',nfailed);
+else
+ fprintf('\nAll tests passed.\n\n',nfailed);
+end;
diff --git a/MATLAB/trysuperlu.m b/MATLAB/trysuperlu.m
new file mode 100644
index 0000000..4036a1a
--- /dev/null
+++ b/MATLAB/trysuperlu.m
@@ -0,0 +1,219 @@
+function failed = trysuperlu(A);
+% TRYSUPERLU : Test the Matlab interface to superlu.
+%
+% failed = trysuperlu;
+% This runs several tests on superlu, using a matrix with the
+% structure of "smallmesh". It returns a list of failed tests.
+%
+% failed = trysuperlu(A);
+% This just times the factorization of A.
+%
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+disp(' ');
+disp(['Testing SUPERLU on ' time]);
+disp(' ');
+
+resetrandoms;
+if nargin == 0
+ A = hbo('smallmesh');
+end;
+[n,m] = size(A);
+if n~=m, error('matrix must be square'), end;
+
+failed = [];
+ntest = 0;
+tol = 100 * eps * n^2;
+
+if nargin == 1 % Just try to factor the given input matrix.
+ ntest=ntest+1;
+ fprintf('Matrix size: %d by %d with %d nonzeros.\n',n,m,nnz(A));
+ r = trytime(A);
+ if r > tol, disp('*** FAILED ***'); failed = [failed ntest]; end;
+ return;
+end;
+
+% With no input argument, try several tests on the small mesh.
+
+PivPostA = sprandn(A);
+A = (n+1)*speye(n) - spones(A); % Diagonally dominant
+[t,post] = etree(A'*A);
+
+if post == [1:n], disp('note: column etree already in postorder'), end;
+
+NoPivPostA = A(post,:);
+NoPivNoPostA = A(post,post);
+PivNoPostA = sprandn(NoPivNoPostA);
+p = randperm(n);
+pinv = zeros(1,n);
+pinv(p) = 1:n;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, no pivot, no postorder, 4 outputs.\n',ntest);
+r = try4(NoPivNoPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, no pivot, no postorder, 3 outputs.\n',ntest);
+r = try3(NoPivNoPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, no pivot, no postorder, 2 outputs.\n',ntest);
+r = try2(NoPivNoPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, pivot, no postorder, 4 outputs.\n',ntest);
+r = try4(PivNoPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, pivot, no postorder, 3 outputs.\n',ntest);
+r = try3(PivNoPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, pivot, no postorder, 2 outputs.\n',ntest);
+r = try2(PivNoPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, no pivot, postorder, 4 outputs.\n',ntest);
+r = try4(NoPivPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, no pivot, postorder, 3 outputs.\n',ntest);
+r = try3(NoPivPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, no pivot, postorder, 2 outputs.\n',ntest);
+r = try2(NoPivPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, pivot, postorder, 4 outputs.\n',ntest);
+r = try4(PivPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, pivot, postorder, 3 outputs.\n',ntest);
+r = try3(PivPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm 0, pivot, postorder, 2 outputs.\n',ntest);
+r = try2(PivPostA,0);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, no pivot, no postorder, 4 outputs.\n',ntest);
+r = try4(NoPivNoPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, no pivot, no postorder, 3 outputs.\n',ntest);
+r = try3(NoPivNoPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, no pivot, no postorder, 2 outputs.\n',ntest);
+r = try2(NoPivNoPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, pivot, no postorder, 4 outputs.\n',ntest);
+r = try4(PivNoPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, pivot, no postorder, 3 outputs.\n',ntest);
+r = try3(PivNoPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, pivot, no postorder, 2 outputs.\n',ntest);
+r = try2(PivNoPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, no pivot, postorder, 4 outputs.\n',ntest);
+r = try4(NoPivPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, no pivot, postorder, 3 outputs.\n',ntest);
+r = try3(NoPivPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, no pivot, postorder, 2 outputs.\n',ntest);
+r = try2(NoPivPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, pivot, postorder, 4 outputs.\n',ntest);
+r = try4(PivPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, pivot, postorder, 3 outputs.\n',ntest);
+r = try3(PivPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given, pivot, postorder, 2 outputs.\n',ntest);
+r = try2(PivPostA(:,pinv),p);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: No input perm (colmmd done internally), pivot, postorder, 4 outputs.\n',ntest);
+r = try4(PivPostA);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: No input perm, pivot, postorder, 3 outputs.\n',ntest);
+r = try3(PivPostA);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: No input perm, pivot, postorder, 2 outputs.\n',ntest);
+r = try3(PivPostA);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Input perm given as matrix, pivot, postorder, 4 outputs.\n',ntest);
+P = speye(n);
+P = P(p,:);
+r = try4(PivPostA*P,P);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+ntest=ntest+1;
+fprintf('Test %d: Empty matrix.\n',ntest);
+[L,U,PROW,PCOL] = superlu([]);
+disp(' ');
+if max([size(L) size(U) size(PROW) size(PCOL)])
+ L, U, PROW, PCOL
+ disp('*** FAILED ***^G'), disp(' ');
+ failed = [failed ntest];
+end;
+
+ntest=ntest+1;
+fprintf('Test %d: Timing versus LU on the 3-element airfoil matrix.\n',ntest);
+A = hbo('airfoil2');
+n = max(size(A));
+A = sprandn(A);
+pmmd = colmmd(A);
+A = A(:,pmmd);
+r = trytime(A);
+if r > tol, disp('*** FAILED ***'), disp(' '), failed = [failed ntest]; end;
+
+nfailed = length(failed);
+if nfailed
+ fprintf('\n%d tests failed.\n\n',nfailed);
+else
+ fprintf('\nAll tests passed.\n\n',nfailed);
+end;
diff --git a/MATLAB/trytime.m b/MATLAB/trytime.m
new file mode 100644
index 0000000..a390e99
--- /dev/null
+++ b/MATLAB/trytime.m
@@ -0,0 +1,63 @@
+function info = trytime(A);
+% TRYTIME : time SUPERLU with 3 outputs against Matlab's LU
+%
+% info = trytime(A);
+% normally info is ||P*A*x-L*U*x|| / ||A|| (for a random x);
+% but info is at least 10^6 if the factors are not triangular,
+% or the permutation isn't a permutation.
+% Copyright (c) 1995 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+
+n = max(size(A));
+info = 0;
+
+format compact
+disp('SUPERLU with 3 outputs:');
+
+tic;[L,U,P]=lu(A);t1=toc;
+fprintf('LU time = %d seconds.\n',t1);
+tic;[l,u,pr]=superlu(A);t2=toc;
+fprintf('SUPERLU time = %d seconds.\n',t2);
+ratio = t1/t2;
+fprintf('Ratio = %d\n',ratio);
+
+if any(any(triu(l,1)))
+ disp('L is *NOT* lower triangular.');
+ info = info + 10^6;
+else
+ disp('L is lower triangular.');
+end;
+if nnz(l) == nnz(l+l)
+ disp('L has no explicit zeros.');
+else
+ disp('L contains explicit zeros.');
+ info = info+10^6;
+end;
+if any(any(tril(u,-1)))
+ disp('U is *NOT* upper triangular.');
+ info = info + 10^6;
+else
+ disp('U is upper triangular.');
+end;
+if nnz(u) == nnz(u+u)
+ disp('U has no explicit zeros.');
+else
+ disp('U contains explicit zeros.');
+ info = info+10^6;
+end;
+if pr == [1:n]
+ disp('PROW is the identity permutation.');
+elseif isperm(pr)
+ disp('PROW is a non-identity permutation.');
+else
+ disp('PROW is *NOT* a permutation.');
+ info = info + 10^6;
+end;
+
+x = rand(n,1);
+rnorm = norm(A(pr,:)*x - l*(u*x),inf)/norm(A,inf);
+fprintf(1,'||A(PROW,:)*x - L*U*x||/||A|| = %d\n', rnorm);
+
+info = info + rnorm;
+disp(' ');
diff --git a/MATLAB/verbose.m b/MATLAB/verbose.m
new file mode 100644
index 0000000..e58ef9c
--- /dev/null
+++ b/MATLAB/verbose.m
@@ -0,0 +1,2 @@
+% VERBOSE Set the sparse monitor flag to verbose.
+spparms('spumoni', 1);
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f822ede
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,56 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: Makefile
+#
+# Purpose: Top-level Makefile
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+# October 15, 2003 Version 3.0
+#
+############################################################################
+
+include make.inc
+
+all: install lib testing
+
+lib: superlulib tmglib
+
+clean: cleanlib cleantesting
+
+install:
+ ( cd INSTALL; $(MAKE) )
+# ( cd INSTALL; cp lsame.c ../SRC/; \
+# cp dlamch.c ../SRC/; cp slamch.c ../SRC/ )
+
+blaslib:
+ ( cd CBLAS; $(MAKE) )
+
+superlulib:
+ ( cd SRC; $(MAKE) )
+
+tmglib:
+ ( cd TESTING/MATGEN; $(MAKE) )
+
+matlabmex:
+ ( cd MATLAB; $(MAKE) )
+
+testing:
+ ( cd TESTING ; $(MAKE) )
+
+cleanlib:
+ ( cd SRC; $(MAKE) clean )
+ ( cd TESTING/MATGEN; $(MAKE) clean )
+ ( cd CBLAS; $(MAKE) clean )
+
+cleantesting:
+ ( cd INSTALL; $(MAKE) clean )
+ ( cd TESTING; $(MAKE) clean )
+ ( cd MATLAB; $(MAKE) clean )
+ ( cd EXAMPLE; $(MAKE) clean )
+ ( cd FORTRAN; $(MAKE) clean )
diff --git a/README b/README
new file mode 100644
index 0000000..f0f010f
--- /dev/null
+++ b/README
@@ -0,0 +1,157 @@
+ SuperLU (Version 3.0)
+ =====================
+
+Copyright (c) 2003, The Regents of the University of California, through
+Lawrence Berkeley National Laboratory (subject to receipt of any required
+approvals from U.S. Dept. of Energy)
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+(1) Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+(2) Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+(3) Neither the name of Lawrence Berkeley National Laboratory, U.S. Dept. of
+Energy nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+SuperLU contains a set of subroutines to solve a sparse linear system
+A*X=B. It uses Gaussian elimination with partial pivoting (GEPP).
+The columns of A may be preordered before factorization; the
+preordering for sparsity is completely separate from the factorization.
+
+SuperLU is implemented in ANSI C, and must be compiled with standard
+ANSI C compilers. It provides functionality for both real and complex
+matrices, in both single and double precision. The file names for the
+single-precision real version start with letter "s" (such as sgstrf.c);
+the file names for the double-precision real version start with letter "d"
+(such as dgstrf.c); the file names for the single-precision complex
+version start with letter "c" (such as cgstrf.c); the file names
+for the double-precision complex version start with letter "z"
+(such as zgstrf.c).
+
+
+SuperLU contains the following directory structure:
+
+ SuperLU/README instructions on installation
+ SuperLU/CBLAS/ needed BLAS routines in C, not necessarily fast
+ SuperLU/EXAMPLE/ example programs
+ SuperLU/FORTRAN/ Fortran interface
+ SuperLU/INSTALL/ test machine dependent parameters; the Users' Guide.
+ SuperLU/MAKE_INC/ sample machine-specific make.inc files
+ SuperLU/MATLAB/ Matlab mex-file interface
+ SuperLU/SRC/ C source code, to be compiled into the superlu.a library
+ SuperLU/TESTING/ driver routines to test correctness
+ SuperLU/Makefile top level Makefile that does installation and testing
+ SuperLU/make.inc compiler, compile flags, library definitions and C
+ preprocessor definitions, included in all Makefiles.
+ (You may need to edit it to be suitable for your system
+ before compiling the whole package.)
+
+
+Before installing the package, please examine the three things dependent
+on your system setup:
+
+1. Edit the make.inc include file.
+ This make include file is referenced inside each of the Makefiles
+ in the various subdirectories. As a result, there is no need to
+ edit the Makefiles in the subdirectories. All information that is
+ machine specific has been defined in this include file.
+
+ Example machine-specific make.inc include files are provided
+ in the MAKE_INC/ directory for several systems, such as
+ IBM RS/6000, DEC Alpha, SunOS 4.x, SunOS 5.x (Solaris), HP-PA and
+ SGI Iris 4.x. When you have selected the machine to which you wish
+ to install SuperLU, copy the appropriate sample include file (if one
+ is present) into make.inc. For example, if you wish to run
+ SuperLU on an IBM RS/6000, you can do
+
+ cp MAKE_INC/make.rs6k make.inc
+
+ For the systems other than listed above, slight modifications to the
+ make.inc file will need to be made.
+
+2. The BLAS library.
+ If there is BLAS library available on your machine, you may define
+ the following in the file SuperLU/make.inc:
+ BLASDEF = -DUSE_VENDOR_BLAS
+ BLASLIB = <BLAS library you wish to link with>
+
+ The CBLAS/ subdirectory contains the part of the C BLAS needed by
+ SuperLU package. However, these codes are intended for use only if there
+ is no faster implementation of the BLAS already available on your machine.
+ In this case, you should do the following:
+
+ 1) In SuperLU/make.inc, undefine (comment out) BLASDEF, and define:
+ BLASLIB = ../blas$(PLAT).a
+
+ 2) Go to the SuperLU/ directory, type:
+ make blaslib
+ to make the BLAS library from the routines in the CBLAS/ subdirectory.
+
+3. C preprocessor definition CDEFS.
+ In the header file SRC/Cnames.h, we use macros to determine how
+ C routines should be named so that they are callable by Fortran.
+ (Some vendor-supplied BLAS libraries do not have C interface. So the
+ re-naming is needed in order for the SuperLU BLAS calls (in C) to
+ interface with the Fortran-style BLAS.)
+ The possible options for CDEFS are:
+
+ o -DAdd_: Fortran expects a C routine to have an underscore
+ postfixed to the name;
+ o -DNoChange: Fortran expects a C routine name to be identical to
+ that compiled by C;
+ o -DUpCase: Fortran expects a C routine name to be all uppercase.
+
+4. The Matlab MEX-file interface.
+ The MATLAB/ subdirectory includes Matlab C MEX-files, so that
+ our factor and solve routines can be called as alternatives to those
+ built into Matlab. In the file SuperLU/make.inc, define MATLAB to be the
+ directory in which Matlab is installed on your system, for example:
+
+ MATLAB = /usr/local/matlab
+
+ At the SuperLU/ directory, type "make matlabmex" to build the MEX-file
+ interface. After you have built the interface, you may go to the MATLAB/
+ directory to test the correctness by typing (in Matlab):
+ trysuperlu
+ trylusolve
+
+A Makefile is provided in each subdirectory. The installation can be done
+completely automatically by simply typing "make" at the top level.
+The test results are in the files below:
+ INSTALL/install.out
+ TESTING/stest.out
+ TESTING/dtest.out
+ TESTING/ctest.out
+ TESTING/ztest.out
+
+
+
+-----------------
+| RELEASE NOTES |
+-----------------
+* Version 3.0, 10-15-03
+ - add "options" and "stat" argument for the driver routines
+ DGSSV/DGSSVX. This interface is more user-friendly and flexible.
+ - add more examples in EXAMPLE/
+ - add a "symmetric mode" with better performance when the matrix is
+ symmetric, or diagonal dominant, or positive definite, or nearly so.
+
diff --git a/SRC/Cnames.h b/SRC/Cnames.h
new file mode 100644
index 0000000..7a6d2da
--- /dev/null
+++ b/SRC/Cnames.h
@@ -0,0 +1,278 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 1, 1997
+ *
+ */
+#ifndef __SUPERLU_CNAMES /* allow multiple inclusions */
+#define __SUPERLU_CNAMES
+
+/*
+ * These macros define how C routines will be called. ADD_ assumes that
+ * they will be called by fortran, which expects C routines to have an
+ * underscore postfixed to the name (Suns, and the Intel expect this).
+ * NOCHANGE indicates that fortran will be calling, and that it expects
+ * the name called by fortran to be identical to that compiled by the C
+ * (RS6K's do this). UPCASE says it expects C routines called by fortran
+ * to be in all upcase (CRAY wants this).
+ */
+
+#define ADD_ 0
+#define ADD__ 1
+#define NOCHANGE 2
+#define UPCASE 3
+#define C_CALL 4
+
+#ifdef UpCase
+#define F77_CALL_C UPCASE
+#endif
+
+#ifdef NoChange
+#define F77_CALL_C NOCHANGE
+#endif
+
+#ifdef Add_
+#define F77_CALL_C ADD_
+#endif
+
+#ifdef Add__
+#define F77_CALL_C ADD__
+#endif
+
+/* Default */
+#ifndef F77_CALL_C
+#define F77_CALL_C ADD_
+#endif
+
+
+#if (F77_CALL_C == ADD_)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * No redefinition necessary to have following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void dgemm_(...)
+ *
+ * This is the default.
+ */
+
+#endif
+
+#if (F77_CALL_C == ADD__)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * for following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void dgemm__(...)
+ */
+#define sasum_ sasum__
+#define isamax_ isamax__
+#define scopy_ scopy__
+#define sscal_ sscal__
+#define sger_ sger__
+#define snrm2_ snrm2__
+#define ssymv_ ssymv__
+#define sdot_ sdot__
+#define saxpy_ saxpy__
+#define ssyr2_ ssyr2__
+#define srot_ srot__
+#define sgemv_ sgemv__
+#define strsv_ strsv__
+#define sgemm_ sgemm__
+#define strsm_ strsm__
+
+#define dasum_ dasum__
+#define idamax_ idamax__
+#define dcopy_ dcopy__
+#define dscal_ dscal__
+#define dger_ dger__
+#define dnrm2_ dnrm2__
+#define dsymv_ dsymv__
+#define ddot_ ddot__
+#define daxpy_ daxpy__
+#define dsyr2_ dsyr2__
+#define drot_ drot__
+#define dgemv_ dgemv__
+#define dtrsv_ dtrsv__
+#define dgemm_ dgemm__
+#define dtrsm_ dtrsm__
+
+#define scasum_ scasum__
+#define icamax_ icamax__
+#define ccopy_ ccopy__
+#define cscal_ cscal__
+#define scnrm2_ scnrm2__
+#define caxpy_ caxpy__
+#define cgemv_ cgemv__
+#define ctrsv_ ctrsv__
+#define cgemm_ cgemm__
+#define ctrsm_ ctrsm__
+#define cgerc_ cgerc__
+#define chemv_ chemv__
+#define cher2_ cher2__
+
+#define dzasum_ dzasum__
+#define izamax_ izamax__
+#define zcopy_ zcopy__
+#define zscal_ zscal__
+#define dznrm2_ dznrm2__
+#define zaxpy_ zaxpy__
+#define zgemv_ zgemv__
+#define ztrsv_ ztrsv__
+#define zgemm_ zgemm__
+#define ztrsm_ ztrsm__
+#define zgerc_ zgerc__
+#define zhemv_ zhemv__
+#define zher2_ zher2__
+
+#define c_bridge_dgssv_ c_bridge_dgssv__
+#define c_fortran_dgssv_ c_fortran_dgssv__
+#endif
+
+#if (F77_CALL_C == UPCASE)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void DGEMM(...)
+ */
+#define sasum_ SASUM
+#define isamax_ ISAMAX
+#define scopy_ SCOPY
+#define sscal_ SSCAL
+#define sger_ SGER
+#define snrm2_ SNRM2
+#define ssymv_ SSYMV
+#define sdot_ SDOT
+#define saxpy_ SAXPY
+#define ssyr2_ SSYR2
+#define srot_ SROT
+#define sgemv_ SGEMV
+#define strsv_ STRSV
+#define sgemm_ SGEMM
+#define strsm_ STRSM
+
+#define dasum_ SASUM
+#define idamax_ ISAMAX
+#define dcopy_ SCOPY
+#define dscal_ SSCAL
+#define dger_ SGER
+#define dnrm2_ SNRM2
+#define dsymv_ SSYMV
+#define ddot_ SDOT
+#define daxpy_ SAXPY
+#define dsyr2_ SSYR2
+#define drot_ SROT
+#define dgemv_ SGEMV
+#define dtrsv_ STRSV
+#define dgemm_ SGEMM
+#define dtrsm_ STRSM
+
+#define scasum_ SCASUM
+#define icamax_ ICAMAX
+#define ccopy_ CCOPY
+#define cscal_ CSCAL
+#define scnrm2_ SCNRM2
+#define caxpy_ CAXPY
+#define cgemv_ CGEMV
+#define ctrsv_ CTRSV
+#define cgemm_ CGEMM
+#define ctrsm_ CTRSM
+#define cgerc_ CGERC
+#define chemv_ CHEMV
+#define cher2_ CHER2
+
+#define dzasum_ SCASUM
+#define izamax_ ICAMAX
+#define zcopy_ CCOPY
+#define zscal_ CSCAL
+#define dznrm2_ SCNRM2
+#define zaxpy_ CAXPY
+#define zgemv_ CGEMV
+#define ztrsv_ CTRSV
+#define zgemm_ CGEMM
+#define ztrsm_ CTRSM
+#define zgerc_ CGERC
+#define zhemv_ CHEMV
+#define zher2_ CHER2
+
+#define c_bridge_dgssv_ C_BRIDGE_DGSSV
+#define c_fortran_dgssv_ C_FORTRAN_DGSSV
+#endif
+
+#if (F77_CALL_C == NOCHANGE)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * for following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void dgemm(...)
+ */
+#define sasum_ sasum
+#define isamax_ isamax
+#define scopy_ scopy
+#define sscal_ sscal
+#define sger_ sger
+#define snrm2_ snrm2
+#define ssymv_ ssymv
+#define sdot_ sdot
+#define saxpy_ saxpy
+#define ssyr2_ ssyr2
+#define srot_ srot
+#define sgemv_ sgemv
+#define strsv_ strsv
+#define sgemm_ sgemm
+#define strsm_ strsm
+
+#define dasum_ dasum
+#define idamax_ idamax
+#define dcopy_ dcopy
+#define dscal_ dscal
+#define dger_ dger
+#define dnrm2_ dnrm2
+#define dsymv_ dsymv
+#define ddot_ ddot
+#define daxpy_ daxpy
+#define dsyr2_ dsyr2
+#define drot_ drot
+#define dgemv_ dgemv
+#define dtrsv_ dtrsv
+#define dgemm_ dgemm
+#define dtrsm_ dtrsm
+
+#define scasum_ scasum
+#define icamax_ icamax
+#define ccopy_ ccopy
+#define cscal_ cscal
+#define scnrm2_ scnrm2
+#define caxpy_ caxpy
+#define cgemv_ cgemv
+#define ctrsv_ ctrsv
+#define cgemm_ cgemm
+#define ctrsm_ ctrsm
+#define cgerc_ cgerc
+#define chemv_ chemv
+#define cher2_ cher2
+
+#define dzasum_ dzasum
+#define izamax_ izamax
+#define zcopy_ zcopy
+#define zscal_ zscal
+#define dznrm2_ dznrm2
+#define zaxpy_ zaxpy
+#define zgemv_ zgemv
+#define ztrsv_ ztrsv
+#define zgemm_ zgemm
+#define ztrsm_ ztrsm
+#define zgerc_ zgerc
+#define zhemv_ zhemv
+#define zher2_ zher2
+
+#define c_bridge_dgssv_ c_bridge_dgssv
+#define c_fortran_dgssv_ c_fortran_dgssv
+#endif
+
+#endif /* __SUPERLU_CNAMES */
diff --git a/SRC/Makefile b/SRC/Makefile
new file mode 100644
index 0000000..30840c0
--- /dev/null
+++ b/SRC/Makefile
@@ -0,0 +1,115 @@
+# makefile for sparse supernodal LU, implemented in ANSI C
+include ../make.inc
+
+#######################################################################
+# This is the makefile to create a library for SuperLU.
+# The files are organized as follows:
+#
+# ALLAUX -- Auxiliary routines called from all precisions
+# SCLAUX -- Auxiliary routines called from both real and complex
+# DZLAUX -- Auxiliary routines called from both double precision
+# and complex*16
+# SLUSRC -- Single precision real SuperLU routines
+# DLUSRC -- Double precision real SuperLU routines
+# CLUSRC -- Single precision complex SuperLU routines
+# ZLUSRC -- Double precision complex SuperLU routines
+#
+# The library can be set up to include routines for any combination
+# of the four precisions. To create or add to the library, enter make
+# followed by one or more of the precisions desired. Some examples:
+# make single
+# make single double
+# make single double complex complex16
+# Alternatively, the command
+# make
+# without any arguments creates a library of all four precisions.
+# The library is called
+# superlu.a
+# and is created at the next higher directory level.
+#
+# To remove the object files after the library is created, enter
+# make clean
+#
+#######################################################################
+
+ALLAUX = superlu_timer.o lsame.o util.o memory.o get_perm_c.o mmd.o \
+ sp_coletree.o sp_preorder.o sp_ienv.o relax_snode.o heap_relax_snode.o \
+ xerbla.o colamd.o
+
+SCLAUX = slamch.o
+
+DZLAUX = dlamch.o
+
+SLUSRC = \
+ sgssv.o sgssvx.o \
+ ssp_blas2.o ssp_blas3.o sgscon.o slacon.o \
+ slangs.o sgsequ.o slaqgs.o spivotgrowth.o \
+ sgsrfs.o sgstrf.o sgstrs.o scopy_to_ucol.o \
+ ssnode_dfs.o ssnode_bmod.o \
+ spanel_dfs.o spanel_bmod.o sreadhb.o \
+ scolumn_dfs.o scolumn_bmod.o spivotL.o spruneL.o \
+ smemory.o sutil.o smyblas2.o
+
+DLUSRC = \
+ dgssv.o dgssvx.o \
+ dsp_blas2.o dsp_blas3.o dgscon.o dlacon.o \
+ dlangs.o dgsequ.o dlaqgs.o dpivotgrowth.o \
+ dgsrfs.o dgstrf.o dgstrs.o dcopy_to_ucol.o \
+ dsnode_dfs.o dsnode_bmod.o \
+ dpanel_dfs.o dpanel_bmod.o dreadhb.o \
+ dcolumn_dfs.o dcolumn_bmod.o dpivotL.o dpruneL.o \
+ dmemory.o dutil.o dmyblas2.o
+
+CLUSRC = \
+ scomplex.o scsum1.o icmax1.o \
+ cgssv.o cgssvx.o \
+ csp_blas2.o csp_blas3.o cgscon.o clacon.o \
+ clangs.o cgsequ.o claqgs.o cpivotgrowth.o \
+ cgsrfs.o cgstrf.o cgstrs.o ccopy_to_ucol.o \
+ csnode_dfs.o csnode_bmod.o \
+ cpanel_dfs.o cpanel_bmod.o creadhb.o \
+ ccolumn_dfs.o ccolumn_bmod.o cpivotL.o cpruneL.o \
+ cmemory.o cutil.o cmyblas2.o
+
+ZLUSRC = \
+ dcomplex.o dzsum1.o izmax1.o \
+ zgssv.o zgssvx.o \
+ zsp_blas2.o zsp_blas3.o zgscon.o zlacon.o \
+ zlangs.o zgsequ.o zlaqgs.o zpivotgrowth.o \
+ zgsrfs.o zgstrf.o zgstrs.o zcopy_to_ucol.o \
+ zsnode_dfs.o zsnode_bmod.o \
+ zpanel_dfs.o zpanel_bmod.o zreadhb.o \
+ zcolumn_dfs.o zcolumn_bmod.o zpivotL.o zpruneL.o \
+ zmemory.o zutil.o zmyblas2.o
+
+all: single double complex complex16
+
+single: $(SLUSRC) $(ALLAUX) $(SCLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) $(SLUSRC) $(ALLAUX) $(SCLAUX)
+ $(RANLIB) ../$(SUPERLULIB)
+
+double: $(DLUSRC) $(ALLAUX) $(DZLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) $(DLUSRC) $(ALLAUX) $(DZLAUX)
+ $(RANLIB) ../$(SUPERLULIB)
+
+complex: $(CLUSRC) $(ALLAUX) $(SCLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) $(CLUSRC) $(ALLAUX) $(SCLAUX)
+ $(RANLIB) ../$(SUPERLULIB)
+
+complex16: $(ZLUSRC) $(ALLAUX) $(DZLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) $(ZLUSRC) $(ALLAUX) $(DZLAUX)
+ $(RANLIB) ../$(SUPERLULIB)
+
+
+##################################
+# Do not optimize these routines #
+##################################
+slamch.o: slamch.c ; $(CC) -c $(NOOPTS) $<
+dlamch.o: dlamch.c ; $(CC) -c $(NOOPTS) $<
+superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<
+
+.c.o:
+ $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)
+
+clean:
+ rm -f *.o ../superlu$(PLAT).a
diff --git a/SRC/ccolumn_bmod.c b/SRC/ccolumn_bmod.c
new file mode 100644
index 0000000..730f04a
--- /dev/null
+++ b/SRC/ccolumn_bmod.c
@@ -0,0 +1,361 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "csp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void cusolve(int, int, complex*, complex*);
+void clsolve(int, int, complex*, complex*);
+void cmatvec(int, int, int, complex*, complex*, complex*);
+
+
+
+/* Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+ccolumn_bmod (
+ const int jcol, /* in */
+ const int nseg, /* in */
+ complex *dense, /* in */
+ complex *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int fpanelc, /* in -- first column in the current panel */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose:
+ * ========
+ * Performs numeric block updates (sup-col) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ complex alpha, beta;
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in supernode
+ * nsupr = no of rows in supernode (used as leading dimension)
+ * luptr = location of supernodal LU-block in storage
+ * kfnz = first nonz in the k-th supernodal segment
+ * no_zeros = no of leading zeros in a supernodal U-segment
+ */
+ complex ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int fsupc, nsupc, nsupr, segsze;
+ int nrow; /* No of rows in the matrix of matrix-vector */
+ int jcolp1, jsupno, k, ksub, krep, krep_ind, ksupno;
+ register int lptr, kfnz, isub, irow, i;
+ register int no_zeros, new_next;
+ int ufirst, nextlu;
+ int fst_col; /* First column within small LU update */
+ int d_fsupc; /* Distance between the first column of the current
+ panel and the first column of the current snode. */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ complex *lusup;
+ int *xlusup;
+ int nzlumax;
+ complex *tempv1;
+ complex zero = {0.0, 0.0};
+ complex one = {1.0, 0.0};
+ complex none = {-1.0, 0.0};
+ complex comp_temp, comp_temp1;
+ int mem_error;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ nzlumax = Glu->nzlumax;
+ jcolp1 = jcol + 1;
+ jsupno = supno[jcol];
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+
+ krep = segrep[k];
+ k--;
+ ksupno = supno[krep];
+ if ( jsupno != ksupno ) { /* Outside the rectangular supernode */
+
+ fsupc = xsup[ksupno];
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ /* Distance from the current supernode to the current panel;
+ d_fsupc=0 if fsupc > fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ luptr = xlusup[fst_col] + d_fsupc;
+ lptr = xlsub[fsupc] + d_fsupc;
+
+ kfnz = repfnz[krep];
+ kfnz = SUPERLU_MAX ( kfnz, fpanelc );
+
+ segsze = krep - kfnz + 1;
+ nsupc = krep - fst_col + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nrow = nsupr - d_fsupc - nsupc;
+ krep_ind = lptr + nsupc - 1;
+
+
+
+
+ /*
+ * Case 1: Update U-segment of size 1 -- col-col update
+ */
+ if ( segsze == 1 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ c_sub(&dense[irow], &dense[irow], &comp_temp);
+ luptr++;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) { /* Case 2: 2cols-col update */
+ cc_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ c_sub(&ukj, &ukj, &comp_temp);
+ dense[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ cc_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&dense[irow], &dense[irow], &comp_temp);
+ }
+ } else { /* Case 3: 3cols-col update */
+ ukj2 = dense[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ cc_mult(&comp_temp, &ukj2, &lusup[luptr2-1]);
+ c_sub(&ukj1, &ukj1, &comp_temp);
+
+ cc_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ cc_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&ukj, &ukj, &comp_temp);
+
+ dense[lsub[krep_ind]] = ukj;
+ dense[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ luptr2++;
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ cc_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ cc_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&dense[irow], &dense[irow], &comp_temp);
+ }
+ }
+
+
+ } else {
+ /*
+ * Case: sup-col update
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense
+ */
+
+ no_zeros = kfnz - fst_col;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*] */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ tempv[i] = dense[irow];
+ ++isub;
+ }
+
+ /* Dense triangular solve -- start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ CGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ cgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ clsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ cmatvec (nsupr, nrow , segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+
+ /* Scatter tempv[] into SPA dense[] as a temporary storage */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense[irow] = tempv[i];
+ tempv[i] = zero;
+ ++isub;
+ }
+
+ /* Scatter tempv1[] into SPA dense[] */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ c_sub(&dense[irow], &dense[irow], &tempv1[i]);
+ tempv1[i] = zero;
+ ++isub;
+ }
+ }
+
+ } /* if jsupno ... */
+
+ } /* for each segment... */
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ nextlu = xlusup[jcol];
+ fsupc = xsup[jsupno];
+
+ /* Copy the SPA dense into L\U[*,j] */
+ new_next = nextlu + xlsub[fsupc+1] - xlsub[fsupc];
+ while ( new_next > nzlumax ) {
+ if (mem_error = cLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, Glu))
+ return (mem_error);
+ lusup = Glu->lusup;
+ lsub = Glu->lsub;
+ }
+
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = zero;
+ ++nextlu;
+ }
+
+ xlusup[jcolp1] = nextlu; /* Close L\U[*,jcol] */
+
+ /* For more updates within the panel (also within the current supernode),
+ * should start from the first column of the panel, or the first column
+ * of the supernode, whichever is bigger. There are 2 cases:
+ * 1) fsupc < fpanelc, then fst_col := fpanelc
+ * 2) fsupc >= fpanelc, then fst_col := fsupc
+ */
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ if ( fst_col < jcol ) {
+
+ /* Distance between the current supernode and the current panel.
+ d_fsupc=0 if fsupc >= fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ lptr = xlsub[fsupc] + d_fsupc;
+ luptr = xlusup[fst_col] + d_fsupc;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nsupc = jcol - fst_col; /* Excluding jcol */
+ nrow = nsupr - d_fsupc - nsupc;
+
+ /* Points to the beginning of jcol in snode L\U(jsupno) */
+ ufirst = xlusup[jcol] + d_fsupc;
+
+ ops[TRSV] += 4 * nsupc * (nsupc - 1);
+ ops[GEMV] += 8 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#else
+ ctrsv_( "L", "N", "U", &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#endif
+
+ alpha = none; beta = one; /* y := beta*y + alpha*A*x */
+
+#ifdef _CRAY
+ CGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ cgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ clsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+
+ cmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], tempv );
+
+ /* Copy updates from tempv[*] into lusup[*] */
+ isub = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ c_sub(&lusup[isub], &lusup[isub], &tempv[i]);
+ tempv[i] = zero;
+ ++isub;
+ }
+
+#endif
+
+
+ } /* if fst_col < jcol ... */
+
+ return 0;
+}
diff --git a/SRC/ccolumn_dfs.c b/SRC/ccolumn_dfs.c
new file mode 100644
index 0000000..d2c65fb
--- /dev/null
+++ b/SRC/ccolumn_dfs.c
@@ -0,0 +1,270 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+
+/* What type of supernodes we want */
+#define T2_SUPER
+
+int
+ccolumn_dfs(
+ const int m, /* in - number of rows in the matrix */
+ const int jcol, /* in */
+ int *perm_r, /* in */
+ int *nseg, /* modified - with new segments appended */
+ int *lsub_col, /* in - defines the RHS vector to start the dfs */
+ int *segrep, /* modified - with new segments appended */
+ int *repfnz, /* modified */
+ int *xprune, /* modified */
+ int *marker, /* modified */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * "column_dfs" performs a symbolic factorization on column jcol, and
+ * decide the supernode boundary.
+ *
+ * This routine does not use numeric values, but only use the RHS
+ * row indices to start the dfs.
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives. The routine returns a list of such supernodal
+ * representatives in topological order of the dfs that generates them.
+ * The location of the first nonzero in each such supernodal segment
+ * (supernodal entry location) is also returned.
+ *
+ * Local parameters
+ * ================
+ * nseg: no of segments in current U[*,j]
+ * jsuper: jsuper=EMPTY if column j does not belong to the same
+ * supernode as j-1. Otherwise, jsuper=nsuper.
+ *
+ * marker2: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * > 0 number of bytes allocated when run out of space.
+ *
+ */
+ int jcolp1, jcolm1, jsuper, nsuper, nextl;
+ int k, krep, krow, kmark, kperm;
+ int *marker2; /* Used for small panel LU */
+ int fsupc; /* First column of a snode */
+ int myfnz; /* First nonz column of a U-segment */
+ int chperm, chmark, chrep, kchild;
+ int xdfs, maxdfs, kpar, oldrep;
+ int jptr, jm1ptr;
+ int ito, ifrom, istop; /* Used to compress row subscripts */
+ int mem_error;
+ int *xsup, *supno, *lsub, *xlsub;
+ int nzlmax;
+ static int first = 1, maxsuper;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ first = 0;
+ }
+ jcolp1 = jcol + 1;
+ jcolm1 = jcol - 1;
+ nsuper = supno[jcol];
+ jsuper = nsuper;
+ nextl = xlsub[jcol];
+ marker2 = &marker[2*m];
+
+
+ /* For each nonzero in A[*,jcol] do dfs */
+ for (k = 0; lsub_col[k] != EMPTY; k++) {
+
+ krow = lsub_col[k];
+ lsub_col[k] = EMPTY;
+ kmark = marker2[krow];
+
+ /* krow was visited before, go to the next nonz */
+ if ( kmark == jcol ) continue;
+
+ /* For each unmarked nbr krow of jcol
+ * krow is in L: place it in structure of L[*,jcol]
+ */
+ marker2[krow] = jcol;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ lsub[nextl++] = krow; /* krow is indexed into A */
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = cLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( kmark != jcolm1 ) jsuper = EMPTY;/* Row index subset testing */
+ } else {
+ /* krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz[krep];
+
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > kperm ) repfnz[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker2[kchild];
+
+ if ( chmark != jcol ) { /* Not reached yet */
+ marker2[kchild] = jcol;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,k] */
+ if ( chperm == EMPTY ) {
+ lsub[nextl++] = kchild;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error =
+ cLUMemXpand(jcol,nextl,LSUB,&nzlmax,Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( chmark != jcolm1 ) jsuper = EMPTY;
+ } else {
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz[chrep];
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz[chrep] = chperm;
+ } else {
+ /* Continue dfs at super-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L^t) */
+ parent[krep] = oldrep;
+ repfnz[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+ } /* else */
+
+ } /* else */
+
+ } /* if */
+
+ } /* while */
+
+ /* krow has no more unexplored nbrs;
+ * place supernode-rep krep in postorder DFS.
+ * backtrack dfs to its parent
+ */
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ kpar = parent[krep]; /* Pop from stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+ } while ( kpar != EMPTY ); /* Until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonzero ... */
+
+ /* Check to see if j belongs in the same supernode as j-1 */
+ if ( jcol == 0 ) { /* Do nothing for column 0 */
+ nsuper = supno[0] = 0;
+ } else {
+ fsupc = xsup[nsuper];
+ jptr = xlsub[jcol]; /* Not compressed yet */
+ jm1ptr = xlsub[jcolm1];
+
+#ifdef T2_SUPER
+ if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = EMPTY;
+#endif
+ /* Make sure the number of columns in a supernode doesn't
+ exceed threshold. */
+ if ( jcol - fsupc >= maxsuper ) jsuper = EMPTY;
+
+ /* If jcol starts a new supernode, reclaim storage space in
+ * lsub from the previous supernode. Note we only store
+ * the subscript set of the first and last columns of
+ * a supernode. (first for num values, last for pruning)
+ */
+ if ( jsuper == EMPTY ) { /* starts a new supernode */
+ if ( (fsupc < jcolm1-1) ) { /* >= 3 columns in nsuper */
+#ifdef CHK_COMPRESS
+ printf(" Compress lsub[] at super %d-%d\n", fsupc, jcolm1);
+#endif
+ ito = xlsub[fsupc+1];
+ xlsub[jcolm1] = ito;
+ istop = ito + jptr - jm1ptr;
+ xprune[jcolm1] = istop; /* Initialize xprune[jcol-1] */
+ xlsub[jcol] = istop;
+ for (ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)
+ lsub[ito] = lsub[ifrom];
+ nextl = ito; /* = istop + length(jcol) */
+ }
+ nsuper++;
+ supno[jcol] = nsuper;
+ } /* if a new supernode */
+
+ } /* else: jcol > 0 */
+
+ /* Tidy up the pointers before exit */
+ xsup[nsuper+1] = jcolp1;
+ supno[jcolp1] = nsuper;
+ xprune[jcol] = nextl; /* Initialize upper bound for pruning */
+ xlsub[jcolp1] = nextl;
+
+ return 0;
+}
diff --git a/SRC/ccopy_to_ucol.c b/SRC/ccopy_to_ucol.c
new file mode 100644
index 0000000..0c7a969
--- /dev/null
+++ b/SRC/ccopy_to_ucol.c
@@ -0,0 +1,105 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+#include "util.h"
+
+int
+ccopy_to_ucol(
+ int jcol, /* in */
+ int nseg, /* in */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int *perm_r, /* in */
+ complex *dense, /* modified - reset to zero on return */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Gather from SPA dense[*] to global ucol[*].
+ */
+ int ksub, krep, ksupno;
+ int i, k, kfnz, segsze;
+ int fsupc, isub, irow;
+ int jsupno, nextu;
+ int new_next, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ complex *ucol;
+ int *usub, *xusub;
+ int nzumax;
+
+ complex zero = {0.0, 0.0};
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+ nzumax = Glu->nzumax;
+
+ jsupno = supno[jcol];
+ nextu = xusub[jcol];
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+ krep = segrep[k--];
+ ksupno = supno[krep];
+
+ if ( ksupno != jsupno ) { /* Should go into ucol[] */
+ kfnz = repfnz[krep];
+ if ( kfnz != EMPTY ) { /* Nonzero U-segment */
+
+ fsupc = xsup[ksupno];
+ isub = xlsub[fsupc] + kfnz - fsupc;
+ segsze = krep - kfnz + 1;
+
+ new_next = nextu + segsze;
+ while ( new_next > nzumax ) {
+ if (mem_error = cLUMemXpand(jcol, nextu, UCOL, &nzumax, Glu))
+ return (mem_error);
+ ucol = Glu->ucol;
+ if (mem_error = cLUMemXpand(jcol, nextu, USUB, &nzumax, Glu))
+ return (mem_error);
+ usub = Glu->usub;
+ lsub = Glu->lsub;
+ }
+
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ usub[nextu] = perm_r[irow];
+ ucol[nextu] = dense[irow];
+ dense[irow] = zero;
+ nextu++;
+ isub++;
+ }
+
+ }
+
+ }
+
+ } /* for each segment... */
+
+ xusub[jcol + 1] = nextu; /* Close U[*,jcol] */
+ return 0;
+}
diff --git a/SRC/cgscon.c b/SRC/cgscon.c
new file mode 100644
index 0000000..b3f5c99
--- /dev/null
+++ b/SRC/cgscon.c
@@ -0,0 +1,143 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: cgscon.c
+ * History: Modified from lapack routines CGECON.
+ */
+#include <math.h>
+#include "csp_defs.h"
+
+void
+cgscon(char *norm, SuperMatrix *L, SuperMatrix *U,
+ float anorm, float *rcond, SuperLUStat_t *stat, int *info)
+{
+/*
+ Purpose
+ =======
+
+ CGSCON estimates the reciprocal of the condition number of a general
+ real matrix A, in either the 1-norm or the infinity-norm, using
+ the LU factorization computed by CGETRF.
+
+ An estimate is obtained for norm(inv(A)), and the reciprocal of the
+ condition number is computed as
+ RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ NORM (input) char*
+ Specifies whether the 1-norm condition number or the
+ infinity-norm condition number is required:
+ = '1' or 'O': 1-norm;
+ = 'I': Infinity-norm.
+
+ L (input) SuperMatrix*
+ The factor L from the factorization Pr*A*Pc=L*U as computed by
+ cgstrf(). Use compressed row subscripts storage for supernodes,
+ i.e., L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+
+ U (input) SuperMatrix*
+ The factor U from the factorization Pr*A*Pc=L*U as computed by
+ cgstrf(). Use column-wise storage scheme, i.e., U has types:
+ Stype = SLU_NC, Dtype = SLU_C, Mtype = TRU.
+
+ ANORM (input) float
+ If NORM = '1' or 'O', the 1-norm of the original matrix A.
+ If NORM = 'I', the infinity-norm of the original matrix A.
+
+ RCOND (output) float*
+ The reciprocal of the condition number of the matrix A,
+ computed as RCOND = 1/(norm(A) * norm(inv(A))).
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ int kase, kase1, onenrm, i;
+ float ainvnm;
+ complex *work;
+ extern int crscl_(int *, complex *, complex *, int *);
+
+ extern int clacon_(int *, complex *, complex *, float *, int *);
+
+
+ /* Test the input parameters. */
+ *info = 0;
+ onenrm = *(unsigned char *)norm == '1' || lsame_(norm, "O");
+ if (! onenrm && ! lsame_(norm, "I")) *info = -1;
+ else if (L->nrow < 0 || L->nrow != L->ncol ||
+ L->Stype != SLU_SC || L->Dtype != SLU_C || L->Mtype != SLU_TRLU)
+ *info = -2;
+ else if (U->nrow < 0 || U->nrow != U->ncol ||
+ U->Stype != SLU_NC || U->Dtype != SLU_C || U->Mtype != SLU_TRU)
+ *info = -3;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("cgscon", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ *rcond = 0.;
+ if ( L->nrow == 0 || U->nrow == 0) {
+ *rcond = 1.;
+ return;
+ }
+
+ work = complexCalloc( 3*L->nrow );
+
+
+ if ( !work )
+ ABORT("Malloc fails for work arrays in cgscon.");
+
+ /* Estimate the norm of inv(A). */
+ ainvnm = 0.;
+ if ( onenrm ) kase1 = 1;
+ else kase1 = 2;
+ kase = 0;
+
+ do {
+ clacon_(&L->nrow, &work[L->nrow], &work[0], &ainvnm, &kase);
+
+ if (kase == 0) break;
+
+ if (kase == kase1) {
+ /* Multiply by inv(L). */
+ sp_ctrsv("L", "No trans", "Unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(U). */
+ sp_ctrsv("U", "No trans", "Non-unit", L, U, &work[0], stat, info);
+
+ } else {
+
+ /* Multiply by inv(U'). */
+ sp_ctrsv("U", "Transpose", "Non-unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_ctrsv("L", "Transpose", "Unit", L, U, &work[0], stat, info);
+
+ }
+
+ } while ( kase != 0 );
+
+ /* Compute the estimate of the reciprocal condition number. */
+ if (ainvnm != 0.) *rcond = (1. / ainvnm) / anorm;
+
+ SUPERLU_FREE (work);
+ return;
+
+} /* cgscon */
+
diff --git a/SRC/cgsequ.c b/SRC/cgsequ.c
new file mode 100644
index 0000000..10420cb
--- /dev/null
+++ b/SRC/cgsequ.c
@@ -0,0 +1,186 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: cgsequ.c
+ * History: Modified from LAPACK routine CGEEQU
+ */
+#include <math.h>
+#include "csp_defs.h"
+#include "util.h"
+
+void
+cgsequ(SuperMatrix *A, float *r, float *c, float *rowcnd,
+ float *colcnd, float *amax, int *info)
+{
+/*
+ Purpose
+ =======
+
+ CGSEQU computes row and column scalings intended to equilibrate an
+ M-by-N sparse matrix A and reduce its condition number. R returns the row
+ scale factors and C the column scale factors, chosen to try to make
+ the largest element in each row and column of the matrix B with
+ elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+
+ R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+ number and BIGNUM = largest safe number. Use of these scaling
+ factors is not guaranteed to reduce the condition number of A but
+ works well in practice.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input) SuperMatrix*
+ The matrix of dimension (A->nrow, A->ncol) whose equilibration
+ factors are to be computed. The type of A can be:
+ Stype = SLU_NC; Dtype = SLU_C; Mtype = SLU_GE.
+
+ R (output) float*, size A->nrow
+ If INFO = 0 or INFO > M, R contains the row scale factors
+ for A.
+
+ C (output) float*, size A->ncol
+ If INFO = 0, C contains the column scale factors for A.
+
+ ROWCND (output) float*
+ If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+ smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+ AMAX is neither too large nor too small, it is not worth
+ scaling by R.
+
+ COLCND (output) float*
+ If INFO = 0, COLCND contains the ratio of the smallest
+ C(i) to the largest C(i). If COLCND >= 0.1, it is not
+ worth scaling by C.
+
+ AMAX (output) float*
+ Absolute value of largest matrix element. If AMAX is very
+ close to overflow or very close to underflow, the matrix
+ should be scaled.
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+ > 0: if INFO = i, and i is
+ <= A->nrow: the i-th row of A is exactly zero
+ > A->ncol: the (i-M)-th column of A is exactly zero
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ complex *Aval;
+ int i, j, irow;
+ float rcmin, rcmax;
+ float bignum, smlnum;
+ extern double slamch_(char *);
+
+ /* Test the input parameters. */
+ *info = 0;
+ if ( A->nrow < 0 || A->ncol < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_C || A->Mtype != SLU_GE )
+ *info = -1;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("cgsequ", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || A->ncol == 0 ) {
+ *rowcnd = 1.;
+ *colcnd = 1.;
+ *amax = 0.;
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Get machine constants. */
+ smlnum = slamch_("S");
+ bignum = 1. / smlnum;
+
+ /* Compute row scale factors. */
+ for (i = 0; i < A->nrow; ++i) r[i] = 0.;
+
+ /* Find the maximum element in each row. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ r[irow] = SUPERLU_MAX( r[irow], c_abs1(&Aval[i]) );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ rcmax = SUPERLU_MAX(rcmax, r[i]);
+ rcmin = SUPERLU_MIN(rcmin, r[i]);
+ }
+ *amax = rcmax;
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (i = 0; i < A->nrow; ++i)
+ if (r[i] == 0.) {
+ *info = i + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (i = 0; i < A->nrow; ++i)
+ r[i] = 1. / SUPERLU_MIN( SUPERLU_MAX( r[i], smlnum ), bignum );
+ /* Compute ROWCND = min(R(I)) / max(R(I)) */
+ *rowcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ /* Compute column scale factors */
+ for (j = 0; j < A->ncol; ++j) c[j] = 0.;
+
+ /* Find the maximum element in each column, assuming the row
+ scalings computed above. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ c[j] = SUPERLU_MAX( c[j], c_abs1(&Aval[i]) * r[irow] );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ rcmax = SUPERLU_MAX(rcmax, c[j]);
+ rcmin = SUPERLU_MIN(rcmin, c[j]);
+ }
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (j = 0; j < A->ncol; ++j)
+ if ( c[j] == 0. ) {
+ *info = A->nrow + j + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (j = 0; j < A->ncol; ++j)
+ c[j] = 1. / SUPERLU_MIN( SUPERLU_MAX( c[j], smlnum ), bignum);
+ /* Compute COLCND = min(C(J)) / max(C(J)) */
+ *colcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ return;
+
+} /* cgsequ */
+
+
diff --git a/SRC/cgsrfs.c b/SRC/cgsrfs.c
new file mode 100644
index 0000000..a2d2e89
--- /dev/null
+++ b/SRC/cgsrfs.c
@@ -0,0 +1,447 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: cgsrfs.c
+ * History: Modified from lapack routine CGERFS
+ */
+#include <math.h>
+#include "csp_defs.h"
+
+void
+cgsrfs(trans_t trans, SuperMatrix *A, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, char *equed, float *R, float *C,
+ SuperMatrix *B, SuperMatrix *X, float *ferr, float *berr,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CGSRFS improves the computed solution to a system of linear
+ * equations and provides error bounds and backward error estimates for
+ * the solution.
+ *
+ * If equilibration was performed, the system becomes:
+ * (diag(R)*A_original*diag(C)) * X = diag(R)*B_original.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * A (input) SuperMatrix*
+ * The original matrix A in the system, or the scaled A if
+ * equilibration was done. The type of A can be:
+ * Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_GE.
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * cgstrf(). Use column-wise storage scheme,
+ * i.e., U has types: Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (A->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * equed (input) Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by
+ * diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ *
+ * R (input) float*, dimension (A->nrow)
+ * The row scale factors for A.
+ * If equed = 'R' or 'B', A is premultiplied by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ *
+ * C (input) float*, dimension (A->ncol)
+ * The column scale factors for A.
+ * If equed = 'C' or 'B', A is postmultiplied by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ *
+ * B (input) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * The right hand side matrix B.
+ * if equed = 'R' or 'B', B is premultiplied by diag(R).
+ *
+ * X (input/output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * On entry, the solution matrix X, as computed by cgstrs().
+ * On exit, the improved solution matrix X.
+ * if *equed = 'C' or 'B', X should be premultiplied by diag(C)
+ * in order to obtain the solution to the original system.
+ *
+ * FERR (output) float*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ *
+ * BERR (output) float*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ *
+ * Internal Parameters
+ * ===================
+ *
+ * ITMAX is the maximum number of steps of iterative refinement.
+ *
+ */
+
+#define ITMAX 5
+
+ /* Table of constant values */
+ int ione = 1;
+ complex ndone = {-1., 0.};
+ complex done = {1., 0.};
+
+ /* Local variables */
+ NCformat *Astore;
+ complex *Aval;
+ SuperMatrix Bjcol;
+ DNformat *Bstore, *Xstore, *Bjcol_store;
+ complex *Bmat, *Xmat, *Bptr, *Xptr;
+ int kase;
+ float safe1, safe2;
+ int i, j, k, irow, nz, count, notran, rowequ, colequ;
+ int ldb, ldx, nrhs;
+ float s, xk, lstres, eps, safmin;
+ char transc[1];
+ trans_t transt;
+ complex *work;
+ float *rwork;
+ int *iwork;
+ extern double slamch_(char *);
+ extern int clacon_(int *, complex *, complex *, float *, int *);
+#ifdef _CRAY
+ extern int CCOPY(int *, complex *, int *, complex *, int *);
+ extern int CSAXPY(int *, complex *, complex *, int *, complex *, int *);
+#else
+ extern int ccopy_(int *, complex *, int *, complex *, int *);
+ extern int caxpy_(int *, complex *, complex *, int *, complex *, int *);
+#endif
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ /* Test the input parameters */
+ *info = 0;
+ notran = (trans == NOTRANS);
+ if ( !notran && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_C || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_C || L->Mtype != SLU_TRLU )
+ *info = -3;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_C || U->Mtype != SLU_TRU )
+ *info = -4;
+ else if ( ldb < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_C || B->Mtype != SLU_GE )
+ *info = -10;
+ else if ( ldx < SUPERLU_MAX(0, A->nrow) ||
+ X->Stype != SLU_DN || X->Dtype != SLU_C || X->Mtype != SLU_GE )
+ *info = -11;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("cgsrfs", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || nrhs == 0) {
+ for (j = 0; j < nrhs; ++j) {
+ ferr[j] = 0.;
+ berr[j] = 0.;
+ }
+ return;
+ }
+
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+
+ /* Allocate working space */
+ work = complexMalloc(2*A->nrow);
+ rwork = (float *) SUPERLU_MALLOC( A->nrow * sizeof(float) );
+ iwork = intMalloc(A->nrow);
+ if ( !work || !rwork || !iwork )
+ ABORT("Malloc fails for work/rwork/iwork.");
+
+ if ( notran ) {
+ *(unsigned char *)transc = 'N';
+ transt = TRANS;
+ } else {
+ *(unsigned char *)transc = 'T';
+ transt = NOTRANS;
+ }
+
+ /* NZ = maximum number of nonzero elements in each row of A, plus 1 */
+ nz = A->ncol + 1;
+ eps = slamch_("Epsilon");
+ safmin = slamch_("Safe minimum");
+ safe1 = nz * safmin;
+ safe2 = safe1 / eps;
+
+ /* Compute the number of nonzeros in each row (or column) of A */
+ for (i = 0; i < A->nrow; ++i) iwork[i] = 0;
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k)
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ ++iwork[Astore->rowind[i]];
+ } else {
+ for (k = 0; k < A->ncol; ++k)
+ iwork[k] = Astore->colptr[k+1] - Astore->colptr[k];
+ }
+
+ /* Copy one column of RHS B into Bjcol. */
+ Bjcol.Stype = B->Stype;
+ Bjcol.Dtype = B->Dtype;
+ Bjcol.Mtype = B->Mtype;
+ Bjcol.nrow = B->nrow;
+ Bjcol.ncol = 1;
+ Bjcol.Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !Bjcol.Store ) ABORT("SUPERLU_MALLOC fails for Bjcol.Store");
+ Bjcol_store = Bjcol.Store;
+ Bjcol_store->lda = ldb;
+ Bjcol_store->nzval = work; /* address aliasing */
+
+ /* Do for each right hand side ... */
+ for (j = 0; j < nrhs; ++j) {
+ count = 0;
+ lstres = 3.;
+ Bptr = &Bmat[j*ldb];
+ Xptr = &Xmat[j*ldx];
+
+ while (1) { /* Loop until stopping criterion is satisfied. */
+
+ /* Compute residual R = B - op(A) * X,
+ where op(A) = A, A**T, or A**H, depending on TRANS. */
+
+#ifdef _CRAY
+ CCOPY(&A->nrow, Bptr, &ione, work, &ione);
+#else
+ ccopy_(&A->nrow, Bptr, &ione, work, &ione);
+#endif
+ sp_cgemv(transc, ndone, A, Xptr, ione, done, work, ione);
+
+ /* Compute componentwise relative backward error from formula
+ max(i) ( abs(R(i)) / ( abs(op(A))*abs(X) + abs(B) )(i) )
+ where abs(Z) is the componentwise absolute value of the matrix
+ or vector Z. If the i-th component of the denominator is less
+ than SAFE2, then SAFE1 is added to the i-th component of the
+ numerator and denominator before dividing. */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = c_abs1( &Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if (notran) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = c_abs1( &Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += c_abs1(&Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ s += c_abs1(&Aval[i]) * c_abs1(&Xptr[irow]);
+ }
+ rwork[k] += s;
+ }
+ }
+ s = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ if (rwork[i] > safe2)
+ s = SUPERLU_MAX( s, c_abs1(&work[i]) / rwork[i] );
+ else
+ s = SUPERLU_MAX( s, (c_abs1(&work[i]) + safe1) /
+ (rwork[i] + safe1) );
+ }
+ berr[j] = s;
+
+ /* Test stopping criterion. Continue iterating if
+ 1) The residual BERR(J) is larger than machine epsilon, and
+ 2) BERR(J) decreased by at least a factor of 2 during the
+ last iteration, and
+ 3) At most ITMAX iterations tried. */
+
+ if (berr[j] > eps && berr[j] * 2. <= lstres && count < ITMAX) {
+ /* Update solution and try again. */
+ cgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+#ifdef _CRAY
+ CAXPY(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#else
+ caxpy_(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#endif
+ lstres = berr[j];
+ ++count;
+ } else {
+ break;
+ }
+
+ } /* end while */
+
+ stat->RefineSteps = count;
+
+ /* Bound error from formula:
+ norm(X - XTRUE) / norm(X) .le. FERR = norm( abs(inv(op(A)))*
+ ( abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) / norm(X)
+ where
+ norm(Z) is the magnitude of the largest component of Z
+ inv(op(A)) is the inverse of op(A)
+ abs(Z) is the componentwise absolute value of the matrix or
+ vector Z
+ NZ is the maximum number of nonzeros in any row of A, plus 1
+ EPS is machine epsilon
+
+ The i-th component of abs(R)+NZ*EPS*(abs(op(A))*abs(X)+abs(B))
+ is incremented by SAFE1 if the i-th component of
+ abs(op(A))*abs(X) + abs(B) is less than SAFE2.
+
+ Use CLACON to estimate the infinity-norm of the matrix
+ inv(op(A)) * diag(W),
+ where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = c_abs1( &Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = c_abs1( &Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += c_abs1(&Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ xk = c_abs1( &Xptr[irow] );
+ s += c_abs1(&Aval[i]) * xk;
+ }
+ rwork[k] += s;
+ }
+ }
+
+ for (i = 0; i < A->nrow; ++i)
+ if (rwork[i] > safe2)
+ rwork[i] = c_abs(&work[i]) + (iwork[i]+1)*eps*rwork[i];
+ else
+ rwork[i] = c_abs(&work[i])+(iwork[i]+1)*eps*rwork[i]+safe1;
+ kase = 0;
+
+ do {
+ clacon_(&A->nrow, &work[A->nrow], work,
+ &ferr[j], &kase);
+ if (kase == 0) break;
+
+ if (kase == 1) {
+ /* Multiply by diag(W)*inv(op(A)**T)*(diag(C) or diag(R)). */
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) {
+ cs_mult(&work[i], &work[i], C[i]);
+ }
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&work[i], &work[i], R[i]);
+ }
+
+ cgstrs (transt, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&work[i], &work[i], rwork[i]);
+ }
+ } else {
+ /* Multiply by (diag(C) or diag(R))*inv(op(A))*diag(W). */
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&work[i], &work[i], rwork[i]);
+ }
+
+ cgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) {
+ cs_mult(&work[i], &work[i], C[i]);
+ }
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->ncol; ++i) {
+ cs_mult(&work[i], &work[i], R[i]);
+ }
+ }
+
+ } while ( kase != 0 );
+
+ /* Normalize error. */
+ lstres = 0.;
+ if ( notran && colequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, C[i] * c_abs1( &Xptr[i]) );
+ } else if ( !notran && rowequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, R[i] * c_abs1( &Xptr[i]) );
+ } else {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, c_abs1( &Xptr[i]) );
+ }
+ if ( lstres != 0. )
+ ferr[j] /= lstres;
+
+ } /* for each RHS j ... */
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(rwork);
+ SUPERLU_FREE(iwork);
+ SUPERLU_FREE(Bjcol.Store);
+
+ return;
+
+} /* cgsrfs */
diff --git a/SRC/cgssv.c b/SRC/cgssv.c
new file mode 100644
index 0000000..ba745ce
--- /dev/null
+++ b/SRC/cgssv.c
@@ -0,0 +1,222 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+void
+cgssv(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ SuperMatrix *L, SuperMatrix *U, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CGSSV solves the system of linear equations A*X=B, using the
+ * LU factorization from CGSTRF. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. Permute the columns of A, forming A*Pc, where Pc
+ * is a permutation matrix. For more details of this step,
+ * see sp_preorder.c.
+ *
+ * 1.2. Factor A as Pr*A*Pc=L*U with the permutation Pr determined
+ * by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 1.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the
+ * above algorithm to the transpose of A:
+ *
+ * 2.1. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.2. Factor A as Pr*transpose(A)*Pc=L*U with the permutation Pr
+ * determined by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 2.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR; Dtype = SLU_C; Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, column permutation vector of size A->ncol
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * If options->ColPerm = MY_PERMC or options->Fact = SamePattern or
+ * options->Fact = SamePattern_SameRowPerm, it is an input argument.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ * Otherwise, it is an output argument.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->RowPerm = MY_PERMR or
+ * options->Fact = SamePattern_SameRowPerm, perm_r is an
+ * input argument.
+ * otherwise it is an output argument.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_TRU.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * so the solution could not be computed.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+ DNformat *Bstore;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int lwork = 0, *etree, i;
+
+ /* Set default values for some parameters */
+ float drop_tol = 0.;
+ int panel_size; /* panel size */
+ int relax; /* no of columns in a relaxed snodes */
+ int permc_spec;
+ trans_t trans = NOTRANS;
+ double *utime;
+ double t; /* Temporary time */
+
+ /* Test the input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ if ( options->Fact != DOFACT ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_C || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_C || B->Mtype != SLU_GE )
+ *info = -7;
+ if ( *info != 0 ) {
+ i = -(*info);
+ xerbla_("cgssv", &i);
+ return;
+ }
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ cCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ trans = TRANS;
+ } else {
+ if ( A->Stype == SLU_NC ) AA = A;
+ }
+
+ t = SuperLU_timer_();
+ /*
+ * Get column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t;
+
+ etree = intMalloc(A->ncol);
+
+ t = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t;
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+
+ /*printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));*/
+ t = SuperLU_timer_();
+ /* Compute the LU factorization of A. */
+ cgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, NULL, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t;
+
+ t = SuperLU_timer_();
+ if ( *info == 0 ) {
+ /* Solve the system A*X=B, overwriting B with X. */
+ cgstrs (trans, L, U, perm_c, perm_r, B, stat, info);
+ }
+ utime[SOLVE] = SuperLU_timer_() - t;
+
+ SUPERLU_FREE (etree);
+ Destroy_CompCol_Permuted(&AC);
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/cgssvx.c b/SRC/cgssvx.c
new file mode 100644
index 0000000..c678d76
--- /dev/null
+++ b/SRC/cgssvx.c
@@ -0,0 +1,614 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+void
+cgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ int *etree, char *equed, float *R, float *C,
+ SuperMatrix *L, SuperMatrix *U, void *work, int lwork,
+ SuperMatrix *B, SuperMatrix *X, float *recip_pivot_growth,
+ float *rcond, float *ferr, float *berr,
+ mem_usage_t *mem_usage, SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CGSSVX solves the system of linear equations A*X=B or A'*X=B, using
+ * the LU factorization from cgstrf(). Error bounds on the solution and
+ * a condition estimate are also provided. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A is
+ * overwritten by diag(R)*A*diag(C) and B by diag(R)*B
+ * (if options->Trans=NOTRANS) or diag(C)*B (if options->Trans
+ * = TRANS or CONJ).
+ *
+ * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation
+ * matrix that usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 1.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the matrix A (after equilibration if options->Equil = YES)
+ * as Pr*A*Pc = L*U, with Pr determined by partial pivoting.
+ *
+ * 1.4. Compute the reciprocal pivot growth factor.
+ *
+ * 1.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form of
+ * A is used to estimate the condition number of the matrix A. If
+ * the reciprocal of the condition number is less than machine
+ * precision, info = A->ncol+1 is returned as a warning, but the
+ * routine still goes on to solve for X and computes error bounds
+ * as described below.
+ *
+ * 1.6. The system of equations is solved for X using the factored form
+ * of A.
+ *
+ * 1.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 1.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the above algorithm
+ * to the transpose of A:
+ *
+ * 2.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A' is
+ * overwritten by diag(R)*A'*diag(C) and B by diag(R)*B
+ * (if trans='N') or diag(C)*B (if trans = 'T' or 'C').
+ *
+ * 2.2. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix that
+ * usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the transpose(A) (after equilibration if
+ * options->Fact = YES) as Pr*transpose(A)*Pc = L*U with the
+ * permutation Pr determined by partial pivoting.
+ *
+ * 2.4. Compute the reciprocal pivot growth factor.
+ *
+ * 2.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form
+ * of transpose(A) is used to estimate the condition number of the
+ * matrix A. If the reciprocal of the condition number
+ * is less than machine precision, info = A->nrow+1 is returned as
+ * a warning, but the routine still goes on to solve for X and
+ * computes error bounds as described below.
+ *
+ * 2.6. The system of equations is solved for X using the factored form
+ * of transpose(A).
+ *
+ * 2.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 2.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input/output) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of the linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR, Dtype = SLU_D, Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * On entry, If options->Fact = FACTORED and equed is not 'N',
+ * then A must have been equilibrated by the scaling factors in
+ * R and/or C.
+ * On exit, A is not modified if options->Equil = NO, or if
+ * options->Equil = YES but equed = 'N' on exit.
+ * Otherwise, if options->Equil = YES and equed is not 'N',
+ * A is scaled as follows:
+ * If A->Stype = SLU_NC:
+ * equed = 'R': A := diag(R) * A
+ * equed = 'C': A := A * diag(C)
+ * equed = 'B': A := diag(R) * A * diag(C).
+ * If A->Stype = SLU_NR:
+ * equed = 'R': transpose(A) := diag(R) * transpose(A)
+ * equed = 'C': transpose(A) := transpose(A) * diag(C)
+ * equed = 'B': transpose(A) := diag(R) * transpose(A) * diag(C).
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, Column permutation vector of size A->ncol,
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ *
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow,
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ *
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by a
+ * new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument.
+ *
+ * etree (input/output) int*, dimension (A->ncol)
+ * Elimination tree of Pc'*A'*A*Pc.
+ * If options->Fact != FACTORED and options->Fact != DOFACT,
+ * etree is an input argument, otherwise it is an output argument.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ *
+ * equed (input/output) char*
+ * Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ * If options->Fact = FACTORED, equed is an input argument,
+ * otherwise it is an output argument.
+ *
+ * R (input/output) float*, dimension (A->nrow)
+ * The row scale factors for A or transpose(A).
+ * If equed = 'R' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the left by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ * If options->Fact = FACTORED, R is an input argument,
+ * otherwise, R is output.
+ * If options->zFact = FACTORED and equed = 'R' or 'B', each element
+ * of R must be positive.
+ *
+ * C (input/output) float*, dimension (A->ncol)
+ * The column scale factors for A or transpose(A).
+ * If equed = 'C' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the right by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ * If options->Fact = FACTORED, C is an input argument,
+ * otherwise, C is output.
+ * If options->Fact = FACTORED and equed = 'C' or 'B', each element
+ * of C must be positive.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype SLU_= NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_TRU.
+ *
+ * work (workspace/output) void*, size (lwork) (in bytes)
+ * User supplied workspace, should be large enough
+ * to hold data structures for factors L and U.
+ * On exit, if fact is not 'F', L and U point to this array.
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * mem_usage->total_needed; no other side effects.
+ *
+ * See argument 'mem_usage' for memory usage statistics.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * If B->ncol = 0, only LU decomposition is performed, the triangular
+ * solve is skipped.
+ * On exit,
+ * if equed = 'N', B is not modified; otherwise
+ * if A->Stype = SLU_NC:
+ * if options->Trans = NOTRANS and equed = 'R' or 'B',
+ * B is overwritten by diag(R)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'C' of 'B',
+ * B is overwritten by diag(C)*B;
+ * if A->Stype = SLU_NR:
+ * if options->Trans = NOTRANS and equed = 'C' or 'B',
+ * B is overwritten by diag(C)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'R' of 'B',
+ * B is overwritten by diag(R)*B.
+ *
+ * X (output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * If info = 0 or info = A->ncol+1, X contains the solution matrix
+ * to the original system of equations. Note that A and B are modified
+ * on exit if equed is not 'N', and the solution to the equilibrated
+ * system is inv(diag(C))*X if options->Trans = NOTRANS and
+ * equed = 'C' or 'B', or inv(diag(R))*X if options->Trans = 'T' or 'C'
+ * and equed = 'R' or 'B'.
+ *
+ * recip_pivot_growth (output) float*
+ * The reciprocal pivot growth factor max_j( norm(A_j)/norm(U_j) ).
+ * The infinity norm is used. If recip_pivot_growth is much less
+ * than 1, the stability of the LU factorization could be poor.
+ *
+ * rcond (output) float*
+ * The estimate of the reciprocal condition number of the matrix A
+ * after equilibration (if done). If rcond is less than the machine
+ * precision (in particular, if rcond = 0), the matrix is singular
+ * to working precision. This condition is indicated by a return
+ * code of info > 0.
+ *
+ * FERR (output) float*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ * If options->IterRefine = NOREFINE, ferr = 1.0.
+ *
+ * BERR (output) float*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ * If options->IterRefine = NOREFINE, berr = 1.0.
+ *
+ * mem_usage (output) mem_usage_t*
+ * Record the memory usage statistics, consisting of following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * The number of memory expansions during the LU factorization.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly
+ * singular, so the solution and error bounds
+ * could not be computed.
+ * = A->ncol+1: U is nonsingular, but RCOND is less than machine
+ * precision, meaning that the matrix is singular to
+ * working precision. Nevertheless, the solution and
+ * error bounds are computed because there are a number
+ * of situations where the computed solution can be more
+ * accurate than the value of RCOND would suggest.
+ * > A->ncol+1: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+
+ DNformat *Bstore, *Xstore;
+ complex *Bmat, *Xmat;
+ int ldb, ldx, nrhs;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int colequ, equil, nofact, notran, rowequ, permc_spec;
+ trans_t trant;
+ char norm[1];
+ int i, j, info1;
+ float amax, anorm, bignum, smlnum, colcnd, rowcnd, rcmax, rcmin;
+ int relax, panel_size;
+ float diag_pivot_thresh, drop_tol;
+ double t0; /* temporary time */
+ double *utime;
+
+ /* External functions */
+ extern float clangs(char *, SuperMatrix *);
+ extern double slamch_(char *);
+
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ *info = 0;
+ nofact = (options->Fact != FACTORED);
+ equil = (options->Equil == YES);
+ notran = (options->Trans == NOTRANS);
+ if ( nofact ) {
+ *(unsigned char *)equed = 'N';
+ rowequ = FALSE;
+ colequ = FALSE;
+ } else {
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ smlnum = slamch_("Safe minimum");
+ bignum = 1. / smlnum;
+ }
+
+#if 0
+printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n",
+ options->Fact, options->Trans, *equed);
+#endif
+
+ /* Test the input parameters */
+ if (!nofact && options->Fact != DOFACT && options->Fact != SamePattern &&
+ options->Fact != SamePattern_SameRowPerm &&
+ !notran && options->Trans != TRANS && options->Trans != CONJ &&
+ !equil && options->Equil != NO)
+ *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_C || A->Mtype != SLU_GE )
+ *info = -2;
+ else if (options->Fact == FACTORED &&
+ !(rowequ || colequ || lsame_(equed, "N")))
+ *info = -6;
+ else {
+ if (rowequ) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, R[j]);
+ rcmax = SUPERLU_MAX(rcmax, R[j]);
+ }
+ if (rcmin <= 0.) *info = -7;
+ else if ( A->nrow > 0)
+ rowcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else rowcnd = 1.;
+ }
+ if (colequ && *info == 0) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, C[j]);
+ rcmax = SUPERLU_MAX(rcmax, C[j]);
+ }
+ if (rcmin <= 0.) *info = -8;
+ else if (A->nrow > 0)
+ colcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else colcnd = 1.;
+ }
+ if (*info == 0) {
+ if ( lwork < -1 ) *info = -12;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_C ||
+ B->Mtype != SLU_GE )
+ *info = -13;
+ else if ( X->ncol < 0 || Xstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ (B->ncol != 0 && B->ncol != X->ncol) ||
+ X->Stype != SLU_DN ||
+ X->Dtype != SLU_C || X->Mtype != SLU_GE )
+ *info = -14;
+ }
+ }
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("cgssvx", &i);
+ return;
+ }
+
+ /* Initialization for factor parameters */
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ diag_pivot_thresh = options->DiagPivotThresh;
+ drop_tol = 0.0;
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ cCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ if ( notran ) { /* Reverse the transpose argument. */
+ trant = CONJ;
+ notran = 0;
+ } else {
+ trant = NOTRANS;
+ notran = 1;
+ }
+ } else { /* A->Stype == SLU_NC */
+ trant = options->Trans;
+ AA = A;
+ }
+
+ if ( nofact && equil ) {
+ t0 = SuperLU_timer_();
+ /* Compute row and column scalings to equilibrate the matrix A. */
+ cgsequ(AA, R, C, &rowcnd, &colcnd, &amax, &info1);
+
+ if ( info1 == 0 ) {
+ /* Equilibrate matrix A. */
+ claqgs(AA, R, C, rowcnd, colcnd, amax, equed);
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ }
+ utime[EQUIL] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Scale the right hand side if equilibration was performed. */
+ if ( notran ) {
+ if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&Bmat[i+j*ldb], &Bmat[i+j*ldb], R[i]);
+ }
+ }
+ } else if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&Bmat[i+j*ldb], &Bmat[i+j*ldb], C[i]);
+ }
+ }
+ }
+
+ if ( nofact ) {
+
+ t0 = SuperLU_timer_();
+ /*
+ * Gnet column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t0;
+
+ t0 = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t0;
+
+/* printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));
+ fflush(stdout); */
+
+ /* Compute the LU factorization of A*Pc. */
+ t0 = SuperLU_timer_();
+ cgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t0;
+
+ if ( lwork == -1 ) {
+ mem_usage->total_needed = *info - A->ncol;
+ return;
+ }
+ }
+
+ if ( options->PivotGrowth ) {
+ if ( *info > 0 ) {
+ if ( *info <= A->ncol ) {
+ /* Compute the reciprocal pivot growth factor of the leading
+ rank-deficient *info columns of A. */
+ *recip_pivot_growth = cPivotGrowth(*info, AA, perm_c, L, U);
+ }
+ return;
+ }
+
+ /* Compute the reciprocal pivot growth factor *recip_pivot_growth. */
+ *recip_pivot_growth = cPivotGrowth(A->ncol, AA, perm_c, L, U);
+ }
+
+ if ( options->ConditionNumber ) {
+ /* Estimate the reciprocal of the condition number of A. */
+ t0 = SuperLU_timer_();
+ if ( notran ) {
+ *(unsigned char *)norm = '1';
+ } else {
+ *(unsigned char *)norm = 'I';
+ }
+ anorm = clangs(norm, AA);
+ cgscon(norm, L, U, anorm, rcond, stat, info);
+ utime[RCOND] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Compute the solution matrix X. */
+ for (j = 0; j < nrhs; j++) /* Save a copy of the right hand sides */
+ for (i = 0; i < B->nrow; i++)
+ Xmat[i + j*ldx] = Bmat[i + j*ldb];
+
+ t0 = SuperLU_timer_();
+ cgstrs (trant, L, U, perm_c, perm_r, X, stat, info);
+ utime[SOLVE] = SuperLU_timer_() - t0;
+
+ /* Use iterative refinement to improve the computed solution and compute
+ error bounds and backward error estimates for it. */
+ t0 = SuperLU_timer_();
+ if ( options->IterRefine != NOREFINE ) {
+ cgsrfs(trant, AA, L, U, perm_c, perm_r, equed, R, C, B,
+ X, ferr, berr, stat, info);
+ } else {
+ for (j = 0; j < nrhs; ++j) ferr[j] = berr[j] = 1.0;
+ }
+ utime[REFINE] = SuperLU_timer_() - t0;
+
+ /* Transform the solution matrix X to a solution of the original system. */
+ if ( notran ) {
+ if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&Xmat[i+j*ldx], &Xmat[i+j*ldx], C[i]);
+ }
+ }
+ } else if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ cs_mult(&Xmat[i+j*ldx], &Xmat[i+j*ldx], R[i]);
+ }
+ }
+ } /* end if nrhs > 0 */
+
+ if ( options->ConditionNumber ) {
+ /* Set INFO = A->ncol+1 if the matrix is singular to working precision. */
+ if ( *rcond < slamch_("E") ) *info = A->ncol + 1;
+ }
+
+ if ( nofact ) {
+ cQuerySpace(L, U, mem_usage);
+ Destroy_CompCol_Permuted(&AC);
+ }
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/cgstrf.c b/SRC/cgstrf.c
new file mode 100644
index 0000000..f64de34
--- /dev/null
+++ b/SRC/cgstrf.c
@@ -0,0 +1,433 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+
+void
+cgstrf (superlu_options_t *options, SuperMatrix *A, float drop_tol,
+ int relax, int panel_size, int *etree, void *work, int lwork,
+ int *perm_c, int *perm_r, SuperMatrix *L, SuperMatrix *U,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CGSTRF computes an LU factorization of a general sparse m-by-n
+ * matrix A using partial pivoting with row interchanges.
+ * The factorization has the form
+ * Pr * A = L * U
+ * where Pr is a row permutation matrix, L is lower triangular with unit
+ * diagonal elements (lower trapezoidal if A->nrow > A->ncol), and U is upper
+ * triangular (upper trapezoidal if A->nrow < A->ncol).
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = SLU_NCP; Dtype = SLU_C; Mtype = SLU_GE.
+ *
+ * drop_tol (input) float (NOT IMPLEMENTED)
+ * Drop tolerance parameter. At step j of the Gaussian elimination,
+ * if abs(A_ij)/(max_i abs(A_ij)) < drop_tol, drop entry A_ij.
+ * 0 <= drop_tol <= 1. The default value of drop_tol is 0.
+ *
+ * relax (input) int
+ * To control degree of relaxing supernodes. If the number
+ * of nodes (columns) in a subtree of the elimination tree is less
+ * than relax, this subtree is considered as one supernode,
+ * regardless of the row structures of those columns.
+ *
+ * panel_size (input) int
+ * A panel consists of at most panel_size consecutive columns.
+ *
+ * etree (input) int*, dimension (A->ncol)
+ * Elimination tree of A'*A.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ * On input, the columns of A should be permuted so that the
+ * etree is in a certain postorder.
+ *
+ * work (input/output) void*, size (lwork) (in bytes)
+ * User-supplied work space and space for the output data structures.
+ * Not referenced if lwork = 0;
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * *info; no other side effects.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ * When searching for diagonal, perm_c[*] is applied to the
+ * row subscripts of A, so that diagonal threshold pivoting
+ * can find the diagonal of A, rather than that of A*Pc.
+ *
+ * perm_r (input/output) int*, dimension (A->nrow)
+ * Row permutation vector which defines the permutation matrix Pr,
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by
+ * a new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument;
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = SLU_NC,
+ * Dtype = SLU_C, Mtype = SLU_TRU.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * and division by zero will occur if it is used to solve a
+ * system of equations.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol. If lwork = -1, it is
+ * the estimated amount of space needed, plus A->ncol.
+ *
+ * ======================================================================
+ *
+ * Local Working Arrays:
+ * ======================
+ * m = number of rows in the matrix
+ * n = number of columns in the matrix
+ *
+ * xprune[0:n-1]: xprune[*] points to locations in subscript
+ * vector lsub[*]. For column i, xprune[i] denotes the point where
+ * structural pruning begins. I.e. only xlsub[i],..,xprune[i]-1 need
+ * to be traversed for symbolic factorization.
+ *
+ * marker[0:3*m-1]: marker[i] = j means that node i has been
+ * reached when working on column j.
+ * Storage: relative to original row subscripts
+ * NOTE: There are 3 of them: marker/marker1 are used for panel dfs,
+ * see cpanel_dfs.c; marker2 is used for inner-factorization,
+ * see ccolumn_dfs.c.
+ *
+ * parent[0:m-1]: parent vector used during dfs
+ * Storage: relative to new row subscripts
+ *
+ * xplore[0:m-1]: xplore[i] gives the location of the next (dfs)
+ * unexplored neighbor of i in lsub[*]
+ *
+ * segrep[0:nseg-1]: contains the list of supernodal representatives
+ * in topological order of the dfs. A supernode representative is the
+ * last column of a supernode.
+ * The maximum size of segrep[] is n.
+ *
+ * repfnz[0:W*m-1]: for a nonzero segment U[*,j] that ends at a
+ * supernodal representative r, repfnz[r] is the location of the first
+ * nonzero in this segment. It is also used during the dfs: repfnz[r]>0
+ * indicates the supernode r has been explored.
+ * NOTE: There are W of them, each used for one column of a panel.
+ *
+ * panel_lsub[0:W*m-1]: temporary for the nonzeros row indices below
+ * the panel diagonal. These are filled in during cpanel_dfs(), and are
+ * used later in the inner LU factorization within the panel.
+ * panel_lsub[]/dense[] pair forms the SPA data structure.
+ * NOTE: There are W of them.
+ *
+ * dense[0:W*m-1]: sparse accumulating (SPA) vector for intermediate values;
+ * NOTE: there are W of them.
+ *
+ * tempv[0:*]: real temporary used for dense numeric kernels;
+ * The size of this array is defined by NUM_TEMPV() in csp_defs.h.
+ *
+ */
+ /* Local working arrays */
+ NCPformat *Astore;
+ int *iperm_r; /* inverse of perm_r;
+ used when options->Fact == SamePattern_SameRowPerm */
+ int *iperm_c; /* inverse of perm_c */
+ int *iwork;
+ complex *cwork;
+ int *segrep, *repfnz, *parent, *xplore;
+ int *panel_lsub; /* dense[]/panel_lsub[] pair forms a w-wide SPA */
+ int *xprune;
+ int *marker;
+ complex *dense, *tempv;
+ int *relax_end;
+ complex *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int *xsup, *supno;
+ int *xlsub, *xlusup, *xusub;
+ int nzlumax;
+ static GlobalLU_t Glu; /* persistent to facilitate multiple factors. */
+
+ /* Local scalars */
+ fact_t fact = options->Fact;
+ double diag_pivot_thresh = options->DiagPivotThresh;
+ int pivrow; /* pivotal row number in the original matrix A */
+ int nseg1; /* no of segments in U-column above panel row jcol */
+ int nseg; /* no of segments in each U-column */
+ register int jcol;
+ register int kcol; /* end column of a relaxed snode */
+ register int icol;
+ register int i, k, jj, new_next, iinfo;
+ int m, n, min_mn, jsupno, fsupc, nextlu, nextu;
+ int w_def; /* upper bound on panel width */
+ int usepr, iperm_r_allocated = 0;
+ int nnzL, nnzU;
+ int *panel_histo = stat->panel_histo;
+ flops_t *ops = stat->ops;
+
+ iinfo = 0;
+ m = A->nrow;
+ n = A->ncol;
+ min_mn = SUPERLU_MIN(m, n);
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+
+ /* Allocate storage common to the factor routines */
+ *info = cLUMemInit(fact, work, lwork, m, n, Astore->nnz,
+ panel_size, L, U, &Glu, &iwork, &cwork);
+ if ( *info ) return;
+
+ xsup = Glu.xsup;
+ supno = Glu.supno;
+ xlsub = Glu.xlsub;
+ xlusup = Glu.xlusup;
+ xusub = Glu.xusub;
+
+ SetIWork(m, n, panel_size, iwork, &segrep, &parent, &xplore,
+ &repfnz, &panel_lsub, &xprune, &marker);
+ cSetRWork(m, panel_size, cwork, &dense, &tempv);
+
+ usepr = (fact == SamePattern_SameRowPerm);
+ if ( usepr ) {
+ /* Compute the inverse of perm_r */
+ iperm_r = (int *) intMalloc(m);
+ for (k = 0; k < m; ++k) iperm_r[perm_r[k]] = k;
+ iperm_r_allocated = 1;
+ }
+ iperm_c = (int *) intMalloc(n);
+ for (k = 0; k < n; ++k) iperm_c[perm_c[k]] = k;
+
+ /* Identify relaxed snodes */
+ relax_end = (int *) intMalloc(n);
+ if ( options->SymmetricMode == YES ) {
+ heap_relax_snode(n, etree, relax, marker, relax_end);
+ } else {
+ relax_snode(n, etree, relax, marker, relax_end);
+ }
+
+ ifill (perm_r, m, EMPTY);
+ ifill (marker, m * NO_MARKER, EMPTY);
+ supno[0] = -1;
+ xsup[0] = xlsub[0] = xusub[0] = xlusup[0] = 0;
+ w_def = panel_size;
+
+ /*
+ * Work on one "panel" at a time. A panel is one of the following:
+ * (a) a relaxed supernode at the bottom of the etree, or
+ * (b) panel_size contiguous columns, defined by the user
+ */
+ for (jcol = 0; jcol < min_mn; ) {
+
+ if ( relax_end[jcol] != EMPTY ) { /* start of a relaxed snode */
+ kcol = relax_end[jcol]; /* end of the relaxed snode */
+ panel_histo[kcol-jcol+1]++;
+
+ /* --------------------------------------
+ * Factorize the relaxed supernode(jcol:kcol)
+ * -------------------------------------- */
+ /* Determine the union of the row structure of the snode */
+ if ( (*info = csnode_dfs(jcol, kcol, asub, xa_begin, xa_end,
+ xprune, marker, &Glu)) != 0 )
+ return;
+
+ nextu = xusub[jcol];
+ nextlu = xlusup[jcol];
+ jsupno = supno[jcol];
+ fsupc = xsup[jsupno];
+ new_next = nextlu + (xlsub[fsupc+1]-xlsub[fsupc])*(kcol-jcol+1);
+ nzlumax = Glu.nzlumax;
+ while ( new_next > nzlumax ) {
+ if ( (*info = cLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, &Glu)) )
+ return;
+ }
+
+ for (icol = jcol; icol<= kcol; icol++) {
+ xusub[icol+1] = nextu;
+
+ /* Scatter into SPA dense[*] */
+ for (k = xa_begin[icol]; k < xa_end[icol]; k++)
+ dense[asub[k]] = a[k];
+
+ /* Numeric update within the snode */
+ csnode_bmod(icol, jsupno, fsupc, dense, tempv, &Glu, stat);
+
+ if ( (*info = cpivotL(icol, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+#ifdef DEBUG
+ cprint_lu_col("[1]: ", icol, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol = icol;
+
+ } else { /* Work on one panel of panel_size columns */
+
+ /* Adjust panel_size so that a panel won't overlap with the next
+ * relaxed snode.
+ */
+ panel_size = w_def;
+ for (k = jcol + 1; k < SUPERLU_MIN(jcol+panel_size, min_mn); k++)
+ if ( relax_end[k] != EMPTY ) {
+ panel_size = k - jcol;
+ break;
+ }
+ if ( k == min_mn ) panel_size = min_mn - jcol;
+ panel_histo[panel_size]++;
+
+ /* symbolic factor on a panel of columns */
+ cpanel_dfs(m, panel_size, jcol, A, perm_r, &nseg1,
+ dense, panel_lsub, segrep, repfnz, xprune,
+ marker, parent, xplore, &Glu);
+
+ /* numeric sup-panel updates in topological order */
+ cpanel_bmod(m, panel_size, jcol, nseg1, dense,
+ tempv, segrep, repfnz, &Glu, stat);
+
+ /* Sparse LU within the panel, and below panel diagonal */
+ for ( jj = jcol; jj < jcol + panel_size; jj++) {
+ k = (jj - jcol) * m; /* column index for w-wide arrays */
+
+ nseg = nseg1; /* Begin after all the panel segments */
+
+ if ((*info = ccolumn_dfs(m, jj, perm_r, &nseg, &panel_lsub[k],
+ segrep, &repfnz[k], xprune, marker,
+ parent, xplore, &Glu)) != 0) return;
+
+ /* Numeric updates */
+ if ((*info = ccolumn_bmod(jj, (nseg - nseg1), &dense[k],
+ tempv, &segrep[nseg1], &repfnz[k],
+ jcol, &Glu, stat)) != 0) return;
+
+ /* Copy the U-segments to ucol[*] */
+ if ((*info = ccopy_to_ucol(jj, nseg, segrep, &repfnz[k],
+ perm_r, &dense[k], &Glu)) != 0)
+ return;
+
+ if ( (*info = cpivotL(jj, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+ /* Prune columns (0:jj-1) using column jj */
+ cpruneL(jj, perm_r, pivrow, nseg, segrep,
+ &repfnz[k], xprune, &Glu);
+
+ /* Reset repfnz[] for this column */
+ resetrep_col (nseg, segrep, &repfnz[k]);
+
+#ifdef DEBUG
+ cprint_lu_col("[2]: ", jj, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol += panel_size; /* Move to the next panel */
+
+ } /* else */
+
+ } /* for */
+
+ *info = iinfo;
+
+ if ( m > n ) {
+ k = 0;
+ for (i = 0; i < m; ++i)
+ if ( perm_r[i] == EMPTY ) {
+ perm_r[i] = n + k;
+ ++k;
+ }
+ }
+
+ countnz(min_mn, xprune, &nnzL, &nnzU, &Glu);
+ fixupL(min_mn, perm_r, &Glu);
+
+ cLUWorkFree(iwork, cwork, &Glu); /* Free work space and compress storage */
+
+ if ( fact == SamePattern_SameRowPerm ) {
+ /* L and U structures may have changed due to possibly different
+ pivoting, even though the storage is available.
+ There could also be memory expansions, so the array locations
+ may have changed, */
+ ((SCformat *)L->Store)->nnz = nnzL;
+ ((SCformat *)L->Store)->nsuper = Glu.supno[n];
+ ((SCformat *)L->Store)->nzval = Glu.lusup;
+ ((SCformat *)L->Store)->nzval_colptr = Glu.xlusup;
+ ((SCformat *)L->Store)->rowind = Glu.lsub;
+ ((SCformat *)L->Store)->rowind_colptr = Glu.xlsub;
+ ((NCformat *)U->Store)->nnz = nnzU;
+ ((NCformat *)U->Store)->nzval = Glu.ucol;
+ ((NCformat *)U->Store)->rowind = Glu.usub;
+ ((NCformat *)U->Store)->colptr = Glu.xusub;
+ } else {
+ cCreate_SuperNode_Matrix(L, A->nrow, min_mn, nnzL, Glu.lusup,
+ Glu.xlusup, Glu.lsub, Glu.xlsub, Glu.supno,
+ Glu.xsup, SLU_SC, SLU_C, SLU_TRLU);
+ cCreate_CompCol_Matrix(U, min_mn, min_mn, nnzU, Glu.ucol,
+ Glu.usub, Glu.xusub, SLU_NC, SLU_C, SLU_TRU);
+ }
+
+ ops[FACT] += ops[TRSV] + ops[GEMV];
+
+ if ( iperm_r_allocated ) SUPERLU_FREE (iperm_r);
+ SUPERLU_FREE (iperm_c);
+ SUPERLU_FREE (relax_end);
+
+}
diff --git a/SRC/cgstrs.c b/SRC/cgstrs.c
new file mode 100644
index 0000000..dd3b1a1
--- /dev/null
+++ b/SRC/cgstrs.c
@@ -0,0 +1,345 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void cusolve(int, int, complex*, complex*);
+void clsolve(int, int, complex*, complex*);
+void cmatvec(int, int, int, complex*, complex*, complex*);
+
+
+void
+cgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * CGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * cgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * cgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ complex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ complex *work_col;
+#endif
+ complex temp_comp;
+ DNformat *Bstore;
+ complex *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ complex *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ complex *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void cprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_C || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_C || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_C || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("cgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = complexCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = complexMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 8 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ cc_mult(&temp_comp, &rhs_work[fsupc], &Lval[luptr]);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ CGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ ctrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ cgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &work_col[i]);
+ work_col[i].r = 0.0;
+ work_col[i].i = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ clsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ cmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &work[i]);
+ work[i].r = 0.;
+ work[i].i = 0.;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ cprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ c_div(&rhs_work[fsupc], &rhs_work[fsupc], &Lval[luptr]);
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ ctrsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ cusolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ cc_mult(&temp_comp, &rhs_work[jcol], &Uval[i]);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ cprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B or CONJ(A)*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+ if (trans == TRANS) {
+ for (k = 0; k < nrhs; ++k) {
+ /* Multiply by inv(U'). */
+ sp_ctrsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_ctrsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+ }
+ } else { /* trans == CONJ */
+ for (k = 0; k < nrhs; ++k) {
+ /* Multiply by conj(inv(U')). */
+ sp_ctrsv("U", "C", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by conj(inv(L')). */
+ sp_ctrsv("L", "C", "U", L, U, &Bmat[k*ldb], stat, info);
+ }
+ }
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+cprint_soln(int n, int nrhs, complex *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/cgstrs.c.bak b/SRC/cgstrs.c.bak
new file mode 100644
index 0000000..e609d3c
--- /dev/null
+++ b/SRC/cgstrs.c.bak
@@ -0,0 +1,339 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void cusolve(int, int, complex*, complex*);
+void clsolve(int, int, complex*, complex*);
+void cmatvec(int, int, int, complex*, complex*, complex*);
+
+
+void
+cgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * CGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * cgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * cgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ complex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ complex *work_col;
+#endif
+ complex temp_comp;
+ DNformat *Bstore;
+ complex *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ complex *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ complex *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void cprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_C || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_C || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_C || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("cgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = complexCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = complexMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 8 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ cc_mult(&temp_comp, &rhs_work[fsupc], &Lval[luptr]);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ CGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ ctrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ cgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &work_col[i]);
+ work_col[i].r = 0.0;
+ work_col[i].i = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ clsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ cmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &work[i]);
+ work[i].r = 0.;
+ work[i].i = 0.;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ cprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ c_div(&rhs_work[fsupc], &rhs_work[fsupc], &Lval[luptr]);
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ ctrsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ cusolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ cc_mult(&temp_comp, &rhs_work[jcol], &Uval[i]);
+ c_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ cprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+
+ for (k = 0; k < nrhs; ++k) {
+
+ /* Multiply by inv(U'). */
+ sp_ctrsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_ctrsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+
+ }
+
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+cprint_soln(int n, int nrhs, complex *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/clacon.c b/SRC/clacon.c
new file mode 100644
index 0000000..ada4b61
--- /dev/null
+++ b/SRC/clacon.c
@@ -0,0 +1,214 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "Cnames.h"
+#include "scomplex.h"
+
+int
+clacon_(int *n, complex *v, complex *x, float *est, int *kase)
+
+{
+/*
+ Purpose
+ =======
+
+ CLACON estimates the 1-norm of a square matrix A.
+ Reverse communication is used for evaluating matrix-vector products.
+
+
+ Arguments
+ =========
+
+ N (input) INT
+ The order of the matrix. N >= 1.
+
+ V (workspace) COMPLEX PRECISION array, dimension (N)
+ On the final return, V = A*W, where EST = norm(V)/norm(W)
+ (W is not returned).
+
+ X (input/output) COMPLEX PRECISION array, dimension (N)
+ On an intermediate return, X should be overwritten by
+ A * X, if KASE=1,
+ A' * X, if KASE=2,
+ where A' is the conjugate transpose of A,
+ and CLACON must be re-called with all the other parameters
+ unchanged.
+
+
+ EST (output) FLOAT PRECISION
+ An estimate (a lower bound) for norm(A).
+
+ KASE (input/output) INT
+ On the initial call to CLACON, KASE should be 0.
+ On an intermediate return, KASE will be 1 or 2, indicating
+ whether X should be overwritten by A * X or A' * X.
+ On the final return from CLACON, KASE will again be 0.
+
+ Further Details
+ ======= =======
+
+ Contributed by Nick Higham, University of Manchester.
+ Originally named CONEST, dated March 16, 1988.
+
+ Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+ a real or complex matrix, with applications to condition estimation",
+ ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+ complex zero = {0.0, 0.0};
+ complex one = {1.0, 0.0};
+
+ /* System generated locals */
+ float d__1;
+
+ /* Local variables */
+ static int iter;
+ static int jump, jlast;
+ static float altsgn, estold;
+ static int i, j;
+ float temp;
+ float safmin;
+ extern double slamch_(char *);
+ extern int icmax1_(int *, complex *, int *);
+ extern double scsum1_(int *, complex *, int *);
+
+ safmin = slamch_("Safe minimum");
+ if ( *kase == 0 ) {
+ for (i = 0; i < *n; ++i) {
+ x[i].r = 1. / (float) (*n);
+ x[i].i = 0.;
+ }
+ *kase = 1;
+ jump = 1;
+ return 0;
+ }
+
+ switch (jump) {
+ case 1: goto L20;
+ case 2: goto L40;
+ case 3: goto L70;
+ case 4: goto L110;
+ case 5: goto L140;
+ }
+
+ /* ................ ENTRY (JUMP = 1)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. */
+ L20:
+ if (*n == 1) {
+ v[0] = x[0];
+ *est = c_abs(&v[0]);
+ /* ... QUIT */
+ goto L150;
+ }
+ *est = scsum1_(n, x, &c__1);
+
+ for (i = 0; i < *n; ++i) {
+ d__1 = c_abs(&x[i]);
+ if (d__1 > safmin) {
+ d__1 = 1 / d__1;
+ x[i].r *= d__1;
+ x[i].i *= d__1;
+ } else {
+ x[i] = one;
+ }
+ }
+ *kase = 2;
+ jump = 2;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 2)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. */
+L40:
+ j = icmax1_(n, &x[0], &c__1);
+ --j;
+ iter = 2;
+
+ /* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. */
+L50:
+ for (i = 0; i < *n; ++i) x[i] = zero;
+ x[j] = one;
+ *kase = 1;
+ jump = 3;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 3)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L70:
+#ifdef _CRAY
+ CCOPY(n, x, &c__1, v, &c__1);
+#else
+ ccopy_(n, x, &c__1, v, &c__1);
+#endif
+ estold = *est;
+ *est = scsum1_(n, v, &c__1);
+
+
+L90:
+ /* TEST FOR CYCLING. */
+ if (*est <= estold) goto L120;
+
+ for (i = 0; i < *n; ++i) {
+ d__1 = c_abs(&x[i]);
+ if (d__1 > safmin) {
+ d__1 = 1 / d__1;
+ x[i].r *= d__1;
+ x[i].i *= d__1;
+ } else {
+ x[i] = one;
+ }
+ }
+ *kase = 2;
+ jump = 4;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 4)
+ X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. */
+L110:
+ jlast = j;
+ j = icmax1_(n, &x[0], &c__1);
+ --j;
+ if (x[jlast].r != (d__1 = x[j].r, fabs(d__1)) && iter < 5) {
+ ++iter;
+ goto L50;
+ }
+
+ /* ITERATION COMPLETE. FINAL STAGE. */
+L120:
+ altsgn = 1.;
+ for (i = 1; i <= *n; ++i) {
+ x[i-1].r = altsgn * ((float)(i - 1) / (float)(*n - 1) + 1.);
+ x[i-1].i = 0.;
+ altsgn = -altsgn;
+ }
+ *kase = 1;
+ jump = 5;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 5)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L140:
+ temp = scsum1_(n, x, &c__1) / (float)(*n * 3) * 2.;
+ if (temp > *est) {
+#ifdef _CRAY
+ CCOPY(n, &x[0], &c__1, &v[0], &c__1);
+#else
+ ccopy_(n, &x[0], &c__1, &v[0], &c__1);
+#endif
+ *est = temp;
+ }
+
+L150:
+ *kase = 0;
+ return 0;
+
+} /* clacon_ */
diff --git a/SRC/clangs.c b/SRC/clangs.c
new file mode 100644
index 0000000..612bf52
--- /dev/null
+++ b/SRC/clangs.c
@@ -0,0 +1,112 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: clangs.c
+ * History: Modified from lapack routine CLANGE
+ */
+#include <math.h>
+#include "csp_defs.h"
+#include "util.h"
+
+float clangs(char *norm, SuperMatrix *A)
+{
+/*
+ Purpose
+ =======
+
+ CLANGS returns the value of the one norm, or the Frobenius norm, or
+ the infinity norm, or the element of largest absolute value of a
+ real matrix A.
+
+ Description
+ ===========
+
+ CLANGE returns the value
+
+ CLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+ (
+ ( norm1(A), NORM = '1', 'O' or 'o'
+ (
+ ( normI(A), NORM = 'I' or 'i'
+ (
+ ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+
+ where norm1 denotes the one norm of a matrix (maximum column sum),
+ normI denotes the infinity norm of a matrix (maximum row sum) and
+ normF denotes the Frobenius norm of a matrix (square root of sum of
+ squares). Note that max(abs(A(i,j))) is not a matrix norm.
+
+ Arguments
+ =========
+
+ NORM (input) CHARACTER*1
+ Specifies the value to be returned in CLANGE as described above.
+ A (input) SuperMatrix*
+ The M by N sparse matrix A.
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ complex *Aval;
+ int i, j, irow;
+ float value, sum;
+ float *rwork;
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ if ( SUPERLU_MIN(A->nrow, A->ncol) == 0) {
+ value = 0.;
+
+ } else if (lsame_(norm, "M")) {
+ /* Find max(abs(A(i,j))). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ value = SUPERLU_MAX( value, c_abs( &Aval[i]) );
+
+ } else if (lsame_(norm, "O") || *(unsigned char *)norm == '1') {
+ /* Find norm1(A). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ sum = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ sum += c_abs( &Aval[i] );
+ value = SUPERLU_MAX(value,sum);
+ }
+
+ } else if (lsame_(norm, "I")) {
+ /* Find normI(A). */
+ if ( !(rwork = (float *) SUPERLU_MALLOC(A->nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for rwork.");
+ for (i = 0; i < A->nrow; ++i) rwork[i] = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) {
+ irow = Astore->rowind[i];
+ rwork[irow] += c_abs( &Aval[i] );
+ }
+ value = 0.;
+ for (i = 0; i < A->nrow; ++i)
+ value = SUPERLU_MAX(value, rwork[i]);
+
+ SUPERLU_FREE (rwork);
+
+ } else if (lsame_(norm, "F") || lsame_(norm, "E")) {
+ /* Find normF(A). */
+ ABORT("Not implemented.");
+ } else
+ ABORT("Illegal norm specified.");
+
+ return (value);
+
+} /* clangs */
+
diff --git a/SRC/claqgs.c b/SRC/claqgs.c
new file mode 100644
index 0000000..9347a03
--- /dev/null
+++ b/SRC/claqgs.c
@@ -0,0 +1,140 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: claqgs.c
+ * History: Modified from LAPACK routine CLAQGE
+ */
+#include <math.h>
+#include "csp_defs.h"
+#include "util.h"
+
+void
+claqgs(SuperMatrix *A, float *r, float *c,
+ float rowcnd, float colcnd, float amax, char *equed)
+{
+/*
+ Purpose
+ =======
+
+ CLAQGS equilibrates a general sparse M by N matrix A using the row and
+ scaling factors in the vectors R and C.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input/output) SuperMatrix*
+ On exit, the equilibrated matrix. See EQUED for the form of
+ the equilibrated matrix. The type of A can be:
+ Stype = NC; Dtype = SLU_C; Mtype = GE.
+
+ R (input) float*, dimension (A->nrow)
+ The row scale factors for A.
+
+ C (input) float*, dimension (A->ncol)
+ The column scale factors for A.
+
+ ROWCND (input) float
+ Ratio of the smallest R(i) to the largest R(i).
+
+ COLCND (input) float
+ Ratio of the smallest C(i) to the largest C(i).
+
+ AMAX (input) float
+ Absolute value of largest matrix entry.
+
+ EQUED (output) char*
+ Specifies the form of equilibration that was done.
+ = 'N': No equilibration
+ = 'R': Row equilibration, i.e., A has been premultiplied by
+ diag(R).
+ = 'C': Column equilibration, i.e., A has been postmultiplied
+ by diag(C).
+ = 'B': Both row and column equilibration, i.e., A has been
+ replaced by diag(R) * A * diag(C).
+
+ Internal Parameters
+ ===================
+
+ THRESH is a threshold value used to decide if row or column scaling
+ should be done based on the ratio of the row or column scaling
+ factors. If ROWCND < THRESH, row scaling is done, and if
+ COLCND < THRESH, column scaling is done.
+
+ LARGE and SMALL are threshold values used to decide if row scaling
+ should be done based on the absolute size of the largest matrix
+ element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+
+ =====================================================================
+*/
+
+#define THRESH (0.1)
+
+ /* Local variables */
+ NCformat *Astore;
+ complex *Aval;
+ int i, j, irow;
+ float large, small, cj;
+ extern double slamch_(char *);
+ float temp;
+
+
+ /* Quick return if possible */
+ if (A->nrow <= 0 || A->ncol <= 0) {
+ *(unsigned char *)equed = 'N';
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Initialize LARGE and SMALL. */
+ small = slamch_("Safe minimum") / slamch_("Precision");
+ large = 1. / small;
+
+ if (rowcnd >= THRESH && amax >= small && amax <= large) {
+ if (colcnd >= THRESH)
+ *(unsigned char *)equed = 'N';
+ else {
+ /* Column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ cs_mult(&Aval[i], &Aval[i], cj);
+ }
+ }
+ *(unsigned char *)equed = 'C';
+ }
+ } else if (colcnd >= THRESH) {
+ /* Row scaling, no column scaling */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ cs_mult(&Aval[i], &Aval[i], r[irow]);
+ }
+ *(unsigned char *)equed = 'R';
+ } else {
+ /* Row and column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ temp = cj * r[irow];
+ cs_mult(&Aval[i], &Aval[i], temp);
+ }
+ }
+ *(unsigned char *)equed = 'B';
+ }
+
+ return;
+
+} /* claqgs */
+
diff --git a/SRC/cmemory.c b/SRC/cmemory.c
new file mode 100644
index 0000000..04185e7
--- /dev/null
+++ b/SRC/cmemory.c
@@ -0,0 +1,676 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+/* Constants */
+#define NO_MEMTYPE 4 /* 0: lusup;
+ 1: ucol;
+ 2: lsub;
+ 3: usub */
+#define GluIntArray(n) (5 * (n) + 5)
+
+/* Internal prototypes */
+void *cexpand (int *, MemType,int, int, GlobalLU_t *);
+int cLUWorkInit (int, int, int, int **, complex **, LU_space_t);
+void copy_mem_complex (int, void *, void *);
+void cStackCompress (GlobalLU_t *);
+void cSetupSpace (void *, int, LU_space_t *);
+void *cuser_malloc (int, int);
+void cuser_free (int, int);
+
+/* External prototypes (in memory.c - prec-indep) */
+extern void copy_mem_int (int, void *, void *);
+extern void user_bcopy (char *, char *, int);
+
+/* Headers for 4 types of dynamatically managed memory */
+typedef struct e_node {
+ int size; /* length of the memory that has been used */
+ void *mem; /* pointer to the new malloc'd store */
+} ExpHeader;
+
+typedef struct {
+ int size;
+ int used;
+ int top1; /* grow upward, relative to &array[0] */
+ int top2; /* grow downward */
+ void *array;
+} LU_stack_t;
+
+/* Variables local to this file */
+static ExpHeader *expanders = 0; /* Array of pointers to 4 types of memory */
+static LU_stack_t stack;
+static int no_expand;
+
+/* Macros to manipulate stack */
+#define StackFull(x) ( x + stack.used >= stack.size )
+#define NotDoubleAlign(addr) ( (long int)addr & 7 )
+#define DoubleAlign(addr) ( ((long int)addr + 7) & ~7L )
+#define TempSpace(m, w) ( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \
+ (w + 1) * m * sizeof(complex) )
+#define Reduce(alpha) ((alpha + 1) / 2) /* i.e. (alpha-1)/2 + 1 */
+
+
+
+
+/*
+ * Setup the memory model to be used for factorization.
+ * lwork = 0: use system malloc;
+ * lwork > 0: use user-supplied work[] space.
+ */
+void cSetupSpace(void *work, int lwork, LU_space_t *MemModel)
+{
+ if ( lwork == 0 ) {
+ *MemModel = SYSTEM; /* malloc/free */
+ } else if ( lwork > 0 ) {
+ *MemModel = USER; /* user provided space */
+ stack.used = 0;
+ stack.top1 = 0;
+ stack.top2 = (lwork/4)*4; /* must be word addressable */
+ stack.size = stack.top2;
+ stack.array = (void *) work;
+ }
+}
+
+
+
+void *cuser_malloc(int bytes, int which_end)
+{
+ void *buf;
+
+ if ( StackFull(bytes) ) return (NULL);
+
+ if ( which_end == HEAD ) {
+ buf = (char*) stack.array + stack.top1;
+ stack.top1 += bytes;
+ } else {
+ stack.top2 -= bytes;
+ buf = (char*) stack.array + stack.top2;
+ }
+
+ stack.used += bytes;
+ return buf;
+}
+
+
+void cuser_free(int bytes, int which_end)
+{
+ if ( which_end == HEAD ) {
+ stack.top1 -= bytes;
+ } else {
+ stack.top2 += bytes;
+ }
+ stack.used -= bytes;
+}
+
+
+
+/*
+ * mem_usage consists of the following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for the L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * Number of memory expansions during the LU factorization.
+ */
+int cQuerySpace(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ register int n, iword, dword, panel_size = sp_ienv(1);
+
+ Lstore = L->Store;
+ Ustore = U->Store;
+ n = L->ncol;
+ iword = sizeof(int);
+ dword = sizeof(complex);
+
+ /* For LU factors */
+ mem_usage->for_lu = (float)( (4*n + 3) * iword + Lstore->nzval_colptr[n] *
+ dword + Lstore->rowind_colptr[n] * iword );
+ mem_usage->for_lu += (float)( (n + 1) * iword +
+ Ustore->colptr[n] * (dword + iword) );
+
+ /* Working storage to support factorization */
+ mem_usage->total_needed = mem_usage->for_lu +
+ (float)( (2 * panel_size + 4 + NO_MARKER) * n * iword +
+ (panel_size + 1) * n * dword );
+
+ mem_usage->expansions = --no_expand;
+
+ return 0;
+} /* cQuerySpace */
+
+/*
+ * Allocate storage for the data structures common to all factor routines.
+ * For those unpredictable size, make a guess as FILL * nnz(A).
+ * Return value:
+ * If lwork = -1, return the estimated amount of space required, plus n;
+ * otherwise, return the amount of space actually allocated when
+ * memory allocation failure occurred.
+ */
+int
+cLUMemInit(fact_t fact, void *work, int lwork, int m, int n, int annz,
+ int panel_size, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu,
+ int **iwork, complex **dwork)
+{
+ int info, iword, dword;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ complex *lusup;
+ int *xlusup;
+ complex *ucol;
+ int *usub, *xusub;
+ int nzlmax, nzumax, nzlumax;
+ int FILL = sp_ienv(6);
+
+ Glu->n = n;
+ no_expand = 0;
+ iword = sizeof(int);
+ dword = sizeof(complex);
+
+ if ( !expanders )
+ expanders = (ExpHeader*)SUPERLU_MALLOC(NO_MEMTYPE * sizeof(ExpHeader));
+ if ( !expanders ) ABORT("SUPERLU_MALLOC fails for expanders");
+
+ if ( fact != SamePattern_SameRowPerm ) {
+ /* Guess for L\U factors */
+ nzumax = nzlumax = FILL * annz;
+ nzlmax = SUPERLU_MAX(1, FILL/4.) * annz;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else {
+ cSetupSpace(work, lwork, &Glu->MemModel);
+ }
+
+#ifdef DEBUG
+ printf("cLUMemInit() called: annz %d, MemModel %d\n",
+ annz, Glu->MemModel);
+#endif
+
+ /* Integer pointers for L\U factors */
+ if ( Glu->MemModel == SYSTEM ) {
+ xsup = intMalloc(n+1);
+ supno = intMalloc(n+1);
+ xlsub = intMalloc(n+1);
+ xlusup = intMalloc(n+1);
+ xusub = intMalloc(n+1);
+ } else {
+ xsup = (int *)cuser_malloc((n+1) * iword, HEAD);
+ supno = (int *)cuser_malloc((n+1) * iword, HEAD);
+ xlsub = (int *)cuser_malloc((n+1) * iword, HEAD);
+ xlusup = (int *)cuser_malloc((n+1) * iword, HEAD);
+ xusub = (int *)cuser_malloc((n+1) * iword, HEAD);
+ }
+
+ lusup = (complex *) cexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (complex *) cexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) cexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) cexpand( &nzumax, USUB, 0, 1, Glu );
+
+ while ( !lusup || !ucol || !lsub || !usub ) {
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE(lusup);
+ SUPERLU_FREE(ucol);
+ SUPERLU_FREE(lsub);
+ SUPERLU_FREE(usub);
+ } else {
+ cuser_free((nzlumax+nzumax)*dword+(nzlmax+nzumax)*iword, HEAD);
+ }
+ nzlumax /= 2;
+ nzumax /= 2;
+ nzlmax /= 2;
+ if ( nzlumax < annz ) {
+ printf("Not enough memory to perform factorization.\n");
+ return (cmemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+ }
+ lusup = (complex *) cexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (complex *) cexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) cexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) cexpand( &nzumax, USUB, 0, 1, Glu );
+ }
+
+ } else {
+ /* fact == SamePattern_SameRowPerm */
+ Lstore = L->Store;
+ Ustore = U->Store;
+ xsup = Lstore->sup_to_col;
+ supno = Lstore->col_to_sup;
+ xlsub = Lstore->rowind_colptr;
+ xlusup = Lstore->nzval_colptr;
+ xusub = Ustore->colptr;
+ nzlmax = Glu->nzlmax; /* max from previous factorization */
+ nzumax = Glu->nzumax;
+ nzlumax = Glu->nzlumax;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else if ( lwork == 0 ) {
+ Glu->MemModel = SYSTEM;
+ } else {
+ Glu->MemModel = USER;
+ stack.top2 = (lwork/4)*4; /* must be word-addressable */
+ stack.size = stack.top2;
+ }
+
+ lsub = expanders[LSUB].mem = Lstore->rowind;
+ lusup = expanders[LUSUP].mem = Lstore->nzval;
+ usub = expanders[USUB].mem = Ustore->rowind;
+ ucol = expanders[UCOL].mem = Ustore->nzval;;
+ expanders[LSUB].size = nzlmax;
+ expanders[LUSUP].size = nzlumax;
+ expanders[USUB].size = nzumax;
+ expanders[UCOL].size = nzumax;
+ }
+
+ Glu->xsup = xsup;
+ Glu->supno = supno;
+ Glu->lsub = lsub;
+ Glu->xlsub = xlsub;
+ Glu->lusup = lusup;
+ Glu->xlusup = xlusup;
+ Glu->ucol = ucol;
+ Glu->usub = usub;
+ Glu->xusub = xusub;
+ Glu->nzlmax = nzlmax;
+ Glu->nzumax = nzumax;
+ Glu->nzlumax = nzlumax;
+
+ info = cLUWorkInit(m, n, panel_size, iwork, dwork, Glu->MemModel);
+ if ( info )
+ return ( info + cmemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+
+ ++no_expand;
+ return 0;
+
+} /* cLUMemInit */
+
+/* Allocate known working storage. Returns 0 if success, otherwise
+ returns the number of bytes allocated so far when failure occurred. */
+int
+cLUWorkInit(int m, int n, int panel_size, int **iworkptr,
+ complex **dworkptr, LU_space_t MemModel)
+{
+ int isize, dsize, extra;
+ complex *old_ptr;
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+
+ isize = ( (2 * panel_size + 3 + NO_MARKER ) * m + n ) * sizeof(int);
+ dsize = (m * panel_size +
+ NUM_TEMPV(m,panel_size,maxsuper,rowblk)) * sizeof(complex);
+
+ if ( MemModel == SYSTEM )
+ *iworkptr = (int *) intCalloc(isize/sizeof(int));
+ else
+ *iworkptr = (int *) cuser_malloc(isize, TAIL);
+ if ( ! *iworkptr ) {
+ fprintf(stderr, "cLUWorkInit: malloc fails for local iworkptr[]\n");
+ return (isize + n);
+ }
+
+ if ( MemModel == SYSTEM )
+ *dworkptr = (complex *) SUPERLU_MALLOC(dsize);
+ else {
+ *dworkptr = (complex *) cuser_malloc(dsize, TAIL);
+ if ( NotDoubleAlign(*dworkptr) ) {
+ old_ptr = *dworkptr;
+ *dworkptr = (complex*) DoubleAlign(*dworkptr);
+ *dworkptr = (complex*) ((double*)*dworkptr - 1);
+ extra = (char*)old_ptr - (char*)*dworkptr;
+#ifdef DEBUG
+ printf("cLUWorkInit: not aligned, extra %d\n", extra);
+#endif
+ stack.top2 -= extra;
+ stack.used += extra;
+ }
+ }
+ if ( ! *dworkptr ) {
+ fprintf(stderr, "malloc fails for local dworkptr[].");
+ return (isize + dsize + n);
+ }
+
+ return 0;
+}
+
+
+/*
+ * Set up pointers for real working arrays.
+ */
+void
+cSetRWork(int m, int panel_size, complex *dworkptr,
+ complex **dense, complex **tempv)
+{
+ complex zero = {0.0, 0.0};
+
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+ *dense = dworkptr;
+ *tempv = *dense + panel_size*m;
+ cfill (*dense, m * panel_size, zero);
+ cfill (*tempv, NUM_TEMPV(m,panel_size,maxsuper,rowblk), zero);
+}
+
+/*
+ * Free the working storage used by factor routines.
+ */
+void cLUWorkFree(int *iwork, complex *dwork, GlobalLU_t *Glu)
+{
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE (iwork);
+ SUPERLU_FREE (dwork);
+ } else {
+ stack.used -= (stack.size - stack.top2);
+ stack.top2 = stack.size;
+/* cStackCompress(Glu); */
+ }
+
+ SUPERLU_FREE (expanders);
+ expanders = 0;
+}
+
+/* Expand the data structures for L and U during the factorization.
+ * Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+cLUMemXpand(int jcol,
+ int next, /* number of elements currently in the factors */
+ MemType mem_type, /* which type of memory to expand */
+ int *maxlen, /* modified - maximum length of a data structure */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ void *new_mem;
+
+#ifdef DEBUG
+ printf("cLUMemXpand(): jcol %d, next %d, maxlen %d, MemType %d\n",
+ jcol, next, *maxlen, mem_type);
+#endif
+
+ if (mem_type == USUB)
+ new_mem = cexpand(maxlen, mem_type, next, 1, Glu);
+ else
+ new_mem = cexpand(maxlen, mem_type, next, 0, Glu);
+
+ if ( !new_mem ) {
+ int nzlmax = Glu->nzlmax;
+ int nzumax = Glu->nzumax;
+ int nzlumax = Glu->nzlumax;
+ fprintf(stderr, "Can't expand MemType %d: jcol %d\n", mem_type, jcol);
+ return (cmemory_usage(nzlmax, nzumax, nzlumax, Glu->n) + Glu->n);
+ }
+
+ switch ( mem_type ) {
+ case LUSUP:
+ Glu->lusup = (complex *) new_mem;
+ Glu->nzlumax = *maxlen;
+ break;
+ case UCOL:
+ Glu->ucol = (complex *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ case LSUB:
+ Glu->lsub = (int *) new_mem;
+ Glu->nzlmax = *maxlen;
+ break;
+ case USUB:
+ Glu->usub = (int *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ }
+
+ return 0;
+
+}
+
+
+
+void
+copy_mem_complex(int howmany, void *old, void *new)
+{
+ register int i;
+ complex *dold = old;
+ complex *dnew = new;
+ for (i = 0; i < howmany; i++) dnew[i] = dold[i];
+}
+
+/*
+ * Expand the existing storage to accommodate more fill-ins.
+ */
+void
+*cexpand (
+ int *prev_len, /* length used from previous call */
+ MemType type, /* which part of the memory to expand */
+ int len_to_copy, /* size of the memory to be copied to new store */
+ int keep_prev, /* = 1: use prev_len;
+ = 0: compute new_len to expand */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ float EXPAND = 1.5;
+ float alpha;
+ void *new_mem, *old_mem;
+ int new_len, tries, lword, extra, bytes_to_copy;
+
+ alpha = EXPAND;
+
+ if ( no_expand == 0 || keep_prev ) /* First time allocate requested */
+ new_len = *prev_len;
+ else {
+ new_len = alpha * *prev_len;
+ }
+
+ if ( type == LSUB || type == USUB ) lword = sizeof(int);
+ else lword = sizeof(complex);
+
+ if ( Glu->MemModel == SYSTEM ) {
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ if ( no_expand != 0 ) {
+ tries = 0;
+ if ( keep_prev ) {
+ if ( !new_mem ) return (NULL);
+ } else {
+ while ( !new_mem ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ }
+ }
+ if ( type == LSUB || type == USUB ) {
+ copy_mem_int(len_to_copy, expanders[type].mem, new_mem);
+ } else {
+ copy_mem_complex(len_to_copy, expanders[type].mem, new_mem);
+ }
+ SUPERLU_FREE (expanders[type].mem);
+ }
+ expanders[type].mem = (void *) new_mem;
+
+ } else { /* MemModel == USER */
+ if ( no_expand == 0 ) {
+ new_mem = cuser_malloc(new_len * lword, HEAD);
+ if ( NotDoubleAlign(new_mem) &&
+ (type == LUSUP || type == UCOL) ) {
+ old_mem = new_mem;
+ new_mem = (void *)DoubleAlign(new_mem);
+ extra = (char*)new_mem - (char*)old_mem;
+#ifdef DEBUG
+ printf("expand(): not aligned, extra %d\n", extra);
+#endif
+ stack.top1 += extra;
+ stack.used += extra;
+ }
+ expanders[type].mem = (void *) new_mem;
+ }
+ else {
+ tries = 0;
+ extra = (new_len - *prev_len) * lword;
+ if ( keep_prev ) {
+ if ( StackFull(extra) ) return (NULL);
+ } else {
+ while ( StackFull(extra) ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ extra = (new_len - *prev_len) * lword;
+ }
+ }
+
+ if ( type != USUB ) {
+ new_mem = (void*)((char*)expanders[type + 1].mem + extra);
+ bytes_to_copy = (char*)stack.array + stack.top1
+ - (char*)expanders[type + 1].mem;
+ user_bcopy(expanders[type+1].mem, new_mem, bytes_to_copy);
+
+ if ( type < USUB ) {
+ Glu->usub = expanders[USUB].mem =
+ (void*)((char*)expanders[USUB].mem + extra);
+ }
+ if ( type < LSUB ) {
+ Glu->lsub = expanders[LSUB].mem =
+ (void*)((char*)expanders[LSUB].mem + extra);
+ }
+ if ( type < UCOL ) {
+ Glu->ucol = expanders[UCOL].mem =
+ (void*)((char*)expanders[UCOL].mem + extra);
+ }
+ stack.top1 += extra;
+ stack.used += extra;
+ if ( type == UCOL ) {
+ stack.top1 += extra; /* Add same amount for USUB */
+ stack.used += extra;
+ }
+
+ } /* if ... */
+
+ } /* else ... */
+ }
+
+ expanders[type].size = new_len;
+ *prev_len = new_len;
+ if ( no_expand ) ++no_expand;
+
+ return (void *) expanders[type].mem;
+
+} /* cexpand */
+
+
+/*
+ * Compress the work[] array to remove fragmentation.
+ */
+void
+cStackCompress(GlobalLU_t *Glu)
+{
+ register int iword, dword, ndim;
+ char *last, *fragment;
+ int *ifrom, *ito;
+ complex *dfrom, *dto;
+ int *xlsub, *lsub, *xusub, *usub, *xlusup;
+ complex *ucol, *lusup;
+
+ iword = sizeof(int);
+ dword = sizeof(complex);
+ ndim = Glu->n;
+
+ xlsub = Glu->xlsub;
+ lsub = Glu->lsub;
+ xusub = Glu->xusub;
+ usub = Glu->usub;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ lusup = Glu->lusup;
+
+ dfrom = ucol;
+ dto = (complex *)((char*)lusup + xlusup[ndim] * dword);
+ copy_mem_complex(xusub[ndim], dfrom, dto);
+ ucol = dto;
+
+ ifrom = lsub;
+ ito = (int *) ((char*)ucol + xusub[ndim] * iword);
+ copy_mem_int(xlsub[ndim], ifrom, ito);
+ lsub = ito;
+
+ ifrom = usub;
+ ito = (int *) ((char*)lsub + xlsub[ndim] * iword);
+ copy_mem_int(xusub[ndim], ifrom, ito);
+ usub = ito;
+
+ last = (char*)usub + xusub[ndim] * iword;
+ fragment = (char*) (((char*)stack.array + stack.top1) - last);
+ stack.used -= (long int) fragment;
+ stack.top1 -= (long int) fragment;
+
+ Glu->ucol = ucol;
+ Glu->lsub = lsub;
+ Glu->usub = usub;
+
+#ifdef DEBUG
+ printf("cStackCompress: fragment %d\n", fragment);
+ /* for (last = 0; last < ndim; ++last)
+ print_lu_col("After compress:", last, 0);*/
+#endif
+
+}
+
+/*
+ * Allocate storage for original matrix A
+ */
+void
+callocateA(int n, int nnz, complex **a, int **asub, int **xa)
+{
+ *a = (complex *) complexMalloc(nnz);
+ *asub = (int *) intMalloc(nnz);
+ *xa = (int *) intMalloc(n+1);
+}
+
+
+complex *complexMalloc(int n)
+{
+ complex *buf;
+ buf = (complex *) SUPERLU_MALLOC(n * sizeof(complex));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in complexMalloc()\n");
+ }
+ return (buf);
+}
+
+complex *complexCalloc(int n)
+{
+ complex *buf;
+ register int i;
+ complex zero = {0.0, 0.0};
+ buf = (complex *) SUPERLU_MALLOC(n * sizeof(complex));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in complexCalloc()\n");
+ }
+ for (i = 0; i < n; ++i) buf[i] = zero;
+ return (buf);
+}
+
+
+int cmemory_usage(const int nzlmax, const int nzumax,
+ const int nzlumax, const int n)
+{
+ register int iword, dword;
+
+ iword = sizeof(int);
+ dword = sizeof(complex);
+
+ return (10 * n * iword +
+ nzlmax * iword + nzumax * (iword + dword) + nzlumax * dword);
+
+}
diff --git a/SRC/cmyblas2.c b/SRC/cmyblas2.c
new file mode 100644
index 0000000..74fdbca
--- /dev/null
+++ b/SRC/cmyblas2.c
@@ -0,0 +1,183 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: cmyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+#include "scomplex.h"
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void clsolve ( int ldm, int ncol, complex *M, complex *rhs )
+{
+ int k;
+ complex x0, x1, x2, x3, temp;
+ complex *M0;
+ complex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x1, &rhs[firstcol+1], &temp);
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x2, &rhs[firstcol+2], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&x2, &x2, &temp);
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x3, &rhs[firstcol+3], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&x3, &x3, &temp);
+ cc_mult(&temp, &x2, Mki2); Mki2++;
+ c_sub(&x3, &x3, &temp);
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x2, Mki2); Mki2++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x3, Mki3); Mki3++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ }
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&x1, &rhs[firstcol+1], &temp);
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ cc_mult(&temp, &x0, Mki0); Mki0++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ cc_mult(&temp, &x1, Mki1); Mki1++;
+ c_sub(&rhs[k], &rhs[k], &temp);
+ }
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+cusolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+complex *M; /* in */
+complex *rhs; /* modified */
+{
+ complex xj, temp;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ c_div(&xj, &rhs[jcol], &M[jcol + jcol*ldm]); /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++) {
+ cc_mult(&temp, &xj, &M[irow+jcol*ldm]); /* M(irow, jcol) */
+ c_sub(&rhs[irow], &rhs[irow], &temp);
+ }
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void cmatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+complex *M; /* in */
+complex *vec; /* in */
+complex *Mxvec; /* in/out */
+{
+ complex vi0, vi1, vi2, vi3;
+ complex *M0, temp;
+ complex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ cc_mult(&temp, &vi0, Mki0); Mki0++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ cc_mult(&temp, &vi1, Mki1); Mki1++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ cc_mult(&temp, &vi2, Mki2); Mki2++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ cc_mult(&temp, &vi3, Mki3); Mki3++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ cc_mult(&temp, &vi0, Mki0); Mki0++;
+ c_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+ M0 += ldm;
+ }
+
+}
+
diff --git a/SRC/colamd.c b/SRC/colamd.c
new file mode 100644
index 0000000..b60718f
--- /dev/null
+++ b/SRC/colamd.c
@@ -0,0 +1,2583 @@
+/* ========================================================================== */
+/* === colamd - a sparse matrix column ordering algorithm =================== */
+/* ========================================================================== */
+
+/*
+ colamd: An approximate minimum degree column ordering algorithm.
+
+ Purpose:
+
+ Colamd computes a permutation Q such that the Cholesky factorization of
+ (AQ)'(AQ) has less fill-in and requires fewer floating point operations
+ than A'A. This also provides a good ordering for sparse partial
+ pivoting methods, P(AQ) = LU, where Q is computed prior to numerical
+ factorization, and P is computed during numerical factorization via
+ conventional partial pivoting with row interchanges. Colamd is the
+ column ordering method used in SuperLU, part of the ScaLAPACK library.
+ It is also available as user-contributed software for Matlab 5.2,
+ available from MathWorks, Inc. (http://www.mathworks.com). This
+ routine can be used in place of COLMMD in Matlab. By default, the \
+ and / operators in Matlab perform a column ordering (using COLMMD)
+ prior to LU factorization using sparse partial pivoting, in the
+ built-in Matlab LU(A) routine.
+
+ Authors:
+
+ The authors of the code itself are Stefan I. Larimore and Timothy A.
+ Davis (davis at cise.ufl.edu), University of Florida. The algorithm was
+ developed in collaboration with John Gilbert, Xerox PARC, and Esmond
+ Ng, Oak Ridge National Laboratory.
+
+ Date:
+
+ August 3, 1998. Version 1.0.
+
+ Acknowledgements:
+
+ This work was supported by the National Science Foundation, under
+ grants DMS-9504974 and DMS-9803599.
+
+ Notice:
+
+ Copyright (c) 1998 by the University of Florida. All Rights Reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ User documentation of any code that uses this code must cite the
+ Authors, the Copyright, and "Used by permission." If this code is
+ accessible from within Matlab, then typing "help colamd" or "colamd"
+ (with no arguments) must cite the Authors. Permission to modify the
+ code and to distribute modified code is granted, provided the above
+ notices are retained, and a notice that the code was modified is
+ included with the above copyright notice. You must also retain the
+ Availability information below, of the original version.
+
+ This software is provided free of charge.
+
+ Availability:
+
+ This file is located at
+
+ http://www.cise.ufl.edu/~davis/colamd/colamd.c
+
+ The colamd.h file is required, located in the same directory.
+ The colamdmex.c file provides a Matlab interface for colamd.
+ The symamdmex.c file provides a Matlab interface for symamd, which is
+ a symmetric ordering based on this code, colamd.c. All codes are
+ purely ANSI C compliant (they use no Unix-specific routines, include
+ files, etc.).
+*/
+
+/* ========================================================================== */
+/* === Description of user-callable routines ================================ */
+/* ========================================================================== */
+
+/*
+ Each user-callable routine (declared as PUBLIC) is briefly described below.
+ Refer to the comments preceding each routine for more details.
+
+ ----------------------------------------------------------------------------
+ colamd_recommended:
+ ----------------------------------------------------------------------------
+
+ Usage:
+
+ Alen = colamd_recommended (nnz, n_row, n_col) ;
+
+ Purpose:
+
+ Returns recommended value of Alen for use by colamd. Returns -1
+ if any input argument is negative.
+
+ Arguments:
+
+ int nnz ; Number of nonzeros in the matrix A. This must
+ be the same value as p [n_col] in the call to
+ colamd - otherwise you will get a wrong value
+ of the recommended memory to use.
+ int n_row ; Number of rows in the matrix A.
+ int n_col ; Number of columns in the matrix A.
+
+ ----------------------------------------------------------------------------
+ colamd_set_defaults:
+ ----------------------------------------------------------------------------
+
+ Usage:
+
+ colamd_set_defaults (knobs) ;
+
+ Purpose:
+
+ Sets the default parameters.
+
+ Arguments:
+
+ double knobs [COLAMD_KNOBS] ; Output only.
+
+ Rows with more than (knobs [COLAMD_DENSE_ROW] * n_col) entries
+ are removed prior to ordering. Columns with more than
+ (knobs [COLAMD_DENSE_COL] * n_row) entries are removed
+ prior to ordering, and placed last in the output column
+ ordering. Default values of these two knobs are both 0.5.
+ Currently, only knobs [0] and knobs [1] are used, but future
+ versions may use more knobs. If so, they will be properly set
+ to their defaults by the future version of colamd_set_defaults,
+ so that the code that calls colamd will not need to change,
+ assuming that you either use colamd_set_defaults, or pass a
+ (double *) NULL pointer as the knobs array to colamd.
+
+ ----------------------------------------------------------------------------
+ colamd:
+ ----------------------------------------------------------------------------
+
+ Usage:
+
+ colamd (n_row, n_col, Alen, A, p, knobs) ;
+
+ Purpose:
+
+ Computes a column ordering (Q) of A such that P(AQ)=LU or
+ (AQ)'AQ=LL' have less fill-in and require fewer floating point
+ operations than factorizing the unpermuted matrix A or A'A,
+ respectively.
+
+ Arguments:
+
+ int n_row ;
+
+ Number of rows in the matrix A.
+ Restriction: n_row >= 0.
+ Colamd returns FALSE if n_row is negative.
+
+ int n_col ;
+
+ Number of columns in the matrix A.
+ Restriction: n_col >= 0.
+ Colamd returns FALSE if n_col is negative.
+
+ int Alen ;
+
+ Restriction (see note):
+ Alen >= 2*nnz + 6*(n_col+1) + 4*(n_row+1) + n_col + COLAMD_STATS
+ Colamd returns FALSE if these conditions are not met.
+
+ Note: this restriction makes an modest assumption regarding
+ the size of the two typedef'd structures, below. We do,
+ however, guarantee that
+ Alen >= colamd_recommended (nnz, n_row, n_col)
+ will be sufficient.
+
+ int A [Alen] ; Input argument, stats on output.
+
+ A is an integer array of size Alen. Alen must be at least as
+ large as the bare minimum value given above, but this is very
+ low, and can result in excessive run time. For best
+ performance, we recommend that Alen be greater than or equal to
+ colamd_recommended (nnz, n_row, n_col), which adds
+ nnz/5 to the bare minimum value given above.
+
+ On input, the row indices of the entries in column c of the
+ matrix are held in A [(p [c]) ... (p [c+1]-1)]. The row indices
+ in a given column c need not be in ascending order, and
+ duplicate row indices may be be present. However, colamd will
+ work a little faster if both of these conditions are met
+ (Colamd puts the matrix into this format, if it finds that the
+ the conditions are not met).
+
+ The matrix is 0-based. That is, rows are in the range 0 to
+ n_row-1, and columns are in the range 0 to n_col-1. Colamd
+ returns FALSE if any row index is out of range.
+
+ The contents of A are modified during ordering, and are thus
+ undefined on output with the exception of a few statistics
+ about the ordering (A [0..COLAMD_STATS-1]):
+ A [0]: number of dense or empty rows ignored.
+ A [1]: number of dense or empty columns ignored (and ordered
+ last in the output permutation p)
+ A [2]: number of garbage collections performed.
+ A [3]: 0, if all row indices in each column were in sorted
+ order, and no duplicates were present.
+ 1, otherwise (in which case colamd had to do more work)
+ Note that a row can become "empty" if it contains only
+ "dense" and/or "empty" columns, and similarly a column can
+ become "empty" if it only contains "dense" and/or "empty" rows.
+ Future versions may return more statistics in A, but the usage
+ of these 4 entries in A will remain unchanged.
+
+ int p [n_col+1] ; Both input and output argument.
+
+ p is an integer array of size n_col+1. On input, it holds the
+ "pointers" for the column form of the matrix A. Column c of
+ the matrix A is held in A [(p [c]) ... (p [c+1]-1)]. The first
+ entry, p [0], must be zero, and p [c] <= p [c+1] must hold
+ for all c in the range 0 to n_col-1. The value p [n_col] is
+ thus the total number of entries in the pattern of the matrix A.
+ Colamd returns FALSE if these conditions are not met.
+
+ On output, if colamd returns TRUE, the array p holds the column
+ permutation (Q, for P(AQ)=LU or (AQ)'(AQ)=LL'), where p [0] is
+ the first column index in the new ordering, and p [n_col-1] is
+ the last. That is, p [k] = j means that column j of A is the
+ kth pivot column, in AQ, where k is in the range 0 to n_col-1
+ (p [0] = j means that column j of A is the first column in AQ).
+
+ If colamd returns FALSE, then no permutation is returned, and
+ p is undefined on output.
+
+ double knobs [COLAMD_KNOBS] ; Input only.
+
+ See colamd_set_defaults for a description. If the knobs array
+ is not present (that is, if a (double *) NULL pointer is passed
+ in its place), then the default values of the parameters are
+ used instead.
+
+*/
+
+
+/* ========================================================================== */
+/* === Include files ======================================================== */
+/* ========================================================================== */
+
+/* limits.h: the largest positive integer (INT_MAX) */
+#include <limits.h>
+
+/* colamd.h: knob array size, stats output size, and global prototypes */
+#include "colamd.h"
+
+/* ========================================================================== */
+/* === Scaffolding code definitions ======================================== */
+/* ========================================================================== */
+
+/* Ensure that debugging is turned off: */
+#ifndef NDEBUG
+#define NDEBUG
+#endif
+
+/* assert.h: the assert macro (no debugging if NDEBUG is defined) */
+#include <assert.h>
+
+/*
+ Our "scaffolding code" philosophy: In our opinion, well-written library
+ code should keep its "debugging" code, and just normally have it turned off
+ by the compiler so as not to interfere with performance. This serves
+ several purposes:
+
+ (1) assertions act as comments to the reader, telling you what the code
+ expects at that point. All assertions will always be true (unless
+ there really is a bug, of course).
+
+ (2) leaving in the scaffolding code assists anyone who would like to modify
+ the code, or understand the algorithm (by reading the debugging output,
+ one can get a glimpse into what the code is doing).
+
+ (3) (gasp!) for actually finding bugs. This code has been heavily tested
+ and "should" be fully functional and bug-free ... but you never know...
+
+ To enable debugging, comment out the "#define NDEBUG" above. The code will
+ become outrageously slow when debugging is enabled. To control the level of
+ debugging output, set an environment variable D to 0 (little), 1 (some),
+ 2, 3, or 4 (lots).
+*/
+
+/* ========================================================================== */
+/* === Row and Column structures ============================================ */
+/* ========================================================================== */
+
+typedef struct ColInfo_struct
+{
+ int start ; /* index for A of first row in this column, or DEAD */
+ /* if column is dead */
+ int length ; /* number of rows in this column */
+ union
+ {
+ int thickness ; /* number of original columns represented by this */
+ /* col, if the column is alive */
+ int parent ; /* parent in parent tree super-column structure, if */
+ /* the column is dead */
+ } shared1 ;
+ union
+ {
+ int score ; /* the score used to maintain heap, if col is alive */
+ int order ; /* pivot ordering of this column, if col is dead */
+ } shared2 ;
+ union
+ {
+ int headhash ; /* head of a hash bucket, if col is at the head of */
+ /* a degree list */
+ int hash ; /* hash value, if col is not in a degree list */
+ int prev ; /* previous column in degree list, if col is in a */
+ /* degree list (but not at the head of a degree list) */
+ } shared3 ;
+ union
+ {
+ int degree_next ; /* next column, if col is in a degree list */
+ int hash_next ; /* next column, if col is in a hash list */
+ } shared4 ;
+
+} ColInfo ;
+
+typedef struct RowInfo_struct
+{
+ int start ; /* index for A of first col in this row */
+ int length ; /* number of principal columns in this row */
+ union
+ {
+ int degree ; /* number of principal & non-principal columns in row */
+ int p ; /* used as a row pointer in init_rows_cols () */
+ } shared1 ;
+ union
+ {
+ int mark ; /* for computing set differences and marking dead rows*/
+ int first_column ;/* first column in row (used in garbage collection) */
+ } shared2 ;
+
+} RowInfo ;
+
+/* ========================================================================== */
+/* === Definitions ========================================================== */
+/* ========================================================================== */
+
+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+
+#define ONES_COMPLEMENT(r) (-(r)-1)
+
+#define TRUE (1)
+#define FALSE (0)
+#define EMPTY (-1)
+
+/* Row and column status */
+#define ALIVE (0)
+#define DEAD (-1)
+
+/* Column status */
+#define DEAD_PRINCIPAL (-1)
+#define DEAD_NON_PRINCIPAL (-2)
+
+/* Macros for row and column status update and checking. */
+#define ROW_IS_DEAD(r) ROW_IS_MARKED_DEAD (Row[r].shared2.mark)
+#define ROW_IS_MARKED_DEAD(row_mark) (row_mark < ALIVE)
+#define ROW_IS_ALIVE(r) (Row [r].shared2.mark >= ALIVE)
+#define COL_IS_DEAD(c) (Col [c].start < ALIVE)
+#define COL_IS_ALIVE(c) (Col [c].start >= ALIVE)
+#define COL_IS_DEAD_PRINCIPAL(c) (Col [c].start == DEAD_PRINCIPAL)
+#define KILL_ROW(r) { Row [r].shared2.mark = DEAD ; }
+#define KILL_PRINCIPAL_COL(c) { Col [c].start = DEAD_PRINCIPAL ; }
+#define KILL_NON_PRINCIPAL_COL(c) { Col [c].start = DEAD_NON_PRINCIPAL ; }
+
+/* Routines are either PUBLIC (user-callable) or PRIVATE (not user-callable) */
+#define PUBLIC
+#define PRIVATE static
+
+/* ========================================================================== */
+/* === Prototypes of PRIVATE routines ======================================= */
+/* ========================================================================== */
+
+PRIVATE int init_rows_cols
+(
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A [],
+ int p []
+) ;
+
+PRIVATE void init_scoring
+(
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A [],
+ int head [],
+ double knobs [COLAMD_KNOBS],
+ int *p_n_row2,
+ int *p_n_col2,
+ int *p_max_deg
+) ;
+
+PRIVATE int find_ordering
+(
+ int n_row,
+ int n_col,
+ int Alen,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A [],
+ int head [],
+ int n_col2,
+ int max_deg,
+ int pfree
+) ;
+
+PRIVATE void order_children
+(
+ int n_col,
+ ColInfo Col [],
+ int p []
+) ;
+
+PRIVATE void detect_super_cols
+(
+#ifndef NDEBUG
+ int n_col,
+ RowInfo Row [],
+#endif
+ ColInfo Col [],
+ int A [],
+ int head [],
+ int row_start,
+ int row_length
+) ;
+
+PRIVATE int garbage_collection
+(
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A [],
+ int *pfree
+) ;
+
+PRIVATE int clear_mark
+(
+ int n_row,
+ RowInfo Row []
+) ;
+
+/* ========================================================================== */
+/* === Debugging definitions ================================================ */
+/* ========================================================================== */
+
+#ifndef NDEBUG
+
+/* === With debugging ======================================================= */
+
+/* stdlib.h: for getenv and atoi, to get debugging level from environment */
+#include <stdlib.h>
+
+/* stdio.h: for printf (no printing if debugging is turned off) */
+#include <stdio.h>
+
+PRIVATE void debug_deg_lists
+(
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int head [],
+ int min_score,
+ int should,
+ int max_deg
+) ;
+
+PRIVATE void debug_mark
+(
+ int n_row,
+ RowInfo Row [],
+ int tag_mark,
+ int max_mark
+) ;
+
+PRIVATE void debug_matrix
+(
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A []
+) ;
+
+PRIVATE void debug_structures
+(
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A [],
+ int n_col2
+) ;
+
+/* the following is the *ONLY* global variable in this file, and is only */
+/* present when debugging */
+
+PRIVATE int debug_colamd ; /* debug print level */
+
+#define DEBUG0(params) { (void) printf params ; }
+#define DEBUG1(params) { if (debug_colamd >= 1) (void) printf params ; }
+#define DEBUG2(params) { if (debug_colamd >= 2) (void) printf params ; }
+#define DEBUG3(params) { if (debug_colamd >= 3) (void) printf params ; }
+#define DEBUG4(params) { if (debug_colamd >= 4) (void) printf params ; }
+
+#else
+
+/* === No debugging ========================================================= */
+
+#define DEBUG0(params) ;
+#define DEBUG1(params) ;
+#define DEBUG2(params) ;
+#define DEBUG3(params) ;
+#define DEBUG4(params) ;
+
+#endif
+
+/* ========================================================================== */
+
+
+/* ========================================================================== */
+/* === USER-CALLABLE ROUTINES: ============================================== */
+/* ========================================================================== */
+
+
+/* ========================================================================== */
+/* === colamd_recommended =================================================== */
+/* ========================================================================== */
+
+/*
+ The colamd_recommended routine returns the suggested size for Alen. This
+ value has been determined to provide good balance between the number of
+ garbage collections and the memory requirements for colamd.
+*/
+
+PUBLIC int colamd_recommended /* returns recommended value of Alen. */
+(
+ /* === Parameters ======================================================= */
+
+ int nnz, /* number of nonzeros in A */
+ int n_row, /* number of rows in A */
+ int n_col /* number of columns in A */
+)
+{
+ /* === Local variables ================================================== */
+
+ int minimum ; /* bare minimum requirements */
+ int recommended ; /* recommended value of Alen */
+
+ if (nnz < 0 || n_row < 0 || n_col < 0)
+ {
+ /* return -1 if any input argument is corrupted */
+ DEBUG0 (("colamd_recommended error!")) ;
+ DEBUG0 ((" nnz: %d, n_row: %d, n_col: %d\n", nnz, n_row, n_col)) ;
+ return (-1) ;
+ }
+
+ minimum =
+ 2 * (nnz) /* for A */
+ + (((n_col) + 1) * sizeof (ColInfo) / sizeof (int)) /* for Col */
+ + (((n_row) + 1) * sizeof (RowInfo) / sizeof (int)) /* for Row */
+ + n_col /* minimum elbow room to guarrantee success */
+ + COLAMD_STATS ; /* for output statistics */
+
+ /* recommended is equal to the minumum plus enough memory to keep the */
+ /* number garbage collections low */
+ recommended = minimum + nnz/5 ;
+
+ return (recommended) ;
+}
+
+
+/* ========================================================================== */
+/* === colamd_set_defaults ================================================== */
+/* ========================================================================== */
+
+/*
+ The colamd_set_defaults routine sets the default values of the user-
+ controllable parameters for colamd:
+
+ knobs [0] rows with knobs[0]*n_col entries or more are removed
+ prior to ordering.
+
+ knobs [1] columns with knobs[1]*n_row entries or more are removed
+ prior to ordering, and placed last in the column
+ permutation.
+
+ knobs [2..19] unused, but future versions might use this
+*/
+
+PUBLIC void colamd_set_defaults
+(
+ /* === Parameters ======================================================= */
+
+ double knobs [COLAMD_KNOBS] /* knob array */
+)
+{
+ /* === Local variables ================================================== */
+
+ int i ;
+
+ if (!knobs)
+ {
+ return ; /* no knobs to initialize */
+ }
+ for (i = 0 ; i < COLAMD_KNOBS ; i++)
+ {
+ knobs [i] = 0 ;
+ }
+ knobs [COLAMD_DENSE_ROW] = 0.5 ; /* ignore rows over 50% dense */
+ knobs [COLAMD_DENSE_COL] = 0.5 ; /* ignore columns over 50% dense */
+}
+
+
+/* ========================================================================== */
+/* === colamd =============================================================== */
+/* ========================================================================== */
+
+/*
+ The colamd routine computes a column ordering Q of a sparse matrix
+ A such that the LU factorization P(AQ) = LU remains sparse, where P is
+ selected via partial pivoting. The routine can also be viewed as
+ providing a permutation Q such that the Cholesky factorization
+ (AQ)'(AQ) = LL' remains sparse.
+
+ On input, the nonzero patterns of the columns of A are stored in the
+ array A, in order 0 to n_col-1. A is held in 0-based form (rows in the
+ range 0 to n_row-1 and columns in the range 0 to n_col-1). Row indices
+ for column c are located in A [(p [c]) ... (p [c+1]-1)], where p [0] = 0,
+ and thus p [n_col] is the number of entries in A. The matrix is
+ destroyed on output. The row indices within each column do not have to
+ be sorted (from small to large row indices), and duplicate row indices
+ may be present. However, colamd will work a little faster if columns are
+ sorted and no duplicates are present. Matlab 5.2 always passes the matrix
+ with sorted columns, and no duplicates.
+
+ The integer array A is of size Alen. Alen must be at least of size
+ (where nnz is the number of entries in A):
+
+ nnz for the input column form of A
+ + nnz for a row form of A that colamd generates
+ + 6*(n_col+1) for a ColInfo Col [0..n_col] array
+ (this assumes sizeof (ColInfo) is 6 int's).
+ + 4*(n_row+1) for a RowInfo Row [0..n_row] array
+ (this assumes sizeof (RowInfo) is 4 int's).
+ + elbow_room must be at least n_col. We recommend at least
+ nnz/5 in addition to that. If sufficient,
+ changes in the elbow room affect the ordering
+ time only, not the ordering itself.
+ + COLAMD_STATS for the output statistics
+
+ Colamd returns FALSE is memory is insufficient, or TRUE otherwise.
+
+ On input, the caller must specify:
+
+ n_row the number of rows of A
+ n_col the number of columns of A
+ Alen the size of the array A
+ A [0 ... nnz-1] the row indices, where nnz = p [n_col]
+ A [nnz ... Alen-1] (need not be initialized by the user)
+ p [0 ... n_col] the column pointers, p [0] = 0, and p [n_col]
+ is the number of entries in A. Column c of A
+ is stored in A [p [c] ... p [c+1]-1].
+ knobs [0 ... 19] a set of parameters that control the behavior
+ of colamd. If knobs is a NULL pointer the
+ defaults are used. The user-callable
+ colamd_set_defaults routine sets the default
+ parameters. See that routine for a description
+ of the user-controllable parameters.
+
+ If the return value of Colamd is TRUE, then on output:
+
+ p [0 ... n_col-1] the column permutation. p [0] is the first
+ column index, and p [n_col-1] is the last.
+ That is, p [k] = j means that column j of A
+ is the kth column of AQ.
+
+ A is undefined on output (the matrix pattern is
+ destroyed), except for the following statistics:
+
+ A [0] the number of dense (or empty) rows ignored
+ A [1] the number of dense (or empty) columms. These
+ are ordered last, in their natural order.
+ A [2] the number of garbage collections performed.
+ If this is excessive, then you would have
+ gotten your results faster if Alen was larger.
+ A [3] 0, if all row indices in each column were in
+ sorted order and no duplicates were present.
+ 1, if there were unsorted or duplicate row
+ indices in the input. You would have gotten
+ your results faster if A [3] was returned as 0.
+
+ If the return value of Colamd is FALSE, then A and p are undefined on
+ output.
+*/
+
+PUBLIC int colamd /* returns TRUE if successful */
+(
+ /* === Parameters ======================================================= */
+
+ int n_row, /* number of rows in A */
+ int n_col, /* number of columns in A */
+ int Alen, /* length of A */
+ int A [], /* row indices of A */
+ int p [], /* pointers to columns in A */
+ double knobs [COLAMD_KNOBS] /* parameters (uses defaults if NULL) */
+)
+{
+ /* === Local variables ================================================== */
+
+ int i ; /* loop index */
+ int nnz ; /* nonzeros in A */
+ int Row_size ; /* size of Row [], in integers */
+ int Col_size ; /* size of Col [], in integers */
+ int elbow_room ; /* remaining free space */
+ RowInfo *Row ; /* pointer into A of Row [0..n_row] array */
+ ColInfo *Col ; /* pointer into A of Col [0..n_col] array */
+ int n_col2 ; /* number of non-dense, non-empty columns */
+ int n_row2 ; /* number of non-dense, non-empty rows */
+ int ngarbage ; /* number of garbage collections performed */
+ int max_deg ; /* maximum row degree */
+ double default_knobs [COLAMD_KNOBS] ; /* default knobs knobs array */
+ int init_result ; /* return code from initialization */
+
+#ifndef NDEBUG
+ debug_colamd = 0 ; /* no debug printing */
+ /* get "D" environment variable, which gives the debug printing level */
+ if (getenv ("D")) debug_colamd = atoi (getenv ("D")) ;
+ DEBUG0 (("debug version, D = %d (THIS WILL BE SLOOOOW!)\n", debug_colamd)) ;
+#endif
+
+ /* === Check the input arguments ======================================== */
+
+ if (n_row < 0 || n_col < 0 || !A || !p)
+ {
+ /* n_row and n_col must be non-negative, A and p must be present */
+ DEBUG0 (("colamd error! %d %d %d\n", n_row, n_col, Alen)) ;
+ return (FALSE) ;
+ }
+ nnz = p [n_col] ;
+ if (nnz < 0 || p [0] != 0)
+ {
+ /* nnz must be non-negative, and p [0] must be zero */
+ DEBUG0 (("colamd error! %d %d\n", nnz, p [0])) ;
+ return (FALSE) ;
+ }
+
+ /* === If no knobs, set default parameters ============================== */
+
+ if (!knobs)
+ {
+ knobs = default_knobs ;
+ colamd_set_defaults (knobs) ;
+ }
+
+ /* === Allocate the Row and Col arrays from array A ===================== */
+
+ Col_size = (n_col + 1) * sizeof (ColInfo) / sizeof (int) ;
+ Row_size = (n_row + 1) * sizeof (RowInfo) / sizeof (int) ;
+ elbow_room = Alen - (2*nnz + Col_size + Row_size) ;
+ if (elbow_room < n_col + COLAMD_STATS)
+ {
+ /* not enough space in array A to perform the ordering */
+ DEBUG0 (("colamd error! elbow_room %d, %d\n", elbow_room,n_col)) ;
+ return (FALSE) ;
+ }
+ Alen = 2*nnz + elbow_room ;
+ Col = (ColInfo *) &A [Alen] ;
+ Row = (RowInfo *) &A [Alen + Col_size] ;
+
+ /* === Construct the row and column data structures ===================== */
+
+ init_result = init_rows_cols (n_row, n_col, Row, Col, A, p) ;
+ if (init_result == -1)
+ {
+ /* input matrix is invalid */
+ DEBUG0 (("colamd error! matrix invalid\n")) ;
+ return (FALSE) ;
+ }
+
+ /* === Initialize scores, kill dense rows/columns ======================= */
+
+ init_scoring (n_row, n_col, Row, Col, A, p, knobs,
+ &n_row2, &n_col2, &max_deg) ;
+
+ /* === Order the supercolumns =========================================== */
+
+ ngarbage = find_ordering (n_row, n_col, Alen, Row, Col, A, p,
+ n_col2, max_deg, 2*nnz) ;
+
+ /* === Order the non-principal columns ================================== */
+
+ order_children (n_col, Col, p) ;
+
+ /* === Return statistics in A =========================================== */
+
+ for (i = 0 ; i < COLAMD_STATS ; i++)
+ {
+ A [i] = 0 ;
+ }
+ A [COLAMD_DENSE_ROW] = n_row - n_row2 ;
+ A [COLAMD_DENSE_COL] = n_col - n_col2 ;
+ A [COLAMD_DEFRAG_COUNT] = ngarbage ;
+ A [COLAMD_JUMBLED_COLS] = init_result ;
+
+ return (TRUE) ;
+}
+
+
+/* ========================================================================== */
+/* === NON-USER-CALLABLE ROUTINES: ========================================== */
+/* ========================================================================== */
+
+/* There are no user-callable routines beyond this point in the file */
+
+
+/* ========================================================================== */
+/* === init_rows_cols ======================================================= */
+/* ========================================================================== */
+
+/*
+ Takes the column form of the matrix in A and creates the row form of the
+ matrix. Also, row and column attributes are stored in the Col and Row
+ structs. If the columns are un-sorted or contain duplicate row indices,
+ this routine will also sort and remove duplicate row indices from the
+ column form of the matrix. Returns -1 on error, 1 if columns jumbled,
+ or 0 if columns not jumbled. Not user-callable.
+*/
+
+PRIVATE int init_rows_cols /* returns status code */
+(
+ /* === Parameters ======================================================= */
+
+ int n_row, /* number of rows of A */
+ int n_col, /* number of columns of A */
+ RowInfo Row [], /* of size n_row+1 */
+ ColInfo Col [], /* of size n_col+1 */
+ int A [], /* row indices of A, of size Alen */
+ int p [] /* pointers to columns in A, of size n_col+1 */
+)
+{
+ /* === Local variables ================================================== */
+
+ int col ; /* a column index */
+ int row ; /* a row index */
+ int *cp ; /* a column pointer */
+ int *cp_end ; /* a pointer to the end of a column */
+ int *rp ; /* a row pointer */
+ int *rp_end ; /* a pointer to the end of a row */
+ int last_start ; /* start index of previous column in A */
+ int start ; /* start index of column in A */
+ int last_row ; /* previous row */
+ int jumbled_columns ; /* indicates if columns are jumbled */
+
+ /* === Initialize columns, and check column pointers ==================== */
+
+ last_start = 0 ;
+ for (col = 0 ; col < n_col ; col++)
+ {
+ start = p [col] ;
+ if (start < last_start)
+ {
+ /* column pointers must be non-decreasing */
+ DEBUG0 (("colamd error! last p %d p [col] %d\n",last_start,start));
+ return (-1) ;
+ }
+ Col [col].start = start ;
+ Col [col].length = p [col+1] - start ;
+ Col [col].shared1.thickness = 1 ;
+ Col [col].shared2.score = 0 ;
+ Col [col].shared3.prev = EMPTY ;
+ Col [col].shared4.degree_next = EMPTY ;
+ last_start = start ;
+ }
+ /* must check the end pointer for last column */
+ if (p [n_col] < last_start)
+ {
+ /* column pointers must be non-decreasing */
+ DEBUG0 (("colamd error! last p %d p [n_col] %d\n",p[col],last_start)) ;
+ return (-1) ;
+ }
+
+ /* p [0..n_col] no longer needed, used as "head" in subsequent routines */
+
+ /* === Scan columns, compute row degrees, and check row indices ========= */
+
+ jumbled_columns = FALSE ;
+
+ for (row = 0 ; row < n_row ; row++)
+ {
+ Row [row].length = 0 ;
+ Row [row].shared2.mark = -1 ;
+ }
+
+ for (col = 0 ; col < n_col ; col++)
+ {
+ last_row = -1 ;
+
+ cp = &A [p [col]] ;
+ cp_end = &A [p [col+1]] ;
+
+ while (cp < cp_end)
+ {
+ row = *cp++ ;
+
+ /* make sure row indices within range */
+ if (row < 0 || row >= n_row)
+ {
+ DEBUG0 (("colamd error! col %d row %d last_row %d\n",
+ col, row, last_row)) ;
+ return (-1) ;
+ }
+ else if (row <= last_row)
+ {
+ /* row indices are not sorted or repeated, thus cols */
+ /* are jumbled */
+ jumbled_columns = TRUE ;
+ }
+ /* prevent repeated row from being counted */
+ if (Row [row].shared2.mark != col)
+ {
+ Row [row].length++ ;
+ Row [row].shared2.mark = col ;
+ last_row = row ;
+ }
+ else
+ {
+ /* this is a repeated entry in the column, */
+ /* it will be removed */
+ Col [col].length-- ;
+ }
+ }
+ }
+
+ /* === Compute row pointers ============================================= */
+
+ /* row form of the matrix starts directly after the column */
+ /* form of matrix in A */
+ Row [0].start = p [n_col] ;
+ Row [0].shared1.p = Row [0].start ;
+ Row [0].shared2.mark = -1 ;
+ for (row = 1 ; row < n_row ; row++)
+ {
+ Row [row].start = Row [row-1].start + Row [row-1].length ;
+ Row [row].shared1.p = Row [row].start ;
+ Row [row].shared2.mark = -1 ;
+ }
+
+ /* === Create row form ================================================== */
+
+ if (jumbled_columns)
+ {
+ /* if cols jumbled, watch for repeated row indices */
+ for (col = 0 ; col < n_col ; col++)
+ {
+ cp = &A [p [col]] ;
+ cp_end = &A [p [col+1]] ;
+ while (cp < cp_end)
+ {
+ row = *cp++ ;
+ if (Row [row].shared2.mark != col)
+ {
+ A [(Row [row].shared1.p)++] = col ;
+ Row [row].shared2.mark = col ;
+ }
+ }
+ }
+ }
+ else
+ {
+ /* if cols not jumbled, we don't need the mark (this is faster) */
+ for (col = 0 ; col < n_col ; col++)
+ {
+ cp = &A [p [col]] ;
+ cp_end = &A [p [col+1]] ;
+ while (cp < cp_end)
+ {
+ A [(Row [*cp++].shared1.p)++] = col ;
+ }
+ }
+ }
+
+ /* === Clear the row marks and set row degrees ========================== */
+
+ for (row = 0 ; row < n_row ; row++)
+ {
+ Row [row].shared2.mark = 0 ;
+ Row [row].shared1.degree = Row [row].length ;
+ }
+
+ /* === See if we need to re-create columns ============================== */
+
+ if (jumbled_columns)
+ {
+
+#ifndef NDEBUG
+ /* make sure column lengths are correct */
+ for (col = 0 ; col < n_col ; col++)
+ {
+ p [col] = Col [col].length ;
+ }
+ for (row = 0 ; row < n_row ; row++)
+ {
+ rp = &A [Row [row].start] ;
+ rp_end = rp + Row [row].length ;
+ while (rp < rp_end)
+ {
+ p [*rp++]-- ;
+ }
+ }
+ for (col = 0 ; col < n_col ; col++)
+ {
+ assert (p [col] == 0) ;
+ }
+ /* now p is all zero (different than when debugging is turned off) */
+#endif
+
+ /* === Compute col pointers ========================================= */
+
+ /* col form of the matrix starts at A [0]. */
+ /* Note, we may have a gap between the col form and the row */
+ /* form if there were duplicate entries, if so, it will be */
+ /* removed upon the first garbage collection */
+ Col [0].start = 0 ;
+ p [0] = Col [0].start ;
+ for (col = 1 ; col < n_col ; col++)
+ {
+ /* note that the lengths here are for pruned columns, i.e. */
+ /* no duplicate row indices will exist for these columns */
+ Col [col].start = Col [col-1].start + Col [col-1].length ;
+ p [col] = Col [col].start ;
+ }
+
+ /* === Re-create col form =========================================== */
+
+ for (row = 0 ; row < n_row ; row++)
+ {
+ rp = &A [Row [row].start] ;
+ rp_end = rp + Row [row].length ;
+ while (rp < rp_end)
+ {
+ A [(p [*rp++])++] = row ;
+ }
+ }
+ return (1) ;
+ }
+ else
+ {
+ /* no columns jumbled (this is faster) */
+ return (0) ;
+ }
+}
+
+
+/* ========================================================================== */
+/* === init_scoring ========================================================= */
+/* ========================================================================== */
+
+/*
+ Kills dense or empty columns and rows, calculates an initial score for
+ each column, and places all columns in the degree lists. Not user-callable.
+*/
+
+PRIVATE void init_scoring
+(
+ /* === Parameters ======================================================= */
+
+ int n_row, /* number of rows of A */
+ int n_col, /* number of columns of A */
+ RowInfo Row [], /* of size n_row+1 */
+ ColInfo Col [], /* of size n_col+1 */
+ int A [], /* column form and row form of A */
+ int head [], /* of size n_col+1 */
+ double knobs [COLAMD_KNOBS],/* parameters */
+ int *p_n_row2, /* number of non-dense, non-empty rows */
+ int *p_n_col2, /* number of non-dense, non-empty columns */
+ int *p_max_deg /* maximum row degree */
+)
+{
+ /* === Local variables ================================================== */
+
+ int c ; /* a column index */
+ int r, row ; /* a row index */
+ int *cp ; /* a column pointer */
+ int deg ; /* degree (# entries) of a row or column */
+ int *cp_end ; /* a pointer to the end of a column */
+ int *new_cp ; /* new column pointer */
+ int col_length ; /* length of pruned column */
+ int score ; /* current column score */
+ int n_col2 ; /* number of non-dense, non-empty columns */
+ int n_row2 ; /* number of non-dense, non-empty rows */
+ int dense_row_count ; /* remove rows with more entries than this */
+ int dense_col_count ; /* remove cols with more entries than this */
+ int min_score ; /* smallest column score */
+ int max_deg ; /* maximum row degree */
+ int next_col ; /* Used to add to degree list.*/
+#ifndef NDEBUG
+ int debug_count ; /* debug only. */
+#endif
+
+ /* === Extract knobs ==================================================== */
+
+ dense_row_count = MAX (0, MIN (knobs [COLAMD_DENSE_ROW] * n_col, n_col)) ;
+ dense_col_count = MAX (0, MIN (knobs [COLAMD_DENSE_COL] * n_row, n_row)) ;
+ DEBUG0 (("densecount: %d %d\n", dense_row_count, dense_col_count)) ;
+ max_deg = 0 ;
+ n_col2 = n_col ;
+ n_row2 = n_row ;
+
+ /* === Kill empty columns =============================================== */
+
+ /* Put the empty columns at the end in their natural, so that LU */
+ /* factorization can proceed as far as possible. */
+ for (c = n_col-1 ; c >= 0 ; c--)
+ {
+ deg = Col [c].length ;
+ if (deg == 0)
+ {
+ /* this is a empty column, kill and order it last */
+ Col [c].shared2.order = --n_col2 ;
+ KILL_PRINCIPAL_COL (c) ;
+ }
+ }
+ DEBUG0 (("null columns killed: %d\n", n_col - n_col2)) ;
+
+ /* === Kill dense columns =============================================== */
+
+ /* Put the dense columns at the end, in their natural order */
+ for (c = n_col-1 ; c >= 0 ; c--)
+ {
+ /* skip any dead columns */
+ if (COL_IS_DEAD (c))
+ {
+ continue ;
+ }
+ deg = Col [c].length ;
+ if (deg > dense_col_count)
+ {
+ /* this is a dense column, kill and order it last */
+ Col [c].shared2.order = --n_col2 ;
+ /* decrement the row degrees */
+ cp = &A [Col [c].start] ;
+ cp_end = cp + Col [c].length ;
+ while (cp < cp_end)
+ {
+ Row [*cp++].shared1.degree-- ;
+ }
+ KILL_PRINCIPAL_COL (c) ;
+ }
+ }
+ DEBUG0 (("Dense and null columns killed: %d\n", n_col - n_col2)) ;
+
+ /* === Kill dense and empty rows ======================================== */
+
+ for (r = 0 ; r < n_row ; r++)
+ {
+ deg = Row [r].shared1.degree ;
+ assert (deg >= 0 && deg <= n_col) ;
+ if (deg > dense_row_count || deg == 0)
+ {
+ /* kill a dense or empty row */
+ KILL_ROW (r) ;
+ --n_row2 ;
+ }
+ else
+ {
+ /* keep track of max degree of remaining rows */
+ max_deg = MAX (max_deg, deg) ;
+ }
+ }
+ DEBUG0 (("Dense and null rows killed: %d\n", n_row - n_row2)) ;
+
+ /* === Compute initial column scores ==================================== */
+
+ /* At this point the row degrees are accurate. They reflect the number */
+ /* of "live" (non-dense) columns in each row. No empty rows exist. */
+ /* Some "live" columns may contain only dead rows, however. These are */
+ /* pruned in the code below. */
+
+ /* now find the initial matlab score for each column */
+ for (c = n_col-1 ; c >= 0 ; c--)
+ {
+ /* skip dead column */
+ if (COL_IS_DEAD (c))
+ {
+ continue ;
+ }
+ score = 0 ;
+ cp = &A [Col [c].start] ;
+ new_cp = cp ;
+ cp_end = cp + Col [c].length ;
+ while (cp < cp_end)
+ {
+ /* get a row */
+ row = *cp++ ;
+ /* skip if dead */
+ if (ROW_IS_DEAD (row))
+ {
+ continue ;
+ }
+ /* compact the column */
+ *new_cp++ = row ;
+ /* add row's external degree */
+ score += Row [row].shared1.degree - 1 ;
+ /* guard against integer overflow */
+ score = MIN (score, n_col) ;
+ }
+ /* determine pruned column length */
+ col_length = (int) (new_cp - &A [Col [c].start]) ;
+ if (col_length == 0)
+ {
+ /* a newly-made null column (all rows in this col are "dense" */
+ /* and have already been killed) */
+ DEBUG0 (("Newly null killed: %d\n", c)) ;
+ Col [c].shared2.order = --n_col2 ;
+ KILL_PRINCIPAL_COL (c) ;
+ }
+ else
+ {
+ /* set column length and set score */
+ assert (score >= 0) ;
+ assert (score <= n_col) ;
+ Col [c].length = col_length ;
+ Col [c].shared2.score = score ;
+ }
+ }
+ DEBUG0 (("Dense, null, and newly-null columns killed: %d\n",n_col-n_col2)) ;
+
+ /* At this point, all empty rows and columns are dead. All live columns */
+ /* are "clean" (containing no dead rows) and simplicial (no supercolumns */
+ /* yet). Rows may contain dead columns, but all live rows contain at */
+ /* least one live column. */
+
+#ifndef NDEBUG
+ debug_structures (n_row, n_col, Row, Col, A, n_col2) ;
+#endif
+
+ /* === Initialize degree lists ========================================== */
+
+#ifndef NDEBUG
+ debug_count = 0 ;
+#endif
+
+ /* clear the hash buckets */
+ for (c = 0 ; c <= n_col ; c++)
+ {
+ head [c] = EMPTY ;
+ }
+ min_score = n_col ;
+ /* place in reverse order, so low column indices are at the front */
+ /* of the lists. This is to encourage natural tie-breaking */
+ for (c = n_col-1 ; c >= 0 ; c--)
+ {
+ /* only add principal columns to degree lists */
+ if (COL_IS_ALIVE (c))
+ {
+ DEBUG4 (("place %d score %d minscore %d ncol %d\n",
+ c, Col [c].shared2.score, min_score, n_col)) ;
+
+ /* === Add columns score to DList =============================== */
+
+ score = Col [c].shared2.score ;
+
+ assert (min_score >= 0) ;
+ assert (min_score <= n_col) ;
+ assert (score >= 0) ;
+ assert (score <= n_col) ;
+ assert (head [score] >= EMPTY) ;
+
+ /* now add this column to dList at proper score location */
+ next_col = head [score] ;
+ Col [c].shared3.prev = EMPTY ;
+ Col [c].shared4.degree_next = next_col ;
+
+ /* if there already was a column with the same score, set its */
+ /* previous pointer to this new column */
+ if (next_col != EMPTY)
+ {
+ Col [next_col].shared3.prev = c ;
+ }
+ head [score] = c ;
+
+ /* see if this score is less than current min */
+ min_score = MIN (min_score, score) ;
+
+#ifndef NDEBUG
+ debug_count++ ;
+#endif
+ }
+ }
+
+#ifndef NDEBUG
+ DEBUG0 (("Live cols %d out of %d, non-princ: %d\n",
+ debug_count, n_col, n_col-debug_count)) ;
+ assert (debug_count == n_col2) ;
+ debug_deg_lists (n_row, n_col, Row, Col, head, min_score, n_col2, max_deg) ;
+#endif
+
+ /* === Return number of remaining columns, and max row degree =========== */
+
+ *p_n_col2 = n_col2 ;
+ *p_n_row2 = n_row2 ;
+ *p_max_deg = max_deg ;
+}
+
+
+/* ========================================================================== */
+/* === find_ordering ======================================================== */
+/* ========================================================================== */
+
+/*
+ Order the principal columns of the supercolumn form of the matrix
+ (no supercolumns on input). Uses a minimum approximate column minimum
+ degree ordering method. Not user-callable.
+*/
+
+PRIVATE int find_ordering /* return the number of garbage collections */
+(
+ /* === Parameters ======================================================= */
+
+ int n_row, /* number of rows of A */
+ int n_col, /* number of columns of A */
+ int Alen, /* size of A, 2*nnz + elbow_room or larger */
+ RowInfo Row [], /* of size n_row+1 */
+ ColInfo Col [], /* of size n_col+1 */
+ int A [], /* column form and row form of A */
+ int head [], /* of size n_col+1 */
+ int n_col2, /* Remaining columns to order */
+ int max_deg, /* Maximum row degree */
+ int pfree /* index of first free slot (2*nnz on entry) */
+)
+{
+ /* === Local variables ================================================== */
+
+ int k ; /* current pivot ordering step */
+ int pivot_col ; /* current pivot column */
+ int *cp ; /* a column pointer */
+ int *rp ; /* a row pointer */
+ int pivot_row ; /* current pivot row */
+ int *new_cp ; /* modified column pointer */
+ int *new_rp ; /* modified row pointer */
+ int pivot_row_start ; /* pointer to start of pivot row */
+ int pivot_row_degree ; /* # of columns in pivot row */
+ int pivot_row_length ; /* # of supercolumns in pivot row */
+ int pivot_col_score ; /* score of pivot column */
+ int needed_memory ; /* free space needed for pivot row */
+ int *cp_end ; /* pointer to the end of a column */
+ int *rp_end ; /* pointer to the end of a row */
+ int row ; /* a row index */
+ int col ; /* a column index */
+ int max_score ; /* maximum possible score */
+ int cur_score ; /* score of current column */
+ unsigned int hash ; /* hash value for supernode detection */
+ int head_column ; /* head of hash bucket */
+ int first_col ; /* first column in hash bucket */
+ int tag_mark ; /* marker value for mark array */
+ int row_mark ; /* Row [row].shared2.mark */
+ int set_difference ; /* set difference size of row with pivot row */
+ int min_score ; /* smallest column score */
+ int col_thickness ; /* "thickness" (# of columns in a supercol) */
+ int max_mark ; /* maximum value of tag_mark */
+ int pivot_col_thickness ; /* number of columns represented by pivot col */
+ int prev_col ; /* Used by Dlist operations. */
+ int next_col ; /* Used by Dlist operations. */
+ int ngarbage ; /* number of garbage collections performed */
+#ifndef NDEBUG
+ int debug_d ; /* debug loop counter */
+ int debug_step = 0 ; /* debug loop counter */
+#endif
+
+ /* === Initialization and clear mark ==================================== */
+
+ max_mark = INT_MAX - n_col ; /* INT_MAX defined in <limits.h> */
+ tag_mark = clear_mark (n_row, Row) ;
+ min_score = 0 ;
+ ngarbage = 0 ;
+ DEBUG0 (("Ordering.. n_col2=%d\n", n_col2)) ;
+
+ /* === Order the columns ================================================ */
+
+ for (k = 0 ; k < n_col2 ; /* 'k' is incremented below */)
+ {
+
+#ifndef NDEBUG
+ if (debug_step % 100 == 0)
+ {
+ DEBUG0 (("\n... Step k: %d out of n_col2: %d\n", k, n_col2)) ;
+ }
+ else
+ {
+ DEBUG1 (("\n----------Step k: %d out of n_col2: %d\n", k, n_col2)) ;
+ }
+ debug_step++ ;
+ debug_deg_lists (n_row, n_col, Row, Col, head,
+ min_score, n_col2-k, max_deg) ;
+ debug_matrix (n_row, n_col, Row, Col, A) ;
+#endif
+
+ /* === Select pivot column, and order it ============================ */
+
+ /* make sure degree list isn't empty */
+ assert (min_score >= 0) ;
+ assert (min_score <= n_col) ;
+ assert (head [min_score] >= EMPTY) ;
+
+#ifndef NDEBUG
+ for (debug_d = 0 ; debug_d < min_score ; debug_d++)
+ {
+ assert (head [debug_d] == EMPTY) ;
+ }
+#endif
+
+ /* get pivot column from head of minimum degree list */
+ while (head [min_score] == EMPTY && min_score < n_col)
+ {
+ min_score++ ;
+ }
+ pivot_col = head [min_score] ;
+ assert (pivot_col >= 0 && pivot_col <= n_col) ;
+ next_col = Col [pivot_col].shared4.degree_next ;
+ head [min_score] = next_col ;
+ if (next_col != EMPTY)
+ {
+ Col [next_col].shared3.prev = EMPTY ;
+ }
+
+ assert (COL_IS_ALIVE (pivot_col)) ;
+ DEBUG3 (("Pivot col: %d\n", pivot_col)) ;
+
+ /* remember score for defrag check */
+ pivot_col_score = Col [pivot_col].shared2.score ;
+
+ /* the pivot column is the kth column in the pivot order */
+ Col [pivot_col].shared2.order = k ;
+
+ /* increment order count by column thickness */
+ pivot_col_thickness = Col [pivot_col].shared1.thickness ;
+ k += pivot_col_thickness ;
+ assert (pivot_col_thickness > 0) ;
+
+ /* === Garbage_collection, if necessary ============================= */
+
+ needed_memory = MIN (pivot_col_score, n_col - k) ;
+ if (pfree + needed_memory >= Alen)
+ {
+ pfree = garbage_collection (n_row, n_col, Row, Col, A, &A [pfree]) ;
+ ngarbage++ ;
+ /* after garbage collection we will have enough */
+ assert (pfree + needed_memory < Alen) ;
+ /* garbage collection has wiped out the Row[].shared2.mark array */
+ tag_mark = clear_mark (n_row, Row) ;
+#ifndef NDEBUG
+ debug_matrix (n_row, n_col, Row, Col, A) ;
+#endif
+ }
+
+ /* === Compute pivot row pattern ==================================== */
+
+ /* get starting location for this new merged row */
+ pivot_row_start = pfree ;
+
+ /* initialize new row counts to zero */
+ pivot_row_degree = 0 ;
+
+ /* tag pivot column as having been visited so it isn't included */
+ /* in merged pivot row */
+ Col [pivot_col].shared1.thickness = -pivot_col_thickness ;
+
+ /* pivot row is the union of all rows in the pivot column pattern */
+ cp = &A [Col [pivot_col].start] ;
+ cp_end = cp + Col [pivot_col].length ;
+ while (cp < cp_end)
+ {
+ /* get a row */
+ row = *cp++ ;
+ DEBUG4 (("Pivot col pattern %d %d\n", ROW_IS_ALIVE (row), row)) ;
+ /* skip if row is dead */
+ if (ROW_IS_DEAD (row))
+ {
+ continue ;
+ }
+ rp = &A [Row [row].start] ;
+ rp_end = rp + Row [row].length ;
+ while (rp < rp_end)
+ {
+ /* get a column */
+ col = *rp++ ;
+ /* add the column, if alive and untagged */
+ col_thickness = Col [col].shared1.thickness ;
+ if (col_thickness > 0 && COL_IS_ALIVE (col))
+ {
+ /* tag column in pivot row */
+ Col [col].shared1.thickness = -col_thickness ;
+ assert (pfree < Alen) ;
+ /* place column in pivot row */
+ A [pfree++] = col ;
+ pivot_row_degree += col_thickness ;
+ }
+ }
+ }
+
+ /* clear tag on pivot column */
+ Col [pivot_col].shared1.thickness = pivot_col_thickness ;
+ max_deg = MAX (max_deg, pivot_row_degree) ;
+
+#ifndef NDEBUG
+ DEBUG3 (("check2\n")) ;
+ debug_mark (n_row, Row, tag_mark, max_mark) ;
+#endif
+
+ /* === Kill all rows used to construct pivot row ==================== */
+
+ /* also kill pivot row, temporarily */
+ cp = &A [Col [pivot_col].start] ;
+ cp_end = cp + Col [pivot_col].length ;
+ while (cp < cp_end)
+ {
+ /* may be killing an already dead row */
+ row = *cp++ ;
+ DEBUG2 (("Kill row in pivot col: %d\n", row)) ;
+ KILL_ROW (row) ;
+ }
+
+ /* === Select a row index to use as the new pivot row =============== */
+
+ pivot_row_length = pfree - pivot_row_start ;
+ if (pivot_row_length > 0)
+ {
+ /* pick the "pivot" row arbitrarily (first row in col) */
+ pivot_row = A [Col [pivot_col].start] ;
+ DEBUG2 (("Pivotal row is %d\n", pivot_row)) ;
+ }
+ else
+ {
+ /* there is no pivot row, since it is of zero length */
+ pivot_row = EMPTY ;
+ assert (pivot_row_length == 0) ;
+ }
+ assert (Col [pivot_col].length > 0 || pivot_row_length == 0) ;
+
+ /* === Approximate degree computation =============================== */
+
+ /* Here begins the computation of the approximate degree. The column */
+ /* score is the sum of the pivot row "length", plus the size of the */
+ /* set differences of each row in the column minus the pattern of the */
+ /* pivot row itself. The column ("thickness") itself is also */
+ /* excluded from the column score (we thus use an approximate */
+ /* external degree). */
+
+ /* The time taken by the following code (compute set differences, and */
+ /* add them up) is proportional to the size of the data structure */
+ /* being scanned - that is, the sum of the sizes of each column in */
+ /* the pivot row. Thus, the amortized time to compute a column score */
+ /* is proportional to the size of that column (where size, in this */
+ /* context, is the column "length", or the number of row indices */
+ /* in that column). The number of row indices in a column is */
+ /* monotonically non-decreasing, from the length of the original */
+ /* column on input to colamd. */
+
+ /* === Compute set differences ====================================== */
+
+ DEBUG1 (("** Computing set differences phase. **\n")) ;
+
+ /* pivot row is currently dead - it will be revived later. */
+
+ DEBUG2 (("Pivot row: ")) ;
+ /* for each column in pivot row */
+ rp = &A [pivot_row_start] ;
+ rp_end = rp + pivot_row_length ;
+ while (rp < rp_end)
+ {
+ col = *rp++ ;
+ assert (COL_IS_ALIVE (col) && col != pivot_col) ;
+ DEBUG2 (("Col: %d\n", col)) ;
+
+ /* clear tags used to construct pivot row pattern */
+ col_thickness = -Col [col].shared1.thickness ;
+ assert (col_thickness > 0) ;
+ Col [col].shared1.thickness = col_thickness ;
+
+ /* === Remove column from degree list =========================== */
+
+ cur_score = Col [col].shared2.score ;
+ prev_col = Col [col].shared3.prev ;
+ next_col = Col [col].shared4.degree_next ;
+ assert (cur_score >= 0) ;
+ assert (cur_score <= n_col) ;
+ assert (cur_score >= EMPTY) ;
+ if (prev_col == EMPTY)
+ {
+ head [cur_score] = next_col ;
+ }
+ else
+ {
+ Col [prev_col].shared4.degree_next = next_col ;
+ }
+ if (next_col != EMPTY)
+ {
+ Col [next_col].shared3.prev = prev_col ;
+ }
+
+ /* === Scan the column ========================================== */
+
+ cp = &A [Col [col].start] ;
+ cp_end = cp + Col [col].length ;
+ while (cp < cp_end)
+ {
+ /* get a row */
+ row = *cp++ ;
+ row_mark = Row [row].shared2.mark ;
+ /* skip if dead */
+ if (ROW_IS_MARKED_DEAD (row_mark))
+ {
+ continue ;
+ }
+ assert (row != pivot_row) ;
+ set_difference = row_mark - tag_mark ;
+ /* check if the row has been seen yet */
+ if (set_difference < 0)
+ {
+ assert (Row [row].shared1.degree <= max_deg) ;
+ set_difference = Row [row].shared1.degree ;
+ }
+ /* subtract column thickness from this row's set difference */
+ set_difference -= col_thickness ;
+ assert (set_difference >= 0) ;
+ /* absorb this row if the set difference becomes zero */
+ if (set_difference == 0)
+ {
+ DEBUG1 (("aggressive absorption. Row: %d\n", row)) ;
+ KILL_ROW (row) ;
+ }
+ else
+ {
+ /* save the new mark */
+ Row [row].shared2.mark = set_difference + tag_mark ;
+ }
+ }
+ }
+
+#ifndef NDEBUG
+ debug_deg_lists (n_row, n_col, Row, Col, head,
+ min_score, n_col2-k-pivot_row_degree, max_deg) ;
+#endif
+
+ /* === Add up set differences for each column ======================= */
+
+ DEBUG1 (("** Adding set differences phase. **\n")) ;
+
+ /* for each column in pivot row */
+ rp = &A [pivot_row_start] ;
+ rp_end = rp + pivot_row_length ;
+ while (rp < rp_end)
+ {
+ /* get a column */
+ col = *rp++ ;
+ assert (COL_IS_ALIVE (col) && col != pivot_col) ;
+ hash = 0 ;
+ cur_score = 0 ;
+ cp = &A [Col [col].start] ;
+ /* compact the column */
+ new_cp = cp ;
+ cp_end = cp + Col [col].length ;
+
+ DEBUG2 (("Adding set diffs for Col: %d.\n", col)) ;
+
+ while (cp < cp_end)
+ {
+ /* get a row */
+ row = *cp++ ;
+ assert(row >= 0 && row < n_row) ;
+ row_mark = Row [row].shared2.mark ;
+ /* skip if dead */
+ if (ROW_IS_MARKED_DEAD (row_mark))
+ {
+ continue ;
+ }
+ assert (row_mark > tag_mark) ;
+ /* compact the column */
+ *new_cp++ = row ;
+ /* compute hash function */
+ hash += row ;
+ /* add set difference */
+ cur_score += row_mark - tag_mark ;
+ /* integer overflow... */
+ cur_score = MIN (cur_score, n_col) ;
+ }
+
+ /* recompute the column's length */
+ Col [col].length = (int) (new_cp - &A [Col [col].start]) ;
+
+ /* === Further mass elimination ================================= */
+
+ if (Col [col].length == 0)
+ {
+ DEBUG1 (("further mass elimination. Col: %d\n", col)) ;
+ /* nothing left but the pivot row in this column */
+ KILL_PRINCIPAL_COL (col) ;
+ pivot_row_degree -= Col [col].shared1.thickness ;
+ assert (pivot_row_degree >= 0) ;
+ /* order it */
+ Col [col].shared2.order = k ;
+ /* increment order count by column thickness */
+ k += Col [col].shared1.thickness ;
+ }
+ else
+ {
+ /* === Prepare for supercolumn detection ==================== */
+
+ DEBUG2 (("Preparing supercol detection for Col: %d.\n", col)) ;
+
+ /* save score so far */
+ Col [col].shared2.score = cur_score ;
+
+ /* add column to hash table, for supercolumn detection */
+ hash %= n_col + 1 ;
+
+ DEBUG2 ((" Hash = %d, n_col = %d.\n", hash, n_col)) ;
+ assert (hash <= n_col) ;
+
+ head_column = head [hash] ;
+ if (head_column > EMPTY)
+ {
+ /* degree list "hash" is non-empty, use prev (shared3) of */
+ /* first column in degree list as head of hash bucket */
+ first_col = Col [head_column].shared3.headhash ;
+ Col [head_column].shared3.headhash = col ;
+ }
+ else
+ {
+ /* degree list "hash" is empty, use head as hash bucket */
+ first_col = - (head_column + 2) ;
+ head [hash] = - (col + 2) ;
+ }
+ Col [col].shared4.hash_next = first_col ;
+
+ /* save hash function in Col [col].shared3.hash */
+ Col [col].shared3.hash = (int) hash ;
+ assert (COL_IS_ALIVE (col)) ;
+ }
+ }
+
+ /* The approximate external column degree is now computed. */
+
+ /* === Supercolumn detection ======================================== */
+
+ DEBUG1 (("** Supercolumn detection phase. **\n")) ;
+
+ detect_super_cols (
+#ifndef NDEBUG
+ n_col, Row,
+#endif
+ Col, A, head, pivot_row_start, pivot_row_length) ;
+
+ /* === Kill the pivotal column ====================================== */
+
+ KILL_PRINCIPAL_COL (pivot_col) ;
+
+ /* === Clear mark =================================================== */
+
+ tag_mark += (max_deg + 1) ;
+ if (tag_mark >= max_mark)
+ {
+ DEBUG1 (("clearing tag_mark\n")) ;
+ tag_mark = clear_mark (n_row, Row) ;
+ }
+#ifndef NDEBUG
+ DEBUG3 (("check3\n")) ;
+ debug_mark (n_row, Row, tag_mark, max_mark) ;
+#endif
+
+ /* === Finalize the new pivot row, and column scores ================ */
+
+ DEBUG1 (("** Finalize scores phase. **\n")) ;
+
+ /* for each column in pivot row */
+ rp = &A [pivot_row_start] ;
+ /* compact the pivot row */
+ new_rp = rp ;
+ rp_end = rp + pivot_row_length ;
+ while (rp < rp_end)
+ {
+ col = *rp++ ;
+ /* skip dead columns */
+ if (COL_IS_DEAD (col))
+ {
+ continue ;
+ }
+ *new_rp++ = col ;
+ /* add new pivot row to column */
+ A [Col [col].start + (Col [col].length++)] = pivot_row ;
+
+ /* retrieve score so far and add on pivot row's degree. */
+ /* (we wait until here for this in case the pivot */
+ /* row's degree was reduced due to mass elimination). */
+ cur_score = Col [col].shared2.score + pivot_row_degree ;
+
+ /* calculate the max possible score as the number of */
+ /* external columns minus the 'k' value minus the */
+ /* columns thickness */
+ max_score = n_col - k - Col [col].shared1.thickness ;
+
+ /* make the score the external degree of the union-of-rows */
+ cur_score -= Col [col].shared1.thickness ;
+
+ /* make sure score is less or equal than the max score */
+ cur_score = MIN (cur_score, max_score) ;
+ assert (cur_score >= 0) ;
+
+ /* store updated score */
+ Col [col].shared2.score = cur_score ;
+
+ /* === Place column back in degree list ========================= */
+
+ assert (min_score >= 0) ;
+ assert (min_score <= n_col) ;
+ assert (cur_score >= 0) ;
+ assert (cur_score <= n_col) ;
+ assert (head [cur_score] >= EMPTY) ;
+ next_col = head [cur_score] ;
+ Col [col].shared4.degree_next = next_col ;
+ Col [col].shared3.prev = EMPTY ;
+ if (next_col != EMPTY)
+ {
+ Col [next_col].shared3.prev = col ;
+ }
+ head [cur_score] = col ;
+
+ /* see if this score is less than current min */
+ min_score = MIN (min_score, cur_score) ;
+
+ }
+
+#ifndef NDEBUG
+ debug_deg_lists (n_row, n_col, Row, Col, head,
+ min_score, n_col2-k, max_deg) ;
+#endif
+
+ /* === Resurrect the new pivot row ================================== */
+
+ if (pivot_row_degree > 0)
+ {
+ /* update pivot row length to reflect any cols that were killed */
+ /* during super-col detection and mass elimination */
+ Row [pivot_row].start = pivot_row_start ;
+ Row [pivot_row].length = (int) (new_rp - &A[pivot_row_start]) ;
+ Row [pivot_row].shared1.degree = pivot_row_degree ;
+ Row [pivot_row].shared2.mark = 0 ;
+ /* pivot row is no longer dead */
+ }
+ }
+
+ /* === All principal columns have now been ordered ====================== */
+
+ return (ngarbage) ;
+}
+
+
+/* ========================================================================== */
+/* === order_children ======================================================= */
+/* ========================================================================== */
+
+/*
+ The find_ordering routine has ordered all of the principal columns (the
+ representatives of the supercolumns). The non-principal columns have not
+ yet been ordered. This routine orders those columns by walking up the
+ parent tree (a column is a child of the column which absorbed it). The
+ final permutation vector is then placed in p [0 ... n_col-1], with p [0]
+ being the first column, and p [n_col-1] being the last. It doesn't look
+ like it at first glance, but be assured that this routine takes time linear
+ in the number of columns. Although not immediately obvious, the time
+ taken by this routine is O (n_col), that is, linear in the number of
+ columns. Not user-callable.
+*/
+
+PRIVATE void order_children
+(
+ /* === Parameters ======================================================= */
+
+ int n_col, /* number of columns of A */
+ ColInfo Col [], /* of size n_col+1 */
+ int p [] /* p [0 ... n_col-1] is the column permutation*/
+)
+{
+ /* === Local variables ================================================== */
+
+ int i ; /* loop counter for all columns */
+ int c ; /* column index */
+ int parent ; /* index of column's parent */
+ int order ; /* column's order */
+
+ /* === Order each non-principal column ================================== */
+
+ for (i = 0 ; i < n_col ; i++)
+ {
+ /* find an un-ordered non-principal column */
+ assert (COL_IS_DEAD (i)) ;
+ if (!COL_IS_DEAD_PRINCIPAL (i) && Col [i].shared2.order == EMPTY)
+ {
+ parent = i ;
+ /* once found, find its principal parent */
+ do
+ {
+ parent = Col [parent].shared1.parent ;
+ } while (!COL_IS_DEAD_PRINCIPAL (parent)) ;
+
+ /* now, order all un-ordered non-principal columns along path */
+ /* to this parent. collapse tree at the same time */
+ c = i ;
+ /* get order of parent */
+ order = Col [parent].shared2.order ;
+
+ do
+ {
+ assert (Col [c].shared2.order == EMPTY) ;
+
+ /* order this column */
+ Col [c].shared2.order = order++ ;
+ /* collaps tree */
+ Col [c].shared1.parent = parent ;
+
+ /* get immediate parent of this column */
+ c = Col [c].shared1.parent ;
+
+ /* continue until we hit an ordered column. There are */
+ /* guarranteed not to be anymore unordered columns */
+ /* above an ordered column */
+ } while (Col [c].shared2.order == EMPTY) ;
+
+ /* re-order the super_col parent to largest order for this group */
+ Col [parent].shared2.order = order ;
+ }
+ }
+
+ /* === Generate the permutation ========================================= */
+
+ for (c = 0 ; c < n_col ; c++)
+ {
+ p [Col [c].shared2.order] = c ;
+ }
+}
+
+
+/* ========================================================================== */
+/* === detect_super_cols ==================================================== */
+/* ========================================================================== */
+
+/*
+ Detects supercolumns by finding matches between columns in the hash buckets.
+ Check amongst columns in the set A [row_start ... row_start + row_length-1].
+ The columns under consideration are currently *not* in the degree lists,
+ and have already been placed in the hash buckets.
+
+ The hash bucket for columns whose hash function is equal to h is stored
+ as follows:
+
+ if head [h] is >= 0, then head [h] contains a degree list, so:
+
+ head [h] is the first column in degree bucket h.
+ Col [head [h]].headhash gives the first column in hash bucket h.
+
+ otherwise, the degree list is empty, and:
+
+ -(head [h] + 2) is the first column in hash bucket h.
+
+ For a column c in a hash bucket, Col [c].shared3.prev is NOT a "previous
+ column" pointer. Col [c].shared3.hash is used instead as the hash number
+ for that column. The value of Col [c].shared4.hash_next is the next column
+ in the same hash bucket.
+
+ Assuming no, or "few" hash collisions, the time taken by this routine is
+ linear in the sum of the sizes (lengths) of each column whose score has
+ just been computed in the approximate degree computation.
+ Not user-callable.
+*/
+
+PRIVATE void detect_super_cols
+(
+ /* === Parameters ======================================================= */
+
+#ifndef NDEBUG
+ /* these two parameters are only needed when debugging is enabled: */
+ int n_col, /* number of columns of A */
+ RowInfo Row [], /* of size n_row+1 */
+#endif
+ ColInfo Col [], /* of size n_col+1 */
+ int A [], /* row indices of A */
+ int head [], /* head of degree lists and hash buckets */
+ int row_start, /* pointer to set of columns to check */
+ int row_length /* number of columns to check */
+)
+{
+ /* === Local variables ================================================== */
+
+ int hash ; /* hash # for a column */
+ int *rp ; /* pointer to a row */
+ int c ; /* a column index */
+ int super_c ; /* column index of the column to absorb into */
+ int *cp1 ; /* column pointer for column super_c */
+ int *cp2 ; /* column pointer for column c */
+ int length ; /* length of column super_c */
+ int prev_c ; /* column preceding c in hash bucket */
+ int i ; /* loop counter */
+ int *rp_end ; /* pointer to the end of the row */
+ int col ; /* a column index in the row to check */
+ int head_column ; /* first column in hash bucket or degree list */
+ int first_col ; /* first column in hash bucket */
+
+ /* === Consider each column in the row ================================== */
+
+ rp = &A [row_start] ;
+ rp_end = rp + row_length ;
+ while (rp < rp_end)
+ {
+ col = *rp++ ;
+ if (COL_IS_DEAD (col))
+ {
+ continue ;
+ }
+
+ /* get hash number for this column */
+ hash = Col [col].shared3.hash ;
+ assert (hash <= n_col) ;
+
+ /* === Get the first column in this hash bucket ===================== */
+
+ head_column = head [hash] ;
+ if (head_column > EMPTY)
+ {
+ first_col = Col [head_column].shared3.headhash ;
+ }
+ else
+ {
+ first_col = - (head_column + 2) ;
+ }
+
+ /* === Consider each column in the hash bucket ====================== */
+
+ for (super_c = first_col ; super_c != EMPTY ;
+ super_c = Col [super_c].shared4.hash_next)
+ {
+ assert (COL_IS_ALIVE (super_c)) ;
+ assert (Col [super_c].shared3.hash == hash) ;
+ length = Col [super_c].length ;
+
+ /* prev_c is the column preceding column c in the hash bucket */
+ prev_c = super_c ;
+
+ /* === Compare super_c with all columns after it ================ */
+
+ for (c = Col [super_c].shared4.hash_next ;
+ c != EMPTY ; c = Col [c].shared4.hash_next)
+ {
+ assert (c != super_c) ;
+ assert (COL_IS_ALIVE (c)) ;
+ assert (Col [c].shared3.hash == hash) ;
+
+ /* not identical if lengths or scores are different */
+ if (Col [c].length != length ||
+ Col [c].shared2.score != Col [super_c].shared2.score)
+ {
+ prev_c = c ;
+ continue ;
+ }
+
+ /* compare the two columns */
+ cp1 = &A [Col [super_c].start] ;
+ cp2 = &A [Col [c].start] ;
+
+ for (i = 0 ; i < length ; i++)
+ {
+ /* the columns are "clean" (no dead rows) */
+ assert (ROW_IS_ALIVE (*cp1)) ;
+ assert (ROW_IS_ALIVE (*cp2)) ;
+ /* row indices will same order for both supercols, */
+ /* no gather scatter nessasary */
+ if (*cp1++ != *cp2++)
+ {
+ break ;
+ }
+ }
+
+ /* the two columns are different if the for-loop "broke" */
+ if (i != length)
+ {
+ prev_c = c ;
+ continue ;
+ }
+
+ /* === Got it! two columns are identical =================== */
+
+ assert (Col [c].shared2.score == Col [super_c].shared2.score) ;
+
+ Col [super_c].shared1.thickness += Col [c].shared1.thickness ;
+ Col [c].shared1.parent = super_c ;
+ KILL_NON_PRINCIPAL_COL (c) ;
+ /* order c later, in order_children() */
+ Col [c].shared2.order = EMPTY ;
+ /* remove c from hash bucket */
+ Col [prev_c].shared4.hash_next = Col [c].shared4.hash_next ;
+ }
+ }
+
+ /* === Empty this hash bucket ======================================= */
+
+ if (head_column > EMPTY)
+ {
+ /* corresponding degree list "hash" is not empty */
+ Col [head_column].shared3.headhash = EMPTY ;
+ }
+ else
+ {
+ /* corresponding degree list "hash" is empty */
+ head [hash] = EMPTY ;
+ }
+ }
+}
+
+
+/* ========================================================================== */
+/* === garbage_collection =================================================== */
+/* ========================================================================== */
+
+/*
+ Defragments and compacts columns and rows in the workspace A. Used when
+ all avaliable memory has been used while performing row merging. Returns
+ the index of the first free position in A, after garbage collection. The
+ time taken by this routine is linear is the size of the array A, which is
+ itself linear in the number of nonzeros in the input matrix.
+ Not user-callable.
+*/
+
+PRIVATE int garbage_collection /* returns the new value of pfree */
+(
+ /* === Parameters ======================================================= */
+
+ int n_row, /* number of rows */
+ int n_col, /* number of columns */
+ RowInfo Row [], /* row info */
+ ColInfo Col [], /* column info */
+ int A [], /* A [0 ... Alen-1] holds the matrix */
+ int *pfree /* &A [0] ... pfree is in use */
+)
+{
+ /* === Local variables ================================================== */
+
+ int *psrc ; /* source pointer */
+ int *pdest ; /* destination pointer */
+ int j ; /* counter */
+ int r ; /* a row index */
+ int c ; /* a column index */
+ int length ; /* length of a row or column */
+
+#ifndef NDEBUG
+ int debug_rows ;
+ DEBUG0 (("Defrag..\n")) ;
+ for (psrc = &A[0] ; psrc < pfree ; psrc++) assert (*psrc >= 0) ;
+ debug_rows = 0 ;
+#endif
+
+ /* === Defragment the columns =========================================== */
+
+ pdest = &A[0] ;
+ for (c = 0 ; c < n_col ; c++)
+ {
+ if (COL_IS_ALIVE (c))
+ {
+ psrc = &A [Col [c].start] ;
+
+ /* move and compact the column */
+ assert (pdest <= psrc) ;
+ Col [c].start = (int) (pdest - &A [0]) ;
+ length = Col [c].length ;
+ for (j = 0 ; j < length ; j++)
+ {
+ r = *psrc++ ;
+ if (ROW_IS_ALIVE (r))
+ {
+ *pdest++ = r ;
+ }
+ }
+ Col [c].length = (int) (pdest - &A [Col [c].start]) ;
+ }
+ }
+
+ /* === Prepare to defragment the rows =================================== */
+
+ for (r = 0 ; r < n_row ; r++)
+ {
+ if (ROW_IS_ALIVE (r))
+ {
+ if (Row [r].length == 0)
+ {
+ /* this row is of zero length. cannot compact it, so kill it */
+ DEBUG0 (("Defrag row kill\n")) ;
+ KILL_ROW (r) ;
+ }
+ else
+ {
+ /* save first column index in Row [r].shared2.first_column */
+ psrc = &A [Row [r].start] ;
+ Row [r].shared2.first_column = *psrc ;
+ assert (ROW_IS_ALIVE (r)) ;
+ /* flag the start of the row with the one's complement of row */
+ *psrc = ONES_COMPLEMENT (r) ;
+#ifndef NDEBUG
+ debug_rows++ ;
+#endif
+ }
+ }
+ }
+
+ /* === Defragment the rows ============================================== */
+
+ psrc = pdest ;
+ while (psrc < pfree)
+ {
+ /* find a negative number ... the start of a row */
+ if (*psrc++ < 0)
+ {
+ psrc-- ;
+ /* get the row index */
+ r = ONES_COMPLEMENT (*psrc) ;
+ assert (r >= 0 && r < n_row) ;
+ /* restore first column index */
+ *psrc = Row [r].shared2.first_column ;
+ assert (ROW_IS_ALIVE (r)) ;
+
+ /* move and compact the row */
+ assert (pdest <= psrc) ;
+ Row [r].start = (int) (pdest - &A [0]) ;
+ length = Row [r].length ;
+ for (j = 0 ; j < length ; j++)
+ {
+ c = *psrc++ ;
+ if (COL_IS_ALIVE (c))
+ {
+ *pdest++ = c ;
+ }
+ }
+ Row [r].length = (int) (pdest - &A [Row [r].start]) ;
+#ifndef NDEBUG
+ debug_rows-- ;
+#endif
+ }
+ }
+ /* ensure we found all the rows */
+ assert (debug_rows == 0) ;
+
+ /* === Return the new value of pfree ==================================== */
+
+ return ((int) (pdest - &A [0])) ;
+}
+
+
+/* ========================================================================== */
+/* === clear_mark =========================================================== */
+/* ========================================================================== */
+
+/*
+ Clears the Row [].shared2.mark array, and returns the new tag_mark.
+ Return value is the new tag_mark. Not user-callable.
+*/
+
+PRIVATE int clear_mark /* return the new value for tag_mark */
+(
+ /* === Parameters ======================================================= */
+
+ int n_row, /* number of rows in A */
+ RowInfo Row [] /* Row [0 ... n_row-1].shared2.mark is set to zero */
+)
+{
+ /* === Local variables ================================================== */
+
+ int r ;
+
+ DEBUG0 (("Clear mark\n")) ;
+ for (r = 0 ; r < n_row ; r++)
+ {
+ if (ROW_IS_ALIVE (r))
+ {
+ Row [r].shared2.mark = 0 ;
+ }
+ }
+ return (1) ;
+}
+
+
+/* ========================================================================== */
+/* === debugging routines =================================================== */
+/* ========================================================================== */
+
+/* When debugging is disabled, the remainder of this file is ignored. */
+
+#ifndef NDEBUG
+
+
+/* ========================================================================== */
+/* === debug_structures ===================================================== */
+/* ========================================================================== */
+
+/*
+ At this point, all empty rows and columns are dead. All live columns
+ are "clean" (containing no dead rows) and simplicial (no supercolumns
+ yet). Rows may contain dead columns, but all live rows contain at
+ least one live column.
+*/
+
+PRIVATE void debug_structures
+(
+ /* === Parameters ======================================================= */
+
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A [],
+ int n_col2
+)
+{
+ /* === Local variables ================================================== */
+
+ int i ;
+ int c ;
+ int *cp ;
+ int *cp_end ;
+ int len ;
+ int score ;
+ int r ;
+ int *rp ;
+ int *rp_end ;
+ int deg ;
+
+ /* === Check A, Row, and Col ============================================ */
+
+ for (c = 0 ; c < n_col ; c++)
+ {
+ if (COL_IS_ALIVE (c))
+ {
+ len = Col [c].length ;
+ score = Col [c].shared2.score ;
+ DEBUG4 (("initial live col %5d %5d %5d\n", c, len, score)) ;
+ assert (len > 0) ;
+ assert (score >= 0) ;
+ assert (Col [c].shared1.thickness == 1) ;
+ cp = &A [Col [c].start] ;
+ cp_end = cp + len ;
+ while (cp < cp_end)
+ {
+ r = *cp++ ;
+ assert (ROW_IS_ALIVE (r)) ;
+ }
+ }
+ else
+ {
+ i = Col [c].shared2.order ;
+ assert (i >= n_col2 && i < n_col) ;
+ }
+ }
+
+ for (r = 0 ; r < n_row ; r++)
+ {
+ if (ROW_IS_ALIVE (r))
+ {
+ i = 0 ;
+ len = Row [r].length ;
+ deg = Row [r].shared1.degree ;
+ assert (len > 0) ;
+ assert (deg > 0) ;
+ rp = &A [Row [r].start] ;
+ rp_end = rp + len ;
+ while (rp < rp_end)
+ {
+ c = *rp++ ;
+ if (COL_IS_ALIVE (c))
+ {
+ i++ ;
+ }
+ }
+ assert (i > 0) ;
+ }
+ }
+}
+
+
+/* ========================================================================== */
+/* === debug_deg_lists ====================================================== */
+/* ========================================================================== */
+
+/*
+ Prints the contents of the degree lists. Counts the number of columns
+ in the degree list and compares it to the total it should have. Also
+ checks the row degrees.
+*/
+
+PRIVATE void debug_deg_lists
+(
+ /* === Parameters ======================================================= */
+
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int head [],
+ int min_score,
+ int should,
+ int max_deg
+)
+{
+ /* === Local variables ================================================== */
+
+ int deg ;
+ int col ;
+ int have ;
+ int row ;
+
+ /* === Check the degree lists =========================================== */
+
+ if (n_col > 10000 && debug_colamd <= 0)
+ {
+ return ;
+ }
+ have = 0 ;
+ DEBUG4 (("Degree lists: %d\n", min_score)) ;
+ for (deg = 0 ; deg <= n_col ; deg++)
+ {
+ col = head [deg] ;
+ if (col == EMPTY)
+ {
+ continue ;
+ }
+ DEBUG4 (("%d:", deg)) ;
+ while (col != EMPTY)
+ {
+ DEBUG4 ((" %d", col)) ;
+ have += Col [col].shared1.thickness ;
+ assert (COL_IS_ALIVE (col)) ;
+ col = Col [col].shared4.degree_next ;
+ }
+ DEBUG4 (("\n")) ;
+ }
+ DEBUG4 (("should %d have %d\n", should, have)) ;
+ assert (should == have) ;
+
+ /* === Check the row degrees ============================================ */
+
+ if (n_row > 10000 && debug_colamd <= 0)
+ {
+ return ;
+ }
+ for (row = 0 ; row < n_row ; row++)
+ {
+ if (ROW_IS_ALIVE (row))
+ {
+ assert (Row [row].shared1.degree <= max_deg) ;
+ }
+ }
+}
+
+
+/* ========================================================================== */
+/* === debug_mark =========================================================== */
+/* ========================================================================== */
+
+/*
+ Ensures that the tag_mark is less that the maximum and also ensures that
+ each entry in the mark array is less than the tag mark.
+*/
+
+PRIVATE void debug_mark
+(
+ /* === Parameters ======================================================= */
+
+ int n_row,
+ RowInfo Row [],
+ int tag_mark,
+ int max_mark
+)
+{
+ /* === Local variables ================================================== */
+
+ int r ;
+
+ /* === Check the Row marks ============================================== */
+
+ assert (tag_mark > 0 && tag_mark <= max_mark) ;
+ if (n_row > 10000 && debug_colamd <= 0)
+ {
+ return ;
+ }
+ for (r = 0 ; r < n_row ; r++)
+ {
+ assert (Row [r].shared2.mark < tag_mark) ;
+ }
+}
+
+
+/* ========================================================================== */
+/* === debug_matrix ========================================================= */
+/* ========================================================================== */
+
+/*
+ Prints out the contents of the columns and the rows.
+*/
+
+PRIVATE void debug_matrix
+(
+ /* === Parameters ======================================================= */
+
+ int n_row,
+ int n_col,
+ RowInfo Row [],
+ ColInfo Col [],
+ int A []
+)
+{
+ /* === Local variables ================================================== */
+
+ int r ;
+ int c ;
+ int *rp ;
+ int *rp_end ;
+ int *cp ;
+ int *cp_end ;
+
+ /* === Dump the rows and columns of the matrix ========================== */
+
+ if (debug_colamd < 3)
+ {
+ return ;
+ }
+ DEBUG3 (("DUMP MATRIX:\n")) ;
+ for (r = 0 ; r < n_row ; r++)
+ {
+ DEBUG3 (("Row %d alive? %d\n", r, ROW_IS_ALIVE (r))) ;
+ if (ROW_IS_DEAD (r))
+ {
+ continue ;
+ }
+ DEBUG3 (("start %d length %d degree %d\n",
+ Row [r].start, Row [r].length, Row [r].shared1.degree)) ;
+ rp = &A [Row [r].start] ;
+ rp_end = rp + Row [r].length ;
+ while (rp < rp_end)
+ {
+ c = *rp++ ;
+ DEBUG3 ((" %d col %d\n", COL_IS_ALIVE (c), c)) ;
+ }
+ }
+
+ for (c = 0 ; c < n_col ; c++)
+ {
+ DEBUG3 (("Col %d alive? %d\n", c, COL_IS_ALIVE (c))) ;
+ if (COL_IS_DEAD (c))
+ {
+ continue ;
+ }
+ DEBUG3 (("start %d length %d shared1 %d shared2 %d\n",
+ Col [c].start, Col [c].length,
+ Col [c].shared1.thickness, Col [c].shared2.score)) ;
+ cp = &A [Col [c].start] ;
+ cp_end = cp + Col [c].length ;
+ while (cp < cp_end)
+ {
+ r = *cp++ ;
+ DEBUG3 ((" %d row %d\n", ROW_IS_ALIVE (r), r)) ;
+ }
+ }
+}
+
+#endif
+
diff --git a/SRC/colamd.h b/SRC/colamd.h
new file mode 100644
index 0000000..0078398
--- /dev/null
+++ b/SRC/colamd.h
@@ -0,0 +1,67 @@
+/* ========================================================================== */
+/* === colamd prototypes and definitions ==================================== */
+/* ========================================================================== */
+
+/*
+ This is the colamd include file,
+
+ http://www.cise.ufl.edu/~davis/colamd/colamd.h
+
+ for use in the colamd.c, colamdmex.c, and symamdmex.c files located at
+
+ http://www.cise.ufl.edu/~davis/colamd/
+
+ See those files for a description of colamd and symamd, and for the
+ copyright notice, which also applies to this file.
+
+ August 3, 1998. Version 1.0.
+*/
+
+/* ========================================================================== */
+/* === Definitions ========================================================== */
+/* ========================================================================== */
+
+/* size of the knobs [ ] array. Only knobs [0..1] are currently used. */
+#define COLAMD_KNOBS 20
+
+/* number of output statistics. Only A [0..2] are currently used. */
+#define COLAMD_STATS 20
+
+/* knobs [0] and A [0]: dense row knob and output statistic. */
+#define COLAMD_DENSE_ROW 0
+
+/* knobs [1] and A [1]: dense column knob and output statistic. */
+#define COLAMD_DENSE_COL 1
+
+/* A [2]: memory defragmentation count output statistic */
+#define COLAMD_DEFRAG_COUNT 2
+
+/* A [3]: whether or not the input columns were jumbled or had duplicates */
+#define COLAMD_JUMBLED_COLS 3
+
+/* ========================================================================== */
+/* === Prototypes of user-callable routines ================================= */
+/* ========================================================================== */
+
+int colamd_recommended /* returns recommended value of Alen */
+(
+ int nnz, /* nonzeros in A */
+ int n_row, /* number of rows in A */
+ int n_col /* number of columns in A */
+) ;
+
+void colamd_set_defaults /* sets default parameters */
+( /* knobs argument is modified on output */
+ double knobs [COLAMD_KNOBS] /* parameter settings for colamd */
+) ;
+
+int colamd /* returns TRUE if successful, FALSE otherwise*/
+( /* A and p arguments are modified on output */
+ int n_row, /* number of rows in A */
+ int n_col, /* number of columns in A */
+ int Alen, /* size of the array A */
+ int A [], /* row indices of A, of size Alen */
+ int p [], /* column pointers of A, of size n_col+1 */
+ double knobs [COLAMD_KNOBS] /* parameter settings for colamd */
+) ;
+
diff --git a/SRC/cpanel_bmod.c b/SRC/cpanel_bmod.c
new file mode 100644
index 0000000..d73f2c5
--- /dev/null
+++ b/SRC/cpanel_bmod.c
@@ -0,0 +1,478 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "csp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void clsolve(int, int, complex *, complex *);
+void cmatvec(int, int, int, complex *, complex *, complex *);
+extern void ccheck_tempv();
+
+void
+cpanel_bmod (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ const int nseg, /* in */
+ complex *dense, /* out, of size n by w */
+ complex *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in, of size n by w */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs numeric block updates (sup-panel) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ * Before entering this routine, the original nonzeros in the panel
+ * were already copied into the spa[m,w].
+ *
+ * Updated/Output parameters-
+ * dense[0:m-1,w]: L[*,j:j+w-1] and U[*,j:j+w-1] are returned
+ * collectively in the m-by-w vector dense[*].
+ *
+ */
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ complex alpha, beta;
+#endif
+
+ register int k, ksub;
+ int fsupc, nsupc, nsupr, nrow;
+ int krep, krep_ind;
+ complex ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int segsze;
+ int block_nrow; /* no of rows in a block row */
+ register int lptr; /* Points to the row subscripts of a supernode */
+ int kfnz, irow, no_zeros;
+ register int isub, isub1, i;
+ register int jj; /* Index through each column in the panel */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ complex *lusup;
+ int *xlusup;
+ int *repfnz_col; /* repfnz[] for a column in the panel */
+ complex *dense_col; /* dense[] for a column in the panel */
+ complex *tempv1; /* Used in 1-D update */
+ complex *TriTmp, *MatvecTmp; /* used in 2-D update */
+ complex zero = {0.0, 0.0};
+ complex one = {1.0, 0.0};
+ complex comp_temp, comp_temp1;
+ register int ldaTmp;
+ register int r_ind, r_hi;
+ static int first = 1, maxsuper, rowblk, colblk;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ rowblk = sp_ienv(4);
+ colblk = sp_ienv(5);
+ first = 0;
+ }
+ ldaTmp = maxsuper + rowblk;
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) { /* for each updating supernode */
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in a supernode
+ * nsupr = no of rows in a supernode
+ */
+ krep = segrep[k--];
+ fsupc = xsup[supno[krep]];
+ nsupc = krep - fsupc + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nrow = nsupr - nsupc;
+ lptr = xlsub[fsupc];
+ krep_ind = lptr + nsupc - 1;
+
+ repfnz_col = repfnz;
+ dense_col = dense;
+
+ if ( nsupc >= colblk && nrow > rowblk ) { /* 2-D block update */
+
+ TriTmp = tempv;
+
+ /* Sequence through each column in panel -- triangular solves */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp ) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += 4 * segsze * (segsze - 1);
+ ops[GEMV] += 8 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ c_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ cc_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ c_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++;
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ cc_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ cc_mult(&comp_temp, &ukj2, &lusup[luptr2-1]);
+ c_sub(&ukj1, &ukj1, &comp_temp);
+
+ cc_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ cc_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++; luptr2++;
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ cc_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ cc_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ }
+
+ } else { /* segsze >= 4 */
+
+ /* Copy U[*,j] segment from dense[*] to TriTmp[*], which
+ holds the result of triangular solves. */
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ TriTmp[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#else
+ ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#endif
+#else
+ clsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
+#endif
+
+
+ } /* else ... */
+
+ } /* for jj ... end tri-solves */
+
+ /* Block row updates; push all the way into dense[*] block */
+ for ( r_ind = 0; r_ind < nrow; r_ind += rowblk ) {
+
+ r_hi = SUPERLU_MIN(nrow, r_ind + rowblk);
+ block_nrow = SUPERLU_MIN(rowblk, r_hi - r_ind);
+ luptr = xlusup[fsupc] + nsupc + r_ind;
+ isub1 = lptr + nsupc + r_ind;
+
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ /* Sequence through each column in panel -- matrix-vector */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ /* Perform a block update, and scatter the result of
+ matrix-vector to dense[]. */
+ no_zeros = kfnz - fsupc;
+ luptr1 = luptr + nsupr * no_zeros;
+ MatvecTmp = &TriTmp[maxsuper];
+
+#ifdef USE_VENDOR_BLAS
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ CGEMV(ftcs2, &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#else
+ cgemv_("N", &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#endif
+#else
+ cmatvec(nsupr, block_nrow, segsze, &lusup[luptr1],
+ TriTmp, MatvecTmp);
+#endif
+
+ /* Scatter MatvecTmp[*] into SPA dense[*] temporarily
+ * such that MatvecTmp[*] can be re-used for the
+ * the next blok row update. dense[] will be copied into
+ * global store after the whole panel has been finished.
+ */
+ isub = isub1;
+ for (i = 0; i < block_nrow; i++) {
+ irow = lsub[isub];
+ c_sub(&dense_col[irow], &dense_col[irow],
+ &MatvecTmp[i]);
+ MatvecTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } /* for each block row ... */
+
+ /* Scatter the triangular solves into SPA dense[*] */
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = TriTmp[i];
+ TriTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } else { /* 1-D block modification */
+
+
+ /* Sequence through each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += 4 * segsze * (segsze - 1);
+ ops[GEMV] += 8 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ c_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ cc_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ c_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1;
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ cc_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ cc_mult(&comp_temp, &ukj2, &lusup[luptr2-1]);
+ c_sub(&ukj1, &ukj1, &comp_temp);
+
+ cc_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ cc_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1; ++luptr2;
+ cc_mult(&comp_temp, &ukj, &lusup[luptr]);
+ cc_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ cc_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ c_add(&comp_temp, &comp_temp, &comp_temp1);
+ c_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ }
+
+ } else { /* segsze >= 4 */
+ /*
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense[].
+ */
+ no_zeros = kfnz - fsupc;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*]:
+ * The result of triangular solve is in tempv[*];
+ * The result of matrix vector update is in dense_col[*]
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ tempv[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ CGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ cgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ clsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ cmatvec (nsupr, nrow, segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+ /* Scatter tempv[*] into SPA dense[*] temporarily, such
+ * that tempv[*] can be used for the triangular solve of
+ * the next column of the panel. They will be copied into
+ * ucol[*] after the whole panel has been finished.
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = tempv[i];
+ tempv[i] = zero;
+ isub++;
+ }
+
+ /* Scatter the update from tempv1[*] into SPA dense[*] */
+ /* Start dense rectangular L */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ c_sub(&dense_col[irow], &dense_col[irow], &tempv1[i]);
+ tempv1[i] = zero;
+ ++isub;
+ }
+
+ } /* else segsze>=4 ... */
+
+ } /* for each column in the panel... */
+
+ } /* else 1-D update ... */
+
+ } /* for each updating supernode ... */
+
+}
+
+
+
diff --git a/SRC/cpanel_dfs.c b/SRC/cpanel_dfs.c
new file mode 100644
index 0000000..6343c0b
--- /dev/null
+++ b/SRC/cpanel_dfs.c
@@ -0,0 +1,249 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+#include "util.h"
+
+void
+cpanel_dfs (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ SuperMatrix *A, /* in - original matrix */
+ int *perm_r, /* in */
+ int *nseg, /* out */
+ complex *dense, /* out */
+ int *panel_lsub, /* out */
+ int *segrep, /* out */
+ int *repfnz, /* out */
+ int *xprune, /* out */
+ int *marker, /* out */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs a symbolic factorization on a panel of columns [jcol, jcol+w).
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives.
+ *
+ * The routine returns one list of the supernodal representatives
+ * in topological order of the dfs that generates them. This list is
+ * a superset of the topological order of each individual column within
+ * the panel.
+ * The location of the first nonzero in each supernodal segment
+ * (supernodal entry location) is also returned. Each column has a
+ * separate list for this purpose.
+ *
+ * Two marker arrays are used for dfs:
+ * marker[i] == jj, if i was visited during dfs of current column jj;
+ * marker1[i] >= jcol, if i was visited by earlier columns in this panel;
+ *
+ * marker: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ */
+ NCPformat *Astore;
+ complex *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int krep, chperm, chmark, chrep, oldrep, kchild, myfnz;
+ int k, krow, kmark, kperm;
+ int xdfs, maxdfs, kpar;
+ int jj; /* index through each column in the panel */
+ int *marker1; /* marker1[jj] >= jcol if vertex jj was visited
+ by a previous column within this panel. */
+ int *repfnz_col; /* start of each column in the panel */
+ complex *dense_col; /* start of each column in the panel */
+ int nextl_col; /* next available position in panel_lsub[*,jj] */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+
+ /* Initialize pointers */
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+ marker1 = marker + m;
+ repfnz_col = repfnz;
+ dense_col = dense;
+ *nseg = 0;
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+
+ /* For each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++) {
+ nextl_col = (jj - jcol) * m;
+
+#ifdef CHK_DFS
+ printf("\npanel col %d: ", jj);
+#endif
+
+ /* For each nonz in A[*,jj] do dfs */
+ for (k = xa_begin[jj]; k < xa_end[jj]; k++) {
+ krow = asub[k];
+ dense_col[krow] = a[k];
+ kmark = marker[krow];
+ if ( kmark == jj )
+ continue; /* krow visited before, go to the next nonzero */
+
+ /* For each unmarked nbr krow of jj
+ * krow is in L: place it in structure of L[*,jj]
+ */
+ marker[krow] = jj;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ panel_lsub[nextl_col++] = krow; /* krow is indexed into A */
+ }
+ /*
+ * krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ else {
+
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz_col[krep];
+
+#ifdef CHK_DFS
+ printf("krep %d, myfnz %d, perm_r[%d] %d\n", krep, myfnz, krow, kperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Representative visited before */
+ if ( myfnz > kperm ) repfnz_col[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz_col[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker[kchild];
+
+ if ( chmark != jj ) { /* Not reached yet */
+ marker[kchild] = jj;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,j] */
+ if ( chperm == EMPTY ) {
+ panel_lsub[nextl_col++] = kchild;
+ }
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ else {
+
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz_col[chrep];
+#ifdef CHK_DFS
+ printf("chrep %d,myfnz %d,perm_r[%d] %d\n",chrep,myfnz,kchild,chperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz_col[chrep] = chperm;
+ }
+ else {
+ /* Cont. dfs at snode-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L) */
+ parent[krep] = oldrep;
+ repfnz_col[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } /* else */
+
+ } /* else */
+
+ } /* if... */
+
+ } /* while xdfs < maxdfs */
+
+ /* krow has no more unexplored nbrs:
+ * Place snode-rep krep in postorder DFS, if this
+ * segment is seen for the first time. (Note that
+ * "repfnz[krep]" may change later.)
+ * Backtrack dfs to its parent.
+ */
+ if ( marker1[krep] < jcol ) {
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ marker1[krep] = jj;
+ }
+
+ kpar = parent[krep]; /* Pop stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" pop stack: krep %d,xdfs %d,maxdfs %d: ", krep,xdfs,maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } while ( kpar != EMPTY ); /* do-while - until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonz in A[*,jj] */
+
+ repfnz_col += m; /* Move to next column */
+ dense_col += m;
+
+ } /* for jj ... */
+
+}
diff --git a/SRC/cpivotL.c b/SRC/cpivotL.c
new file mode 100644
index 0000000..f4640b4
--- /dev/null
+++ b/SRC/cpivotL.c
@@ -0,0 +1,174 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include <stdlib.h>
+#include "csp_defs.h"
+
+#undef DEBUG
+
+int
+cpivotL(
+ const int jcol, /* in */
+ const float u, /* in - diagonal pivoting threshold */
+ int *usepr, /* re-use the pivot sequence given by perm_r/iperm_r */
+ int *perm_r, /* may be modified */
+ int *iperm_r, /* in - inverse of perm_r */
+ int *iperm_c, /* in - used to find diagonal of Pc*A*Pc' */
+ int *pivrow, /* out */
+ GlobalLU_t *Glu, /* modified - global LU data structures */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Performs the numerical pivoting on the current column of L,
+ * and the CDIV operation.
+ *
+ * Pivot policy:
+ * (1) Compute thresh = u * max_(i>=j) abs(A_ij);
+ * (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN
+ * pivot row = k;
+ * ELSE IF abs(A_jj) >= thresh THEN
+ * pivot row = j;
+ * ELSE
+ * pivot row = m;
+ *
+ * Note: If you absolutely want to use a given pivot order, then set u=0.0.
+ *
+ * Return value: 0 success;
+ * i > 0 U(i,i) is exactly zero.
+ *
+ */
+ complex one = {1.0, 0.0};
+ int fsupc; /* first column in the supernode */
+ int nsupc; /* no of columns in the supernode */
+ int nsupr; /* no of rows in the supernode */
+ int lptr; /* points to the starting subscript of the supernode */
+ int pivptr, old_pivptr, diag, diagind;
+ float pivmax, rtemp, thresh;
+ complex temp;
+ complex *lu_sup_ptr;
+ complex *lu_col_ptr;
+ int *lsub_ptr;
+ int isub, icol, k, itemp;
+ int *lsub, *xlsub;
+ complex *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ /* Initialize pointers */
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ fsupc = (Glu->xsup)[(Glu->supno)[jcol]];
+ nsupc = jcol - fsupc; /* excluding jcol; nsupc >= 0 */
+ lptr = xlsub[fsupc];
+ nsupr = xlsub[fsupc+1] - lptr;
+ lu_sup_ptr = &lusup[xlusup[fsupc]]; /* start of the current supernode */
+ lu_col_ptr = &lusup[xlusup[jcol]]; /* start of jcol in the supernode */
+ lsub_ptr = &lsub[lptr]; /* start of row indices of the supernode */
+
+#ifdef DEBUG
+if ( jcol == MIN_COL ) {
+ printf("Before cdiv: col %d\n", jcol);
+ for (k = nsupc; k < nsupr; k++)
+ printf(" lu[%d] %f\n", lsub_ptr[k], lu_col_ptr[k]);
+}
+#endif
+
+ /* Determine the largest abs numerical value for partial pivoting;
+ Also search for user-specified pivot, and diagonal element. */
+ if ( *usepr ) *pivrow = iperm_r[jcol];
+ diagind = iperm_c[jcol];
+ pivmax = 0.0;
+ pivptr = nsupc;
+ diag = EMPTY;
+ old_pivptr = nsupc;
+ for (isub = nsupc; isub < nsupr; ++isub) {
+ rtemp = c_abs1 (&lu_col_ptr[isub]);
+ if ( rtemp > pivmax ) {
+ pivmax = rtemp;
+ pivptr = isub;
+ }
+ if ( *usepr && lsub_ptr[isub] == *pivrow ) old_pivptr = isub;
+ if ( lsub_ptr[isub] == diagind ) diag = isub;
+ }
+
+ /* Test for singularity */
+ if ( pivmax == 0.0 ) {
+ *pivrow = lsub_ptr[pivptr];
+ perm_r[*pivrow] = jcol;
+ *usepr = 0;
+ return (jcol+1);
+ }
+
+ thresh = u * pivmax;
+
+ /* Choose appropriate pivotal element by our policy. */
+ if ( *usepr ) {
+ rtemp = c_abs1 (&lu_col_ptr[old_pivptr]);
+ if ( rtemp != 0.0 && rtemp >= thresh )
+ pivptr = old_pivptr;
+ else
+ *usepr = 0;
+ }
+ if ( *usepr == 0 ) {
+ /* Use diagonal pivot? */
+ if ( diag >= 0 ) { /* diagonal exists */
+ rtemp = c_abs1 (&lu_col_ptr[diag]);
+ if ( rtemp != 0.0 && rtemp >= thresh ) pivptr = diag;
+ }
+ *pivrow = lsub_ptr[pivptr];
+ }
+
+ /* Record pivot row */
+ perm_r[*pivrow] = jcol;
+
+ /* Interchange row subscripts */
+ if ( pivptr != nsupc ) {
+ itemp = lsub_ptr[pivptr];
+ lsub_ptr[pivptr] = lsub_ptr[nsupc];
+ lsub_ptr[nsupc] = itemp;
+
+ /* Interchange numerical values as well, for the whole snode, such
+ * that L is indexed the same way as A.
+ */
+ for (icol = 0; icol <= nsupc; icol++) {
+ itemp = pivptr + icol * nsupr;
+ temp = lu_sup_ptr[itemp];
+ lu_sup_ptr[itemp] = lu_sup_ptr[nsupc + icol*nsupr];
+ lu_sup_ptr[nsupc + icol*nsupr] = temp;
+ }
+ } /* if */
+
+ /* cdiv operation */
+ ops[FACT] += 10 * (nsupr - nsupc);
+
+ c_div(&temp, &one, &lu_col_ptr[nsupc]);
+ for (k = nsupc+1; k < nsupr; k++)
+ cc_mult(&lu_col_ptr[k], &lu_col_ptr[k], &temp);
+
+ return 0;
+}
+
diff --git a/SRC/cpivotgrowth.c b/SRC/cpivotgrowth.c
new file mode 100644
index 0000000..a077daa
--- /dev/null
+++ b/SRC/cpivotgrowth.c
@@ -0,0 +1,110 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "csp_defs.h"
+#include "util.h"
+
+float
+cPivotGrowth(int ncols, SuperMatrix *A, int *perm_c,
+ SuperMatrix *L, SuperMatrix *U)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Compute the reciprocal pivot growth factor of the leading ncols columns
+ * of the matrix, using the formula:
+ * min_j ( max_i(abs(A_ij)) / max_i(abs(U_ij)) )
+ *
+ * Arguments
+ * =========
+ *
+ * ncols (input) int
+ * The number of columns of matrices A, L and U.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = NC; Dtype = SLU_C; Mtype = GE.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SC; Dtype = SLU_C; Mtype = TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = NC;
+ * Dtype = SLU_C; Mtype = TRU.
+ *
+ */
+ NCformat *Astore;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ complex *Aval, *Lval, *Uval;
+ int fsupc, nsupr, luptr, nz_in_U;
+ int i, j, k, oldcol;
+ int *inv_perm_c;
+ float rpg, maxaj, maxuj;
+ extern double slamch_(char *);
+ float smlnum;
+ complex *luval;
+ complex temp_comp;
+
+ /* Get machine constants. */
+ smlnum = slamch_("S");
+ rpg = 1. / smlnum;
+
+ Astore = A->Store;
+ Lstore = L->Store;
+ Ustore = U->Store;
+ Aval = Astore->nzval;
+ Lval = Lstore->nzval;
+ Uval = Ustore->nzval;
+
+ inv_perm_c = (int *) SUPERLU_MALLOC(A->ncol*sizeof(int));
+ for (j = 0; j < A->ncol; ++j) inv_perm_c[perm_c[j]] = j;
+
+ for (k = 0; k <= Lstore->nsuper; ++k) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ luptr = L_NZ_START(fsupc);
+ luval = &Lval[luptr];
+ nz_in_U = 1;
+
+ for (j = fsupc; j < L_FST_SUPC(k+1) && j < ncols; ++j) {
+ maxaj = 0.;
+ oldcol = inv_perm_c[j];
+ for (i = Astore->colptr[oldcol]; i < Astore->colptr[oldcol+1]; ++i)
+ maxaj = SUPERLU_MAX( maxaj, c_abs1( &Aval[i]) );
+
+ maxuj = 0.;
+ for (i = Ustore->colptr[j]; i < Ustore->colptr[j+1]; i++)
+ maxuj = SUPERLU_MAX( maxuj, c_abs1( &Uval[i]) );
+
+ /* Supernode */
+ for (i = 0; i < nz_in_U; ++i)
+ maxuj = SUPERLU_MAX( maxuj, c_abs1( &luval[i]) );
+
+ ++nz_in_U;
+ luval += nsupr;
+
+ if ( maxuj == 0. )
+ rpg = SUPERLU_MIN( rpg, 1.);
+ else
+ rpg = SUPERLU_MIN( rpg, maxaj / maxuj );
+ }
+
+ if ( j >= ncols ) break;
+ }
+
+ SUPERLU_FREE(inv_perm_c);
+ return (rpg);
+}
diff --git a/SRC/cpruneL.c b/SRC/cpruneL.c
new file mode 100644
index 0000000..39d3005
--- /dev/null
+++ b/SRC/cpruneL.c
@@ -0,0 +1,149 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+#include "util.h"
+
+void
+cpruneL(
+ const int jcol, /* in */
+ const int *perm_r, /* in */
+ const int pivrow, /* in */
+ const int nseg, /* in */
+ const int *segrep, /* in */
+ const int *repfnz, /* in */
+ int *xprune, /* out */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Prunes the L-structure of supernodes whose L-structure
+ * contains the current pivot row "pivrow"
+ *
+ */
+ complex utemp;
+ int jsupno, irep, irep1, kmin, kmax, krow, movnum;
+ int i, ktemp, minloc, maxloc;
+ int do_prune; /* logical variable */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ complex *lusup;
+ int *xlusup;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ /*
+ * For each supernode-rep irep in U[*,j]
+ */
+ jsupno = supno[jcol];
+ for (i = 0; i < nseg; i++) {
+
+ irep = segrep[i];
+ irep1 = irep + 1;
+ do_prune = FALSE;
+
+ /* Don't prune with a zero U-segment */
+ if ( repfnz[irep] == EMPTY )
+ continue;
+
+ /* If a snode overlaps with the next panel, then the U-segment
+ * is fragmented into two parts -- irep and irep1. We should let
+ * pruning occur at the rep-column in irep1's snode.
+ */
+ if ( supno[irep] == supno[irep1] ) /* Don't prune */
+ continue;
+
+ /*
+ * If it has not been pruned & it has a nonz in row L[pivrow,i]
+ */
+ if ( supno[irep] != jsupno ) {
+ if ( xprune[irep] >= xlsub[irep1] ) {
+ kmin = xlsub[irep];
+ kmax = xlsub[irep1] - 1;
+ for (krow = kmin; krow <= kmax; krow++)
+ if ( lsub[krow] == pivrow ) {
+ do_prune = TRUE;
+ break;
+ }
+ }
+
+ if ( do_prune ) {
+
+ /* Do a quicksort-type partition
+ * movnum=TRUE means that the num values have to be exchanged.
+ */
+ movnum = FALSE;
+ if ( irep == xsup[supno[irep]] ) /* Snode of size 1 */
+ movnum = TRUE;
+
+ while ( kmin <= kmax ) {
+
+ if ( perm_r[lsub[kmax]] == EMPTY )
+ kmax--;
+ else if ( perm_r[lsub[kmin]] != EMPTY )
+ kmin++;
+ else { /* kmin below pivrow, and kmax above pivrow:
+ * interchange the two subscripts
+ */
+ ktemp = lsub[kmin];
+ lsub[kmin] = lsub[kmax];
+ lsub[kmax] = ktemp;
+
+ /* If the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript
+ * interchange performed, similar interchange must be
+ * done on the numerical values.
+ */
+ if ( movnum ) {
+ minloc = xlusup[irep] + (kmin - xlsub[irep]);
+ maxloc = xlusup[irep] + (kmax - xlsub[irep]);
+ utemp = lusup[minloc];
+ lusup[minloc] = lusup[maxloc];
+ lusup[maxloc] = utemp;
+ }
+
+ kmin++;
+ kmax--;
+
+ }
+
+ } /* while */
+
+ xprune[irep] = kmin; /* Pruning */
+
+#ifdef CHK_PRUNE
+ printf(" After cpruneL(),using col %d: xprune[%d] = %d\n",
+ jcol, irep, kmin);
+#endif
+ } /* if do_prune */
+
+ } /* if */
+
+ } /* for each U-segment... */
+}
diff --git a/SRC/creadhb.c b/SRC/creadhb.c
new file mode 100644
index 0000000..cc41b06
--- /dev/null
+++ b/SRC/creadhb.c
@@ -0,0 +1,266 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "csp_defs.h"
+
+
+/* Eat up the rest of the current line */
+int cDumpLine(FILE *fp)
+{
+ register int c;
+ while ((c = fgetc(fp)) != '\n') ;
+ return 0;
+}
+
+int cParseIntFormat(char *buf, int *num, int *size)
+{
+ char *tmp;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ sscanf(tmp, "%d", num);
+ while (*tmp != 'I' && *tmp != 'i') ++tmp;
+ ++tmp;
+ sscanf(tmp, "%d", size);
+ return 0;
+}
+
+int cParseFloatFormat(char *buf, int *num, int *size)
+{
+ char *tmp, *period;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ while (*tmp != 'E' && *tmp != 'e' && *tmp != 'D' && *tmp != 'd'
+ && *tmp != 'F' && *tmp != 'f') {
+ /* May find kP before nE/nD/nF, like (1P6F13.6). In this case the
+ num picked up refers to P, which should be skipped. */
+ if (*tmp=='p' || *tmp=='P') {
+ ++tmp;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ } else {
+ ++tmp;
+ }
+ }
+ ++tmp;
+ period = tmp;
+ while (*period != '.' && *period != ')') ++period ;
+ *period = '\0';
+ *size = atoi(tmp); /*sscanf(tmp, "%2d", size);*/
+
+ return 0;
+}
+
+int cReadVector(FILE *fp, int n, int *where, int perline, int persize)
+{
+ register int i, j, item;
+ char tmp, buf[100];
+
+ i = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ item = atoi(&buf[j*persize]);
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ where[i++] = item - 1;
+ }
+ }
+
+ return 0;
+}
+
+/* Read complex numbers as pairs of (real, imaginary) */
+int cReadValues(FILE *fp, int n, complex *destination, int perline, int persize)
+{
+ register int i, j, k, s, pair;
+ register float realpart;
+ char tmp, buf[100];
+
+ i = pair = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ s = j*persize;
+ for (k = 0; k < persize; ++k) /* No D_ format in C */
+ if ( buf[s+k] == 'D' || buf[s+k] == 'd' ) buf[s+k] = 'E';
+ if ( pair == 0 ) {
+ /* The value is real part */
+ realpart = atof(&buf[s]);
+ pair = 1;
+ } else {
+ /* The value is imaginary part */
+ destination[i].r = realpart;
+ destination[i++].i = atof(&buf[s]);
+ pair = 0;
+ }
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ }
+ }
+
+ return 0;
+}
+
+
+void
+creadhb(int *nrow, int *ncol, int *nonz,
+ complex **nzval, int **rowind, int **colptr)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Read a COMPLEX PRECISION matrix stored in Harwell-Boeing format
+ * as described below.
+ *
+ * Line 1 (A72,A8)
+ * Col. 1 - 72 Title (TITLE)
+ * Col. 73 - 80 Key (KEY)
+ *
+ * Line 2 (5I14)
+ * Col. 1 - 14 Total number of lines excluding header (TOTCRD)
+ * Col. 15 - 28 Number of lines for pointers (PTRCRD)
+ * Col. 29 - 42 Number of lines for row (or variable) indices (INDCRD)
+ * Col. 43 - 56 Number of lines for numerical values (VALCRD)
+ * Col. 57 - 70 Number of lines for right-hand sides (RHSCRD)
+ * (including starting guesses and solution vectors
+ * if present)
+ * (zero indicates no right-hand side data is present)
+ *
+ * Line 3 (A3, 11X, 4I14)
+ * Col. 1 - 3 Matrix type (see below) (MXTYPE)
+ * Col. 15 - 28 Number of rows (or variables) (NROW)
+ * Col. 29 - 42 Number of columns (or elements) (NCOL)
+ * Col. 43 - 56 Number of row (or variable) indices (NNZERO)
+ * (equal to number of entries for assembled matrices)
+ * Col. 57 - 70 Number of elemental matrix entries (NELTVL)
+ * (zero in the case of assembled matrices)
+ * Line 4 (2A16, 2A20)
+ * Col. 1 - 16 Format for pointers (PTRFMT)
+ * Col. 17 - 32 Format for row (or variable) indices (INDFMT)
+ * Col. 33 - 52 Format for numerical values of coefficient matrix (VALFMT)
+ * Col. 53 - 72 Format for numerical values of right-hand sides (RHSFMT)
+ *
+ * Line 5 (A3, 11X, 2I14) Only present if there are right-hand sides present
+ * Col. 1 Right-hand side type:
+ * F for full storage or M for same format as matrix
+ * Col. 2 G if a starting vector(s) (Guess) is supplied. (RHSTYP)
+ * Col. 3 X if an exact solution vector(s) is supplied.
+ * Col. 15 - 28 Number of right-hand sides (NRHS)
+ * Col. 29 - 42 Number of row indices (NRHSIX)
+ * (ignored in case of unassembled matrices)
+ *
+ * The three character type field on line 3 describes the matrix type.
+ * The following table lists the permitted values for each of the three
+ * characters. As an example of the type field, RSA denotes that the matrix
+ * is real, symmetric, and assembled.
+ *
+ * First Character:
+ * R Real matrix
+ * C Complex matrix
+ * P Pattern only (no numerical values supplied)
+ *
+ * Second Character:
+ * S Symmetric
+ * U Unsymmetric
+ * H Hermitian
+ * Z Skew symmetric
+ * R Rectangular
+ *
+ * Third Character:
+ * A Assembled
+ * E Elemental matrices (unassembled)
+ *
+ */
+
+ register int i, numer_lines = 0, rhscrd = 0;
+ int tmp, colnum, colsize, rownum, rowsize, valnum, valsize;
+ char buf[100], type[4], key[10];
+ FILE *fp;
+
+ fp = stdin;
+
+ /* Line 1 */
+ fgets(buf, 100, fp);
+ fputs(buf, stdout);
+#if 0
+ fscanf(fp, "%72c", buf); buf[72] = 0;
+ printf("Title: %s", buf);
+ fscanf(fp, "%8c", key); key[8] = 0;
+ printf("Key: %s\n", key);
+ cDumpLine(fp);
+#endif
+
+ /* Line 2 */
+ for (i=0; i<5; i++) {
+ fscanf(fp, "%14c", buf); buf[14] = 0;
+ sscanf(buf, "%d", &tmp);
+ if (i == 3) numer_lines = tmp;
+ if (i == 4 && tmp) rhscrd = tmp;
+ }
+ cDumpLine(fp);
+
+ /* Line 3 */
+ fscanf(fp, "%3c", type);
+ fscanf(fp, "%11c", buf); /* pad */
+ type[3] = 0;
+#ifdef DEBUG
+ printf("Matrix type %s\n", type);
+#endif
+
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nrow);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", ncol);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nonz);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", &tmp);
+
+ if (tmp != 0)
+ printf("This is not an assembled matrix!\n");
+ if (*nrow != *ncol)
+ printf("Matrix is not square.\n");
+ cDumpLine(fp);
+
+ /* Allocate storage for the three arrays ( nzval, rowind, colptr ) */
+ callocateA(*ncol, *nonz, nzval, rowind, colptr);
+
+ /* Line 4: format statement */
+ fscanf(fp, "%16c", buf);
+ cParseIntFormat(buf, &colnum, &colsize);
+ fscanf(fp, "%16c", buf);
+ cParseIntFormat(buf, &rownum, &rowsize);
+ fscanf(fp, "%20c", buf);
+ cParseFloatFormat(buf, &valnum, &valsize);
+ fscanf(fp, "%20c", buf);
+ cDumpLine(fp);
+
+ /* Line 5: right-hand side */
+ if ( rhscrd ) cDumpLine(fp); /* skip RHSFMT */
+
+#ifdef DEBUG
+ printf("%d rows, %d nonzeros\n", *nrow, *nonz);
+ printf("colnum %d, colsize %d\n", colnum, colsize);
+ printf("rownum %d, rowsize %d\n", rownum, rowsize);
+ printf("valnum %d, valsize %d\n", valnum, valsize);
+#endif
+
+ cReadVector(fp, *ncol+1, *colptr, colnum, colsize);
+ cReadVector(fp, *nonz, *rowind, rownum, rowsize);
+ if ( numer_lines ) {
+ cReadValues(fp, *nonz, *nzval, valnum, valsize);
+ }
+
+ fclose(fp);
+
+}
+
diff --git a/SRC/csnode_bmod.c b/SRC/csnode_bmod.c
new file mode 100644
index 0000000..e552240
--- /dev/null
+++ b/SRC/csnode_bmod.c
@@ -0,0 +1,118 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+
+
+/*
+ * Performs numeric block updates within the relaxed snode.
+ */
+int
+csnode_bmod (
+ const int jcol, /* in */
+ const int jsupno, /* in */
+ const int fsupc, /* in */
+ complex *dense, /* in */
+ complex *tempv, /* working array */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ complex alpha = {-1.0, 0.0}, beta = {1.0, 0.0};
+#endif
+
+ complex comp_zero = {0.0, 0.0};
+ int luptr, nsupc, nsupr, nrow;
+ int isub, irow, i, iptr;
+ register int ufirst, nextlu;
+ int *lsub, *xlsub;
+ complex *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ nextlu = xlusup[jcol];
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = comp_zero;
+ ++nextlu;
+ }
+
+ xlusup[jcol + 1] = nextlu; /* Initialize xlusup for next column */
+
+ if ( fsupc < jcol ) {
+
+ luptr = xlusup[fsupc];
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nsupc = jcol - fsupc; /* Excluding jcol */
+ ufirst = xlusup[jcol]; /* Points to the beginning of column
+ jcol in supernode L\U(jsupno). */
+ nrow = nsupr - nsupc;
+
+ ops[TRSV] += 4 * nsupc * (nsupc - 1);
+ ops[GEMV] += 8 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ CGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ ctrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ cgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ clsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+ cmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], &tempv[0] );
+
+ /* Scatter tempv[*] into lusup[*] */
+ iptr = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ c_sub(&lusup[iptr], &lusup[iptr], &tempv[i]);
+ ++iptr;
+ tempv[i] = comp_zero;
+ }
+#endif
+
+ }
+
+ return 0;
+}
diff --git a/SRC/csnode_dfs.c b/SRC/csnode_dfs.c
new file mode 100644
index 0000000..4892c44
--- /dev/null
+++ b/SRC/csnode_dfs.c
@@ -0,0 +1,106 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "csp_defs.h"
+#include "util.h"
+
+int
+csnode_dfs (
+ const int jcol, /* in - start of the supernode */
+ const int kcol, /* in - end of the supernode */
+ const int *asub, /* in */
+ const int *xa_begin, /* in */
+ const int *xa_end, /* in */
+ int *xprune, /* out */
+ int *marker, /* modified */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/* Purpose
+ * =======
+ * csnode_dfs() - Determine the union of the row structures of those
+ * columns within the relaxed snode.
+ * Note: The relaxed snodes are leaves of the supernodal etree, therefore,
+ * the portion outside the rectangular supernode must be zero.
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * >0 number of bytes allocated when run out of memory.
+ *
+ */
+ register int i, k, ifrom, ito, nextl, new_next;
+ int nsuper, krow, kmark, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ int nzlmax;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ nsuper = ++supno[jcol]; /* Next available supernode number */
+ nextl = xlsub[jcol];
+
+ for (i = jcol; i <= kcol; i++) {
+ /* For each nonzero in A[*,i] */
+ for (k = xa_begin[i]; k < xa_end[i]; k++) {
+ krow = asub[k];
+ kmark = marker[krow];
+ if ( kmark != kcol ) { /* First time visit krow */
+ marker[krow] = kcol;
+ lsub[nextl++] = krow;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = cLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ }
+ }
+ supno[i] = nsuper;
+ }
+
+ /* Supernode > 1, then make a copy of the subscripts for pruning */
+ if ( jcol < kcol ) {
+ new_next = nextl + (nextl - xlsub[jcol]);
+ while ( new_next > nzlmax ) {
+ if ( mem_error = cLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ ito = nextl;
+ for (ifrom = xlsub[jcol]; ifrom < nextl; )
+ lsub[ito++] = lsub[ifrom++];
+ for (i = jcol+1; i <= kcol; i++) xlsub[i] = nextl;
+ nextl = ito;
+ }
+
+ xsup[nsuper+1] = kcol + 1;
+ supno[kcol+1] = nsuper;
+ xprune[kcol] = nextl;
+ xlsub[kcol+1] = nextl;
+
+ return 0;
+}
+
diff --git a/SRC/csp_blas2.c b/SRC/csp_blas2.c
new file mode 100644
index 0000000..e18e2c1
--- /dev/null
+++ b/SRC/csp_blas2.c
@@ -0,0 +1,561 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: csp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "csp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void cusolve(int, int, complex*, complex*);
+void clsolve(int, int, complex*, complex*);
+void cmatvec(int, int, int, complex*, complex*, complex*);
+
+
+int
+sp_ctrsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, complex *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_ctrsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A^H*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_C, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_C, Mtype = TRU.
+ *
+ * x - (input/output) complex*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ complex *Lval, *Uval;
+ int incx = 1, incy = 1;
+ complex temp;
+ complex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ complex comp_zero = {0.0, 0.0};
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ complex *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") &&
+ !lsame_(trans, "C")) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_ctrsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = complexCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_ctrsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1);
+ solve_ops += 8 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ cc_mult(&comp_zero, &x[fsupc], &Lval[luptr]);
+ c_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ CGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ ctrsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ cgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ clsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ cmatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ c_sub(&x[irow], &x[irow], &work[i]); /* Scatter */
+ work[i] = comp_zero;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ c_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ cc_mult(&comp_zero, &x[fsupc], &Uval[i]);
+ c_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ cusolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ cc_mult(&comp_zero, &x[jcol], &Uval[i]);
+ c_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else if ( lsame_(trans, "T") ) { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 8 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ cc_mult(&comp_zero, &x[irow], &Lval[i]);
+ c_sub(&x[jcol], &x[jcol], &comp_zero);
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += 4 * nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ cc_mult(&comp_zero, &x[irow], &Uval[i]);
+ c_sub(&x[jcol], &x[jcol], &comp_zero);
+ }
+ }
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ c_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ } else { /* Form x := conj(inv(A'))*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := conj(inv(L'))*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 8 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ cc_conj(&temp, &Lval[i]);
+ cc_mult(&comp_zero, &x[irow], &temp);
+ c_sub(&x[jcol], &x[jcol], &comp_zero);
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += 4 * nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd(trans, strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("L", trans, "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := conj(inv(U'))*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ cc_conj(&temp, &Uval[i]);
+ cc_mult(&comp_zero, &x[irow], &temp);
+ c_sub(&x[jcol], &x[jcol], &comp_zero);
+ }
+ }
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ cc_conj(&temp, &Lval[luptr]);
+ c_div(&x[fsupc], &x[fsupc], &temp);
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd(trans, strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("U", trans, "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+int
+sp_cgemv(char *trans, complex alpha, SuperMatrix *A, complex *x,
+ int incx, complex beta, complex *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_cgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) complex
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+
+ X - (input) complex*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) complex
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) complex*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ complex *Aval;
+ int info;
+ complex temp, temp1;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+ complex comp_zero = {0.0, 0.0};
+ complex comp_one = {1.0, 0.0};
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_cgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 ||
+ c_eq(&alpha, &comp_zero) &&
+ c_eq(&beta, &comp_one))
+ return 0;
+
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if ( !c_eq(&beta, &comp_one) ) {
+ if (incy == 1) {
+ if ( c_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) y[i] = comp_zero;
+ else
+ for (i = 0; i < leny; ++i)
+ cc_mult(&y[i], &beta, &y[i]);
+ } else {
+ iy = ky;
+ if ( c_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) {
+ y[iy] = comp_zero;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ cc_mult(&y[iy], &beta, &y[iy]);
+ iy += incy;
+ }
+ }
+ }
+
+ if ( c_eq(&alpha, &comp_zero) ) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if ( !c_eq(&x[jx], &comp_zero) ) {
+ cc_mult(&temp, &alpha, &x[jx]);
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ cc_mult(&temp1, &temp, &Aval[i]);
+ c_add(&y[irow], &y[irow], &temp1);
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = comp_zero;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ cc_mult(&temp1, &Aval[i], &x[irow]);
+ c_add(&temp, &temp, &temp1);
+ }
+ cc_mult(&temp1, &alpha, &temp);
+ c_add(&y[jy], &y[jy], &temp1);
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_cgemv */
+
diff --git a/SRC/csp_blas2.c.bak b/SRC/csp_blas2.c.bak
new file mode 100644
index 0000000..bc6cb28
--- /dev/null
+++ b/SRC/csp_blas2.c.bak
@@ -0,0 +1,479 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: csp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "csp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void cusolve(int, int, complex*, complex*);
+void clsolve(int, int, complex*, complex*);
+void cmatvec(int, int, int, complex*, complex*, complex*);
+
+
+int
+sp_ctrsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, complex *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_ctrsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A'*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_C, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_C, Mtype = TRU.
+ *
+ * x - (input/output) complex*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ complex *Lval, *Uval;
+ int incx = 1, incy = 1;
+ complex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ complex comp_zero = {0.0, 0.0};
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ complex *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") ) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_ctrsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = complexCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_ctrsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1);
+ solve_ops += 8 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ cc_mult(&comp_zero, &x[fsupc], &Lval[luptr]);
+ c_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ CGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ ctrsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ cgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ clsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ cmatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ c_sub(&x[irow], &x[irow], &work[i]); /* Scatter */
+ work[i] = comp_zero;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ c_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ cc_mult(&comp_zero, &x[fsupc], &Uval[i]);
+ c_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ cusolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ cc_mult(&comp_zero, &x[jcol], &Uval[i]);
+ c_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 8 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ cc_mult(&comp_zero, &x[irow], &Lval[i]);
+ c_sub(&x[jcol], &x[jcol], &comp_zero);
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += 4 * nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ cc_mult(&comp_zero, &x[irow], &Uval[i]);
+ c_sub(&x[jcol], &x[jcol], &comp_zero);
+ }
+ }
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ c_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ctrsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+int
+sp_cgemv(char *trans, complex alpha, SuperMatrix *A, complex *x,
+ int incx, complex beta, complex *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_cgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) complex
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+
+ X - (input) complex*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) complex
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) complex*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ complex *Aval;
+ int info;
+ complex temp, temp1;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+ complex comp_zero = {0.0, 0.0};
+ complex comp_one = {1.0, 0.0};
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_cgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 ||
+ c_eq(&alpha, &comp_zero) &&
+ c_eq(&beta, &comp_one))
+ return 0;
+
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if ( !c_eq(&beta, &comp_one) ) {
+ if (incy == 1) {
+ if ( c_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) y[i] = comp_zero;
+ else
+ for (i = 0; i < leny; ++i)
+ cc_mult(&y[i], &beta, &y[i]);
+ } else {
+ iy = ky;
+ if ( c_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) {
+ y[iy] = comp_zero;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ cc_mult(&y[iy], &beta, &y[iy]);
+ iy += incy;
+ }
+ }
+ }
+
+ if ( c_eq(&alpha, &comp_zero) ) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if ( !c_eq(&x[jx], &comp_zero) ) {
+ cc_mult(&temp, &alpha, &x[jx]);
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ cc_mult(&temp1, &temp, &Aval[i]);
+ c_add(&y[irow], &y[irow], &temp1);
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = comp_zero;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ cc_mult(&temp1, &Aval[i], &x[irow]);
+ c_add(&temp, &temp, &temp1);
+ }
+ cc_mult(&temp1, &alpha, &temp);
+ c_add(&y[jy], &y[jy], &temp1);
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_cgemv */
+
diff --git a/SRC/csp_blas3.c b/SRC/csp_blas3.c
new file mode 100644
index 0000000..8dc9f5a
--- /dev/null
+++ b/SRC/csp_blas3.c
@@ -0,0 +1,121 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: sp_blas3.c
+ * Purpose: Sparse BLAS3, using some dense BLAS3 operations.
+ */
+
+#include "csp_defs.h"
+#include "util.h"
+
+int
+sp_cgemm(char *transa, char *transb, int m, int n, int k,
+ complex alpha, SuperMatrix *A, complex *b, int ldb,
+ complex beta, complex *c, int ldc)
+{
+/* Purpose
+ =======
+
+ sp_c performs one of the matrix-matrix operations
+
+ C := alpha*op( A )*op( B ) + beta*C,
+
+ where op( X ) is one of
+
+ op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ),
+
+ alpha and beta are scalars, and A, B and C are matrices, with op( A )
+ an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+
+
+ Parameters
+ ==========
+
+ TRANSA - (input) char*
+ On entry, TRANSA specifies the form of op( A ) to be used in
+ the matrix multiplication as follows:
+ TRANSA = 'N' or 'n', op( A ) = A.
+ TRANSA = 'T' or 't', op( A ) = A'.
+ TRANSA = 'C' or 'c', op( A ) = conjg( A' ).
+ Unchanged on exit.
+
+ TRANSB - (input) char*
+ On entry, TRANSB specifies the form of op( B ) to be used in
+ the matrix multiplication as follows:
+ TRANSB = 'N' or 'n', op( B ) = B.
+ TRANSB = 'T' or 't', op( B ) = B'.
+ TRANSB = 'C' or 'c', op( B ) = conjg( B' ).
+ Unchanged on exit.
+
+ M - (input) int
+ On entry, M specifies the number of rows of the matrix
+ op( A ) and of the matrix C. M must be at least zero.
+ Unchanged on exit.
+
+ N - (input) int
+ On entry, N specifies the number of columns of the matrix
+ op( B ) and the number of columns of the matrix C. N must be
+ at least zero.
+ Unchanged on exit.
+
+ K - (input) int
+ On entry, K specifies the number of columns of the matrix
+ op( A ) and the number of rows of the matrix op( B ). K must
+ be at least zero.
+ Unchanged on exit.
+
+ ALPHA - (input) complex
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_C; Mtype = GE.
+ In the future, more general A can be handled.
+
+ B - COMPLEX PRECISION array of DIMENSION ( LDB, kb ), where kb is
+ n when TRANSB = 'N' or 'n', and is k otherwise.
+ Before entry with TRANSB = 'N' or 'n', the leading k by n
+ part of the array B must contain the matrix B, otherwise
+ the leading n by k part of the array B must contain the
+ matrix B.
+ Unchanged on exit.
+
+ LDB - (input) int
+ On entry, LDB specifies the first dimension of B as declared
+ in the calling (sub) program. LDB must be at least max( 1, n ).
+ Unchanged on exit.
+
+ BETA - (input) complex
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then C need not be set on input.
+
+ C - COMPLEX PRECISION array of DIMENSION ( LDC, n ).
+ Before entry, the leading m by n part of the array C must
+ contain the matrix C, except when beta is zero, in which
+ case C need not be set on entry.
+ On exit, the array C is overwritten by the m by n matrix
+ ( alpha*op( A )*B + beta*C ).
+
+ LDC - (input) int
+ On entry, LDC specifies the first dimension of C as declared
+ in the calling (sub)program. LDC must be at least max(1,m).
+ Unchanged on exit.
+
+ ==== Sparse Level 3 Blas routine.
+*/
+ int incx = 1, incy = 1;
+ int j;
+
+ for (j = 0; j < n; ++j) {
+ sp_cgemv(transa, alpha, A, &b[ldb*j], incx, beta, &c[ldc*j], incy);
+ }
+ return 0;
+}
diff --git a/SRC/csp_defs.h b/SRC/csp_defs.h
new file mode 100644
index 0000000..d8b5def
--- /dev/null
+++ b/SRC/csp_defs.h
@@ -0,0 +1,237 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#ifndef __SUPERLU_cSP_DEFS /* allow multiple inclusions */
+#define __SUPERLU_cSP_DEFS
+
+/*
+ * File name: csp_defs.h
+ * Purpose: Sparse matrix types and function prototypes
+ * History:
+ */
+
+#ifdef _CRAY
+#include <fortran.h>
+#include <string.h>
+#endif
+
+/* Define my integer type int_t */
+typedef int int_t; /* default */
+
+#include "Cnames.h"
+#include "supermatrix.h"
+#include "util.h"
+#include "scomplex.h"
+
+
+/*
+ * Global data structures used in LU factorization -
+ *
+ * nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].
+ * (xsup,supno): supno[i] is the supernode no to which i belongs;
+ * xsup(s) points to the beginning of the s-th supernode.
+ * e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12)
+ * xsup 0 1 2 4 7 12
+ * Note: dfs will be performed on supernode rep. relative to the new
+ * row pivoting ordering
+ *
+ * (xlsub,lsub): lsub[*] contains the compressed subscript of
+ * rectangular supernodes; xlsub[j] points to the starting
+ * location of the j-th column in lsub[*]. Note that xlsub
+ * is indexed by column.
+ * Storage: original row subscripts
+ *
+ * During the course of sparse LU factorization, we also use
+ * (xlsub,lsub) for the purpose of symmetric pruning. For each
+ * supernode {s,s+1,...,t=s+r} with first column s and last
+ * column t, the subscript set
+ * lsub[j], j=xlsub[s], .., xlsub[s+1]-1
+ * is the structure of column s (i.e. structure of this supernode).
+ * It is used for the storage of numerical values.
+ * Furthermore,
+ * lsub[j], j=xlsub[t], .., xlsub[t+1]-1
+ * is the structure of the last column t of this supernode.
+ * It is for the purpose of symmetric pruning. Therefore, the
+ * structural subscripts can be rearranged without making physical
+ * interchanges among the numerical values.
+ *
+ * However, if the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript interchange
+ * performed, similar interchange must be done on the numerical
+ * values.
+ *
+ * The last column structures (for pruning) will be removed
+ * after the numercial LU factorization phase.
+ *
+ * (xlusup,lusup): lusup[*] contains the numerical values of the
+ * rectangular supernodes; xlusup[j] points to the starting
+ * location of the j-th column in storage vector lusup[*]
+ * Note: xlusup is indexed by column.
+ * Each rectangular supernode is stored by column-major
+ * scheme, consistent with Fortran 2-dim array storage.
+ *
+ * (xusub,ucol,usub): ucol[*] stores the numerical values of
+ * U-columns outside the rectangular supernodes. The row
+ * subscript of nonzero ucol[k] is stored in usub[k].
+ * xusub[i] points to the starting location of column i in ucol.
+ * Storage: new row subscripts; that is subscripts of PA.
+ */
+typedef struct {
+ int *xsup; /* supernode and column mapping */
+ int *supno;
+ int *lsub; /* compressed L subscripts */
+ int *xlsub;
+ complex *lusup; /* L supernodes */
+ int *xlusup;
+ complex *ucol; /* U columns */
+ int *usub;
+ int *xusub;
+ int nzlmax; /* current max size of lsub */
+ int nzumax; /* " " " ucol */
+ int nzlumax; /* " " " lusup */
+ int n; /* number of columns in the matrix */
+ LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
+} GlobalLU_t;
+
+typedef struct {
+ float for_lu;
+ float total_needed;
+ int expansions;
+} mem_usage_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Driver routines */
+extern void
+cgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
+extern void
+cgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
+ char *, float *, float *, SuperMatrix *, SuperMatrix *,
+ void *, int, SuperMatrix *, SuperMatrix *,
+ float *, float *, float *, float *,
+ mem_usage_t *, SuperLUStat_t *, int *);
+
+/* Supernodal LU factor related */
+extern void
+cCreate_CompCol_Matrix(SuperMatrix *, int, int, int, complex *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+cCreate_CompRow_Matrix(SuperMatrix *, int, int, int, complex *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+cCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
+extern void
+cCreate_Dense_Matrix(SuperMatrix *, int, int, complex *, int,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+cCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, complex *,
+ int *, int *, int *, int *, int *,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+cCopy_Dense_Matrix(int, int, complex *, int, complex *, int);
+
+extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
+extern void fixupL (const int, const int *, GlobalLU_t *);
+
+extern void callocateA (int, int, complex **, int **, int **);
+extern void cgstrf (superlu_options_t*, SuperMatrix*, float,
+ int, int, int*, void *, int, int *, int *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
+extern int csnode_dfs (const int, const int, const int *, const int *,
+ const int *, int *, int *, GlobalLU_t *);
+extern int csnode_bmod (const int, const int, const int, complex *,
+ complex *, GlobalLU_t *, SuperLUStat_t*);
+extern void cpanel_dfs (const int, const int, const int, SuperMatrix *,
+ int *, int *, complex *, int *, int *, int *,
+ int *, int *, int *, int *, GlobalLU_t *);
+extern void cpanel_bmod (const int, const int, const int, const int,
+ complex *, complex *, int *, int *,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int ccolumn_dfs (const int, const int, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *, GlobalLU_t *);
+extern int ccolumn_bmod (const int, const int, complex *,
+ complex *, int *, int *, int,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int ccopy_to_ucol (int, int, int *, int *, int *,
+ complex *, GlobalLU_t *);
+extern int cpivotL (const int, const float, int *, int *,
+ int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
+extern void cpruneL (const int, const int *, const int, const int,
+ const int *, const int *, int *, GlobalLU_t *);
+extern void creadmt (int *, int *, int *, complex **, int **, int **);
+extern void cGenXtrue (int, int, complex *, int);
+extern void cFillRHS (trans_t, int, complex *, int, SuperMatrix *,
+ SuperMatrix *);
+extern void cgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
+ SuperMatrix *, SuperLUStat_t*, int *);
+
+
+/* Driver related */
+
+extern void cgsequ (SuperMatrix *, float *, float *, float *,
+ float *, float *, int *);
+extern void claqgs (SuperMatrix *, float *, float *, float,
+ float, float, char *);
+extern void cgscon (char *, SuperMatrix *, SuperMatrix *,
+ float, float *, SuperLUStat_t*, int *);
+extern float cPivotGrowth(int, SuperMatrix *, int *,
+ SuperMatrix *, SuperMatrix *);
+extern void cgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, int *, char *, float *,
+ float *, SuperMatrix *, SuperMatrix *,
+ float *, float *, SuperLUStat_t*, int *);
+
+extern int sp_ctrsv (char *, char *, char *, SuperMatrix *,
+ SuperMatrix *, complex *, SuperLUStat_t*, int *);
+extern int sp_cgemv (char *, complex, SuperMatrix *, complex *,
+ int, complex, complex *, int);
+
+extern int sp_cgemm (char *, char *, int, int, int, complex,
+ SuperMatrix *, complex *, int, complex,
+ complex *, int);
+
+/* Memory-related */
+extern int cLUMemInit (fact_t, void *, int, int, int, int, int,
+ SuperMatrix *, SuperMatrix *,
+ GlobalLU_t *, int **, complex **);
+extern void cSetRWork (int, int, complex *, complex **, complex **);
+extern void cLUWorkFree (int *, complex *, GlobalLU_t *);
+extern int cLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
+
+extern complex *complexMalloc(int);
+extern complex *complexCalloc(int);
+extern float *floatMalloc(int);
+extern float *floatCalloc(int);
+extern int cmemory_usage(const int, const int, const int, const int);
+extern int cQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
+
+/* Auxiliary routines */
+extern void creadhb(int *, int *, int *, complex **, int **, int **);
+extern void cCompRow_to_CompCol(int, int, int, complex*, int*, int*,
+ complex **, int **, int **);
+extern void cfill (complex *, int, complex);
+extern void cinf_norm_error (int, SuperMatrix *, complex *);
+extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
+ complex, complex, complex *, complex *, char *);
+
+/* Routines for debugging */
+extern void cPrint_CompCol_Matrix(char *, SuperMatrix *);
+extern void cPrint_SuperNode_Matrix(char *, SuperMatrix *);
+extern void cPrint_Dense_Matrix(char *, SuperMatrix *);
+extern void print_lu_col(char *, int, int, int *, GlobalLU_t *);
+extern void check_tempv(int, complex *);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* __SUPERLU_cSP_DEFS */
+
diff --git a/SRC/cutil.c b/SRC/cutil.c
new file mode 100644
index 0000000..4c7f985
--- /dev/null
+++ b/SRC/cutil.c
@@ -0,0 +1,481 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include "csp_defs.h"
+
+void
+cCreate_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ complex *nzval, int *rowind, int *colptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NCformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NCformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->rowind = rowind;
+ Astore->colptr = colptr;
+}
+
+void
+cCreate_CompRow_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ complex *nzval, int *colind, int *rowptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NRformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NRformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->colind = colind;
+ Astore->rowptr = rowptr;
+}
+
+/* Copy matrix A into matrix B. */
+void
+cCopy_CompCol_Matrix(SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore, *Bstore;
+ int ncol, nnz, i;
+
+ B->Stype = A->Stype;
+ B->Dtype = A->Dtype;
+ B->Mtype = A->Mtype;
+ B->nrow = A->nrow;;
+ B->ncol = ncol = A->ncol;
+ Astore = (NCformat *) A->Store;
+ Bstore = (NCformat *) B->Store;
+ Bstore->nnz = nnz = Astore->nnz;
+ for (i = 0; i < nnz; ++i)
+ ((complex *)Bstore->nzval)[i] = ((complex *)Astore->nzval)[i];
+ for (i = 0; i < nnz; ++i) Bstore->rowind[i] = Astore->rowind[i];
+ for (i = 0; i <= ncol; ++i) Bstore->colptr[i] = Astore->colptr[i];
+}
+
+
+void
+cCreate_Dense_Matrix(SuperMatrix *X, int m, int n, complex *x, int ldx,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ DNformat *Xstore;
+
+ X->Stype = stype;
+ X->Dtype = dtype;
+ X->Mtype = mtype;
+ X->nrow = m;
+ X->ncol = n;
+ X->Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !(X->Store) ) ABORT("SUPERLU_MALLOC fails for X->Store");
+ Xstore = (DNformat *) X->Store;
+ Xstore->lda = ldx;
+ Xstore->nzval = (complex *) x;
+}
+
+void
+cCopy_Dense_Matrix(int M, int N, complex *X, int ldx,
+ complex *Y, int ldy)
+{
+/*
+ *
+ * Purpose
+ * =======
+ *
+ * Copies a two-dimensional matrix X to another matrix Y.
+ */
+ int i, j;
+
+ for (j = 0; j < N; ++j)
+ for (i = 0; i < M; ++i)
+ Y[i + j*ldy] = X[i + j*ldx];
+}
+
+void
+cCreate_SuperNode_Matrix(SuperMatrix *L, int m, int n, int nnz,
+ complex *nzval, int *nzval_colptr, int *rowind,
+ int *rowind_colptr, int *col_to_sup, int *sup_to_col,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ SCformat *Lstore;
+
+ L->Stype = stype;
+ L->Dtype = dtype;
+ L->Mtype = mtype;
+ L->nrow = m;
+ L->ncol = n;
+ L->Store = (void *) SUPERLU_MALLOC( sizeof(SCformat) );
+ if ( !(L->Store) ) ABORT("SUPERLU_MALLOC fails for L->Store");
+ Lstore = L->Store;
+ Lstore->nnz = nnz;
+ Lstore->nsuper = col_to_sup[n];
+ Lstore->nzval = nzval;
+ Lstore->nzval_colptr = nzval_colptr;
+ Lstore->rowind = rowind;
+ Lstore->rowind_colptr = rowind_colptr;
+ Lstore->col_to_sup = col_to_sup;
+ Lstore->sup_to_col = sup_to_col;
+
+}
+
+
+/*
+ * Convert a row compressed storage into a column compressed storage.
+ */
+void
+cCompRow_to_CompCol(int m, int n, int nnz,
+ complex *a, int *colind, int *rowptr,
+ complex **at, int **rowind, int **colptr)
+{
+ register int i, j, col, relpos;
+ int *marker;
+
+ /* Allocate storage for another copy of the matrix. */
+ *at = (complex *) complexMalloc(nnz);
+ *rowind = (int *) intMalloc(nnz);
+ *colptr = (int *) intMalloc(n+1);
+ marker = (int *) intCalloc(n);
+
+ /* Get counts of each column of A, and set up column pointers */
+ for (i = 0; i < m; ++i)
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) ++marker[colind[j]];
+ (*colptr)[0] = 0;
+ for (j = 0; j < n; ++j) {
+ (*colptr)[j+1] = (*colptr)[j] + marker[j];
+ marker[j] = (*colptr)[j];
+ }
+
+ /* Transfer the matrix into the compressed column storage. */
+ for (i = 0; i < m; ++i) {
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) {
+ col = colind[j];
+ relpos = marker[col];
+ (*rowind)[relpos] = i;
+ (*at)[relpos] = a[j];
+ ++marker[col];
+ }
+ }
+
+ SUPERLU_FREE(marker);
+}
+
+
+void
+cPrint_CompCol_Matrix(char *what, SuperMatrix *A)
+{
+ NCformat *Astore;
+ register int i,n;
+ float *dp;
+
+ printf("\nCompCol matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (NCformat *) A->Store;
+ dp = (float *) Astore->nzval;
+ printf("nrow %d, ncol %d, nnz %d\n", A->nrow,A->ncol,Astore->nnz);
+ printf("nzval: ");
+ for (i = 0; i < 2*Astore->colptr[n]; ++i) printf("%f ", dp[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->colptr[n]; ++i) printf("%d ", Astore->rowind[i]);
+ printf("\ncolptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->colptr[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+cPrint_SuperNode_Matrix(char *what, SuperMatrix *A)
+{
+ SCformat *Astore;
+ register int i, j, k, c, d, n, nsup;
+ float *dp;
+ int *col_to_sup, *sup_to_col, *rowind, *rowind_colptr;
+
+ printf("\nSuperNode matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (SCformat *) A->Store;
+ dp = (float *) Astore->nzval;
+ col_to_sup = Astore->col_to_sup;
+ sup_to_col = Astore->sup_to_col;
+ rowind_colptr = Astore->rowind_colptr;
+ rowind = Astore->rowind;
+ printf("nrow %d, ncol %d, nnz %d, nsuper %d\n",
+ A->nrow,A->ncol,Astore->nnz,Astore->nsuper);
+ printf("nzval:\n");
+ for (k = 0; k <= Astore->nsuper; ++k) {
+ c = sup_to_col[k];
+ nsup = sup_to_col[k+1] - c;
+ for (j = c; j < c + nsup; ++j) {
+ d = Astore->nzval_colptr[j];
+ for (i = rowind_colptr[c]; i < rowind_colptr[c+1]; ++i) {
+ printf("%d\t%d\t%e\t%e\n", rowind[i], j, dp[d++], dp[d++]);
+ }
+ }
+ }
+#if 0
+ for (i = 0; i < 2*Astore->nzval_colptr[n]; ++i) printf("%f ", dp[i]);
+#endif
+ printf("\nnzval_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->nzval_colptr[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->rowind_colptr[n]; ++i)
+ printf("%d ", Astore->rowind[i]);
+ printf("\nrowind_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->rowind_colptr[i]);
+ printf("\ncol_to_sup: ");
+ for (i = 0; i < n; ++i) printf("%d ", col_to_sup[i]);
+ printf("\nsup_to_col: ");
+ for (i = 0; i <= Astore->nsuper+1; ++i)
+ printf("%d ", sup_to_col[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+cPrint_Dense_Matrix(char *what, SuperMatrix *A)
+{
+ DNformat *Astore;
+ register int i;
+ float *dp;
+
+ printf("\nDense matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ Astore = (DNformat *) A->Store;
+ dp = (float *) Astore->nzval;
+ printf("nrow %d, ncol %d, lda %d\n", A->nrow,A->ncol,Astore->lda);
+ printf("\nnzval: ");
+ for (i = 0; i < 2*A->nrow; ++i) printf("%f ", dp[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+/*
+ * Diagnostic print of column "jcol" in the U/L factor.
+ */
+void
+cprint_lu_col(char *msg, int jcol, int pivrow, int *xprune, GlobalLU_t *Glu)
+{
+ int i, k, fsupc;
+ int *xsup, *supno;
+ int *xlsub, *lsub;
+ complex *lusup;
+ int *xlusup;
+ complex *ucol;
+ int *usub, *xusub;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+
+ printf("%s", msg);
+ printf("col %d: pivrow %d, supno %d, xprune %d\n",
+ jcol, pivrow, supno[jcol], xprune[jcol]);
+
+ printf("\tU-col:\n");
+ for (i = xusub[jcol]; i < xusub[jcol+1]; i++)
+ printf("\t%d%10.4f, %10.4f\n", usub[i], ucol[i].r, ucol[i].i);
+ printf("\tL-col in rectangular snode:\n");
+ fsupc = xsup[supno[jcol]]; /* first col of the snode */
+ i = xlsub[fsupc];
+ k = xlusup[jcol];
+ while ( i < xlsub[fsupc+1] && k < xlusup[jcol+1] ) {
+ printf("\t%d\t%10.4f, %10.4f\n", lsub[i], lusup[k].r, lusup[k].i);
+ i++; k++;
+ }
+ fflush(stdout);
+}
+
+
+/*
+ * Check whether tempv[] == 0. This should be true before and after
+ * calling any numeric routines, i.e., "panel_bmod" and "column_bmod".
+ */
+void ccheck_tempv(int n, complex *tempv)
+{
+ int i;
+
+ for (i = 0; i < n; i++) {
+ if ((tempv[i].r != 0.0) || (tempv[i].i != 0.0))
+ {
+ fprintf(stderr,"tempv[%d] = {%f, %f}\n", i, tempv[i].r, tempv[i].i);
+ ABORT("ccheck_tempv");
+ }
+ }
+}
+
+
+void
+cGenXtrue(int n, int nrhs, complex *x, int ldx)
+{
+ int i, j;
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < n; ++i) {
+ x[i + j*ldx].r = 1.0;
+ x[i + j*ldx].i = 0.0;
+ }
+}
+
+/*
+ * Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's
+ */
+void
+cFillRHS(trans_t trans, int nrhs, complex *x, int ldx,
+ SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore;
+ complex *Aval;
+ DNformat *Bstore;
+ complex *rhs;
+ complex one = {1.0, 0.0};
+ complex zero = {0.0, 0.0};
+ int ldc;
+ char transc[1];
+
+ Astore = A->Store;
+ Aval = (complex *) Astore->nzval;
+ Bstore = B->Store;
+ rhs = Bstore->nzval;
+ ldc = Bstore->lda;
+
+ if ( trans == NOTRANS ) *(unsigned char *)transc = 'N';
+ else *(unsigned char *)transc = 'T';
+
+ sp_cgemm(transc, "N", A->nrow, nrhs, A->ncol, one, A,
+ x, ldx, zero, rhs, ldc);
+
+}
+
+/*
+ * Fills a complex precision array with a given value.
+ */
+void
+cfill(complex *a, int alen, complex dval)
+{
+ register int i;
+ for (i = 0; i < alen; i++) a[i] = dval;
+}
+
+
+
+/*
+ * Check the inf-norm of the error vector
+ */
+void cinf_norm_error(int nrhs, SuperMatrix *X, complex *xtrue)
+{
+ DNformat *Xstore;
+ float err, xnorm;
+ complex *Xmat, *soln_work;
+ complex temp;
+ int i, j;
+
+ Xstore = X->Store;
+ Xmat = Xstore->nzval;
+
+ for (j = 0; j < nrhs; j++) {
+ soln_work = &Xmat[j*Xstore->lda];
+ err = xnorm = 0.0;
+ for (i = 0; i < X->nrow; i++) {
+ c_sub(&temp, &soln_work[i], &xtrue[i]);
+ err = SUPERLU_MAX(err, c_abs(&temp));
+ xnorm = SUPERLU_MAX(xnorm, c_abs(&soln_work[i]));
+ }
+ err = err / xnorm;
+ printf("||X - Xtrue||/||X|| = %e\n", err);
+ }
+}
+
+
+
+/* Print performance of the code. */
+void
+cPrintPerf(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage,
+ float rpg, float rcond, float *ferr,
+ float *berr, char *equed, SuperLUStat_t *stat)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *utime;
+ flops_t *ops;
+
+ utime = stat->utime;
+ ops = stat->ops;
+
+ if ( utime[FACT] != 0. )
+ printf("Factor flops = %e\tMflops = %8.2f\n", ops[FACT],
+ ops[FACT]*1e-6/utime[FACT]);
+ printf("Identify relaxed snodes = %8.2f\n", utime[RELAX]);
+ if ( utime[SOLVE] != 0. )
+ printf("Solve flops = %.0f, Mflops = %8.2f\n", ops[SOLVE],
+ ops[SOLVE]*1e-6/utime[SOLVE]);
+
+ Lstore = (SCformat *) L->Store;
+ Ustore = (NCformat *) U->Store;
+ printf("\tNo of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("\tNo of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("\tNo of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz);
+
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage->for_lu/1e6, mem_usage->total_needed/1e6,
+ mem_usage->expansions);
+
+ printf("\tFactor\tMflops\tSolve\tMflops\tEtree\tEquil\tRcond\tRefine\n");
+ printf("PERF:%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f\n",
+ utime[FACT], ops[FACT]*1e-6/utime[FACT],
+ utime[SOLVE], ops[SOLVE]*1e-6/utime[SOLVE],
+ utime[ETREE], utime[EQUIL], utime[RCOND], utime[REFINE]);
+
+ printf("\tRpg\t\tRcond\t\tFerr\t\tBerr\t\tEquil?\n");
+ printf("NUM:\t%e\t%e\t%e\t%e\t%s\n",
+ rpg, rcond, ferr[0], berr[0], equed);
+
+}
+
+
+
+
+print_complex_vec(char *what, int n, complex *vec)
+{
+ int i;
+ printf("%s: n %d\n", what, n);
+ for (i = 0; i < n; ++i) printf("%d\t%f%f\n", i, vec[i].r, vec[i].i);
+ return 0;
+}
+
diff --git a/SRC/dGetDiagU.c b/SRC/dGetDiagU.c
new file mode 100644
index 0000000..c644c07
--- /dev/null
+++ b/SRC/dGetDiagU.c
@@ -0,0 +1,59 @@
+/*
+ * -- Auxiliary routine in SuperLU (version 2.0) --
+ * Lawrence Berkeley National Lab, Univ. of California Berkeley.
+ * Xiaoye S. Li
+ * September 11, 2003
+ *
+ */
+
+#include "dsp_defs.h"
+
+
+void dGetDiagU(SuperMatrix *L, double *diagU)
+{
+ /*
+ * Purpose
+ * =======
+ *
+ * GetDiagU extracts the main diagonal of matrix U of the LU factorization.
+ *
+ * Arguments
+ * =========
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * diagU (output) double*, dimension (n)
+ * The main diagonal of matrix U.
+ *
+ * Note
+ * ====
+ * The diagonal blocks of the L and U matrices are stored in the L
+ * data structures.
+ *
+ */
+ int_t i, k, nsupers;
+ int_t fsupc, nsupr, nsupc, luptr;
+ double *dblock, *Lval;
+ SCformat *Lstore;
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ nsupers = Lstore->nsuper + 1;
+
+ for (k = 0; k < nsupers; ++k) {
+ fsupc = L_FST_SUPC(k);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ luptr = L_NZ_START(fsupc);
+
+ dblock = &diagU[fsupc];
+ for (i = 0; i < nsupc; ++i) {
+ dblock[i] = Lval[luptr];
+ luptr += nsupr + 1;
+ }
+ }
+}
+
diff --git a/SRC/dcolumn_bmod.c b/SRC/dcolumn_bmod.c
new file mode 100644
index 0000000..43fc18f
--- /dev/null
+++ b/SRC/dcolumn_bmod.c
@@ -0,0 +1,348 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "dsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void dusolve(int, int, double*, double*);
+void dlsolve(int, int, double*, double*);
+void dmatvec(int, int, int, double*, double*, double*);
+
+
+
+/* Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+dcolumn_bmod (
+ const int jcol, /* in */
+ const int nseg, /* in */
+ double *dense, /* in */
+ double *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int fpanelc, /* in -- first column in the current panel */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose:
+ * ========
+ * Performs numeric block updates (sup-col) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ double alpha, beta;
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in supernode
+ * nsupr = no of rows in supernode (used as leading dimension)
+ * luptr = location of supernodal LU-block in storage
+ * kfnz = first nonz in the k-th supernodal segment
+ * no_zeros = no of leading zeros in a supernodal U-segment
+ */
+ double ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int fsupc, nsupc, nsupr, segsze;
+ int nrow; /* No of rows in the matrix of matrix-vector */
+ int jcolp1, jsupno, k, ksub, krep, krep_ind, ksupno;
+ register int lptr, kfnz, isub, irow, i;
+ register int no_zeros, new_next;
+ int ufirst, nextlu;
+ int fst_col; /* First column within small LU update */
+ int d_fsupc; /* Distance between the first column of the current
+ panel and the first column of the current snode. */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ double *lusup;
+ int *xlusup;
+ int nzlumax;
+ double *tempv1;
+ double zero = 0.0;
+ double one = 1.0;
+ double none = -1.0;
+ int mem_error;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ nzlumax = Glu->nzlumax;
+ jcolp1 = jcol + 1;
+ jsupno = supno[jcol];
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+
+ krep = segrep[k];
+ k--;
+ ksupno = supno[krep];
+ if ( jsupno != ksupno ) { /* Outside the rectangular supernode */
+
+ fsupc = xsup[ksupno];
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ /* Distance from the current supernode to the current panel;
+ d_fsupc=0 if fsupc > fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ luptr = xlusup[fst_col] + d_fsupc;
+ lptr = xlsub[fsupc] + d_fsupc;
+
+ kfnz = repfnz[krep];
+ kfnz = SUPERLU_MAX ( kfnz, fpanelc );
+
+ segsze = krep - kfnz + 1;
+ nsupc = krep - fst_col + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nrow = nsupr - d_fsupc - nsupc;
+ krep_ind = lptr + nsupc - 1;
+
+ ops[TRSV] += segsze * (segsze - 1);
+ ops[GEMV] += 2 * nrow * segsze;
+
+
+ /*
+ * Case 1: Update U-segment of size 1 -- col-col update
+ */
+ if ( segsze == 1 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ dense[irow] -= ukj*lusup[luptr];
+ luptr++;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) { /* Case 2: 2cols-col update */
+ ukj -= ukj1 * lusup[luptr1];
+ dense[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ dense[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] );
+ }
+ } else { /* Case 3: 3cols-col update */
+ ukj2 = dense[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ ukj1 -= ukj2 * lusup[luptr2-1];
+ ukj = ukj - ukj1*lusup[luptr1] - ukj2*lusup[luptr2];
+ dense[lsub[krep_ind]] = ukj;
+ dense[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ luptr2++;
+ dense[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] + ukj2*lusup[luptr2] );
+ }
+ }
+
+
+
+ } else {
+ /*
+ * Case: sup-col update
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense
+ */
+
+ no_zeros = kfnz - fst_col;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*] */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ tempv[i] = dense[irow];
+ ++isub;
+ }
+
+ /* Dense triangular solve -- start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ SGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ dgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ dlsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ dmatvec (nsupr, nrow , segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+
+ /* Scatter tempv[] into SPA dense[] as a temporary storage */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense[irow] = tempv[i];
+ tempv[i] = zero;
+ ++isub;
+ }
+
+ /* Scatter tempv1[] into SPA dense[] */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ dense[irow] -= tempv1[i];
+ tempv1[i] = zero;
+ ++isub;
+ }
+ }
+
+ } /* if jsupno ... */
+
+ } /* for each segment... */
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ nextlu = xlusup[jcol];
+ fsupc = xsup[jsupno];
+
+ /* Copy the SPA dense into L\U[*,j] */
+ new_next = nextlu + xlsub[fsupc+1] - xlsub[fsupc];
+ while ( new_next > nzlumax ) {
+ if (mem_error = dLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, Glu))
+ return (mem_error);
+ lusup = Glu->lusup;
+ lsub = Glu->lsub;
+ }
+
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = zero;
+ ++nextlu;
+ }
+
+ xlusup[jcolp1] = nextlu; /* Close L\U[*,jcol] */
+
+ /* For more updates within the panel (also within the current supernode),
+ * should start from the first column of the panel, or the first column
+ * of the supernode, whichever is bigger. There are 2 cases:
+ * 1) fsupc < fpanelc, then fst_col := fpanelc
+ * 2) fsupc >= fpanelc, then fst_col := fsupc
+ */
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ if ( fst_col < jcol ) {
+
+ /* Distance between the current supernode and the current panel.
+ d_fsupc=0 if fsupc >= fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ lptr = xlsub[fsupc] + d_fsupc;
+ luptr = xlusup[fst_col] + d_fsupc;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nsupc = jcol - fst_col; /* Excluding jcol */
+ nrow = nsupr - d_fsupc - nsupc;
+
+ /* Points to the beginning of jcol in snode L\U(jsupno) */
+ ufirst = xlusup[jcol] + d_fsupc;
+
+ ops[TRSV] += nsupc * (nsupc - 1);
+ ops[GEMV] += 2 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#else
+ dtrsv_( "L", "N", "U", &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#endif
+
+ alpha = none; beta = one; /* y := beta*y + alpha*A*x */
+
+#ifdef _CRAY
+ SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ dgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ dlsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+
+ dmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], tempv );
+
+ /* Copy updates from tempv[*] into lusup[*] */
+ isub = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ lusup[isub] -= tempv[i];
+ tempv[i] = 0.0;
+ ++isub;
+ }
+
+#endif
+
+
+ } /* if fst_col < jcol ... */
+
+ return 0;
+}
diff --git a/SRC/dcolumn_dfs.c b/SRC/dcolumn_dfs.c
new file mode 100644
index 0000000..96e6222
--- /dev/null
+++ b/SRC/dcolumn_dfs.c
@@ -0,0 +1,270 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+/* What type of supernodes we want */
+#define T2_SUPER
+
+int
+dcolumn_dfs(
+ const int m, /* in - number of rows in the matrix */
+ const int jcol, /* in */
+ int *perm_r, /* in */
+ int *nseg, /* modified - with new segments appended */
+ int *lsub_col, /* in - defines the RHS vector to start the dfs */
+ int *segrep, /* modified - with new segments appended */
+ int *repfnz, /* modified */
+ int *xprune, /* modified */
+ int *marker, /* modified */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * "column_dfs" performs a symbolic factorization on column jcol, and
+ * decide the supernode boundary.
+ *
+ * This routine does not use numeric values, but only use the RHS
+ * row indices to start the dfs.
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives. The routine returns a list of such supernodal
+ * representatives in topological order of the dfs that generates them.
+ * The location of the first nonzero in each such supernodal segment
+ * (supernodal entry location) is also returned.
+ *
+ * Local parameters
+ * ================
+ * nseg: no of segments in current U[*,j]
+ * jsuper: jsuper=EMPTY if column j does not belong to the same
+ * supernode as j-1. Otherwise, jsuper=nsuper.
+ *
+ * marker2: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * > 0 number of bytes allocated when run out of space.
+ *
+ */
+ int jcolp1, jcolm1, jsuper, nsuper, nextl;
+ int k, krep, krow, kmark, kperm;
+ int *marker2; /* Used for small panel LU */
+ int fsupc; /* First column of a snode */
+ int myfnz; /* First nonz column of a U-segment */
+ int chperm, chmark, chrep, kchild;
+ int xdfs, maxdfs, kpar, oldrep;
+ int jptr, jm1ptr;
+ int ito, ifrom, istop; /* Used to compress row subscripts */
+ int mem_error;
+ int *xsup, *supno, *lsub, *xlsub;
+ int nzlmax;
+ static int first = 1, maxsuper;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ first = 0;
+ }
+ jcolp1 = jcol + 1;
+ jcolm1 = jcol - 1;
+ nsuper = supno[jcol];
+ jsuper = nsuper;
+ nextl = xlsub[jcol];
+ marker2 = &marker[2*m];
+
+
+ /* For each nonzero in A[*,jcol] do dfs */
+ for (k = 0; lsub_col[k] != EMPTY; k++) {
+
+ krow = lsub_col[k];
+ lsub_col[k] = EMPTY;
+ kmark = marker2[krow];
+
+ /* krow was visited before, go to the next nonz */
+ if ( kmark == jcol ) continue;
+
+ /* For each unmarked nbr krow of jcol
+ * krow is in L: place it in structure of L[*,jcol]
+ */
+ marker2[krow] = jcol;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ lsub[nextl++] = krow; /* krow is indexed into A */
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = dLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( kmark != jcolm1 ) jsuper = EMPTY;/* Row index subset testing */
+ } else {
+ /* krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz[krep];
+
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > kperm ) repfnz[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker2[kchild];
+
+ if ( chmark != jcol ) { /* Not reached yet */
+ marker2[kchild] = jcol;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,k] */
+ if ( chperm == EMPTY ) {
+ lsub[nextl++] = kchild;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error =
+ dLUMemXpand(jcol,nextl,LSUB,&nzlmax,Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( chmark != jcolm1 ) jsuper = EMPTY;
+ } else {
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz[chrep];
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz[chrep] = chperm;
+ } else {
+ /* Continue dfs at super-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L^t) */
+ parent[krep] = oldrep;
+ repfnz[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+ } /* else */
+
+ } /* else */
+
+ } /* if */
+
+ } /* while */
+
+ /* krow has no more unexplored nbrs;
+ * place supernode-rep krep in postorder DFS.
+ * backtrack dfs to its parent
+ */
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ kpar = parent[krep]; /* Pop from stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+ } while ( kpar != EMPTY ); /* Until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonzero ... */
+
+ /* Check to see if j belongs in the same supernode as j-1 */
+ if ( jcol == 0 ) { /* Do nothing for column 0 */
+ nsuper = supno[0] = 0;
+ } else {
+ fsupc = xsup[nsuper];
+ jptr = xlsub[jcol]; /* Not compressed yet */
+ jm1ptr = xlsub[jcolm1];
+
+#ifdef T2_SUPER
+ if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = EMPTY;
+#endif
+ /* Make sure the number of columns in a supernode doesn't
+ exceed threshold. */
+ if ( jcol - fsupc >= maxsuper ) jsuper = EMPTY;
+
+ /* If jcol starts a new supernode, reclaim storage space in
+ * lsub from the previous supernode. Note we only store
+ * the subscript set of the first and last columns of
+ * a supernode. (first for num values, last for pruning)
+ */
+ if ( jsuper == EMPTY ) { /* starts a new supernode */
+ if ( (fsupc < jcolm1-1) ) { /* >= 3 columns in nsuper */
+#ifdef CHK_COMPRESS
+ printf(" Compress lsub[] at super %d-%d\n", fsupc, jcolm1);
+#endif
+ ito = xlsub[fsupc+1];
+ xlsub[jcolm1] = ito;
+ istop = ito + jptr - jm1ptr;
+ xprune[jcolm1] = istop; /* Initialize xprune[jcol-1] */
+ xlsub[jcol] = istop;
+ for (ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)
+ lsub[ito] = lsub[ifrom];
+ nextl = ito; /* = istop + length(jcol) */
+ }
+ nsuper++;
+ supno[jcol] = nsuper;
+ } /* if a new supernode */
+
+ } /* else: jcol > 0 */
+
+ /* Tidy up the pointers before exit */
+ xsup[nsuper+1] = jcolp1;
+ supno[jcolp1] = nsuper;
+ xprune[jcol] = nextl; /* Initialize upper bound for pruning */
+ xlsub[jcolp1] = nextl;
+
+ return 0;
+}
diff --git a/SRC/dcomplex.c b/SRC/dcomplex.c
new file mode 100644
index 0000000..85d2be3
--- /dev/null
+++ b/SRC/dcomplex.c
@@ -0,0 +1,105 @@
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * This file defines common arithmetic operations for complex type.
+ */
+#include <math.h>
+#include <stdio.h>
+#include "dcomplex.h"
+
+
+/* Complex Division c = a/b */
+void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
+{
+ double ratio, den;
+ double abr, abi, cr, ci;
+
+ if( (abr = b->r) < 0.)
+ abr = - abr;
+ if( (abi = b->i) < 0.)
+ abi = - abi;
+ if( abr <= abi ) {
+ if (abi == 0) {
+ fprintf(stderr, "z_div.c: division by zero");
+ exit (-1);
+ }
+ ratio = b->r / b->i ;
+ den = b->i * (1 + ratio*ratio);
+ cr = (a->r*ratio + a->i) / den;
+ ci = (a->i*ratio - a->r) / den;
+ } else {
+ ratio = b->i / b->r ;
+ den = b->r * (1 + ratio*ratio);
+ cr = (a->r + a->i*ratio) / den;
+ ci = (a->i - a->r*ratio) / den;
+ }
+ c->r = cr;
+ c->i = ci;
+}
+
+
+/* Returns sqrt(z.r^2 + z.i^2) */
+double z_abs(doublecomplex *z)
+{
+ double temp;
+ double real = z->r;
+ double imag = z->i;
+
+ if (real < 0) real = -real;
+ if (imag < 0) imag = -imag;
+ if (imag > real) {
+ temp = real;
+ real = imag;
+ imag = temp;
+ }
+ if ((real+imag) == real) return(real);
+
+ temp = imag/real;
+ temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/
+ return (temp);
+}
+
+
+/* Approximates the abs */
+/* Returns abs(z.r) + abs(z.i) */
+double z_abs1(doublecomplex *z)
+{
+ double real = z->r;
+ double imag = z->i;
+
+ if (real < 0) real = -real;
+ if (imag < 0) imag = -imag;
+
+ return (real + imag);
+}
+
+/* Return the exponentiation */
+void z_exp(doublecomplex *r, doublecomplex *z)
+{
+ double expx;
+
+ expx = exp(z->r);
+ r->r = expx * cos(z->i);
+ r->i = expx * sin(z->i);
+}
+
+/* Return the complex conjugate */
+void d_cnjg(doublecomplex *r, doublecomplex *z)
+{
+ r->r = z->r;
+ r->i = -z->i;
+}
+
+/* Return the imaginary part */
+double d_imag(doublecomplex *z)
+{
+ return (z->i);
+}
+
+
diff --git a/SRC/dcomplex.h b/SRC/dcomplex.h
new file mode 100644
index 0000000..04de089
--- /dev/null
+++ b/SRC/dcomplex.h
@@ -0,0 +1,72 @@
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#ifndef __SUPERLU_DCOMPLEX /* allow multiple inclusions */
+#define __SUPERLU_DCOMPLEX
+
+/*
+ * This header file is to be included in source files z*.c
+ */
+#ifndef DCOMPLEX_INCLUDE
+#define DCOMPLEX_INCLUDE
+
+typedef struct { double r, i; } doublecomplex;
+
+
+/* Macro definitions */
+
+/* Complex Addition c = a + b */
+#define z_add(c, a, b) { (c)->r = (a)->r + (b)->r; \
+ (c)->i = (a)->i + (b)->i; }
+
+/* Complex Subtraction c = a - b */
+#define z_sub(c, a, b) { (c)->r = (a)->r - (b)->r; \
+ (c)->i = (a)->i - (b)->i; }
+
+/* Complex-Double Multiplication */
+#define zd_mult(c, a, b) { (c)->r = (a)->r * (b); \
+ (c)->i = (a)->i * (b); }
+
+/* Complex-Complex Multiplication */
+#define zz_mult(c, a, b) { \
+ double cr, ci; \
+ cr = (a)->r * (b)->r - (a)->i * (b)->i; \
+ ci = (a)->i * (b)->r + (a)->r * (b)->i; \
+ (c)->r = cr; \
+ (c)->i = ci; \
+ }
+
+#define zz_conj(a, b) { \
+ (a)->r = (b)->r; \
+ (a)->i = -((b)->i); \
+ }
+
+/* Complex equality testing */
+#define z_eq(a, b) ( (a)->r == (b)->r && (a)->i == (b)->i )
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Prototypes for functions in dcomplex.c */
+void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
+double z_abs(doublecomplex *); /* exact */
+double z_abs1(doublecomplex *); /* approximate */
+void z_exp(doublecomplex *, doublecomplex *);
+void d_cnjg(doublecomplex *r, doublecomplex *z);
+double d_imag(doublecomplex *);
+
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif
+
+#endif /* __SUPERLU_DCOMPLEX */
diff --git a/SRC/dcopy_to_ucol.c b/SRC/dcopy_to_ucol.c
new file mode 100644
index 0000000..09670df
--- /dev/null
+++ b/SRC/dcopy_to_ucol.c
@@ -0,0 +1,105 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+#include "util.h"
+
+int
+dcopy_to_ucol(
+ int jcol, /* in */
+ int nseg, /* in */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int *perm_r, /* in */
+ double *dense, /* modified - reset to zero on return */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Gather from SPA dense[*] to global ucol[*].
+ */
+ int ksub, krep, ksupno;
+ int i, k, kfnz, segsze;
+ int fsupc, isub, irow;
+ int jsupno, nextu;
+ int new_next, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ double *ucol;
+ int *usub, *xusub;
+ int nzumax;
+
+ double zero = 0.0;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+ nzumax = Glu->nzumax;
+
+ jsupno = supno[jcol];
+ nextu = xusub[jcol];
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+ krep = segrep[k--];
+ ksupno = supno[krep];
+
+ if ( ksupno != jsupno ) { /* Should go into ucol[] */
+ kfnz = repfnz[krep];
+ if ( kfnz != EMPTY ) { /* Nonzero U-segment */
+
+ fsupc = xsup[ksupno];
+ isub = xlsub[fsupc] + kfnz - fsupc;
+ segsze = krep - kfnz + 1;
+
+ new_next = nextu + segsze;
+ while ( new_next > nzumax ) {
+ if (mem_error = dLUMemXpand(jcol, nextu, UCOL, &nzumax, Glu))
+ return (mem_error);
+ ucol = Glu->ucol;
+ if (mem_error = dLUMemXpand(jcol, nextu, USUB, &nzumax, Glu))
+ return (mem_error);
+ usub = Glu->usub;
+ lsub = Glu->lsub;
+ }
+
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ usub[nextu] = perm_r[irow];
+ ucol[nextu] = dense[irow];
+ dense[irow] = zero;
+ nextu++;
+ isub++;
+ }
+
+ }
+
+ }
+
+ } /* for each segment... */
+
+ xusub[jcol + 1] = nextu; /* Close U[*,jcol] */
+ return 0;
+}
diff --git a/SRC/dgscon.c b/SRC/dgscon.c
new file mode 100644
index 0000000..9c313b5
--- /dev/null
+++ b/SRC/dgscon.c
@@ -0,0 +1,146 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: dgscon.c
+ * History: Modified from lapack routines DGECON.
+ */
+#include <math.h>
+#include "dsp_defs.h"
+
+void
+dgscon(char *norm, SuperMatrix *L, SuperMatrix *U,
+ double anorm, double *rcond, SuperLUStat_t *stat, int *info)
+{
+/*
+ Purpose
+ =======
+
+ DGSCON estimates the reciprocal of the condition number of a general
+ real matrix A, in either the 1-norm or the infinity-norm, using
+ the LU factorization computed by DGETRF.
+
+ An estimate is obtained for norm(inv(A)), and the reciprocal of the
+ condition number is computed as
+ RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ NORM (input) char*
+ Specifies whether the 1-norm condition number or the
+ infinity-norm condition number is required:
+ = '1' or 'O': 1-norm;
+ = 'I': Infinity-norm.
+
+ L (input) SuperMatrix*
+ The factor L from the factorization Pr*A*Pc=L*U as computed by
+ dgstrf(). Use compressed row subscripts storage for supernodes,
+ i.e., L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+
+ U (input) SuperMatrix*
+ The factor U from the factorization Pr*A*Pc=L*U as computed by
+ dgstrf(). Use column-wise storage scheme, i.e., U has types:
+ Stype = SLU_NC, Dtype = SLU_D, Mtype = TRU.
+
+ ANORM (input) double
+ If NORM = '1' or 'O', the 1-norm of the original matrix A.
+ If NORM = 'I', the infinity-norm of the original matrix A.
+
+ RCOND (output) double*
+ The reciprocal of the condition number of the matrix A,
+ computed as RCOND = 1/(norm(A) * norm(inv(A))).
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ int kase, kase1, onenrm, i;
+ double ainvnm;
+ double *work;
+ int *iwork;
+ extern int drscl_(int *, double *, double *, int *);
+
+ extern int dlacon_(int *, double *, double *, int *, double *, int *);
+
+
+ /* Test the input parameters. */
+ *info = 0;
+ onenrm = *(unsigned char *)norm == '1' || lsame_(norm, "O");
+ if (! onenrm && ! lsame_(norm, "I")) *info = -1;
+ else if (L->nrow < 0 || L->nrow != L->ncol ||
+ L->Stype != SLU_SC || L->Dtype != SLU_D || L->Mtype != SLU_TRLU)
+ *info = -2;
+ else if (U->nrow < 0 || U->nrow != U->ncol ||
+ U->Stype != SLU_NC || U->Dtype != SLU_D || U->Mtype != SLU_TRU)
+ *info = -3;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("dgscon", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ *rcond = 0.;
+ if ( L->nrow == 0 || U->nrow == 0) {
+ *rcond = 1.;
+ return;
+ }
+
+ work = doubleCalloc( 3*L->nrow );
+ iwork = intMalloc( L->nrow );
+
+
+ if ( !work || !iwork )
+ ABORT("Malloc fails for work arrays in dgscon.");
+
+ /* Estimate the norm of inv(A). */
+ ainvnm = 0.;
+ if ( onenrm ) kase1 = 1;
+ else kase1 = 2;
+ kase = 0;
+
+ do {
+ dlacon_(&L->nrow, &work[L->nrow], &work[0], &iwork[0], &ainvnm, &kase);
+
+ if (kase == 0) break;
+
+ if (kase == kase1) {
+ /* Multiply by inv(L). */
+ sp_dtrsv("L", "No trans", "Unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(U). */
+ sp_dtrsv("U", "No trans", "Non-unit", L, U, &work[0], stat, info);
+
+ } else {
+
+ /* Multiply by inv(U'). */
+ sp_dtrsv("U", "Transpose", "Non-unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_dtrsv("L", "Transpose", "Unit", L, U, &work[0], stat, info);
+
+ }
+
+ } while ( kase != 0 );
+
+ /* Compute the estimate of the reciprocal condition number. */
+ if (ainvnm != 0.) *rcond = (1. / ainvnm) / anorm;
+
+ SUPERLU_FREE (work);
+ SUPERLU_FREE (iwork);
+ return;
+
+} /* dgscon */
+
diff --git a/SRC/dgsequ.c b/SRC/dgsequ.c
new file mode 100644
index 0000000..ac569b9
--- /dev/null
+++ b/SRC/dgsequ.c
@@ -0,0 +1,186 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: dgsequ.c
+ * History: Modified from LAPACK routine DGEEQU
+ */
+#include <math.h>
+#include "dsp_defs.h"
+#include "util.h"
+
+void
+dgsequ(SuperMatrix *A, double *r, double *c, double *rowcnd,
+ double *colcnd, double *amax, int *info)
+{
+/*
+ Purpose
+ =======
+
+ DGSEQU computes row and column scalings intended to equilibrate an
+ M-by-N sparse matrix A and reduce its condition number. R returns the row
+ scale factors and C the column scale factors, chosen to try to make
+ the largest element in each row and column of the matrix B with
+ elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+
+ R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+ number and BIGNUM = largest safe number. Use of these scaling
+ factors is not guaranteed to reduce the condition number of A but
+ works well in practice.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input) SuperMatrix*
+ The matrix of dimension (A->nrow, A->ncol) whose equilibration
+ factors are to be computed. The type of A can be:
+ Stype = SLU_NC; Dtype = SLU_D; Mtype = SLU_GE.
+
+ R (output) double*, size A->nrow
+ If INFO = 0 or INFO > M, R contains the row scale factors
+ for A.
+
+ C (output) double*, size A->ncol
+ If INFO = 0, C contains the column scale factors for A.
+
+ ROWCND (output) double*
+ If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+ smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+ AMAX is neither too large nor too small, it is not worth
+ scaling by R.
+
+ COLCND (output) double*
+ If INFO = 0, COLCND contains the ratio of the smallest
+ C(i) to the largest C(i). If COLCND >= 0.1, it is not
+ worth scaling by C.
+
+ AMAX (output) double*
+ Absolute value of largest matrix element. If AMAX is very
+ close to overflow or very close to underflow, the matrix
+ should be scaled.
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+ > 0: if INFO = i, and i is
+ <= A->nrow: the i-th row of A is exactly zero
+ > A->ncol: the (i-M)-th column of A is exactly zero
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ double *Aval;
+ int i, j, irow;
+ double rcmin, rcmax;
+ double bignum, smlnum;
+ extern double dlamch_(char *);
+
+ /* Test the input parameters. */
+ *info = 0;
+ if ( A->nrow < 0 || A->ncol < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_D || A->Mtype != SLU_GE )
+ *info = -1;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("dgsequ", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || A->ncol == 0 ) {
+ *rowcnd = 1.;
+ *colcnd = 1.;
+ *amax = 0.;
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Get machine constants. */
+ smlnum = dlamch_("S");
+ bignum = 1. / smlnum;
+
+ /* Compute row scale factors. */
+ for (i = 0; i < A->nrow; ++i) r[i] = 0.;
+
+ /* Find the maximum element in each row. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ r[irow] = SUPERLU_MAX( r[irow], fabs(Aval[i]) );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ rcmax = SUPERLU_MAX(rcmax, r[i]);
+ rcmin = SUPERLU_MIN(rcmin, r[i]);
+ }
+ *amax = rcmax;
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (i = 0; i < A->nrow; ++i)
+ if (r[i] == 0.) {
+ *info = i + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (i = 0; i < A->nrow; ++i)
+ r[i] = 1. / SUPERLU_MIN( SUPERLU_MAX( r[i], smlnum ), bignum );
+ /* Compute ROWCND = min(R(I)) / max(R(I)) */
+ *rowcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ /* Compute column scale factors */
+ for (j = 0; j < A->ncol; ++j) c[j] = 0.;
+
+ /* Find the maximum element in each column, assuming the row
+ scalings computed above. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ c[j] = SUPERLU_MAX( c[j], fabs(Aval[i]) * r[irow] );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ rcmax = SUPERLU_MAX(rcmax, c[j]);
+ rcmin = SUPERLU_MIN(rcmin, c[j]);
+ }
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (j = 0; j < A->ncol; ++j)
+ if ( c[j] == 0. ) {
+ *info = A->nrow + j + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (j = 0; j < A->ncol; ++j)
+ c[j] = 1. / SUPERLU_MIN( SUPERLU_MAX( c[j], smlnum ), bignum);
+ /* Compute COLCND = min(C(J)) / max(C(J)) */
+ *colcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ return;
+
+} /* dgsequ */
+
+
diff --git a/SRC/dgsrfs.c b/SRC/dgsrfs.c
new file mode 100644
index 0000000..922093b
--- /dev/null
+++ b/SRC/dgsrfs.c
@@ -0,0 +1,437 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: dgsrfs.c
+ * History: Modified from lapack routine DGERFS
+ */
+#include <math.h>
+#include "dsp_defs.h"
+
+void
+dgsrfs(trans_t trans, SuperMatrix *A, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, char *equed, double *R, double *C,
+ SuperMatrix *B, SuperMatrix *X, double *ferr, double *berr,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSRFS improves the computed solution to a system of linear
+ * equations and provides error bounds and backward error estimates for
+ * the solution.
+ *
+ * If equilibration was performed, the system becomes:
+ * (diag(R)*A_original*diag(C)) * X = diag(R)*B_original.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * A (input) SuperMatrix*
+ * The original matrix A in the system, or the scaled A if
+ * equilibration was done. The type of A can be:
+ * Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_GE.
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use column-wise storage scheme,
+ * i.e., U has types: Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (A->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * equed (input) Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by
+ * diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ *
+ * R (input) double*, dimension (A->nrow)
+ * The row scale factors for A.
+ * If equed = 'R' or 'B', A is premultiplied by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ *
+ * C (input) double*, dimension (A->ncol)
+ * The column scale factors for A.
+ * If equed = 'C' or 'B', A is postmultiplied by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ *
+ * B (input) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * The right hand side matrix B.
+ * if equed = 'R' or 'B', B is premultiplied by diag(R).
+ *
+ * X (input/output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * On entry, the solution matrix X, as computed by dgstrs().
+ * On exit, the improved solution matrix X.
+ * if *equed = 'C' or 'B', X should be premultiplied by diag(C)
+ * in order to obtain the solution to the original system.
+ *
+ * FERR (output) double*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ *
+ * BERR (output) double*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ *
+ * Internal Parameters
+ * ===================
+ *
+ * ITMAX is the maximum number of steps of iterative refinement.
+ *
+ */
+
+#define ITMAX 5
+
+ /* Table of constant values */
+ int ione = 1;
+ double ndone = -1.;
+ double done = 1.;
+
+ /* Local variables */
+ NCformat *Astore;
+ double *Aval;
+ SuperMatrix Bjcol;
+ DNformat *Bstore, *Xstore, *Bjcol_store;
+ double *Bmat, *Xmat, *Bptr, *Xptr;
+ int kase;
+ double safe1, safe2;
+ int i, j, k, irow, nz, count, notran, rowequ, colequ;
+ int ldb, ldx, nrhs;
+ double s, xk, lstres, eps, safmin;
+ char transc[1];
+ trans_t transt;
+ double *work;
+ double *rwork;
+ int *iwork;
+ extern double dlamch_(char *);
+ extern int dlacon_(int *, double *, double *, int *, double *, int *);
+#ifdef _CRAY
+ extern int SCOPY(int *, double *, int *, double *, int *);
+ extern int SSAXPY(int *, double *, double *, int *, double *, int *);
+#else
+ extern int dcopy_(int *, double *, int *, double *, int *);
+ extern int daxpy_(int *, double *, double *, int *, double *, int *);
+#endif
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ /* Test the input parameters */
+ *info = 0;
+ notran = (trans == NOTRANS);
+ if ( !notran && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_D || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_D || L->Mtype != SLU_TRLU )
+ *info = -3;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_D || U->Mtype != SLU_TRU )
+ *info = -4;
+ else if ( ldb < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_D || B->Mtype != SLU_GE )
+ *info = -10;
+ else if ( ldx < SUPERLU_MAX(0, A->nrow) ||
+ X->Stype != SLU_DN || X->Dtype != SLU_D || X->Mtype != SLU_GE )
+ *info = -11;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("dgsrfs", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || nrhs == 0) {
+ for (j = 0; j < nrhs; ++j) {
+ ferr[j] = 0.;
+ berr[j] = 0.;
+ }
+ return;
+ }
+
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+
+ /* Allocate working space */
+ work = doubleMalloc(2*A->nrow);
+ rwork = (double *) SUPERLU_MALLOC( A->nrow * sizeof(double) );
+ iwork = intMalloc(2*A->nrow);
+ if ( !work || !rwork || !iwork )
+ ABORT("Malloc fails for work/rwork/iwork.");
+
+ if ( notran ) {
+ *(unsigned char *)transc = 'N';
+ transt = TRANS;
+ } else {
+ *(unsigned char *)transc = 'T';
+ transt = NOTRANS;
+ }
+
+ /* NZ = maximum number of nonzero elements in each row of A, plus 1 */
+ nz = A->ncol + 1;
+ eps = dlamch_("Epsilon");
+ safmin = dlamch_("Safe minimum");
+ safe1 = nz * safmin;
+ safe2 = safe1 / eps;
+
+ /* Compute the number of nonzeros in each row (or column) of A */
+ for (i = 0; i < A->nrow; ++i) iwork[i] = 0;
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k)
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ ++iwork[Astore->rowind[i]];
+ } else {
+ for (k = 0; k < A->ncol; ++k)
+ iwork[k] = Astore->colptr[k+1] - Astore->colptr[k];
+ }
+
+ /* Copy one column of RHS B into Bjcol. */
+ Bjcol.Stype = B->Stype;
+ Bjcol.Dtype = B->Dtype;
+ Bjcol.Mtype = B->Mtype;
+ Bjcol.nrow = B->nrow;
+ Bjcol.ncol = 1;
+ Bjcol.Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !Bjcol.Store ) ABORT("SUPERLU_MALLOC fails for Bjcol.Store");
+ Bjcol_store = Bjcol.Store;
+ Bjcol_store->lda = ldb;
+ Bjcol_store->nzval = work; /* address aliasing */
+
+ /* Do for each right hand side ... */
+ for (j = 0; j < nrhs; ++j) {
+ count = 0;
+ lstres = 3.;
+ Bptr = &Bmat[j*ldb];
+ Xptr = &Xmat[j*ldx];
+
+ while (1) { /* Loop until stopping criterion is satisfied. */
+
+ /* Compute residual R = B - op(A) * X,
+ where op(A) = A, A**T, or A**H, depending on TRANS. */
+
+#ifdef _CRAY
+ SCOPY(&A->nrow, Bptr, &ione, work, &ione);
+#else
+ dcopy_(&A->nrow, Bptr, &ione, work, &ione);
+#endif
+ sp_dgemv(transc, ndone, A, Xptr, ione, done, work, ione);
+
+ /* Compute componentwise relative backward error from formula
+ max(i) ( abs(R(i)) / ( abs(op(A))*abs(X) + abs(B) )(i) )
+ where abs(Z) is the componentwise absolute value of the matrix
+ or vector Z. If the i-th component of the denominator is less
+ than SAFE2, then SAFE1 is added to the i-th component of the
+ numerator and denominator before dividing. */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = fabs( Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if (notran) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = fabs( Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += fabs(Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ s += fabs(Aval[i]) * fabs(Xptr[irow]);
+ }
+ rwork[k] += s;
+ }
+ }
+ s = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ if (rwork[i] > safe2)
+ s = SUPERLU_MAX( s, fabs(work[i]) / rwork[i] );
+ else
+ s = SUPERLU_MAX( s, (fabs(work[i]) + safe1) /
+ (rwork[i] + safe1) );
+ }
+ berr[j] = s;
+
+ /* Test stopping criterion. Continue iterating if
+ 1) The residual BERR(J) is larger than machine epsilon, and
+ 2) BERR(J) decreased by at least a factor of 2 during the
+ last iteration, and
+ 3) At most ITMAX iterations tried. */
+
+ if (berr[j] > eps && berr[j] * 2. <= lstres && count < ITMAX) {
+ /* Update solution and try again. */
+ dgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+#ifdef _CRAY
+ SAXPY(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#else
+ daxpy_(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#endif
+ lstres = berr[j];
+ ++count;
+ } else {
+ break;
+ }
+
+ } /* end while */
+
+ stat->RefineSteps = count;
+
+ /* Bound error from formula:
+ norm(X - XTRUE) / norm(X) .le. FERR = norm( abs(inv(op(A)))*
+ ( abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) / norm(X)
+ where
+ norm(Z) is the magnitude of the largest component of Z
+ inv(op(A)) is the inverse of op(A)
+ abs(Z) is the componentwise absolute value of the matrix or
+ vector Z
+ NZ is the maximum number of nonzeros in any row of A, plus 1
+ EPS is machine epsilon
+
+ The i-th component of abs(R)+NZ*EPS*(abs(op(A))*abs(X)+abs(B))
+ is incremented by SAFE1 if the i-th component of
+ abs(op(A))*abs(X) + abs(B) is less than SAFE2.
+
+ Use DLACON to estimate the infinity-norm of the matrix
+ inv(op(A)) * diag(W),
+ where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = fabs( Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = fabs( Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += fabs(Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ xk = fabs( Xptr[irow] );
+ s += fabs(Aval[i]) * xk;
+ }
+ rwork[k] += s;
+ }
+ }
+
+ for (i = 0; i < A->nrow; ++i)
+ if (rwork[i] > safe2)
+ rwork[i] = fabs(work[i]) + (iwork[i]+1)*eps*rwork[i];
+ else
+ rwork[i] = fabs(work[i])+(iwork[i]+1)*eps*rwork[i]+safe1;
+
+ kase = 0;
+
+ do {
+ dlacon_(&A->nrow, &work[A->nrow], work,
+ &iwork[A->nrow], &ferr[j], &kase);
+ if (kase == 0) break;
+
+ if (kase == 1) {
+ /* Multiply by diag(W)*inv(op(A)**T)*(diag(C) or diag(R)). */
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) work[i] *= C[i];
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->nrow; ++i) work[i] *= R[i];
+
+ dgstrs (transt, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ for (i = 0; i < A->nrow; ++i) work[i] *= rwork[i];
+ } else {
+ /* Multiply by (diag(C) or diag(R))*inv(op(A))*diag(W). */
+ for (i = 0; i < A->nrow; ++i) work[i] *= rwork[i];
+
+ dgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) work[i] *= C[i];
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->ncol; ++i) work[i] *= R[i];
+ }
+
+ } while ( kase != 0 );
+
+
+ /* Normalize error. */
+ lstres = 0.;
+ if ( notran && colequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, C[i] * fabs( Xptr[i]) );
+ } else if ( !notran && rowequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, R[i] * fabs( Xptr[i]) );
+ } else {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, fabs( Xptr[i]) );
+ }
+ if ( lstres != 0. )
+ ferr[j] /= lstres;
+
+ } /* for each RHS j ... */
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(rwork);
+ SUPERLU_FREE(iwork);
+ SUPERLU_FREE(Bjcol.Store);
+
+ return;
+
+} /* dgsrfs */
diff --git a/SRC/dgssv.c b/SRC/dgssv.c
new file mode 100644
index 0000000..e7725a4
--- /dev/null
+++ b/SRC/dgssv.c
@@ -0,0 +1,222 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+void
+dgssv(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ SuperMatrix *L, SuperMatrix *U, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSSV solves the system of linear equations A*X=B, using the
+ * LU factorization from DGSTRF. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. Permute the columns of A, forming A*Pc, where Pc
+ * is a permutation matrix. For more details of this step,
+ * see sp_preorder.c.
+ *
+ * 1.2. Factor A as Pr*A*Pc=L*U with the permutation Pr determined
+ * by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 1.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the
+ * above algorithm to the transpose of A:
+ *
+ * 2.1. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.2. Factor A as Pr*transpose(A)*Pc=L*U with the permutation Pr
+ * determined by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 2.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR; Dtype = SLU_D; Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, column permutation vector of size A->ncol
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * If options->ColPerm = MY_PERMC or options->Fact = SamePattern or
+ * options->Fact = SamePattern_SameRowPerm, it is an input argument.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ * Otherwise, it is an output argument.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->RowPerm = MY_PERMR or
+ * options->Fact = SamePattern_SameRowPerm, perm_r is an
+ * input argument.
+ * otherwise it is an output argument.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * so the solution could not be computed.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+ DNformat *Bstore;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int lwork = 0, *etree, i;
+
+ /* Set default values for some parameters */
+ double drop_tol = 0.;
+ int panel_size; /* panel size */
+ int relax; /* no of columns in a relaxed snodes */
+ int permc_spec;
+ trans_t trans = NOTRANS;
+ double *utime;
+ double t; /* Temporary time */
+
+ /* Test the input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ if ( options->Fact != DOFACT ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_D || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_D || B->Mtype != SLU_GE )
+ *info = -7;
+ if ( *info != 0 ) {
+ i = -(*info);
+ xerbla_("dgssv", &i);
+ return;
+ }
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ dCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ trans = TRANS;
+ } else {
+ if ( A->Stype == SLU_NC ) AA = A;
+ }
+
+ t = SuperLU_timer_();
+ /*
+ * Get column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t;
+
+ etree = intMalloc(A->ncol);
+
+ t = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t;
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+
+ /*printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));*/
+ t = SuperLU_timer_();
+ /* Compute the LU factorization of A. */
+ dgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, NULL, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t;
+
+ t = SuperLU_timer_();
+ if ( *info == 0 ) {
+ /* Solve the system A*X=B, overwriting B with X. */
+ dgstrs (trans, L, U, perm_c, perm_r, B, stat, info);
+ }
+ utime[SOLVE] = SuperLU_timer_() - t;
+
+ SUPERLU_FREE (etree);
+ Destroy_CompCol_Permuted(&AC);
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/dgssvx.c b/SRC/dgssvx.c
new file mode 100644
index 0000000..a4baab3
--- /dev/null
+++ b/SRC/dgssvx.c
@@ -0,0 +1,614 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+void
+dgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ int *etree, char *equed, double *R, double *C,
+ SuperMatrix *L, SuperMatrix *U, void *work, int lwork,
+ SuperMatrix *B, SuperMatrix *X, double *recip_pivot_growth,
+ double *rcond, double *ferr, double *berr,
+ mem_usage_t *mem_usage, SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSSVX solves the system of linear equations A*X=B or A'*X=B, using
+ * the LU factorization from dgstrf(). Error bounds on the solution and
+ * a condition estimate are also provided. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A is
+ * overwritten by diag(R)*A*diag(C) and B by diag(R)*B
+ * (if options->Trans=NOTRANS) or diag(C)*B (if options->Trans
+ * = TRANS or CONJ).
+ *
+ * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation
+ * matrix that usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 1.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the matrix A (after equilibration if options->Equil = YES)
+ * as Pr*A*Pc = L*U, with Pr determined by partial pivoting.
+ *
+ * 1.4. Compute the reciprocal pivot growth factor.
+ *
+ * 1.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form of
+ * A is used to estimate the condition number of the matrix A. If
+ * the reciprocal of the condition number is less than machine
+ * precision, info = A->ncol+1 is returned as a warning, but the
+ * routine still goes on to solve for X and computes error bounds
+ * as described below.
+ *
+ * 1.6. The system of equations is solved for X using the factored form
+ * of A.
+ *
+ * 1.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 1.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the above algorithm
+ * to the transpose of A:
+ *
+ * 2.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A' is
+ * overwritten by diag(R)*A'*diag(C) and B by diag(R)*B
+ * (if trans='N') or diag(C)*B (if trans = 'T' or 'C').
+ *
+ * 2.2. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix that
+ * usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the transpose(A) (after equilibration if
+ * options->Fact = YES) as Pr*transpose(A)*Pc = L*U with the
+ * permutation Pr determined by partial pivoting.
+ *
+ * 2.4. Compute the reciprocal pivot growth factor.
+ *
+ * 2.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form
+ * of transpose(A) is used to estimate the condition number of the
+ * matrix A. If the reciprocal of the condition number
+ * is less than machine precision, info = A->nrow+1 is returned as
+ * a warning, but the routine still goes on to solve for X and
+ * computes error bounds as described below.
+ *
+ * 2.6. The system of equations is solved for X using the factored form
+ * of transpose(A).
+ *
+ * 2.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 2.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input/output) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of the linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR, Dtype = SLU_D, Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * On entry, If options->Fact = FACTORED and equed is not 'N',
+ * then A must have been equilibrated by the scaling factors in
+ * R and/or C.
+ * On exit, A is not modified if options->Equil = NO, or if
+ * options->Equil = YES but equed = 'N' on exit.
+ * Otherwise, if options->Equil = YES and equed is not 'N',
+ * A is scaled as follows:
+ * If A->Stype = SLU_NC:
+ * equed = 'R': A := diag(R) * A
+ * equed = 'C': A := A * diag(C)
+ * equed = 'B': A := diag(R) * A * diag(C).
+ * If A->Stype = SLU_NR:
+ * equed = 'R': transpose(A) := diag(R) * transpose(A)
+ * equed = 'C': transpose(A) := transpose(A) * diag(C)
+ * equed = 'B': transpose(A) := diag(R) * transpose(A) * diag(C).
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, Column permutation vector of size A->ncol,
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ *
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow,
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ *
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by a
+ * new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument.
+ *
+ * etree (input/output) int*, dimension (A->ncol)
+ * Elimination tree of Pc'*A'*A*Pc.
+ * If options->Fact != FACTORED and options->Fact != DOFACT,
+ * etree is an input argument, otherwise it is an output argument.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ *
+ * equed (input/output) char*
+ * Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ * If options->Fact = FACTORED, equed is an input argument,
+ * otherwise it is an output argument.
+ *
+ * R (input/output) double*, dimension (A->nrow)
+ * The row scale factors for A or transpose(A).
+ * If equed = 'R' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the left by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ * If options->Fact = FACTORED, R is an input argument,
+ * otherwise, R is output.
+ * If options->zFact = FACTORED and equed = 'R' or 'B', each element
+ * of R must be positive.
+ *
+ * C (input/output) double*, dimension (A->ncol)
+ * The column scale factors for A or transpose(A).
+ * If equed = 'C' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the right by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ * If options->Fact = FACTORED, C is an input argument,
+ * otherwise, C is output.
+ * If options->Fact = FACTORED and equed = 'C' or 'B', each element
+ * of C must be positive.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype SLU_= NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * work (workspace/output) void*, size (lwork) (in bytes)
+ * User supplied workspace, should be large enough
+ * to hold data structures for factors L and U.
+ * On exit, if fact is not 'F', L and U point to this array.
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * mem_usage->total_needed; no other side effects.
+ *
+ * See argument 'mem_usage' for memory usage statistics.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * If B->ncol = 0, only LU decomposition is performed, the triangular
+ * solve is skipped.
+ * On exit,
+ * if equed = 'N', B is not modified; otherwise
+ * if A->Stype = SLU_NC:
+ * if options->Trans = NOTRANS and equed = 'R' or 'B',
+ * B is overwritten by diag(R)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'C' of 'B',
+ * B is overwritten by diag(C)*B;
+ * if A->Stype = SLU_NR:
+ * if options->Trans = NOTRANS and equed = 'C' or 'B',
+ * B is overwritten by diag(C)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'R' of 'B',
+ * B is overwritten by diag(R)*B.
+ *
+ * X (output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * If info = 0 or info = A->ncol+1, X contains the solution matrix
+ * to the original system of equations. Note that A and B are modified
+ * on exit if equed is not 'N', and the solution to the equilibrated
+ * system is inv(diag(C))*X if options->Trans = NOTRANS and
+ * equed = 'C' or 'B', or inv(diag(R))*X if options->Trans = 'T' or 'C'
+ * and equed = 'R' or 'B'.
+ *
+ * recip_pivot_growth (output) double*
+ * The reciprocal pivot growth factor max_j( norm(A_j)/norm(U_j) ).
+ * The infinity norm is used. If recip_pivot_growth is much less
+ * than 1, the stability of the LU factorization could be poor.
+ *
+ * rcond (output) double*
+ * The estimate of the reciprocal condition number of the matrix A
+ * after equilibration (if done). If rcond is less than the machine
+ * precision (in particular, if rcond = 0), the matrix is singular
+ * to working precision. This condition is indicated by a return
+ * code of info > 0.
+ *
+ * FERR (output) double*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ * If options->IterRefine = NOREFINE, ferr = 1.0.
+ *
+ * BERR (output) double*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ * If options->IterRefine = NOREFINE, berr = 1.0.
+ *
+ * mem_usage (output) mem_usage_t*
+ * Record the memory usage statistics, consisting of following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * The number of memory expansions during the LU factorization.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly
+ * singular, so the solution and error bounds
+ * could not be computed.
+ * = A->ncol+1: U is nonsingular, but RCOND is less than machine
+ * precision, meaning that the matrix is singular to
+ * working precision. Nevertheless, the solution and
+ * error bounds are computed because there are a number
+ * of situations where the computed solution can be more
+ * accurate than the value of RCOND would suggest.
+ * > A->ncol+1: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+
+ DNformat *Bstore, *Xstore;
+ double *Bmat, *Xmat;
+ int ldb, ldx, nrhs;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int colequ, equil, nofact, notran, rowequ, permc_spec;
+ trans_t trant;
+ char norm[1];
+ int i, j, info1;
+ double amax, anorm, bignum, smlnum, colcnd, rowcnd, rcmax, rcmin;
+ int relax, panel_size;
+ double diag_pivot_thresh, drop_tol;
+ double t0; /* temporary time */
+ double *utime;
+
+ /* External functions */
+ extern double dlangs(char *, SuperMatrix *);
+ extern double dlamch_(char *);
+
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ *info = 0;
+ nofact = (options->Fact != FACTORED);
+ equil = (options->Equil == YES);
+ notran = (options->Trans == NOTRANS);
+ if ( nofact ) {
+ *(unsigned char *)equed = 'N';
+ rowequ = FALSE;
+ colequ = FALSE;
+ } else {
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ smlnum = dlamch_("Safe minimum");
+ bignum = 1. / smlnum;
+ }
+
+#if 0
+printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n",
+ options->Fact, options->Trans, *equed);
+#endif
+
+ /* Test the input parameters */
+ if (!nofact && options->Fact != DOFACT && options->Fact != SamePattern &&
+ options->Fact != SamePattern_SameRowPerm &&
+ !notran && options->Trans != TRANS && options->Trans != CONJ &&
+ !equil && options->Equil != NO)
+ *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_D || A->Mtype != SLU_GE )
+ *info = -2;
+ else if (options->Fact == FACTORED &&
+ !(rowequ || colequ || lsame_(equed, "N")))
+ *info = -6;
+ else {
+ if (rowequ) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, R[j]);
+ rcmax = SUPERLU_MAX(rcmax, R[j]);
+ }
+ if (rcmin <= 0.) *info = -7;
+ else if ( A->nrow > 0)
+ rowcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else rowcnd = 1.;
+ }
+ if (colequ && *info == 0) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, C[j]);
+ rcmax = SUPERLU_MAX(rcmax, C[j]);
+ }
+ if (rcmin <= 0.) *info = -8;
+ else if (A->nrow > 0)
+ colcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else colcnd = 1.;
+ }
+ if (*info == 0) {
+ if ( lwork < -1 ) *info = -12;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_D ||
+ B->Mtype != SLU_GE )
+ *info = -13;
+ else if ( X->ncol < 0 || Xstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ (B->ncol != 0 && B->ncol != X->ncol) ||
+ X->Stype != SLU_DN ||
+ X->Dtype != SLU_D || X->Mtype != SLU_GE )
+ *info = -14;
+ }
+ }
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("dgssvx", &i);
+ return;
+ }
+
+ /* Initialization for factor parameters */
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ diag_pivot_thresh = options->DiagPivotThresh;
+ drop_tol = 0.0;
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ dCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ if ( notran ) { /* Reverse the transpose argument. */
+ trant = TRANS;
+ notran = 0;
+ } else {
+ trant = NOTRANS;
+ notran = 1;
+ }
+ } else { /* A->Stype == SLU_NC */
+ trant = options->Trans;
+ AA = A;
+ }
+
+ if ( nofact && equil ) {
+ t0 = SuperLU_timer_();
+ /* Compute row and column scalings to equilibrate the matrix A. */
+ dgsequ(AA, R, C, &rowcnd, &colcnd, &amax, &info1);
+
+ if ( info1 == 0 ) {
+ /* Equilibrate matrix A. */
+ dlaqgs(AA, R, C, rowcnd, colcnd, amax, equed);
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ }
+ utime[EQUIL] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Scale the right hand side if equilibration was performed. */
+ if ( notran ) {
+ if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Bmat[i + j*ldb] *= R[i];
+ }
+ }
+ } else if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Bmat[i + j*ldb] *= C[i];
+ }
+ }
+ }
+
+ if ( nofact ) {
+
+ t0 = SuperLU_timer_();
+ /*
+ * Gnet column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t0;
+
+ t0 = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t0;
+
+/* printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));
+ fflush(stdout); */
+
+ /* Compute the LU factorization of A*Pc. */
+ t0 = SuperLU_timer_();
+ dgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t0;
+
+ if ( lwork == -1 ) {
+ mem_usage->total_needed = *info - A->ncol;
+ return;
+ }
+ }
+
+ if ( options->PivotGrowth ) {
+ if ( *info > 0 ) {
+ if ( *info <= A->ncol ) {
+ /* Compute the reciprocal pivot growth factor of the leading
+ rank-deficient *info columns of A. */
+ *recip_pivot_growth = dPivotGrowth(*info, AA, perm_c, L, U);
+ }
+ return;
+ }
+
+ /* Compute the reciprocal pivot growth factor *recip_pivot_growth. */
+ *recip_pivot_growth = dPivotGrowth(A->ncol, AA, perm_c, L, U);
+ }
+
+ if ( options->ConditionNumber ) {
+ /* Estimate the reciprocal of the condition number of A. */
+ t0 = SuperLU_timer_();
+ if ( notran ) {
+ *(unsigned char *)norm = '1';
+ } else {
+ *(unsigned char *)norm = 'I';
+ }
+ anorm = dlangs(norm, AA);
+ dgscon(norm, L, U, anorm, rcond, stat, info);
+ utime[RCOND] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Compute the solution matrix X. */
+ for (j = 0; j < nrhs; j++) /* Save a copy of the right hand sides */
+ for (i = 0; i < B->nrow; i++)
+ Xmat[i + j*ldx] = Bmat[i + j*ldb];
+
+ t0 = SuperLU_timer_();
+ dgstrs (trant, L, U, perm_c, perm_r, X, stat, info);
+ utime[SOLVE] = SuperLU_timer_() - t0;
+
+ /* Use iterative refinement to improve the computed solution and compute
+ error bounds and backward error estimates for it. */
+ t0 = SuperLU_timer_();
+ if ( options->IterRefine != NOREFINE ) {
+ dgsrfs(trant, AA, L, U, perm_c, perm_r, equed, R, C, B,
+ X, ferr, berr, stat, info);
+ } else {
+ for (j = 0; j < nrhs; ++j) ferr[j] = berr[j] = 1.0;
+ }
+ utime[REFINE] = SuperLU_timer_() - t0;
+
+ /* Transform the solution matrix X to a solution of the original system. */
+ if ( notran ) {
+ if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Xmat[i + j*ldx] *= C[i];
+ }
+ }
+ } else if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Xmat[i + j*ldx] *= R[i];
+ }
+ }
+ } /* end if nrhs > 0 */
+
+ if ( options->ConditionNumber ) {
+ /* Set INFO = A->ncol+1 if the matrix is singular to working precision. */
+ if ( *rcond < dlamch_("E") ) *info = A->ncol + 1;
+ }
+
+ if ( nofact ) {
+ dQuerySpace(L, U, mem_usage);
+ Destroy_CompCol_Permuted(&AC);
+ }
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/dgstrf.c b/SRC/dgstrf.c
new file mode 100644
index 0000000..5696cff
--- /dev/null
+++ b/SRC/dgstrf.c
@@ -0,0 +1,433 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+void
+dgstrf (superlu_options_t *options, SuperMatrix *A, double drop_tol,
+ int relax, int panel_size, int *etree, void *work, int lwork,
+ int *perm_c, int *perm_r, SuperMatrix *L, SuperMatrix *U,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSTRF computes an LU factorization of a general sparse m-by-n
+ * matrix A using partial pivoting with row interchanges.
+ * The factorization has the form
+ * Pr * A = L * U
+ * where Pr is a row permutation matrix, L is lower triangular with unit
+ * diagonal elements (lower trapezoidal if A->nrow > A->ncol), and U is upper
+ * triangular (upper trapezoidal if A->nrow < A->ncol).
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = SLU_NCP; Dtype = SLU_D; Mtype = SLU_GE.
+ *
+ * drop_tol (input) double (NOT IMPLEMENTED)
+ * Drop tolerance parameter. At step j of the Gaussian elimination,
+ * if abs(A_ij)/(max_i abs(A_ij)) < drop_tol, drop entry A_ij.
+ * 0 <= drop_tol <= 1. The default value of drop_tol is 0.
+ *
+ * relax (input) int
+ * To control degree of relaxing supernodes. If the number
+ * of nodes (columns) in a subtree of the elimination tree is less
+ * than relax, this subtree is considered as one supernode,
+ * regardless of the row structures of those columns.
+ *
+ * panel_size (input) int
+ * A panel consists of at most panel_size consecutive columns.
+ *
+ * etree (input) int*, dimension (A->ncol)
+ * Elimination tree of A'*A.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ * On input, the columns of A should be permuted so that the
+ * etree is in a certain postorder.
+ *
+ * work (input/output) void*, size (lwork) (in bytes)
+ * User-supplied work space and space for the output data structures.
+ * Not referenced if lwork = 0;
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * *info; no other side effects.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ * When searching for diagonal, perm_c[*] is applied to the
+ * row subscripts of A, so that diagonal threshold pivoting
+ * can find the diagonal of A, rather than that of A*Pc.
+ *
+ * perm_r (input/output) int*, dimension (A->nrow)
+ * Row permutation vector which defines the permutation matrix Pr,
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by
+ * a new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument;
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = SLU_NC,
+ * Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * and division by zero will occur if it is used to solve a
+ * system of equations.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol. If lwork = -1, it is
+ * the estimated amount of space needed, plus A->ncol.
+ *
+ * ======================================================================
+ *
+ * Local Working Arrays:
+ * ======================
+ * m = number of rows in the matrix
+ * n = number of columns in the matrix
+ *
+ * xprune[0:n-1]: xprune[*] points to locations in subscript
+ * vector lsub[*]. For column i, xprune[i] denotes the point where
+ * structural pruning begins. I.e. only xlsub[i],..,xprune[i]-1 need
+ * to be traversed for symbolic factorization.
+ *
+ * marker[0:3*m-1]: marker[i] = j means that node i has been
+ * reached when working on column j.
+ * Storage: relative to original row subscripts
+ * NOTE: There are 3 of them: marker/marker1 are used for panel dfs,
+ * see dpanel_dfs.c; marker2 is used for inner-factorization,
+ * see dcolumn_dfs.c.
+ *
+ * parent[0:m-1]: parent vector used during dfs
+ * Storage: relative to new row subscripts
+ *
+ * xplore[0:m-1]: xplore[i] gives the location of the next (dfs)
+ * unexplored neighbor of i in lsub[*]
+ *
+ * segrep[0:nseg-1]: contains the list of supernodal representatives
+ * in topological order of the dfs. A supernode representative is the
+ * last column of a supernode.
+ * The maximum size of segrep[] is n.
+ *
+ * repfnz[0:W*m-1]: for a nonzero segment U[*,j] that ends at a
+ * supernodal representative r, repfnz[r] is the location of the first
+ * nonzero in this segment. It is also used during the dfs: repfnz[r]>0
+ * indicates the supernode r has been explored.
+ * NOTE: There are W of them, each used for one column of a panel.
+ *
+ * panel_lsub[0:W*m-1]: temporary for the nonzeros row indices below
+ * the panel diagonal. These are filled in during dpanel_dfs(), and are
+ * used later in the inner LU factorization within the panel.
+ * panel_lsub[]/dense[] pair forms the SPA data structure.
+ * NOTE: There are W of them.
+ *
+ * dense[0:W*m-1]: sparse accumulating (SPA) vector for intermediate values;
+ * NOTE: there are W of them.
+ *
+ * tempv[0:*]: real temporary used for dense numeric kernels;
+ * The size of this array is defined by NUM_TEMPV() in dsp_defs.h.
+ *
+ */
+ /* Local working arrays */
+ NCPformat *Astore;
+ int *iperm_r; /* inverse of perm_r;
+ used when options->Fact == SamePattern_SameRowPerm */
+ int *iperm_c; /* inverse of perm_c */
+ int *iwork;
+ double *dwork;
+ int *segrep, *repfnz, *parent, *xplore;
+ int *panel_lsub; /* dense[]/panel_lsub[] pair forms a w-wide SPA */
+ int *xprune;
+ int *marker;
+ double *dense, *tempv;
+ int *relax_end;
+ double *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int *xsup, *supno;
+ int *xlsub, *xlusup, *xusub;
+ int nzlumax;
+ static GlobalLU_t Glu; /* persistent to facilitate multiple factors. */
+
+ /* Local scalars */
+ fact_t fact = options->Fact;
+ double diag_pivot_thresh = options->DiagPivotThresh;
+ int pivrow; /* pivotal row number in the original matrix A */
+ int nseg1; /* no of segments in U-column above panel row jcol */
+ int nseg; /* no of segments in each U-column */
+ register int jcol;
+ register int kcol; /* end column of a relaxed snode */
+ register int icol;
+ register int i, k, jj, new_next, iinfo;
+ int m, n, min_mn, jsupno, fsupc, nextlu, nextu;
+ int w_def; /* upper bound on panel width */
+ int usepr, iperm_r_allocated = 0;
+ int nnzL, nnzU;
+ int *panel_histo = stat->panel_histo;
+ flops_t *ops = stat->ops;
+
+ iinfo = 0;
+ m = A->nrow;
+ n = A->ncol;
+ min_mn = SUPERLU_MIN(m, n);
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+
+ /* Allocate storage common to the factor routines */
+ *info = dLUMemInit(fact, work, lwork, m, n, Astore->nnz,
+ panel_size, L, U, &Glu, &iwork, &dwork);
+ if ( *info ) return;
+
+ xsup = Glu.xsup;
+ supno = Glu.supno;
+ xlsub = Glu.xlsub;
+ xlusup = Glu.xlusup;
+ xusub = Glu.xusub;
+
+ SetIWork(m, n, panel_size, iwork, &segrep, &parent, &xplore,
+ &repfnz, &panel_lsub, &xprune, &marker);
+ dSetRWork(m, panel_size, dwork, &dense, &tempv);
+
+ usepr = (fact == SamePattern_SameRowPerm);
+ if ( usepr ) {
+ /* Compute the inverse of perm_r */
+ iperm_r = (int *) intMalloc(m);
+ for (k = 0; k < m; ++k) iperm_r[perm_r[k]] = k;
+ iperm_r_allocated = 1;
+ }
+ iperm_c = (int *) intMalloc(n);
+ for (k = 0; k < n; ++k) iperm_c[perm_c[k]] = k;
+
+ /* Identify relaxed snodes */
+ relax_end = (int *) intMalloc(n);
+ if ( options->SymmetricMode == YES ) {
+ heap_relax_snode(n, etree, relax, marker, relax_end);
+ } else {
+ relax_snode(n, etree, relax, marker, relax_end);
+ }
+
+ ifill (perm_r, m, EMPTY);
+ ifill (marker, m * NO_MARKER, EMPTY);
+ supno[0] = -1;
+ xsup[0] = xlsub[0] = xusub[0] = xlusup[0] = 0;
+ w_def = panel_size;
+
+ /*
+ * Work on one "panel" at a time. A panel is one of the following:
+ * (a) a relaxed supernode at the bottom of the etree, or
+ * (b) panel_size contiguous columns, defined by the user
+ */
+ for (jcol = 0; jcol < min_mn; ) {
+
+ if ( relax_end[jcol] != EMPTY ) { /* start of a relaxed snode */
+ kcol = relax_end[jcol]; /* end of the relaxed snode */
+ panel_histo[kcol-jcol+1]++;
+
+ /* --------------------------------------
+ * Factorize the relaxed supernode(jcol:kcol)
+ * -------------------------------------- */
+ /* Determine the union of the row structure of the snode */
+ if ( (*info = dsnode_dfs(jcol, kcol, asub, xa_begin, xa_end,
+ xprune, marker, &Glu)) != 0 )
+ return;
+
+ nextu = xusub[jcol];
+ nextlu = xlusup[jcol];
+ jsupno = supno[jcol];
+ fsupc = xsup[jsupno];
+ new_next = nextlu + (xlsub[fsupc+1]-xlsub[fsupc])*(kcol-jcol+1);
+ nzlumax = Glu.nzlumax;
+ while ( new_next > nzlumax ) {
+ if ( (*info = dLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, &Glu)) )
+ return;
+ }
+
+ for (icol = jcol; icol<= kcol; icol++) {
+ xusub[icol+1] = nextu;
+
+ /* Scatter into SPA dense[*] */
+ for (k = xa_begin[icol]; k < xa_end[icol]; k++)
+ dense[asub[k]] = a[k];
+
+ /* Numeric update within the snode */
+ dsnode_bmod(icol, jsupno, fsupc, dense, tempv, &Glu, stat);
+
+ if ( (*info = dpivotL(icol, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+#ifdef DEBUG
+ dprint_lu_col("[1]: ", icol, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol = icol;
+
+ } else { /* Work on one panel of panel_size columns */
+
+ /* Adjust panel_size so that a panel won't overlap with the next
+ * relaxed snode.
+ */
+ panel_size = w_def;
+ for (k = jcol + 1; k < SUPERLU_MIN(jcol+panel_size, min_mn); k++)
+ if ( relax_end[k] != EMPTY ) {
+ panel_size = k - jcol;
+ break;
+ }
+ if ( k == min_mn ) panel_size = min_mn - jcol;
+ panel_histo[panel_size]++;
+
+ /* symbolic factor on a panel of columns */
+ dpanel_dfs(m, panel_size, jcol, A, perm_r, &nseg1,
+ dense, panel_lsub, segrep, repfnz, xprune,
+ marker, parent, xplore, &Glu);
+
+ /* numeric sup-panel updates in topological order */
+ dpanel_bmod(m, panel_size, jcol, nseg1, dense,
+ tempv, segrep, repfnz, &Glu, stat);
+
+ /* Sparse LU within the panel, and below panel diagonal */
+ for ( jj = jcol; jj < jcol + panel_size; jj++) {
+ k = (jj - jcol) * m; /* column index for w-wide arrays */
+
+ nseg = nseg1; /* Begin after all the panel segments */
+
+ if ((*info = dcolumn_dfs(m, jj, perm_r, &nseg, &panel_lsub[k],
+ segrep, &repfnz[k], xprune, marker,
+ parent, xplore, &Glu)) != 0) return;
+
+ /* Numeric updates */
+ if ((*info = dcolumn_bmod(jj, (nseg - nseg1), &dense[k],
+ tempv, &segrep[nseg1], &repfnz[k],
+ jcol, &Glu, stat)) != 0) return;
+
+ /* Copy the U-segments to ucol[*] */
+ if ((*info = dcopy_to_ucol(jj, nseg, segrep, &repfnz[k],
+ perm_r, &dense[k], &Glu)) != 0)
+ return;
+
+ if ( (*info = dpivotL(jj, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+ /* Prune columns (0:jj-1) using column jj */
+ dpruneL(jj, perm_r, pivrow, nseg, segrep,
+ &repfnz[k], xprune, &Glu);
+
+ /* Reset repfnz[] for this column */
+ resetrep_col (nseg, segrep, &repfnz[k]);
+
+#ifdef DEBUG
+ dprint_lu_col("[2]: ", jj, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol += panel_size; /* Move to the next panel */
+
+ } /* else */
+
+ } /* for */
+
+ *info = iinfo;
+
+ if ( m > n ) {
+ k = 0;
+ for (i = 0; i < m; ++i)
+ if ( perm_r[i] == EMPTY ) {
+ perm_r[i] = n + k;
+ ++k;
+ }
+ }
+
+ countnz(min_mn, xprune, &nnzL, &nnzU, &Glu);
+ fixupL(min_mn, perm_r, &Glu);
+
+ dLUWorkFree(iwork, dwork, &Glu); /* Free work space and compress storage */
+
+ if ( fact == SamePattern_SameRowPerm ) {
+ /* L and U structures may have changed due to possibly different
+ pivoting, even though the storage is available.
+ There could also be memory expansions, so the array locations
+ may have changed, */
+ ((SCformat *)L->Store)->nnz = nnzL;
+ ((SCformat *)L->Store)->nsuper = Glu.supno[n];
+ ((SCformat *)L->Store)->nzval = Glu.lusup;
+ ((SCformat *)L->Store)->nzval_colptr = Glu.xlusup;
+ ((SCformat *)L->Store)->rowind = Glu.lsub;
+ ((SCformat *)L->Store)->rowind_colptr = Glu.xlsub;
+ ((NCformat *)U->Store)->nnz = nnzU;
+ ((NCformat *)U->Store)->nzval = Glu.ucol;
+ ((NCformat *)U->Store)->rowind = Glu.usub;
+ ((NCformat *)U->Store)->colptr = Glu.xusub;
+ } else {
+ dCreate_SuperNode_Matrix(L, A->nrow, min_mn, nnzL, Glu.lusup,
+ Glu.xlusup, Glu.lsub, Glu.xlsub, Glu.supno,
+ Glu.xsup, SLU_SC, SLU_D, SLU_TRLU);
+ dCreate_CompCol_Matrix(U, min_mn, min_mn, nnzU, Glu.ucol,
+ Glu.usub, Glu.xusub, SLU_NC, SLU_D, SLU_TRU);
+ }
+
+ ops[FACT] += ops[TRSV] + ops[GEMV];
+
+ if ( iperm_r_allocated ) SUPERLU_FREE (iperm_r);
+ SUPERLU_FREE (iperm_c);
+ SUPERLU_FREE (relax_end);
+
+}
diff --git a/SRC/dgstrs.c b/SRC/dgstrs.c
new file mode 100644
index 0000000..4807a51
--- /dev/null
+++ b/SRC/dgstrs.c
@@ -0,0 +1,332 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void dusolve(int, int, double*, double*);
+void dlsolve(int, int, double*, double*);
+void dmatvec(int, int, int, double*, double*, double*);
+
+
+void
+dgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * DGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ double alpha = 1.0, beta = 1.0;
+ double *work_col;
+#endif
+ DNformat *Bstore;
+ double *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ double *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void dprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_D || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_D || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_D || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("dgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = doubleCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = doubleMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 2 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ rhs_work[irow] -= rhs_work[fsupc] * Lval[luptr];
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ SGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ dtrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ dgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work_col[i]; /* Scatter */
+ work_col[i] = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ dlsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ dmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work[i];
+ work[i] = 0.0;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ dprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ rhs_work[fsupc] /= Lval[luptr];
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ dtrsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ dusolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ rhs_work[irow] -= rhs_work[jcol] * Uval[i];
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ dprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B or CONJ(A)*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+ for (k = 0; k < nrhs; ++k) {
+
+ /* Multiply by inv(U'). */
+ sp_dtrsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_dtrsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+
+ }
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+dprint_soln(int n, int nrhs, double *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/dgstrs.c.bak b/SRC/dgstrs.c.bak
new file mode 100644
index 0000000..04efbbd
--- /dev/null
+++ b/SRC/dgstrs.c.bak
@@ -0,0 +1,334 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void dusolve(int, int, double*, double*);
+void dlsolve(int, int, double*, double*);
+void dmatvec(int, int, int, double*, double*, double*);
+
+
+void
+dgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * DGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ double alpha = 1.0, beta = 1.0;
+ double *work_col;
+#endif
+ DNformat *Bstore;
+ double *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ double *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void dprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_D || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_D || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_D || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("dgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = doubleCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = doubleMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 2 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ rhs_work[irow] -= rhs_work[fsupc] * Lval[luptr];
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ SGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ dtrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ dgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work_col[i]; /* Scatter */
+ work_col[i] = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ dlsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ dmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work[i];
+ work[i] = 0.0;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ dprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ rhs_work[fsupc] /= Lval[luptr];
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ dtrsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ dusolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ rhs_work[irow] -= rhs_work[jcol] * Uval[i];
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ dprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+
+ for (k = 0; k < nrhs; ++k) {
+
+ /* Multiply by inv(U'). */
+ sp_dtrsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_dtrsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+
+ }
+
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+dprint_soln(int n, int nrhs, double *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/dgstrsL.c b/SRC/dgstrsL.c
new file mode 100644
index 0000000..e13b111
--- /dev/null
+++ b/SRC/dgstrsL.c
@@ -0,0 +1,233 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * September 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+#include "util.h"
+
+
+/*
+ * Function prototypes
+ */
+void dusolve(int, int, double*, double*);
+void dlsolve(int, int, double*, double*);
+void dmatvec(int, int, int, double*, double*, double*);
+
+
+void
+dgstrsL(char *trans, SuperMatrix *L, int *perm_r, SuperMatrix *B, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DGSTRSL only performs the L-solve using the LU factorization computed
+ * by DGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) char*
+ * Specifies the form of the system of equations:
+ * = 'N': A * X = B (No transpose)
+ * = 'T': A'* X = B (Transpose)
+ * = 'C': A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_D, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * dgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_D, Mtype = SLU_TRU.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_D, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+ double alpha = 1.0, beta = 1.0;
+ DNformat *Bstore;
+ double *Bmat;
+ SCformat *Lstore;
+ double *Lval, *Uval;
+ int nrow, notran;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ double *work, *work_col, *rhs_work, *soln;
+ flops_t solve_ops;
+ extern SuperLUStat_t SuperLUStat;
+ void dprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ notran = lsame_(trans, "N");
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C") ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_D || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_D || B->Mtype != SLU_GE )
+ *info = -4;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("dgstrsL", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = doubleCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = doubleMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ solve_ops = 0;
+
+ if ( notran ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 2 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ rhs_work[irow] -= rhs_work[fsupc] * Lval[luptr];
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ SGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ dtrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ dgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work_col[i]; /* Scatter */
+ work_col[i] = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ dlsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ dmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work[i];
+ work[i] = 0.0;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ dprint_soln(n, nrhs, Bmat);
+#endif
+
+ SuperLUStat.ops[SOLVE] = solve_ops;
+
+ } else {
+ printf("Transposed solve not implemented.\n");
+ exit(0);
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+dprint_soln(int n, int nrhs, double *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/dlacon.c b/SRC/dlacon.c
new file mode 100644
index 0000000..d5dd354
--- /dev/null
+++ b/SRC/dlacon.c
@@ -0,0 +1,229 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "Cnames.h"
+
+int
+dlacon_(int *n, double *v, double *x, int *isgn, double *est, int *kase)
+
+{
+/*
+ Purpose
+ =======
+
+ DLACON estimates the 1-norm of a square matrix A.
+ Reverse communication is used for evaluating matrix-vector products.
+
+
+ Arguments
+ =========
+
+ N (input) INT
+ The order of the matrix. N >= 1.
+
+ V (workspace) DOUBLE PRECISION array, dimension (N)
+ On the final return, V = A*W, where EST = norm(V)/norm(W)
+ (W is not returned).
+
+ X (input/output) DOUBLE PRECISION array, dimension (N)
+ On an intermediate return, X should be overwritten by
+ A * X, if KASE=1,
+ A' * X, if KASE=2,
+ and DLACON must be re-called with all the other parameters
+ unchanged.
+
+ ISGN (workspace) INT array, dimension (N)
+
+ EST (output) DOUBLE PRECISION
+ An estimate (a lower bound) for norm(A).
+
+ KASE (input/output) INT
+ On the initial call to DLACON, KASE should be 0.
+ On an intermediate return, KASE will be 1 or 2, indicating
+ whether X should be overwritten by A * X or A' * X.
+ On the final return from DLACON, KASE will again be 0.
+
+ Further Details
+ ======= =======
+
+ Contributed by Nick Higham, University of Manchester.
+ Originally named CONEST, dated March 16, 1988.
+
+ Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+ a real or complex matrix, with applications to condition estimation",
+ ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+ double zero = 0.0;
+ double one = 1.0;
+
+ /* Local variables */
+ static int iter;
+ static int jump, jlast;
+ static double altsgn, estold;
+ static int i, j;
+ double temp;
+#ifdef _CRAY
+ extern int ISAMAX(int *, double *, int *);
+ extern double SASUM(int *, double *, int *);
+ extern int SCOPY(int *, double *, int *, double *, int *);
+#else
+ extern int idamax_(int *, double *, int *);
+ extern double dasum_(int *, double *, int *);
+ extern int dcopy_(int *, double *, int *, double *, int *);
+#endif
+#define d_sign(a, b) (b >= 0 ? fabs(a) : -fabs(a)) /* Copy sign */
+#define i_dnnt(a) \
+ ( a>=0 ? floor(a+.5) : -floor(.5-a) ) /* Round to nearest integer */
+
+ if ( *kase == 0 ) {
+ for (i = 0; i < *n; ++i) {
+ x[i] = 1. / (double) (*n);
+ }
+ *kase = 1;
+ jump = 1;
+ return 0;
+ }
+
+ switch (jump) {
+ case 1: goto L20;
+ case 2: goto L40;
+ case 3: goto L70;
+ case 4: goto L110;
+ case 5: goto L140;
+ }
+
+ /* ................ ENTRY (JUMP = 1)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. */
+ L20:
+ if (*n == 1) {
+ v[0] = x[0];
+ *est = fabs(v[0]);
+ /* ... QUIT */
+ goto L150;
+ }
+#ifdef _CRAY
+ *est = SASUM(n, x, &c__1);
+#else
+ *est = dasum_(n, x, &c__1);
+#endif
+
+ for (i = 0; i < *n; ++i) {
+ x[i] = d_sign(one, x[i]);
+ isgn[i] = i_dnnt(x[i]);
+ }
+ *kase = 2;
+ jump = 2;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 2)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. */
+L40:
+#ifdef _CRAY
+ j = ISAMAX(n, &x[0], &c__1);
+#else
+ j = idamax_(n, &x[0], &c__1);
+#endif
+ --j;
+ iter = 2;
+
+ /* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. */
+L50:
+ for (i = 0; i < *n; ++i) x[i] = zero;
+ x[j] = one;
+ *kase = 1;
+ jump = 3;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 3)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L70:
+#ifdef _CRAY
+ SCOPY(n, x, &c__1, v, &c__1);
+#else
+ dcopy_(n, x, &c__1, v, &c__1);
+#endif
+ estold = *est;
+#ifdef _CRAY
+ *est = SASUM(n, v, &c__1);
+#else
+ *est = dasum_(n, v, &c__1);
+#endif
+
+ for (i = 0; i < *n; ++i)
+ if (i_dnnt(d_sign(one, x[i])) != isgn[i])
+ goto L90;
+
+ /* REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED. */
+ goto L120;
+
+L90:
+ /* TEST FOR CYCLING. */
+ if (*est <= estold) goto L120;
+
+ for (i = 0; i < *n; ++i) {
+ x[i] = d_sign(one, x[i]);
+ isgn[i] = i_dnnt(x[i]);
+ }
+ *kase = 2;
+ jump = 4;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 4)
+ X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. */
+L110:
+ jlast = j;
+#ifdef _CRAY
+ j = ISAMAX(n, &x[0], &c__1);
+#else
+ j = idamax_(n, &x[0], &c__1);
+#endif
+ --j;
+ if (x[jlast] != fabs(x[j]) && iter < 5) {
+ ++iter;
+ goto L50;
+ }
+
+ /* ITERATION COMPLETE. FINAL STAGE. */
+L120:
+ altsgn = 1.;
+ for (i = 1; i <= *n; ++i) {
+ x[i-1] = altsgn * ((double)(i - 1) / (double)(*n - 1) + 1.);
+ altsgn = -altsgn;
+ }
+ *kase = 1;
+ jump = 5;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 5)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L140:
+#ifdef _CRAY
+ temp = SASUM(n, x, &c__1) / (double)(*n * 3) * 2.;
+#else
+ temp = dasum_(n, x, &c__1) / (double)(*n * 3) * 2.;
+#endif
+ if (temp > *est) {
+#ifdef _CRAY
+ SCOPY(n, &x[0], &c__1, &v[0], &c__1);
+#else
+ dcopy_(n, &x[0], &c__1, &v[0], &c__1);
+#endif
+ *est = temp;
+ }
+
+L150:
+ *kase = 0;
+ return 0;
+
+} /* dlacon_ */
diff --git a/SRC/dlamch.c b/SRC/dlamch.c
new file mode 100644
index 0000000..12b41b4
--- /dev/null
+++ b/SRC/dlamch.c
@@ -0,0 +1,963 @@
+#include <stdio.h>
+#define TRUE_ (1)
+#define FALSE_ (0)
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+
+double dlamch_(char *cmach)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+ Purpose
+ =======
+
+ DLAMCH determines double precision machine parameters.
+
+ Arguments
+ =========
+
+ CMACH (input) CHARACTER*1
+ Specifies the value to be returned by DLAMCH:
+ = 'E' or 'e', DLAMCH := eps
+ = 'S' or 's , DLAMCH := sfmin
+ = 'B' or 'b', DLAMCH := base
+ = 'P' or 'p', DLAMCH := eps*base
+ = 'N' or 'n', DLAMCH := t
+ = 'R' or 'r', DLAMCH := rnd
+ = 'M' or 'm', DLAMCH := emin
+ = 'U' or 'u', DLAMCH := rmin
+ = 'L' or 'l', DLAMCH := emax
+ = 'O' or 'o', DLAMCH := rmax
+
+ where
+
+ eps = relative machine precision
+ sfmin = safe minimum, such that 1/sfmin does not overflow
+ base = base of the machine
+ prec = eps*base
+ t = number of (base) digits in the mantissa
+ rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+ emin = minimum exponent before (gradual) underflow
+ rmin = underflow threshold - base**(emin-1)
+ emax = largest exponent before overflow
+ rmax = overflow threshold - (base**emax)*(1-eps)
+
+ =====================================================================
+*/
+
+ static int first = TRUE_;
+
+ /* System generated locals */
+ int i__1;
+ double ret_val;
+ /* Builtin functions */
+ double pow_di(double *, int *);
+ /* Local variables */
+ static double base;
+ static int beta;
+ static double emin, prec, emax;
+ static int imin, imax;
+ static int lrnd;
+ static double rmin, rmax, t, rmach;
+ extern int lsame_(char *, char *);
+ static double small, sfmin;
+ extern /* Subroutine */ int dlamc2_(int *, int *, int *,
+ double *, int *, double *, int *, double *);
+ static int it;
+ static double rnd, eps;
+
+ if (first) {
+ first = FALSE_;
+ dlamc2_(&beta, &it, &lrnd, &eps, &imin, &rmin, &imax, &rmax);
+ base = (double) beta;
+ t = (double) it;
+ if (lrnd) {
+ rnd = 1.;
+ i__1 = 1 - it;
+ eps = pow_di(&base, &i__1) / 2;
+ } else {
+ rnd = 0.;
+ i__1 = 1 - it;
+ eps = pow_di(&base, &i__1);
+ }
+ prec = eps * base;
+ emin = (double) imin;
+ emax = (double) imax;
+ sfmin = rmin;
+ small = 1. / rmax;
+ if (small >= sfmin) {
+
+ /* Use SMALL plus a bit, to avoid the possibility of rounding
+ causing overflow when computing 1/sfmin. */
+ sfmin = small * (eps + 1.);
+ }
+ }
+
+ if (lsame_(cmach, "E")) {
+ rmach = eps;
+ } else if (lsame_(cmach, "S")) {
+ rmach = sfmin;
+ } else if (lsame_(cmach, "B")) {
+ rmach = base;
+ } else if (lsame_(cmach, "P")) {
+ rmach = prec;
+ } else if (lsame_(cmach, "N")) {
+ rmach = t;
+ } else if (lsame_(cmach, "R")) {
+ rmach = rnd;
+ } else if (lsame_(cmach, "M")) {
+ rmach = emin;
+ } else if (lsame_(cmach, "U")) {
+ rmach = rmin;
+ } else if (lsame_(cmach, "L")) {
+ rmach = emax;
+ } else if (lsame_(cmach, "O")) {
+ rmach = rmax;
+ }
+
+ ret_val = rmach;
+ return ret_val;
+
+/* End of DLAMCH */
+
+} /* dlamch_ */
+
+
+/* Subroutine */ int dlamc1_(int *beta, int *t, int *rnd, int
+ *ieee1)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC1 determines the machine parameters given by BETA, T, RND, and
+ IEEE1.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ IEEE1 (output) INT
+ Specifies whether rounding appears to be done in the IEEE
+ 'round to nearest' style.
+
+ Further Details
+ ===============
+
+ The routine is based on the routine ENVRON by Malcolm and
+ incorporates suggestions by Gentleman and Marovich. See
+
+ Malcolm M. A. (1972) Algorithms to reveal properties of
+ floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+
+ Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+ that reveal properties of floating point arithmetic units.
+ Comms. of the ACM, 17, 276-277.
+
+ =====================================================================
+*/
+ /* Initialized data */
+ static int first = TRUE_;
+ /* System generated locals */
+ double d__1, d__2;
+ /* Local variables */
+ static int lrnd;
+ static double a, b, c, f;
+ static int lbeta;
+ static double savec;
+ extern double dlamc3_(double *, double *);
+ static int lieee1;
+ static double t1, t2;
+ static int lt;
+ static double one, qtr;
+
+ if (first) {
+ first = FALSE_;
+ one = 1.;
+
+/* LBETA, LIEEE1, LT and LRND are the local values of BE
+TA,
+ IEEE1, T and RND.
+
+ Throughout this routine we use the function DLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ Compute a = 2.0**m with the smallest positive integer m s
+uch
+ that
+
+ fl( a + 1.0 ) = a. */
+
+ a = 1.;
+ c = 1.;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L10:
+ if (c == one) {
+ a *= 2;
+ c = dlamc3_(&a, &one);
+ d__1 = -a;
+ c = dlamc3_(&c, &d__1);
+ goto L10;
+ }
+/* + END WHILE
+
+ Now compute b = 2.0**m with the smallest positive integer
+m
+ such that
+
+ fl( a + b ) .gt. a. */
+
+ b = 1.;
+ c = dlamc3_(&a, &b);
+
+/* + WHILE( C.EQ.A )LOOP */
+L20:
+ if (c == a) {
+ b *= 2;
+ c = dlamc3_(&a, &b);
+ goto L20;
+ }
+/* + END WHILE
+
+ Now compute the base. a and c are neighbouring floating po
+int
+ numbers in the interval ( beta**t, beta**( t + 1 ) ) and
+ so
+ their difference is beta. Adding 0.25 to c is to ensure that
+ it
+ is truncated to beta and not ( beta - 1 ). */
+
+ qtr = one / 4;
+ savec = c;
+ d__1 = -a;
+ c = dlamc3_(&c, &d__1);
+ lbeta = (int) (c + qtr);
+
+/* Now determine whether rounding or chopping occurs, by addin
+g a
+ bit less than beta/2 and a bit more than beta/2 to
+ a. */
+
+ b = (double) lbeta;
+ d__1 = b / 2;
+ d__2 = -b / 100;
+ f = dlamc3_(&d__1, &d__2);
+ c = dlamc3_(&f, &a);
+ if (c == a) {
+ lrnd = TRUE_;
+ } else {
+ lrnd = FALSE_;
+ }
+ d__1 = b / 2;
+ d__2 = b / 100;
+ f = dlamc3_(&d__1, &d__2);
+ c = dlamc3_(&f, &a);
+ if (lrnd && c == a) {
+ lrnd = FALSE_;
+ }
+
+/* Try and decide whether rounding is done in the IEEE 'round
+ to
+ nearest' style. B/2 is half a unit in the last place of the
+two
+ numbers A and SAVEC. Furthermore, A is even, i.e. has last
+bit
+ zero, and SAVEC is odd. Thus adding B/2 to A should not cha
+nge
+ A, but adding B/2 to SAVEC should change SAVEC. */
+
+ d__1 = b / 2;
+ t1 = dlamc3_(&d__1, &a);
+ d__1 = b / 2;
+ t2 = dlamc3_(&d__1, &savec);
+ lieee1 = t1 == a && t2 > savec && lrnd;
+
+/* Now find the mantissa, t. It should be the integer part
+ of
+ log to the base beta of a, however it is safer to determine
+ t
+ by powering. So we find t as the smallest positive integer
+for
+ which
+
+ fl( beta**t + 1.0 ) = 1.0. */
+
+ lt = 0;
+ a = 1.;
+ c = 1.;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L30:
+ if (c == one) {
+ ++lt;
+ a *= lbeta;
+ c = dlamc3_(&a, &one);
+ d__1 = -a;
+ c = dlamc3_(&c, &d__1);
+ goto L30;
+ }
+/* + END WHILE */
+
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *ieee1 = lieee1;
+ return 0;
+
+/* End of DLAMC1 */
+
+} /* dlamc1_ */
+
+
+/* Subroutine */ int dlamc2_(int *beta, int *t, int *rnd,
+ double *eps, int *emin, double *rmin, int *emax,
+ double *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC2 determines the machine parameters specified in its argument
+ list.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ EPS (output) DOUBLE PRECISION
+ The smallest positive number such that
+
+ fl( 1.0 - EPS ) .LT. 1.0,
+
+ where fl denotes the computed value.
+
+ EMIN (output) INT
+ The minimum exponent before (gradual) underflow occurs.
+
+ RMIN (output) DOUBLE PRECISION
+ The smallest normalized number for the machine, given by
+ BASE**( EMIN - 1 ), where BASE is the floating point value
+
+ of BETA.
+
+ EMAX (output) INT
+ The maximum exponent before overflow occurs.
+
+ RMAX (output) DOUBLE PRECISION
+ The largest positive number for the machine, given by
+ BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
+
+ value of BETA.
+
+ Further Details
+ ===============
+
+ The computation of EPS is based on a routine PARANOIA by
+ W. Kahan of the University of California at Berkeley.
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ static int c__1 = 1;
+
+ /* Initialized data */
+ static int first = TRUE_;
+ static int iwarn = FALSE_;
+ /* System generated locals */
+ int i__1;
+ double d__1, d__2, d__3, d__4, d__5;
+ /* Builtin functions */
+ double pow_di(double *, int *);
+ /* Local variables */
+ static int ieee;
+ static double half;
+ static int lrnd;
+ static double leps, zero, a, b, c;
+ static int i, lbeta;
+ static double rbase;
+ static int lemin, lemax, gnmin;
+ static double small;
+ static int gpmin;
+ static double third, lrmin, lrmax, sixth;
+ extern /* Subroutine */ int dlamc1_(int *, int *, int *,
+ int *);
+ extern double dlamc3_(double *, double *);
+ static int lieee1;
+ extern /* Subroutine */ int dlamc4_(int *, double *, int *),
+ dlamc5_(int *, int *, int *, int *, int *,
+ double *);
+ static int lt, ngnmin, ngpmin;
+ static double one, two;
+
+ if (first) {
+ first = FALSE_;
+ zero = 0.;
+ one = 1.;
+ two = 2.;
+
+/* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values
+ of
+ BETA, T, RND, EPS, EMIN and RMIN.
+
+ Throughout this routine we use the function DLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1.
+*/
+
+ dlamc1_(&lbeta, <, &lrnd, &lieee1);
+
+/* Start to find EPS. */
+
+ b = (double) lbeta;
+ i__1 = -lt;
+ a = pow_di(&b, &i__1);
+ leps = a;
+
+/* Try some tricks to see whether or not this is the correct E
+PS. */
+
+ b = two / 3;
+ half = one / 2;
+ d__1 = -half;
+ sixth = dlamc3_(&b, &d__1);
+ third = dlamc3_(&sixth, &sixth);
+ d__1 = -half;
+ b = dlamc3_(&third, &d__1);
+ b = dlamc3_(&b, &sixth);
+ b = abs(b);
+ if (b < leps) {
+ b = leps;
+ }
+
+ leps = 1.;
+
+/* + WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP */
+L10:
+ if (leps > b && b > zero) {
+ leps = b;
+ d__1 = half * leps;
+/* Computing 5th power */
+ d__3 = two, d__4 = d__3, d__3 *= d__3;
+/* Computing 2nd power */
+ d__5 = leps;
+ d__2 = d__4 * (d__3 * d__3) * (d__5 * d__5);
+ c = dlamc3_(&d__1, &d__2);
+ d__1 = -c;
+ c = dlamc3_(&half, &d__1);
+ b = dlamc3_(&half, &c);
+ d__1 = -b;
+ c = dlamc3_(&half, &d__1);
+ b = dlamc3_(&half, &c);
+ goto L10;
+ }
+/* + END WHILE */
+
+ if (a < leps) {
+ leps = a;
+ }
+
+/* Computation of EPS complete.
+
+ Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3
+)).
+ Keep dividing A by BETA until (gradual) underflow occurs. T
+his
+ is detected when we cannot recover the previous A. */
+
+ rbase = one / lbeta;
+ small = one;
+ for (i = 1; i <= 3; ++i) {
+ d__1 = small * rbase;
+ small = dlamc3_(&d__1, &zero);
+/* L20: */
+ }
+ a = dlamc3_(&one, &small);
+ dlamc4_(&ngpmin, &one, &lbeta);
+ d__1 = -one;
+ dlamc4_(&ngnmin, &d__1, &lbeta);
+ dlamc4_(&gpmin, &a, &lbeta);
+ d__1 = -a;
+ dlamc4_(&gnmin, &d__1, &lbeta);
+ ieee = FALSE_;
+
+ if (ngpmin == ngnmin && gpmin == gnmin) {
+ if (ngpmin == gpmin) {
+ lemin = ngpmin;
+/* ( Non twos-complement machines, no gradual under
+flow;
+ e.g., VAX ) */
+ } else if (gpmin - ngpmin == 3) {
+ lemin = ngpmin - 1 + lt;
+ ieee = TRUE_;
+/* ( Non twos-complement machines, with gradual und
+erflow;
+ e.g., IEEE standard followers ) */
+ } else {
+ lemin = min(ngpmin,gpmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if (ngpmin == gpmin && ngnmin == gnmin) {
+ if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1) {
+ lemin = max(ngpmin,ngnmin);
+/* ( Twos-complement machines, no gradual underflow
+;
+ e.g., CYBER 205 ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1 && gpmin == gnmin)
+ {
+ if (gpmin - min(ngpmin,ngnmin) == 3) {
+ lemin = max(ngpmin,ngnmin) - 1 + lt;
+/* ( Twos-complement machines with gradual underflo
+w;
+ no known machine ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else {
+/* Computing MIN */
+ i__1 = min(ngpmin,ngnmin), i__1 = min(i__1,gpmin);
+ lemin = min(i__1,gnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+/* **
+ Comment out this if block if EMIN is ok */
+ if (iwarn) {
+ first = TRUE_;
+ printf("\n\n WARNING. The value EMIN may be incorrect:- ");
+ printf("EMIN = %8i\n",lemin);
+ printf("If, after inspection, the value EMIN looks acceptable");
+ printf("please comment out \n the IF block as marked within the");
+ printf("code of routine DLAMC2, \n otherwise supply EMIN");
+ printf("explicitly.\n");
+ }
+/* **
+
+ Assume IEEE arithmetic if we found denormalised numbers abo
+ve,
+ or if arithmetic seems to round in the IEEE style, determi
+ned
+ in routine DLAMC1. A true IEEE machine should have both thi
+ngs
+ true; however, faulty machines may have one or the other. */
+
+ ieee = ieee || lieee1;
+
+/* Compute RMIN by successive division by BETA. We could comp
+ute
+ RMIN as BASE**( EMIN - 1 ), but some machines underflow dur
+ing
+ this computation. */
+
+ lrmin = 1.;
+ i__1 = 1 - lemin;
+ for (i = 1; i <= 1-lemin; ++i) {
+ d__1 = lrmin * rbase;
+ lrmin = dlamc3_(&d__1, &zero);
+/* L30: */
+ }
+
+/* Finally, call DLAMC5 to compute EMAX and RMAX. */
+
+ dlamc5_(&lbeta, <, &lemin, &ieee, &lemax, &lrmax);
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *eps = leps;
+ *emin = lemin;
+ *rmin = lrmin;
+ *emax = lemax;
+ *rmax = lrmax;
+
+ return 0;
+
+
+/* End of DLAMC2 */
+
+} /* dlamc2_ */
+
+
+double dlamc3_(double *a, double *b)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC3 is intended to force A and B to be stored prior to doing
+
+ the addition of A and B , for use in situations where optimizers
+
+ might hold one of these in a register.
+
+ Arguments
+ =========
+
+ A, B (input) DOUBLE PRECISION
+ The values A and B.
+
+ =====================================================================
+*/
+/* >>Start of File<<
+ System generated locals */
+ double ret_val;
+
+ ret_val = *a + *b;
+
+ return ret_val;
+
+/* End of DLAMC3 */
+
+} /* dlamc3_ */
+
+
+/* Subroutine */ int dlamc4_(int *emin, double *start, int *base)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC4 is a service routine for DLAMC2.
+
+ Arguments
+ =========
+
+ EMIN (output) EMIN
+ The minimum exponent before (gradual) underflow, computed by
+
+ setting A = START and dividing by BASE until the previous A
+ can not be recovered.
+
+ START (input) DOUBLE PRECISION
+ The starting point for determining EMIN.
+
+ BASE (input) INT
+ The base of the machine.
+
+ =====================================================================
+*/
+ /* System generated locals */
+ int i__1;
+ double d__1;
+ /* Local variables */
+ static double zero, a;
+ static int i;
+ static double rbase, b1, b2, c1, c2, d1, d2;
+ extern double dlamc3_(double *, double *);
+ static double one;
+
+ a = *start;
+ one = 1.;
+ rbase = one / *base;
+ zero = 0.;
+ *emin = 1;
+ d__1 = a * rbase;
+ b1 = dlamc3_(&d__1, &zero);
+ c1 = a;
+ c2 = a;
+ d1 = a;
+ d2 = a;
+/* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
+ $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP */
+L10:
+ if (c1 == a && c2 == a && d1 == a && d2 == a) {
+ --(*emin);
+ a = b1;
+ d__1 = a / *base;
+ b1 = dlamc3_(&d__1, &zero);
+ d__1 = b1 * *base;
+ c1 = dlamc3_(&d__1, &zero);
+ d1 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d1 += b1;
+/* L20: */
+ }
+ d__1 = a * rbase;
+ b2 = dlamc3_(&d__1, &zero);
+ d__1 = b2 / rbase;
+ c2 = dlamc3_(&d__1, &zero);
+ d2 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d2 += b2;
+/* L30: */
+ }
+ goto L10;
+ }
+/* + END WHILE */
+
+ return 0;
+
+/* End of DLAMC4 */
+
+} /* dlamc4_ */
+
+
+/* Subroutine */ int dlamc5_(int *beta, int *p, int *emin,
+ int *ieee, int *emax, double *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC5 attempts to compute RMAX, the largest machine floating-point
+ number, without overflow. It assumes that EMAX + abs(EMIN) sum
+ approximately to a power of 2. It will fail on machines where this
+ assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
+
+ EMAX = 28718). It will also fail if the value supplied for EMIN is
+ too large (i.e. too close to zero), probably with overflow.
+
+ Arguments
+ =========
+
+ BETA (input) INT
+ The base of floating-point arithmetic.
+
+ P (input) INT
+ The number of base BETA digits in the mantissa of a
+ floating-point value.
+
+ EMIN (input) INT
+ The minimum exponent before (gradual) underflow.
+
+ IEEE (input) INT
+ A int flag specifying whether or not the arithmetic
+ system is thought to comply with the IEEE standard.
+
+ EMAX (output) INT
+ The largest exponent before overflow
+
+ RMAX (output) DOUBLE PRECISION
+ The largest machine floating-point number.
+
+ =====================================================================
+
+
+
+ First compute LEXP and UEXP, two powers of 2 that bound
+ abs(EMIN). We then assume that EMAX + abs(EMIN) will sum
+ approximately to the bound that is closest to abs(EMIN).
+ (EMAX is the exponent of the required number RMAX). */
+ /* Table of constant values */
+ static double c_b5 = 0.;
+
+ /* System generated locals */
+ int i__1;
+ double d__1;
+ /* Local variables */
+ static int lexp;
+ static double oldy;
+ static int uexp, i;
+ static double y, z;
+ static int nbits;
+ extern double dlamc3_(double *, double *);
+ static double recbas;
+ static int exbits, expsum, try__;
+
+
+
+ lexp = 1;
+ exbits = 1;
+L10:
+ try__ = lexp << 1;
+ if (try__ <= -(*emin)) {
+ lexp = try__;
+ ++exbits;
+ goto L10;
+ }
+ if (lexp == -(*emin)) {
+ uexp = lexp;
+ } else {
+ uexp = try__;
+ ++exbits;
+ }
+
+/* Now -LEXP is less than or equal to EMIN, and -UEXP is greater
+ than or equal to EMIN. EXBITS is the number of bits needed to
+ store the exponent. */
+
+ if (uexp + *emin > -lexp - *emin) {
+ expsum = lexp << 1;
+ } else {
+ expsum = uexp << 1;
+ }
+
+/* EXPSUM is the exponent range, approximately equal to
+ EMAX - EMIN + 1 . */
+
+ *emax = expsum + *emin - 1;
+ nbits = exbits + 1 + *p;
+
+/* NBITS is the total number of bits needed to store a
+ floating-point number. */
+
+ if (nbits % 2 == 1 && *beta == 2) {
+
+/* Either there are an odd number of bits used to store a
+ floating-point number, which is unlikely, or some bits are
+
+ not used in the representation of numbers, which is possible
+,
+ (e.g. Cray machines) or the mantissa has an implicit bit,
+ (e.g. IEEE machines, Dec Vax machines), which is perhaps the
+
+ most likely. We have to assume the last alternative.
+ If this is true, then we need to reduce EMAX by one because
+
+ there must be some way of representing zero in an implicit-b
+it
+ system. On machines like Cray, we are reducing EMAX by one
+
+ unnecessarily. */
+
+ --(*emax);
+ }
+
+ if (*ieee) {
+
+/* Assume we are on an IEEE machine which reserves one exponent
+
+ for infinity and NaN. */
+
+ --(*emax);
+ }
+
+/* Now create RMAX, the largest machine number, which should
+ be equal to (1.0 - BETA**(-P)) * BETA**EMAX .
+
+ First compute 1.0 - BETA**(-P), being careful that the
+ result is less than 1.0 . */
+
+ recbas = 1. / *beta;
+ z = *beta - 1.;
+ y = 0.;
+ i__1 = *p;
+ for (i = 1; i <= *p; ++i) {
+ z *= recbas;
+ if (y < 1.) {
+ oldy = y;
+ }
+ y = dlamc3_(&y, &z);
+/* L20: */
+ }
+ if (y >= 1.) {
+ y = oldy;
+ }
+
+/* Now multiply by BETA**EMAX to get RMAX. */
+
+ i__1 = *emax;
+ for (i = 1; i <= *emax; ++i) {
+ d__1 = y * *beta;
+ y = dlamc3_(&d__1, &c_b5);
+/* L30: */
+ }
+
+ *rmax = y;
+ return 0;
+
+/* End of DLAMC5 */
+
+} /* dlamc5_ */
+
+double pow_di(double *ap, int *bp)
+{
+ double pow, x;
+ int n;
+
+ pow = 1;
+ x = *ap;
+ n = *bp;
+
+ if(n != 0){
+ if(n < 0) {
+ n = -n;
+ x = 1/x;
+ }
+ for( ; ; ) {
+ if(n & 01) pow *= x;
+ if(n >>= 1) x *= x;
+ else break;
+ }
+ }
+ return(pow);
+}
+
diff --git a/SRC/dlangs.c b/SRC/dlangs.c
new file mode 100644
index 0000000..5a642ca
--- /dev/null
+++ b/SRC/dlangs.c
@@ -0,0 +1,112 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: dlangs.c
+ * History: Modified from lapack routine DLANGE
+ */
+#include <math.h>
+#include "dsp_defs.h"
+#include "util.h"
+
+double dlangs(char *norm, SuperMatrix *A)
+{
+/*
+ Purpose
+ =======
+
+ DLANGS returns the value of the one norm, or the Frobenius norm, or
+ the infinity norm, or the element of largest absolute value of a
+ real matrix A.
+
+ Description
+ ===========
+
+ DLANGE returns the value
+
+ DLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+ (
+ ( norm1(A), NORM = '1', 'O' or 'o'
+ (
+ ( normI(A), NORM = 'I' or 'i'
+ (
+ ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+
+ where norm1 denotes the one norm of a matrix (maximum column sum),
+ normI denotes the infinity norm of a matrix (maximum row sum) and
+ normF denotes the Frobenius norm of a matrix (square root of sum of
+ squares). Note that max(abs(A(i,j))) is not a matrix norm.
+
+ Arguments
+ =========
+
+ NORM (input) CHARACTER*1
+ Specifies the value to be returned in DLANGE as described above.
+ A (input) SuperMatrix*
+ The M by N sparse matrix A.
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ double *Aval;
+ int i, j, irow;
+ double value, sum;
+ double *rwork;
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ if ( SUPERLU_MIN(A->nrow, A->ncol) == 0) {
+ value = 0.;
+
+ } else if (lsame_(norm, "M")) {
+ /* Find max(abs(A(i,j))). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ value = SUPERLU_MAX( value, fabs( Aval[i]) );
+
+ } else if (lsame_(norm, "O") || *(unsigned char *)norm == '1') {
+ /* Find norm1(A). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ sum = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ sum += fabs(Aval[i]);
+ value = SUPERLU_MAX(value,sum);
+ }
+
+ } else if (lsame_(norm, "I")) {
+ /* Find normI(A). */
+ if ( !(rwork = (double *) SUPERLU_MALLOC(A->nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for rwork.");
+ for (i = 0; i < A->nrow; ++i) rwork[i] = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) {
+ irow = Astore->rowind[i];
+ rwork[irow] += fabs(Aval[i]);
+ }
+ value = 0.;
+ for (i = 0; i < A->nrow; ++i)
+ value = SUPERLU_MAX(value, rwork[i]);
+
+ SUPERLU_FREE (rwork);
+
+ } else if (lsame_(norm, "F") || lsame_(norm, "E")) {
+ /* Find normF(A). */
+ ABORT("Not implemented.");
+ } else
+ ABORT("Illegal norm specified.");
+
+ return (value);
+
+} /* dlangs */
+
diff --git a/SRC/dlaqgs.c b/SRC/dlaqgs.c
new file mode 100644
index 0000000..4873a91
--- /dev/null
+++ b/SRC/dlaqgs.c
@@ -0,0 +1,137 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: dlaqgs.c
+ * History: Modified from LAPACK routine DLAQGE
+ */
+#include <math.h>
+#include "dsp_defs.h"
+
+void
+dlaqgs(SuperMatrix *A, double *r, double *c,
+ double rowcnd, double colcnd, double amax, char *equed)
+{
+/*
+ Purpose
+ =======
+
+ DLAQGS equilibrates a general sparse M by N matrix A using the row and
+ scaling factors in the vectors R and C.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input/output) SuperMatrix*
+ On exit, the equilibrated matrix. See EQUED for the form of
+ the equilibrated matrix. The type of A can be:
+ Stype = NC; Dtype = SLU_D; Mtype = GE.
+
+ R (input) double*, dimension (A->nrow)
+ The row scale factors for A.
+
+ C (input) double*, dimension (A->ncol)
+ The column scale factors for A.
+
+ ROWCND (input) double
+ Ratio of the smallest R(i) to the largest R(i).
+
+ COLCND (input) double
+ Ratio of the smallest C(i) to the largest C(i).
+
+ AMAX (input) double
+ Absolute value of largest matrix entry.
+
+ EQUED (output) char*
+ Specifies the form of equilibration that was done.
+ = 'N': No equilibration
+ = 'R': Row equilibration, i.e., A has been premultiplied by
+ diag(R).
+ = 'C': Column equilibration, i.e., A has been postmultiplied
+ by diag(C).
+ = 'B': Both row and column equilibration, i.e., A has been
+ replaced by diag(R) * A * diag(C).
+
+ Internal Parameters
+ ===================
+
+ THRESH is a threshold value used to decide if row or column scaling
+ should be done based on the ratio of the row or column scaling
+ factors. If ROWCND < THRESH, row scaling is done, and if
+ COLCND < THRESH, column scaling is done.
+
+ LARGE and SMALL are threshold values used to decide if row scaling
+ should be done based on the absolute size of the largest matrix
+ element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+
+ =====================================================================
+*/
+
+#define THRESH (0.1)
+
+ /* Local variables */
+ NCformat *Astore;
+ double *Aval;
+ int i, j, irow;
+ double large, small, cj;
+ extern double dlamch_(char *);
+
+
+ /* Quick return if possible */
+ if (A->nrow <= 0 || A->ncol <= 0) {
+ *(unsigned char *)equed = 'N';
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Initialize LARGE and SMALL. */
+ small = dlamch_("Safe minimum") / dlamch_("Precision");
+ large = 1. / small;
+
+ if (rowcnd >= THRESH && amax >= small && amax <= large) {
+ if (colcnd >= THRESH)
+ *(unsigned char *)equed = 'N';
+ else {
+ /* Column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ Aval[i] *= cj;
+ }
+ }
+ *(unsigned char *)equed = 'C';
+ }
+ } else if (colcnd >= THRESH) {
+ /* Row scaling, no column scaling */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ Aval[i] *= r[irow];
+ }
+ *(unsigned char *)equed = 'R';
+ } else {
+ /* Row and column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ Aval[i] *= cj * r[irow];
+ }
+ }
+ *(unsigned char *)equed = 'B';
+ }
+
+ return;
+
+} /* dlaqgs */
+
diff --git a/SRC/dmemory.c b/SRC/dmemory.c
new file mode 100644
index 0000000..c2e24a6
--- /dev/null
+++ b/SRC/dmemory.c
@@ -0,0 +1,676 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+/* Constants */
+#define NO_MEMTYPE 4 /* 0: lusup;
+ 1: ucol;
+ 2: lsub;
+ 3: usub */
+#define GluIntArray(n) (5 * (n) + 5)
+
+/* Internal prototypes */
+void *dexpand (int *, MemType,int, int, GlobalLU_t *);
+int dLUWorkInit (int, int, int, int **, double **, LU_space_t);
+void copy_mem_double (int, void *, void *);
+void dStackCompress (GlobalLU_t *);
+void dSetupSpace (void *, int, LU_space_t *);
+void *duser_malloc (int, int);
+void duser_free (int, int);
+
+/* External prototypes (in memory.c - prec-indep) */
+extern void copy_mem_int (int, void *, void *);
+extern void user_bcopy (char *, char *, int);
+
+/* Headers for 4 types of dynamatically managed memory */
+typedef struct e_node {
+ int size; /* length of the memory that has been used */
+ void *mem; /* pointer to the new malloc'd store */
+} ExpHeader;
+
+typedef struct {
+ int size;
+ int used;
+ int top1; /* grow upward, relative to &array[0] */
+ int top2; /* grow downward */
+ void *array;
+} LU_stack_t;
+
+/* Variables local to this file */
+static ExpHeader *expanders = 0; /* Array of pointers to 4 types of memory */
+static LU_stack_t stack;
+static int no_expand;
+
+/* Macros to manipulate stack */
+#define StackFull(x) ( x + stack.used >= stack.size )
+#define NotDoubleAlign(addr) ( (long int)addr & 7 )
+#define DoubleAlign(addr) ( ((long int)addr + 7) & ~7L )
+#define TempSpace(m, w) ( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \
+ (w + 1) * m * sizeof(double) )
+#define Reduce(alpha) ((alpha + 1) / 2) /* i.e. (alpha-1)/2 + 1 */
+
+
+
+
+/*
+ * Setup the memory model to be used for factorization.
+ * lwork = 0: use system malloc;
+ * lwork > 0: use user-supplied work[] space.
+ */
+void dSetupSpace(void *work, int lwork, LU_space_t *MemModel)
+{
+ if ( lwork == 0 ) {
+ *MemModel = SYSTEM; /* malloc/free */
+ } else if ( lwork > 0 ) {
+ *MemModel = USER; /* user provided space */
+ stack.used = 0;
+ stack.top1 = 0;
+ stack.top2 = (lwork/4)*4; /* must be word addressable */
+ stack.size = stack.top2;
+ stack.array = (void *) work;
+ }
+}
+
+
+
+void *duser_malloc(int bytes, int which_end)
+{
+ void *buf;
+
+ if ( StackFull(bytes) ) return (NULL);
+
+ if ( which_end == HEAD ) {
+ buf = (char*) stack.array + stack.top1;
+ stack.top1 += bytes;
+ } else {
+ stack.top2 -= bytes;
+ buf = (char*) stack.array + stack.top2;
+ }
+
+ stack.used += bytes;
+ return buf;
+}
+
+
+void duser_free(int bytes, int which_end)
+{
+ if ( which_end == HEAD ) {
+ stack.top1 -= bytes;
+ } else {
+ stack.top2 += bytes;
+ }
+ stack.used -= bytes;
+}
+
+
+
+/*
+ * mem_usage consists of the following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for the L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * Number of memory expansions during the LU factorization.
+ */
+int dQuerySpace(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ register int n, iword, dword, panel_size = sp_ienv(1);
+
+ Lstore = L->Store;
+ Ustore = U->Store;
+ n = L->ncol;
+ iword = sizeof(int);
+ dword = sizeof(double);
+
+ /* For LU factors */
+ mem_usage->for_lu = (float)( (4*n + 3) * iword + Lstore->nzval_colptr[n] *
+ dword + Lstore->rowind_colptr[n] * iword );
+ mem_usage->for_lu += (float)( (n + 1) * iword +
+ Ustore->colptr[n] * (dword + iword) );
+
+ /* Working storage to support factorization */
+ mem_usage->total_needed = mem_usage->for_lu +
+ (float)( (2 * panel_size + 4 + NO_MARKER) * n * iword +
+ (panel_size + 1) * n * dword );
+
+ mem_usage->expansions = --no_expand;
+
+ return 0;
+} /* dQuerySpace */
+
+/*
+ * Allocate storage for the data structures common to all factor routines.
+ * For those unpredictable size, make a guess as FILL * nnz(A).
+ * Return value:
+ * If lwork = -1, return the estimated amount of space required, plus n;
+ * otherwise, return the amount of space actually allocated when
+ * memory allocation failure occurred.
+ */
+int
+dLUMemInit(fact_t fact, void *work, int lwork, int m, int n, int annz,
+ int panel_size, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu,
+ int **iwork, double **dwork)
+{
+ int info, iword, dword;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ double *lusup;
+ int *xlusup;
+ double *ucol;
+ int *usub, *xusub;
+ int nzlmax, nzumax, nzlumax;
+ int FILL = sp_ienv(6);
+
+ Glu->n = n;
+ no_expand = 0;
+ iword = sizeof(int);
+ dword = sizeof(double);
+
+ if ( !expanders )
+ expanders = (ExpHeader*)SUPERLU_MALLOC(NO_MEMTYPE * sizeof(ExpHeader));
+ if ( !expanders ) ABORT("SUPERLU_MALLOC fails for expanders");
+
+ if ( fact != SamePattern_SameRowPerm ) {
+ /* Guess for L\U factors */
+ nzumax = nzlumax = FILL * annz;
+ nzlmax = SUPERLU_MAX(1, FILL/4.) * annz;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else {
+ dSetupSpace(work, lwork, &Glu->MemModel);
+ }
+
+#ifdef DEBUG
+ printf("dLUMemInit() called: annz %d, MemModel %d\n",
+ annz, Glu->MemModel);
+#endif
+
+ /* Integer pointers for L\U factors */
+ if ( Glu->MemModel == SYSTEM ) {
+ xsup = intMalloc(n+1);
+ supno = intMalloc(n+1);
+ xlsub = intMalloc(n+1);
+ xlusup = intMalloc(n+1);
+ xusub = intMalloc(n+1);
+ } else {
+ xsup = (int *)duser_malloc((n+1) * iword, HEAD);
+ supno = (int *)duser_malloc((n+1) * iword, HEAD);
+ xlsub = (int *)duser_malloc((n+1) * iword, HEAD);
+ xlusup = (int *)duser_malloc((n+1) * iword, HEAD);
+ xusub = (int *)duser_malloc((n+1) * iword, HEAD);
+ }
+
+ lusup = (double *) dexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (double *) dexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) dexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) dexpand( &nzumax, USUB, 0, 1, Glu );
+
+ while ( !lusup || !ucol || !lsub || !usub ) {
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE(lusup);
+ SUPERLU_FREE(ucol);
+ SUPERLU_FREE(lsub);
+ SUPERLU_FREE(usub);
+ } else {
+ duser_free((nzlumax+nzumax)*dword+(nzlmax+nzumax)*iword, HEAD);
+ }
+ nzlumax /= 2;
+ nzumax /= 2;
+ nzlmax /= 2;
+ if ( nzlumax < annz ) {
+ printf("Not enough memory to perform factorization.\n");
+ return (dmemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+ }
+ lusup = (double *) dexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (double *) dexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) dexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) dexpand( &nzumax, USUB, 0, 1, Glu );
+ }
+
+ } else {
+ /* fact == SamePattern_SameRowPerm */
+ Lstore = L->Store;
+ Ustore = U->Store;
+ xsup = Lstore->sup_to_col;
+ supno = Lstore->col_to_sup;
+ xlsub = Lstore->rowind_colptr;
+ xlusup = Lstore->nzval_colptr;
+ xusub = Ustore->colptr;
+ nzlmax = Glu->nzlmax; /* max from previous factorization */
+ nzumax = Glu->nzumax;
+ nzlumax = Glu->nzlumax;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else if ( lwork == 0 ) {
+ Glu->MemModel = SYSTEM;
+ } else {
+ Glu->MemModel = USER;
+ stack.top2 = (lwork/4)*4; /* must be word-addressable */
+ stack.size = stack.top2;
+ }
+
+ lsub = expanders[LSUB].mem = Lstore->rowind;
+ lusup = expanders[LUSUP].mem = Lstore->nzval;
+ usub = expanders[USUB].mem = Ustore->rowind;
+ ucol = expanders[UCOL].mem = Ustore->nzval;;
+ expanders[LSUB].size = nzlmax;
+ expanders[LUSUP].size = nzlumax;
+ expanders[USUB].size = nzumax;
+ expanders[UCOL].size = nzumax;
+ }
+
+ Glu->xsup = xsup;
+ Glu->supno = supno;
+ Glu->lsub = lsub;
+ Glu->xlsub = xlsub;
+ Glu->lusup = lusup;
+ Glu->xlusup = xlusup;
+ Glu->ucol = ucol;
+ Glu->usub = usub;
+ Glu->xusub = xusub;
+ Glu->nzlmax = nzlmax;
+ Glu->nzumax = nzumax;
+ Glu->nzlumax = nzlumax;
+
+ info = dLUWorkInit(m, n, panel_size, iwork, dwork, Glu->MemModel);
+ if ( info )
+ return ( info + dmemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+
+ ++no_expand;
+ return 0;
+
+} /* dLUMemInit */
+
+/* Allocate known working storage. Returns 0 if success, otherwise
+ returns the number of bytes allocated so far when failure occurred. */
+int
+dLUWorkInit(int m, int n, int panel_size, int **iworkptr,
+ double **dworkptr, LU_space_t MemModel)
+{
+ int isize, dsize, extra;
+ double *old_ptr;
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+
+ isize = ( (2 * panel_size + 3 + NO_MARKER ) * m + n ) * sizeof(int);
+ dsize = (m * panel_size +
+ NUM_TEMPV(m,panel_size,maxsuper,rowblk)) * sizeof(double);
+
+ if ( MemModel == SYSTEM )
+ *iworkptr = (int *) intCalloc(isize/sizeof(int));
+ else
+ *iworkptr = (int *) duser_malloc(isize, TAIL);
+ if ( ! *iworkptr ) {
+ fprintf(stderr, "dLUWorkInit: malloc fails for local iworkptr[]\n");
+ return (isize + n);
+ }
+
+ if ( MemModel == SYSTEM )
+ *dworkptr = (double *) SUPERLU_MALLOC(dsize);
+ else {
+ *dworkptr = (double *) duser_malloc(dsize, TAIL);
+ if ( NotDoubleAlign(*dworkptr) ) {
+ old_ptr = *dworkptr;
+ *dworkptr = (double*) DoubleAlign(*dworkptr);
+ *dworkptr = (double*) ((double*)*dworkptr - 1);
+ extra = (char*)old_ptr - (char*)*dworkptr;
+#ifdef DEBUG
+ printf("dLUWorkInit: not aligned, extra %d\n", extra);
+#endif
+ stack.top2 -= extra;
+ stack.used += extra;
+ }
+ }
+ if ( ! *dworkptr ) {
+ fprintf(stderr, "malloc fails for local dworkptr[].");
+ return (isize + dsize + n);
+ }
+
+ return 0;
+}
+
+
+/*
+ * Set up pointers for real working arrays.
+ */
+void
+dSetRWork(int m, int panel_size, double *dworkptr,
+ double **dense, double **tempv)
+{
+ double zero = 0.0;
+
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+ *dense = dworkptr;
+ *tempv = *dense + panel_size*m;
+ dfill (*dense, m * panel_size, zero);
+ dfill (*tempv, NUM_TEMPV(m,panel_size,maxsuper,rowblk), zero);
+}
+
+/*
+ * Free the working storage used by factor routines.
+ */
+void dLUWorkFree(int *iwork, double *dwork, GlobalLU_t *Glu)
+{
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE (iwork);
+ SUPERLU_FREE (dwork);
+ } else {
+ stack.used -= (stack.size - stack.top2);
+ stack.top2 = stack.size;
+/* dStackCompress(Glu); */
+ }
+
+ SUPERLU_FREE (expanders);
+ expanders = 0;
+}
+
+/* Expand the data structures for L and U during the factorization.
+ * Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+dLUMemXpand(int jcol,
+ int next, /* number of elements currently in the factors */
+ MemType mem_type, /* which type of memory to expand */
+ int *maxlen, /* modified - maximum length of a data structure */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ void *new_mem;
+
+#ifdef DEBUG
+ printf("dLUMemXpand(): jcol %d, next %d, maxlen %d, MemType %d\n",
+ jcol, next, *maxlen, mem_type);
+#endif
+
+ if (mem_type == USUB)
+ new_mem = dexpand(maxlen, mem_type, next, 1, Glu);
+ else
+ new_mem = dexpand(maxlen, mem_type, next, 0, Glu);
+
+ if ( !new_mem ) {
+ int nzlmax = Glu->nzlmax;
+ int nzumax = Glu->nzumax;
+ int nzlumax = Glu->nzlumax;
+ fprintf(stderr, "Can't expand MemType %d: jcol %d\n", mem_type, jcol);
+ return (dmemory_usage(nzlmax, nzumax, nzlumax, Glu->n) + Glu->n);
+ }
+
+ switch ( mem_type ) {
+ case LUSUP:
+ Glu->lusup = (double *) new_mem;
+ Glu->nzlumax = *maxlen;
+ break;
+ case UCOL:
+ Glu->ucol = (double *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ case LSUB:
+ Glu->lsub = (int *) new_mem;
+ Glu->nzlmax = *maxlen;
+ break;
+ case USUB:
+ Glu->usub = (int *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ }
+
+ return 0;
+
+}
+
+
+
+void
+copy_mem_double(int howmany, void *old, void *new)
+{
+ register int i;
+ double *dold = old;
+ double *dnew = new;
+ for (i = 0; i < howmany; i++) dnew[i] = dold[i];
+}
+
+/*
+ * Expand the existing storage to accommodate more fill-ins.
+ */
+void
+*dexpand (
+ int *prev_len, /* length used from previous call */
+ MemType type, /* which part of the memory to expand */
+ int len_to_copy, /* size of the memory to be copied to new store */
+ int keep_prev, /* = 1: use prev_len;
+ = 0: compute new_len to expand */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ float EXPAND = 1.5;
+ float alpha;
+ void *new_mem, *old_mem;
+ int new_len, tries, lword, extra, bytes_to_copy;
+
+ alpha = EXPAND;
+
+ if ( no_expand == 0 || keep_prev ) /* First time allocate requested */
+ new_len = *prev_len;
+ else {
+ new_len = alpha * *prev_len;
+ }
+
+ if ( type == LSUB || type == USUB ) lword = sizeof(int);
+ else lword = sizeof(double);
+
+ if ( Glu->MemModel == SYSTEM ) {
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ if ( no_expand != 0 ) {
+ tries = 0;
+ if ( keep_prev ) {
+ if ( !new_mem ) return (NULL);
+ } else {
+ while ( !new_mem ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ }
+ }
+ if ( type == LSUB || type == USUB ) {
+ copy_mem_int(len_to_copy, expanders[type].mem, new_mem);
+ } else {
+ copy_mem_double(len_to_copy, expanders[type].mem, new_mem);
+ }
+ SUPERLU_FREE (expanders[type].mem);
+ }
+ expanders[type].mem = (void *) new_mem;
+
+ } else { /* MemModel == USER */
+ if ( no_expand == 0 ) {
+ new_mem = duser_malloc(new_len * lword, HEAD);
+ if ( NotDoubleAlign(new_mem) &&
+ (type == LUSUP || type == UCOL) ) {
+ old_mem = new_mem;
+ new_mem = (void *)DoubleAlign(new_mem);
+ extra = (char*)new_mem - (char*)old_mem;
+#ifdef DEBUG
+ printf("expand(): not aligned, extra %d\n", extra);
+#endif
+ stack.top1 += extra;
+ stack.used += extra;
+ }
+ expanders[type].mem = (void *) new_mem;
+ }
+ else {
+ tries = 0;
+ extra = (new_len - *prev_len) * lword;
+ if ( keep_prev ) {
+ if ( StackFull(extra) ) return (NULL);
+ } else {
+ while ( StackFull(extra) ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ extra = (new_len - *prev_len) * lword;
+ }
+ }
+
+ if ( type != USUB ) {
+ new_mem = (void*)((char*)expanders[type + 1].mem + extra);
+ bytes_to_copy = (char*)stack.array + stack.top1
+ - (char*)expanders[type + 1].mem;
+ user_bcopy(expanders[type+1].mem, new_mem, bytes_to_copy);
+
+ if ( type < USUB ) {
+ Glu->usub = expanders[USUB].mem =
+ (void*)((char*)expanders[USUB].mem + extra);
+ }
+ if ( type < LSUB ) {
+ Glu->lsub = expanders[LSUB].mem =
+ (void*)((char*)expanders[LSUB].mem + extra);
+ }
+ if ( type < UCOL ) {
+ Glu->ucol = expanders[UCOL].mem =
+ (void*)((char*)expanders[UCOL].mem + extra);
+ }
+ stack.top1 += extra;
+ stack.used += extra;
+ if ( type == UCOL ) {
+ stack.top1 += extra; /* Add same amount for USUB */
+ stack.used += extra;
+ }
+
+ } /* if ... */
+
+ } /* else ... */
+ }
+
+ expanders[type].size = new_len;
+ *prev_len = new_len;
+ if ( no_expand ) ++no_expand;
+
+ return (void *) expanders[type].mem;
+
+} /* dexpand */
+
+
+/*
+ * Compress the work[] array to remove fragmentation.
+ */
+void
+dStackCompress(GlobalLU_t *Glu)
+{
+ register int iword, dword, ndim;
+ char *last, *fragment;
+ int *ifrom, *ito;
+ double *dfrom, *dto;
+ int *xlsub, *lsub, *xusub, *usub, *xlusup;
+ double *ucol, *lusup;
+
+ iword = sizeof(int);
+ dword = sizeof(double);
+ ndim = Glu->n;
+
+ xlsub = Glu->xlsub;
+ lsub = Glu->lsub;
+ xusub = Glu->xusub;
+ usub = Glu->usub;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ lusup = Glu->lusup;
+
+ dfrom = ucol;
+ dto = (double *)((char*)lusup + xlusup[ndim] * dword);
+ copy_mem_double(xusub[ndim], dfrom, dto);
+ ucol = dto;
+
+ ifrom = lsub;
+ ito = (int *) ((char*)ucol + xusub[ndim] * iword);
+ copy_mem_int(xlsub[ndim], ifrom, ito);
+ lsub = ito;
+
+ ifrom = usub;
+ ito = (int *) ((char*)lsub + xlsub[ndim] * iword);
+ copy_mem_int(xusub[ndim], ifrom, ito);
+ usub = ito;
+
+ last = (char*)usub + xusub[ndim] * iword;
+ fragment = (char*) (((char*)stack.array + stack.top1) - last);
+ stack.used -= (long int) fragment;
+ stack.top1 -= (long int) fragment;
+
+ Glu->ucol = ucol;
+ Glu->lsub = lsub;
+ Glu->usub = usub;
+
+#ifdef DEBUG
+ printf("dStackCompress: fragment %d\n", fragment);
+ /* for (last = 0; last < ndim; ++last)
+ print_lu_col("After compress:", last, 0);*/
+#endif
+
+}
+
+/*
+ * Allocate storage for original matrix A
+ */
+void
+dallocateA(int n, int nnz, double **a, int **asub, int **xa)
+{
+ *a = (double *) doubleMalloc(nnz);
+ *asub = (int *) intMalloc(nnz);
+ *xa = (int *) intMalloc(n+1);
+}
+
+
+double *doubleMalloc(int n)
+{
+ double *buf;
+ buf = (double *) SUPERLU_MALLOC(n * sizeof(double));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in doubleMalloc()\n");
+ }
+ return (buf);
+}
+
+double *doubleCalloc(int n)
+{
+ double *buf;
+ register int i;
+ double zero = 0.0;
+ buf = (double *) SUPERLU_MALLOC(n * sizeof(double));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in doubleCalloc()\n");
+ }
+ for (i = 0; i < n; ++i) buf[i] = zero;
+ return (buf);
+}
+
+
+int dmemory_usage(const int nzlmax, const int nzumax,
+ const int nzlumax, const int n)
+{
+ register int iword, dword;
+
+ iword = sizeof(int);
+ dword = sizeof(double);
+
+ return (10 * n * iword +
+ nzlmax * iword + nzumax * (iword + dword) + nzlumax * dword);
+
+}
diff --git a/SRC/dmyblas2.c b/SRC/dmyblas2.c
new file mode 100644
index 0000000..e6bbdd1
--- /dev/null
+++ b/SRC/dmyblas2.c
@@ -0,0 +1,225 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: dmyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void dlsolve ( int ldm, int ncol, double *M, double *rhs )
+{
+ int k;
+ double x0, x1, x2, x3, x4, x5, x6, x7;
+ double *M0;
+ register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+ Mki4 = Mki3 + ldm + 1;
+ Mki5 = Mki4 + ldm + 1;
+ Mki6 = Mki5 + ldm + 1;
+ Mki7 = Mki6 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+ x4 = rhs[firstcol+4] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++;
+ x5 = rhs[firstcol+5] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++;
+ x6 = rhs[firstcol+6] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++;
+ x7 = rhs[firstcol+7] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ rhs[++firstcol] = x4;
+ rhs[++firstcol] = x5;
+ rhs[++firstcol] = x6;
+ rhs[++firstcol] = x7;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++
+ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++ - x7 * *Mki7++;
+
+ M0 += 8 * ldm + 8;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++;
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++;
+
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+dusolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+double *M; /* in */
+double *rhs; /* modified */
+{
+ double xj;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ xj = rhs[jcol] / M[jcol + jcol*ldm]; /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++)
+ rhs[irow] -= xj * M[irow + jcol*ldm]; /* M(irow, jcol) */
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void dmatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+double *M; /* in */
+double *vec; /* in */
+double *Mxvec; /* in/out */
+
+{
+ double vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7;
+ double *M0;
+ register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+ Mki4 = Mki3 + ldm;
+ Mki5 = Mki4 + ldm;
+ Mki6 = Mki5 + ldm;
+ Mki7 = Mki6 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ vi4 = vec[firstcol++];
+ vi5 = vec[firstcol++];
+ vi6 = vec[firstcol++];
+ vi7 = vec[firstcol++];
+
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++
+ + vi4 * *Mki4++ + vi5 * *Mki5++
+ + vi6 * *Mki6++ + vi7 * *Mki7++;
+
+ M0 += 8 * ldm;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++ ;
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++;
+
+ M0 += ldm;
+ }
+
+}
+
diff --git a/SRC/dpanel_bmod.c b/SRC/dpanel_bmod.c
new file mode 100644
index 0000000..bdc8c77
--- /dev/null
+++ b/SRC/dpanel_bmod.c
@@ -0,0 +1,450 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "dsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void dlsolve(int, int, double *, double *);
+void dmatvec(int, int, int, double *, double *, double *);
+extern void dcheck_tempv();
+
+void
+dpanel_bmod (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ const int nseg, /* in */
+ double *dense, /* out, of size n by w */
+ double *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in, of size n by w */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs numeric block updates (sup-panel) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ * Before entering this routine, the original nonzeros in the panel
+ * were already copied into the spa[m,w].
+ *
+ * Updated/Output parameters-
+ * dense[0:m-1,w]: L[*,j:j+w-1] and U[*,j:j+w-1] are returned
+ * collectively in the m-by-w vector dense[*].
+ *
+ */
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ double alpha, beta;
+#endif
+
+ register int k, ksub;
+ int fsupc, nsupc, nsupr, nrow;
+ int krep, krep_ind;
+ double ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int segsze;
+ int block_nrow; /* no of rows in a block row */
+ register int lptr; /* Points to the row subscripts of a supernode */
+ int kfnz, irow, no_zeros;
+ register int isub, isub1, i;
+ register int jj; /* Index through each column in the panel */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ double *lusup;
+ int *xlusup;
+ int *repfnz_col; /* repfnz[] for a column in the panel */
+ double *dense_col; /* dense[] for a column in the panel */
+ double *tempv1; /* Used in 1-D update */
+ double *TriTmp, *MatvecTmp; /* used in 2-D update */
+ double zero = 0.0;
+ double one = 1.0;
+ register int ldaTmp;
+ register int r_ind, r_hi;
+ static int first = 1, maxsuper, rowblk, colblk;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ rowblk = sp_ienv(4);
+ colblk = sp_ienv(5);
+ first = 0;
+ }
+ ldaTmp = maxsuper + rowblk;
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) { /* for each updating supernode */
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in a supernode
+ * nsupr = no of rows in a supernode
+ */
+ krep = segrep[k--];
+ fsupc = xsup[supno[krep]];
+ nsupc = krep - fsupc + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nrow = nsupr - nsupc;
+ lptr = xlsub[fsupc];
+ krep_ind = lptr + nsupc - 1;
+
+ repfnz_col = repfnz;
+ dense_col = dense;
+
+ if ( nsupc >= colblk && nrow > rowblk ) { /* 2-D block update */
+
+ TriTmp = tempv;
+
+ /* Sequence through each column in panel -- triangular solves */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp ) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += segsze * (segsze - 1);
+ ops[GEMV] += 2 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ dense_col[irow] -= ukj * lusup[luptr];
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ ukj -= ukj1 * lusup[luptr1];
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++;
+ dense_col[irow] -= (ukj*lusup[luptr]
+ + ukj1*lusup[luptr1]);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ ukj1 -= ukj2 * lusup[luptr2-1];
+ ukj = ukj - ukj1*lusup[luptr1] - ukj2*lusup[luptr2];
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++; luptr2++;
+ dense_col[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] + ukj2*lusup[luptr2] );
+ }
+ }
+
+ } else { /* segsze >= 4 */
+
+ /* Copy U[*,j] segment from dense[*] to TriTmp[*], which
+ holds the result of triangular solves. */
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ TriTmp[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#else
+ dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#endif
+#else
+ dlsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
+#endif
+
+
+ } /* else ... */
+
+ } /* for jj ... end tri-solves */
+
+ /* Block row updates; push all the way into dense[*] block */
+ for ( r_ind = 0; r_ind < nrow; r_ind += rowblk ) {
+
+ r_hi = SUPERLU_MIN(nrow, r_ind + rowblk);
+ block_nrow = SUPERLU_MIN(rowblk, r_hi - r_ind);
+ luptr = xlusup[fsupc] + nsupc + r_ind;
+ isub1 = lptr + nsupc + r_ind;
+
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ /* Sequence through each column in panel -- matrix-vector */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ /* Perform a block update, and scatter the result of
+ matrix-vector to dense[]. */
+ no_zeros = kfnz - fsupc;
+ luptr1 = luptr + nsupr * no_zeros;
+ MatvecTmp = &TriTmp[maxsuper];
+
+#ifdef USE_VENDOR_BLAS
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ SGEMV(ftcs2, &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#else
+ dgemv_("N", &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#endif
+#else
+ dmatvec(nsupr, block_nrow, segsze, &lusup[luptr1],
+ TriTmp, MatvecTmp);
+#endif
+
+ /* Scatter MatvecTmp[*] into SPA dense[*] temporarily
+ * such that MatvecTmp[*] can be re-used for the
+ * the next blok row update. dense[] will be copied into
+ * global store after the whole panel has been finished.
+ */
+ isub = isub1;
+ for (i = 0; i < block_nrow; i++) {
+ irow = lsub[isub];
+ dense_col[irow] -= MatvecTmp[i];
+ MatvecTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } /* for each block row ... */
+
+ /* Scatter the triangular solves into SPA dense[*] */
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = TriTmp[i];
+ TriTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } else { /* 1-D block modification */
+
+
+ /* Sequence through each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += segsze * (segsze - 1);
+ ops[GEMV] += 2 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ dense_col[irow] -= ukj * lusup[luptr];
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ ukj -= ukj1 * lusup[luptr1];
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1;
+ dense_col[irow] -= (ukj*lusup[luptr]
+ + ukj1*lusup[luptr1]);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ ukj1 -= ukj2 * lusup[luptr2-1];
+ ukj = ukj - ukj1*lusup[luptr1] - ukj2*lusup[luptr2];
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1; ++luptr2;
+ dense_col[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] + ukj2*lusup[luptr2] );
+ }
+ }
+
+ } else { /* segsze >= 4 */
+ /*
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense[].
+ */
+ no_zeros = kfnz - fsupc;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*]:
+ * The result of triangular solve is in tempv[*];
+ * The result of matrix vector update is in dense_col[*]
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ tempv[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ SGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ dgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ dlsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ dmatvec (nsupr, nrow, segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+ /* Scatter tempv[*] into SPA dense[*] temporarily, such
+ * that tempv[*] can be used for the triangular solve of
+ * the next column of the panel. They will be copied into
+ * ucol[*] after the whole panel has been finished.
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = tempv[i];
+ tempv[i] = zero;
+ isub++;
+ }
+
+ /* Scatter the update from tempv1[*] into SPA dense[*] */
+ /* Start dense rectangular L */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ dense_col[irow] -= tempv1[i];
+ tempv1[i] = zero;
+ ++isub;
+ }
+
+ } /* else segsze>=4 ... */
+
+ } /* for each column in the panel... */
+
+ } /* else 1-D update ... */
+
+ } /* for each updating supernode ... */
+
+}
+
+
+
diff --git a/SRC/dpanel_dfs.c b/SRC/dpanel_dfs.c
new file mode 100644
index 0000000..da2f18c
--- /dev/null
+++ b/SRC/dpanel_dfs.c
@@ -0,0 +1,249 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+#include "util.h"
+
+void
+dpanel_dfs (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ SuperMatrix *A, /* in - original matrix */
+ int *perm_r, /* in */
+ int *nseg, /* out */
+ double *dense, /* out */
+ int *panel_lsub, /* out */
+ int *segrep, /* out */
+ int *repfnz, /* out */
+ int *xprune, /* out */
+ int *marker, /* out */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs a symbolic factorization on a panel of columns [jcol, jcol+w).
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives.
+ *
+ * The routine returns one list of the supernodal representatives
+ * in topological order of the dfs that generates them. This list is
+ * a superset of the topological order of each individual column within
+ * the panel.
+ * The location of the first nonzero in each supernodal segment
+ * (supernodal entry location) is also returned. Each column has a
+ * separate list for this purpose.
+ *
+ * Two marker arrays are used for dfs:
+ * marker[i] == jj, if i was visited during dfs of current column jj;
+ * marker1[i] >= jcol, if i was visited by earlier columns in this panel;
+ *
+ * marker: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ */
+ NCPformat *Astore;
+ double *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int krep, chperm, chmark, chrep, oldrep, kchild, myfnz;
+ int k, krow, kmark, kperm;
+ int xdfs, maxdfs, kpar;
+ int jj; /* index through each column in the panel */
+ int *marker1; /* marker1[jj] >= jcol if vertex jj was visited
+ by a previous column within this panel. */
+ int *repfnz_col; /* start of each column in the panel */
+ double *dense_col; /* start of each column in the panel */
+ int nextl_col; /* next available position in panel_lsub[*,jj] */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+
+ /* Initialize pointers */
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+ marker1 = marker + m;
+ repfnz_col = repfnz;
+ dense_col = dense;
+ *nseg = 0;
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+
+ /* For each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++) {
+ nextl_col = (jj - jcol) * m;
+
+#ifdef CHK_DFS
+ printf("\npanel col %d: ", jj);
+#endif
+
+ /* For each nonz in A[*,jj] do dfs */
+ for (k = xa_begin[jj]; k < xa_end[jj]; k++) {
+ krow = asub[k];
+ dense_col[krow] = a[k];
+ kmark = marker[krow];
+ if ( kmark == jj )
+ continue; /* krow visited before, go to the next nonzero */
+
+ /* For each unmarked nbr krow of jj
+ * krow is in L: place it in structure of L[*,jj]
+ */
+ marker[krow] = jj;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ panel_lsub[nextl_col++] = krow; /* krow is indexed into A */
+ }
+ /*
+ * krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ else {
+
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz_col[krep];
+
+#ifdef CHK_DFS
+ printf("krep %d, myfnz %d, perm_r[%d] %d\n", krep, myfnz, krow, kperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Representative visited before */
+ if ( myfnz > kperm ) repfnz_col[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz_col[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker[kchild];
+
+ if ( chmark != jj ) { /* Not reached yet */
+ marker[kchild] = jj;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,j] */
+ if ( chperm == EMPTY ) {
+ panel_lsub[nextl_col++] = kchild;
+ }
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ else {
+
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz_col[chrep];
+#ifdef CHK_DFS
+ printf("chrep %d,myfnz %d,perm_r[%d] %d\n",chrep,myfnz,kchild,chperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz_col[chrep] = chperm;
+ }
+ else {
+ /* Cont. dfs at snode-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L) */
+ parent[krep] = oldrep;
+ repfnz_col[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } /* else */
+
+ } /* else */
+
+ } /* if... */
+
+ } /* while xdfs < maxdfs */
+
+ /* krow has no more unexplored nbrs:
+ * Place snode-rep krep in postorder DFS, if this
+ * segment is seen for the first time. (Note that
+ * "repfnz[krep]" may change later.)
+ * Backtrack dfs to its parent.
+ */
+ if ( marker1[krep] < jcol ) {
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ marker1[krep] = jj;
+ }
+
+ kpar = parent[krep]; /* Pop stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" pop stack: krep %d,xdfs %d,maxdfs %d: ", krep,xdfs,maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } while ( kpar != EMPTY ); /* do-while - until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonz in A[*,jj] */
+
+ repfnz_col += m; /* Move to next column */
+ dense_col += m;
+
+ } /* for jj ... */
+
+}
diff --git a/SRC/dpivotL.c b/SRC/dpivotL.c
new file mode 100644
index 0000000..9263427
--- /dev/null
+++ b/SRC/dpivotL.c
@@ -0,0 +1,173 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include <stdlib.h>
+#include "dsp_defs.h"
+
+#undef DEBUG
+
+int
+dpivotL(
+ const int jcol, /* in */
+ const double u, /* in - diagonal pivoting threshold */
+ int *usepr, /* re-use the pivot sequence given by perm_r/iperm_r */
+ int *perm_r, /* may be modified */
+ int *iperm_r, /* in - inverse of perm_r */
+ int *iperm_c, /* in - used to find diagonal of Pc*A*Pc' */
+ int *pivrow, /* out */
+ GlobalLU_t *Glu, /* modified - global LU data structures */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Performs the numerical pivoting on the current column of L,
+ * and the CDIV operation.
+ *
+ * Pivot policy:
+ * (1) Compute thresh = u * max_(i>=j) abs(A_ij);
+ * (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN
+ * pivot row = k;
+ * ELSE IF abs(A_jj) >= thresh THEN
+ * pivot row = j;
+ * ELSE
+ * pivot row = m;
+ *
+ * Note: If you absolutely want to use a given pivot order, then set u=0.0.
+ *
+ * Return value: 0 success;
+ * i > 0 U(i,i) is exactly zero.
+ *
+ */
+ int fsupc; /* first column in the supernode */
+ int nsupc; /* no of columns in the supernode */
+ int nsupr; /* no of rows in the supernode */
+ int lptr; /* points to the starting subscript of the supernode */
+ int pivptr, old_pivptr, diag, diagind;
+ double pivmax, rtemp, thresh;
+ double temp;
+ double *lu_sup_ptr;
+ double *lu_col_ptr;
+ int *lsub_ptr;
+ int isub, icol, k, itemp;
+ int *lsub, *xlsub;
+ double *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ /* Initialize pointers */
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ fsupc = (Glu->xsup)[(Glu->supno)[jcol]];
+ nsupc = jcol - fsupc; /* excluding jcol; nsupc >= 0 */
+ lptr = xlsub[fsupc];
+ nsupr = xlsub[fsupc+1] - lptr;
+ lu_sup_ptr = &lusup[xlusup[fsupc]]; /* start of the current supernode */
+ lu_col_ptr = &lusup[xlusup[jcol]]; /* start of jcol in the supernode */
+ lsub_ptr = &lsub[lptr]; /* start of row indices of the supernode */
+
+#ifdef DEBUG
+if ( jcol == MIN_COL ) {
+ printf("Before cdiv: col %d\n", jcol);
+ for (k = nsupc; k < nsupr; k++)
+ printf(" lu[%d] %f\n", lsub_ptr[k], lu_col_ptr[k]);
+}
+#endif
+
+ /* Determine the largest abs numerical value for partial pivoting;
+ Also search for user-specified pivot, and diagonal element. */
+ if ( *usepr ) *pivrow = iperm_r[jcol];
+ diagind = iperm_c[jcol];
+ pivmax = 0.0;
+ pivptr = nsupc;
+ diag = EMPTY;
+ old_pivptr = nsupc;
+ for (isub = nsupc; isub < nsupr; ++isub) {
+ rtemp = fabs (lu_col_ptr[isub]);
+ if ( rtemp > pivmax ) {
+ pivmax = rtemp;
+ pivptr = isub;
+ }
+ if ( *usepr && lsub_ptr[isub] == *pivrow ) old_pivptr = isub;
+ if ( lsub_ptr[isub] == diagind ) diag = isub;
+ }
+
+ /* Test for singularity */
+ if ( pivmax == 0.0 ) {
+ *pivrow = lsub_ptr[pivptr];
+ perm_r[*pivrow] = jcol;
+ *usepr = 0;
+ return (jcol+1);
+ }
+
+ thresh = u * pivmax;
+
+ /* Choose appropriate pivotal element by our policy. */
+ if ( *usepr ) {
+ rtemp = fabs (lu_col_ptr[old_pivptr]);
+ if ( rtemp != 0.0 && rtemp >= thresh )
+ pivptr = old_pivptr;
+ else
+ *usepr = 0;
+ }
+ if ( *usepr == 0 ) {
+ /* Use diagonal pivot? */
+ if ( diag >= 0 ) { /* diagonal exists */
+ rtemp = fabs (lu_col_ptr[diag]);
+ if ( rtemp != 0.0 && rtemp >= thresh ) pivptr = diag;
+ }
+ *pivrow = lsub_ptr[pivptr];
+ }
+
+ /* Record pivot row */
+ perm_r[*pivrow] = jcol;
+
+ /* Interchange row subscripts */
+ if ( pivptr != nsupc ) {
+ itemp = lsub_ptr[pivptr];
+ lsub_ptr[pivptr] = lsub_ptr[nsupc];
+ lsub_ptr[nsupc] = itemp;
+
+ /* Interchange numerical values as well, for the whole snode, such
+ * that L is indexed the same way as A.
+ */
+ for (icol = 0; icol <= nsupc; icol++) {
+ itemp = pivptr + icol * nsupr;
+ temp = lu_sup_ptr[itemp];
+ lu_sup_ptr[itemp] = lu_sup_ptr[nsupc + icol*nsupr];
+ lu_sup_ptr[nsupc + icol*nsupr] = temp;
+ }
+ } /* if */
+
+ /* cdiv operation */
+ ops[FACT] += nsupr - nsupc;
+
+ temp = 1.0 / lu_col_ptr[nsupc];
+ for (k = nsupc+1; k < nsupr; k++)
+ lu_col_ptr[k] *= temp;
+
+ return 0;
+}
+
diff --git a/SRC/dpivotgrowth.c b/SRC/dpivotgrowth.c
new file mode 100644
index 0000000..ac943c1
--- /dev/null
+++ b/SRC/dpivotgrowth.c
@@ -0,0 +1,109 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "dsp_defs.h"
+#include "util.h"
+
+double
+dPivotGrowth(int ncols, SuperMatrix *A, int *perm_c,
+ SuperMatrix *L, SuperMatrix *U)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Compute the reciprocal pivot growth factor of the leading ncols columns
+ * of the matrix, using the formula:
+ * min_j ( max_i(abs(A_ij)) / max_i(abs(U_ij)) )
+ *
+ * Arguments
+ * =========
+ *
+ * ncols (input) int
+ * The number of columns of matrices A, L and U.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = NC; Dtype = SLU_D; Mtype = GE.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SC; Dtype = SLU_D; Mtype = TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = NC;
+ * Dtype = SLU_D; Mtype = TRU.
+ *
+ */
+ NCformat *Astore;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *Aval, *Lval, *Uval;
+ int fsupc, nsupr, luptr, nz_in_U;
+ int i, j, k, oldcol;
+ int *inv_perm_c;
+ double rpg, maxaj, maxuj;
+ extern double dlamch_(char *);
+ double smlnum;
+ double *luval;
+
+ /* Get machine constants. */
+ smlnum = dlamch_("S");
+ rpg = 1. / smlnum;
+
+ Astore = A->Store;
+ Lstore = L->Store;
+ Ustore = U->Store;
+ Aval = Astore->nzval;
+ Lval = Lstore->nzval;
+ Uval = Ustore->nzval;
+
+ inv_perm_c = (int *) SUPERLU_MALLOC(A->ncol*sizeof(int));
+ for (j = 0; j < A->ncol; ++j) inv_perm_c[perm_c[j]] = j;
+
+ for (k = 0; k <= Lstore->nsuper; ++k) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ luptr = L_NZ_START(fsupc);
+ luval = &Lval[luptr];
+ nz_in_U = 1;
+
+ for (j = fsupc; j < L_FST_SUPC(k+1) && j < ncols; ++j) {
+ maxaj = 0.;
+ oldcol = inv_perm_c[j];
+ for (i = Astore->colptr[oldcol]; i < Astore->colptr[oldcol+1]; ++i)
+ maxaj = SUPERLU_MAX( maxaj, fabs(Aval[i]) );
+
+ maxuj = 0.;
+ for (i = Ustore->colptr[j]; i < Ustore->colptr[j+1]; i++)
+ maxuj = SUPERLU_MAX( maxuj, fabs(Uval[i]) );
+
+ /* Supernode */
+ for (i = 0; i < nz_in_U; ++i)
+ maxuj = SUPERLU_MAX( maxuj, fabs(luval[i]) );
+
+ ++nz_in_U;
+ luval += nsupr;
+
+ if ( maxuj == 0. )
+ rpg = SUPERLU_MIN( rpg, 1.);
+ else
+ rpg = SUPERLU_MIN( rpg, maxaj / maxuj );
+ }
+
+ if ( j >= ncols ) break;
+ }
+
+ SUPERLU_FREE(inv_perm_c);
+ return (rpg);
+}
diff --git a/SRC/dpruneL.c b/SRC/dpruneL.c
new file mode 100644
index 0000000..1e7d53d
--- /dev/null
+++ b/SRC/dpruneL.c
@@ -0,0 +1,149 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+#include "util.h"
+
+void
+dpruneL(
+ const int jcol, /* in */
+ const int *perm_r, /* in */
+ const int pivrow, /* in */
+ const int nseg, /* in */
+ const int *segrep, /* in */
+ const int *repfnz, /* in */
+ int *xprune, /* out */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Prunes the L-structure of supernodes whose L-structure
+ * contains the current pivot row "pivrow"
+ *
+ */
+ double utemp;
+ int jsupno, irep, irep1, kmin, kmax, krow, movnum;
+ int i, ktemp, minloc, maxloc;
+ int do_prune; /* logical variable */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ double *lusup;
+ int *xlusup;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ /*
+ * For each supernode-rep irep in U[*,j]
+ */
+ jsupno = supno[jcol];
+ for (i = 0; i < nseg; i++) {
+
+ irep = segrep[i];
+ irep1 = irep + 1;
+ do_prune = FALSE;
+
+ /* Don't prune with a zero U-segment */
+ if ( repfnz[irep] == EMPTY )
+ continue;
+
+ /* If a snode overlaps with the next panel, then the U-segment
+ * is fragmented into two parts -- irep and irep1. We should let
+ * pruning occur at the rep-column in irep1's snode.
+ */
+ if ( supno[irep] == supno[irep1] ) /* Don't prune */
+ continue;
+
+ /*
+ * If it has not been pruned & it has a nonz in row L[pivrow,i]
+ */
+ if ( supno[irep] != jsupno ) {
+ if ( xprune[irep] >= xlsub[irep1] ) {
+ kmin = xlsub[irep];
+ kmax = xlsub[irep1] - 1;
+ for (krow = kmin; krow <= kmax; krow++)
+ if ( lsub[krow] == pivrow ) {
+ do_prune = TRUE;
+ break;
+ }
+ }
+
+ if ( do_prune ) {
+
+ /* Do a quicksort-type partition
+ * movnum=TRUE means that the num values have to be exchanged.
+ */
+ movnum = FALSE;
+ if ( irep == xsup[supno[irep]] ) /* Snode of size 1 */
+ movnum = TRUE;
+
+ while ( kmin <= kmax ) {
+
+ if ( perm_r[lsub[kmax]] == EMPTY )
+ kmax--;
+ else if ( perm_r[lsub[kmin]] != EMPTY )
+ kmin++;
+ else { /* kmin below pivrow, and kmax above pivrow:
+ * interchange the two subscripts
+ */
+ ktemp = lsub[kmin];
+ lsub[kmin] = lsub[kmax];
+ lsub[kmax] = ktemp;
+
+ /* If the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript
+ * interchange performed, similar interchange must be
+ * done on the numerical values.
+ */
+ if ( movnum ) {
+ minloc = xlusup[irep] + (kmin - xlsub[irep]);
+ maxloc = xlusup[irep] + (kmax - xlsub[irep]);
+ utemp = lusup[minloc];
+ lusup[minloc] = lusup[maxloc];
+ lusup[maxloc] = utemp;
+ }
+
+ kmin++;
+ kmax--;
+
+ }
+
+ } /* while */
+
+ xprune[irep] = kmin; /* Pruning */
+
+#ifdef CHK_PRUNE
+ printf(" After dpruneL(),using col %d: xprune[%d] = %d\n",
+ jcol, irep, kmin);
+#endif
+ } /* if do_prune */
+
+ } /* if */
+
+ } /* for each U-segment... */
+}
diff --git a/SRC/dreadhb.c b/SRC/dreadhb.c
new file mode 100644
index 0000000..44d6ced
--- /dev/null
+++ b/SRC/dreadhb.c
@@ -0,0 +1,256 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "dsp_defs.h"
+
+
+/* Eat up the rest of the current line */
+int dDumpLine(FILE *fp)
+{
+ register int c;
+ while ((c = fgetc(fp)) != '\n') ;
+ return 0;
+}
+
+int dParseIntFormat(char *buf, int *num, int *size)
+{
+ char *tmp;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ sscanf(tmp, "%d", num);
+ while (*tmp != 'I' && *tmp != 'i') ++tmp;
+ ++tmp;
+ sscanf(tmp, "%d", size);
+ return 0;
+}
+
+int dParseFloatFormat(char *buf, int *num, int *size)
+{
+ char *tmp, *period;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ while (*tmp != 'E' && *tmp != 'e' && *tmp != 'D' && *tmp != 'd'
+ && *tmp != 'F' && *tmp != 'f') {
+ /* May find kP before nE/nD/nF, like (1P6F13.6). In this case the
+ num picked up refers to P, which should be skipped. */
+ if (*tmp=='p' || *tmp=='P') {
+ ++tmp;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ } else {
+ ++tmp;
+ }
+ }
+ ++tmp;
+ period = tmp;
+ while (*period != '.' && *period != ')') ++period ;
+ *period = '\0';
+ *size = atoi(tmp); /*sscanf(tmp, "%2d", size);*/
+
+ return 0;
+}
+
+int dReadVector(FILE *fp, int n, int *where, int perline, int persize)
+{
+ register int i, j, item;
+ char tmp, buf[100];
+
+ i = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ item = atoi(&buf[j*persize]);
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ where[i++] = item - 1;
+ }
+ }
+
+ return 0;
+}
+
+int dReadValues(FILE *fp, int n, double *destination, int perline, int persize)
+{
+ register int i, j, k, s;
+ char tmp, buf[100];
+
+ i = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ s = j*persize;
+ for (k = 0; k < persize; ++k) /* No D_ format in C */
+ if ( buf[s+k] == 'D' || buf[s+k] == 'd' ) buf[s+k] = 'E';
+ destination[i++] = atof(&buf[s]);
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ }
+ }
+
+ return 0;
+}
+
+
+
+void
+dreadhb(int *nrow, int *ncol, int *nonz,
+ double **nzval, int **rowind, int **colptr)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Read a DOUBLE PRECISION matrix stored in Harwell-Boeing format
+ * as described below.
+ *
+ * Line 1 (A72,A8)
+ * Col. 1 - 72 Title (TITLE)
+ * Col. 73 - 80 Key (KEY)
+ *
+ * Line 2 (5I14)
+ * Col. 1 - 14 Total number of lines excluding header (TOTCRD)
+ * Col. 15 - 28 Number of lines for pointers (PTRCRD)
+ * Col. 29 - 42 Number of lines for row (or variable) indices (INDCRD)
+ * Col. 43 - 56 Number of lines for numerical values (VALCRD)
+ * Col. 57 - 70 Number of lines for right-hand sides (RHSCRD)
+ * (including starting guesses and solution vectors
+ * if present)
+ * (zero indicates no right-hand side data is present)
+ *
+ * Line 3 (A3, 11X, 4I14)
+ * Col. 1 - 3 Matrix type (see below) (MXTYPE)
+ * Col. 15 - 28 Number of rows (or variables) (NROW)
+ * Col. 29 - 42 Number of columns (or elements) (NCOL)
+ * Col. 43 - 56 Number of row (or variable) indices (NNZERO)
+ * (equal to number of entries for assembled matrices)
+ * Col. 57 - 70 Number of elemental matrix entries (NELTVL)
+ * (zero in the case of assembled matrices)
+ * Line 4 (2A16, 2A20)
+ * Col. 1 - 16 Format for pointers (PTRFMT)
+ * Col. 17 - 32 Format for row (or variable) indices (INDFMT)
+ * Col. 33 - 52 Format for numerical values of coefficient matrix (VALFMT)
+ * Col. 53 - 72 Format for numerical values of right-hand sides (RHSFMT)
+ *
+ * Line 5 (A3, 11X, 2I14) Only present if there are right-hand sides present
+ * Col. 1 Right-hand side type:
+ * F for full storage or M for same format as matrix
+ * Col. 2 G if a starting vector(s) (Guess) is supplied. (RHSTYP)
+ * Col. 3 X if an exact solution vector(s) is supplied.
+ * Col. 15 - 28 Number of right-hand sides (NRHS)
+ * Col. 29 - 42 Number of row indices (NRHSIX)
+ * (ignored in case of unassembled matrices)
+ *
+ * The three character type field on line 3 describes the matrix type.
+ * The following table lists the permitted values for each of the three
+ * characters. As an example of the type field, RSA denotes that the matrix
+ * is real, symmetric, and assembled.
+ *
+ * First Character:
+ * R Real matrix
+ * C Complex matrix
+ * P Pattern only (no numerical values supplied)
+ *
+ * Second Character:
+ * S Symmetric
+ * U Unsymmetric
+ * H Hermitian
+ * Z Skew symmetric
+ * R Rectangular
+ *
+ * Third Character:
+ * A Assembled
+ * E Elemental matrices (unassembled)
+ *
+ */
+
+ register int i, numer_lines = 0, rhscrd = 0;
+ int tmp, colnum, colsize, rownum, rowsize, valnum, valsize;
+ char buf[100], type[4], key[10];
+ FILE *fp;
+
+ fp = stdin;
+
+ /* Line 1 */
+ fgets(buf, 100, fp);
+ fputs(buf, stdout);
+#if 0
+ fscanf(fp, "%72c", buf); buf[72] = 0;
+ printf("Title: %s", buf);
+ fscanf(fp, "%8c", key); key[8] = 0;
+ printf("Key: %s\n", key);
+ dDumpLine(fp);
+#endif
+
+ /* Line 2 */
+ for (i=0; i<5; i++) {
+ fscanf(fp, "%14c", buf); buf[14] = 0;
+ sscanf(buf, "%d", &tmp);
+ if (i == 3) numer_lines = tmp;
+ if (i == 4 && tmp) rhscrd = tmp;
+ }
+ dDumpLine(fp);
+
+ /* Line 3 */
+ fscanf(fp, "%3c", type);
+ fscanf(fp, "%11c", buf); /* pad */
+ type[3] = 0;
+#ifdef DEBUG
+ printf("Matrix type %s\n", type);
+#endif
+
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nrow);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", ncol);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nonz);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", &tmp);
+
+ if (tmp != 0)
+ printf("This is not an assembled matrix!\n");
+ if (*nrow != *ncol)
+ printf("Matrix is not square.\n");
+ dDumpLine(fp);
+
+ /* Allocate storage for the three arrays ( nzval, rowind, colptr ) */
+ dallocateA(*ncol, *nonz, nzval, rowind, colptr);
+
+ /* Line 4: format statement */
+ fscanf(fp, "%16c", buf);
+ dParseIntFormat(buf, &colnum, &colsize);
+ fscanf(fp, "%16c", buf);
+ dParseIntFormat(buf, &rownum, &rowsize);
+ fscanf(fp, "%20c", buf);
+ dParseFloatFormat(buf, &valnum, &valsize);
+ fscanf(fp, "%20c", buf);
+ dDumpLine(fp);
+
+ /* Line 5: right-hand side */
+ if ( rhscrd ) dDumpLine(fp); /* skip RHSFMT */
+
+#ifdef DEBUG
+ printf("%d rows, %d nonzeros\n", *nrow, *nonz);
+ printf("colnum %d, colsize %d\n", colnum, colsize);
+ printf("rownum %d, rowsize %d\n", rownum, rowsize);
+ printf("valnum %d, valsize %d\n", valnum, valsize);
+#endif
+
+ dReadVector(fp, *ncol+1, *colptr, colnum, colsize);
+ dReadVector(fp, *nonz, *rowind, rownum, rowsize);
+ if ( numer_lines ) {
+ dReadValues(fp, *nonz, *nzval, valnum, valsize);
+ }
+
+ fclose(fp);
+
+}
+
diff --git a/SRC/dsnode_bmod.c b/SRC/dsnode_bmod.c
new file mode 100644
index 0000000..3e259ac
--- /dev/null
+++ b/SRC/dsnode_bmod.c
@@ -0,0 +1,116 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+
+/*
+ * Performs numeric block updates within the relaxed snode.
+ */
+int
+dsnode_bmod (
+ const int jcol, /* in */
+ const int jsupno, /* in */
+ const int fsupc, /* in */
+ double *dense, /* in */
+ double *tempv, /* working array */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ double alpha = -1.0, beta = 1.0;
+#endif
+
+ int luptr, nsupc, nsupr, nrow;
+ int isub, irow, i, iptr;
+ register int ufirst, nextlu;
+ int *lsub, *xlsub;
+ double *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ nextlu = xlusup[jcol];
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = 0;
+ ++nextlu;
+ }
+
+ xlusup[jcol + 1] = nextlu; /* Initialize xlusup for next column */
+
+ if ( fsupc < jcol ) {
+
+ luptr = xlusup[fsupc];
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nsupc = jcol - fsupc; /* Excluding jcol */
+ ufirst = xlusup[jcol]; /* Points to the beginning of column
+ jcol in supernode L\U(jsupno). */
+ nrow = nsupr - nsupc;
+
+ ops[TRSV] += nsupc * (nsupc - 1);
+ ops[GEMV] += 2 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ dtrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ dgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ dlsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+ dmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], &tempv[0] );
+
+ /* Scatter tempv[*] into lusup[*] */
+ iptr = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ lusup[iptr++] -= tempv[i];
+ tempv[i] = 0.0;
+ }
+#endif
+
+ }
+
+ return 0;
+}
diff --git a/SRC/dsnode_dfs.c b/SRC/dsnode_dfs.c
new file mode 100644
index 0000000..aab16d7
--- /dev/null
+++ b/SRC/dsnode_dfs.c
@@ -0,0 +1,106 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+#include "util.h"
+
+int
+dsnode_dfs (
+ const int jcol, /* in - start of the supernode */
+ const int kcol, /* in - end of the supernode */
+ const int *asub, /* in */
+ const int *xa_begin, /* in */
+ const int *xa_end, /* in */
+ int *xprune, /* out */
+ int *marker, /* modified */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/* Purpose
+ * =======
+ * dsnode_dfs() - Determine the union of the row structures of those
+ * columns within the relaxed snode.
+ * Note: The relaxed snodes are leaves of the supernodal etree, therefore,
+ * the portion outside the rectangular supernode must be zero.
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * >0 number of bytes allocated when run out of memory.
+ *
+ */
+ register int i, k, ifrom, ito, nextl, new_next;
+ int nsuper, krow, kmark, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ int nzlmax;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ nsuper = ++supno[jcol]; /* Next available supernode number */
+ nextl = xlsub[jcol];
+
+ for (i = jcol; i <= kcol; i++) {
+ /* For each nonzero in A[*,i] */
+ for (k = xa_begin[i]; k < xa_end[i]; k++) {
+ krow = asub[k];
+ kmark = marker[krow];
+ if ( kmark != kcol ) { /* First time visit krow */
+ marker[krow] = kcol;
+ lsub[nextl++] = krow;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = dLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ }
+ }
+ supno[i] = nsuper;
+ }
+
+ /* Supernode > 1, then make a copy of the subscripts for pruning */
+ if ( jcol < kcol ) {
+ new_next = nextl + (nextl - xlsub[jcol]);
+ while ( new_next > nzlmax ) {
+ if ( mem_error = dLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ ito = nextl;
+ for (ifrom = xlsub[jcol]; ifrom < nextl; )
+ lsub[ito++] = lsub[ifrom++];
+ for (i = jcol+1; i <= kcol; i++) xlsub[i] = nextl;
+ nextl = ito;
+ }
+
+ xsup[nsuper+1] = kcol + 1;
+ supno[kcol+1] = nsuper;
+ xprune[kcol] = nextl;
+ xlsub[kcol+1] = nextl;
+
+ return 0;
+}
+
diff --git a/SRC/dsp_blas2.c b/SRC/dsp_blas2.c
new file mode 100644
index 0000000..52162db
--- /dev/null
+++ b/SRC/dsp_blas2.c
@@ -0,0 +1,470 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: dsp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "dsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void dusolve(int, int, double*, double*);
+void dlsolve(int, int, double*, double*);
+void dmatvec(int, int, int, double*, double*, double*);
+
+
+int
+sp_dtrsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, double *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_dtrsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A'*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_D, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_D, Mtype = TRU.
+ *
+ * x - (input/output) double*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *Lval, *Uval;
+ int incx = 1, incy = 1;
+ double alpha = 1.0, beta = 1.0;
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ double *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") &&
+ !lsame_(trans, "C")) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_dtrsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = doubleCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_dtrsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1);
+ solve_ops += 2 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ x[irow] -= x[fsupc] * Lval[luptr];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ SGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ dtrsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ dgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ dlsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ dmatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ x[irow] -= work[i]; /* Scatter */
+ work[i] = 0.0;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ x[irow] -= x[fsupc] * Uval[i];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ dtrsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ dusolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ x[irow] -= x[jcol] * Uval[i];
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 2 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ x[jcol] -= x[irow] * Lval[i];
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ dtrsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ x[jcol] -= x[irow] * Uval[i];
+ }
+ }
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ dtrsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+
+int
+sp_dgemv(char *trans, double alpha, SuperMatrix *A, double *x,
+ int incx, double beta, double *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_dgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) double
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_D; Mtype = GE.
+ In the future, more general A can be handled.
+
+ X - (input) double*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) double
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) double*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ double *Aval;
+ int info;
+ double temp;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_dgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 || (alpha == 0. && beta == 1.))
+ return 0;
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if (beta != 1.) {
+ if (incy == 1) {
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) y[i] = 0.;
+ else
+ for (i = 0; i < leny; ++i) y[i] = beta * y[i];
+ } else {
+ iy = ky;
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) {
+ y[iy] = 0.;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ y[iy] = beta * y[iy];
+ iy += incy;
+ }
+ }
+ }
+
+ if (alpha == 0.) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if (x[jx] != 0.) {
+ temp = alpha * x[jx];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ y[irow] += temp * Aval[i];
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ temp += Aval[i] * x[irow];
+ }
+ y[jy] += alpha * temp;
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_dgemv */
+
+
+
diff --git a/SRC/dsp_blas2.c.bak b/SRC/dsp_blas2.c.bak
new file mode 100644
index 0000000..5133ec6
--- /dev/null
+++ b/SRC/dsp_blas2.c.bak
@@ -0,0 +1,469 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: dsp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "dsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void dusolve(int, int, double*, double*);
+void dlsolve(int, int, double*, double*);
+void dmatvec(int, int, int, double*, double*, double*);
+
+
+int
+sp_dtrsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, double *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_dtrsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A'*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_D, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_D, Mtype = TRU.
+ *
+ * x - (input/output) double*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *Lval, *Uval;
+ int incx = 1, incy = 1;
+ double alpha = 1.0, beta = 1.0;
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ double *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") ) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_dtrsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = doubleCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_dtrsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1);
+ solve_ops += 2 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ x[irow] -= x[fsupc] * Lval[luptr];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ SGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ dtrsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ dgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ dlsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ dmatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ x[irow] -= work[i]; /* Scatter */
+ work[i] = 0.0;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ x[irow] -= x[fsupc] * Uval[i];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ dtrsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ dusolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ x[irow] -= x[jcol] * Uval[i];
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 2 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ x[jcol] -= x[irow] * Lval[i];
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ dtrsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ x[jcol] -= x[irow] * Uval[i];
+ }
+ }
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ dtrsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+
+int
+sp_dgemv(char *trans, double alpha, SuperMatrix *A, double *x,
+ int incx, double beta, double *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_dgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) double
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_D; Mtype = GE.
+ In the future, more general A can be handled.
+
+ X - (input) double*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) double
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) double*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ double *Aval;
+ int info;
+ double temp;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_dgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 || (alpha == 0. && beta == 1.))
+ return 0;
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if (beta != 1.) {
+ if (incy == 1) {
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) y[i] = 0.;
+ else
+ for (i = 0; i < leny; ++i) y[i] = beta * y[i];
+ } else {
+ iy = ky;
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) {
+ y[iy] = 0.;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ y[iy] = beta * y[iy];
+ iy += incy;
+ }
+ }
+ }
+
+ if (alpha == 0.) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if (x[jx] != 0.) {
+ temp = alpha * x[jx];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ y[irow] += temp * Aval[i];
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ temp += Aval[i] * x[irow];
+ }
+ y[jy] += alpha * temp;
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_dgemv */
+
+
+
diff --git a/SRC/dsp_blas3.c b/SRC/dsp_blas3.c
new file mode 100644
index 0000000..7057b79
--- /dev/null
+++ b/SRC/dsp_blas3.c
@@ -0,0 +1,121 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: sp_blas3.c
+ * Purpose: Sparse BLAS3, using some dense BLAS3 operations.
+ */
+
+#include "dsp_defs.h"
+#include "util.h"
+
+int
+sp_dgemm(char *transa, char *transb, int m, int n, int k,
+ double alpha, SuperMatrix *A, double *b, int ldb,
+ double beta, double *c, int ldc)
+{
+/* Purpose
+ =======
+
+ sp_d performs one of the matrix-matrix operations
+
+ C := alpha*op( A )*op( B ) + beta*C,
+
+ where op( X ) is one of
+
+ op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ),
+
+ alpha and beta are scalars, and A, B and C are matrices, with op( A )
+ an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+
+
+ Parameters
+ ==========
+
+ TRANSA - (input) char*
+ On entry, TRANSA specifies the form of op( A ) to be used in
+ the matrix multiplication as follows:
+ TRANSA = 'N' or 'n', op( A ) = A.
+ TRANSA = 'T' or 't', op( A ) = A'.
+ TRANSA = 'C' or 'c', op( A ) = conjg( A' ).
+ Unchanged on exit.
+
+ TRANSB - (input) char*
+ On entry, TRANSB specifies the form of op( B ) to be used in
+ the matrix multiplication as follows:
+ TRANSB = 'N' or 'n', op( B ) = B.
+ TRANSB = 'T' or 't', op( B ) = B'.
+ TRANSB = 'C' or 'c', op( B ) = conjg( B' ).
+ Unchanged on exit.
+
+ M - (input) int
+ On entry, M specifies the number of rows of the matrix
+ op( A ) and of the matrix C. M must be at least zero.
+ Unchanged on exit.
+
+ N - (input) int
+ On entry, N specifies the number of columns of the matrix
+ op( B ) and the number of columns of the matrix C. N must be
+ at least zero.
+ Unchanged on exit.
+
+ K - (input) int
+ On entry, K specifies the number of columns of the matrix
+ op( A ) and the number of rows of the matrix op( B ). K must
+ be at least zero.
+ Unchanged on exit.
+
+ ALPHA - (input) double
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_D; Mtype = GE.
+ In the future, more general A can be handled.
+
+ B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
+ n when TRANSB = 'N' or 'n', and is k otherwise.
+ Before entry with TRANSB = 'N' or 'n', the leading k by n
+ part of the array B must contain the matrix B, otherwise
+ the leading n by k part of the array B must contain the
+ matrix B.
+ Unchanged on exit.
+
+ LDB - (input) int
+ On entry, LDB specifies the first dimension of B as declared
+ in the calling (sub) program. LDB must be at least max( 1, n ).
+ Unchanged on exit.
+
+ BETA - (input) double
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then C need not be set on input.
+
+ C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+ Before entry, the leading m by n part of the array C must
+ contain the matrix C, except when beta is zero, in which
+ case C need not be set on entry.
+ On exit, the array C is overwritten by the m by n matrix
+ ( alpha*op( A )*B + beta*C ).
+
+ LDC - (input) int
+ On entry, LDC specifies the first dimension of C as declared
+ in the calling (sub)program. LDC must be at least max(1,m).
+ Unchanged on exit.
+
+ ==== Sparse Level 3 Blas routine.
+*/
+ int incx = 1, incy = 1;
+ int j;
+
+ for (j = 0; j < n; ++j) {
+ sp_dgemv(transa, alpha, A, &b[ldb*j], incx, beta, &c[ldc*j], incy);
+ }
+ return 0;
+}
diff --git a/SRC/dsp_defs.h b/SRC/dsp_defs.h
new file mode 100644
index 0000000..e02bd0f
--- /dev/null
+++ b/SRC/dsp_defs.h
@@ -0,0 +1,234 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#ifndef __SUPERLU_dSP_DEFS /* allow multiple inclusions */
+#define __SUPERLU_dSP_DEFS
+
+/*
+ * File name: dsp_defs.h
+ * Purpose: Sparse matrix types and function prototypes
+ * History:
+ */
+
+#ifdef _CRAY
+#include <fortran.h>
+#include <string.h>
+#endif
+
+/* Define my integer type int_t */
+typedef int int_t; /* default */
+
+#include "Cnames.h"
+#include "supermatrix.h"
+#include "util.h"
+
+
+/*
+ * Global data structures used in LU factorization -
+ *
+ * nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].
+ * (xsup,supno): supno[i] is the supernode no to which i belongs;
+ * xsup(s) points to the beginning of the s-th supernode.
+ * e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12)
+ * xsup 0 1 2 4 7 12
+ * Note: dfs will be performed on supernode rep. relative to the new
+ * row pivoting ordering
+ *
+ * (xlsub,lsub): lsub[*] contains the compressed subscript of
+ * rectangular supernodes; xlsub[j] points to the starting
+ * location of the j-th column in lsub[*]. Note that xlsub
+ * is indexed by column.
+ * Storage: original row subscripts
+ *
+ * During the course of sparse LU factorization, we also use
+ * (xlsub,lsub) for the purpose of symmetric pruning. For each
+ * supernode {s,s+1,...,t=s+r} with first column s and last
+ * column t, the subscript set
+ * lsub[j], j=xlsub[s], .., xlsub[s+1]-1
+ * is the structure of column s (i.e. structure of this supernode).
+ * It is used for the storage of numerical values.
+ * Furthermore,
+ * lsub[j], j=xlsub[t], .., xlsub[t+1]-1
+ * is the structure of the last column t of this supernode.
+ * It is for the purpose of symmetric pruning. Therefore, the
+ * structural subscripts can be rearranged without making physical
+ * interchanges among the numerical values.
+ *
+ * However, if the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript interchange
+ * performed, similar interchange must be done on the numerical
+ * values.
+ *
+ * The last column structures (for pruning) will be removed
+ * after the numercial LU factorization phase.
+ *
+ * (xlusup,lusup): lusup[*] contains the numerical values of the
+ * rectangular supernodes; xlusup[j] points to the starting
+ * location of the j-th column in storage vector lusup[*]
+ * Note: xlusup is indexed by column.
+ * Each rectangular supernode is stored by column-major
+ * scheme, consistent with Fortran 2-dim array storage.
+ *
+ * (xusub,ucol,usub): ucol[*] stores the numerical values of
+ * U-columns outside the rectangular supernodes. The row
+ * subscript of nonzero ucol[k] is stored in usub[k].
+ * xusub[i] points to the starting location of column i in ucol.
+ * Storage: new row subscripts; that is subscripts of PA.
+ */
+typedef struct {
+ int *xsup; /* supernode and column mapping */
+ int *supno;
+ int *lsub; /* compressed L subscripts */
+ int *xlsub;
+ double *lusup; /* L supernodes */
+ int *xlusup;
+ double *ucol; /* U columns */
+ int *usub;
+ int *xusub;
+ int nzlmax; /* current max size of lsub */
+ int nzumax; /* " " " ucol */
+ int nzlumax; /* " " " lusup */
+ int n; /* number of columns in the matrix */
+ LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
+} GlobalLU_t;
+
+typedef struct {
+ float for_lu;
+ float total_needed;
+ int expansions;
+} mem_usage_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Driver routines */
+extern void
+dgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
+extern void
+dgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
+ char *, double *, double *, SuperMatrix *, SuperMatrix *,
+ void *, int, SuperMatrix *, SuperMatrix *,
+ double *, double *, double *, double *,
+ mem_usage_t *, SuperLUStat_t *, int *);
+
+/* Supernodal LU factor related */
+extern void
+dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+dCreate_CompRow_Matrix(SuperMatrix *, int, int, int, double *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+dCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
+extern void
+dCreate_Dense_Matrix(SuperMatrix *, int, int, double *, int,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+dCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, double *,
+ int *, int *, int *, int *, int *,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+dCopy_Dense_Matrix(int, int, double *, int, double *, int);
+
+extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
+extern void fixupL (const int, const int *, GlobalLU_t *);
+
+extern void dallocateA (int, int, double **, int **, int **);
+extern void dgstrf (superlu_options_t*, SuperMatrix*, double,
+ int, int, int*, void *, int, int *, int *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
+extern int dsnode_dfs (const int, const int, const int *, const int *,
+ const int *, int *, int *, GlobalLU_t *);
+extern int dsnode_bmod (const int, const int, const int, double *,
+ double *, GlobalLU_t *, SuperLUStat_t*);
+extern void dpanel_dfs (const int, const int, const int, SuperMatrix *,
+ int *, int *, double *, int *, int *, int *,
+ int *, int *, int *, int *, GlobalLU_t *);
+extern void dpanel_bmod (const int, const int, const int, const int,
+ double *, double *, int *, int *,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int dcolumn_dfs (const int, const int, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *, GlobalLU_t *);
+extern int dcolumn_bmod (const int, const int, double *,
+ double *, int *, int *, int,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int dcopy_to_ucol (int, int, int *, int *, int *,
+ double *, GlobalLU_t *);
+extern int dpivotL (const int, const double, int *, int *,
+ int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
+extern void dpruneL (const int, const int *, const int, const int,
+ const int *, const int *, int *, GlobalLU_t *);
+extern void dreadmt (int *, int *, int *, double **, int **, int **);
+extern void dGenXtrue (int, int, double *, int);
+extern void dFillRHS (trans_t, int, double *, int, SuperMatrix *,
+ SuperMatrix *);
+extern void dgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
+ SuperMatrix *, SuperLUStat_t*, int *);
+
+
+/* Driver related */
+
+extern void dgsequ (SuperMatrix *, double *, double *, double *,
+ double *, double *, int *);
+extern void dlaqgs (SuperMatrix *, double *, double *, double,
+ double, double, char *);
+extern void dgscon (char *, SuperMatrix *, SuperMatrix *,
+ double, double *, SuperLUStat_t*, int *);
+extern double dPivotGrowth(int, SuperMatrix *, int *,
+ SuperMatrix *, SuperMatrix *);
+extern void dgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, int *, char *, double *,
+ double *, SuperMatrix *, SuperMatrix *,
+ double *, double *, SuperLUStat_t*, int *);
+
+extern int sp_dtrsv (char *, char *, char *, SuperMatrix *,
+ SuperMatrix *, double *, SuperLUStat_t*, int *);
+extern int sp_dgemv (char *, double, SuperMatrix *, double *,
+ int, double, double *, int);
+
+extern int sp_dgemm (char *, char *, int, int, int, double,
+ SuperMatrix *, double *, int, double,
+ double *, int);
+
+/* Memory-related */
+extern int dLUMemInit (fact_t, void *, int, int, int, int, int,
+ SuperMatrix *, SuperMatrix *,
+ GlobalLU_t *, int **, double **);
+extern void dSetRWork (int, int, double *, double **, double **);
+extern void dLUWorkFree (int *, double *, GlobalLU_t *);
+extern int dLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
+
+extern double *doubleMalloc(int);
+extern double *doubleCalloc(int);
+extern int dmemory_usage(const int, const int, const int, const int);
+extern int dQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
+
+/* Auxiliary routines */
+extern void dreadhb(int *, int *, int *, double **, int **, int **);
+extern void dCompRow_to_CompCol(int, int, int, double*, int*, int*,
+ double **, int **, int **);
+extern void dfill (double *, int, double);
+extern void dinf_norm_error (int, SuperMatrix *, double *);
+extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
+ double, double, double *, double *, char *);
+
+/* Routines for debugging */
+extern void dPrint_CompCol_Matrix(char *, SuperMatrix *);
+extern void dPrint_SuperNode_Matrix(char *, SuperMatrix *);
+extern void dPrint_Dense_Matrix(char *, SuperMatrix *);
+extern void print_lu_col(char *, int, int, int *, GlobalLU_t *);
+extern void check_tempv(int, double *);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* __SUPERLU_dSP_DEFS */
+
diff --git a/SRC/dutil.c b/SRC/dutil.c
new file mode 100644
index 0000000..f4221a8
--- /dev/null
+++ b/SRC/dutil.c
@@ -0,0 +1,478 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include "dsp_defs.h"
+
+void
+dCreate_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ double *nzval, int *rowind, int *colptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NCformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NCformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->rowind = rowind;
+ Astore->colptr = colptr;
+}
+
+void
+dCreate_CompRow_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ double *nzval, int *colind, int *rowptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NRformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NRformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->colind = colind;
+ Astore->rowptr = rowptr;
+}
+
+/* Copy matrix A into matrix B. */
+void
+dCopy_CompCol_Matrix(SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore, *Bstore;
+ int ncol, nnz, i;
+
+ B->Stype = A->Stype;
+ B->Dtype = A->Dtype;
+ B->Mtype = A->Mtype;
+ B->nrow = A->nrow;;
+ B->ncol = ncol = A->ncol;
+ Astore = (NCformat *) A->Store;
+ Bstore = (NCformat *) B->Store;
+ Bstore->nnz = nnz = Astore->nnz;
+ for (i = 0; i < nnz; ++i)
+ ((double *)Bstore->nzval)[i] = ((double *)Astore->nzval)[i];
+ for (i = 0; i < nnz; ++i) Bstore->rowind[i] = Astore->rowind[i];
+ for (i = 0; i <= ncol; ++i) Bstore->colptr[i] = Astore->colptr[i];
+}
+
+
+void
+dCreate_Dense_Matrix(SuperMatrix *X, int m, int n, double *x, int ldx,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ DNformat *Xstore;
+
+ X->Stype = stype;
+ X->Dtype = dtype;
+ X->Mtype = mtype;
+ X->nrow = m;
+ X->ncol = n;
+ X->Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !(X->Store) ) ABORT("SUPERLU_MALLOC fails for X->Store");
+ Xstore = (DNformat *) X->Store;
+ Xstore->lda = ldx;
+ Xstore->nzval = (double *) x;
+}
+
+void
+dCopy_Dense_Matrix(int M, int N, double *X, int ldx,
+ double *Y, int ldy)
+{
+/*
+ *
+ * Purpose
+ * =======
+ *
+ * Copies a two-dimensional matrix X to another matrix Y.
+ */
+ int i, j;
+
+ for (j = 0; j < N; ++j)
+ for (i = 0; i < M; ++i)
+ Y[i + j*ldy] = X[i + j*ldx];
+}
+
+void
+dCreate_SuperNode_Matrix(SuperMatrix *L, int m, int n, int nnz,
+ double *nzval, int *nzval_colptr, int *rowind,
+ int *rowind_colptr, int *col_to_sup, int *sup_to_col,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ SCformat *Lstore;
+
+ L->Stype = stype;
+ L->Dtype = dtype;
+ L->Mtype = mtype;
+ L->nrow = m;
+ L->ncol = n;
+ L->Store = (void *) SUPERLU_MALLOC( sizeof(SCformat) );
+ if ( !(L->Store) ) ABORT("SUPERLU_MALLOC fails for L->Store");
+ Lstore = L->Store;
+ Lstore->nnz = nnz;
+ Lstore->nsuper = col_to_sup[n];
+ Lstore->nzval = nzval;
+ Lstore->nzval_colptr = nzval_colptr;
+ Lstore->rowind = rowind;
+ Lstore->rowind_colptr = rowind_colptr;
+ Lstore->col_to_sup = col_to_sup;
+ Lstore->sup_to_col = sup_to_col;
+
+}
+
+
+/*
+ * Convert a row compressed storage into a column compressed storage.
+ */
+void
+dCompRow_to_CompCol(int m, int n, int nnz,
+ double *a, int *colind, int *rowptr,
+ double **at, int **rowind, int **colptr)
+{
+ register int i, j, col, relpos;
+ int *marker;
+
+ /* Allocate storage for another copy of the matrix. */
+ *at = (double *) doubleMalloc(nnz);
+ *rowind = (int *) intMalloc(nnz);
+ *colptr = (int *) intMalloc(n+1);
+ marker = (int *) intCalloc(n);
+
+ /* Get counts of each column of A, and set up column pointers */
+ for (i = 0; i < m; ++i)
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) ++marker[colind[j]];
+ (*colptr)[0] = 0;
+ for (j = 0; j < n; ++j) {
+ (*colptr)[j+1] = (*colptr)[j] + marker[j];
+ marker[j] = (*colptr)[j];
+ }
+
+ /* Transfer the matrix into the compressed column storage. */
+ for (i = 0; i < m; ++i) {
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) {
+ col = colind[j];
+ relpos = marker[col];
+ (*rowind)[relpos] = i;
+ (*at)[relpos] = a[j];
+ ++marker[col];
+ }
+ }
+
+ SUPERLU_FREE(marker);
+}
+
+
+void
+dPrint_CompCol_Matrix(char *what, SuperMatrix *A)
+{
+ NCformat *Astore;
+ register int i,n;
+ double *dp;
+
+ printf("\nCompCol matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (NCformat *) A->Store;
+ dp = (double *) Astore->nzval;
+ printf("nrow %d, ncol %d, nnz %d\n", A->nrow,A->ncol,Astore->nnz);
+ printf("nzval: ");
+ for (i = 0; i < Astore->colptr[n]; ++i) printf("%f ", dp[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->colptr[n]; ++i) printf("%d ", Astore->rowind[i]);
+ printf("\ncolptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->colptr[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+dPrint_SuperNode_Matrix(char *what, SuperMatrix *A)
+{
+ SCformat *Astore;
+ register int i, j, k, c, d, n, nsup;
+ double *dp;
+ int *col_to_sup, *sup_to_col, *rowind, *rowind_colptr;
+
+ printf("\nSuperNode matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (SCformat *) A->Store;
+ dp = (double *) Astore->nzval;
+ col_to_sup = Astore->col_to_sup;
+ sup_to_col = Astore->sup_to_col;
+ rowind_colptr = Astore->rowind_colptr;
+ rowind = Astore->rowind;
+ printf("nrow %d, ncol %d, nnz %d, nsuper %d\n",
+ A->nrow,A->ncol,Astore->nnz,Astore->nsuper);
+ printf("nzval:\n");
+ for (k = 0; k <= Astore->nsuper; ++k) {
+ c = sup_to_col[k];
+ nsup = sup_to_col[k+1] - c;
+ for (j = c; j < c + nsup; ++j) {
+ d = Astore->nzval_colptr[j];
+ for (i = rowind_colptr[c]; i < rowind_colptr[c+1]; ++i) {
+ printf("%d\t%d\t%e\n", rowind[i], j, dp[d++]);
+ }
+ }
+ }
+#if 0
+ for (i = 0; i < Astore->nzval_colptr[n]; ++i) printf("%f ", dp[i]);
+#endif
+ printf("\nnzval_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->nzval_colptr[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->rowind_colptr[n]; ++i)
+ printf("%d ", Astore->rowind[i]);
+ printf("\nrowind_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->rowind_colptr[i]);
+ printf("\ncol_to_sup: ");
+ for (i = 0; i < n; ++i) printf("%d ", col_to_sup[i]);
+ printf("\nsup_to_col: ");
+ for (i = 0; i <= Astore->nsuper+1; ++i)
+ printf("%d ", sup_to_col[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+dPrint_Dense_Matrix(char *what, SuperMatrix *A)
+{
+ DNformat *Astore;
+ register int i;
+ double *dp;
+
+ printf("\nDense matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ Astore = (DNformat *) A->Store;
+ dp = (double *) Astore->nzval;
+ printf("nrow %d, ncol %d, lda %d\n", A->nrow,A->ncol,Astore->lda);
+ printf("\nnzval: ");
+ for (i = 0; i < A->nrow; ++i) printf("%f ", dp[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+/*
+ * Diagnostic print of column "jcol" in the U/L factor.
+ */
+void
+dprint_lu_col(char *msg, int jcol, int pivrow, int *xprune, GlobalLU_t *Glu)
+{
+ int i, k, fsupc;
+ int *xsup, *supno;
+ int *xlsub, *lsub;
+ double *lusup;
+ int *xlusup;
+ double *ucol;
+ int *usub, *xusub;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+
+ printf("%s", msg);
+ printf("col %d: pivrow %d, supno %d, xprune %d\n",
+ jcol, pivrow, supno[jcol], xprune[jcol]);
+
+ printf("\tU-col:\n");
+ for (i = xusub[jcol]; i < xusub[jcol+1]; i++)
+ printf("\t%d%10.4f\n", usub[i], ucol[i]);
+ printf("\tL-col in rectangular snode:\n");
+ fsupc = xsup[supno[jcol]]; /* first col of the snode */
+ i = xlsub[fsupc];
+ k = xlusup[jcol];
+ while ( i < xlsub[fsupc+1] && k < xlusup[jcol+1] ) {
+ printf("\t%d\t%10.4f\n", lsub[i], lusup[k]);
+ i++; k++;
+ }
+ fflush(stdout);
+}
+
+
+/*
+ * Check whether tempv[] == 0. This should be true before and after
+ * calling any numeric routines, i.e., "panel_bmod" and "column_bmod".
+ */
+void dcheck_tempv(int n, double *tempv)
+{
+ int i;
+
+ for (i = 0; i < n; i++) {
+ if (tempv[i] != 0.0)
+ {
+ fprintf(stderr,"tempv[%d] = %f\n", i,tempv[i]);
+ ABORT("dcheck_tempv");
+ }
+ }
+}
+
+
+void
+dGenXtrue(int n, int nrhs, double *x, int ldx)
+{
+ int i, j;
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < n; ++i) {
+ x[i + j*ldx] = 1.0;/* + (double)(i+1.)/n;*/
+ }
+}
+
+/*
+ * Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's
+ */
+void
+dFillRHS(trans_t trans, int nrhs, double *x, int ldx,
+ SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore;
+ double *Aval;
+ DNformat *Bstore;
+ double *rhs;
+ double one = 1.0;
+ double zero = 0.0;
+ int ldc;
+ char transc[1];
+
+ Astore = A->Store;
+ Aval = (double *) Astore->nzval;
+ Bstore = B->Store;
+ rhs = Bstore->nzval;
+ ldc = Bstore->lda;
+
+ if ( trans == NOTRANS ) *(unsigned char *)transc = 'N';
+ else *(unsigned char *)transc = 'T';
+
+ sp_dgemm(transc, "N", A->nrow, nrhs, A->ncol, one, A,
+ x, ldx, zero, rhs, ldc);
+
+}
+
+/*
+ * Fills a double precision array with a given value.
+ */
+void
+dfill(double *a, int alen, double dval)
+{
+ register int i;
+ for (i = 0; i < alen; i++) a[i] = dval;
+}
+
+
+
+/*
+ * Check the inf-norm of the error vector
+ */
+void dinf_norm_error(int nrhs, SuperMatrix *X, double *xtrue)
+{
+ DNformat *Xstore;
+ double err, xnorm;
+ double *Xmat, *soln_work;
+ int i, j;
+
+ Xstore = X->Store;
+ Xmat = Xstore->nzval;
+
+ for (j = 0; j < nrhs; j++) {
+ soln_work = &Xmat[j*Xstore->lda];
+ err = xnorm = 0.0;
+ for (i = 0; i < X->nrow; i++) {
+ err = SUPERLU_MAX(err, fabs(soln_work[i] - xtrue[i]));
+ xnorm = SUPERLU_MAX(xnorm, fabs(soln_work[i]));
+ }
+ err = err / xnorm;
+ printf("||X - Xtrue||/||X|| = %e\n", err);
+ }
+}
+
+
+
+/* Print performance of the code. */
+void
+dPrintPerf(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage,
+ double rpg, double rcond, double *ferr,
+ double *berr, char *equed, SuperLUStat_t *stat)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *utime;
+ flops_t *ops;
+
+ utime = stat->utime;
+ ops = stat->ops;
+
+ if ( utime[FACT] != 0. )
+ printf("Factor flops = %e\tMflops = %8.2f\n", ops[FACT],
+ ops[FACT]*1e-6/utime[FACT]);
+ printf("Identify relaxed snodes = %8.2f\n", utime[RELAX]);
+ if ( utime[SOLVE] != 0. )
+ printf("Solve flops = %.0f, Mflops = %8.2f\n", ops[SOLVE],
+ ops[SOLVE]*1e-6/utime[SOLVE]);
+
+ Lstore = (SCformat *) L->Store;
+ Ustore = (NCformat *) U->Store;
+ printf("\tNo of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("\tNo of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("\tNo of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz);
+
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage->for_lu/1e6, mem_usage->total_needed/1e6,
+ mem_usage->expansions);
+
+ printf("\tFactor\tMflops\tSolve\tMflops\tEtree\tEquil\tRcond\tRefine\n");
+ printf("PERF:%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f\n",
+ utime[FACT], ops[FACT]*1e-6/utime[FACT],
+ utime[SOLVE], ops[SOLVE]*1e-6/utime[SOLVE],
+ utime[ETREE], utime[EQUIL], utime[RCOND], utime[REFINE]);
+
+ printf("\tRpg\t\tRcond\t\tFerr\t\tBerr\t\tEquil?\n");
+ printf("NUM:\t%e\t%e\t%e\t%e\t%s\n",
+ rpg, rcond, ferr[0], berr[0], equed);
+
+}
+
+
+
+
+print_double_vec(char *what, int n, double *vec)
+{
+ int i;
+ printf("%s: n %d\n", what, n);
+ for (i = 0; i < n; ++i) printf("%d\t%f\n", i, vec[i]);
+ return 0;
+}
+
diff --git a/SRC/dzsum1.c b/SRC/dzsum1.c
new file mode 100644
index 0000000..7c00e5a
--- /dev/null
+++ b/SRC/dzsum1.c
@@ -0,0 +1,83 @@
+#include "dcomplex.h"
+
+double dzsum1_(int *n, doublecomplex *cx, int *incx)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+ Purpose
+ =======
+
+ DZSUM1 takes the sum of the absolute values of a complex
+ vector and returns a double precision result.
+
+ Based on DZASUM from the Level 1 BLAS.
+ The change is to use the 'genuine' absolute value.
+
+ Contributed by Nick Higham for use with ZLACON.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of elements in the vector CX.
+
+ CX (input) COMPLEX*16 array, dimension (N)
+ The vector whose elements will be summed.
+
+ INCX (input) INT
+ The spacing between successive values of CX. INCX > 0.
+
+ =====================================================================
+*/
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+
+ /* Local variables */
+ int i, nincx;
+ double stemp;
+
+
+#define CX(I) cx[(I)-1]
+
+ stemp = 0.;
+ if (*n <= 0) {
+ return stemp;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+ /* CODE FOR INCREMENT NOT EQUAL TO 1 */
+
+ nincx = *n * *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+
+ /* NEXT LINE MODIFIED. */
+
+ stemp += z_abs(&CX(i));
+/* L10: */
+ }
+
+ return stemp;
+
+ /* CODE FOR INCREMENT EQUAL TO 1 */
+
+L20:
+ for (i = 1; i <= *n; ++i) {
+
+ /* NEXT LINE MODIFIED. */
+
+ stemp += z_abs(&CX(i));
+/* L30: */
+ }
+
+ return stemp;
+
+ /* End of DZSUM1 */
+
+} /* dzsum1_ */
+
diff --git a/SRC/get_perm_c.c b/SRC/get_perm_c.c
new file mode 100644
index 0000000..19dbc7b
--- /dev/null
+++ b/SRC/get_perm_c.c
@@ -0,0 +1,452 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include "dsp_defs.h"
+#include "colamd.h"
+
+extern int genmmd_(int *, int *, int *, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *);
+
+void
+get_colamd(
+ const int m, /* number of rows in matrix A. */
+ const int n, /* number of columns in matrix A. */
+ const int nnz,/* number of nonzeros in matrix A. */
+ int *colptr, /* column pointer of size n+1 for matrix A. */
+ int *rowind, /* row indices of size nz for matrix A. */
+ int *perm_c /* out - the column permutation vector. */
+ )
+{
+ int Alen, *A, i, info, *p;
+ double *knobs;
+
+ Alen = colamd_recommended(nnz, m, n);
+
+ if ( !(knobs = (double *) SUPERLU_MALLOC(COLAMD_KNOBS * sizeof(double))) )
+ ABORT("Malloc fails for knobs");
+ colamd_set_defaults(knobs);
+
+ if (!(A = (int *) SUPERLU_MALLOC(Alen * sizeof(int))) )
+ ABORT("Malloc fails for A[]");
+ if (!(p = (int *) SUPERLU_MALLOC((n+1) * sizeof(int))) )
+ ABORT("Malloc fails for p[]");
+ for (i = 0; i <= n; ++i) p[i] = colptr[i];
+ for (i = 0; i < nnz; ++i) A[i] = rowind[i];
+ info = colamd(m, n, Alen, A, p, knobs);
+ if ( info == FALSE ) ABORT("COLAMD failed");
+
+ for (i = 0; i < n; ++i) perm_c[p[i]] = i;
+
+ SUPERLU_FREE(knobs);
+ SUPERLU_FREE(A);
+ SUPERLU_FREE(p);
+}
+
+void
+getata(
+ const int m, /* number of rows in matrix A. */
+ const int n, /* number of columns in matrix A. */
+ const int nz, /* number of nonzeros in matrix A */
+ int *colptr, /* column pointer of size n+1 for matrix A. */
+ int *rowind, /* row indices of size nz for matrix A. */
+ int *atanz, /* out - on exit, returns the actual number of
+ nonzeros in matrix A'*A. */
+ int **ata_colptr, /* out - size n+1 */
+ int **ata_rowind /* out - size *atanz */
+ )
+/*
+ * Purpose
+ * =======
+ *
+ * Form the structure of A'*A. A is an m-by-n matrix in column oriented
+ * format represented by (colptr, rowind). The output A'*A is in column
+ * oriented format (symmetrically, also row oriented), represented by
+ * (ata_colptr, ata_rowind).
+ *
+ * This routine is modified from GETATA routine by Tim Davis.
+ * The complexity of this algorithm is: SUM_{i=1,m} r(i)^2,
+ * i.e., the sum of the square of the row counts.
+ *
+ * Questions
+ * =========
+ * o Do I need to withhold the *dense* rows?
+ * o How do I know the number of nonzeros in A'*A?
+ *
+ */
+{
+ register int i, j, k, col, num_nz, ti, trow;
+ int *marker, *b_colptr, *b_rowind;
+ int *t_colptr, *t_rowind; /* a column oriented form of T = A' */
+
+ if ( !(marker = (int*) SUPERLU_MALLOC((SUPERLU_MAX(m,n)+1)*sizeof(int))) )
+ ABORT("SUPERLU_MALLOC fails for marker[]");
+ if ( !(t_colptr = (int*) SUPERLU_MALLOC((m+1) * sizeof(int))) )
+ ABORT("SUPERLU_MALLOC t_colptr[]");
+ if ( !(t_rowind = (int*) SUPERLU_MALLOC(nz * sizeof(int))) )
+ ABORT("SUPERLU_MALLOC fails for t_rowind[]");
+
+
+ /* Get counts of each column of T, and set up column pointers */
+ for (i = 0; i < m; ++i) marker[i] = 0;
+ for (j = 0; j < n; ++j) {
+ for (i = colptr[j]; i < colptr[j+1]; ++i)
+ ++marker[rowind[i]];
+ }
+ t_colptr[0] = 0;
+ for (i = 0; i < m; ++i) {
+ t_colptr[i+1] = t_colptr[i] + marker[i];
+ marker[i] = t_colptr[i];
+ }
+
+ /* Transpose the matrix from A to T */
+ for (j = 0; j < n; ++j)
+ for (i = colptr[j]; i < colptr[j+1]; ++i) {
+ col = rowind[i];
+ t_rowind[marker[col]] = j;
+ ++marker[col];
+ }
+
+
+ /* ----------------------------------------------------------------
+ compute B = T * A, where column j of B is:
+
+ Struct (B_*j) = UNION ( Struct (T_*k) )
+ A_kj != 0
+
+ do not include the diagonal entry
+
+ ( Partition A as: A = (A_*1, ..., A_*n)
+ Then B = T * A = (T * A_*1, ..., T * A_*n), where
+ T * A_*j = (T_*1, ..., T_*m) * A_*j. )
+ ---------------------------------------------------------------- */
+
+ /* Zero the diagonal flag */
+ for (i = 0; i < n; ++i) marker[i] = -1;
+
+ /* First pass determines number of nonzeros in B */
+ num_nz = 0;
+ for (j = 0; j < n; ++j) {
+ /* Flag the diagonal so it's not included in the B matrix */
+ marker[j] = j;
+
+ for (i = colptr[j]; i < colptr[j+1]; ++i) {
+ /* A_kj is nonzero, add pattern of column T_*k to B_*j */
+ k = rowind[i];
+ for (ti = t_colptr[k]; ti < t_colptr[k+1]; ++ti) {
+ trow = t_rowind[ti];
+ if ( marker[trow] != j ) {
+ marker[trow] = j;
+ num_nz++;
+ }
+ }
+ }
+ }
+ *atanz = num_nz;
+
+ /* Allocate storage for A'*A */
+ if ( !(*ata_colptr = (int*) SUPERLU_MALLOC( (n+1) * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails for ata_colptr[]");
+ if ( *atanz ) {
+ if ( !(*ata_rowind = (int*) SUPERLU_MALLOC( *atanz * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails for ata_rowind[]");
+ }
+ b_colptr = *ata_colptr; /* aliasing */
+ b_rowind = *ata_rowind;
+
+ /* Zero the diagonal flag */
+ for (i = 0; i < n; ++i) marker[i] = -1;
+
+ /* Compute each column of B, one at a time */
+ num_nz = 0;
+ for (j = 0; j < n; ++j) {
+ b_colptr[j] = num_nz;
+
+ /* Flag the diagonal so it's not included in the B matrix */
+ marker[j] = j;
+
+ for (i = colptr[j]; i < colptr[j+1]; ++i) {
+ /* A_kj is nonzero, add pattern of column T_*k to B_*j */
+ k = rowind[i];
+ for (ti = t_colptr[k]; ti < t_colptr[k+1]; ++ti) {
+ trow = t_rowind[ti];
+ if ( marker[trow] != j ) {
+ marker[trow] = j;
+ b_rowind[num_nz++] = trow;
+ }
+ }
+ }
+ }
+ b_colptr[n] = num_nz;
+
+ SUPERLU_FREE(marker);
+ SUPERLU_FREE(t_colptr);
+ SUPERLU_FREE(t_rowind);
+}
+
+
+void
+at_plus_a(
+ const int n, /* number of columns in matrix A. */
+ const int nz, /* number of nonzeros in matrix A */
+ int *colptr, /* column pointer of size n+1 for matrix A. */
+ int *rowind, /* row indices of size nz for matrix A. */
+ int *bnz, /* out - on exit, returns the actual number of
+ nonzeros in matrix A'*A. */
+ int **b_colptr, /* out - size n+1 */
+ int **b_rowind /* out - size *bnz */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Form the structure of A'+A. A is an n-by-n matrix in column oriented
+ * format represented by (colptr, rowind). The output A'+A is in column
+ * oriented format (symmetrically, also row oriented), represented by
+ * (b_colptr, b_rowind).
+ *
+ */
+ register int i, j, k, col, num_nz;
+ int *t_colptr, *t_rowind; /* a column oriented form of T = A' */
+ int *marker;
+
+ if ( !(marker = (int*) SUPERLU_MALLOC( n * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails for marker[]");
+ if ( !(t_colptr = (int*) SUPERLU_MALLOC( (n+1) * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails for t_colptr[]");
+ if ( !(t_rowind = (int*) SUPERLU_MALLOC( nz * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails t_rowind[]");
+
+
+ /* Get counts of each column of T, and set up column pointers */
+ for (i = 0; i < n; ++i) marker[i] = 0;
+ for (j = 0; j < n; ++j) {
+ for (i = colptr[j]; i < colptr[j+1]; ++i)
+ ++marker[rowind[i]];
+ }
+ t_colptr[0] = 0;
+ for (i = 0; i < n; ++i) {
+ t_colptr[i+1] = t_colptr[i] + marker[i];
+ marker[i] = t_colptr[i];
+ }
+
+ /* Transpose the matrix from A to T */
+ for (j = 0; j < n; ++j)
+ for (i = colptr[j]; i < colptr[j+1]; ++i) {
+ col = rowind[i];
+ t_rowind[marker[col]] = j;
+ ++marker[col];
+ }
+
+
+ /* ----------------------------------------------------------------
+ compute B = A + T, where column j of B is:
+
+ Struct (B_*j) = Struct (A_*k) UNION Struct (T_*k)
+
+ do not include the diagonal entry
+ ---------------------------------------------------------------- */
+
+ /* Zero the diagonal flag */
+ for (i = 0; i < n; ++i) marker[i] = -1;
+
+ /* First pass determines number of nonzeros in B */
+ num_nz = 0;
+ for (j = 0; j < n; ++j) {
+ /* Flag the diagonal so it's not included in the B matrix */
+ marker[j] = j;
+
+ /* Add pattern of column A_*k to B_*j */
+ for (i = colptr[j]; i < colptr[j+1]; ++i) {
+ k = rowind[i];
+ if ( marker[k] != j ) {
+ marker[k] = j;
+ ++num_nz;
+ }
+ }
+
+ /* Add pattern of column T_*k to B_*j */
+ for (i = t_colptr[j]; i < t_colptr[j+1]; ++i) {
+ k = t_rowind[i];
+ if ( marker[k] != j ) {
+ marker[k] = j;
+ ++num_nz;
+ }
+ }
+ }
+ *bnz = num_nz;
+
+ /* Allocate storage for A+A' */
+ if ( !(*b_colptr = (int*) SUPERLU_MALLOC( (n+1) * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails for b_colptr[]");
+ if ( *bnz) {
+ if ( !(*b_rowind = (int*) SUPERLU_MALLOC( *bnz * sizeof(int)) ) )
+ ABORT("SUPERLU_MALLOC fails for b_rowind[]");
+ }
+
+ /* Zero the diagonal flag */
+ for (i = 0; i < n; ++i) marker[i] = -1;
+
+ /* Compute each column of B, one at a time */
+ num_nz = 0;
+ for (j = 0; j < n; ++j) {
+ (*b_colptr)[j] = num_nz;
+
+ /* Flag the diagonal so it's not included in the B matrix */
+ marker[j] = j;
+
+ /* Add pattern of column A_*k to B_*j */
+ for (i = colptr[j]; i < colptr[j+1]; ++i) {
+ k = rowind[i];
+ if ( marker[k] != j ) {
+ marker[k] = j;
+ (*b_rowind)[num_nz++] = k;
+ }
+ }
+
+ /* Add pattern of column T_*k to B_*j */
+ for (i = t_colptr[j]; i < t_colptr[j+1]; ++i) {
+ k = t_rowind[i];
+ if ( marker[k] != j ) {
+ marker[k] = j;
+ (*b_rowind)[num_nz++] = k;
+ }
+ }
+ }
+ (*b_colptr)[n] = num_nz;
+
+ SUPERLU_FREE(marker);
+ SUPERLU_FREE(t_colptr);
+ SUPERLU_FREE(t_rowind);
+}
+
+void
+get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
+/*
+ * Purpose
+ * =======
+ *
+ * GET_PERM_C obtains a permutation matrix Pc, by applying the multiple
+ * minimum degree ordering code by Joseph Liu to matrix A'*A or A+A'.
+ * or using approximate minimum degree column ordering by Davis et. al.
+ * The LU factorization of A*Pc tends to have less fill than the LU
+ * factorization of A.
+ *
+ * Arguments
+ * =========
+ *
+ * ispec (input) int
+ * Specifies the type of column ordering to reduce fill:
+ * = 1: minimum degree on the structure of A^T * A
+ * = 2: minimum degree on the structure of A^T + A
+ * = 3: approximate minimum degree for unsymmetric matrices
+ * If ispec == 0, the natural ordering (i.e., Pc = I) is returned.
+ *
+ * A (input) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of the linear equations is A->nrow. Currently, the type of A
+ * can be: Stype = NC; Dtype = _D; Mtype = GE. In the future,
+ * more general A can be handled.
+ *
+ * perm_c (output) int*
+ * Column permutation vector of size A->ncol, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ */
+{
+ NCformat *Astore = A->Store;
+ int m, n, bnz = 0, *b_colptr, i;
+ int delta, maxint, nofsub, *invp;
+ int *b_rowind, *dhead, *qsize, *llist, *marker;
+ double t, SuperLU_timer_();
+
+ m = A->nrow;
+ n = A->ncol;
+
+ t = SuperLU_timer_();
+ switch ( ispec ) {
+ case 0: /* Natural ordering */
+ for (i = 0; i < n; ++i) perm_c[i] = i;
+#if ( PRNTlevel>=1 )
+ printf("Use natural column ordering.\n");
+#endif
+ return;
+ case 1: /* Minimum degree ordering on A'*A */
+ getata(m, n, Astore->nnz, Astore->colptr, Astore->rowind,
+ &bnz, &b_colptr, &b_rowind);
+#if ( PRNTlevel>=1 )
+ printf("Use minimum degree ordering on A'*A.\n");
+#endif
+ t = SuperLU_timer_() - t;
+ /*printf("Form A'*A time = %8.3f\n", t);*/
+ break;
+ case 2: /* Minimum degree ordering on A'+A */
+ if ( m != n ) ABORT("Matrix is not square");
+ at_plus_a(n, Astore->nnz, Astore->colptr, Astore->rowind,
+ &bnz, &b_colptr, &b_rowind);
+#if ( PRNTlevel>=1 )
+ printf("Use minimum degree ordering on A'+A.\n");
+#endif
+ t = SuperLU_timer_() - t;
+ /*printf("Form A'+A time = %8.3f\n", t);*/
+ break;
+ case 3: /* Approximate minimum degree column ordering. */
+ get_colamd(m, n, Astore->nnz, Astore->colptr, Astore->rowind,
+ perm_c);
+#if ( PRNTlevel>=1 )
+ printf(".. Use approximate minimum degree column ordering.\n");
+#endif
+ return;
+ default:
+ ABORT("Invalid ISPEC");
+ }
+
+ if ( bnz != 0 ) {
+ t = SuperLU_timer_();
+
+ /* Initialize and allocate storage for GENMMD. */
+ delta = 1; /* DELTA is a parameter to allow the choice of nodes
+ whose degree <= min-degree + DELTA. */
+ maxint = 2147483647; /* 2**31 - 1 */
+ invp = (int *) SUPERLU_MALLOC((n+delta)*sizeof(int));
+ if ( !invp ) ABORT("SUPERLU_MALLOC fails for invp.");
+ dhead = (int *) SUPERLU_MALLOC((n+delta)*sizeof(int));
+ if ( !dhead ) ABORT("SUPERLU_MALLOC fails for dhead.");
+ qsize = (int *) SUPERLU_MALLOC((n+delta)*sizeof(int));
+ if ( !qsize ) ABORT("SUPERLU_MALLOC fails for qsize.");
+ llist = (int *) SUPERLU_MALLOC(n*sizeof(int));
+ if ( !llist ) ABORT("SUPERLU_MALLOC fails for llist.");
+ marker = (int *) SUPERLU_MALLOC(n*sizeof(int));
+ if ( !marker ) ABORT("SUPERLU_MALLOC fails for marker.");
+
+ /* Transform adjacency list into 1-based indexing required by GENMMD.*/
+ for (i = 0; i <= n; ++i) ++b_colptr[i];
+ for (i = 0; i < bnz; ++i) ++b_rowind[i];
+
+ genmmd_(&n, b_colptr, b_rowind, perm_c, invp, &delta, dhead,
+ qsize, llist, marker, &maxint, &nofsub);
+
+ /* Transform perm_c into 0-based indexing. */
+ for (i = 0; i < n; ++i) --perm_c[i];
+
+ SUPERLU_FREE(b_colptr);
+ SUPERLU_FREE(b_rowind);
+ SUPERLU_FREE(invp);
+ SUPERLU_FREE(dhead);
+ SUPERLU_FREE(qsize);
+ SUPERLU_FREE(llist);
+ SUPERLU_FREE(marker);
+
+ t = SuperLU_timer_() - t;
+ /* printf("call GENMMD time = %8.3f\n", t);*/
+
+ } else { /* Empty adjacency structure */
+ for (i = 0; i < n; ++i) perm_c[i] = i;
+ }
+
+}
diff --git a/SRC/heap_relax_snode.c b/SRC/heap_relax_snode.c
new file mode 100644
index 0000000..f731b64
--- /dev/null
+++ b/SRC/heap_relax_snode.c
@@ -0,0 +1,116 @@
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+void
+heap_relax_snode (
+ const int n,
+ int *et, /* column elimination tree */
+ const int relax_columns, /* max no of columns allowed in a
+ relaxed snode */
+ int *descendants, /* no of descendants of each node
+ in the etree */
+ int *relax_end /* last column in a supernode */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * relax_snode() - Identify the initial relaxed supernodes, assuming that
+ * the matrix has been reordered according to the postorder of the etree.
+ *
+ */
+ register int i, j, k, l, parent;
+ register int snode_start; /* beginning of a snode */
+ int *et_save, *post, *inv_post, *iwork;
+ int nsuper_et = 0, nsuper_et_post = 0;
+
+ /* The etree may not be postordered, but is heap ordered. */
+
+ iwork = (int*) intMalloc(3*n+2);
+ if ( !iwork ) ABORT("SUPERLU_MALLOC fails for iwork[]");
+ inv_post = iwork + n+1;
+ et_save = inv_post + n+1;
+
+ /* Post order etree */
+ post = (int *) TreePostorder(n, et);
+ for (i = 0; i < n+1; ++i) inv_post[post[i]] = i;
+
+ /* Renumber etree in postorder */
+ for (i = 0; i < n; ++i) {
+ iwork[post[i]] = post[et[i]];
+ et_save[i] = et[i]; /* Save the original etree */
+ }
+ for (i = 0; i < n; ++i) et[i] = iwork[i];
+
+ /* Compute the number of descendants of each node in the etree */
+ ifill (relax_end, n, EMPTY);
+ for (j = 0; j < n; j++) descendants[j] = 0;
+ for (j = 0; j < n; j++) {
+ parent = et[j];
+ if ( parent != n ) /* not the dummy root */
+ descendants[parent] += descendants[j] + 1;
+ }
+
+ /* Identify the relaxed supernodes by postorder traversal of the etree. */
+ for (j = 0; j < n; ) {
+ parent = et[j];
+ snode_start = j;
+ while ( parent != n && descendants[parent] < relax_columns ) {
+ j = parent;
+ parent = et[j];
+ }
+ /* Found a supernode in postordered etree; j is the last column. */
+ ++nsuper_et_post;
+ k = n;
+ for (i = snode_start; i <= j; ++i)
+ k = SUPERLU_MIN(k, inv_post[i]);
+ l = inv_post[j];
+ if ( (l - k) == (j - snode_start) ) {
+ /* It's also a supernode in the original etree */
+ relax_end[k] = l; /* Last column is recorded */
+ ++nsuper_et;
+ } else {
+ for (i = snode_start; i <= j; ++i) {
+ l = inv_post[i];
+ if ( descendants[i] == 0 ) relax_end[l] = l;
+ }
+ }
+ j++;
+ /* Search for a new leaf */
+ while ( descendants[j] != 0 && j < n ) j++;
+ }
+
+#if ( PRNTlevel>=1 )
+ printf(".. heap_snode_relax:\n"
+ "\tNo of relaxed snodes in postordered etree:\t%d\n"
+ "\tNo of relaxed snodes in original etree:\t%d\n",
+ nsuper_et_post, nsuper_et);
+#endif
+
+ /* Recover the original etree */
+ for (i = 0; i < n; ++i) et[i] = et_save[i];
+
+ SUPERLU_FREE(post);
+ SUPERLU_FREE(iwork);
+}
+
+
diff --git a/SRC/icmax1.c b/SRC/icmax1.c
new file mode 100644
index 0000000..b29d5ee
--- /dev/null
+++ b/SRC/icmax1.c
@@ -0,0 +1,108 @@
+#include <math.h>
+#include "scomplex.h"
+
+int icmax1_(int *n, complex *cx, int *incx)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ICMAX1 finds the index of the element whose real part has maximum
+ absolute value.
+
+ Based on ICAMAX from Level 1 BLAS.
+ The change is to use the 'genuine' absolute value.
+
+ Contributed by Nick Higham for use with CLACON.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of elements in the vector CX.
+
+ CX (input) COMPLEX array, dimension (N)
+ The vector whose elements will be summed.
+
+ INCX (input) INT
+ The spacing between successive values of CX. INCX >= 1.
+
+ =====================================================================
+
+
+
+ NEXT LINE IS THE ONLY MODIFICATION.
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ int ret_val, i__1, i__2;
+ float r__1;
+ /* Local variables */
+ static float smax;
+ static int i, ix;
+
+
+#define CX(I) cx[(I)-1]
+
+
+ ret_val = 0;
+ if (*n < 1) {
+ return ret_val;
+ }
+ ret_val = 1;
+ if (*n == 1) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L30;
+ }
+
+/* CODE FOR INCREMENT NOT EQUAL TO 1 */
+
+ ix = 1;
+ smax = (r__1 = CX(1).r, fabs(r__1));
+ ix += *incx;
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ i__2 = ix;
+ if ((r__1 = CX(ix).r, fabs(r__1)) <= smax) {
+ goto L10;
+ }
+ ret_val = i;
+ i__2 = ix;
+ smax = (r__1 = CX(ix).r, fabs(r__1));
+L10:
+ ix += *incx;
+/* L20: */
+ }
+ return ret_val;
+
+/* CODE FOR INCREMENT EQUAL TO 1 */
+
+L30:
+ smax = (r__1 = CX(1).r, fabs(r__1));
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ i__2 = i;
+ if ((r__1 = CX(i).r, fabs(r__1)) <= smax) {
+ goto L40;
+ }
+ ret_val = i;
+ i__2 = i;
+ smax = (r__1 = CX(i).r, fabs(r__1));
+L40:
+ ;
+ }
+ return ret_val;
+
+/* End of ICMAX1 */
+
+} /* icmax1_ */
+
diff --git a/SRC/izmax1.c b/SRC/izmax1.c
new file mode 100644
index 0000000..c31bd66
--- /dev/null
+++ b/SRC/izmax1.c
@@ -0,0 +1,101 @@
+#include "dcomplex.h"
+
+int
+izmax1_(int *n, doublecomplex *cx, int *incx)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ IZMAX1 finds the index of the element whose real part has maximum
+ absolute value.
+
+ Based on IZAMAX from Level 1 BLAS.
+ The change is to use the 'genuine' absolute value.
+
+ Contributed by Nick Higham for use with ZLACON.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of elements in the vector CX.
+
+ CX (input) COMPLEX*16 array, dimension (N)
+ The vector whose elements will be summed.
+
+ INCX (input) INT
+ The spacing between successive values of CX. INCX >= 1.
+
+ =====================================================================
+*/
+
+ /* System generated locals */
+ int ret_val, i__1, i__2;
+ double d__1;
+
+ /* Local variables */
+ double smax;
+ int i, ix;
+
+#define CX(I) cx[(I)-1]
+
+ ret_val = 0;
+ if (*n < 1) {
+ return ret_val;
+ }
+ ret_val = 1;
+ if (*n == 1) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L30;
+ }
+
+/* CODE FOR INCREMENT NOT EQUAL TO 1 */
+
+ ix = 1;
+ smax = (d__1 = CX(1).r, abs(d__1));
+ ix += *incx;
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ i__2 = ix;
+ if ((d__1 = CX(ix).r, abs(d__1)) <= smax) {
+ goto L10;
+ }
+ ret_val = i;
+ i__2 = ix;
+ smax = (d__1 = CX(ix).r, abs(d__1));
+L10:
+ ix += *incx;
+/* L20: */
+ }
+ return ret_val;
+
+/* CODE FOR INCREMENT EQUAL TO 1 */
+
+L30:
+ smax = (d__1 = CX(1).r, abs(d__1));
+ i__1 = *n;
+ for (i = 2; i <= *n; ++i) {
+ i__2 = i;
+ if ((d__1 = CX(i).r, abs(d__1)) <= smax) {
+ goto L40;
+ }
+ ret_val = i;
+ i__2 = i;
+ smax = (d__1 = CX(i).r, abs(d__1));
+L40:
+ ;
+ }
+ return ret_val;
+
+/* End of IZMAX1 */
+
+} /* izmax1_ */
+
diff --git a/SRC/lsame.c b/SRC/lsame.c
new file mode 100644
index 0000000..fba47c6
--- /dev/null
+++ b/SRC/lsame.c
@@ -0,0 +1,70 @@
+int lsame_(char *ca, char *cb)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+ Purpose
+ =======
+
+ LSAME returns .TRUE. if CA is the same letter as CB regardless of case.
+
+ Arguments
+ =========
+
+ CA (input) CHARACTER*1
+ CB (input) CHARACTER*1
+ CA and CB specify the single characters to be compared.
+
+ =====================================================================
+*/
+
+ /* System generated locals */
+ int ret_val;
+
+ /* Local variables */
+ int inta, intb, zcode;
+
+ ret_val = *(unsigned char *)ca == *(unsigned char *)cb;
+ if (ret_val) {
+ return ret_val;
+ }
+
+ /* Now test for equivalence if both characters are alphabetic. */
+
+ zcode = 'Z';
+
+ /* Use 'Z' rather than 'A' so that ASCII can be detected on Prime
+ machines, on which ICHAR returns a value with bit 8 set.
+ ICHAR('A') on Prime machines returns 193 which is the same as
+ ICHAR('A') on an EBCDIC machine. */
+
+ inta = *(unsigned char *)ca;
+ intb = *(unsigned char *)cb;
+
+ if (zcode == 90 || zcode == 122) {
+ /* ASCII is assumed - ZCODE is the ASCII code of either lower or
+ upper case 'Z'. */
+ if (inta >= 97 && inta <= 122) inta += -32;
+ if (intb >= 97 && intb <= 122) intb += -32;
+
+ } else if (zcode == 233 || zcode == 169) {
+ /* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or
+ upper case 'Z'. */
+ if (inta >= 129 && inta <= 137 || inta >= 145 && inta <= 153 || inta
+ >= 162 && inta <= 169)
+ inta += 64;
+ if (intb >= 129 && intb <= 137 || intb >= 145 && intb <= 153 || intb
+ >= 162 && intb <= 169)
+ intb += 64;
+ } else if (zcode == 218 || zcode == 250) {
+ /* ASCII is assumed, on Prime machines - ZCODE is the ASCII code
+ plus 128 of either lower or upper case 'Z'. */
+ if (inta >= 225 && inta <= 250) inta += -32;
+ if (intb >= 225 && intb <= 250) intb += -32;
+ }
+ ret_val = inta == intb;
+ return ret_val;
+
+} /* lsame_ */
diff --git a/SRC/memory.c b/SRC/memory.c
new file mode 100644
index 0000000..c5e7831
--- /dev/null
+++ b/SRC/memory.c
@@ -0,0 +1,207 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/** Precision-independent memory-related routines.
+ (Shared by [sdcz]memory.c) **/
+
+#include "dsp_defs.h"
+
+
+#if ( DEBUGlevel>=1 ) /* Debug malloc/free. */
+int superlu_malloc_total = 0;
+
+#define PAD_FACTOR 2
+#define DWORD (sizeof(double)) /* Be sure it's no smaller than double. */
+
+void *superlu_malloc(size_t size)
+{
+ char *buf;
+
+ buf = (char *) malloc(size + DWORD);
+ if ( !buf ) {
+ printf("superlu_malloc fails: malloc_total %.0f MB, size %d\n",
+ superlu_malloc_total*1e-6, size);
+ ABORT("superlu_malloc: out of memory");
+ }
+
+ ((int_t *) buf)[0] = size;
+#if 0
+ superlu_malloc_total += size + DWORD;
+#else
+ superlu_malloc_total += size;
+#endif
+ return (void *) (buf + DWORD);
+}
+
+void superlu_free(void *addr)
+{
+ char *p = ((char *) addr) - DWORD;
+
+ if ( !addr )
+ ABORT("superlu_free: tried to free NULL pointer");
+
+ if ( !p )
+ ABORT("superlu_free: tried to free NULL+DWORD pointer");
+
+ {
+ int_t n = ((int_t *) p)[0];
+
+ if ( !n )
+ ABORT("superlu_free: tried to free a freed pointer");
+ *((int_t *) p) = 0; /* Set to zero to detect duplicate free's. */
+#if 0
+ superlu_malloc_total -= (n + DWORD);
+#else
+ superlu_malloc_total -= n;
+#endif
+
+ if ( superlu_malloc_total < 0 )
+ ABORT("superlu_malloc_total went negative!");
+
+ /*free (addr);*/
+ free (p);
+ }
+
+}
+
+#else /* production mode */
+
+void *superlu_malloc(size_t size)
+{
+ void *buf;
+ buf = (void *) malloc(size);
+ return (buf);
+}
+
+void superlu_free(void *addr)
+{
+ free (addr);
+}
+
+#endif
+
+
+/*
+ * Set up pointers for integer working arrays.
+ */
+void
+SetIWork(int m, int n, int panel_size, int *iworkptr, int **segrep,
+ int **parent, int **xplore, int **repfnz, int **panel_lsub,
+ int **xprune, int **marker)
+{
+ *segrep = iworkptr;
+ *parent = iworkptr + m;
+ *xplore = *parent + m;
+ *repfnz = *xplore + m;
+ *panel_lsub = *repfnz + panel_size * m;
+ *xprune = *panel_lsub + panel_size * m;
+ *marker = *xprune + n;
+ ifill (*repfnz, m * panel_size, EMPTY);
+ ifill (*panel_lsub, m * panel_size, EMPTY);
+}
+
+
+void
+copy_mem_int(int howmany, void *old, void *new)
+{
+ register int i;
+ int *iold = old;
+ int *inew = new;
+ for (i = 0; i < howmany; i++) inew[i] = iold[i];
+}
+
+
+void
+user_bcopy(char *src, char *dest, int bytes)
+{
+ char *s_ptr, *d_ptr;
+
+ s_ptr = src + bytes - 1;
+ d_ptr = dest + bytes - 1;
+ for (; d_ptr >= dest; --s_ptr, --d_ptr ) *d_ptr = *s_ptr;
+}
+
+
+
+int *intMalloc(int n)
+{
+ int *buf;
+ buf = (int *) SUPERLU_MALLOC(n * sizeof(int));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC fails for buf in intMalloc()");
+ }
+ return (buf);
+}
+
+int *intCalloc(int n)
+{
+ int *buf;
+ register int i;
+ buf = (int *) SUPERLU_MALLOC(n * sizeof(int));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC fails for buf in intCalloc()");
+ }
+ for (i = 0; i < n; ++i) buf[i] = 0;
+ return (buf);
+}
+
+
+
+#if 0
+check_expanders()
+{
+ int p;
+ printf("Check expanders:\n");
+ for (p = 0; p < NO_MEMTYPE; p++) {
+ printf("type %d, size %d, mem %d\n",
+ p, expanders[p].size, (int)expanders[p].mem);
+ }
+
+ return 0;
+}
+
+
+StackInfo()
+{
+ printf("Stack: size %d, used %d, top1 %d, top2 %d\n",
+ stack.size, stack.used, stack.top1, stack.top2);
+ return 0;
+}
+
+
+
+PrintStack(char *msg, GlobalLU_t *Glu)
+{
+ int i;
+ int *xlsub, *lsub, *xusub, *usub;
+
+ xlsub = Glu->xlsub;
+ lsub = Glu->lsub;
+ xusub = Glu->xusub;
+ usub = Glu->usub;
+
+ printf("%s\n", msg);
+
+/* printf("\nUCOL: ");
+ for (i = 0; i < xusub[ndim]; ++i)
+ printf("%f ", ucol[i]);
+
+ printf("\nLSUB: ");
+ for (i = 0; i < xlsub[ndim]; ++i)
+ printf("%d ", lsub[i]);
+
+ printf("\nUSUB: ");
+ for (i = 0; i < xusub[ndim]; ++i)
+ printf("%d ", usub[i]);
+
+ printf("\n");*/
+ return 0;
+}
+#endif
+
+
+
diff --git a/SRC/mmd.c b/SRC/mmd.c
new file mode 100644
index 0000000..05f26ce
--- /dev/null
+++ b/SRC/mmd.c
@@ -0,0 +1,1012 @@
+
+typedef int shortint;
+
+/* *************************************************************** */
+/* *************************************************************** */
+/* **** GENMMD ..... MULTIPLE MINIMUM EXTERNAL DEGREE **** */
+/* *************************************************************** */
+/* *************************************************************** */
+
+/* AUTHOR - JOSEPH W.H. LIU */
+/* DEPT OF COMPUTER SCIENCE, YORK UNIVERSITY. */
+
+/* PURPOSE - THIS ROUTINE IMPLEMENTS THE MINIMUM DEGREE */
+/* ALGORITHM. IT MAKES USE OF THE IMPLICIT REPRESENTATION */
+/* OF ELIMINATION GRAPHS BY QUOTIENT GRAPHS, AND THE */
+/* NOTION OF INDISTINGUISHABLE NODES. IT ALSO IMPLEMENTS */
+/* THE MODIFICATIONS BY MULTIPLE ELIMINATION AND MINIMUM */
+/* EXTERNAL DEGREE. */
+/* --------------------------------------------- */
+/* CAUTION - THE ADJACENCY VECTOR ADJNCY WILL BE */
+/* DESTROYED. */
+/* --------------------------------------------- */
+
+/* INPUT PARAMETERS - */
+/* NEQNS - NUMBER OF EQUATIONS. */
+/* (XADJ,ADJNCY) - THE ADJACENCY STRUCTURE. */
+/* DELTA - TOLERANCE VALUE FOR MULTIPLE ELIMINATION. */
+/* MAXINT - MAXIMUM MACHINE REPRESENTABLE (SHORT) INTEGER */
+/* (ANY SMALLER ESTIMATE WILL DO) FOR MARKING */
+/* NODES. */
+
+/* OUTPUT PARAMETERS - */
+/* PERM - THE MINIMUM DEGREE ORDERING. */
+/* INVP - THE INVERSE OF PERM. */
+/* NOFSUB - AN UPPER BOUND ON THE NUMBER OF NONZERO */
+/* SUBSCRIPTS FOR THE COMPRESSED STORAGE SCHEME. */
+
+/* WORKING PARAMETERS - */
+/* DHEAD - VECTOR FOR HEAD OF DEGREE LISTS. */
+/* INVP - USED TEMPORARILY FOR DEGREE FORWARD LINK. */
+/* PERM - USED TEMPORARILY FOR DEGREE BACKWARD LINK. */
+/* QSIZE - VECTOR FOR SIZE OF SUPERNODES. */
+/* LLIST - VECTOR FOR TEMPORARY LINKED LISTS. */
+/* MARKER - A TEMPORARY MARKER VECTOR. */
+
+/* PROGRAM SUBROUTINES - */
+/* MMDELM, MMDINT, MMDNUM, MMDUPD. */
+
+/* *************************************************************** */
+
+/* Subroutine */ int genmmd_(int *neqns, int *xadj, shortint *adjncy,
+ shortint *invp, shortint *perm, int *delta, shortint *dhead,
+ shortint *qsize, shortint *llist, shortint *marker, int *maxint,
+ int *nofsub)
+{
+ /* System generated locals */
+ int i__1;
+
+ /* Local variables */
+ static int mdeg, ehead, i, mdlmt, mdnode;
+ extern /* Subroutine */ int mmdelm_(int *, int *, shortint *,
+ shortint *, shortint *, shortint *, shortint *, shortint *,
+ shortint *, int *, int *), mmdupd_(int *, int *,
+ int *, shortint *, int *, int *, shortint *, shortint
+ *, shortint *, shortint *, shortint *, shortint *, int *,
+ int *), mmdint_(int *, int *, shortint *, shortint *,
+ shortint *, shortint *, shortint *, shortint *, shortint *),
+ mmdnum_(int *, shortint *, shortint *, shortint *);
+ static int nextmd, tag, num;
+
+
+/* *************************************************************** */
+
+
+/* *************************************************************** */
+
+ /* Parameter adjustments */
+ --marker;
+ --llist;
+ --qsize;
+ --dhead;
+ --perm;
+ --invp;
+ --adjncy;
+ --xadj;
+
+ /* Function Body */
+ if (*neqns <= 0) {
+ return 0;
+ }
+
+/* ------------------------------------------------ */
+/* INITIALIZATION FOR THE MINIMUM DEGREE ALGORITHM. */
+/* ------------------------------------------------ */
+ *nofsub = 0;
+ mmdint_(neqns, &xadj[1], &adjncy[1], &dhead[1], &invp[1], &perm[1], &
+ qsize[1], &llist[1], &marker[1]);
+
+/* ---------------------------------------------- */
+/* NUM COUNTS THE NUMBER OF ORDERED NODES PLUS 1. */
+/* ---------------------------------------------- */
+ num = 1;
+
+/* ----------------------------- */
+/* ELIMINATE ALL ISOLATED NODES. */
+/* ----------------------------- */
+ nextmd = dhead[1];
+L100:
+ if (nextmd <= 0) {
+ goto L200;
+ }
+ mdnode = nextmd;
+ nextmd = invp[mdnode];
+ marker[mdnode] = *maxint;
+ invp[mdnode] = -num;
+ ++num;
+ goto L100;
+
+L200:
+/* ---------------------------------------- */
+/* SEARCH FOR NODE OF THE MINIMUM DEGREE. */
+/* MDEG IS THE CURRENT MINIMUM DEGREE; */
+/* TAG IS USED TO FACILITATE MARKING NODES. */
+/* ---------------------------------------- */
+ if (num > *neqns) {
+ goto L1000;
+ }
+ tag = 1;
+ dhead[1] = 0;
+ mdeg = 2;
+L300:
+ if (dhead[mdeg] > 0) {
+ goto L400;
+ }
+ ++mdeg;
+ goto L300;
+L400:
+/* ------------------------------------------------- */
+/* USE VALUE OF DELTA TO SET UP MDLMT, WHICH GOVERNS */
+/* WHEN A DEGREE UPDATE IS TO BE PERFORMED. */
+/* ------------------------------------------------- */
+ mdlmt = mdeg + *delta;
+ ehead = 0;
+
+L500:
+ mdnode = dhead[mdeg];
+ if (mdnode > 0) {
+ goto L600;
+ }
+ ++mdeg;
+ if (mdeg > mdlmt) {
+ goto L900;
+ }
+ goto L500;
+L600:
+/* ---------------------------------------- */
+/* REMOVE MDNODE FROM THE DEGREE STRUCTURE. */
+/* ---------------------------------------- */
+ nextmd = invp[mdnode];
+ dhead[mdeg] = nextmd;
+ if (nextmd > 0) {
+ perm[nextmd] = -mdeg;
+ }
+ invp[mdnode] = -num;
+ *nofsub = *nofsub + mdeg + qsize[mdnode] - 2;
+ if (num + qsize[mdnode] > *neqns) {
+ goto L1000;
+ }
+/* ---------------------------------------------- */
+/* ELIMINATE MDNODE AND PERFORM QUOTIENT GRAPH */
+/* TRANSFORMATION. RESET TAG VALUE IF NECESSARY. */
+/* ---------------------------------------------- */
+ ++tag;
+ if (tag < *maxint) {
+ goto L800;
+ }
+ tag = 1;
+ i__1 = *neqns;
+ for (i = 1; i <= i__1; ++i) {
+ if (marker[i] < *maxint) {
+ marker[i] = 0;
+ }
+/* L700: */
+ }
+L800:
+ mmdelm_(&mdnode, &xadj[1], &adjncy[1], &dhead[1], &invp[1], &perm[1], &
+ qsize[1], &llist[1], &marker[1], maxint, &tag);
+ num += qsize[mdnode];
+ llist[mdnode] = ehead;
+ ehead = mdnode;
+ if (*delta >= 0) {
+ goto L500;
+ }
+L900:
+/* ------------------------------------------- */
+/* UPDATE DEGREES OF THE NODES INVOLVED IN THE */
+/* MINIMUM DEGREE NODES ELIMINATION. */
+/* ------------------------------------------- */
+ if (num > *neqns) {
+ goto L1000;
+ }
+ mmdupd_(&ehead, neqns, &xadj[1], &adjncy[1], delta, &mdeg, &dhead[1], &
+ invp[1], &perm[1], &qsize[1], &llist[1], &marker[1], maxint, &tag)
+ ;
+ goto L300;
+
+L1000:
+ mmdnum_(neqns, &perm[1], &invp[1], &qsize[1]);
+ return 0;
+
+} /* genmmd_ */
+
+/* *************************************************************** */
+/* *************************************************************** */
+/* *** MMDINT ..... MULT MINIMUM DEGREE INITIALIZATION *** */
+/* *************************************************************** */
+/* *************************************************************** */
+
+/* AUTHOR - JOSEPH W.H. LIU */
+/* DEPT OF COMPUTER SCIENCE, YORK UNIVERSITY. */
+
+/* PURPOSE - THIS ROUTINE PERFORMS INITIALIZATION FOR THE */
+/* MULTIPLE ELIMINATION VERSION OF THE MINIMUM DEGREE */
+/* ALGORITHM. */
+
+/* INPUT PARAMETERS - */
+/* NEQNS - NUMBER OF EQUATIONS. */
+/* (XADJ,ADJNCY) - ADJACENCY STRUCTURE. */
+
+/* OUTPUT PARAMETERS - */
+/* (DHEAD,DFORW,DBAKW) - DEGREE DOUBLY LINKED STRUCTURE. */
+/* QSIZE - SIZE OF SUPERNODE (INITIALIZED TO ONE). */
+/* LLIST - LINKED LIST. */
+/* MARKER - MARKER VECTOR. */
+
+/* *************************************************************** */
+
+/* Subroutine */ int mmdint_(int *neqns, int *xadj, shortint *adjncy,
+ shortint *dhead, shortint *dforw, shortint *dbakw, shortint *qsize,
+ shortint *llist, shortint *marker)
+{
+ /* System generated locals */
+ int i__1;
+
+ /* Local variables */
+ static int ndeg, node, fnode;
+
+
+/* *************************************************************** */
+
+
+/* *************************************************************** */
+
+ /* Parameter adjustments */
+ --marker;
+ --llist;
+ --qsize;
+ --dbakw;
+ --dforw;
+ --dhead;
+ --adjncy;
+ --xadj;
+
+ /* Function Body */
+ i__1 = *neqns;
+ for (node = 1; node <= i__1; ++node) {
+ dhead[node] = 0;
+ qsize[node] = 1;
+ marker[node] = 0;
+ llist[node] = 0;
+/* L100: */
+ }
+/* ------------------------------------------ */
+/* INITIALIZE THE DEGREE DOUBLY LINKED LISTS. */
+/* ------------------------------------------ */
+ i__1 = *neqns;
+ for (node = 1; node <= i__1; ++node) {
+ ndeg = xadj[node + 1] - xadj[node] + 1;
+ fnode = dhead[ndeg];
+ dforw[node] = fnode;
+ dhead[ndeg] = node;
+ if (fnode > 0) {
+ dbakw[fnode] = node;
+ }
+ dbakw[node] = -ndeg;
+/* L200: */
+ }
+ return 0;
+
+} /* mmdint_ */
+
+/* *************************************************************** */
+/* *************************************************************** */
+/* ** MMDELM ..... MULTIPLE MINIMUM DEGREE ELIMINATION *** */
+/* *************************************************************** */
+/* *************************************************************** */
+
+/* AUTHOR - JOSEPH W.H. LIU */
+/* DEPT OF COMPUTER SCIENCE, YORK UNIVERSITY. */
+
+/* PURPOSE - THIS ROUTINE ELIMINATES THE NODE MDNODE OF */
+/* MINIMUM DEGREE FROM THE ADJACENCY STRUCTURE, WHICH */
+/* IS STORED IN THE QUOTIENT GRAPH FORMAT. IT ALSO */
+/* TRANSFORMS THE QUOTIENT GRAPH REPRESENTATION OF THE */
+/* ELIMINATION GRAPH. */
+
+/* INPUT PARAMETERS - */
+/* MDNODE - NODE OF MINIMUM DEGREE. */
+/* MAXINT - ESTIMATE OF MAXIMUM REPRESENTABLE (SHORT) */
+/* INT. */
+/* TAG - TAG VALUE. */
+
+/* UPDATED PARAMETERS - */
+/* (XADJ,ADJNCY) - UPDATED ADJACENCY STRUCTURE. */
+/* (DHEAD,DFORW,DBAKW) - DEGREE DOUBLY LINKED STRUCTURE. */
+/* QSIZE - SIZE OF SUPERNODE. */
+/* MARKER - MARKER VECTOR. */
+/* LLIST - TEMPORARY LINKED LIST OF ELIMINATED NABORS. */
+
+/* *************************************************************** */
+
+/* Subroutine */ int mmdelm_(int *mdnode, int *xadj, shortint *adjncy,
+ shortint *dhead, shortint *dforw, shortint *dbakw, shortint *qsize,
+ shortint *llist, shortint *marker, int *maxint, int *tag)
+{
+ /* System generated locals */
+ int i__1, i__2;
+
+ /* Local variables */
+ static int node, link, rloc, rlmt, i, j, nabor, rnode, elmnt, xqnbr,
+ istop, jstop, istrt, jstrt, nxnode, pvnode, nqnbrs, npv;
+
+
+/* *************************************************************** */
+
+
+/* *************************************************************** */
+
+/* ----------------------------------------------- */
+/* FIND REACHABLE SET AND PLACE IN DATA STRUCTURE. */
+/* ----------------------------------------------- */
+ /* Parameter adjustments */
+ --marker;
+ --llist;
+ --qsize;
+ --dbakw;
+ --dforw;
+ --dhead;
+ --adjncy;
+ --xadj;
+
+ /* Function Body */
+ marker[*mdnode] = *tag;
+ istrt = xadj[*mdnode];
+ istop = xadj[*mdnode + 1] - 1;
+/* ------------------------------------------------------- */
+/* ELMNT POINTS TO THE BEGINNING OF THE LIST OF ELIMINATED */
+/* NABORS OF MDNODE, AND RLOC GIVES THE STORAGE LOCATION */
+/* FOR THE NEXT REACHABLE NODE. */
+/* ------------------------------------------------------- */
+ elmnt = 0;
+ rloc = istrt;
+ rlmt = istop;
+ i__1 = istop;
+ for (i = istrt; i <= i__1; ++i) {
+ nabor = adjncy[i];
+ if (nabor == 0) {
+ goto L300;
+ }
+ if (marker[nabor] >= *tag) {
+ goto L200;
+ }
+ marker[nabor] = *tag;
+ if (dforw[nabor] < 0) {
+ goto L100;
+ }
+ adjncy[rloc] = nabor;
+ ++rloc;
+ goto L200;
+L100:
+ llist[nabor] = elmnt;
+ elmnt = nabor;
+L200:
+ ;
+ }
+L300:
+/* ----------------------------------------------------- */
+/* MERGE WITH REACHABLE NODES FROM GENERALIZED ELEMENTS. */
+/* ----------------------------------------------------- */
+ if (elmnt <= 0) {
+ goto L1000;
+ }
+ adjncy[rlmt] = -elmnt;
+ link = elmnt;
+L400:
+ jstrt = xadj[link];
+ jstop = xadj[link + 1] - 1;
+ i__1 = jstop;
+ for (j = jstrt; j <= i__1; ++j) {
+ node = adjncy[j];
+ link = -node;
+ if (node < 0) {
+ goto L400;
+ } else if (node == 0) {
+ goto L900;
+ } else {
+ goto L500;
+ }
+L500:
+ if (marker[node] >= *tag || dforw[node] < 0) {
+ goto L800;
+ }
+ marker[node] = *tag;
+/* --------------------------------- */
+/* USE STORAGE FROM ELIMINATED NODES */
+/* IF NECESSARY. */
+/* --------------------------------- */
+L600:
+ if (rloc < rlmt) {
+ goto L700;
+ }
+ link = -adjncy[rlmt];
+ rloc = xadj[link];
+ rlmt = xadj[link + 1] - 1;
+ goto L600;
+L700:
+ adjncy[rloc] = node;
+ ++rloc;
+L800:
+ ;
+ }
+L900:
+ elmnt = llist[elmnt];
+ goto L300;
+L1000:
+ if (rloc <= rlmt) {
+ adjncy[rloc] = 0;
+ }
+/* -------------------------------------------------------- */
+/* FOR EACH NODE IN THE REACHABLE SET, DO THE FOLLOWING ... */
+/* -------------------------------------------------------- */
+ link = *mdnode;
+L1100:
+ istrt = xadj[link];
+ istop = xadj[link + 1] - 1;
+ i__1 = istop;
+ for (i = istrt; i <= i__1; ++i) {
+ rnode = adjncy[i];
+ link = -rnode;
+ if (rnode < 0) {
+ goto L1100;
+ } else if (rnode == 0) {
+ goto L1800;
+ } else {
+ goto L1200;
+ }
+L1200:
+/* -------------------------------------------- */
+/* IF RNODE IS IN THE DEGREE LIST STRUCTURE ... */
+/* -------------------------------------------- */
+ pvnode = dbakw[rnode];
+ if (pvnode == 0 || pvnode == -(*maxint)) {
+ goto L1300;
+ }
+/* ------------------------------------- */
+/* THEN REMOVE RNODE FROM THE STRUCTURE. */
+/* ------------------------------------- */
+ nxnode = dforw[rnode];
+ if (nxnode > 0) {
+ dbakw[nxnode] = pvnode;
+ }
+ if (pvnode > 0) {
+ dforw[pvnode] = nxnode;
+ }
+ npv = -pvnode;
+ if (pvnode < 0) {
+ dhead[npv] = nxnode;
+ }
+L1300:
+/* ---------------------------------------- */
+/* PURGE INACTIVE QUOTIENT NABORS OF RNODE. */
+/* ---------------------------------------- */
+ jstrt = xadj[rnode];
+ jstop = xadj[rnode + 1] - 1;
+ xqnbr = jstrt;
+ i__2 = jstop;
+ for (j = jstrt; j <= i__2; ++j) {
+ nabor = adjncy[j];
+ if (nabor == 0) {
+ goto L1500;
+ }
+ if (marker[nabor] >= *tag) {
+ goto L1400;
+ }
+ adjncy[xqnbr] = nabor;
+ ++xqnbr;
+L1400:
+ ;
+ }
+L1500:
+/* ---------------------------------------- */
+/* IF NO ACTIVE NABOR AFTER THE PURGING ... */
+/* ---------------------------------------- */
+ nqnbrs = xqnbr - jstrt;
+ if (nqnbrs > 0) {
+ goto L1600;
+ }
+/* ----------------------------- */
+/* THEN MERGE RNODE WITH MDNODE. */
+/* ----------------------------- */
+ qsize[*mdnode] += qsize[rnode];
+ qsize[rnode] = 0;
+ marker[rnode] = *maxint;
+ dforw[rnode] = -(*mdnode);
+ dbakw[rnode] = -(*maxint);
+ goto L1700;
+L1600:
+/* -------------------------------------- */
+/* ELSE FLAG RNODE FOR DEGREE UPDATE, AND */
+/* ADD MDNODE AS A NABOR OF RNODE. */
+/* -------------------------------------- */
+ dforw[rnode] = nqnbrs + 1;
+ dbakw[rnode] = 0;
+ adjncy[xqnbr] = *mdnode;
+ ++xqnbr;
+ if (xqnbr <= jstop) {
+ adjncy[xqnbr] = 0;
+ }
+
+L1700:
+ ;
+ }
+L1800:
+ return 0;
+
+} /* mmdelm_ */
+
+/* *************************************************************** */
+/* *************************************************************** */
+/* ***** MMDUPD ..... MULTIPLE MINIMUM DEGREE UPDATE ***** */
+/* *************************************************************** */
+/* *************************************************************** */
+
+/* AUTHOR - JOSEPH W.H. LIU */
+/* DEPT OF COMPUTER SCIENCE, YORK UNIVERSITY. */
+
+/* PURPOSE - THIS ROUTINE UPDATES THE DEGREES OF NODES */
+/* AFTER A MULTIPLE ELIMINATION STEP. */
+
+/* INPUT PARAMETERS - */
+/* EHEAD - THE BEGINNING OF THE LIST OF ELIMINATED */
+/* NODES (I.E., NEWLY FORMED ELEMENTS). */
+/* NEQNS - NUMBER OF EQUATIONS. */
+/* (XADJ,ADJNCY) - ADJACENCY STRUCTURE. */
+/* DELTA - TOLERANCE VALUE FOR MULTIPLE ELIMINATION. */
+/* MAXINT - MAXIMUM MACHINE REPRESENTABLE (SHORT) */
+/* INTEGER. */
+
+/* UPDATED PARAMETERS - */
+/* MDEG - NEW MINIMUM DEGREE AFTER DEGREE UPDATE. */
+/* (DHEAD,DFORW,DBAKW) - DEGREE DOUBLY LINKED STRUCTURE. */
+/* QSIZE - SIZE OF SUPERNODE. */
+/* LLIST - WORKING LINKED LIST. */
+/* MARKER - MARKER VECTOR FOR DEGREE UPDATE. */
+/* TAG - TAG VALUE. */
+
+/* *************************************************************** */
+
+/* Subroutine */ int mmdupd_(int *ehead, int *neqns, int *xadj,
+ shortint *adjncy, int *delta, int *mdeg, shortint *dhead,
+ shortint *dforw, shortint *dbakw, shortint *qsize, shortint *llist,
+ shortint *marker, int *maxint, int *tag)
+{
+ /* System generated locals */
+ int i__1, i__2;
+
+ /* Local variables */
+ static int node, mtag, link, mdeg0, i, j, enode, fnode, nabor, elmnt,
+ istop, jstop, q2head, istrt, jstrt, qxhead, iq2, deg, deg0;
+
+
+/* *************************************************************** */
+
+
+/* *************************************************************** */
+
+ /* Parameter adjustments */
+ --marker;
+ --llist;
+ --qsize;
+ --dbakw;
+ --dforw;
+ --dhead;
+ --adjncy;
+ --xadj;
+
+ /* Function Body */
+ mdeg0 = *mdeg + *delta;
+ elmnt = *ehead;
+L100:
+/* ------------------------------------------------------- */
+/* FOR EACH OF THE NEWLY FORMED ELEMENT, DO THE FOLLOWING. */
+/* (RESET TAG VALUE IF NECESSARY.) */
+/* ------------------------------------------------------- */
+ if (elmnt <= 0) {
+ return 0;
+ }
+ mtag = *tag + mdeg0;
+ if (mtag < *maxint) {
+ goto L300;
+ }
+ *tag = 1;
+ i__1 = *neqns;
+ for (i = 1; i <= i__1; ++i) {
+ if (marker[i] < *maxint) {
+ marker[i] = 0;
+ }
+/* L200: */
+ }
+ mtag = *tag + mdeg0;
+L300:
+/* --------------------------------------------- */
+/* CREATE TWO LINKED LISTS FROM NODES ASSOCIATED */
+/* WITH ELMNT: ONE WITH TWO NABORS (Q2HEAD) IN */
+/* ADJACENCY STRUCTURE, AND THE OTHER WITH MORE */
+/* THAN TWO NABORS (QXHEAD). ALSO COMPUTE DEG0, */
+/* NUMBER OF NODES IN THIS ELEMENT. */
+/* --------------------------------------------- */
+ q2head = 0;
+ qxhead = 0;
+ deg0 = 0;
+ link = elmnt;
+L400:
+ istrt = xadj[link];
+ istop = xadj[link + 1] - 1;
+ i__1 = istop;
+ for (i = istrt; i <= i__1; ++i) {
+ enode = adjncy[i];
+ link = -enode;
+ if (enode < 0) {
+ goto L400;
+ } else if (enode == 0) {
+ goto L800;
+ } else {
+ goto L500;
+ }
+
+L500:
+ if (qsize[enode] == 0) {
+ goto L700;
+ }
+ deg0 += qsize[enode];
+ marker[enode] = mtag;
+/* ---------------------------------- */
+/* IF ENODE REQUIRES A DEGREE UPDATE, */
+/* THEN DO THE FOLLOWING. */
+/* ---------------------------------- */
+ if (dbakw[enode] != 0) {
+ goto L700;
+ }
+/* ---------------------------------------
+*/
+/* PLACE EITHER IN QXHEAD OR Q2HEAD LISTS.
+*/
+/* ---------------------------------------
+*/
+ if (dforw[enode] == 2) {
+ goto L600;
+ }
+ llist[enode] = qxhead;
+ qxhead = enode;
+ goto L700;
+L600:
+ llist[enode] = q2head;
+ q2head = enode;
+L700:
+ ;
+ }
+L800:
+/* -------------------------------------------- */
+/* FOR EACH ENODE IN Q2 LIST, DO THE FOLLOWING. */
+/* -------------------------------------------- */
+ enode = q2head;
+ iq2 = 1;
+L900:
+ if (enode <= 0) {
+ goto L1500;
+ }
+ if (dbakw[enode] != 0) {
+ goto L2200;
+ }
+ ++(*tag);
+ deg = deg0;
+/* ------------------------------------------ */
+/* IDENTIFY THE OTHER ADJACENT ELEMENT NABOR. */
+/* ------------------------------------------ */
+ istrt = xadj[enode];
+ nabor = adjncy[istrt];
+ if (nabor == elmnt) {
+ nabor = adjncy[istrt + 1];
+ }
+/* ------------------------------------------------ */
+/* IF NABOR IS UNELIMINATED, INCREASE DEGREE COUNT. */
+/* ------------------------------------------------ */
+ link = nabor;
+ if (dforw[nabor] < 0) {
+ goto L1000;
+ }
+ deg += qsize[nabor];
+ goto L2100;
+L1000:
+/* -------------------------------------------- */
+/* OTHERWISE, FOR EACH NODE IN THE 2ND ELEMENT, */
+/* DO THE FOLLOWING. */
+/* -------------------------------------------- */
+ istrt = xadj[link];
+ istop = xadj[link + 1] - 1;
+ i__1 = istop;
+ for (i = istrt; i <= i__1; ++i) {
+ node = adjncy[i];
+ link = -node;
+ if (node == enode) {
+ goto L1400;
+ }
+ if (node < 0) {
+ goto L1000;
+ } else if (node == 0) {
+ goto L2100;
+ } else {
+ goto L1100;
+ }
+
+L1100:
+ if (qsize[node] == 0) {
+ goto L1400;
+ }
+ if (marker[node] >= *tag) {
+ goto L1200;
+ }
+/* -----------------------------------
+-- */
+/* CASE WHEN NODE IS NOT YET CONSIDERED
+. */
+/* -----------------------------------
+-- */
+ marker[node] = *tag;
+ deg += qsize[node];
+ goto L1400;
+L1200:
+/* ----------------------------------------
+ */
+/* CASE WHEN NODE IS INDISTINGUISHABLE FROM
+ */
+/* ENODE. MERGE THEM INTO A NEW SUPERNODE.
+ */
+/* ----------------------------------------
+ */
+ if (dbakw[node] != 0) {
+ goto L1400;
+ }
+ if (dforw[node] != 2) {
+ goto L1300;
+ }
+ qsize[enode] += qsize[node];
+ qsize[node] = 0;
+ marker[node] = *maxint;
+ dforw[node] = -enode;
+ dbakw[node] = -(*maxint);
+ goto L1400;
+L1300:
+/* --------------------------------------
+*/
+/* CASE WHEN NODE IS OUTMATCHED BY ENODE.
+*/
+/* --------------------------------------
+*/
+ if (dbakw[node] == 0) {
+ dbakw[node] = -(*maxint);
+ }
+L1400:
+ ;
+ }
+ goto L2100;
+L1500:
+/* ------------------------------------------------ */
+/* FOR EACH ENODE IN THE QX LIST, DO THE FOLLOWING. */
+/* ------------------------------------------------ */
+ enode = qxhead;
+ iq2 = 0;
+L1600:
+ if (enode <= 0) {
+ goto L2300;
+ }
+ if (dbakw[enode] != 0) {
+ goto L2200;
+ }
+ ++(*tag);
+ deg = deg0;
+/* --------------------------------- */
+/* FOR EACH UNMARKED NABOR OF ENODE, */
+/* DO THE FOLLOWING. */
+/* --------------------------------- */
+ istrt = xadj[enode];
+ istop = xadj[enode + 1] - 1;
+ i__1 = istop;
+ for (i = istrt; i <= i__1; ++i) {
+ nabor = adjncy[i];
+ if (nabor == 0) {
+ goto L2100;
+ }
+ if (marker[nabor] >= *tag) {
+ goto L2000;
+ }
+ marker[nabor] = *tag;
+ link = nabor;
+/* ------------------------------ */
+/* IF UNELIMINATED, INCLUDE IT IN */
+/* DEG COUNT. */
+/* ------------------------------ */
+ if (dforw[nabor] < 0) {
+ goto L1700;
+ }
+ deg += qsize[nabor];
+ goto L2000;
+L1700:
+/* -------------------------------
+*/
+/* IF ELIMINATED, INCLUDE UNMARKED
+*/
+/* NODES IN THIS ELEMENT INTO THE
+*/
+/* DEGREE COUNT. */
+/* -------------------------------
+*/
+ jstrt = xadj[link];
+ jstop = xadj[link + 1] - 1;
+ i__2 = jstop;
+ for (j = jstrt; j <= i__2; ++j) {
+ node = adjncy[j];
+ link = -node;
+ if (node < 0) {
+ goto L1700;
+ } else if (node == 0) {
+ goto L2000;
+ } else {
+ goto L1800;
+ }
+
+L1800:
+ if (marker[node] >= *tag) {
+ goto L1900;
+ }
+ marker[node] = *tag;
+ deg += qsize[node];
+L1900:
+ ;
+ }
+L2000:
+ ;
+ }
+L2100:
+/* ------------------------------------------- */
+/* UPDATE EXTERNAL DEGREE OF ENODE IN DEGREE */
+/* STRUCTURE, AND MDEG (MIN DEG) IF NECESSARY. */
+/* ------------------------------------------- */
+ deg = deg - qsize[enode] + 1;
+ fnode = dhead[deg];
+ dforw[enode] = fnode;
+ dbakw[enode] = -deg;
+ if (fnode > 0) {
+ dbakw[fnode] = enode;
+ }
+ dhead[deg] = enode;
+ if (deg < *mdeg) {
+ *mdeg = deg;
+ }
+L2200:
+/* ---------------------------------- */
+/* GET NEXT ENODE IN CURRENT ELEMENT. */
+/* ---------------------------------- */
+ enode = llist[enode];
+ if (iq2 == 1) {
+ goto L900;
+ }
+ goto L1600;
+L2300:
+/* ----------------------------- */
+/* GET NEXT ELEMENT IN THE LIST. */
+/* ----------------------------- */
+ *tag = mtag;
+ elmnt = llist[elmnt];
+ goto L100;
+
+} /* mmdupd_ */
+
+/* *************************************************************** */
+/* *************************************************************** */
+/* ***** MMDNUM ..... MULTI MINIMUM DEGREE NUMBERING ***** */
+/* *************************************************************** */
+/* *************************************************************** */
+
+/* AUTHOR - JOSEPH W.H. LIU */
+/* DEPT OF COMPUTER SCIENCE, YORK UNIVERSITY. */
+
+/* PURPOSE - THIS ROUTINE PERFORMS THE FINAL STEP IN */
+/* PRODUCING THE PERMUTATION AND INVERSE PERMUTATION */
+/* VECTORS IN THE MULTIPLE ELIMINATION VERSION OF THE */
+/* MINIMUM DEGREE ORDERING ALGORITHM. */
+
+/* INPUT PARAMETERS - */
+/* NEQNS - NUMBER OF EQUATIONS. */
+/* QSIZE - SIZE OF SUPERNODES AT ELIMINATION. */
+
+/* UPDATED PARAMETERS - */
+/* INVP - INVERSE PERMUTATION VECTOR. ON INPUT, */
+/* IF QSIZE(NODE)=0, THEN NODE HAS BEEN MERGED */
+/* INTO THE NODE -INVP(NODE); OTHERWISE, */
+/* -INVP(NODE) IS ITS INVERSE LABELLING. */
+
+/* OUTPUT PARAMETERS - */
+/* PERM - THE PERMUTATION VECTOR. */
+
+/* *************************************************************** */
+
+/* Subroutine */ int mmdnum_(int *neqns, shortint *perm, shortint *invp,
+ shortint *qsize)
+{
+ /* System generated locals */
+ int i__1;
+
+ /* Local variables */
+ static int node, root, nextf, father, nqsize, num;
+
+
+/* *************************************************************** */
+
+
+/* *************************************************************** */
+
+ /* Parameter adjustments */
+ --qsize;
+ --invp;
+ --perm;
+
+ /* Function Body */
+ i__1 = *neqns;
+ for (node = 1; node <= i__1; ++node) {
+ nqsize = qsize[node];
+ if (nqsize <= 0) {
+ perm[node] = invp[node];
+ }
+ if (nqsize > 0) {
+ perm[node] = -invp[node];
+ }
+/* L100: */
+ }
+/* ------------------------------------------------------ */
+/* FOR EACH NODE WHICH HAS BEEN MERGED, DO THE FOLLOWING. */
+/* ------------------------------------------------------ */
+ i__1 = *neqns;
+ for (node = 1; node <= i__1; ++node) {
+ if (perm[node] > 0) {
+ goto L500;
+ }
+/* ----------------------------------------- */
+/* TRACE THE MERGED TREE UNTIL ONE WHICH HAS */
+/* NOT BEEN MERGED, CALL IT ROOT. */
+/* ----------------------------------------- */
+ father = node;
+L200:
+ if (perm[father] > 0) {
+ goto L300;
+ }
+ father = -perm[father];
+ goto L200;
+L300:
+/* ----------------------- */
+/* NUMBER NODE AFTER ROOT. */
+/* ----------------------- */
+ root = father;
+ num = perm[root] + 1;
+ invp[node] = -num;
+ perm[root] = num;
+/* ------------------------ */
+/* SHORTEN THE MERGED TREE. */
+/* ------------------------ */
+ father = node;
+L400:
+ nextf = -perm[father];
+ if (nextf <= 0) {
+ goto L500;
+ }
+ perm[father] = -root;
+ father = nextf;
+ goto L400;
+L500:
+ ;
+ }
+/* ---------------------- */
+/* READY TO COMPUTE PERM. */
+/* ---------------------- */
+ i__1 = *neqns;
+ for (node = 1; node <= i__1; ++node) {
+ num = -invp[node];
+ invp[node] = num;
+ perm[num] = node;
+/* L600: */
+ }
+ return 0;
+
+} /* mmdnum_ */
+
diff --git a/SRC/relax_snode.c b/SRC/relax_snode.c
new file mode 100644
index 0000000..f2bc0e5
--- /dev/null
+++ b/SRC/relax_snode.c
@@ -0,0 +1,71 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "dsp_defs.h"
+
+void
+relax_snode (
+ const int n,
+ int *et, /* column elimination tree */
+ const int relax_columns, /* max no of columns allowed in a
+ relaxed snode */
+ int *descendants, /* no of descendants of each node
+ in the etree */
+ int *relax_end /* last column in a supernode */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * relax_snode() - Identify the initial relaxed supernodes, assuming that
+ * the matrix has been reordered according to the postorder of the etree.
+ *
+ */
+ register int j, parent;
+ register int snode_start; /* beginning of a snode */
+
+ ifill (relax_end, n, EMPTY);
+ for (j = 0; j < n; j++) descendants[j] = 0;
+
+ /* Compute the number of descendants of each node in the etree */
+ for (j = 0; j < n; j++) {
+ parent = et[j];
+ if ( parent != n ) /* not the dummy root */
+ descendants[parent] += descendants[j] + 1;
+ }
+
+ /* Identify the relaxed supernodes by postorder traversal of the etree. */
+ for (j = 0; j < n; ) {
+ parent = et[j];
+ snode_start = j;
+ while ( parent != n && descendants[parent] < relax_columns ) {
+ j = parent;
+ parent = et[j];
+ }
+ /* Found a supernode with j being the last column. */
+ relax_end[snode_start] = j; /* Last column is recorded */
+ j++;
+ /* Search for a new leaf */
+ while ( descendants[j] != 0 && j < n ) j++;
+ }
+
+ /*printf("No of relaxed snodes: %d; relaxed columns: %d\n",
+ nsuper, no_relaxed_col); */
+}
diff --git a/SRC/scolumn_bmod.c b/SRC/scolumn_bmod.c
new file mode 100644
index 0000000..1914626
--- /dev/null
+++ b/SRC/scolumn_bmod.c
@@ -0,0 +1,348 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "ssp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void susolve(int, int, float*, float*);
+void slsolve(int, int, float*, float*);
+void smatvec(int, int, int, float*, float*, float*);
+
+
+
+/* Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+scolumn_bmod (
+ const int jcol, /* in */
+ const int nseg, /* in */
+ float *dense, /* in */
+ float *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int fpanelc, /* in -- first column in the current panel */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose:
+ * ========
+ * Performs numeric block updates (sup-col) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ float alpha, beta;
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in supernode
+ * nsupr = no of rows in supernode (used as leading dimension)
+ * luptr = location of supernodal LU-block in storage
+ * kfnz = first nonz in the k-th supernodal segment
+ * no_zeros = no of leading zeros in a supernodal U-segment
+ */
+ float ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int fsupc, nsupc, nsupr, segsze;
+ int nrow; /* No of rows in the matrix of matrix-vector */
+ int jcolp1, jsupno, k, ksub, krep, krep_ind, ksupno;
+ register int lptr, kfnz, isub, irow, i;
+ register int no_zeros, new_next;
+ int ufirst, nextlu;
+ int fst_col; /* First column within small LU update */
+ int d_fsupc; /* Distance between the first column of the current
+ panel and the first column of the current snode. */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ float *lusup;
+ int *xlusup;
+ int nzlumax;
+ float *tempv1;
+ float zero = 0.0;
+ float one = 1.0;
+ float none = -1.0;
+ int mem_error;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ nzlumax = Glu->nzlumax;
+ jcolp1 = jcol + 1;
+ jsupno = supno[jcol];
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+
+ krep = segrep[k];
+ k--;
+ ksupno = supno[krep];
+ if ( jsupno != ksupno ) { /* Outside the rectangular supernode */
+
+ fsupc = xsup[ksupno];
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ /* Distance from the current supernode to the current panel;
+ d_fsupc=0 if fsupc > fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ luptr = xlusup[fst_col] + d_fsupc;
+ lptr = xlsub[fsupc] + d_fsupc;
+
+ kfnz = repfnz[krep];
+ kfnz = SUPERLU_MAX ( kfnz, fpanelc );
+
+ segsze = krep - kfnz + 1;
+ nsupc = krep - fst_col + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nrow = nsupr - d_fsupc - nsupc;
+ krep_ind = lptr + nsupc - 1;
+
+ ops[TRSV] += segsze * (segsze - 1);
+ ops[GEMV] += 2 * nrow * segsze;
+
+
+ /*
+ * Case 1: Update U-segment of size 1 -- col-col update
+ */
+ if ( segsze == 1 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ dense[irow] -= ukj*lusup[luptr];
+ luptr++;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) { /* Case 2: 2cols-col update */
+ ukj -= ukj1 * lusup[luptr1];
+ dense[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ dense[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] );
+ }
+ } else { /* Case 3: 3cols-col update */
+ ukj2 = dense[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ ukj1 -= ukj2 * lusup[luptr2-1];
+ ukj = ukj - ukj1*lusup[luptr1] - ukj2*lusup[luptr2];
+ dense[lsub[krep_ind]] = ukj;
+ dense[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ luptr2++;
+ dense[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] + ukj2*lusup[luptr2] );
+ }
+ }
+
+
+
+ } else {
+ /*
+ * Case: sup-col update
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense
+ */
+
+ no_zeros = kfnz - fst_col;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*] */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ tempv[i] = dense[irow];
+ ++isub;
+ }
+
+ /* Dense triangular solve -- start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ strsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ SGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ sgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ slsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ smatvec (nsupr, nrow , segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+
+ /* Scatter tempv[] into SPA dense[] as a temporary storage */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense[irow] = tempv[i];
+ tempv[i] = zero;
+ ++isub;
+ }
+
+ /* Scatter tempv1[] into SPA dense[] */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ dense[irow] -= tempv1[i];
+ tempv1[i] = zero;
+ ++isub;
+ }
+ }
+
+ } /* if jsupno ... */
+
+ } /* for each segment... */
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ nextlu = xlusup[jcol];
+ fsupc = xsup[jsupno];
+
+ /* Copy the SPA dense into L\U[*,j] */
+ new_next = nextlu + xlsub[fsupc+1] - xlsub[fsupc];
+ while ( new_next > nzlumax ) {
+ if (mem_error = sLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, Glu))
+ return (mem_error);
+ lusup = Glu->lusup;
+ lsub = Glu->lsub;
+ }
+
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = zero;
+ ++nextlu;
+ }
+
+ xlusup[jcolp1] = nextlu; /* Close L\U[*,jcol] */
+
+ /* For more updates within the panel (also within the current supernode),
+ * should start from the first column of the panel, or the first column
+ * of the supernode, whichever is bigger. There are 2 cases:
+ * 1) fsupc < fpanelc, then fst_col := fpanelc
+ * 2) fsupc >= fpanelc, then fst_col := fsupc
+ */
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ if ( fst_col < jcol ) {
+
+ /* Distance between the current supernode and the current panel.
+ d_fsupc=0 if fsupc >= fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ lptr = xlsub[fsupc] + d_fsupc;
+ luptr = xlusup[fst_col] + d_fsupc;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nsupc = jcol - fst_col; /* Excluding jcol */
+ nrow = nsupr - d_fsupc - nsupc;
+
+ /* Points to the beginning of jcol in snode L\U(jsupno) */
+ ufirst = xlusup[jcol] + d_fsupc;
+
+ ops[TRSV] += nsupc * (nsupc - 1);
+ ops[GEMV] += 2 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#else
+ strsv_( "L", "N", "U", &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#endif
+
+ alpha = none; beta = one; /* y := beta*y + alpha*A*x */
+
+#ifdef _CRAY
+ SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ sgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ slsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+
+ smatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], tempv );
+
+ /* Copy updates from tempv[*] into lusup[*] */
+ isub = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ lusup[isub] -= tempv[i];
+ tempv[i] = 0.0;
+ ++isub;
+ }
+
+#endif
+
+
+ } /* if fst_col < jcol ... */
+
+ return 0;
+}
diff --git a/SRC/scolumn_dfs.c b/SRC/scolumn_dfs.c
new file mode 100644
index 0000000..c29f260
--- /dev/null
+++ b/SRC/scolumn_dfs.c
@@ -0,0 +1,270 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+
+/* What type of supernodes we want */
+#define T2_SUPER
+
+int
+scolumn_dfs(
+ const int m, /* in - number of rows in the matrix */
+ const int jcol, /* in */
+ int *perm_r, /* in */
+ int *nseg, /* modified - with new segments appended */
+ int *lsub_col, /* in - defines the RHS vector to start the dfs */
+ int *segrep, /* modified - with new segments appended */
+ int *repfnz, /* modified */
+ int *xprune, /* modified */
+ int *marker, /* modified */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * "column_dfs" performs a symbolic factorization on column jcol, and
+ * decide the supernode boundary.
+ *
+ * This routine does not use numeric values, but only use the RHS
+ * row indices to start the dfs.
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives. The routine returns a list of such supernodal
+ * representatives in topological order of the dfs that generates them.
+ * The location of the first nonzero in each such supernodal segment
+ * (supernodal entry location) is also returned.
+ *
+ * Local parameters
+ * ================
+ * nseg: no of segments in current U[*,j]
+ * jsuper: jsuper=EMPTY if column j does not belong to the same
+ * supernode as j-1. Otherwise, jsuper=nsuper.
+ *
+ * marker2: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * > 0 number of bytes allocated when run out of space.
+ *
+ */
+ int jcolp1, jcolm1, jsuper, nsuper, nextl;
+ int k, krep, krow, kmark, kperm;
+ int *marker2; /* Used for small panel LU */
+ int fsupc; /* First column of a snode */
+ int myfnz; /* First nonz column of a U-segment */
+ int chperm, chmark, chrep, kchild;
+ int xdfs, maxdfs, kpar, oldrep;
+ int jptr, jm1ptr;
+ int ito, ifrom, istop; /* Used to compress row subscripts */
+ int mem_error;
+ int *xsup, *supno, *lsub, *xlsub;
+ int nzlmax;
+ static int first = 1, maxsuper;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ first = 0;
+ }
+ jcolp1 = jcol + 1;
+ jcolm1 = jcol - 1;
+ nsuper = supno[jcol];
+ jsuper = nsuper;
+ nextl = xlsub[jcol];
+ marker2 = &marker[2*m];
+
+
+ /* For each nonzero in A[*,jcol] do dfs */
+ for (k = 0; lsub_col[k] != EMPTY; k++) {
+
+ krow = lsub_col[k];
+ lsub_col[k] = EMPTY;
+ kmark = marker2[krow];
+
+ /* krow was visited before, go to the next nonz */
+ if ( kmark == jcol ) continue;
+
+ /* For each unmarked nbr krow of jcol
+ * krow is in L: place it in structure of L[*,jcol]
+ */
+ marker2[krow] = jcol;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ lsub[nextl++] = krow; /* krow is indexed into A */
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = sLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( kmark != jcolm1 ) jsuper = EMPTY;/* Row index subset testing */
+ } else {
+ /* krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz[krep];
+
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > kperm ) repfnz[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker2[kchild];
+
+ if ( chmark != jcol ) { /* Not reached yet */
+ marker2[kchild] = jcol;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,k] */
+ if ( chperm == EMPTY ) {
+ lsub[nextl++] = kchild;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error =
+ sLUMemXpand(jcol,nextl,LSUB,&nzlmax,Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( chmark != jcolm1 ) jsuper = EMPTY;
+ } else {
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz[chrep];
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz[chrep] = chperm;
+ } else {
+ /* Continue dfs at super-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L^t) */
+ parent[krep] = oldrep;
+ repfnz[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+ } /* else */
+
+ } /* else */
+
+ } /* if */
+
+ } /* while */
+
+ /* krow has no more unexplored nbrs;
+ * place supernode-rep krep in postorder DFS.
+ * backtrack dfs to its parent
+ */
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ kpar = parent[krep]; /* Pop from stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+ } while ( kpar != EMPTY ); /* Until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonzero ... */
+
+ /* Check to see if j belongs in the same supernode as j-1 */
+ if ( jcol == 0 ) { /* Do nothing for column 0 */
+ nsuper = supno[0] = 0;
+ } else {
+ fsupc = xsup[nsuper];
+ jptr = xlsub[jcol]; /* Not compressed yet */
+ jm1ptr = xlsub[jcolm1];
+
+#ifdef T2_SUPER
+ if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = EMPTY;
+#endif
+ /* Make sure the number of columns in a supernode doesn't
+ exceed threshold. */
+ if ( jcol - fsupc >= maxsuper ) jsuper = EMPTY;
+
+ /* If jcol starts a new supernode, reclaim storage space in
+ * lsub from the previous supernode. Note we only store
+ * the subscript set of the first and last columns of
+ * a supernode. (first for num values, last for pruning)
+ */
+ if ( jsuper == EMPTY ) { /* starts a new supernode */
+ if ( (fsupc < jcolm1-1) ) { /* >= 3 columns in nsuper */
+#ifdef CHK_COMPRESS
+ printf(" Compress lsub[] at super %d-%d\n", fsupc, jcolm1);
+#endif
+ ito = xlsub[fsupc+1];
+ xlsub[jcolm1] = ito;
+ istop = ito + jptr - jm1ptr;
+ xprune[jcolm1] = istop; /* Initialize xprune[jcol-1] */
+ xlsub[jcol] = istop;
+ for (ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)
+ lsub[ito] = lsub[ifrom];
+ nextl = ito; /* = istop + length(jcol) */
+ }
+ nsuper++;
+ supno[jcol] = nsuper;
+ } /* if a new supernode */
+
+ } /* else: jcol > 0 */
+
+ /* Tidy up the pointers before exit */
+ xsup[nsuper+1] = jcolp1;
+ supno[jcolp1] = nsuper;
+ xprune[jcol] = nextl; /* Initialize upper bound for pruning */
+ xlsub[jcolp1] = nextl;
+
+ return 0;
+}
diff --git a/SRC/scomplex.c b/SRC/scomplex.c
new file mode 100644
index 0000000..8cbbeea
--- /dev/null
+++ b/SRC/scomplex.c
@@ -0,0 +1,105 @@
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * This file defines common arithmetic operations for complex type.
+ */
+#include <math.h>
+#include <stdio.h>
+#include "scomplex.h"
+
+
+/* Complex Division c = a/b */
+void c_div(complex *c, complex *a, complex *b)
+{
+ float ratio, den;
+ float abr, abi, cr, ci;
+
+ if( (abr = b->r) < 0.)
+ abr = - abr;
+ if( (abi = b->i) < 0.)
+ abi = - abi;
+ if( abr <= abi ) {
+ if (abi == 0) {
+ fprintf(stderr, "z_div.c: division by zero");
+ exit (-1);
+ }
+ ratio = b->r / b->i ;
+ den = b->i * (1 + ratio*ratio);
+ cr = (a->r*ratio + a->i) / den;
+ ci = (a->i*ratio - a->r) / den;
+ } else {
+ ratio = b->i / b->r ;
+ den = b->r * (1 + ratio*ratio);
+ cr = (a->r + a->i*ratio) / den;
+ ci = (a->i - a->r*ratio) / den;
+ }
+ c->r = cr;
+ c->i = ci;
+}
+
+
+/* Returns sqrt(z.r^2 + z.i^2) */
+double c_abs(complex *z)
+{
+ float temp;
+ float real = z->r;
+ float imag = z->i;
+
+ if (real < 0) real = -real;
+ if (imag < 0) imag = -imag;
+ if (imag > real) {
+ temp = real;
+ real = imag;
+ imag = temp;
+ }
+ if ((real+imag) == real) return(real);
+
+ temp = imag/real;
+ temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/
+ return (temp);
+}
+
+
+/* Approximates the abs */
+/* Returns abs(z.r) + abs(z.i) */
+double c_abs1(complex *z)
+{
+ float real = z->r;
+ float imag = z->i;
+
+ if (real < 0) real = -real;
+ if (imag < 0) imag = -imag;
+
+ return (real + imag);
+}
+
+/* Return the exponentiation */
+void c_exp(complex *r, complex *z)
+{
+ float expx;
+
+ expx = exp(z->r);
+ r->r = expx * cos(z->i);
+ r->i = expx * sin(z->i);
+}
+
+/* Return the complex conjugate */
+void r_cnjg(complex *r, complex *z)
+{
+ r->r = z->r;
+ r->i = -z->i;
+}
+
+/* Return the imaginary part */
+double r_imag(complex *z)
+{
+ return (z->i);
+}
+
+
diff --git a/SRC/scomplex.h b/SRC/scomplex.h
new file mode 100644
index 0000000..d7d70f1
--- /dev/null
+++ b/SRC/scomplex.h
@@ -0,0 +1,72 @@
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#ifndef __SUPERLU_SCOMPLEX /* allow multiple inclusions */
+#define __SUPERLU_SCOMPLEX
+
+/*
+ * This header file is to be included in source files c*.c
+ */
+#ifndef SCOMPLEX_INCLUDE
+#define SCOMPLEX_INCLUDE
+
+typedef struct { float r, i; } complex;
+
+
+/* Macro definitions */
+
+/* Complex Addition c = a + b */
+#define c_add(c, a, b) { (c)->r = (a)->r + (b)->r; \
+ (c)->i = (a)->i + (b)->i; }
+
+/* Complex Subtraction c = a - b */
+#define c_sub(c, a, b) { (c)->r = (a)->r - (b)->r; \
+ (c)->i = (a)->i - (b)->i; }
+
+/* Complex-Double Multiplication */
+#define cs_mult(c, a, b) { (c)->r = (a)->r * (b); \
+ (c)->i = (a)->i * (b); }
+
+/* Complex-Complex Multiplication */
+#define cc_mult(c, a, b) { \
+ float cr, ci; \
+ cr = (a)->r * (b)->r - (a)->i * (b)->i; \
+ ci = (a)->i * (b)->r + (a)->r * (b)->i; \
+ (c)->r = cr; \
+ (c)->i = ci; \
+ }
+
+#define cc_conj(a, b) { \
+ (a)->r = (b)->r; \
+ (a)->i = -((b)->i); \
+ }
+
+/* Complex equality testing */
+#define c_eq(a, b) ( (a)->r == (b)->r && (a)->i == (b)->i )
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Prototypes for functions in scomplex.c */
+void c_div(complex *, complex *, complex *);
+double c_abs(complex *); /* exact */
+double c_abs1(complex *); /* approximate */
+void c_exp(complex *, complex *);
+void r_cnjg(complex *, complex *);
+double r_imag(complex *);
+
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif
+
+#endif /* __SUPERLU_SCOMPLEX */
diff --git a/SRC/scopy_to_ucol.c b/SRC/scopy_to_ucol.c
new file mode 100644
index 0000000..99de989
--- /dev/null
+++ b/SRC/scopy_to_ucol.c
@@ -0,0 +1,105 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+#include "util.h"
+
+int
+scopy_to_ucol(
+ int jcol, /* in */
+ int nseg, /* in */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int *perm_r, /* in */
+ float *dense, /* modified - reset to zero on return */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Gather from SPA dense[*] to global ucol[*].
+ */
+ int ksub, krep, ksupno;
+ int i, k, kfnz, segsze;
+ int fsupc, isub, irow;
+ int jsupno, nextu;
+ int new_next, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ float *ucol;
+ int *usub, *xusub;
+ int nzumax;
+
+ float zero = 0.0;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+ nzumax = Glu->nzumax;
+
+ jsupno = supno[jcol];
+ nextu = xusub[jcol];
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+ krep = segrep[k--];
+ ksupno = supno[krep];
+
+ if ( ksupno != jsupno ) { /* Should go into ucol[] */
+ kfnz = repfnz[krep];
+ if ( kfnz != EMPTY ) { /* Nonzero U-segment */
+
+ fsupc = xsup[ksupno];
+ isub = xlsub[fsupc] + kfnz - fsupc;
+ segsze = krep - kfnz + 1;
+
+ new_next = nextu + segsze;
+ while ( new_next > nzumax ) {
+ if (mem_error = sLUMemXpand(jcol, nextu, UCOL, &nzumax, Glu))
+ return (mem_error);
+ ucol = Glu->ucol;
+ if (mem_error = sLUMemXpand(jcol, nextu, USUB, &nzumax, Glu))
+ return (mem_error);
+ usub = Glu->usub;
+ lsub = Glu->lsub;
+ }
+
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ usub[nextu] = perm_r[irow];
+ ucol[nextu] = dense[irow];
+ dense[irow] = zero;
+ nextu++;
+ isub++;
+ }
+
+ }
+
+ }
+
+ } /* for each segment... */
+
+ xusub[jcol + 1] = nextu; /* Close U[*,jcol] */
+ return 0;
+}
diff --git a/SRC/scsum1.c b/SRC/scsum1.c
new file mode 100644
index 0000000..963ba21
--- /dev/null
+++ b/SRC/scsum1.c
@@ -0,0 +1,95 @@
+#include "scomplex.h"
+
+double scsum1_(int *n, complex *cx, int *incx)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SCSUM1 takes the sum of the absolute values of a complex
+ vector and returns a single precision result.
+
+ Based on SCASUM from the Level 1 BLAS.
+ The change is to use the 'genuine' absolute value.
+
+ Contributed by Nick Higham for use with CLACON.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of elements in the vector CX.
+
+ CX (input) COMPLEX array, dimension (N)
+ The vector whose elements will be summed.
+
+ INCX (input) INT
+ The spacing between successive values of CX. INCX > 0.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ int i__1, i__2;
+ float ret_val;
+ /* Builtin functions */
+ double c_abs(complex *);
+ /* Local variables */
+ static int i, nincx;
+ static float stemp;
+
+
+#define CX(I) cx[(I)-1]
+
+
+ ret_val = 0.f;
+ stemp = 0.f;
+ if (*n <= 0) {
+ return ret_val;
+ }
+ if (*incx == 1) {
+ goto L20;
+ }
+
+/* CODE FOR INCREMENT NOT EQUAL TO 1 */
+
+ nincx = *n * *incx;
+ i__1 = nincx;
+ i__2 = *incx;
+ for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
+
+/* NEXT LINE MODIFIED. */
+
+ stemp += c_abs(&CX(i));
+/* L10: */
+ }
+ ret_val = stemp;
+ return ret_val;
+
+/* CODE FOR INCREMENT EQUAL TO 1 */
+
+L20:
+ i__2 = *n;
+ for (i = 1; i <= *n; ++i) {
+
+/* NEXT LINE MODIFIED. */
+
+ stemp += c_abs(&CX(i));
+/* L30: */
+ }
+ ret_val = stemp;
+ return ret_val;
+
+/* End of SCSUM1 */
+
+} /* scsum1_ */
+
diff --git a/SRC/sgscon.c b/SRC/sgscon.c
new file mode 100644
index 0000000..f000021
--- /dev/null
+++ b/SRC/sgscon.c
@@ -0,0 +1,146 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: sgscon.c
+ * History: Modified from lapack routines SGECON.
+ */
+#include <math.h>
+#include "ssp_defs.h"
+
+void
+sgscon(char *norm, SuperMatrix *L, SuperMatrix *U,
+ float anorm, float *rcond, SuperLUStat_t *stat, int *info)
+{
+/*
+ Purpose
+ =======
+
+ SGSCON estimates the reciprocal of the condition number of a general
+ real matrix A, in either the 1-norm or the infinity-norm, using
+ the LU factorization computed by SGETRF.
+
+ An estimate is obtained for norm(inv(A)), and the reciprocal of the
+ condition number is computed as
+ RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ NORM (input) char*
+ Specifies whether the 1-norm condition number or the
+ infinity-norm condition number is required:
+ = '1' or 'O': 1-norm;
+ = 'I': Infinity-norm.
+
+ L (input) SuperMatrix*
+ The factor L from the factorization Pr*A*Pc=L*U as computed by
+ sgstrf(). Use compressed row subscripts storage for supernodes,
+ i.e., L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+
+ U (input) SuperMatrix*
+ The factor U from the factorization Pr*A*Pc=L*U as computed by
+ sgstrf(). Use column-wise storage scheme, i.e., U has types:
+ Stype = SLU_NC, Dtype = SLU_S, Mtype = TRU.
+
+ ANORM (input) float
+ If NORM = '1' or 'O', the 1-norm of the original matrix A.
+ If NORM = 'I', the infinity-norm of the original matrix A.
+
+ RCOND (output) float*
+ The reciprocal of the condition number of the matrix A,
+ computed as RCOND = 1/(norm(A) * norm(inv(A))).
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ int kase, kase1, onenrm, i;
+ float ainvnm;
+ float *work;
+ int *iwork;
+ extern int srscl_(int *, float *, float *, int *);
+
+ extern int slacon_(int *, float *, float *, int *, float *, int *);
+
+
+ /* Test the input parameters. */
+ *info = 0;
+ onenrm = *(unsigned char *)norm == '1' || lsame_(norm, "O");
+ if (! onenrm && ! lsame_(norm, "I")) *info = -1;
+ else if (L->nrow < 0 || L->nrow != L->ncol ||
+ L->Stype != SLU_SC || L->Dtype != SLU_S || L->Mtype != SLU_TRLU)
+ *info = -2;
+ else if (U->nrow < 0 || U->nrow != U->ncol ||
+ U->Stype != SLU_NC || U->Dtype != SLU_S || U->Mtype != SLU_TRU)
+ *info = -3;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("sgscon", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ *rcond = 0.;
+ if ( L->nrow == 0 || U->nrow == 0) {
+ *rcond = 1.;
+ return;
+ }
+
+ work = floatCalloc( 3*L->nrow );
+ iwork = intMalloc( L->nrow );
+
+
+ if ( !work || !iwork )
+ ABORT("Malloc fails for work arrays in sgscon.");
+
+ /* Estimate the norm of inv(A). */
+ ainvnm = 0.;
+ if ( onenrm ) kase1 = 1;
+ else kase1 = 2;
+ kase = 0;
+
+ do {
+ slacon_(&L->nrow, &work[L->nrow], &work[0], &iwork[0], &ainvnm, &kase);
+
+ if (kase == 0) break;
+
+ if (kase == kase1) {
+ /* Multiply by inv(L). */
+ sp_strsv("L", "No trans", "Unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(U). */
+ sp_strsv("U", "No trans", "Non-unit", L, U, &work[0], stat, info);
+
+ } else {
+
+ /* Multiply by inv(U'). */
+ sp_strsv("U", "Transpose", "Non-unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_strsv("L", "Transpose", "Unit", L, U, &work[0], stat, info);
+
+ }
+
+ } while ( kase != 0 );
+
+ /* Compute the estimate of the reciprocal condition number. */
+ if (ainvnm != 0.) *rcond = (1. / ainvnm) / anorm;
+
+ SUPERLU_FREE (work);
+ SUPERLU_FREE (iwork);
+ return;
+
+} /* sgscon */
+
diff --git a/SRC/sgsequ.c b/SRC/sgsequ.c
new file mode 100644
index 0000000..47408b7
--- /dev/null
+++ b/SRC/sgsequ.c
@@ -0,0 +1,186 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: sgsequ.c
+ * History: Modified from LAPACK routine SGEEQU
+ */
+#include <math.h>
+#include "ssp_defs.h"
+#include "util.h"
+
+void
+sgsequ(SuperMatrix *A, float *r, float *c, float *rowcnd,
+ float *colcnd, float *amax, int *info)
+{
+/*
+ Purpose
+ =======
+
+ SGSEQU computes row and column scalings intended to equilibrate an
+ M-by-N sparse matrix A and reduce its condition number. R returns the row
+ scale factors and C the column scale factors, chosen to try to make
+ the largest element in each row and column of the matrix B with
+ elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+
+ R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+ number and BIGNUM = largest safe number. Use of these scaling
+ factors is not guaranteed to reduce the condition number of A but
+ works well in practice.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input) SuperMatrix*
+ The matrix of dimension (A->nrow, A->ncol) whose equilibration
+ factors are to be computed. The type of A can be:
+ Stype = SLU_NC; Dtype = SLU_S; Mtype = SLU_GE.
+
+ R (output) float*, size A->nrow
+ If INFO = 0 or INFO > M, R contains the row scale factors
+ for A.
+
+ C (output) float*, size A->ncol
+ If INFO = 0, C contains the column scale factors for A.
+
+ ROWCND (output) float*
+ If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+ smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+ AMAX is neither too large nor too small, it is not worth
+ scaling by R.
+
+ COLCND (output) float*
+ If INFO = 0, COLCND contains the ratio of the smallest
+ C(i) to the largest C(i). If COLCND >= 0.1, it is not
+ worth scaling by C.
+
+ AMAX (output) float*
+ Absolute value of largest matrix element. If AMAX is very
+ close to overflow or very close to underflow, the matrix
+ should be scaled.
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+ > 0: if INFO = i, and i is
+ <= A->nrow: the i-th row of A is exactly zero
+ > A->ncol: the (i-M)-th column of A is exactly zero
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ float *Aval;
+ int i, j, irow;
+ float rcmin, rcmax;
+ float bignum, smlnum;
+ extern double slamch_(char *);
+
+ /* Test the input parameters. */
+ *info = 0;
+ if ( A->nrow < 0 || A->ncol < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_S || A->Mtype != SLU_GE )
+ *info = -1;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("sgsequ", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || A->ncol == 0 ) {
+ *rowcnd = 1.;
+ *colcnd = 1.;
+ *amax = 0.;
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Get machine constants. */
+ smlnum = slamch_("S");
+ bignum = 1. / smlnum;
+
+ /* Compute row scale factors. */
+ for (i = 0; i < A->nrow; ++i) r[i] = 0.;
+
+ /* Find the maximum element in each row. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ r[irow] = SUPERLU_MAX( r[irow], fabs(Aval[i]) );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ rcmax = SUPERLU_MAX(rcmax, r[i]);
+ rcmin = SUPERLU_MIN(rcmin, r[i]);
+ }
+ *amax = rcmax;
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (i = 0; i < A->nrow; ++i)
+ if (r[i] == 0.) {
+ *info = i + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (i = 0; i < A->nrow; ++i)
+ r[i] = 1. / SUPERLU_MIN( SUPERLU_MAX( r[i], smlnum ), bignum );
+ /* Compute ROWCND = min(R(I)) / max(R(I)) */
+ *rowcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ /* Compute column scale factors */
+ for (j = 0; j < A->ncol; ++j) c[j] = 0.;
+
+ /* Find the maximum element in each column, assuming the row
+ scalings computed above. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ c[j] = SUPERLU_MAX( c[j], fabs(Aval[i]) * r[irow] );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ rcmax = SUPERLU_MAX(rcmax, c[j]);
+ rcmin = SUPERLU_MIN(rcmin, c[j]);
+ }
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (j = 0; j < A->ncol; ++j)
+ if ( c[j] == 0. ) {
+ *info = A->nrow + j + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (j = 0; j < A->ncol; ++j)
+ c[j] = 1. / SUPERLU_MIN( SUPERLU_MAX( c[j], smlnum ), bignum);
+ /* Compute COLCND = min(C(J)) / max(C(J)) */
+ *colcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ return;
+
+} /* sgsequ */
+
+
diff --git a/SRC/sgsrfs.c b/SRC/sgsrfs.c
new file mode 100644
index 0000000..42c2d98
--- /dev/null
+++ b/SRC/sgsrfs.c
@@ -0,0 +1,437 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: sgsrfs.c
+ * History: Modified from lapack routine SGERFS
+ */
+#include <math.h>
+#include "ssp_defs.h"
+
+void
+sgsrfs(trans_t trans, SuperMatrix *A, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, char *equed, float *R, float *C,
+ SuperMatrix *B, SuperMatrix *X, float *ferr, float *berr,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SGSRFS improves the computed solution to a system of linear
+ * equations and provides error bounds and backward error estimates for
+ * the solution.
+ *
+ * If equilibration was performed, the system becomes:
+ * (diag(R)*A_original*diag(C)) * X = diag(R)*B_original.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * A (input) SuperMatrix*
+ * The original matrix A in the system, or the scaled A if
+ * equilibration was done. The type of A can be:
+ * Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_GE.
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * sgstrf(). Use column-wise storage scheme,
+ * i.e., U has types: Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (A->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * equed (input) Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by
+ * diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ *
+ * R (input) float*, dimension (A->nrow)
+ * The row scale factors for A.
+ * If equed = 'R' or 'B', A is premultiplied by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ *
+ * C (input) float*, dimension (A->ncol)
+ * The column scale factors for A.
+ * If equed = 'C' or 'B', A is postmultiplied by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ *
+ * B (input) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * The right hand side matrix B.
+ * if equed = 'R' or 'B', B is premultiplied by diag(R).
+ *
+ * X (input/output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * On entry, the solution matrix X, as computed by sgstrs().
+ * On exit, the improved solution matrix X.
+ * if *equed = 'C' or 'B', X should be premultiplied by diag(C)
+ * in order to obtain the solution to the original system.
+ *
+ * FERR (output) float*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ *
+ * BERR (output) float*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ *
+ * Internal Parameters
+ * ===================
+ *
+ * ITMAX is the maximum number of steps of iterative refinement.
+ *
+ */
+
+#define ITMAX 5
+
+ /* Table of constant values */
+ int ione = 1;
+ float ndone = -1.;
+ float done = 1.;
+
+ /* Local variables */
+ NCformat *Astore;
+ float *Aval;
+ SuperMatrix Bjcol;
+ DNformat *Bstore, *Xstore, *Bjcol_store;
+ float *Bmat, *Xmat, *Bptr, *Xptr;
+ int kase;
+ float safe1, safe2;
+ int i, j, k, irow, nz, count, notran, rowequ, colequ;
+ int ldb, ldx, nrhs;
+ float s, xk, lstres, eps, safmin;
+ char transc[1];
+ trans_t transt;
+ float *work;
+ float *rwork;
+ int *iwork;
+ extern double slamch_(char *);
+ extern int slacon_(int *, float *, float *, int *, float *, int *);
+#ifdef _CRAY
+ extern int SCOPY(int *, float *, int *, float *, int *);
+ extern int SSAXPY(int *, float *, float *, int *, float *, int *);
+#else
+ extern int scopy_(int *, float *, int *, float *, int *);
+ extern int saxpy_(int *, float *, float *, int *, float *, int *);
+#endif
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ /* Test the input parameters */
+ *info = 0;
+ notran = (trans == NOTRANS);
+ if ( !notran && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_S || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_S || L->Mtype != SLU_TRLU )
+ *info = -3;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_S || U->Mtype != SLU_TRU )
+ *info = -4;
+ else if ( ldb < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_S || B->Mtype != SLU_GE )
+ *info = -10;
+ else if ( ldx < SUPERLU_MAX(0, A->nrow) ||
+ X->Stype != SLU_DN || X->Dtype != SLU_S || X->Mtype != SLU_GE )
+ *info = -11;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("sgsrfs", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || nrhs == 0) {
+ for (j = 0; j < nrhs; ++j) {
+ ferr[j] = 0.;
+ berr[j] = 0.;
+ }
+ return;
+ }
+
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+
+ /* Allocate working space */
+ work = floatMalloc(2*A->nrow);
+ rwork = (float *) SUPERLU_MALLOC( A->nrow * sizeof(float) );
+ iwork = intMalloc(2*A->nrow);
+ if ( !work || !rwork || !iwork )
+ ABORT("Malloc fails for work/rwork/iwork.");
+
+ if ( notran ) {
+ *(unsigned char *)transc = 'N';
+ transt = TRANS;
+ } else {
+ *(unsigned char *)transc = 'T';
+ transt = NOTRANS;
+ }
+
+ /* NZ = maximum number of nonzero elements in each row of A, plus 1 */
+ nz = A->ncol + 1;
+ eps = slamch_("Epsilon");
+ safmin = slamch_("Safe minimum");
+ safe1 = nz * safmin;
+ safe2 = safe1 / eps;
+
+ /* Compute the number of nonzeros in each row (or column) of A */
+ for (i = 0; i < A->nrow; ++i) iwork[i] = 0;
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k)
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ ++iwork[Astore->rowind[i]];
+ } else {
+ for (k = 0; k < A->ncol; ++k)
+ iwork[k] = Astore->colptr[k+1] - Astore->colptr[k];
+ }
+
+ /* Copy one column of RHS B into Bjcol. */
+ Bjcol.Stype = B->Stype;
+ Bjcol.Dtype = B->Dtype;
+ Bjcol.Mtype = B->Mtype;
+ Bjcol.nrow = B->nrow;
+ Bjcol.ncol = 1;
+ Bjcol.Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !Bjcol.Store ) ABORT("SUPERLU_MALLOC fails for Bjcol.Store");
+ Bjcol_store = Bjcol.Store;
+ Bjcol_store->lda = ldb;
+ Bjcol_store->nzval = work; /* address aliasing */
+
+ /* Do for each right hand side ... */
+ for (j = 0; j < nrhs; ++j) {
+ count = 0;
+ lstres = 3.;
+ Bptr = &Bmat[j*ldb];
+ Xptr = &Xmat[j*ldx];
+
+ while (1) { /* Loop until stopping criterion is satisfied. */
+
+ /* Compute residual R = B - op(A) * X,
+ where op(A) = A, A**T, or A**H, depending on TRANS. */
+
+#ifdef _CRAY
+ SCOPY(&A->nrow, Bptr, &ione, work, &ione);
+#else
+ scopy_(&A->nrow, Bptr, &ione, work, &ione);
+#endif
+ sp_sgemv(transc, ndone, A, Xptr, ione, done, work, ione);
+
+ /* Compute componentwise relative backward error from formula
+ max(i) ( abs(R(i)) / ( abs(op(A))*abs(X) + abs(B) )(i) )
+ where abs(Z) is the componentwise absolute value of the matrix
+ or vector Z. If the i-th component of the denominator is less
+ than SAFE2, then SAFE1 is added to the i-th component of the
+ numerator and denominator before dividing. */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = fabs( Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if (notran) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = fabs( Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += fabs(Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ s += fabs(Aval[i]) * fabs(Xptr[irow]);
+ }
+ rwork[k] += s;
+ }
+ }
+ s = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ if (rwork[i] > safe2)
+ s = SUPERLU_MAX( s, fabs(work[i]) / rwork[i] );
+ else
+ s = SUPERLU_MAX( s, (fabs(work[i]) + safe1) /
+ (rwork[i] + safe1) );
+ }
+ berr[j] = s;
+
+ /* Test stopping criterion. Continue iterating if
+ 1) The residual BERR(J) is larger than machine epsilon, and
+ 2) BERR(J) decreased by at least a factor of 2 during the
+ last iteration, and
+ 3) At most ITMAX iterations tried. */
+
+ if (berr[j] > eps && berr[j] * 2. <= lstres && count < ITMAX) {
+ /* Update solution and try again. */
+ sgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+#ifdef _CRAY
+ SAXPY(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#else
+ saxpy_(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#endif
+ lstres = berr[j];
+ ++count;
+ } else {
+ break;
+ }
+
+ } /* end while */
+
+ stat->RefineSteps = count;
+
+ /* Bound error from formula:
+ norm(X - XTRUE) / norm(X) .le. FERR = norm( abs(inv(op(A)))*
+ ( abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) / norm(X)
+ where
+ norm(Z) is the magnitude of the largest component of Z
+ inv(op(A)) is the inverse of op(A)
+ abs(Z) is the componentwise absolute value of the matrix or
+ vector Z
+ NZ is the maximum number of nonzeros in any row of A, plus 1
+ EPS is machine epsilon
+
+ The i-th component of abs(R)+NZ*EPS*(abs(op(A))*abs(X)+abs(B))
+ is incremented by SAFE1 if the i-th component of
+ abs(op(A))*abs(X) + abs(B) is less than SAFE2.
+
+ Use SLACON to estimate the infinity-norm of the matrix
+ inv(op(A)) * diag(W),
+ where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = fabs( Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = fabs( Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += fabs(Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ xk = fabs( Xptr[irow] );
+ s += fabs(Aval[i]) * xk;
+ }
+ rwork[k] += s;
+ }
+ }
+
+ for (i = 0; i < A->nrow; ++i)
+ if (rwork[i] > safe2)
+ rwork[i] = fabs(work[i]) + (iwork[i]+1)*eps*rwork[i];
+ else
+ rwork[i] = fabs(work[i])+(iwork[i]+1)*eps*rwork[i]+safe1;
+
+ kase = 0;
+
+ do {
+ slacon_(&A->nrow, &work[A->nrow], work,
+ &iwork[A->nrow], &ferr[j], &kase);
+ if (kase == 0) break;
+
+ if (kase == 1) {
+ /* Multiply by diag(W)*inv(op(A)**T)*(diag(C) or diag(R)). */
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) work[i] *= C[i];
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->nrow; ++i) work[i] *= R[i];
+
+ sgstrs (transt, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ for (i = 0; i < A->nrow; ++i) work[i] *= rwork[i];
+ } else {
+ /* Multiply by (diag(C) or diag(R))*inv(op(A))*diag(W). */
+ for (i = 0; i < A->nrow; ++i) work[i] *= rwork[i];
+
+ sgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) work[i] *= C[i];
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->ncol; ++i) work[i] *= R[i];
+ }
+
+ } while ( kase != 0 );
+
+
+ /* Normalize error. */
+ lstres = 0.;
+ if ( notran && colequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, C[i] * fabs( Xptr[i]) );
+ } else if ( !notran && rowequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, R[i] * fabs( Xptr[i]) );
+ } else {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, fabs( Xptr[i]) );
+ }
+ if ( lstres != 0. )
+ ferr[j] /= lstres;
+
+ } /* for each RHS j ... */
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(rwork);
+ SUPERLU_FREE(iwork);
+ SUPERLU_FREE(Bjcol.Store);
+
+ return;
+
+} /* sgsrfs */
diff --git a/SRC/sgssv.c b/SRC/sgssv.c
new file mode 100644
index 0000000..703f1bc
--- /dev/null
+++ b/SRC/sgssv.c
@@ -0,0 +1,222 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+void
+sgssv(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ SuperMatrix *L, SuperMatrix *U, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SGSSV solves the system of linear equations A*X=B, using the
+ * LU factorization from SGSTRF. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. Permute the columns of A, forming A*Pc, where Pc
+ * is a permutation matrix. For more details of this step,
+ * see sp_preorder.c.
+ *
+ * 1.2. Factor A as Pr*A*Pc=L*U with the permutation Pr determined
+ * by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 1.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the
+ * above algorithm to the transpose of A:
+ *
+ * 2.1. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.2. Factor A as Pr*transpose(A)*Pc=L*U with the permutation Pr
+ * determined by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 2.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR; Dtype = SLU_S; Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, column permutation vector of size A->ncol
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * If options->ColPerm = MY_PERMC or options->Fact = SamePattern or
+ * options->Fact = SamePattern_SameRowPerm, it is an input argument.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ * Otherwise, it is an output argument.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->RowPerm = MY_PERMR or
+ * options->Fact = SamePattern_SameRowPerm, perm_r is an
+ * input argument.
+ * otherwise it is an output argument.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * so the solution could not be computed.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+ DNformat *Bstore;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int lwork = 0, *etree, i;
+
+ /* Set default values for some parameters */
+ float drop_tol = 0.;
+ int panel_size; /* panel size */
+ int relax; /* no of columns in a relaxed snodes */
+ int permc_spec;
+ trans_t trans = NOTRANS;
+ double *utime;
+ double t; /* Temporary time */
+
+ /* Test the input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ if ( options->Fact != DOFACT ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_S || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_S || B->Mtype != SLU_GE )
+ *info = -7;
+ if ( *info != 0 ) {
+ i = -(*info);
+ xerbla_("sgssv", &i);
+ return;
+ }
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ sCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ trans = TRANS;
+ } else {
+ if ( A->Stype == SLU_NC ) AA = A;
+ }
+
+ t = SuperLU_timer_();
+ /*
+ * Get column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t;
+
+ etree = intMalloc(A->ncol);
+
+ t = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t;
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+
+ /*printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));*/
+ t = SuperLU_timer_();
+ /* Compute the LU factorization of A. */
+ sgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, NULL, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t;
+
+ t = SuperLU_timer_();
+ if ( *info == 0 ) {
+ /* Solve the system A*X=B, overwriting B with X. */
+ sgstrs (trans, L, U, perm_c, perm_r, B, stat, info);
+ }
+ utime[SOLVE] = SuperLU_timer_() - t;
+
+ SUPERLU_FREE (etree);
+ Destroy_CompCol_Permuted(&AC);
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/sgssvx.c b/SRC/sgssvx.c
new file mode 100644
index 0000000..7658789
--- /dev/null
+++ b/SRC/sgssvx.c
@@ -0,0 +1,614 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+void
+sgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ int *etree, char *equed, float *R, float *C,
+ SuperMatrix *L, SuperMatrix *U, void *work, int lwork,
+ SuperMatrix *B, SuperMatrix *X, float *recip_pivot_growth,
+ float *rcond, float *ferr, float *berr,
+ mem_usage_t *mem_usage, SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SGSSVX solves the system of linear equations A*X=B or A'*X=B, using
+ * the LU factorization from sgstrf(). Error bounds on the solution and
+ * a condition estimate are also provided. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A is
+ * overwritten by diag(R)*A*diag(C) and B by diag(R)*B
+ * (if options->Trans=NOTRANS) or diag(C)*B (if options->Trans
+ * = TRANS or CONJ).
+ *
+ * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation
+ * matrix that usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 1.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the matrix A (after equilibration if options->Equil = YES)
+ * as Pr*A*Pc = L*U, with Pr determined by partial pivoting.
+ *
+ * 1.4. Compute the reciprocal pivot growth factor.
+ *
+ * 1.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form of
+ * A is used to estimate the condition number of the matrix A. If
+ * the reciprocal of the condition number is less than machine
+ * precision, info = A->ncol+1 is returned as a warning, but the
+ * routine still goes on to solve for X and computes error bounds
+ * as described below.
+ *
+ * 1.6. The system of equations is solved for X using the factored form
+ * of A.
+ *
+ * 1.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 1.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the above algorithm
+ * to the transpose of A:
+ *
+ * 2.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A' is
+ * overwritten by diag(R)*A'*diag(C) and B by diag(R)*B
+ * (if trans='N') or diag(C)*B (if trans = 'T' or 'C').
+ *
+ * 2.2. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix that
+ * usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the transpose(A) (after equilibration if
+ * options->Fact = YES) as Pr*transpose(A)*Pc = L*U with the
+ * permutation Pr determined by partial pivoting.
+ *
+ * 2.4. Compute the reciprocal pivot growth factor.
+ *
+ * 2.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form
+ * of transpose(A) is used to estimate the condition number of the
+ * matrix A. If the reciprocal of the condition number
+ * is less than machine precision, info = A->nrow+1 is returned as
+ * a warning, but the routine still goes on to solve for X and
+ * computes error bounds as described below.
+ *
+ * 2.6. The system of equations is solved for X using the factored form
+ * of transpose(A).
+ *
+ * 2.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 2.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input/output) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of the linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR, Dtype = SLU_D, Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * On entry, If options->Fact = FACTORED and equed is not 'N',
+ * then A must have been equilibrated by the scaling factors in
+ * R and/or C.
+ * On exit, A is not modified if options->Equil = NO, or if
+ * options->Equil = YES but equed = 'N' on exit.
+ * Otherwise, if options->Equil = YES and equed is not 'N',
+ * A is scaled as follows:
+ * If A->Stype = SLU_NC:
+ * equed = 'R': A := diag(R) * A
+ * equed = 'C': A := A * diag(C)
+ * equed = 'B': A := diag(R) * A * diag(C).
+ * If A->Stype = SLU_NR:
+ * equed = 'R': transpose(A) := diag(R) * transpose(A)
+ * equed = 'C': transpose(A) := transpose(A) * diag(C)
+ * equed = 'B': transpose(A) := diag(R) * transpose(A) * diag(C).
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, Column permutation vector of size A->ncol,
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ *
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow,
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ *
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by a
+ * new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument.
+ *
+ * etree (input/output) int*, dimension (A->ncol)
+ * Elimination tree of Pc'*A'*A*Pc.
+ * If options->Fact != FACTORED and options->Fact != DOFACT,
+ * etree is an input argument, otherwise it is an output argument.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ *
+ * equed (input/output) char*
+ * Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ * If options->Fact = FACTORED, equed is an input argument,
+ * otherwise it is an output argument.
+ *
+ * R (input/output) float*, dimension (A->nrow)
+ * The row scale factors for A or transpose(A).
+ * If equed = 'R' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the left by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ * If options->Fact = FACTORED, R is an input argument,
+ * otherwise, R is output.
+ * If options->zFact = FACTORED and equed = 'R' or 'B', each element
+ * of R must be positive.
+ *
+ * C (input/output) float*, dimension (A->ncol)
+ * The column scale factors for A or transpose(A).
+ * If equed = 'C' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the right by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ * If options->Fact = FACTORED, C is an input argument,
+ * otherwise, C is output.
+ * If options->Fact = FACTORED and equed = 'C' or 'B', each element
+ * of C must be positive.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype SLU_= NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.
+ *
+ * work (workspace/output) void*, size (lwork) (in bytes)
+ * User supplied workspace, should be large enough
+ * to hold data structures for factors L and U.
+ * On exit, if fact is not 'F', L and U point to this array.
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * mem_usage->total_needed; no other side effects.
+ *
+ * See argument 'mem_usage' for memory usage statistics.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * If B->ncol = 0, only LU decomposition is performed, the triangular
+ * solve is skipped.
+ * On exit,
+ * if equed = 'N', B is not modified; otherwise
+ * if A->Stype = SLU_NC:
+ * if options->Trans = NOTRANS and equed = 'R' or 'B',
+ * B is overwritten by diag(R)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'C' of 'B',
+ * B is overwritten by diag(C)*B;
+ * if A->Stype = SLU_NR:
+ * if options->Trans = NOTRANS and equed = 'C' or 'B',
+ * B is overwritten by diag(C)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'R' of 'B',
+ * B is overwritten by diag(R)*B.
+ *
+ * X (output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * If info = 0 or info = A->ncol+1, X contains the solution matrix
+ * to the original system of equations. Note that A and B are modified
+ * on exit if equed is not 'N', and the solution to the equilibrated
+ * system is inv(diag(C))*X if options->Trans = NOTRANS and
+ * equed = 'C' or 'B', or inv(diag(R))*X if options->Trans = 'T' or 'C'
+ * and equed = 'R' or 'B'.
+ *
+ * recip_pivot_growth (output) float*
+ * The reciprocal pivot growth factor max_j( norm(A_j)/norm(U_j) ).
+ * The infinity norm is used. If recip_pivot_growth is much less
+ * than 1, the stability of the LU factorization could be poor.
+ *
+ * rcond (output) float*
+ * The estimate of the reciprocal condition number of the matrix A
+ * after equilibration (if done). If rcond is less than the machine
+ * precision (in particular, if rcond = 0), the matrix is singular
+ * to working precision. This condition is indicated by a return
+ * code of info > 0.
+ *
+ * FERR (output) float*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ * If options->IterRefine = NOREFINE, ferr = 1.0.
+ *
+ * BERR (output) float*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ * If options->IterRefine = NOREFINE, berr = 1.0.
+ *
+ * mem_usage (output) mem_usage_t*
+ * Record the memory usage statistics, consisting of following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * The number of memory expansions during the LU factorization.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly
+ * singular, so the solution and error bounds
+ * could not be computed.
+ * = A->ncol+1: U is nonsingular, but RCOND is less than machine
+ * precision, meaning that the matrix is singular to
+ * working precision. Nevertheless, the solution and
+ * error bounds are computed because there are a number
+ * of situations where the computed solution can be more
+ * accurate than the value of RCOND would suggest.
+ * > A->ncol+1: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+
+ DNformat *Bstore, *Xstore;
+ float *Bmat, *Xmat;
+ int ldb, ldx, nrhs;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int colequ, equil, nofact, notran, rowequ, permc_spec;
+ trans_t trant;
+ char norm[1];
+ int i, j, info1;
+ float amax, anorm, bignum, smlnum, colcnd, rowcnd, rcmax, rcmin;
+ int relax, panel_size;
+ float diag_pivot_thresh, drop_tol;
+ double t0; /* temporary time */
+ double *utime;
+
+ /* External functions */
+ extern float slangs(char *, SuperMatrix *);
+ extern double slamch_(char *);
+
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ *info = 0;
+ nofact = (options->Fact != FACTORED);
+ equil = (options->Equil == YES);
+ notran = (options->Trans == NOTRANS);
+ if ( nofact ) {
+ *(unsigned char *)equed = 'N';
+ rowequ = FALSE;
+ colequ = FALSE;
+ } else {
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ smlnum = slamch_("Safe minimum");
+ bignum = 1. / smlnum;
+ }
+
+#if 0
+printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n",
+ options->Fact, options->Trans, *equed);
+#endif
+
+ /* Test the input parameters */
+ if (!nofact && options->Fact != DOFACT && options->Fact != SamePattern &&
+ options->Fact != SamePattern_SameRowPerm &&
+ !notran && options->Trans != TRANS && options->Trans != CONJ &&
+ !equil && options->Equil != NO)
+ *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_S || A->Mtype != SLU_GE )
+ *info = -2;
+ else if (options->Fact == FACTORED &&
+ !(rowequ || colequ || lsame_(equed, "N")))
+ *info = -6;
+ else {
+ if (rowequ) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, R[j]);
+ rcmax = SUPERLU_MAX(rcmax, R[j]);
+ }
+ if (rcmin <= 0.) *info = -7;
+ else if ( A->nrow > 0)
+ rowcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else rowcnd = 1.;
+ }
+ if (colequ && *info == 0) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, C[j]);
+ rcmax = SUPERLU_MAX(rcmax, C[j]);
+ }
+ if (rcmin <= 0.) *info = -8;
+ else if (A->nrow > 0)
+ colcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else colcnd = 1.;
+ }
+ if (*info == 0) {
+ if ( lwork < -1 ) *info = -12;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_S ||
+ B->Mtype != SLU_GE )
+ *info = -13;
+ else if ( X->ncol < 0 || Xstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ (B->ncol != 0 && B->ncol != X->ncol) ||
+ X->Stype != SLU_DN ||
+ X->Dtype != SLU_S || X->Mtype != SLU_GE )
+ *info = -14;
+ }
+ }
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("sgssvx", &i);
+ return;
+ }
+
+ /* Initialization for factor parameters */
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ diag_pivot_thresh = options->DiagPivotThresh;
+ drop_tol = 0.0;
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ sCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ if ( notran ) { /* Reverse the transpose argument. */
+ trant = TRANS;
+ notran = 0;
+ } else {
+ trant = NOTRANS;
+ notran = 1;
+ }
+ } else { /* A->Stype == SLU_NC */
+ trant = options->Trans;
+ AA = A;
+ }
+
+ if ( nofact && equil ) {
+ t0 = SuperLU_timer_();
+ /* Compute row and column scalings to equilibrate the matrix A. */
+ sgsequ(AA, R, C, &rowcnd, &colcnd, &amax, &info1);
+
+ if ( info1 == 0 ) {
+ /* Equilibrate matrix A. */
+ slaqgs(AA, R, C, rowcnd, colcnd, amax, equed);
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ }
+ utime[EQUIL] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Scale the right hand side if equilibration was performed. */
+ if ( notran ) {
+ if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Bmat[i + j*ldb] *= R[i];
+ }
+ }
+ } else if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Bmat[i + j*ldb] *= C[i];
+ }
+ }
+ }
+
+ if ( nofact ) {
+
+ t0 = SuperLU_timer_();
+ /*
+ * Gnet column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t0;
+
+ t0 = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t0;
+
+/* printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));
+ fflush(stdout); */
+
+ /* Compute the LU factorization of A*Pc. */
+ t0 = SuperLU_timer_();
+ sgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t0;
+
+ if ( lwork == -1 ) {
+ mem_usage->total_needed = *info - A->ncol;
+ return;
+ }
+ }
+
+ if ( options->PivotGrowth ) {
+ if ( *info > 0 ) {
+ if ( *info <= A->ncol ) {
+ /* Compute the reciprocal pivot growth factor of the leading
+ rank-deficient *info columns of A. */
+ *recip_pivot_growth = sPivotGrowth(*info, AA, perm_c, L, U);
+ }
+ return;
+ }
+
+ /* Compute the reciprocal pivot growth factor *recip_pivot_growth. */
+ *recip_pivot_growth = sPivotGrowth(A->ncol, AA, perm_c, L, U);
+ }
+
+ if ( options->ConditionNumber ) {
+ /* Estimate the reciprocal of the condition number of A. */
+ t0 = SuperLU_timer_();
+ if ( notran ) {
+ *(unsigned char *)norm = '1';
+ } else {
+ *(unsigned char *)norm = 'I';
+ }
+ anorm = slangs(norm, AA);
+ sgscon(norm, L, U, anorm, rcond, stat, info);
+ utime[RCOND] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Compute the solution matrix X. */
+ for (j = 0; j < nrhs; j++) /* Save a copy of the right hand sides */
+ for (i = 0; i < B->nrow; i++)
+ Xmat[i + j*ldx] = Bmat[i + j*ldb];
+
+ t0 = SuperLU_timer_();
+ sgstrs (trant, L, U, perm_c, perm_r, X, stat, info);
+ utime[SOLVE] = SuperLU_timer_() - t0;
+
+ /* Use iterative refinement to improve the computed solution and compute
+ error bounds and backward error estimates for it. */
+ t0 = SuperLU_timer_();
+ if ( options->IterRefine != NOREFINE ) {
+ sgsrfs(trant, AA, L, U, perm_c, perm_r, equed, R, C, B,
+ X, ferr, berr, stat, info);
+ } else {
+ for (j = 0; j < nrhs; ++j) ferr[j] = berr[j] = 1.0;
+ }
+ utime[REFINE] = SuperLU_timer_() - t0;
+
+ /* Transform the solution matrix X to a solution of the original system. */
+ if ( notran ) {
+ if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Xmat[i + j*ldx] *= C[i];
+ }
+ }
+ } else if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ Xmat[i + j*ldx] *= R[i];
+ }
+ }
+ } /* end if nrhs > 0 */
+
+ if ( options->ConditionNumber ) {
+ /* Set INFO = A->ncol+1 if the matrix is singular to working precision. */
+ if ( *rcond < slamch_("E") ) *info = A->ncol + 1;
+ }
+
+ if ( nofact ) {
+ sQuerySpace(L, U, mem_usage);
+ Destroy_CompCol_Permuted(&AC);
+ }
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/sgstrf.c b/SRC/sgstrf.c
new file mode 100644
index 0000000..93894dc
--- /dev/null
+++ b/SRC/sgstrf.c
@@ -0,0 +1,433 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+
+void
+sgstrf (superlu_options_t *options, SuperMatrix *A, float drop_tol,
+ int relax, int panel_size, int *etree, void *work, int lwork,
+ int *perm_c, int *perm_r, SuperMatrix *L, SuperMatrix *U,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SGSTRF computes an LU factorization of a general sparse m-by-n
+ * matrix A using partial pivoting with row interchanges.
+ * The factorization has the form
+ * Pr * A = L * U
+ * where Pr is a row permutation matrix, L is lower triangular with unit
+ * diagonal elements (lower trapezoidal if A->nrow > A->ncol), and U is upper
+ * triangular (upper trapezoidal if A->nrow < A->ncol).
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = SLU_NCP; Dtype = SLU_S; Mtype = SLU_GE.
+ *
+ * drop_tol (input) float (NOT IMPLEMENTED)
+ * Drop tolerance parameter. At step j of the Gaussian elimination,
+ * if abs(A_ij)/(max_i abs(A_ij)) < drop_tol, drop entry A_ij.
+ * 0 <= drop_tol <= 1. The default value of drop_tol is 0.
+ *
+ * relax (input) int
+ * To control degree of relaxing supernodes. If the number
+ * of nodes (columns) in a subtree of the elimination tree is less
+ * than relax, this subtree is considered as one supernode,
+ * regardless of the row structures of those columns.
+ *
+ * panel_size (input) int
+ * A panel consists of at most panel_size consecutive columns.
+ *
+ * etree (input) int*, dimension (A->ncol)
+ * Elimination tree of A'*A.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ * On input, the columns of A should be permuted so that the
+ * etree is in a certain postorder.
+ *
+ * work (input/output) void*, size (lwork) (in bytes)
+ * User-supplied work space and space for the output data structures.
+ * Not referenced if lwork = 0;
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * *info; no other side effects.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ * When searching for diagonal, perm_c[*] is applied to the
+ * row subscripts of A, so that diagonal threshold pivoting
+ * can find the diagonal of A, rather than that of A*Pc.
+ *
+ * perm_r (input/output) int*, dimension (A->nrow)
+ * Row permutation vector which defines the permutation matrix Pr,
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by
+ * a new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument;
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = SLU_NC,
+ * Dtype = SLU_S, Mtype = SLU_TRU.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * and division by zero will occur if it is used to solve a
+ * system of equations.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol. If lwork = -1, it is
+ * the estimated amount of space needed, plus A->ncol.
+ *
+ * ======================================================================
+ *
+ * Local Working Arrays:
+ * ======================
+ * m = number of rows in the matrix
+ * n = number of columns in the matrix
+ *
+ * xprune[0:n-1]: xprune[*] points to locations in subscript
+ * vector lsub[*]. For column i, xprune[i] denotes the point where
+ * structural pruning begins. I.e. only xlsub[i],..,xprune[i]-1 need
+ * to be traversed for symbolic factorization.
+ *
+ * marker[0:3*m-1]: marker[i] = j means that node i has been
+ * reached when working on column j.
+ * Storage: relative to original row subscripts
+ * NOTE: There are 3 of them: marker/marker1 are used for panel dfs,
+ * see spanel_dfs.c; marker2 is used for inner-factorization,
+ * see scolumn_dfs.c.
+ *
+ * parent[0:m-1]: parent vector used during dfs
+ * Storage: relative to new row subscripts
+ *
+ * xplore[0:m-1]: xplore[i] gives the location of the next (dfs)
+ * unexplored neighbor of i in lsub[*]
+ *
+ * segrep[0:nseg-1]: contains the list of supernodal representatives
+ * in topological order of the dfs. A supernode representative is the
+ * last column of a supernode.
+ * The maximum size of segrep[] is n.
+ *
+ * repfnz[0:W*m-1]: for a nonzero segment U[*,j] that ends at a
+ * supernodal representative r, repfnz[r] is the location of the first
+ * nonzero in this segment. It is also used during the dfs: repfnz[r]>0
+ * indicates the supernode r has been explored.
+ * NOTE: There are W of them, each used for one column of a panel.
+ *
+ * panel_lsub[0:W*m-1]: temporary for the nonzeros row indices below
+ * the panel diagonal. These are filled in during spanel_dfs(), and are
+ * used later in the inner LU factorization within the panel.
+ * panel_lsub[]/dense[] pair forms the SPA data structure.
+ * NOTE: There are W of them.
+ *
+ * dense[0:W*m-1]: sparse accumulating (SPA) vector for intermediate values;
+ * NOTE: there are W of them.
+ *
+ * tempv[0:*]: real temporary used for dense numeric kernels;
+ * The size of this array is defined by NUM_TEMPV() in ssp_defs.h.
+ *
+ */
+ /* Local working arrays */
+ NCPformat *Astore;
+ int *iperm_r; /* inverse of perm_r;
+ used when options->Fact == SamePattern_SameRowPerm */
+ int *iperm_c; /* inverse of perm_c */
+ int *iwork;
+ float *swork;
+ int *segrep, *repfnz, *parent, *xplore;
+ int *panel_lsub; /* dense[]/panel_lsub[] pair forms a w-wide SPA */
+ int *xprune;
+ int *marker;
+ float *dense, *tempv;
+ int *relax_end;
+ float *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int *xsup, *supno;
+ int *xlsub, *xlusup, *xusub;
+ int nzlumax;
+ static GlobalLU_t Glu; /* persistent to facilitate multiple factors. */
+
+ /* Local scalars */
+ fact_t fact = options->Fact;
+ double diag_pivot_thresh = options->DiagPivotThresh;
+ int pivrow; /* pivotal row number in the original matrix A */
+ int nseg1; /* no of segments in U-column above panel row jcol */
+ int nseg; /* no of segments in each U-column */
+ register int jcol;
+ register int kcol; /* end column of a relaxed snode */
+ register int icol;
+ register int i, k, jj, new_next, iinfo;
+ int m, n, min_mn, jsupno, fsupc, nextlu, nextu;
+ int w_def; /* upper bound on panel width */
+ int usepr, iperm_r_allocated = 0;
+ int nnzL, nnzU;
+ int *panel_histo = stat->panel_histo;
+ flops_t *ops = stat->ops;
+
+ iinfo = 0;
+ m = A->nrow;
+ n = A->ncol;
+ min_mn = SUPERLU_MIN(m, n);
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+
+ /* Allocate storage common to the factor routines */
+ *info = sLUMemInit(fact, work, lwork, m, n, Astore->nnz,
+ panel_size, L, U, &Glu, &iwork, &swork);
+ if ( *info ) return;
+
+ xsup = Glu.xsup;
+ supno = Glu.supno;
+ xlsub = Glu.xlsub;
+ xlusup = Glu.xlusup;
+ xusub = Glu.xusub;
+
+ SetIWork(m, n, panel_size, iwork, &segrep, &parent, &xplore,
+ &repfnz, &panel_lsub, &xprune, &marker);
+ sSetRWork(m, panel_size, swork, &dense, &tempv);
+
+ usepr = (fact == SamePattern_SameRowPerm);
+ if ( usepr ) {
+ /* Compute the inverse of perm_r */
+ iperm_r = (int *) intMalloc(m);
+ for (k = 0; k < m; ++k) iperm_r[perm_r[k]] = k;
+ iperm_r_allocated = 1;
+ }
+ iperm_c = (int *) intMalloc(n);
+ for (k = 0; k < n; ++k) iperm_c[perm_c[k]] = k;
+
+ /* Identify relaxed snodes */
+ relax_end = (int *) intMalloc(n);
+ if ( options->SymmetricMode == YES ) {
+ heap_relax_snode(n, etree, relax, marker, relax_end);
+ } else {
+ relax_snode(n, etree, relax, marker, relax_end);
+ }
+
+ ifill (perm_r, m, EMPTY);
+ ifill (marker, m * NO_MARKER, EMPTY);
+ supno[0] = -1;
+ xsup[0] = xlsub[0] = xusub[0] = xlusup[0] = 0;
+ w_def = panel_size;
+
+ /*
+ * Work on one "panel" at a time. A panel is one of the following:
+ * (a) a relaxed supernode at the bottom of the etree, or
+ * (b) panel_size contiguous columns, defined by the user
+ */
+ for (jcol = 0; jcol < min_mn; ) {
+
+ if ( relax_end[jcol] != EMPTY ) { /* start of a relaxed snode */
+ kcol = relax_end[jcol]; /* end of the relaxed snode */
+ panel_histo[kcol-jcol+1]++;
+
+ /* --------------------------------------
+ * Factorize the relaxed supernode(jcol:kcol)
+ * -------------------------------------- */
+ /* Determine the union of the row structure of the snode */
+ if ( (*info = ssnode_dfs(jcol, kcol, asub, xa_begin, xa_end,
+ xprune, marker, &Glu)) != 0 )
+ return;
+
+ nextu = xusub[jcol];
+ nextlu = xlusup[jcol];
+ jsupno = supno[jcol];
+ fsupc = xsup[jsupno];
+ new_next = nextlu + (xlsub[fsupc+1]-xlsub[fsupc])*(kcol-jcol+1);
+ nzlumax = Glu.nzlumax;
+ while ( new_next > nzlumax ) {
+ if ( (*info = sLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, &Glu)) )
+ return;
+ }
+
+ for (icol = jcol; icol<= kcol; icol++) {
+ xusub[icol+1] = nextu;
+
+ /* Scatter into SPA dense[*] */
+ for (k = xa_begin[icol]; k < xa_end[icol]; k++)
+ dense[asub[k]] = a[k];
+
+ /* Numeric update within the snode */
+ ssnode_bmod(icol, jsupno, fsupc, dense, tempv, &Glu, stat);
+
+ if ( (*info = spivotL(icol, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+#ifdef DEBUG
+ sprint_lu_col("[1]: ", icol, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol = icol;
+
+ } else { /* Work on one panel of panel_size columns */
+
+ /* Adjust panel_size so that a panel won't overlap with the next
+ * relaxed snode.
+ */
+ panel_size = w_def;
+ for (k = jcol + 1; k < SUPERLU_MIN(jcol+panel_size, min_mn); k++)
+ if ( relax_end[k] != EMPTY ) {
+ panel_size = k - jcol;
+ break;
+ }
+ if ( k == min_mn ) panel_size = min_mn - jcol;
+ panel_histo[panel_size]++;
+
+ /* symbolic factor on a panel of columns */
+ spanel_dfs(m, panel_size, jcol, A, perm_r, &nseg1,
+ dense, panel_lsub, segrep, repfnz, xprune,
+ marker, parent, xplore, &Glu);
+
+ /* numeric sup-panel updates in topological order */
+ spanel_bmod(m, panel_size, jcol, nseg1, dense,
+ tempv, segrep, repfnz, &Glu, stat);
+
+ /* Sparse LU within the panel, and below panel diagonal */
+ for ( jj = jcol; jj < jcol + panel_size; jj++) {
+ k = (jj - jcol) * m; /* column index for w-wide arrays */
+
+ nseg = nseg1; /* Begin after all the panel segments */
+
+ if ((*info = scolumn_dfs(m, jj, perm_r, &nseg, &panel_lsub[k],
+ segrep, &repfnz[k], xprune, marker,
+ parent, xplore, &Glu)) != 0) return;
+
+ /* Numeric updates */
+ if ((*info = scolumn_bmod(jj, (nseg - nseg1), &dense[k],
+ tempv, &segrep[nseg1], &repfnz[k],
+ jcol, &Glu, stat)) != 0) return;
+
+ /* Copy the U-segments to ucol[*] */
+ if ((*info = scopy_to_ucol(jj, nseg, segrep, &repfnz[k],
+ perm_r, &dense[k], &Glu)) != 0)
+ return;
+
+ if ( (*info = spivotL(jj, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+ /* Prune columns (0:jj-1) using column jj */
+ spruneL(jj, perm_r, pivrow, nseg, segrep,
+ &repfnz[k], xprune, &Glu);
+
+ /* Reset repfnz[] for this column */
+ resetrep_col (nseg, segrep, &repfnz[k]);
+
+#ifdef DEBUG
+ sprint_lu_col("[2]: ", jj, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol += panel_size; /* Move to the next panel */
+
+ } /* else */
+
+ } /* for */
+
+ *info = iinfo;
+
+ if ( m > n ) {
+ k = 0;
+ for (i = 0; i < m; ++i)
+ if ( perm_r[i] == EMPTY ) {
+ perm_r[i] = n + k;
+ ++k;
+ }
+ }
+
+ countnz(min_mn, xprune, &nnzL, &nnzU, &Glu);
+ fixupL(min_mn, perm_r, &Glu);
+
+ sLUWorkFree(iwork, swork, &Glu); /* Free work space and compress storage */
+
+ if ( fact == SamePattern_SameRowPerm ) {
+ /* L and U structures may have changed due to possibly different
+ pivoting, even though the storage is available.
+ There could also be memory expansions, so the array locations
+ may have changed, */
+ ((SCformat *)L->Store)->nnz = nnzL;
+ ((SCformat *)L->Store)->nsuper = Glu.supno[n];
+ ((SCformat *)L->Store)->nzval = Glu.lusup;
+ ((SCformat *)L->Store)->nzval_colptr = Glu.xlusup;
+ ((SCformat *)L->Store)->rowind = Glu.lsub;
+ ((SCformat *)L->Store)->rowind_colptr = Glu.xlsub;
+ ((NCformat *)U->Store)->nnz = nnzU;
+ ((NCformat *)U->Store)->nzval = Glu.ucol;
+ ((NCformat *)U->Store)->rowind = Glu.usub;
+ ((NCformat *)U->Store)->colptr = Glu.xusub;
+ } else {
+ sCreate_SuperNode_Matrix(L, A->nrow, min_mn, nnzL, Glu.lusup,
+ Glu.xlusup, Glu.lsub, Glu.xlsub, Glu.supno,
+ Glu.xsup, SLU_SC, SLU_S, SLU_TRLU);
+ sCreate_CompCol_Matrix(U, min_mn, min_mn, nnzU, Glu.ucol,
+ Glu.usub, Glu.xusub, SLU_NC, SLU_S, SLU_TRU);
+ }
+
+ ops[FACT] += ops[TRSV] + ops[GEMV];
+
+ if ( iperm_r_allocated ) SUPERLU_FREE (iperm_r);
+ SUPERLU_FREE (iperm_c);
+ SUPERLU_FREE (relax_end);
+
+}
diff --git a/SRC/sgstrs.c b/SRC/sgstrs.c
new file mode 100644
index 0000000..3a72f5e
--- /dev/null
+++ b/SRC/sgstrs.c
@@ -0,0 +1,332 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void susolve(int, int, float*, float*);
+void slsolve(int, int, float*, float*);
+void smatvec(int, int, int, float*, float*, float*);
+
+
+void
+sgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * SGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * sgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * sgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ float alpha = 1.0, beta = 1.0;
+ float *work_col;
+#endif
+ DNformat *Bstore;
+ float *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ float *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ float *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void sprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_S || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_S || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_S || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = floatCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = floatMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 2 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ rhs_work[irow] -= rhs_work[fsupc] * Lval[luptr];
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ SGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ strsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ sgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work_col[i]; /* Scatter */
+ work_col[i] = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ slsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ smatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work[i];
+ work[i] = 0.0;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ sprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ rhs_work[fsupc] /= Lval[luptr];
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ strsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ susolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ rhs_work[irow] -= rhs_work[jcol] * Uval[i];
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ sprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B or CONJ(A)*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+ for (k = 0; k < nrhs; ++k) {
+
+ /* Multiply by inv(U'). */
+ sp_strsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_strsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+
+ }
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+sprint_soln(int n, int nrhs, float *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/sgstrs.c.bak b/SRC/sgstrs.c.bak
new file mode 100644
index 0000000..f2977eb
--- /dev/null
+++ b/SRC/sgstrs.c.bak
@@ -0,0 +1,334 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void susolve(int, int, float*, float*);
+void slsolve(int, int, float*, float*);
+void smatvec(int, int, int, float*, float*, float*);
+
+
+void
+sgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * SGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * sgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * sgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ float alpha = 1.0, beta = 1.0;
+ float *work_col;
+#endif
+ DNformat *Bstore;
+ float *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ float *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ float *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void sprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_S || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_S || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_S || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = floatCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = floatMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 2 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ rhs_work[irow] -= rhs_work[fsupc] * Lval[luptr];
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ SGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ strsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ sgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work_col[i]; /* Scatter */
+ work_col[i] = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ slsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ smatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ rhs_work[irow] -= work[i];
+ work[i] = 0.0;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ sprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ rhs_work[fsupc] /= Lval[luptr];
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ strsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ susolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ rhs_work[irow] -= rhs_work[jcol] * Uval[i];
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ sprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+
+ for (k = 0; k < nrhs; ++k) {
+
+ /* Multiply by inv(U'). */
+ sp_strsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_strsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+
+ }
+
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+sprint_soln(int n, int nrhs, float *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/slacon.c b/SRC/slacon.c
new file mode 100644
index 0000000..0dafbb2
--- /dev/null
+++ b/SRC/slacon.c
@@ -0,0 +1,229 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "Cnames.h"
+
+int
+slacon_(int *n, float *v, float *x, int *isgn, float *est, int *kase)
+
+{
+/*
+ Purpose
+ =======
+
+ SLACON estimates the 1-norm of a square matrix A.
+ Reverse communication is used for evaluating matrix-vector products.
+
+
+ Arguments
+ =========
+
+ N (input) INT
+ The order of the matrix. N >= 1.
+
+ V (workspace) FLOAT PRECISION array, dimension (N)
+ On the final return, V = A*W, where EST = norm(V)/norm(W)
+ (W is not returned).
+
+ X (input/output) FLOAT PRECISION array, dimension (N)
+ On an intermediate return, X should be overwritten by
+ A * X, if KASE=1,
+ A' * X, if KASE=2,
+ and SLACON must be re-called with all the other parameters
+ unchanged.
+
+ ISGN (workspace) INT array, dimension (N)
+
+ EST (output) FLOAT PRECISION
+ An estimate (a lower bound) for norm(A).
+
+ KASE (input/output) INT
+ On the initial call to SLACON, KASE should be 0.
+ On an intermediate return, KASE will be 1 or 2, indicating
+ whether X should be overwritten by A * X or A' * X.
+ On the final return from SLACON, KASE will again be 0.
+
+ Further Details
+ ======= =======
+
+ Contributed by Nick Higham, University of Manchester.
+ Originally named CONEST, dated March 16, 1988.
+
+ Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+ a real or complex matrix, with applications to condition estimation",
+ ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+ float zero = 0.0;
+ float one = 1.0;
+
+ /* Local variables */
+ static int iter;
+ static int jump, jlast;
+ static float altsgn, estold;
+ static int i, j;
+ float temp;
+#ifdef _CRAY
+ extern int ISAMAX(int *, float *, int *);
+ extern float SASUM(int *, float *, int *);
+ extern int SCOPY(int *, float *, int *, float *, int *);
+#else
+ extern int isamax_(int *, float *, int *);
+ extern float sasum_(int *, float *, int *);
+ extern int scopy_(int *, float *, int *, float *, int *);
+#endif
+#define d_sign(a, b) (b >= 0 ? fabs(a) : -fabs(a)) /* Copy sign */
+#define i_dnnt(a) \
+ ( a>=0 ? floor(a+.5) : -floor(.5-a) ) /* Round to nearest integer */
+
+ if ( *kase == 0 ) {
+ for (i = 0; i < *n; ++i) {
+ x[i] = 1. / (float) (*n);
+ }
+ *kase = 1;
+ jump = 1;
+ return 0;
+ }
+
+ switch (jump) {
+ case 1: goto L20;
+ case 2: goto L40;
+ case 3: goto L70;
+ case 4: goto L110;
+ case 5: goto L140;
+ }
+
+ /* ................ ENTRY (JUMP = 1)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. */
+ L20:
+ if (*n == 1) {
+ v[0] = x[0];
+ *est = fabs(v[0]);
+ /* ... QUIT */
+ goto L150;
+ }
+#ifdef _CRAY
+ *est = SASUM(n, x, &c__1);
+#else
+ *est = sasum_(n, x, &c__1);
+#endif
+
+ for (i = 0; i < *n; ++i) {
+ x[i] = d_sign(one, x[i]);
+ isgn[i] = i_dnnt(x[i]);
+ }
+ *kase = 2;
+ jump = 2;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 2)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. */
+L40:
+#ifdef _CRAY
+ j = ISAMAX(n, &x[0], &c__1);
+#else
+ j = isamax_(n, &x[0], &c__1);
+#endif
+ --j;
+ iter = 2;
+
+ /* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. */
+L50:
+ for (i = 0; i < *n; ++i) x[i] = zero;
+ x[j] = one;
+ *kase = 1;
+ jump = 3;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 3)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L70:
+#ifdef _CRAY
+ SCOPY(n, x, &c__1, v, &c__1);
+#else
+ scopy_(n, x, &c__1, v, &c__1);
+#endif
+ estold = *est;
+#ifdef _CRAY
+ *est = SASUM(n, v, &c__1);
+#else
+ *est = sasum_(n, v, &c__1);
+#endif
+
+ for (i = 0; i < *n; ++i)
+ if (i_dnnt(d_sign(one, x[i])) != isgn[i])
+ goto L90;
+
+ /* REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED. */
+ goto L120;
+
+L90:
+ /* TEST FOR CYCLING. */
+ if (*est <= estold) goto L120;
+
+ for (i = 0; i < *n; ++i) {
+ x[i] = d_sign(one, x[i]);
+ isgn[i] = i_dnnt(x[i]);
+ }
+ *kase = 2;
+ jump = 4;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 4)
+ X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. */
+L110:
+ jlast = j;
+#ifdef _CRAY
+ j = ISAMAX(n, &x[0], &c__1);
+#else
+ j = isamax_(n, &x[0], &c__1);
+#endif
+ --j;
+ if (x[jlast] != fabs(x[j]) && iter < 5) {
+ ++iter;
+ goto L50;
+ }
+
+ /* ITERATION COMPLETE. FINAL STAGE. */
+L120:
+ altsgn = 1.;
+ for (i = 1; i <= *n; ++i) {
+ x[i-1] = altsgn * ((float)(i - 1) / (float)(*n - 1) + 1.);
+ altsgn = -altsgn;
+ }
+ *kase = 1;
+ jump = 5;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 5)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L140:
+#ifdef _CRAY
+ temp = SASUM(n, x, &c__1) / (float)(*n * 3) * 2.;
+#else
+ temp = sasum_(n, x, &c__1) / (float)(*n * 3) * 2.;
+#endif
+ if (temp > *est) {
+#ifdef _CRAY
+ SCOPY(n, &x[0], &c__1, &v[0], &c__1);
+#else
+ scopy_(n, &x[0], &c__1, &v[0], &c__1);
+#endif
+ *est = temp;
+ }
+
+L150:
+ *kase = 0;
+ return 0;
+
+} /* slacon_ */
diff --git a/SRC/slamch.c b/SRC/slamch.c
new file mode 100644
index 0000000..4e44ad4
--- /dev/null
+++ b/SRC/slamch.c
@@ -0,0 +1,982 @@
+#include <stdio.h>
+#define TRUE_ (1)
+#define FALSE_ (0)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define dabs(x) (double)abs(x)
+
+double slamch_(char *cmach)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMCH determines single precision machine parameters.
+
+ Arguments
+ =========
+
+ CMACH (input) CHARACTER*1
+ Specifies the value to be returned by SLAMCH:
+ = 'E' or 'e', SLAMCH := eps
+ = 'S' or 's , SLAMCH := sfmin
+ = 'B' or 'b', SLAMCH := base
+ = 'P' or 'p', SLAMCH := eps*base
+ = 'N' or 'n', SLAMCH := t
+ = 'R' or 'r', SLAMCH := rnd
+ = 'M' or 'm', SLAMCH := emin
+ = 'U' or 'u', SLAMCH := rmin
+ = 'L' or 'l', SLAMCH := emax
+ = 'O' or 'o', SLAMCH := rmax
+
+ where
+
+ eps = relative machine precision
+ sfmin = safe minimum, such that 1/sfmin does not overflow
+ base = base of the machine
+ prec = eps*base
+ t = number of (base) digits in the mantissa
+ rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+ emin = minimum exponent before (gradual) underflow
+ rmin = underflow threshold - base**(emin-1)
+ emax = largest exponent before overflow
+ rmax = overflow threshold - (base**emax)*(1-eps)
+
+ =====================================================================
+*/
+/* >>Start of File<<
+ Initialized data */
+ static int first = TRUE_;
+ /* System generated locals */
+ int i__1;
+ float ret_val;
+ /* Builtin functions */
+ double pow_ri(float *, int *);
+ /* Local variables */
+ static float base;
+ static int beta;
+ static float emin, prec, emax;
+ static int imin, imax;
+ static int lrnd;
+ static float rmin, rmax, t, rmach;
+ extern int lsame_(char *, char *);
+ static float small, sfmin;
+ extern /* Subroutine */ int slamc2_(int *, int *, int *, float
+ *, int *, float *, int *, float *);
+ static int it;
+ static float rnd, eps;
+
+
+
+ if (first) {
+ first = FALSE_;
+ slamc2_(&beta, &it, &lrnd, &eps, &imin, &rmin, &imax, &rmax);
+ base = (float) beta;
+ t = (float) it;
+ if (lrnd) {
+ rnd = 1.f;
+ i__1 = 1 - it;
+ eps = pow_ri(&base, &i__1) / 2;
+ } else {
+ rnd = 0.f;
+ i__1 = 1 - it;
+ eps = pow_ri(&base, &i__1);
+ }
+ prec = eps * base;
+ emin = (float) imin;
+ emax = (float) imax;
+ sfmin = rmin;
+ small = 1.f / rmax;
+ if (small >= sfmin) {
+
+/* Use SMALL plus a bit, to avoid the possibility of rou
+nding
+ causing overflow when computing 1/sfmin. */
+
+ sfmin = small * (eps + 1.f);
+ }
+ }
+
+ if (lsame_(cmach, "E")) {
+ rmach = eps;
+ } else if (lsame_(cmach, "S")) {
+ rmach = sfmin;
+ } else if (lsame_(cmach, "B")) {
+ rmach = base;
+ } else if (lsame_(cmach, "P")) {
+ rmach = prec;
+ } else if (lsame_(cmach, "N")) {
+ rmach = t;
+ } else if (lsame_(cmach, "R")) {
+ rmach = rnd;
+ } else if (lsame_(cmach, "M")) {
+ rmach = emin;
+ } else if (lsame_(cmach, "U")) {
+ rmach = rmin;
+ } else if (lsame_(cmach, "L")) {
+ rmach = emax;
+ } else if (lsame_(cmach, "O")) {
+ rmach = rmax;
+ }
+
+ ret_val = rmach;
+ return ret_val;
+
+/* End of SLAMCH */
+
+} /* slamch_ */
+
+
+/* Subroutine */ int slamc1_(int *beta, int *t, int *rnd, int
+ *ieee1)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC1 determines the machine parameters given by BETA, T, RND, and
+ IEEE1.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ IEEE1 (output) INT
+ Specifies whether rounding appears to be done in the IEEE
+ 'round to nearest' style.
+
+ Further Details
+ ===============
+
+ The routine is based on the routine ENVRON by Malcolm and
+ incorporates suggestions by Gentleman and Marovich. See
+
+ Malcolm M. A. (1972) Algorithms to reveal properties of
+ floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+
+ Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+ that reveal properties of floating point arithmetic units.
+ Comms. of the ACM, 17, 276-277.
+
+ =====================================================================
+*/
+ /* Initialized data */
+ static int first = TRUE_;
+ /* System generated locals */
+ float r__1, r__2;
+ /* Local variables */
+ static int lrnd;
+ static float a, b, c, f;
+ static int lbeta;
+ static float savec;
+ static int lieee1;
+ static float t1, t2;
+ extern double slamc3_(float *, float *);
+ static int lt;
+ static float one, qtr;
+
+
+
+ if (first) {
+ first = FALSE_;
+ one = 1.f;
+
+/* LBETA, LIEEE1, LT and LRND are the local values of BE
+TA,
+ IEEE1, T and RND.
+
+ Throughout this routine we use the function SLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ Compute a = 2.0**m with the smallest positive integer m s
+uch
+ that
+
+ fl( a + 1.0 ) = a. */
+
+ a = 1.f;
+ c = 1.f;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L10:
+ if (c == one) {
+ a *= 2;
+ c = slamc3_(&a, &one);
+ r__1 = -(double)a;
+ c = slamc3_(&c, &r__1);
+ goto L10;
+ }
+/* + END WHILE
+
+ Now compute b = 2.0**m with the smallest positive integer
+m
+ such that
+
+ fl( a + b ) .gt. a. */
+
+ b = 1.f;
+ c = slamc3_(&a, &b);
+
+/* + WHILE( C.EQ.A )LOOP */
+L20:
+ if (c == a) {
+ b *= 2;
+ c = slamc3_(&a, &b);
+ goto L20;
+ }
+/* + END WHILE
+
+ Now compute the base. a and c are neighbouring floating po
+int
+ numbers in the interval ( beta**t, beta**( t + 1 ) ) and
+ so
+ their difference is beta. Adding 0.25 to c is to ensure that
+ it
+ is truncated to beta and not ( beta - 1 ). */
+
+ qtr = one / 4;
+ savec = c;
+ r__1 = -(double)a;
+ c = slamc3_(&c, &r__1);
+ lbeta = c + qtr;
+
+/* Now determine whether rounding or chopping occurs, by addin
+g a
+ bit less than beta/2 and a bit more than beta/2 to
+ a. */
+
+ b = (float) lbeta;
+ r__1 = b / 2;
+ r__2 = -(double)b / 100;
+ f = slamc3_(&r__1, &r__2);
+ c = slamc3_(&f, &a);
+ if (c == a) {
+ lrnd = TRUE_;
+ } else {
+ lrnd = FALSE_;
+ }
+ r__1 = b / 2;
+ r__2 = b / 100;
+ f = slamc3_(&r__1, &r__2);
+ c = slamc3_(&f, &a);
+ if (lrnd && c == a) {
+ lrnd = FALSE_;
+ }
+
+/* Try and decide whether rounding is done in the IEEE 'round
+ to
+ nearest' style. B/2 is half a unit in the last place of the
+two
+ numbers A and SAVEC. Furthermore, A is even, i.e. has last
+bit
+ zero, and SAVEC is odd. Thus adding B/2 to A should not cha
+nge
+ A, but adding B/2 to SAVEC should change SAVEC. */
+
+ r__1 = b / 2;
+ t1 = slamc3_(&r__1, &a);
+ r__1 = b / 2;
+ t2 = slamc3_(&r__1, &savec);
+ lieee1 = t1 == a && t2 > savec && lrnd;
+
+/* Now find the mantissa, t. It should be the integer part
+ of
+ log to the base beta of a, however it is safer to determine
+ t
+ by powering. So we find t as the smallest positive integer
+for
+ which
+
+ fl( beta**t + 1.0 ) = 1.0. */
+
+ lt = 0;
+ a = 1.f;
+ c = 1.f;
+
+/* + WHILE( C.EQ.ONE )LOOP */
+L30:
+ if (c == one) {
+ ++lt;
+ a *= lbeta;
+ c = slamc3_(&a, &one);
+ r__1 = -(double)a;
+ c = slamc3_(&c, &r__1);
+ goto L30;
+ }
+/* + END WHILE */
+
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *ieee1 = lieee1;
+ return 0;
+
+/* End of SLAMC1 */
+
+} /* slamc1_ */
+
+
+/* Subroutine */ int slamc2_(int *beta, int *t, int *rnd, float *
+ eps, int *emin, float *rmin, int *emax, float *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC2 determines the machine parameters specified in its argument
+ list.
+
+ Arguments
+ =========
+
+ BETA (output) INT
+ The base of the machine.
+
+ T (output) INT
+ The number of ( BETA ) digits in the mantissa.
+
+ RND (output) INT
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
+
+ be a reliable guide to the way in which the machine performs
+
+ its arithmetic.
+
+ EPS (output) FLOAT
+ The smallest positive number such that
+
+ fl( 1.0 - EPS ) .LT. 1.0,
+
+ where fl denotes the computed value.
+
+ EMIN (output) INT
+ The minimum exponent before (gradual) underflow occurs.
+
+ RMIN (output) FLOAT
+ The smallest normalized number for the machine, given by
+ BASE**( EMIN - 1 ), where BASE is the floating point value
+
+ of BETA.
+
+ EMAX (output) INT
+ The maximum exponent before overflow occurs.
+
+ RMAX (output) FLOAT
+ The largest positive number for the machine, given by
+ BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
+
+ value of BETA.
+
+ Further Details
+ ===============
+
+ The computation of EPS is based on a routine PARANOIA by
+ W. Kahan of the University of California at Berkeley.
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ static int c__1 = 1;
+
+ /* Initialized data */
+ static int first = TRUE_;
+ static int iwarn = FALSE_;
+ /* System generated locals */
+ int i__1;
+ float r__1, r__2, r__3, r__4, r__5;
+ /* Builtin functions */
+ double pow_ri(float *, int *);
+ /* Local variables */
+ static int ieee;
+ static float half;
+ static int lrnd;
+ static float leps, zero, a, b, c;
+ static int i, lbeta;
+ static float rbase;
+ static int lemin, lemax, gnmin;
+ static float small;
+ static int gpmin;
+ static float third, lrmin, lrmax, sixth;
+ static int lieee1;
+ extern /* Subroutine */ int slamc1_(int *, int *, int *,
+ int *);
+ extern double slamc3_(float *, float *);
+ extern /* Subroutine */ int slamc4_(int *, float *, int *),
+ slamc5_(int *, int *, int *, int *, int *,
+ float *);
+ static int lt, ngnmin, ngpmin;
+ static float one, two;
+
+
+
+ if (first) {
+ first = FALSE_;
+ zero = 0.f;
+ one = 1.f;
+ two = 2.f;
+
+/* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values
+ of
+ BETA, T, RND, EPS, EMIN and RMIN.
+
+ Throughout this routine we use the function SLAMC3 to ens
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
+
+ SLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1.
+*/
+
+ slamc1_(&lbeta, <, &lrnd, &lieee1);
+
+/* Start to find EPS. */
+
+ b = (float) lbeta;
+ i__1 = -lt;
+ a = pow_ri(&b, &i__1);
+ leps = a;
+
+/* Try some tricks to see whether or not this is the correct E
+PS. */
+
+ b = two / 3;
+ half = one / 2;
+ r__1 = -(double)half;
+ sixth = slamc3_(&b, &r__1);
+ third = slamc3_(&sixth, &sixth);
+ r__1 = -(double)half;
+ b = slamc3_(&third, &r__1);
+ b = slamc3_(&b, &sixth);
+ b = dabs(b);
+ if (b < leps) {
+ b = leps;
+ }
+
+ leps = 1.f;
+
+/* + WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP */
+L10:
+ if (leps > b && b > zero) {
+ leps = b;
+ r__1 = half * leps;
+/* Computing 5th power */
+ r__3 = two, r__4 = r__3, r__3 *= r__3;
+/* Computing 2nd power */
+ r__5 = leps;
+ r__2 = r__4 * (r__3 * r__3) * (r__5 * r__5);
+ c = slamc3_(&r__1, &r__2);
+ r__1 = -(double)c;
+ c = slamc3_(&half, &r__1);
+ b = slamc3_(&half, &c);
+ r__1 = -(double)b;
+ c = slamc3_(&half, &r__1);
+ b = slamc3_(&half, &c);
+ goto L10;
+ }
+/* + END WHILE */
+
+ if (a < leps) {
+ leps = a;
+ }
+
+/* Computation of EPS complete.
+
+ Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3
+)).
+ Keep dividing A by BETA until (gradual) underflow occurs. T
+his
+ is detected when we cannot recover the previous A. */
+
+ rbase = one / lbeta;
+ small = one;
+ for (i = 1; i <= 3; ++i) {
+ r__1 = small * rbase;
+ small = slamc3_(&r__1, &zero);
+/* L20: */
+ }
+ a = slamc3_(&one, &small);
+ slamc4_(&ngpmin, &one, &lbeta);
+ r__1 = -(double)one;
+ slamc4_(&ngnmin, &r__1, &lbeta);
+ slamc4_(&gpmin, &a, &lbeta);
+ r__1 = -(double)a;
+ slamc4_(&gnmin, &r__1, &lbeta);
+ ieee = FALSE_;
+
+ if (ngpmin == ngnmin && gpmin == gnmin) {
+ if (ngpmin == gpmin) {
+ lemin = ngpmin;
+/* ( Non twos-complement machines, no gradual under
+flow;
+ e.g., VAX ) */
+ } else if (gpmin - ngpmin == 3) {
+ lemin = ngpmin - 1 + lt;
+ ieee = TRUE_;
+/* ( Non twos-complement machines, with gradual und
+erflow;
+ e.g., IEEE standard followers ) */
+ } else {
+ lemin = min(ngpmin,gpmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if (ngpmin == gpmin && ngnmin == gnmin) {
+ if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1) {
+ lemin = max(ngpmin,ngnmin);
+/* ( Twos-complement machines, no gradual underflow
+;
+ e.g., CYBER 205 ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1 && gpmin == gnmin)
+ {
+ if (gpmin - min(ngpmin,ngnmin) == 3) {
+ lemin = max(ngpmin,ngnmin) - 1 + lt;
+/* ( Twos-complement machines with gradual underflo
+w;
+ no known machine ) */
+ } else {
+ lemin = min(ngpmin,ngnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+
+ } else {
+/* Computing MIN */
+ i__1 = min(ngpmin,ngnmin), i__1 = min(i__1,gpmin);
+ lemin = min(i__1,gnmin);
+/* ( A guess; no known machine ) */
+ iwarn = TRUE_;
+ }
+/* **
+ Comment out this if block if EMIN is ok */
+ if (iwarn) {
+ first = TRUE_;
+ printf("\n\n WARNING. The value EMIN may be incorrect:- ");
+ printf("EMIN = %8i\n",lemin);
+ printf("If, after inspection, the value EMIN looks acceptable");
+ printf("please comment out \n the IF block as marked within the");
+ printf("code of routine SLAMC2, \n otherwise supply EMIN");
+ printf("explicitly.\n");
+ }
+/* **
+
+ Assume IEEE arithmetic if we found denormalised numbers abo
+ve,
+ or if arithmetic seems to round in the IEEE style, determi
+ned
+ in routine SLAMC1. A true IEEE machine should have both thi
+ngs
+ true; however, faulty machines may have one or the other. */
+
+ ieee = ieee || lieee1;
+
+/* Compute RMIN by successive division by BETA. We could comp
+ute
+ RMIN as BASE**( EMIN - 1 ), but some machines underflow dur
+ing
+ this computation. */
+
+ lrmin = 1.f;
+ i__1 = 1 - lemin;
+ for (i = 1; i <= 1-lemin; ++i) {
+ r__1 = lrmin * rbase;
+ lrmin = slamc3_(&r__1, &zero);
+/* L30: */
+ }
+
+/* Finally, call SLAMC5 to compute EMAX and RMAX. */
+
+ slamc5_(&lbeta, <, &lemin, &ieee, &lemax, &lrmax);
+ }
+
+ *beta = lbeta;
+ *t = lt;
+ *rnd = lrnd;
+ *eps = leps;
+ *emin = lemin;
+ *rmin = lrmin;
+ *emax = lemax;
+ *rmax = lrmax;
+
+ return 0;
+
+
+/* End of SLAMC2 */
+
+} /* slamc2_ */
+
+
+double slamc3_(float *a, float *b)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC3 is intended to force A and B to be stored prior to doing
+
+ the addition of A and B , for use in situations where optimizers
+
+ might hold one of these in a register.
+
+ Arguments
+ =========
+
+ A, B (input) FLOAT
+ The values A and B.
+
+ =====================================================================
+*/
+/* >>Start of File<<
+ System generated locals */
+ float ret_val;
+
+
+
+ ret_val = *a + *b;
+
+ return ret_val;
+
+/* End of SLAMC3 */
+
+} /* slamc3_ */
+
+
+/* Subroutine */ int slamc4_(int *emin, float *start, int *base)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC4 is a service routine for SLAMC2.
+
+ Arguments
+ =========
+
+ EMIN (output) EMIN
+ The minimum exponent before (gradual) underflow, computed by
+
+ setting A = START and dividing by BASE until the previous A
+ can not be recovered.
+
+ START (input) FLOAT
+ The starting point for determining EMIN.
+
+ BASE (input) INT
+ The base of the machine.
+
+ =====================================================================
+*/
+ /* System generated locals */
+ int i__1;
+ float r__1;
+ /* Local variables */
+ static float zero, a;
+ static int i;
+ static float rbase, b1, b2, c1, c2, d1, d2;
+ extern double slamc3_(float *, float *);
+ static float one;
+
+
+
+ a = *start;
+ one = 1.f;
+ rbase = one / *base;
+ zero = 0.f;
+ *emin = 1;
+ r__1 = a * rbase;
+ b1 = slamc3_(&r__1, &zero);
+ c1 = a;
+ c2 = a;
+ d1 = a;
+ d2 = a;
+/* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
+ $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP */
+L10:
+ if (c1 == a && c2 == a && d1 == a && d2 == a) {
+ --(*emin);
+ a = b1;
+ r__1 = a / *base;
+ b1 = slamc3_(&r__1, &zero);
+ r__1 = b1 * *base;
+ c1 = slamc3_(&r__1, &zero);
+ d1 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d1 += b1;
+/* L20: */
+ }
+ r__1 = a * rbase;
+ b2 = slamc3_(&r__1, &zero);
+ r__1 = b2 / rbase;
+ c2 = slamc3_(&r__1, &zero);
+ d2 = zero;
+ i__1 = *base;
+ for (i = 1; i <= *base; ++i) {
+ d2 += b2;
+/* L30: */
+ }
+ goto L10;
+ }
+/* + END WHILE */
+
+ return 0;
+
+/* End of SLAMC4 */
+
+} /* slamc4_ */
+
+
+/* Subroutine */ int slamc5_(int *beta, int *p, int *emin,
+ int *ieee, int *emax, float *rmax)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLAMC5 attempts to compute RMAX, the largest machine floating-point
+ number, without overflow. It assumes that EMAX + abs(EMIN) sum
+ approximately to a power of 2. It will fail on machines where this
+ assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
+
+ EMAX = 28718). It will also fail if the value supplied for EMIN is
+ too large (i.e. too close to zero), probably with overflow.
+
+ Arguments
+ =========
+
+ BETA (input) INT
+ The base of floating-point arithmetic.
+
+ P (input) INT
+ The number of base BETA digits in the mantissa of a
+ floating-point value.
+
+ EMIN (input) INT
+ The minimum exponent before (gradual) underflow.
+
+ IEEE (input) INT
+ A logical flag specifying whether or not the arithmetic
+ system is thought to comply with the IEEE standard.
+
+ EMAX (output) INT
+ The largest exponent before overflow
+
+ RMAX (output) FLOAT
+ The largest machine floating-point number.
+
+ =====================================================================
+
+
+
+ First compute LEXP and UEXP, two powers of 2 that bound
+ abs(EMIN). We then assume that EMAX + abs(EMIN) will sum
+ approximately to the bound that is closest to abs(EMIN).
+ (EMAX is the exponent of the required number RMAX). */
+ /* Table of constant values */
+ static float c_b5 = 0.f;
+
+ /* System generated locals */
+ int i__1;
+ float r__1;
+ /* Local variables */
+ static int lexp;
+ static float oldy;
+ static int uexp, i;
+ static float y, z;
+ static int nbits;
+ extern double slamc3_(float *, float *);
+ static float recbas;
+ static int exbits, expsum, try__;
+
+
+
+ lexp = 1;
+ exbits = 1;
+L10:
+ try__ = lexp << 1;
+ if (try__ <= -(*emin)) {
+ lexp = try__;
+ ++exbits;
+ goto L10;
+ }
+ if (lexp == -(*emin)) {
+ uexp = lexp;
+ } else {
+ uexp = try__;
+ ++exbits;
+ }
+
+/* Now -LEXP is less than or equal to EMIN, and -UEXP is greater
+ than or equal to EMIN. EXBITS is the number of bits needed to
+ store the exponent. */
+
+ if (uexp + *emin > -lexp - *emin) {
+ expsum = lexp << 1;
+ } else {
+ expsum = uexp << 1;
+ }
+
+/* EXPSUM is the exponent range, approximately equal to
+ EMAX - EMIN + 1 . */
+
+ *emax = expsum + *emin - 1;
+ nbits = exbits + 1 + *p;
+
+/* NBITS is the total number of bits needed to store a
+ floating-point number. */
+
+ if (nbits % 2 == 1 && *beta == 2) {
+
+/* Either there are an odd number of bits used to store a
+ floating-point number, which is unlikely, or some bits are
+
+ not used in the representation of numbers, which is possible
+,
+ (e.g. Cray machines) or the mantissa has an implicit bit,
+ (e.g. IEEE machines, Dec Vax machines), which is perhaps the
+
+ most likely. We have to assume the last alternative.
+ If this is true, then we need to reduce EMAX by one because
+
+ there must be some way of representing zero in an implicit-b
+it
+ system. On machines like Cray, we are reducing EMAX by one
+
+ unnecessarily. */
+
+ --(*emax);
+ }
+
+ if (*ieee) {
+
+/* Assume we are on an IEEE machine which reserves one exponent
+
+ for infinity and NaN. */
+
+ --(*emax);
+ }
+
+/* Now create RMAX, the largest machine number, which should
+ be equal to (1.0 - BETA**(-P)) * BETA**EMAX .
+
+ First compute 1.0 - BETA**(-P), being careful that the
+ result is less than 1.0 . */
+
+ recbas = 1.f / *beta;
+ z = *beta - 1.f;
+ y = 0.f;
+ i__1 = *p;
+ for (i = 1; i <= *p; ++i) {
+ z *= recbas;
+ if (y < 1.f) {
+ oldy = y;
+ }
+ y = slamc3_(&y, &z);
+/* L20: */
+ }
+ if (y >= 1.f) {
+ y = oldy;
+ }
+
+/* Now multiply by BETA**EMAX to get RMAX. */
+
+ i__1 = *emax;
+ for (i = 1; i <= *emax; ++i) {
+ r__1 = y * *beta;
+ y = slamc3_(&r__1, &c_b5);
+/* L30: */
+ }
+
+ *rmax = y;
+ return 0;
+
+/* End of SLAMC5 */
+
+} /* slamc5_ */
+
+
+double pow_ri(float *ap, int *bp)
+{
+double pow, x;
+int n;
+
+pow = 1;
+x = *ap;
+n = *bp;
+
+if(n != 0)
+ {
+ if(n < 0)
+ {
+ n = -n;
+ x = 1/x;
+ }
+ for( ; ; )
+ {
+ if(n & 01)
+ pow *= x;
+ if(n >>= 1)
+ x *= x;
+ else
+ break;
+ }
+ }
+return(pow);
+}
diff --git a/SRC/slangs.c b/SRC/slangs.c
new file mode 100644
index 0000000..63d0d66
--- /dev/null
+++ b/SRC/slangs.c
@@ -0,0 +1,112 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: slangs.c
+ * History: Modified from lapack routine SLANGE
+ */
+#include <math.h>
+#include "ssp_defs.h"
+#include "util.h"
+
+float slangs(char *norm, SuperMatrix *A)
+{
+/*
+ Purpose
+ =======
+
+ SLANGS returns the value of the one norm, or the Frobenius norm, or
+ the infinity norm, or the element of largest absolute value of a
+ real matrix A.
+
+ Description
+ ===========
+
+ SLANGE returns the value
+
+ SLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+ (
+ ( norm1(A), NORM = '1', 'O' or 'o'
+ (
+ ( normI(A), NORM = 'I' or 'i'
+ (
+ ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+
+ where norm1 denotes the one norm of a matrix (maximum column sum),
+ normI denotes the infinity norm of a matrix (maximum row sum) and
+ normF denotes the Frobenius norm of a matrix (square root of sum of
+ squares). Note that max(abs(A(i,j))) is not a matrix norm.
+
+ Arguments
+ =========
+
+ NORM (input) CHARACTER*1
+ Specifies the value to be returned in SLANGE as described above.
+ A (input) SuperMatrix*
+ The M by N sparse matrix A.
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ float *Aval;
+ int i, j, irow;
+ float value, sum;
+ float *rwork;
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ if ( SUPERLU_MIN(A->nrow, A->ncol) == 0) {
+ value = 0.;
+
+ } else if (lsame_(norm, "M")) {
+ /* Find max(abs(A(i,j))). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ value = SUPERLU_MAX( value, fabs( Aval[i]) );
+
+ } else if (lsame_(norm, "O") || *(unsigned char *)norm == '1') {
+ /* Find norm1(A). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ sum = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ sum += fabs(Aval[i]);
+ value = SUPERLU_MAX(value,sum);
+ }
+
+ } else if (lsame_(norm, "I")) {
+ /* Find normI(A). */
+ if ( !(rwork = (float *) SUPERLU_MALLOC(A->nrow * sizeof(float))) )
+ ABORT("SUPERLU_MALLOC fails for rwork.");
+ for (i = 0; i < A->nrow; ++i) rwork[i] = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) {
+ irow = Astore->rowind[i];
+ rwork[irow] += fabs(Aval[i]);
+ }
+ value = 0.;
+ for (i = 0; i < A->nrow; ++i)
+ value = SUPERLU_MAX(value, rwork[i]);
+
+ SUPERLU_FREE (rwork);
+
+ } else if (lsame_(norm, "F") || lsame_(norm, "E")) {
+ /* Find normF(A). */
+ ABORT("Not implemented.");
+ } else
+ ABORT("Illegal norm specified.");
+
+ return (value);
+
+} /* slangs */
+
diff --git a/SRC/slaqgs.c b/SRC/slaqgs.c
new file mode 100644
index 0000000..f5287cb
--- /dev/null
+++ b/SRC/slaqgs.c
@@ -0,0 +1,138 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: slaqgs.c
+ * History: Modified from LAPACK routine SLAQGE
+ */
+#include <math.h>
+#include "ssp_defs.h"
+#include "util.h"
+
+void
+slaqgs(SuperMatrix *A, float *r, float *c,
+ float rowcnd, float colcnd, float amax, char *equed)
+{
+/*
+ Purpose
+ =======
+
+ SLAQGS equilibrates a general sparse M by N matrix A using the row and
+ scaling factors in the vectors R and C.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input/output) SuperMatrix*
+ On exit, the equilibrated matrix. See EQUED for the form of
+ the equilibrated matrix. The type of A can be:
+ Stype = NC; Dtype = SLU_S; Mtype = GE.
+
+ R (input) float*, dimension (A->nrow)
+ The row scale factors for A.
+
+ C (input) float*, dimension (A->ncol)
+ The column scale factors for A.
+
+ ROWCND (input) float
+ Ratio of the smallest R(i) to the largest R(i).
+
+ COLCND (input) float
+ Ratio of the smallest C(i) to the largest C(i).
+
+ AMAX (input) float
+ Absolute value of largest matrix entry.
+
+ EQUED (output) char*
+ Specifies the form of equilibration that was done.
+ = 'N': No equilibration
+ = 'R': Row equilibration, i.e., A has been premultiplied by
+ diag(R).
+ = 'C': Column equilibration, i.e., A has been postmultiplied
+ by diag(C).
+ = 'B': Both row and column equilibration, i.e., A has been
+ replaced by diag(R) * A * diag(C).
+
+ Internal Parameters
+ ===================
+
+ THRESH is a threshold value used to decide if row or column scaling
+ should be done based on the ratio of the row or column scaling
+ factors. If ROWCND < THRESH, row scaling is done, and if
+ COLCND < THRESH, column scaling is done.
+
+ LARGE and SMALL are threshold values used to decide if row scaling
+ should be done based on the absolute size of the largest matrix
+ element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+
+ =====================================================================
+*/
+
+#define THRESH (0.1)
+
+ /* Local variables */
+ NCformat *Astore;
+ float *Aval;
+ int i, j, irow;
+ float large, small, cj;
+ extern double slamch_(char *);
+
+
+ /* Quick return if possible */
+ if (A->nrow <= 0 || A->ncol <= 0) {
+ *(unsigned char *)equed = 'N';
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Initialize LARGE and SMALL. */
+ small = slamch_("Safe minimum") / slamch_("Precision");
+ large = 1. / small;
+
+ if (rowcnd >= THRESH && amax >= small && amax <= large) {
+ if (colcnd >= THRESH)
+ *(unsigned char *)equed = 'N';
+ else {
+ /* Column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ Aval[i] *= cj;
+ }
+ }
+ *(unsigned char *)equed = 'C';
+ }
+ } else if (colcnd >= THRESH) {
+ /* Row scaling, no column scaling */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ Aval[i] *= r[irow];
+ }
+ *(unsigned char *)equed = 'R';
+ } else {
+ /* Row and column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ Aval[i] *= cj * r[irow];
+ }
+ }
+ *(unsigned char *)equed = 'B';
+ }
+
+ return;
+
+} /* slaqgs */
+
diff --git a/SRC/smemory.c b/SRC/smemory.c
new file mode 100644
index 0000000..79da748
--- /dev/null
+++ b/SRC/smemory.c
@@ -0,0 +1,676 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+/* Constants */
+#define NO_MEMTYPE 4 /* 0: lusup;
+ 1: ucol;
+ 2: lsub;
+ 3: usub */
+#define GluIntArray(n) (5 * (n) + 5)
+
+/* Internal prototypes */
+void *sexpand (int *, MemType,int, int, GlobalLU_t *);
+int sLUWorkInit (int, int, int, int **, float **, LU_space_t);
+void copy_mem_float (int, void *, void *);
+void sStackCompress (GlobalLU_t *);
+void sSetupSpace (void *, int, LU_space_t *);
+void *suser_malloc (int, int);
+void suser_free (int, int);
+
+/* External prototypes (in memory.c - prec-indep) */
+extern void copy_mem_int (int, void *, void *);
+extern void user_bcopy (char *, char *, int);
+
+/* Headers for 4 types of dynamatically managed memory */
+typedef struct e_node {
+ int size; /* length of the memory that has been used */
+ void *mem; /* pointer to the new malloc'd store */
+} ExpHeader;
+
+typedef struct {
+ int size;
+ int used;
+ int top1; /* grow upward, relative to &array[0] */
+ int top2; /* grow downward */
+ void *array;
+} LU_stack_t;
+
+/* Variables local to this file */
+static ExpHeader *expanders = 0; /* Array of pointers to 4 types of memory */
+static LU_stack_t stack;
+static int no_expand;
+
+/* Macros to manipulate stack */
+#define StackFull(x) ( x + stack.used >= stack.size )
+#define NotDoubleAlign(addr) ( (long int)addr & 7 )
+#define DoubleAlign(addr) ( ((long int)addr + 7) & ~7L )
+#define TempSpace(m, w) ( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \
+ (w + 1) * m * sizeof(float) )
+#define Reduce(alpha) ((alpha + 1) / 2) /* i.e. (alpha-1)/2 + 1 */
+
+
+
+
+/*
+ * Setup the memory model to be used for factorization.
+ * lwork = 0: use system malloc;
+ * lwork > 0: use user-supplied work[] space.
+ */
+void sSetupSpace(void *work, int lwork, LU_space_t *MemModel)
+{
+ if ( lwork == 0 ) {
+ *MemModel = SYSTEM; /* malloc/free */
+ } else if ( lwork > 0 ) {
+ *MemModel = USER; /* user provided space */
+ stack.used = 0;
+ stack.top1 = 0;
+ stack.top2 = (lwork/4)*4; /* must be word addressable */
+ stack.size = stack.top2;
+ stack.array = (void *) work;
+ }
+}
+
+
+
+void *suser_malloc(int bytes, int which_end)
+{
+ void *buf;
+
+ if ( StackFull(bytes) ) return (NULL);
+
+ if ( which_end == HEAD ) {
+ buf = (char*) stack.array + stack.top1;
+ stack.top1 += bytes;
+ } else {
+ stack.top2 -= bytes;
+ buf = (char*) stack.array + stack.top2;
+ }
+
+ stack.used += bytes;
+ return buf;
+}
+
+
+void suser_free(int bytes, int which_end)
+{
+ if ( which_end == HEAD ) {
+ stack.top1 -= bytes;
+ } else {
+ stack.top2 += bytes;
+ }
+ stack.used -= bytes;
+}
+
+
+
+/*
+ * mem_usage consists of the following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for the L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * Number of memory expansions during the LU factorization.
+ */
+int sQuerySpace(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ register int n, iword, dword, panel_size = sp_ienv(1);
+
+ Lstore = L->Store;
+ Ustore = U->Store;
+ n = L->ncol;
+ iword = sizeof(int);
+ dword = sizeof(float);
+
+ /* For LU factors */
+ mem_usage->for_lu = (float)( (4*n + 3) * iword + Lstore->nzval_colptr[n] *
+ dword + Lstore->rowind_colptr[n] * iword );
+ mem_usage->for_lu += (float)( (n + 1) * iword +
+ Ustore->colptr[n] * (dword + iword) );
+
+ /* Working storage to support factorization */
+ mem_usage->total_needed = mem_usage->for_lu +
+ (float)( (2 * panel_size + 4 + NO_MARKER) * n * iword +
+ (panel_size + 1) * n * dword );
+
+ mem_usage->expansions = --no_expand;
+
+ return 0;
+} /* sQuerySpace */
+
+/*
+ * Allocate storage for the data structures common to all factor routines.
+ * For those unpredictable size, make a guess as FILL * nnz(A).
+ * Return value:
+ * If lwork = -1, return the estimated amount of space required, plus n;
+ * otherwise, return the amount of space actually allocated when
+ * memory allocation failure occurred.
+ */
+int
+sLUMemInit(fact_t fact, void *work, int lwork, int m, int n, int annz,
+ int panel_size, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu,
+ int **iwork, float **dwork)
+{
+ int info, iword, dword;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ float *lusup;
+ int *xlusup;
+ float *ucol;
+ int *usub, *xusub;
+ int nzlmax, nzumax, nzlumax;
+ int FILL = sp_ienv(6);
+
+ Glu->n = n;
+ no_expand = 0;
+ iword = sizeof(int);
+ dword = sizeof(float);
+
+ if ( !expanders )
+ expanders = (ExpHeader*)SUPERLU_MALLOC(NO_MEMTYPE * sizeof(ExpHeader));
+ if ( !expanders ) ABORT("SUPERLU_MALLOC fails for expanders");
+
+ if ( fact != SamePattern_SameRowPerm ) {
+ /* Guess for L\U factors */
+ nzumax = nzlumax = FILL * annz;
+ nzlmax = SUPERLU_MAX(1, FILL/4.) * annz;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else {
+ sSetupSpace(work, lwork, &Glu->MemModel);
+ }
+
+#ifdef DEBUG
+ printf("sLUMemInit() called: annz %d, MemModel %d\n",
+ annz, Glu->MemModel);
+#endif
+
+ /* Integer pointers for L\U factors */
+ if ( Glu->MemModel == SYSTEM ) {
+ xsup = intMalloc(n+1);
+ supno = intMalloc(n+1);
+ xlsub = intMalloc(n+1);
+ xlusup = intMalloc(n+1);
+ xusub = intMalloc(n+1);
+ } else {
+ xsup = (int *)suser_malloc((n+1) * iword, HEAD);
+ supno = (int *)suser_malloc((n+1) * iword, HEAD);
+ xlsub = (int *)suser_malloc((n+1) * iword, HEAD);
+ xlusup = (int *)suser_malloc((n+1) * iword, HEAD);
+ xusub = (int *)suser_malloc((n+1) * iword, HEAD);
+ }
+
+ lusup = (float *) sexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (float *) sexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) sexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) sexpand( &nzumax, USUB, 0, 1, Glu );
+
+ while ( !lusup || !ucol || !lsub || !usub ) {
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE(lusup);
+ SUPERLU_FREE(ucol);
+ SUPERLU_FREE(lsub);
+ SUPERLU_FREE(usub);
+ } else {
+ suser_free((nzlumax+nzumax)*dword+(nzlmax+nzumax)*iword, HEAD);
+ }
+ nzlumax /= 2;
+ nzumax /= 2;
+ nzlmax /= 2;
+ if ( nzlumax < annz ) {
+ printf("Not enough memory to perform factorization.\n");
+ return (smemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+ }
+ lusup = (float *) sexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (float *) sexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) sexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) sexpand( &nzumax, USUB, 0, 1, Glu );
+ }
+
+ } else {
+ /* fact == SamePattern_SameRowPerm */
+ Lstore = L->Store;
+ Ustore = U->Store;
+ xsup = Lstore->sup_to_col;
+ supno = Lstore->col_to_sup;
+ xlsub = Lstore->rowind_colptr;
+ xlusup = Lstore->nzval_colptr;
+ xusub = Ustore->colptr;
+ nzlmax = Glu->nzlmax; /* max from previous factorization */
+ nzumax = Glu->nzumax;
+ nzlumax = Glu->nzlumax;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else if ( lwork == 0 ) {
+ Glu->MemModel = SYSTEM;
+ } else {
+ Glu->MemModel = USER;
+ stack.top2 = (lwork/4)*4; /* must be word-addressable */
+ stack.size = stack.top2;
+ }
+
+ lsub = expanders[LSUB].mem = Lstore->rowind;
+ lusup = expanders[LUSUP].mem = Lstore->nzval;
+ usub = expanders[USUB].mem = Ustore->rowind;
+ ucol = expanders[UCOL].mem = Ustore->nzval;;
+ expanders[LSUB].size = nzlmax;
+ expanders[LUSUP].size = nzlumax;
+ expanders[USUB].size = nzumax;
+ expanders[UCOL].size = nzumax;
+ }
+
+ Glu->xsup = xsup;
+ Glu->supno = supno;
+ Glu->lsub = lsub;
+ Glu->xlsub = xlsub;
+ Glu->lusup = lusup;
+ Glu->xlusup = xlusup;
+ Glu->ucol = ucol;
+ Glu->usub = usub;
+ Glu->xusub = xusub;
+ Glu->nzlmax = nzlmax;
+ Glu->nzumax = nzumax;
+ Glu->nzlumax = nzlumax;
+
+ info = sLUWorkInit(m, n, panel_size, iwork, dwork, Glu->MemModel);
+ if ( info )
+ return ( info + smemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+
+ ++no_expand;
+ return 0;
+
+} /* sLUMemInit */
+
+/* Allocate known working storage. Returns 0 if success, otherwise
+ returns the number of bytes allocated so far when failure occurred. */
+int
+sLUWorkInit(int m, int n, int panel_size, int **iworkptr,
+ float **dworkptr, LU_space_t MemModel)
+{
+ int isize, dsize, extra;
+ float *old_ptr;
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+
+ isize = ( (2 * panel_size + 3 + NO_MARKER ) * m + n ) * sizeof(int);
+ dsize = (m * panel_size +
+ NUM_TEMPV(m,panel_size,maxsuper,rowblk)) * sizeof(float);
+
+ if ( MemModel == SYSTEM )
+ *iworkptr = (int *) intCalloc(isize/sizeof(int));
+ else
+ *iworkptr = (int *) suser_malloc(isize, TAIL);
+ if ( ! *iworkptr ) {
+ fprintf(stderr, "sLUWorkInit: malloc fails for local iworkptr[]\n");
+ return (isize + n);
+ }
+
+ if ( MemModel == SYSTEM )
+ *dworkptr = (float *) SUPERLU_MALLOC(dsize);
+ else {
+ *dworkptr = (float *) suser_malloc(dsize, TAIL);
+ if ( NotDoubleAlign(*dworkptr) ) {
+ old_ptr = *dworkptr;
+ *dworkptr = (float*) DoubleAlign(*dworkptr);
+ *dworkptr = (float*) ((double*)*dworkptr - 1);
+ extra = (char*)old_ptr - (char*)*dworkptr;
+#ifdef DEBUG
+ printf("sLUWorkInit: not aligned, extra %d\n", extra);
+#endif
+ stack.top2 -= extra;
+ stack.used += extra;
+ }
+ }
+ if ( ! *dworkptr ) {
+ fprintf(stderr, "malloc fails for local dworkptr[].");
+ return (isize + dsize + n);
+ }
+
+ return 0;
+}
+
+
+/*
+ * Set up pointers for real working arrays.
+ */
+void
+sSetRWork(int m, int panel_size, float *dworkptr,
+ float **dense, float **tempv)
+{
+ float zero = 0.0;
+
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+ *dense = dworkptr;
+ *tempv = *dense + panel_size*m;
+ sfill (*dense, m * panel_size, zero);
+ sfill (*tempv, NUM_TEMPV(m,panel_size,maxsuper,rowblk), zero);
+}
+
+/*
+ * Free the working storage used by factor routines.
+ */
+void sLUWorkFree(int *iwork, float *dwork, GlobalLU_t *Glu)
+{
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE (iwork);
+ SUPERLU_FREE (dwork);
+ } else {
+ stack.used -= (stack.size - stack.top2);
+ stack.top2 = stack.size;
+/* sStackCompress(Glu); */
+ }
+
+ SUPERLU_FREE (expanders);
+ expanders = 0;
+}
+
+/* Expand the data structures for L and U during the factorization.
+ * Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+sLUMemXpand(int jcol,
+ int next, /* number of elements currently in the factors */
+ MemType mem_type, /* which type of memory to expand */
+ int *maxlen, /* modified - maximum length of a data structure */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ void *new_mem;
+
+#ifdef DEBUG
+ printf("sLUMemXpand(): jcol %d, next %d, maxlen %d, MemType %d\n",
+ jcol, next, *maxlen, mem_type);
+#endif
+
+ if (mem_type == USUB)
+ new_mem = sexpand(maxlen, mem_type, next, 1, Glu);
+ else
+ new_mem = sexpand(maxlen, mem_type, next, 0, Glu);
+
+ if ( !new_mem ) {
+ int nzlmax = Glu->nzlmax;
+ int nzumax = Glu->nzumax;
+ int nzlumax = Glu->nzlumax;
+ fprintf(stderr, "Can't expand MemType %d: jcol %d\n", mem_type, jcol);
+ return (smemory_usage(nzlmax, nzumax, nzlumax, Glu->n) + Glu->n);
+ }
+
+ switch ( mem_type ) {
+ case LUSUP:
+ Glu->lusup = (float *) new_mem;
+ Glu->nzlumax = *maxlen;
+ break;
+ case UCOL:
+ Glu->ucol = (float *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ case LSUB:
+ Glu->lsub = (int *) new_mem;
+ Glu->nzlmax = *maxlen;
+ break;
+ case USUB:
+ Glu->usub = (int *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ }
+
+ return 0;
+
+}
+
+
+
+void
+copy_mem_float(int howmany, void *old, void *new)
+{
+ register int i;
+ float *dold = old;
+ float *dnew = new;
+ for (i = 0; i < howmany; i++) dnew[i] = dold[i];
+}
+
+/*
+ * Expand the existing storage to accommodate more fill-ins.
+ */
+void
+*sexpand (
+ int *prev_len, /* length used from previous call */
+ MemType type, /* which part of the memory to expand */
+ int len_to_copy, /* size of the memory to be copied to new store */
+ int keep_prev, /* = 1: use prev_len;
+ = 0: compute new_len to expand */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ float EXPAND = 1.5;
+ float alpha;
+ void *new_mem, *old_mem;
+ int new_len, tries, lword, extra, bytes_to_copy;
+
+ alpha = EXPAND;
+
+ if ( no_expand == 0 || keep_prev ) /* First time allocate requested */
+ new_len = *prev_len;
+ else {
+ new_len = alpha * *prev_len;
+ }
+
+ if ( type == LSUB || type == USUB ) lword = sizeof(int);
+ else lword = sizeof(float);
+
+ if ( Glu->MemModel == SYSTEM ) {
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ if ( no_expand != 0 ) {
+ tries = 0;
+ if ( keep_prev ) {
+ if ( !new_mem ) return (NULL);
+ } else {
+ while ( !new_mem ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ }
+ }
+ if ( type == LSUB || type == USUB ) {
+ copy_mem_int(len_to_copy, expanders[type].mem, new_mem);
+ } else {
+ copy_mem_float(len_to_copy, expanders[type].mem, new_mem);
+ }
+ SUPERLU_FREE (expanders[type].mem);
+ }
+ expanders[type].mem = (void *) new_mem;
+
+ } else { /* MemModel == USER */
+ if ( no_expand == 0 ) {
+ new_mem = suser_malloc(new_len * lword, HEAD);
+ if ( NotDoubleAlign(new_mem) &&
+ (type == LUSUP || type == UCOL) ) {
+ old_mem = new_mem;
+ new_mem = (void *)DoubleAlign(new_mem);
+ extra = (char*)new_mem - (char*)old_mem;
+#ifdef DEBUG
+ printf("expand(): not aligned, extra %d\n", extra);
+#endif
+ stack.top1 += extra;
+ stack.used += extra;
+ }
+ expanders[type].mem = (void *) new_mem;
+ }
+ else {
+ tries = 0;
+ extra = (new_len - *prev_len) * lword;
+ if ( keep_prev ) {
+ if ( StackFull(extra) ) return (NULL);
+ } else {
+ while ( StackFull(extra) ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ extra = (new_len - *prev_len) * lword;
+ }
+ }
+
+ if ( type != USUB ) {
+ new_mem = (void*)((char*)expanders[type + 1].mem + extra);
+ bytes_to_copy = (char*)stack.array + stack.top1
+ - (char*)expanders[type + 1].mem;
+ user_bcopy(expanders[type+1].mem, new_mem, bytes_to_copy);
+
+ if ( type < USUB ) {
+ Glu->usub = expanders[USUB].mem =
+ (void*)((char*)expanders[USUB].mem + extra);
+ }
+ if ( type < LSUB ) {
+ Glu->lsub = expanders[LSUB].mem =
+ (void*)((char*)expanders[LSUB].mem + extra);
+ }
+ if ( type < UCOL ) {
+ Glu->ucol = expanders[UCOL].mem =
+ (void*)((char*)expanders[UCOL].mem + extra);
+ }
+ stack.top1 += extra;
+ stack.used += extra;
+ if ( type == UCOL ) {
+ stack.top1 += extra; /* Add same amount for USUB */
+ stack.used += extra;
+ }
+
+ } /* if ... */
+
+ } /* else ... */
+ }
+
+ expanders[type].size = new_len;
+ *prev_len = new_len;
+ if ( no_expand ) ++no_expand;
+
+ return (void *) expanders[type].mem;
+
+} /* sexpand */
+
+
+/*
+ * Compress the work[] array to remove fragmentation.
+ */
+void
+sStackCompress(GlobalLU_t *Glu)
+{
+ register int iword, dword, ndim;
+ char *last, *fragment;
+ int *ifrom, *ito;
+ float *dfrom, *dto;
+ int *xlsub, *lsub, *xusub, *usub, *xlusup;
+ float *ucol, *lusup;
+
+ iword = sizeof(int);
+ dword = sizeof(float);
+ ndim = Glu->n;
+
+ xlsub = Glu->xlsub;
+ lsub = Glu->lsub;
+ xusub = Glu->xusub;
+ usub = Glu->usub;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ lusup = Glu->lusup;
+
+ dfrom = ucol;
+ dto = (float *)((char*)lusup + xlusup[ndim] * dword);
+ copy_mem_float(xusub[ndim], dfrom, dto);
+ ucol = dto;
+
+ ifrom = lsub;
+ ito = (int *) ((char*)ucol + xusub[ndim] * iword);
+ copy_mem_int(xlsub[ndim], ifrom, ito);
+ lsub = ito;
+
+ ifrom = usub;
+ ito = (int *) ((char*)lsub + xlsub[ndim] * iword);
+ copy_mem_int(xusub[ndim], ifrom, ito);
+ usub = ito;
+
+ last = (char*)usub + xusub[ndim] * iword;
+ fragment = (char*) (((char*)stack.array + stack.top1) - last);
+ stack.used -= (long int) fragment;
+ stack.top1 -= (long int) fragment;
+
+ Glu->ucol = ucol;
+ Glu->lsub = lsub;
+ Glu->usub = usub;
+
+#ifdef DEBUG
+ printf("sStackCompress: fragment %d\n", fragment);
+ /* for (last = 0; last < ndim; ++last)
+ print_lu_col("After compress:", last, 0);*/
+#endif
+
+}
+
+/*
+ * Allocate storage for original matrix A
+ */
+void
+sallocateA(int n, int nnz, float **a, int **asub, int **xa)
+{
+ *a = (float *) floatMalloc(nnz);
+ *asub = (int *) intMalloc(nnz);
+ *xa = (int *) intMalloc(n+1);
+}
+
+
+float *floatMalloc(int n)
+{
+ float *buf;
+ buf = (float *) SUPERLU_MALLOC(n * sizeof(float));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in floatMalloc()\n");
+ }
+ return (buf);
+}
+
+float *floatCalloc(int n)
+{
+ float *buf;
+ register int i;
+ float zero = 0.0;
+ buf = (float *) SUPERLU_MALLOC(n * sizeof(float));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in floatCalloc()\n");
+ }
+ for (i = 0; i < n; ++i) buf[i] = zero;
+ return (buf);
+}
+
+
+int smemory_usage(const int nzlmax, const int nzumax,
+ const int nzlumax, const int n)
+{
+ register int iword, dword;
+
+ iword = sizeof(int);
+ dword = sizeof(float);
+
+ return (10 * n * iword +
+ nzlmax * iword + nzumax * (iword + dword) + nzlumax * dword);
+
+}
diff --git a/SRC/smyblas2.c b/SRC/smyblas2.c
new file mode 100644
index 0000000..729e17f
--- /dev/null
+++ b/SRC/smyblas2.c
@@ -0,0 +1,225 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: smyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void slsolve ( int ldm, int ncol, float *M, float *rhs )
+{
+ int k;
+ float x0, x1, x2, x3, x4, x5, x6, x7;
+ float *M0;
+ register float *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+ Mki4 = Mki3 + ldm + 1;
+ Mki5 = Mki4 + ldm + 1;
+ Mki6 = Mki5 + ldm + 1;
+ Mki7 = Mki6 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+ x4 = rhs[firstcol+4] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++;
+ x5 = rhs[firstcol+5] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++;
+ x6 = rhs[firstcol+6] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++;
+ x7 = rhs[firstcol+7] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++
+ - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ rhs[++firstcol] = x4;
+ rhs[++firstcol] = x5;
+ rhs[++firstcol] = x6;
+ rhs[++firstcol] = x7;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++
+ - x4 * *Mki4++ - x5 * *Mki5++
+ - x6 * *Mki6++ - x7 * *Mki7++;
+
+ M0 += 8 * ldm + 8;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+ x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++;
+ x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++;
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++
+ - x2 * *Mki2++ - x3 * *Mki3++;
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ x1 = rhs[firstcol+1] - x0 * *Mki0++;
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++)
+ rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++;
+
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+susolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+float *M; /* in */
+float *rhs; /* modified */
+{
+ float xj;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ xj = rhs[jcol] / M[jcol + jcol*ldm]; /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++)
+ rhs[irow] -= xj * M[irow + jcol*ldm]; /* M(irow, jcol) */
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void smatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+float *M; /* in */
+float *vec; /* in */
+float *Mxvec; /* in/out */
+
+{
+ float vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7;
+ float *M0;
+ register float *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+ while ( firstcol < ncol - 7 ) { /* Do 8 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+ Mki4 = Mki3 + ldm;
+ Mki5 = Mki4 + ldm;
+ Mki6 = Mki5 + ldm;
+ Mki7 = Mki6 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ vi4 = vec[firstcol++];
+ vi5 = vec[firstcol++];
+ vi6 = vec[firstcol++];
+ vi7 = vec[firstcol++];
+
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++
+ + vi4 * *Mki4++ + vi5 * *Mki5++
+ + vi6 * *Mki6++ + vi7 * *Mki7++;
+
+ M0 += 8 * ldm;
+ }
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++
+ + vi2 * *Mki2++ + vi3 * *Mki3++ ;
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++)
+ Mxvec[k] += vi0 * *Mki0++;
+
+ M0 += ldm;
+ }
+
+}
+
diff --git a/SRC/sp_coletree.c b/SRC/sp_coletree.c
new file mode 100644
index 0000000..8f65623
--- /dev/null
+++ b/SRC/sp_coletree.c
@@ -0,0 +1,332 @@
+
+/* Elimination tree computation and layout routines */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "dsp_defs.h"
+
+/*
+ * Implementation of disjoint set union routines.
+ * Elements are integers in 0..n-1, and the
+ * names of the sets themselves are of type int.
+ *
+ * Calls are:
+ * initialize_disjoint_sets (n) initial call.
+ * s = make_set (i) returns a set containing only i.
+ * s = link (t, u) returns s = t union u, destroying t and u.
+ * s = find (i) return name of set containing i.
+ * finalize_disjoint_sets final call.
+ *
+ * This implementation uses path compression but not weighted union.
+ * See Tarjan's book for details.
+ * John Gilbert, CMI, 1987.
+ *
+ * Implemented path-halving by XSL 07/05/95.
+ */
+
+static int *pp; /* parent array for sets */
+
+static
+int *mxCallocInt(int n)
+{
+ register int i;
+ int *buf;
+
+ buf = (int *) SUPERLU_MALLOC( n * sizeof(int) );
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC fails for buf in mxCallocInt()");
+ }
+ for (i = 0; i < n; i++) buf[i] = 0;
+ return (buf);
+}
+
+static
+void initialize_disjoint_sets (
+ int n
+ )
+{
+ pp = mxCallocInt(n);
+}
+
+
+static
+int make_set (
+ int i
+ )
+{
+ pp[i] = i;
+ return i;
+}
+
+
+static
+int link (
+ int s,
+ int t
+ )
+{
+ pp[s] = t;
+ return t;
+}
+
+
+/* PATH HALVING */
+static
+int find (int i)
+{
+ register int p, gp;
+
+ p = pp[i];
+ gp = pp[p];
+ while (gp != p) {
+ pp[i] = gp;
+ i = gp;
+ p = pp[i];
+ gp = pp[p];
+ }
+ return (p);
+}
+
+#if 0
+/* PATH COMPRESSION */
+static
+int find (
+ int i
+ )
+{
+ if (pp[i] != i)
+ pp[i] = find (pp[i]);
+ return pp[i];
+}
+#endif
+
+static
+void finalize_disjoint_sets (
+ void
+ )
+{
+ SUPERLU_FREE(pp);
+}
+
+
+/*
+ * Find the elimination tree for A'*A.
+ * This uses something similar to Liu's algorithm.
+ * It runs in time O(nz(A)*log n) and does not form A'*A.
+ *
+ * Input:
+ * Sparse matrix A. Numeric values are ignored, so any
+ * explicit zeros are treated as nonzero.
+ * Output:
+ * Integer array of parents representing the elimination
+ * tree of the symbolic product A'*A. Each vertex is a
+ * column of A, and nc means a root of the elimination forest.
+ *
+ * John R. Gilbert, Xerox, 10 Dec 1990
+ * Based on code by JRG dated 1987, 1988, and 1990.
+ */
+
+/*
+ * Nonsymmetric elimination tree
+ */
+int
+sp_coletree(
+ int *acolst, int *acolend, /* column start and end past 1 */
+ int *arow, /* row indices of A */
+ int nr, int nc, /* dimension of A */
+ int *parent /* parent in elim tree */
+ )
+{
+ int *root; /* root of subtee of etree */
+ int *firstcol; /* first nonzero col in each row*/
+ int rset, cset;
+ int row, col;
+ int rroot;
+ int p;
+
+ root = mxCallocInt (nc);
+ initialize_disjoint_sets (nc);
+
+ /* Compute firstcol[row] = first nonzero column in row */
+
+ firstcol = mxCallocInt (nr);
+ for (row = 0; row < nr; firstcol[row++] = nc);
+ for (col = 0; col < nc; col++)
+ for (p = acolst[col]; p < acolend[col]; p++) {
+ row = arow[p];
+ firstcol[row] = SUPERLU_MIN(firstcol[row], col);
+ }
+
+ /* Compute etree by Liu's algorithm for symmetric matrices,
+ except use (firstcol[r],c) in place of an edge (r,c) of A.
+ Thus each row clique in A'*A is replaced by a star
+ centered at its first vertex, which has the same fill. */
+
+ for (col = 0; col < nc; col++) {
+ cset = make_set (col);
+ root[cset] = col;
+ parent[col] = nc; /* Matlab */
+ for (p = acolst[col]; p < acolend[col]; p++) {
+ row = firstcol[arow[p]];
+ if (row >= col) continue;
+ rset = find (row);
+ rroot = root[rset];
+ if (rroot != col) {
+ parent[rroot] = col;
+ cset = link (cset, rset);
+ root[cset] = col;
+ }
+ }
+ }
+
+ SUPERLU_FREE (root);
+ SUPERLU_FREE (firstcol);
+ finalize_disjoint_sets ();
+ return 0;
+}
+
+/*
+ * q = TreePostorder (n, p);
+ *
+ * Postorder a tree.
+ * Input:
+ * p is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to n-1; p[root]==n.
+ * Output:
+ * q is a vector indexed by 0..n-1 such that q[i] is the
+ * i-th vertex in a postorder numbering of the tree.
+ *
+ * ( 2/7/95 modified by X.Li:
+ * q is a vector indexed by 0:n-1 such that vertex i is the
+ * q[i]-th vertex in a postorder numbering of the tree.
+ * That is, this is the inverse of the previous q. )
+ *
+ * In the child structure, lower-numbered children are represented
+ * first, so that a tree which is already numbered in postorder
+ * will not have its order changed.
+ *
+ * Written by John Gilbert, Xerox, 10 Dec 1990.
+ * Based on code written by John Gilbert at CMI in 1987.
+ */
+
+static int *first_kid, *next_kid; /* Linked list of children. */
+static int *post, postnum;
+
+static
+/*
+ * Depth-first search from vertex v.
+ */
+void etdfs (
+ int v
+ )
+{
+ int w;
+
+ for (w = first_kid[v]; w != -1; w = next_kid[w]) {
+ etdfs (w);
+ }
+ /* post[postnum++] = v; in Matlab */
+ post[v] = postnum++; /* Modified by X.Li on 2/14/95 */
+}
+
+
+/*
+ * Post order a tree
+ */
+int *TreePostorder(
+ int n,
+ int *parent
+)
+{
+ int v, dad;
+
+ /* Allocate storage for working arrays and results */
+ first_kid = mxCallocInt (n+1);
+ next_kid = mxCallocInt (n+1);
+ post = mxCallocInt (n+1);
+
+ /* Set up structure describing children */
+ for (v = 0; v <= n; first_kid[v++] = -1);
+ for (v = n-1; v >= 0; v--) {
+ dad = parent[v];
+ next_kid[v] = first_kid[dad];
+ first_kid[dad] = v;
+ }
+
+ /* Depth-first search from dummy root vertex #n */
+ postnum = 0;
+ etdfs (n);
+
+ SUPERLU_FREE (first_kid);
+ SUPERLU_FREE (next_kid);
+ return post;
+}
+
+
+/*
+ * p = spsymetree (A);
+ *
+ * Find the elimination tree for symmetric matrix A.
+ * This uses Liu's algorithm, and runs in time O(nz*log n).
+ *
+ * Input:
+ * Square sparse matrix A. No check is made for symmetry;
+ * elements below and on the diagonal are ignored.
+ * Numeric values are ignored, so any explicit zeros are
+ * treated as nonzero.
+ * Output:
+ * Integer array of parents representing the etree, with n
+ * meaning a root of the elimination forest.
+ * Note:
+ * This routine uses only the upper triangle, while sparse
+ * Cholesky (as in spchol.c) uses only the lower. Matlab's
+ * dense Cholesky uses only the upper. This routine could
+ * be modified to use the lower triangle either by transposing
+ * the matrix or by traversing it by rows with auxiliary
+ * pointer and link arrays.
+ *
+ * John R. Gilbert, Xerox, 10 Dec 1990
+ * Based on code by JRG dated 1987, 1988, and 1990.
+ * Modified by X.S. Li, November 1999.
+ */
+
+/*
+ * Symmetric elimination tree
+ */
+int
+sp_symetree(
+ int *acolst, int *acolend, /* column starts and ends past 1 */
+ int *arow, /* row indices of A */
+ int n, /* dimension of A */
+ int *parent /* parent in elim tree */
+ )
+{
+ int *root; /* root of subtree of etree */
+ int rset, cset;
+ int row, col;
+ int rroot;
+ int p;
+
+ root = mxCallocInt (n);
+ initialize_disjoint_sets (n);
+
+ for (col = 0; col < n; col++) {
+ cset = make_set (col);
+ root[cset] = col;
+ parent[col] = n; /* Matlab */
+ for (p = acolst[col]; p < acolend[col]; p++) {
+ row = arow[p];
+ if (row >= col) continue;
+ rset = find (row);
+ rroot = root[rset];
+ if (rroot != col) {
+ parent[rroot] = col;
+ cset = link (cset, rset);
+ root[cset] = col;
+ }
+ }
+ }
+ SUPERLU_FREE (root);
+ finalize_disjoint_sets ();
+ return 0;
+} /* SP_SYMETREE */
diff --git a/SRC/sp_ienv.c b/SRC/sp_ienv.c
new file mode 100644
index 0000000..516b7b2
--- /dev/null
+++ b/SRC/sp_ienv.c
@@ -0,0 +1,61 @@
+/*
+ * File name: sp_ienv.c
+ * History: Modified from lapack routine ILAENV
+ */
+int
+sp_ienv(int ispec)
+{
+/*
+ Purpose
+ =======
+
+ sp_ienv() is inquired to choose machine-dependent parameters for the
+ local environment. See ISPEC for a description of the parameters.
+
+ This version provides a set of parameters which should give good,
+ but not optimal, performance on many of the currently available
+ computers. Users are encouraged to modify this subroutine to set
+ the tuning parameters for their particular machine using the option
+ and problem size information in the arguments.
+
+ Arguments
+ =========
+
+ ISPEC (input) int
+ Specifies the parameter to be returned as the value of SP_IENV.
+ = 1: the panel size w; a panel consists of w consecutive
+ columns of matrix A in the process of Gaussian elimination.
+ The best value depends on machine's cache characters.
+ = 2: the relaxation parameter relax; if the number of
+ nodes (columns) in a subtree of the elimination tree is less
+ than relax, this subtree is considered as one supernode,
+ regardless of their row structures.
+ = 3: the maximum size for a supernode;
+ = 4: the minimum row dimension for 2-D blocking to be used;
+ = 5: the minimum column dimension for 2-D blocking to be used;
+ = 6: the estimated fills factor for L and U, compared with A;
+
+ (SP_IENV) (output) int
+ >= 0: the value of the parameter specified by ISPEC
+ < 0: if SP_IENV = -k, the k-th argument had an illegal value.
+
+ =====================================================================
+*/
+ int i;
+
+ switch (ispec) {
+ case 1: return (10);
+ case 2: return (5);
+ case 3: return (100);
+ case 4: return (200);
+ case 5: return (40);
+ case 6: return (20);
+ }
+
+ /* Invalid value for ISPEC */
+ i = 1;
+ xerbla_("sp_ienv", &i);
+ return 0;
+
+} /* sp_ienv_ */
+
diff --git a/SRC/sp_preorder.c b/SRC/sp_preorder.c
new file mode 100644
index 0000000..17ad84c
--- /dev/null
+++ b/SRC/sp_preorder.c
@@ -0,0 +1,203 @@
+#include "dsp_defs.h"
+
+void
+sp_preorder(superlu_options_t *options, SuperMatrix *A, int *perm_c,
+ int *etree, SuperMatrix *AC)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_preorder() permutes the columns of the original matrix. It performs
+ * the following steps:
+ *
+ * 1. Apply column permutation perm_c[] to A's column pointers to form AC;
+ *
+ * 2. If options->Fact = DOFACT, then
+ * (1) Compute column elimination tree etree[] of AC'AC;
+ * (2) Post order etree[] to get a postordered elimination tree etree[],
+ * and a postorder permutation post[];
+ * (3) Apply post[] permutation to columns of AC;
+ * (4) Overwrite perm_c[] with the product perm_c * post.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * Specifies whether or not the elimination tree will be re-used.
+ * If options->Fact == DOFACT, this means first time factor A,
+ * etree is computed, postered, and output.
+ * Otherwise, re-factor A, etree is input, unchanged on exit.
+ *
+ * A (input) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of the linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = NC or SLU_NCP; Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * perm_c (input/output) int*
+ * Column permutation vector of size A->ncol, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ * If options->Fact == DOFACT, perm_c is both input and output.
+ * On output, it is changed according to a postorder of etree.
+ * Otherwise, perm_c is input.
+ *
+ * etree (input/output) int*
+ * Elimination tree of Pc'*A'*A*Pc, dimension A->ncol.
+ * If options->Fact == DOFACT, etree is an output argument,
+ * otherwise it is an input argument.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ *
+ * AC (output) SuperMatrix*
+ * The resulting matrix after applied the column permutation
+ * perm_c[] to matrix A. The type of AC can be:
+ * Stype = SLU_NCP; Dtype = A->Dtype; Mtype = SLU_GE.
+ *
+ */
+
+ NCformat *Astore;
+ NCPformat *ACstore;
+ int *iwork, *post;
+ register int n, i;
+
+ n = A->ncol;
+
+ /* Apply column permutation perm_c to A's column pointers so to
+ obtain NCP format in AC = A*Pc. */
+ AC->Stype = SLU_NCP;
+ AC->Dtype = A->Dtype;
+ AC->Mtype = A->Mtype;
+ AC->nrow = A->nrow;
+ AC->ncol = A->ncol;
+ Astore = A->Store;
+ ACstore = AC->Store = (void *) SUPERLU_MALLOC( sizeof(NCPformat) );
+ if ( !ACstore ) ABORT("SUPERLU_MALLOC fails for ACstore");
+ ACstore->nnz = Astore->nnz;
+ ACstore->nzval = Astore->nzval;
+ ACstore->rowind = Astore->rowind;
+ ACstore->colbeg = (int*) SUPERLU_MALLOC(n*sizeof(int));
+ if ( !(ACstore->colbeg) ) ABORT("SUPERLU_MALLOC fails for ACstore->colbeg");
+ ACstore->colend = (int*) SUPERLU_MALLOC(n*sizeof(int));
+ if ( !(ACstore->colend) ) ABORT("SUPERLU_MALLOC fails for ACstore->colend");
+
+#ifdef DEBUG
+ print_int_vec("pre_order:", n, perm_c);
+ check_perm("Initial perm_c", n, perm_c);
+#endif
+
+ for (i = 0; i < n; i++) {
+ ACstore->colbeg[perm_c[i]] = Astore->colptr[i];
+ ACstore->colend[perm_c[i]] = Astore->colptr[i+1];
+ }
+
+ if ( options->Fact == DOFACT ) {
+#undef ETREE_ATplusA
+#ifdef ETREE_ATplusA
+ /*--------------------------------------------
+ COMPUTE THE ETREE OF Pc*(A'+A)*Pc'.
+ --------------------------------------------*/
+ int *b_colptr, *b_rowind, bnz, j;
+ int *c_colbeg, *c_colend;
+
+ /*printf("Use etree(A'+A)\n");*/
+
+ /* Form B = A + A'. */
+ at_plus_a(n, Astore->nnz, Astore->colptr, Astore->rowind,
+ &bnz, &b_colptr, &b_rowind);
+
+ /* Form C = Pc*B*Pc'. */
+ c_colbeg = (int*) SUPERLU_MALLOC(2*n*sizeof(int));
+ c_colend = c_colbeg + n;
+ if (!c_colbeg ) ABORT("SUPERLU_MALLOC fails for c_colbeg/c_colend");
+ for (i = 0; i < n; i++) {
+ c_colbeg[perm_c[i]] = b_colptr[i];
+ c_colend[perm_c[i]] = b_colptr[i+1];
+ }
+ for (j = 0; j < n; ++j) {
+ for (i = c_colbeg[j]; i < c_colend[j]; ++i) {
+ b_rowind[i] = perm_c[b_rowind[i]];
+ }
+ }
+
+ /* Compute etree of C. */
+ sp_symetree(c_colbeg, c_colend, b_rowind, n, etree);
+
+ SUPERLU_FREE(b_colptr);
+ if ( bnz ) SUPERLU_FREE(b_rowind);
+ SUPERLU_FREE(c_colbeg);
+
+#else
+ /*--------------------------------------------
+ COMPUTE THE COLUMN ELIMINATION TREE.
+ --------------------------------------------*/
+ sp_coletree(ACstore->colbeg, ACstore->colend, ACstore->rowind,
+ A->nrow, A->ncol, etree);
+#endif
+#ifdef DEBUG
+ print_int_vec("etree:", n, etree);
+#endif
+
+ /* In symmetric mode, do not do postorder here. */
+ if ( options->SymmetricMode == NO ) {
+ /* Post order etree */
+ post = (int *) TreePostorder(n, etree);
+ /* for (i = 0; i < n+1; ++i) inv_post[post[i]] = i;
+ iwork = post; */
+
+#ifdef DEBUG
+ print_int_vec("post:", n+1, post);
+ check_perm("post", n, post);
+#endif
+ iwork = (int*) SUPERLU_MALLOC((n+1)*sizeof(int));
+ if ( !iwork ) ABORT("SUPERLU_MALLOC fails for iwork[]");
+
+ /* Renumber etree in postorder */
+ for (i = 0; i < n; ++i) iwork[post[i]] = post[etree[i]];
+ for (i = 0; i < n; ++i) etree[i] = iwork[i];
+
+#ifdef DEBUG
+ print_int_vec("postorder etree:", n, etree);
+#endif
+
+ /* Postmultiply A*Pc by post[] */
+ for (i = 0; i < n; ++i) iwork[post[i]] = ACstore->colbeg[i];
+ for (i = 0; i < n; ++i) ACstore->colbeg[i] = iwork[i];
+ for (i = 0; i < n; ++i) iwork[post[i]] = ACstore->colend[i];
+ for (i = 0; i < n; ++i) ACstore->colend[i] = iwork[i];
+
+ for (i = 0; i < n; ++i)
+ iwork[i] = post[perm_c[i]]; /* product of perm_c and post */
+ for (i = 0; i < n; ++i) perm_c[i] = iwork[i];
+
+#ifdef DEBUG
+ print_int_vec("Pc*post:", n, perm_c);
+ check_perm("final perm_c", n, perm_c);
+#endif
+ SUPERLU_FREE (post);
+ SUPERLU_FREE (iwork);
+ } /* end postordering */
+
+ } /* if options->Fact == DOFACT ... */
+
+}
+
+int check_perm(char *what, int n, int *perm)
+{
+ register int i;
+ int *marker;
+ marker = (int *) calloc(n, sizeof(int));
+
+ for (i = 0; i < n; ++i) {
+ if ( marker[perm[i]] == 1 || perm[i] >= n ) {
+ printf("%s: Not a valid PERM[%d] = %d\n", what, i, perm[i]);
+ ABORT("check_perm");
+ } else {
+ marker[perm[i]] = 1;
+ }
+ }
+
+ SUPERLU_FREE(marker);
+ return 0;
+}
diff --git a/SRC/spanel_bmod.c b/SRC/spanel_bmod.c
new file mode 100644
index 0000000..7cfbc28
--- /dev/null
+++ b/SRC/spanel_bmod.c
@@ -0,0 +1,450 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "ssp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void slsolve(int, int, float *, float *);
+void smatvec(int, int, int, float *, float *, float *);
+extern void scheck_tempv();
+
+void
+spanel_bmod (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ const int nseg, /* in */
+ float *dense, /* out, of size n by w */
+ float *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in, of size n by w */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs numeric block updates (sup-panel) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ * Before entering this routine, the original nonzeros in the panel
+ * were already copied into the spa[m,w].
+ *
+ * Updated/Output parameters-
+ * dense[0:m-1,w]: L[*,j:j+w-1] and U[*,j:j+w-1] are returned
+ * collectively in the m-by-w vector dense[*].
+ *
+ */
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ float alpha, beta;
+#endif
+
+ register int k, ksub;
+ int fsupc, nsupc, nsupr, nrow;
+ int krep, krep_ind;
+ float ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int segsze;
+ int block_nrow; /* no of rows in a block row */
+ register int lptr; /* Points to the row subscripts of a supernode */
+ int kfnz, irow, no_zeros;
+ register int isub, isub1, i;
+ register int jj; /* Index through each column in the panel */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ float *lusup;
+ int *xlusup;
+ int *repfnz_col; /* repfnz[] for a column in the panel */
+ float *dense_col; /* dense[] for a column in the panel */
+ float *tempv1; /* Used in 1-D update */
+ float *TriTmp, *MatvecTmp; /* used in 2-D update */
+ float zero = 0.0;
+ float one = 1.0;
+ register int ldaTmp;
+ register int r_ind, r_hi;
+ static int first = 1, maxsuper, rowblk, colblk;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ rowblk = sp_ienv(4);
+ colblk = sp_ienv(5);
+ first = 0;
+ }
+ ldaTmp = maxsuper + rowblk;
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) { /* for each updating supernode */
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in a supernode
+ * nsupr = no of rows in a supernode
+ */
+ krep = segrep[k--];
+ fsupc = xsup[supno[krep]];
+ nsupc = krep - fsupc + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nrow = nsupr - nsupc;
+ lptr = xlsub[fsupc];
+ krep_ind = lptr + nsupc - 1;
+
+ repfnz_col = repfnz;
+ dense_col = dense;
+
+ if ( nsupc >= colblk && nrow > rowblk ) { /* 2-D block update */
+
+ TriTmp = tempv;
+
+ /* Sequence through each column in panel -- triangular solves */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp ) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += segsze * (segsze - 1);
+ ops[GEMV] += 2 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ dense_col[irow] -= ukj * lusup[luptr];
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ ukj -= ukj1 * lusup[luptr1];
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++;
+ dense_col[irow] -= (ukj*lusup[luptr]
+ + ukj1*lusup[luptr1]);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ ukj1 -= ukj2 * lusup[luptr2-1];
+ ukj = ukj - ukj1*lusup[luptr1] - ukj2*lusup[luptr2];
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++; luptr2++;
+ dense_col[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] + ukj2*lusup[luptr2] );
+ }
+ }
+
+ } else { /* segsze >= 4 */
+
+ /* Copy U[*,j] segment from dense[*] to TriTmp[*], which
+ holds the result of triangular solves. */
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ TriTmp[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#else
+ strsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#endif
+#else
+ slsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
+#endif
+
+
+ } /* else ... */
+
+ } /* for jj ... end tri-solves */
+
+ /* Block row updates; push all the way into dense[*] block */
+ for ( r_ind = 0; r_ind < nrow; r_ind += rowblk ) {
+
+ r_hi = SUPERLU_MIN(nrow, r_ind + rowblk);
+ block_nrow = SUPERLU_MIN(rowblk, r_hi - r_ind);
+ luptr = xlusup[fsupc] + nsupc + r_ind;
+ isub1 = lptr + nsupc + r_ind;
+
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ /* Sequence through each column in panel -- matrix-vector */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ /* Perform a block update, and scatter the result of
+ matrix-vector to dense[]. */
+ no_zeros = kfnz - fsupc;
+ luptr1 = luptr + nsupr * no_zeros;
+ MatvecTmp = &TriTmp[maxsuper];
+
+#ifdef USE_VENDOR_BLAS
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ SGEMV(ftcs2, &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#else
+ sgemv_("N", &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#endif
+#else
+ smatvec(nsupr, block_nrow, segsze, &lusup[luptr1],
+ TriTmp, MatvecTmp);
+#endif
+
+ /* Scatter MatvecTmp[*] into SPA dense[*] temporarily
+ * such that MatvecTmp[*] can be re-used for the
+ * the next blok row update. dense[] will be copied into
+ * global store after the whole panel has been finished.
+ */
+ isub = isub1;
+ for (i = 0; i < block_nrow; i++) {
+ irow = lsub[isub];
+ dense_col[irow] -= MatvecTmp[i];
+ MatvecTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } /* for each block row ... */
+
+ /* Scatter the triangular solves into SPA dense[*] */
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = TriTmp[i];
+ TriTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } else { /* 1-D block modification */
+
+
+ /* Sequence through each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += segsze * (segsze - 1);
+ ops[GEMV] += 2 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ dense_col[irow] -= ukj * lusup[luptr];
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ ukj -= ukj1 * lusup[luptr1];
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1;
+ dense_col[irow] -= (ukj*lusup[luptr]
+ + ukj1*lusup[luptr1]);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ ukj1 -= ukj2 * lusup[luptr2-1];
+ ukj = ukj - ukj1*lusup[luptr1] - ukj2*lusup[luptr2];
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1; ++luptr2;
+ dense_col[irow] -= ( ukj*lusup[luptr]
+ + ukj1*lusup[luptr1] + ukj2*lusup[luptr2] );
+ }
+ }
+
+ } else { /* segsze >= 4 */
+ /*
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense[].
+ */
+ no_zeros = kfnz - fsupc;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*]:
+ * The result of triangular solve is in tempv[*];
+ * The result of matrix vector update is in dense_col[*]
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ tempv[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ strsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ SGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ sgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ slsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ smatvec (nsupr, nrow, segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+ /* Scatter tempv[*] into SPA dense[*] temporarily, such
+ * that tempv[*] can be used for the triangular solve of
+ * the next column of the panel. They will be copied into
+ * ucol[*] after the whole panel has been finished.
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = tempv[i];
+ tempv[i] = zero;
+ isub++;
+ }
+
+ /* Scatter the update from tempv1[*] into SPA dense[*] */
+ /* Start dense rectangular L */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ dense_col[irow] -= tempv1[i];
+ tempv1[i] = zero;
+ ++isub;
+ }
+
+ } /* else segsze>=4 ... */
+
+ } /* for each column in the panel... */
+
+ } /* else 1-D update ... */
+
+ } /* for each updating supernode ... */
+
+}
+
+
+
diff --git a/SRC/spanel_dfs.c b/SRC/spanel_dfs.c
new file mode 100644
index 0000000..7f5f3c7
--- /dev/null
+++ b/SRC/spanel_dfs.c
@@ -0,0 +1,249 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+#include "util.h"
+
+void
+spanel_dfs (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ SuperMatrix *A, /* in - original matrix */
+ int *perm_r, /* in */
+ int *nseg, /* out */
+ float *dense, /* out */
+ int *panel_lsub, /* out */
+ int *segrep, /* out */
+ int *repfnz, /* out */
+ int *xprune, /* out */
+ int *marker, /* out */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs a symbolic factorization on a panel of columns [jcol, jcol+w).
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives.
+ *
+ * The routine returns one list of the supernodal representatives
+ * in topological order of the dfs that generates them. This list is
+ * a superset of the topological order of each individual column within
+ * the panel.
+ * The location of the first nonzero in each supernodal segment
+ * (supernodal entry location) is also returned. Each column has a
+ * separate list for this purpose.
+ *
+ * Two marker arrays are used for dfs:
+ * marker[i] == jj, if i was visited during dfs of current column jj;
+ * marker1[i] >= jcol, if i was visited by earlier columns in this panel;
+ *
+ * marker: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ */
+ NCPformat *Astore;
+ float *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int krep, chperm, chmark, chrep, oldrep, kchild, myfnz;
+ int k, krow, kmark, kperm;
+ int xdfs, maxdfs, kpar;
+ int jj; /* index through each column in the panel */
+ int *marker1; /* marker1[jj] >= jcol if vertex jj was visited
+ by a previous column within this panel. */
+ int *repfnz_col; /* start of each column in the panel */
+ float *dense_col; /* start of each column in the panel */
+ int nextl_col; /* next available position in panel_lsub[*,jj] */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+
+ /* Initialize pointers */
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+ marker1 = marker + m;
+ repfnz_col = repfnz;
+ dense_col = dense;
+ *nseg = 0;
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+
+ /* For each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++) {
+ nextl_col = (jj - jcol) * m;
+
+#ifdef CHK_DFS
+ printf("\npanel col %d: ", jj);
+#endif
+
+ /* For each nonz in A[*,jj] do dfs */
+ for (k = xa_begin[jj]; k < xa_end[jj]; k++) {
+ krow = asub[k];
+ dense_col[krow] = a[k];
+ kmark = marker[krow];
+ if ( kmark == jj )
+ continue; /* krow visited before, go to the next nonzero */
+
+ /* For each unmarked nbr krow of jj
+ * krow is in L: place it in structure of L[*,jj]
+ */
+ marker[krow] = jj;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ panel_lsub[nextl_col++] = krow; /* krow is indexed into A */
+ }
+ /*
+ * krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ else {
+
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz_col[krep];
+
+#ifdef CHK_DFS
+ printf("krep %d, myfnz %d, perm_r[%d] %d\n", krep, myfnz, krow, kperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Representative visited before */
+ if ( myfnz > kperm ) repfnz_col[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz_col[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker[kchild];
+
+ if ( chmark != jj ) { /* Not reached yet */
+ marker[kchild] = jj;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,j] */
+ if ( chperm == EMPTY ) {
+ panel_lsub[nextl_col++] = kchild;
+ }
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ else {
+
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz_col[chrep];
+#ifdef CHK_DFS
+ printf("chrep %d,myfnz %d,perm_r[%d] %d\n",chrep,myfnz,kchild,chperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz_col[chrep] = chperm;
+ }
+ else {
+ /* Cont. dfs at snode-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L) */
+ parent[krep] = oldrep;
+ repfnz_col[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } /* else */
+
+ } /* else */
+
+ } /* if... */
+
+ } /* while xdfs < maxdfs */
+
+ /* krow has no more unexplored nbrs:
+ * Place snode-rep krep in postorder DFS, if this
+ * segment is seen for the first time. (Note that
+ * "repfnz[krep]" may change later.)
+ * Backtrack dfs to its parent.
+ */
+ if ( marker1[krep] < jcol ) {
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ marker1[krep] = jj;
+ }
+
+ kpar = parent[krep]; /* Pop stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" pop stack: krep %d,xdfs %d,maxdfs %d: ", krep,xdfs,maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } while ( kpar != EMPTY ); /* do-while - until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonz in A[*,jj] */
+
+ repfnz_col += m; /* Move to next column */
+ dense_col += m;
+
+ } /* for jj ... */
+
+}
diff --git a/SRC/spivotL.c b/SRC/spivotL.c
new file mode 100644
index 0000000..6243065
--- /dev/null
+++ b/SRC/spivotL.c
@@ -0,0 +1,173 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include <stdlib.h>
+#include "ssp_defs.h"
+
+#undef DEBUG
+
+int
+spivotL(
+ const int jcol, /* in */
+ const float u, /* in - diagonal pivoting threshold */
+ int *usepr, /* re-use the pivot sequence given by perm_r/iperm_r */
+ int *perm_r, /* may be modified */
+ int *iperm_r, /* in - inverse of perm_r */
+ int *iperm_c, /* in - used to find diagonal of Pc*A*Pc' */
+ int *pivrow, /* out */
+ GlobalLU_t *Glu, /* modified - global LU data structures */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Performs the numerical pivoting on the current column of L,
+ * and the CDIV operation.
+ *
+ * Pivot policy:
+ * (1) Compute thresh = u * max_(i>=j) abs(A_ij);
+ * (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN
+ * pivot row = k;
+ * ELSE IF abs(A_jj) >= thresh THEN
+ * pivot row = j;
+ * ELSE
+ * pivot row = m;
+ *
+ * Note: If you absolutely want to use a given pivot order, then set u=0.0.
+ *
+ * Return value: 0 success;
+ * i > 0 U(i,i) is exactly zero.
+ *
+ */
+ int fsupc; /* first column in the supernode */
+ int nsupc; /* no of columns in the supernode */
+ int nsupr; /* no of rows in the supernode */
+ int lptr; /* points to the starting subscript of the supernode */
+ int pivptr, old_pivptr, diag, diagind;
+ float pivmax, rtemp, thresh;
+ float temp;
+ float *lu_sup_ptr;
+ float *lu_col_ptr;
+ int *lsub_ptr;
+ int isub, icol, k, itemp;
+ int *lsub, *xlsub;
+ float *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ /* Initialize pointers */
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ fsupc = (Glu->xsup)[(Glu->supno)[jcol]];
+ nsupc = jcol - fsupc; /* excluding jcol; nsupc >= 0 */
+ lptr = xlsub[fsupc];
+ nsupr = xlsub[fsupc+1] - lptr;
+ lu_sup_ptr = &lusup[xlusup[fsupc]]; /* start of the current supernode */
+ lu_col_ptr = &lusup[xlusup[jcol]]; /* start of jcol in the supernode */
+ lsub_ptr = &lsub[lptr]; /* start of row indices of the supernode */
+
+#ifdef DEBUG
+if ( jcol == MIN_COL ) {
+ printf("Before cdiv: col %d\n", jcol);
+ for (k = nsupc; k < nsupr; k++)
+ printf(" lu[%d] %f\n", lsub_ptr[k], lu_col_ptr[k]);
+}
+#endif
+
+ /* Determine the largest abs numerical value for partial pivoting;
+ Also search for user-specified pivot, and diagonal element. */
+ if ( *usepr ) *pivrow = iperm_r[jcol];
+ diagind = iperm_c[jcol];
+ pivmax = 0.0;
+ pivptr = nsupc;
+ diag = EMPTY;
+ old_pivptr = nsupc;
+ for (isub = nsupc; isub < nsupr; ++isub) {
+ rtemp = fabs (lu_col_ptr[isub]);
+ if ( rtemp > pivmax ) {
+ pivmax = rtemp;
+ pivptr = isub;
+ }
+ if ( *usepr && lsub_ptr[isub] == *pivrow ) old_pivptr = isub;
+ if ( lsub_ptr[isub] == diagind ) diag = isub;
+ }
+
+ /* Test for singularity */
+ if ( pivmax == 0.0 ) {
+ *pivrow = lsub_ptr[pivptr];
+ perm_r[*pivrow] = jcol;
+ *usepr = 0;
+ return (jcol+1);
+ }
+
+ thresh = u * pivmax;
+
+ /* Choose appropriate pivotal element by our policy. */
+ if ( *usepr ) {
+ rtemp = fabs (lu_col_ptr[old_pivptr]);
+ if ( rtemp != 0.0 && rtemp >= thresh )
+ pivptr = old_pivptr;
+ else
+ *usepr = 0;
+ }
+ if ( *usepr == 0 ) {
+ /* Use diagonal pivot? */
+ if ( diag >= 0 ) { /* diagonal exists */
+ rtemp = fabs (lu_col_ptr[diag]);
+ if ( rtemp != 0.0 && rtemp >= thresh ) pivptr = diag;
+ }
+ *pivrow = lsub_ptr[pivptr];
+ }
+
+ /* Record pivot row */
+ perm_r[*pivrow] = jcol;
+
+ /* Interchange row subscripts */
+ if ( pivptr != nsupc ) {
+ itemp = lsub_ptr[pivptr];
+ lsub_ptr[pivptr] = lsub_ptr[nsupc];
+ lsub_ptr[nsupc] = itemp;
+
+ /* Interchange numerical values as well, for the whole snode, such
+ * that L is indexed the same way as A.
+ */
+ for (icol = 0; icol <= nsupc; icol++) {
+ itemp = pivptr + icol * nsupr;
+ temp = lu_sup_ptr[itemp];
+ lu_sup_ptr[itemp] = lu_sup_ptr[nsupc + icol*nsupr];
+ lu_sup_ptr[nsupc + icol*nsupr] = temp;
+ }
+ } /* if */
+
+ /* cdiv operation */
+ ops[FACT] += nsupr - nsupc;
+
+ temp = 1.0 / lu_col_ptr[nsupc];
+ for (k = nsupc+1; k < nsupr; k++)
+ lu_col_ptr[k] *= temp;
+
+ return 0;
+}
+
diff --git a/SRC/spivotgrowth.c b/SRC/spivotgrowth.c
new file mode 100644
index 0000000..188ddcc
--- /dev/null
+++ b/SRC/spivotgrowth.c
@@ -0,0 +1,109 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "ssp_defs.h"
+#include "util.h"
+
+float
+sPivotGrowth(int ncols, SuperMatrix *A, int *perm_c,
+ SuperMatrix *L, SuperMatrix *U)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Compute the reciprocal pivot growth factor of the leading ncols columns
+ * of the matrix, using the formula:
+ * min_j ( max_i(abs(A_ij)) / max_i(abs(U_ij)) )
+ *
+ * Arguments
+ * =========
+ *
+ * ncols (input) int
+ * The number of columns of matrices A, L and U.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = NC; Dtype = SLU_S; Mtype = GE.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SC; Dtype = SLU_S; Mtype = TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = NC;
+ * Dtype = SLU_S; Mtype = TRU.
+ *
+ */
+ NCformat *Astore;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ float *Aval, *Lval, *Uval;
+ int fsupc, nsupr, luptr, nz_in_U;
+ int i, j, k, oldcol;
+ int *inv_perm_c;
+ float rpg, maxaj, maxuj;
+ extern double slamch_(char *);
+ float smlnum;
+ float *luval;
+
+ /* Get machine constants. */
+ smlnum = slamch_("S");
+ rpg = 1. / smlnum;
+
+ Astore = A->Store;
+ Lstore = L->Store;
+ Ustore = U->Store;
+ Aval = Astore->nzval;
+ Lval = Lstore->nzval;
+ Uval = Ustore->nzval;
+
+ inv_perm_c = (int *) SUPERLU_MALLOC(A->ncol*sizeof(int));
+ for (j = 0; j < A->ncol; ++j) inv_perm_c[perm_c[j]] = j;
+
+ for (k = 0; k <= Lstore->nsuper; ++k) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ luptr = L_NZ_START(fsupc);
+ luval = &Lval[luptr];
+ nz_in_U = 1;
+
+ for (j = fsupc; j < L_FST_SUPC(k+1) && j < ncols; ++j) {
+ maxaj = 0.;
+ oldcol = inv_perm_c[j];
+ for (i = Astore->colptr[oldcol]; i < Astore->colptr[oldcol+1]; ++i)
+ maxaj = SUPERLU_MAX( maxaj, fabs(Aval[i]) );
+
+ maxuj = 0.;
+ for (i = Ustore->colptr[j]; i < Ustore->colptr[j+1]; i++)
+ maxuj = SUPERLU_MAX( maxuj, fabs(Uval[i]) );
+
+ /* Supernode */
+ for (i = 0; i < nz_in_U; ++i)
+ maxuj = SUPERLU_MAX( maxuj, fabs(luval[i]) );
+
+ ++nz_in_U;
+ luval += nsupr;
+
+ if ( maxuj == 0. )
+ rpg = SUPERLU_MIN( rpg, 1.);
+ else
+ rpg = SUPERLU_MIN( rpg, maxaj / maxuj );
+ }
+
+ if ( j >= ncols ) break;
+ }
+
+ SUPERLU_FREE(inv_perm_c);
+ return (rpg);
+}
diff --git a/SRC/spruneL.c b/SRC/spruneL.c
new file mode 100644
index 0000000..5970270
--- /dev/null
+++ b/SRC/spruneL.c
@@ -0,0 +1,149 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+#include "util.h"
+
+void
+spruneL(
+ const int jcol, /* in */
+ const int *perm_r, /* in */
+ const int pivrow, /* in */
+ const int nseg, /* in */
+ const int *segrep, /* in */
+ const int *repfnz, /* in */
+ int *xprune, /* out */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Prunes the L-structure of supernodes whose L-structure
+ * contains the current pivot row "pivrow"
+ *
+ */
+ float utemp;
+ int jsupno, irep, irep1, kmin, kmax, krow, movnum;
+ int i, ktemp, minloc, maxloc;
+ int do_prune; /* logical variable */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ float *lusup;
+ int *xlusup;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ /*
+ * For each supernode-rep irep in U[*,j]
+ */
+ jsupno = supno[jcol];
+ for (i = 0; i < nseg; i++) {
+
+ irep = segrep[i];
+ irep1 = irep + 1;
+ do_prune = FALSE;
+
+ /* Don't prune with a zero U-segment */
+ if ( repfnz[irep] == EMPTY )
+ continue;
+
+ /* If a snode overlaps with the next panel, then the U-segment
+ * is fragmented into two parts -- irep and irep1. We should let
+ * pruning occur at the rep-column in irep1's snode.
+ */
+ if ( supno[irep] == supno[irep1] ) /* Don't prune */
+ continue;
+
+ /*
+ * If it has not been pruned & it has a nonz in row L[pivrow,i]
+ */
+ if ( supno[irep] != jsupno ) {
+ if ( xprune[irep] >= xlsub[irep1] ) {
+ kmin = xlsub[irep];
+ kmax = xlsub[irep1] - 1;
+ for (krow = kmin; krow <= kmax; krow++)
+ if ( lsub[krow] == pivrow ) {
+ do_prune = TRUE;
+ break;
+ }
+ }
+
+ if ( do_prune ) {
+
+ /* Do a quicksort-type partition
+ * movnum=TRUE means that the num values have to be exchanged.
+ */
+ movnum = FALSE;
+ if ( irep == xsup[supno[irep]] ) /* Snode of size 1 */
+ movnum = TRUE;
+
+ while ( kmin <= kmax ) {
+
+ if ( perm_r[lsub[kmax]] == EMPTY )
+ kmax--;
+ else if ( perm_r[lsub[kmin]] != EMPTY )
+ kmin++;
+ else { /* kmin below pivrow, and kmax above pivrow:
+ * interchange the two subscripts
+ */
+ ktemp = lsub[kmin];
+ lsub[kmin] = lsub[kmax];
+ lsub[kmax] = ktemp;
+
+ /* If the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript
+ * interchange performed, similar interchange must be
+ * done on the numerical values.
+ */
+ if ( movnum ) {
+ minloc = xlusup[irep] + (kmin - xlsub[irep]);
+ maxloc = xlusup[irep] + (kmax - xlsub[irep]);
+ utemp = lusup[minloc];
+ lusup[minloc] = lusup[maxloc];
+ lusup[maxloc] = utemp;
+ }
+
+ kmin++;
+ kmax--;
+
+ }
+
+ } /* while */
+
+ xprune[irep] = kmin; /* Pruning */
+
+#ifdef CHK_PRUNE
+ printf(" After spruneL(),using col %d: xprune[%d] = %d\n",
+ jcol, irep, kmin);
+#endif
+ } /* if do_prune */
+
+ } /* if */
+
+ } /* for each U-segment... */
+}
diff --git a/SRC/sreadhb.c b/SRC/sreadhb.c
new file mode 100644
index 0000000..9f8dd03
--- /dev/null
+++ b/SRC/sreadhb.c
@@ -0,0 +1,256 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "ssp_defs.h"
+
+
+/* Eat up the rest of the current line */
+int sDumpLine(FILE *fp)
+{
+ register int c;
+ while ((c = fgetc(fp)) != '\n') ;
+ return 0;
+}
+
+int sParseIntFormat(char *buf, int *num, int *size)
+{
+ char *tmp;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ sscanf(tmp, "%d", num);
+ while (*tmp != 'I' && *tmp != 'i') ++tmp;
+ ++tmp;
+ sscanf(tmp, "%d", size);
+ return 0;
+}
+
+int sParseFloatFormat(char *buf, int *num, int *size)
+{
+ char *tmp, *period;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ while (*tmp != 'E' && *tmp != 'e' && *tmp != 'D' && *tmp != 'd'
+ && *tmp != 'F' && *tmp != 'f') {
+ /* May find kP before nE/nD/nF, like (1P6F13.6). In this case the
+ num picked up refers to P, which should be skipped. */
+ if (*tmp=='p' || *tmp=='P') {
+ ++tmp;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ } else {
+ ++tmp;
+ }
+ }
+ ++tmp;
+ period = tmp;
+ while (*period != '.' && *period != ')') ++period ;
+ *period = '\0';
+ *size = atoi(tmp); /*sscanf(tmp, "%2d", size);*/
+
+ return 0;
+}
+
+int sReadVector(FILE *fp, int n, int *where, int perline, int persize)
+{
+ register int i, j, item;
+ char tmp, buf[100];
+
+ i = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ item = atoi(&buf[j*persize]);
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ where[i++] = item - 1;
+ }
+ }
+
+ return 0;
+}
+
+int sReadValues(FILE *fp, int n, float *destination, int perline, int persize)
+{
+ register int i, j, k, s;
+ char tmp, buf[100];
+
+ i = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ s = j*persize;
+ for (k = 0; k < persize; ++k) /* No D_ format in C */
+ if ( buf[s+k] == 'D' || buf[s+k] == 'd' ) buf[s+k] = 'E';
+ destination[i++] = atof(&buf[s]);
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ }
+ }
+
+ return 0;
+}
+
+
+
+void
+sreadhb(int *nrow, int *ncol, int *nonz,
+ float **nzval, int **rowind, int **colptr)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Read a FLOAT PRECISION matrix stored in Harwell-Boeing format
+ * as described below.
+ *
+ * Line 1 (A72,A8)
+ * Col. 1 - 72 Title (TITLE)
+ * Col. 73 - 80 Key (KEY)
+ *
+ * Line 2 (5I14)
+ * Col. 1 - 14 Total number of lines excluding header (TOTCRD)
+ * Col. 15 - 28 Number of lines for pointers (PTRCRD)
+ * Col. 29 - 42 Number of lines for row (or variable) indices (INDCRD)
+ * Col. 43 - 56 Number of lines for numerical values (VALCRD)
+ * Col. 57 - 70 Number of lines for right-hand sides (RHSCRD)
+ * (including starting guesses and solution vectors
+ * if present)
+ * (zero indicates no right-hand side data is present)
+ *
+ * Line 3 (A3, 11X, 4I14)
+ * Col. 1 - 3 Matrix type (see below) (MXTYPE)
+ * Col. 15 - 28 Number of rows (or variables) (NROW)
+ * Col. 29 - 42 Number of columns (or elements) (NCOL)
+ * Col. 43 - 56 Number of row (or variable) indices (NNZERO)
+ * (equal to number of entries for assembled matrices)
+ * Col. 57 - 70 Number of elemental matrix entries (NELTVL)
+ * (zero in the case of assembled matrices)
+ * Line 4 (2A16, 2A20)
+ * Col. 1 - 16 Format for pointers (PTRFMT)
+ * Col. 17 - 32 Format for row (or variable) indices (INDFMT)
+ * Col. 33 - 52 Format for numerical values of coefficient matrix (VALFMT)
+ * Col. 53 - 72 Format for numerical values of right-hand sides (RHSFMT)
+ *
+ * Line 5 (A3, 11X, 2I14) Only present if there are right-hand sides present
+ * Col. 1 Right-hand side type:
+ * F for full storage or M for same format as matrix
+ * Col. 2 G if a starting vector(s) (Guess) is supplied. (RHSTYP)
+ * Col. 3 X if an exact solution vector(s) is supplied.
+ * Col. 15 - 28 Number of right-hand sides (NRHS)
+ * Col. 29 - 42 Number of row indices (NRHSIX)
+ * (ignored in case of unassembled matrices)
+ *
+ * The three character type field on line 3 describes the matrix type.
+ * The following table lists the permitted values for each of the three
+ * characters. As an example of the type field, RSA denotes that the matrix
+ * is real, symmetric, and assembled.
+ *
+ * First Character:
+ * R Real matrix
+ * C Complex matrix
+ * P Pattern only (no numerical values supplied)
+ *
+ * Second Character:
+ * S Symmetric
+ * U Unsymmetric
+ * H Hermitian
+ * Z Skew symmetric
+ * R Rectangular
+ *
+ * Third Character:
+ * A Assembled
+ * E Elemental matrices (unassembled)
+ *
+ */
+
+ register int i, numer_lines = 0, rhscrd = 0;
+ int tmp, colnum, colsize, rownum, rowsize, valnum, valsize;
+ char buf[100], type[4], key[10];
+ FILE *fp;
+
+ fp = stdin;
+
+ /* Line 1 */
+ fgets(buf, 100, fp);
+ fputs(buf, stdout);
+#if 0
+ fscanf(fp, "%72c", buf); buf[72] = 0;
+ printf("Title: %s", buf);
+ fscanf(fp, "%8c", key); key[8] = 0;
+ printf("Key: %s\n", key);
+ sDumpLine(fp);
+#endif
+
+ /* Line 2 */
+ for (i=0; i<5; i++) {
+ fscanf(fp, "%14c", buf); buf[14] = 0;
+ sscanf(buf, "%d", &tmp);
+ if (i == 3) numer_lines = tmp;
+ if (i == 4 && tmp) rhscrd = tmp;
+ }
+ sDumpLine(fp);
+
+ /* Line 3 */
+ fscanf(fp, "%3c", type);
+ fscanf(fp, "%11c", buf); /* pad */
+ type[3] = 0;
+#ifdef DEBUG
+ printf("Matrix type %s\n", type);
+#endif
+
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nrow);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", ncol);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nonz);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", &tmp);
+
+ if (tmp != 0)
+ printf("This is not an assembled matrix!\n");
+ if (*nrow != *ncol)
+ printf("Matrix is not square.\n");
+ sDumpLine(fp);
+
+ /* Allocate storage for the three arrays ( nzval, rowind, colptr ) */
+ sallocateA(*ncol, *nonz, nzval, rowind, colptr);
+
+ /* Line 4: format statement */
+ fscanf(fp, "%16c", buf);
+ sParseIntFormat(buf, &colnum, &colsize);
+ fscanf(fp, "%16c", buf);
+ sParseIntFormat(buf, &rownum, &rowsize);
+ fscanf(fp, "%20c", buf);
+ sParseFloatFormat(buf, &valnum, &valsize);
+ fscanf(fp, "%20c", buf);
+ sDumpLine(fp);
+
+ /* Line 5: right-hand side */
+ if ( rhscrd ) sDumpLine(fp); /* skip RHSFMT */
+
+#ifdef DEBUG
+ printf("%d rows, %d nonzeros\n", *nrow, *nonz);
+ printf("colnum %d, colsize %d\n", colnum, colsize);
+ printf("rownum %d, rowsize %d\n", rownum, rowsize);
+ printf("valnum %d, valsize %d\n", valnum, valsize);
+#endif
+
+ sReadVector(fp, *ncol+1, *colptr, colnum, colsize);
+ sReadVector(fp, *nonz, *rowind, rownum, rowsize);
+ if ( numer_lines ) {
+ sReadValues(fp, *nonz, *nzval, valnum, valsize);
+ }
+
+ fclose(fp);
+
+}
+
diff --git a/SRC/ssnode_bmod.c b/SRC/ssnode_bmod.c
new file mode 100644
index 0000000..1b11eda
--- /dev/null
+++ b/SRC/ssnode_bmod.c
@@ -0,0 +1,116 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+
+
+/*
+ * Performs numeric block updates within the relaxed snode.
+ */
+int
+ssnode_bmod (
+ const int jcol, /* in */
+ const int jsupno, /* in */
+ const int fsupc, /* in */
+ float *dense, /* in */
+ float *tempv, /* working array */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ float alpha = -1.0, beta = 1.0;
+#endif
+
+ int luptr, nsupc, nsupr, nrow;
+ int isub, irow, i, iptr;
+ register int ufirst, nextlu;
+ int *lsub, *xlsub;
+ float *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ nextlu = xlusup[jcol];
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = 0;
+ ++nextlu;
+ }
+
+ xlusup[jcol + 1] = nextlu; /* Initialize xlusup for next column */
+
+ if ( fsupc < jcol ) {
+
+ luptr = xlusup[fsupc];
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nsupc = jcol - fsupc; /* Excluding jcol */
+ ufirst = xlusup[jcol]; /* Points to the beginning of column
+ jcol in supernode L\U(jsupno). */
+ nrow = nsupr - nsupc;
+
+ ops[TRSV] += nsupc * (nsupc - 1);
+ ops[GEMV] += 2 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ strsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ sgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ slsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+ smatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], &tempv[0] );
+
+ /* Scatter tempv[*] into lusup[*] */
+ iptr = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ lusup[iptr++] -= tempv[i];
+ tempv[i] = 0.0;
+ }
+#endif
+
+ }
+
+ return 0;
+}
diff --git a/SRC/ssnode_dfs.c b/SRC/ssnode_dfs.c
new file mode 100644
index 0000000..95a51be
--- /dev/null
+++ b/SRC/ssnode_dfs.c
@@ -0,0 +1,106 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "ssp_defs.h"
+#include "util.h"
+
+int
+ssnode_dfs (
+ const int jcol, /* in - start of the supernode */
+ const int kcol, /* in - end of the supernode */
+ const int *asub, /* in */
+ const int *xa_begin, /* in */
+ const int *xa_end, /* in */
+ int *xprune, /* out */
+ int *marker, /* modified */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/* Purpose
+ * =======
+ * ssnode_dfs() - Determine the union of the row structures of those
+ * columns within the relaxed snode.
+ * Note: The relaxed snodes are leaves of the supernodal etree, therefore,
+ * the portion outside the rectangular supernode must be zero.
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * >0 number of bytes allocated when run out of memory.
+ *
+ */
+ register int i, k, ifrom, ito, nextl, new_next;
+ int nsuper, krow, kmark, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ int nzlmax;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ nsuper = ++supno[jcol]; /* Next available supernode number */
+ nextl = xlsub[jcol];
+
+ for (i = jcol; i <= kcol; i++) {
+ /* For each nonzero in A[*,i] */
+ for (k = xa_begin[i]; k < xa_end[i]; k++) {
+ krow = asub[k];
+ kmark = marker[krow];
+ if ( kmark != kcol ) { /* First time visit krow */
+ marker[krow] = kcol;
+ lsub[nextl++] = krow;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = sLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ }
+ }
+ supno[i] = nsuper;
+ }
+
+ /* Supernode > 1, then make a copy of the subscripts for pruning */
+ if ( jcol < kcol ) {
+ new_next = nextl + (nextl - xlsub[jcol]);
+ while ( new_next > nzlmax ) {
+ if ( mem_error = sLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ ito = nextl;
+ for (ifrom = xlsub[jcol]; ifrom < nextl; )
+ lsub[ito++] = lsub[ifrom++];
+ for (i = jcol+1; i <= kcol; i++) xlsub[i] = nextl;
+ nextl = ito;
+ }
+
+ xsup[nsuper+1] = kcol + 1;
+ supno[kcol+1] = nsuper;
+ xprune[kcol] = nextl;
+ xlsub[kcol+1] = nextl;
+
+ return 0;
+}
+
diff --git a/SRC/ssp_blas2.c b/SRC/ssp_blas2.c
new file mode 100644
index 0000000..b7917c9
--- /dev/null
+++ b/SRC/ssp_blas2.c
@@ -0,0 +1,470 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: ssp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "ssp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void susolve(int, int, float*, float*);
+void slsolve(int, int, float*, float*);
+void smatvec(int, int, int, float*, float*, float*);
+
+
+int
+sp_strsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, float *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_strsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A'*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_S, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_S, Mtype = TRU.
+ *
+ * x - (input/output) float*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ float *Lval, *Uval;
+ int incx = 1, incy = 1;
+ float alpha = 1.0, beta = 1.0;
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ float *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") &&
+ !lsame_(trans, "C")) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_strsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = floatCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_strsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1);
+ solve_ops += 2 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ x[irow] -= x[fsupc] * Lval[luptr];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ SGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ strsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ sgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ slsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ smatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ x[irow] -= work[i]; /* Scatter */
+ work[i] = 0.0;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ x[irow] -= x[fsupc] * Uval[i];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ strsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ susolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ x[irow] -= x[jcol] * Uval[i];
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 2 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ x[jcol] -= x[irow] * Lval[i];
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ strsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ x[jcol] -= x[irow] * Uval[i];
+ }
+ }
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ strsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+
+int
+sp_sgemv(char *trans, float alpha, SuperMatrix *A, float *x,
+ int incx, float beta, float *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_sgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) float
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_S; Mtype = GE.
+ In the future, more general A can be handled.
+
+ X - (input) float*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) float
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) float*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ float *Aval;
+ int info;
+ float temp;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_sgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 || (alpha == 0. && beta == 1.))
+ return 0;
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if (beta != 1.) {
+ if (incy == 1) {
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) y[i] = 0.;
+ else
+ for (i = 0; i < leny; ++i) y[i] = beta * y[i];
+ } else {
+ iy = ky;
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) {
+ y[iy] = 0.;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ y[iy] = beta * y[iy];
+ iy += incy;
+ }
+ }
+ }
+
+ if (alpha == 0.) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if (x[jx] != 0.) {
+ temp = alpha * x[jx];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ y[irow] += temp * Aval[i];
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ temp += Aval[i] * x[irow];
+ }
+ y[jy] += alpha * temp;
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_sgemv */
+
+
+
diff --git a/SRC/ssp_blas2.c.bak b/SRC/ssp_blas2.c.bak
new file mode 100644
index 0000000..994de34
--- /dev/null
+++ b/SRC/ssp_blas2.c.bak
@@ -0,0 +1,469 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: ssp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "ssp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void susolve(int, int, float*, float*);
+void slsolve(int, int, float*, float*);
+void smatvec(int, int, int, float*, float*, float*);
+
+
+int
+sp_strsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, float *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_strsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A'*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_S, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_S, Mtype = TRU.
+ *
+ * x - (input/output) float*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ float *Lval, *Uval;
+ int incx = 1, incy = 1;
+ float alpha = 1.0, beta = 1.0;
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ float *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") ) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_strsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = floatCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_strsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += nsupc * (nsupc - 1);
+ solve_ops += 2 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ x[irow] -= x[fsupc] * Lval[luptr];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ SGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ strsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ sgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ slsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ smatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ x[irow] -= work[i]; /* Scatter */
+ work[i] = 0.0;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ x[irow] -= x[fsupc] * Uval[i];
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ STRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ strsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ susolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ x[irow] -= x[jcol] * Uval[i];
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 2 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ x[jcol] -= x[irow] * Lval[i];
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ STRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ strsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 2*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ x[jcol] -= x[irow] * Uval[i];
+ }
+ }
+
+ solve_ops += nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ x[fsupc] /= Lval[luptr];
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ strsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+
+int
+sp_sgemv(char *trans, float alpha, SuperMatrix *A, float *x,
+ int incx, float beta, float *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_sgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) float
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_S; Mtype = GE.
+ In the future, more general A can be handled.
+
+ X - (input) float*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) float
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) float*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ float *Aval;
+ int info;
+ float temp;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_sgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 || (alpha == 0. && beta == 1.))
+ return 0;
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if (beta != 1.) {
+ if (incy == 1) {
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) y[i] = 0.;
+ else
+ for (i = 0; i < leny; ++i) y[i] = beta * y[i];
+ } else {
+ iy = ky;
+ if (beta == 0.)
+ for (i = 0; i < leny; ++i) {
+ y[iy] = 0.;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ y[iy] = beta * y[iy];
+ iy += incy;
+ }
+ }
+ }
+
+ if (alpha == 0.) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if (x[jx] != 0.) {
+ temp = alpha * x[jx];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ y[irow] += temp * Aval[i];
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ temp += Aval[i] * x[irow];
+ }
+ y[jy] += alpha * temp;
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_sgemv */
+
+
+
diff --git a/SRC/ssp_blas3.c b/SRC/ssp_blas3.c
new file mode 100644
index 0000000..9b45292
--- /dev/null
+++ b/SRC/ssp_blas3.c
@@ -0,0 +1,121 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: sp_blas3.c
+ * Purpose: Sparse BLAS3, using some dense BLAS3 operations.
+ */
+
+#include "ssp_defs.h"
+#include "util.h"
+
+int
+sp_sgemm(char *transa, char *transb, int m, int n, int k,
+ float alpha, SuperMatrix *A, float *b, int ldb,
+ float beta, float *c, int ldc)
+{
+/* Purpose
+ =======
+
+ sp_s performs one of the matrix-matrix operations
+
+ C := alpha*op( A )*op( B ) + beta*C,
+
+ where op( X ) is one of
+
+ op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ),
+
+ alpha and beta are scalars, and A, B and C are matrices, with op( A )
+ an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+
+
+ Parameters
+ ==========
+
+ TRANSA - (input) char*
+ On entry, TRANSA specifies the form of op( A ) to be used in
+ the matrix multiplication as follows:
+ TRANSA = 'N' or 'n', op( A ) = A.
+ TRANSA = 'T' or 't', op( A ) = A'.
+ TRANSA = 'C' or 'c', op( A ) = conjg( A' ).
+ Unchanged on exit.
+
+ TRANSB - (input) char*
+ On entry, TRANSB specifies the form of op( B ) to be used in
+ the matrix multiplication as follows:
+ TRANSB = 'N' or 'n', op( B ) = B.
+ TRANSB = 'T' or 't', op( B ) = B'.
+ TRANSB = 'C' or 'c', op( B ) = conjg( B' ).
+ Unchanged on exit.
+
+ M - (input) int
+ On entry, M specifies the number of rows of the matrix
+ op( A ) and of the matrix C. M must be at least zero.
+ Unchanged on exit.
+
+ N - (input) int
+ On entry, N specifies the number of columns of the matrix
+ op( B ) and the number of columns of the matrix C. N must be
+ at least zero.
+ Unchanged on exit.
+
+ K - (input) int
+ On entry, K specifies the number of columns of the matrix
+ op( A ) and the number of rows of the matrix op( B ). K must
+ be at least zero.
+ Unchanged on exit.
+
+ ALPHA - (input) float
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_S; Mtype = GE.
+ In the future, more general A can be handled.
+
+ B - FLOAT PRECISION array of DIMENSION ( LDB, kb ), where kb is
+ n when TRANSB = 'N' or 'n', and is k otherwise.
+ Before entry with TRANSB = 'N' or 'n', the leading k by n
+ part of the array B must contain the matrix B, otherwise
+ the leading n by k part of the array B must contain the
+ matrix B.
+ Unchanged on exit.
+
+ LDB - (input) int
+ On entry, LDB specifies the first dimension of B as declared
+ in the calling (sub) program. LDB must be at least max( 1, n ).
+ Unchanged on exit.
+
+ BETA - (input) float
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then C need not be set on input.
+
+ C - FLOAT PRECISION array of DIMENSION ( LDC, n ).
+ Before entry, the leading m by n part of the array C must
+ contain the matrix C, except when beta is zero, in which
+ case C need not be set on entry.
+ On exit, the array C is overwritten by the m by n matrix
+ ( alpha*op( A )*B + beta*C ).
+
+ LDC - (input) int
+ On entry, LDC specifies the first dimension of C as declared
+ in the calling (sub)program. LDC must be at least max(1,m).
+ Unchanged on exit.
+
+ ==== Sparse Level 3 Blas routine.
+*/
+ int incx = 1, incy = 1;
+ int j;
+
+ for (j = 0; j < n; ++j) {
+ sp_sgemv(transa, alpha, A, &b[ldb*j], incx, beta, &c[ldc*j], incy);
+ }
+ return 0;
+}
diff --git a/SRC/ssp_defs.h b/SRC/ssp_defs.h
new file mode 100644
index 0000000..34dd266
--- /dev/null
+++ b/SRC/ssp_defs.h
@@ -0,0 +1,234 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#ifndef __SUPERLU_sSP_DEFS /* allow multiple inclusions */
+#define __SUPERLU_sSP_DEFS
+
+/*
+ * File name: ssp_defs.h
+ * Purpose: Sparse matrix types and function prototypes
+ * History:
+ */
+
+#ifdef _CRAY
+#include <fortran.h>
+#include <string.h>
+#endif
+
+/* Define my integer type int_t */
+typedef int int_t; /* default */
+
+#include "Cnames.h"
+#include "supermatrix.h"
+#include "util.h"
+
+
+/*
+ * Global data structures used in LU factorization -
+ *
+ * nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].
+ * (xsup,supno): supno[i] is the supernode no to which i belongs;
+ * xsup(s) points to the beginning of the s-th supernode.
+ * e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12)
+ * xsup 0 1 2 4 7 12
+ * Note: dfs will be performed on supernode rep. relative to the new
+ * row pivoting ordering
+ *
+ * (xlsub,lsub): lsub[*] contains the compressed subscript of
+ * rectangular supernodes; xlsub[j] points to the starting
+ * location of the j-th column in lsub[*]. Note that xlsub
+ * is indexed by column.
+ * Storage: original row subscripts
+ *
+ * During the course of sparse LU factorization, we also use
+ * (xlsub,lsub) for the purpose of symmetric pruning. For each
+ * supernode {s,s+1,...,t=s+r} with first column s and last
+ * column t, the subscript set
+ * lsub[j], j=xlsub[s], .., xlsub[s+1]-1
+ * is the structure of column s (i.e. structure of this supernode).
+ * It is used for the storage of numerical values.
+ * Furthermore,
+ * lsub[j], j=xlsub[t], .., xlsub[t+1]-1
+ * is the structure of the last column t of this supernode.
+ * It is for the purpose of symmetric pruning. Therefore, the
+ * structural subscripts can be rearranged without making physical
+ * interchanges among the numerical values.
+ *
+ * However, if the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript interchange
+ * performed, similar interchange must be done on the numerical
+ * values.
+ *
+ * The last column structures (for pruning) will be removed
+ * after the numercial LU factorization phase.
+ *
+ * (xlusup,lusup): lusup[*] contains the numerical values of the
+ * rectangular supernodes; xlusup[j] points to the starting
+ * location of the j-th column in storage vector lusup[*]
+ * Note: xlusup is indexed by column.
+ * Each rectangular supernode is stored by column-major
+ * scheme, consistent with Fortran 2-dim array storage.
+ *
+ * (xusub,ucol,usub): ucol[*] stores the numerical values of
+ * U-columns outside the rectangular supernodes. The row
+ * subscript of nonzero ucol[k] is stored in usub[k].
+ * xusub[i] points to the starting location of column i in ucol.
+ * Storage: new row subscripts; that is subscripts of PA.
+ */
+typedef struct {
+ int *xsup; /* supernode and column mapping */
+ int *supno;
+ int *lsub; /* compressed L subscripts */
+ int *xlsub;
+ float *lusup; /* L supernodes */
+ int *xlusup;
+ float *ucol; /* U columns */
+ int *usub;
+ int *xusub;
+ int nzlmax; /* current max size of lsub */
+ int nzumax; /* " " " ucol */
+ int nzlumax; /* " " " lusup */
+ int n; /* number of columns in the matrix */
+ LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
+} GlobalLU_t;
+
+typedef struct {
+ float for_lu;
+ float total_needed;
+ int expansions;
+} mem_usage_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Driver routines */
+extern void
+sgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
+extern void
+sgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
+ char *, float *, float *, SuperMatrix *, SuperMatrix *,
+ void *, int, SuperMatrix *, SuperMatrix *,
+ float *, float *, float *, float *,
+ mem_usage_t *, SuperLUStat_t *, int *);
+
+/* Supernodal LU factor related */
+extern void
+sCreate_CompCol_Matrix(SuperMatrix *, int, int, int, float *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+sCreate_CompRow_Matrix(SuperMatrix *, int, int, int, float *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+sCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
+extern void
+sCreate_Dense_Matrix(SuperMatrix *, int, int, float *, int,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+sCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, float *,
+ int *, int *, int *, int *, int *,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+sCopy_Dense_Matrix(int, int, float *, int, float *, int);
+
+extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
+extern void fixupL (const int, const int *, GlobalLU_t *);
+
+extern void sallocateA (int, int, float **, int **, int **);
+extern void sgstrf (superlu_options_t*, SuperMatrix*, float,
+ int, int, int*, void *, int, int *, int *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
+extern int ssnode_dfs (const int, const int, const int *, const int *,
+ const int *, int *, int *, GlobalLU_t *);
+extern int ssnode_bmod (const int, const int, const int, float *,
+ float *, GlobalLU_t *, SuperLUStat_t*);
+extern void spanel_dfs (const int, const int, const int, SuperMatrix *,
+ int *, int *, float *, int *, int *, int *,
+ int *, int *, int *, int *, GlobalLU_t *);
+extern void spanel_bmod (const int, const int, const int, const int,
+ float *, float *, int *, int *,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int scolumn_dfs (const int, const int, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *, GlobalLU_t *);
+extern int scolumn_bmod (const int, const int, float *,
+ float *, int *, int *, int,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int scopy_to_ucol (int, int, int *, int *, int *,
+ float *, GlobalLU_t *);
+extern int spivotL (const int, const float, int *, int *,
+ int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
+extern void spruneL (const int, const int *, const int, const int,
+ const int *, const int *, int *, GlobalLU_t *);
+extern void sreadmt (int *, int *, int *, float **, int **, int **);
+extern void sGenXtrue (int, int, float *, int);
+extern void sFillRHS (trans_t, int, float *, int, SuperMatrix *,
+ SuperMatrix *);
+extern void sgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
+ SuperMatrix *, SuperLUStat_t*, int *);
+
+
+/* Driver related */
+
+extern void sgsequ (SuperMatrix *, float *, float *, float *,
+ float *, float *, int *);
+extern void slaqgs (SuperMatrix *, float *, float *, float,
+ float, float, char *);
+extern void sgscon (char *, SuperMatrix *, SuperMatrix *,
+ float, float *, SuperLUStat_t*, int *);
+extern float sPivotGrowth(int, SuperMatrix *, int *,
+ SuperMatrix *, SuperMatrix *);
+extern void sgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, int *, char *, float *,
+ float *, SuperMatrix *, SuperMatrix *,
+ float *, float *, SuperLUStat_t*, int *);
+
+extern int sp_strsv (char *, char *, char *, SuperMatrix *,
+ SuperMatrix *, float *, SuperLUStat_t*, int *);
+extern int sp_sgemv (char *, float, SuperMatrix *, float *,
+ int, float, float *, int);
+
+extern int sp_sgemm (char *, char *, int, int, int, float,
+ SuperMatrix *, float *, int, float,
+ float *, int);
+
+/* Memory-related */
+extern int sLUMemInit (fact_t, void *, int, int, int, int, int,
+ SuperMatrix *, SuperMatrix *,
+ GlobalLU_t *, int **, float **);
+extern void sSetRWork (int, int, float *, float **, float **);
+extern void sLUWorkFree (int *, float *, GlobalLU_t *);
+extern int sLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
+
+extern float *floatMalloc(int);
+extern float *floatCalloc(int);
+extern int smemory_usage(const int, const int, const int, const int);
+extern int sQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
+
+/* Auxiliary routines */
+extern void sreadhb(int *, int *, int *, float **, int **, int **);
+extern void sCompRow_to_CompCol(int, int, int, float*, int*, int*,
+ float **, int **, int **);
+extern void sfill (float *, int, float);
+extern void sinf_norm_error (int, SuperMatrix *, float *);
+extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
+ float, float, float *, float *, char *);
+
+/* Routines for debugging */
+extern void sPrint_CompCol_Matrix(char *, SuperMatrix *);
+extern void sPrint_SuperNode_Matrix(char *, SuperMatrix *);
+extern void sPrint_Dense_Matrix(char *, SuperMatrix *);
+extern void print_lu_col(char *, int, int, int *, GlobalLU_t *);
+extern void check_tempv(int, float *);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* __SUPERLU_sSP_DEFS */
+
diff --git a/SRC/superlu_timer.c b/SRC/superlu_timer.c
new file mode 100644
index 0000000..10eb877
--- /dev/null
+++ b/SRC/superlu_timer.c
@@ -0,0 +1,53 @@
+/*
+ * Purpose
+ * =======
+ * Returns the time in seconds used by the process.
+ *
+ * Note: the timer function call is machine dependent. Use conditional
+ * compilation to choose the appropriate function.
+ *
+ */
+
+
+#ifdef SUN
+/*
+ * It uses the system call gethrtime(3C), which is accurate to
+ * nanoseconds.
+*/
+#include <sys/time.h>
+
+double SuperLU_timer_() {
+ return ( (double)gethrtime() / 1e9 );
+}
+
+#else
+
+#ifndef NO_TIMER
+#include <sys/types.h>
+#include <sys/times.h>
+#include <time.h>
+#include <sys/time.h>
+#endif
+
+#ifndef CLK_TCK
+#define CLK_TCK 60
+#endif
+
+double SuperLU_timer_()
+{
+#ifdef NO_TIMER
+ /* no sys/times.h on WIN32 */
+ double tmp;
+ tmp = 0.0;
+#else
+ struct tms use;
+ double tmp;
+ times(&use);
+ tmp = use.tms_utime;
+ tmp += use.tms_stime;
+#endif
+ return (double)(tmp) / CLK_TCK;
+}
+
+#endif
+
diff --git a/SRC/supermatrix.h b/SRC/supermatrix.h
new file mode 100644
index 0000000..665e22d
--- /dev/null
+++ b/SRC/supermatrix.h
@@ -0,0 +1,140 @@
+#ifndef __SUPERLU_SUPERMATRIX /* allow multiple inclusions */
+#define __SUPERLU_SUPERMATRIX
+
+/********************************************
+ * The matrix types are defined as follows. *
+ ********************************************/
+typedef enum {
+ SLU_NC, /* column-wise, no supernode */
+ SLU_NR, /* row-wize, no supernode */
+ SLU_SC, /* column-wise, supernode */
+ SLU_SR, /* row-wise, supernode */
+ SLU_NCP, /* column-wise, column-permuted, no supernode
+ (The consecutive columns of nonzeros, after permutation,
+ may not be stored contiguously.) */
+ SLU_DN /* Fortran style column-wise storage for dense matrix */
+} Stype_t;
+
+typedef enum {
+ SLU_S, /* single */
+ SLU_D, /* double */
+ SLU_C, /* single complex */
+ SLU_Z /* double complex */
+} Dtype_t;
+
+typedef enum {
+ SLU_GE, /* general */
+ SLU_TRLU, /* lower triangular, unit diagonal */
+ SLU_TRUU, /* upper triangular, unit diagonal */
+ SLU_TRL, /* lower triangular */
+ SLU_TRU, /* upper triangular */
+ SLU_SYL, /* symmetric, store lower half */
+ SLU_SYU, /* symmetric, store upper half */
+ SLU_HEL, /* Hermitian, store lower half */
+ SLU_HEU /* Hermitian, store upper half */
+} Mtype_t;
+
+typedef struct {
+ Stype_t Stype; /* Storage type: interprets the storage structure
+ pointed to by *Store. */
+ Dtype_t Dtype; /* Data type. */
+ Mtype_t Mtype; /* Matrix type: describes the mathematical property of
+ the matrix. */
+ int_t nrow; /* number of rows */
+ int_t ncol; /* number of columns */
+ void *Store; /* pointer to the actual storage of the matrix */
+} SuperMatrix;
+
+/***********************************************
+ * The storage schemes are defined as follows. *
+ ***********************************************/
+
+/* Stype == NC (Also known as Harwell-Boeing sparse matrix format) */
+typedef struct {
+ int_t nnz; /* number of nonzeros in the matrix */
+ void *nzval; /* pointer to array of nonzero values, packed by column */
+ int_t *rowind; /* pointer to array of row indices of the nonzeros */
+ int_t *colptr; /* pointer to array of beginning of columns in nzval[]
+ and rowind[] */
+ /* Note:
+ Zero-based indexing is used;
+ colptr[] has ncol+1 entries, the last one pointing
+ beyond the last column, so that colptr[ncol] = nnz. */
+} NCformat;
+
+/* Stype == NR (Also known as row compressed storage (RCS). */
+typedef struct {
+ int_t nnz; /* number of nonzeros in the matrix */
+ void *nzval; /* pointer to array of nonzero values, packed by row */
+ int_t *colind; /* pointer to array of column indices of the nonzeros */
+ int_t *rowptr; /* pointer to array of beginning of rows in nzval[]
+ and colind[] */
+ /* Note:
+ Zero-based indexing is used;
+ nzval[] and colind[] are of the same length, nnz;
+ rowptr[] has nrow+1 entries, the last one pointing
+ beyond the last column, so that rowptr[nrow] = nnz. */
+} NRformat;
+
+/* Stype == SC */
+typedef struct {
+ int_t nnz; /* number of nonzeros in the matrix */
+ int_t nsuper; /* number of supernodes, minus 1 */
+ void *nzval; /* pointer to array of nonzero values, packed by column */
+ int_t *nzval_colptr;/* pointer to array of beginning of columns in nzval[] */
+ int_t *rowind; /* pointer to array of compressed row indices of
+ rectangular supernodes */
+ int_t *rowind_colptr;/* pointer to array of beginning of columns in rowind[] */
+ int_t *col_to_sup; /* col_to_sup[j] is the supernode number to which column
+ j belongs; mapping from column to supernode number. */
+ int_t *sup_to_col; /* sup_to_col[s] points to the start of the s-th
+ supernode; mapping from supernode number to column.
+ e.g.: col_to_sup: 0 1 2 2 3 3 3 4 4 4 4 4 4 (ncol=12)
+ sup_to_col: 0 1 2 4 7 12 (nsuper=4) */
+ /* Note:
+ Zero-based indexing is used;
+ nzval_colptr[], rowind_colptr[], col_to_sup and
+ sup_to_col[] have ncol+1 entries, the last one
+ pointing beyond the last column.
+ For col_to_sup[], only the first ncol entries are
+ defined. For sup_to_col[], only the first nsuper+2
+ entries are defined. */
+} SCformat;
+
+/* Stype == NCP */
+typedef struct {
+ int_t nnz; /* number of nonzeros in the matrix */
+ void *nzval; /* pointer to array of nonzero values, packed by column */
+ int_t *rowind;/* pointer to array of row indices of the nonzeros */
+ /* Note: nzval[]/rowind[] always have the same length */
+ int_t *colbeg;/* colbeg[j] points to the beginning of column j in nzval[]
+ and rowind[] */
+ int_t *colend;/* colend[j] points to one past the last element of column
+ j in nzval[] and rowind[] */
+ /* Note:
+ Zero-based indexing is used;
+ The consecutive columns of the nonzeros may not be
+ contiguous in storage, because the matrix has been
+ postmultiplied by a column permutation matrix. */
+} NCPformat;
+
+/* Stype == DN */
+typedef struct {
+ int_t lda; /* leading dimension */
+ void *nzval; /* array of size lda*ncol to represent a dense matrix */
+} DNformat;
+
+
+
+/*********************************************************
+ * Macros used for easy access of sparse matrix entries. *
+ *********************************************************/
+#define L_SUB_START(col) ( Lstore->rowind_colptr[col] )
+#define L_SUB(ptr) ( Lstore->rowind[ptr] )
+#define L_NZ_START(col) ( Lstore->nzval_colptr[col] )
+#define L_FST_SUPC(superno) ( Lstore->sup_to_col[superno] )
+#define U_NZ_START(col) ( Ustore->colptr[col] )
+#define U_SUB(ptr) ( Ustore->rowind[ptr] )
+
+
+#endif /* __SUPERLU_SUPERMATRIX */
diff --git a/SRC/sutil.c b/SRC/sutil.c
new file mode 100644
index 0000000..1a66061
--- /dev/null
+++ b/SRC/sutil.c
@@ -0,0 +1,478 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include "ssp_defs.h"
+
+void
+sCreate_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ float *nzval, int *rowind, int *colptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NCformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NCformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->rowind = rowind;
+ Astore->colptr = colptr;
+}
+
+void
+sCreate_CompRow_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ float *nzval, int *colind, int *rowptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NRformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NRformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->colind = colind;
+ Astore->rowptr = rowptr;
+}
+
+/* Copy matrix A into matrix B. */
+void
+sCopy_CompCol_Matrix(SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore, *Bstore;
+ int ncol, nnz, i;
+
+ B->Stype = A->Stype;
+ B->Dtype = A->Dtype;
+ B->Mtype = A->Mtype;
+ B->nrow = A->nrow;;
+ B->ncol = ncol = A->ncol;
+ Astore = (NCformat *) A->Store;
+ Bstore = (NCformat *) B->Store;
+ Bstore->nnz = nnz = Astore->nnz;
+ for (i = 0; i < nnz; ++i)
+ ((float *)Bstore->nzval)[i] = ((float *)Astore->nzval)[i];
+ for (i = 0; i < nnz; ++i) Bstore->rowind[i] = Astore->rowind[i];
+ for (i = 0; i <= ncol; ++i) Bstore->colptr[i] = Astore->colptr[i];
+}
+
+
+void
+sCreate_Dense_Matrix(SuperMatrix *X, int m, int n, float *x, int ldx,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ DNformat *Xstore;
+
+ X->Stype = stype;
+ X->Dtype = dtype;
+ X->Mtype = mtype;
+ X->nrow = m;
+ X->ncol = n;
+ X->Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !(X->Store) ) ABORT("SUPERLU_MALLOC fails for X->Store");
+ Xstore = (DNformat *) X->Store;
+ Xstore->lda = ldx;
+ Xstore->nzval = (float *) x;
+}
+
+void
+sCopy_Dense_Matrix(int M, int N, float *X, int ldx,
+ float *Y, int ldy)
+{
+/*
+ *
+ * Purpose
+ * =======
+ *
+ * Copies a two-dimensional matrix X to another matrix Y.
+ */
+ int i, j;
+
+ for (j = 0; j < N; ++j)
+ for (i = 0; i < M; ++i)
+ Y[i + j*ldy] = X[i + j*ldx];
+}
+
+void
+sCreate_SuperNode_Matrix(SuperMatrix *L, int m, int n, int nnz,
+ float *nzval, int *nzval_colptr, int *rowind,
+ int *rowind_colptr, int *col_to_sup, int *sup_to_col,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ SCformat *Lstore;
+
+ L->Stype = stype;
+ L->Dtype = dtype;
+ L->Mtype = mtype;
+ L->nrow = m;
+ L->ncol = n;
+ L->Store = (void *) SUPERLU_MALLOC( sizeof(SCformat) );
+ if ( !(L->Store) ) ABORT("SUPERLU_MALLOC fails for L->Store");
+ Lstore = L->Store;
+ Lstore->nnz = nnz;
+ Lstore->nsuper = col_to_sup[n];
+ Lstore->nzval = nzval;
+ Lstore->nzval_colptr = nzval_colptr;
+ Lstore->rowind = rowind;
+ Lstore->rowind_colptr = rowind_colptr;
+ Lstore->col_to_sup = col_to_sup;
+ Lstore->sup_to_col = sup_to_col;
+
+}
+
+
+/*
+ * Convert a row compressed storage into a column compressed storage.
+ */
+void
+sCompRow_to_CompCol(int m, int n, int nnz,
+ float *a, int *colind, int *rowptr,
+ float **at, int **rowind, int **colptr)
+{
+ register int i, j, col, relpos;
+ int *marker;
+
+ /* Allocate storage for another copy of the matrix. */
+ *at = (float *) floatMalloc(nnz);
+ *rowind = (int *) intMalloc(nnz);
+ *colptr = (int *) intMalloc(n+1);
+ marker = (int *) intCalloc(n);
+
+ /* Get counts of each column of A, and set up column pointers */
+ for (i = 0; i < m; ++i)
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) ++marker[colind[j]];
+ (*colptr)[0] = 0;
+ for (j = 0; j < n; ++j) {
+ (*colptr)[j+1] = (*colptr)[j] + marker[j];
+ marker[j] = (*colptr)[j];
+ }
+
+ /* Transfer the matrix into the compressed column storage. */
+ for (i = 0; i < m; ++i) {
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) {
+ col = colind[j];
+ relpos = marker[col];
+ (*rowind)[relpos] = i;
+ (*at)[relpos] = a[j];
+ ++marker[col];
+ }
+ }
+
+ SUPERLU_FREE(marker);
+}
+
+
+void
+sPrint_CompCol_Matrix(char *what, SuperMatrix *A)
+{
+ NCformat *Astore;
+ register int i,n;
+ float *dp;
+
+ printf("\nCompCol matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (NCformat *) A->Store;
+ dp = (float *) Astore->nzval;
+ printf("nrow %d, ncol %d, nnz %d\n", A->nrow,A->ncol,Astore->nnz);
+ printf("nzval: ");
+ for (i = 0; i < Astore->colptr[n]; ++i) printf("%f ", dp[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->colptr[n]; ++i) printf("%d ", Astore->rowind[i]);
+ printf("\ncolptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->colptr[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+sPrint_SuperNode_Matrix(char *what, SuperMatrix *A)
+{
+ SCformat *Astore;
+ register int i, j, k, c, d, n, nsup;
+ float *dp;
+ int *col_to_sup, *sup_to_col, *rowind, *rowind_colptr;
+
+ printf("\nSuperNode matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (SCformat *) A->Store;
+ dp = (float *) Astore->nzval;
+ col_to_sup = Astore->col_to_sup;
+ sup_to_col = Astore->sup_to_col;
+ rowind_colptr = Astore->rowind_colptr;
+ rowind = Astore->rowind;
+ printf("nrow %d, ncol %d, nnz %d, nsuper %d\n",
+ A->nrow,A->ncol,Astore->nnz,Astore->nsuper);
+ printf("nzval:\n");
+ for (k = 0; k <= Astore->nsuper; ++k) {
+ c = sup_to_col[k];
+ nsup = sup_to_col[k+1] - c;
+ for (j = c; j < c + nsup; ++j) {
+ d = Astore->nzval_colptr[j];
+ for (i = rowind_colptr[c]; i < rowind_colptr[c+1]; ++i) {
+ printf("%d\t%d\t%e\n", rowind[i], j, dp[d++]);
+ }
+ }
+ }
+#if 0
+ for (i = 0; i < Astore->nzval_colptr[n]; ++i) printf("%f ", dp[i]);
+#endif
+ printf("\nnzval_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->nzval_colptr[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->rowind_colptr[n]; ++i)
+ printf("%d ", Astore->rowind[i]);
+ printf("\nrowind_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->rowind_colptr[i]);
+ printf("\ncol_to_sup: ");
+ for (i = 0; i < n; ++i) printf("%d ", col_to_sup[i]);
+ printf("\nsup_to_col: ");
+ for (i = 0; i <= Astore->nsuper+1; ++i)
+ printf("%d ", sup_to_col[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+sPrint_Dense_Matrix(char *what, SuperMatrix *A)
+{
+ DNformat *Astore;
+ register int i;
+ float *dp;
+
+ printf("\nDense matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ Astore = (DNformat *) A->Store;
+ dp = (float *) Astore->nzval;
+ printf("nrow %d, ncol %d, lda %d\n", A->nrow,A->ncol,Astore->lda);
+ printf("\nnzval: ");
+ for (i = 0; i < A->nrow; ++i) printf("%f ", dp[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+/*
+ * Diagnostic print of column "jcol" in the U/L factor.
+ */
+void
+sprint_lu_col(char *msg, int jcol, int pivrow, int *xprune, GlobalLU_t *Glu)
+{
+ int i, k, fsupc;
+ int *xsup, *supno;
+ int *xlsub, *lsub;
+ float *lusup;
+ int *xlusup;
+ float *ucol;
+ int *usub, *xusub;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+
+ printf("%s", msg);
+ printf("col %d: pivrow %d, supno %d, xprune %d\n",
+ jcol, pivrow, supno[jcol], xprune[jcol]);
+
+ printf("\tU-col:\n");
+ for (i = xusub[jcol]; i < xusub[jcol+1]; i++)
+ printf("\t%d%10.4f\n", usub[i], ucol[i]);
+ printf("\tL-col in rectangular snode:\n");
+ fsupc = xsup[supno[jcol]]; /* first col of the snode */
+ i = xlsub[fsupc];
+ k = xlusup[jcol];
+ while ( i < xlsub[fsupc+1] && k < xlusup[jcol+1] ) {
+ printf("\t%d\t%10.4f\n", lsub[i], lusup[k]);
+ i++; k++;
+ }
+ fflush(stdout);
+}
+
+
+/*
+ * Check whether tempv[] == 0. This should be true before and after
+ * calling any numeric routines, i.e., "panel_bmod" and "column_bmod".
+ */
+void scheck_tempv(int n, float *tempv)
+{
+ int i;
+
+ for (i = 0; i < n; i++) {
+ if (tempv[i] != 0.0)
+ {
+ fprintf(stderr,"tempv[%d] = %f\n", i,tempv[i]);
+ ABORT("scheck_tempv");
+ }
+ }
+}
+
+
+void
+sGenXtrue(int n, int nrhs, float *x, int ldx)
+{
+ int i, j;
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < n; ++i) {
+ x[i + j*ldx] = 1.0;/* + (float)(i+1.)/n;*/
+ }
+}
+
+/*
+ * Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's
+ */
+void
+sFillRHS(trans_t trans, int nrhs, float *x, int ldx,
+ SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore;
+ float *Aval;
+ DNformat *Bstore;
+ float *rhs;
+ float one = 1.0;
+ float zero = 0.0;
+ int ldc;
+ char transc[1];
+
+ Astore = A->Store;
+ Aval = (float *) Astore->nzval;
+ Bstore = B->Store;
+ rhs = Bstore->nzval;
+ ldc = Bstore->lda;
+
+ if ( trans == NOTRANS ) *(unsigned char *)transc = 'N';
+ else *(unsigned char *)transc = 'T';
+
+ sp_sgemm(transc, "N", A->nrow, nrhs, A->ncol, one, A,
+ x, ldx, zero, rhs, ldc);
+
+}
+
+/*
+ * Fills a float precision array with a given value.
+ */
+void
+sfill(float *a, int alen, float dval)
+{
+ register int i;
+ for (i = 0; i < alen; i++) a[i] = dval;
+}
+
+
+
+/*
+ * Check the inf-norm of the error vector
+ */
+void sinf_norm_error(int nrhs, SuperMatrix *X, float *xtrue)
+{
+ DNformat *Xstore;
+ float err, xnorm;
+ float *Xmat, *soln_work;
+ int i, j;
+
+ Xstore = X->Store;
+ Xmat = Xstore->nzval;
+
+ for (j = 0; j < nrhs; j++) {
+ soln_work = &Xmat[j*Xstore->lda];
+ err = xnorm = 0.0;
+ for (i = 0; i < X->nrow; i++) {
+ err = SUPERLU_MAX(err, fabs(soln_work[i] - xtrue[i]));
+ xnorm = SUPERLU_MAX(xnorm, fabs(soln_work[i]));
+ }
+ err = err / xnorm;
+ printf("||X - Xtrue||/||X|| = %e\n", err);
+ }
+}
+
+
+
+/* Print performance of the code. */
+void
+sPrintPerf(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage,
+ float rpg, float rcond, float *ferr,
+ float *berr, char *equed, SuperLUStat_t *stat)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *utime;
+ flops_t *ops;
+
+ utime = stat->utime;
+ ops = stat->ops;
+
+ if ( utime[FACT] != 0. )
+ printf("Factor flops = %e\tMflops = %8.2f\n", ops[FACT],
+ ops[FACT]*1e-6/utime[FACT]);
+ printf("Identify relaxed snodes = %8.2f\n", utime[RELAX]);
+ if ( utime[SOLVE] != 0. )
+ printf("Solve flops = %.0f, Mflops = %8.2f\n", ops[SOLVE],
+ ops[SOLVE]*1e-6/utime[SOLVE]);
+
+ Lstore = (SCformat *) L->Store;
+ Ustore = (NCformat *) U->Store;
+ printf("\tNo of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("\tNo of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("\tNo of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz);
+
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage->for_lu/1e6, mem_usage->total_needed/1e6,
+ mem_usage->expansions);
+
+ printf("\tFactor\tMflops\tSolve\tMflops\tEtree\tEquil\tRcond\tRefine\n");
+ printf("PERF:%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f\n",
+ utime[FACT], ops[FACT]*1e-6/utime[FACT],
+ utime[SOLVE], ops[SOLVE]*1e-6/utime[SOLVE],
+ utime[ETREE], utime[EQUIL], utime[RCOND], utime[REFINE]);
+
+ printf("\tRpg\t\tRcond\t\tFerr\t\tBerr\t\tEquil?\n");
+ printf("NUM:\t%e\t%e\t%e\t%e\t%s\n",
+ rpg, rcond, ferr[0], berr[0], equed);
+
+}
+
+
+
+
+print_float_vec(char *what, int n, float *vec)
+{
+ int i;
+ printf("%s: n %d\n", what, n);
+ for (i = 0; i < n; ++i) printf("%d\t%f\n", i, vec[i]);
+ return 0;
+}
+
diff --git a/SRC/util.c b/SRC/util.c
new file mode 100644
index 0000000..a95e1ef
--- /dev/null
+++ b/SRC/util.c
@@ -0,0 +1,391 @@
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include "dsp_defs.h"
+#include "util.h"
+
+/*
+ * Global statistics variale
+ */
+
+void superlu_abort_and_exit(char* msg)
+{
+ fprintf(stderr, msg);
+ exit (-1);
+}
+
+/*
+ * Set the default values for the options argument.
+ */
+void set_default_options(superlu_options_t *options)
+{
+ options->Fact = DOFACT;
+ options->Equil = YES;
+ options->ColPerm = COLAMD;
+ options->DiagPivotThresh = 1.0;
+ options->Trans = NOTRANS;
+ options->IterRefine = NOREFINE;
+ options->SymmetricMode = NO;
+ options->PivotGrowth = NO;
+ options->ConditionNumber = NO;
+ options->PrintStat = YES;
+}
+
+/* Deallocate the structure pointing to the actual storage of the matrix. */
+void
+Destroy_SuperMatrix_Store(SuperMatrix *A)
+{
+ SUPERLU_FREE ( A->Store );
+}
+
+void
+Destroy_CompCol_Matrix(SuperMatrix *A)
+{
+ SUPERLU_FREE( ((NCformat *)A->Store)->rowind );
+ SUPERLU_FREE( ((NCformat *)A->Store)->colptr );
+ SUPERLU_FREE( ((NCformat *)A->Store)->nzval );
+ SUPERLU_FREE( A->Store );
+}
+
+void
+Destroy_CompRow_Matrix(SuperMatrix *A)
+{
+ SUPERLU_FREE( ((NRformat *)A->Store)->colind );
+ SUPERLU_FREE( ((NRformat *)A->Store)->rowptr );
+ SUPERLU_FREE( ((NRformat *)A->Store)->nzval );
+ SUPERLU_FREE( A->Store );
+}
+
+void
+Destroy_SuperNode_Matrix(SuperMatrix *A)
+{
+ SUPERLU_FREE ( ((SCformat *)A->Store)->rowind );
+ SUPERLU_FREE ( ((SCformat *)A->Store)->rowind_colptr );
+ SUPERLU_FREE ( ((SCformat *)A->Store)->nzval );
+ SUPERLU_FREE ( ((SCformat *)A->Store)->nzval_colptr );
+ SUPERLU_FREE ( ((SCformat *)A->Store)->col_to_sup );
+ SUPERLU_FREE ( ((SCformat *)A->Store)->sup_to_col );
+ SUPERLU_FREE ( A->Store );
+}
+
+/* A is of type Stype==NCP */
+void
+Destroy_CompCol_Permuted(SuperMatrix *A)
+{
+ SUPERLU_FREE ( ((NCPformat *)A->Store)->colbeg );
+ SUPERLU_FREE ( ((NCPformat *)A->Store)->colend );
+ SUPERLU_FREE ( A->Store );
+}
+
+/* A is of type Stype==DN */
+void
+Destroy_Dense_Matrix(SuperMatrix *A)
+{
+ DNformat* Astore = A->Store;
+ SUPERLU_FREE (Astore->nzval);
+ SUPERLU_FREE ( A->Store );
+}
+
+/*
+ * Reset repfnz[] for the current column
+ */
+void
+resetrep_col (const int nseg, const int *segrep, int *repfnz)
+{
+ int i, irep;
+
+ for (i = 0; i < nseg; i++) {
+ irep = segrep[i];
+ repfnz[irep] = EMPTY;
+ }
+}
+
+
+/*
+ * Count the total number of nonzeros in factors L and U, and in the
+ * symmetrically reduced L.
+ */
+void
+countnz(const int n, int *xprune, int *nnzL, int *nnzU, GlobalLU_t *Glu)
+{
+ int nsuper, fsupc, i, j;
+ int nnzL0, jlen, irep;
+ int *xsup, *xlsub;
+
+ xsup = Glu->xsup;
+ xlsub = Glu->xlsub;
+ *nnzL = 0;
+ *nnzU = (Glu->xusub)[n];
+ nnzL0 = 0;
+ nsuper = (Glu->supno)[n];
+
+ if ( n <= 0 ) return;
+
+ /*
+ * For each supernode
+ */
+ for (i = 0; i <= nsuper; i++) {
+ fsupc = xsup[i];
+ jlen = xlsub[fsupc+1] - xlsub[fsupc];
+
+ for (j = fsupc; j < xsup[i+1]; j++) {
+ *nnzL += jlen;
+ *nnzU += j - fsupc + 1;
+ jlen--;
+ }
+ irep = xsup[i+1] - 1;
+ nnzL0 += xprune[irep] - xlsub[irep];
+ }
+
+ /* printf("\tNo of nonzeros in symm-reduced L = %d\n", nnzL0);*/
+}
+
+
+
+/*
+ * Fix up the data storage lsub for L-subscripts. It removes the subscript
+ * sets for structural pruning, and applies permuation to the remaining
+ * subscripts.
+ */
+void
+fixupL(const int n, const int *perm_r, GlobalLU_t *Glu)
+{
+ register int nsuper, fsupc, nextl, i, j, k, jstrt;
+ int *xsup, *lsub, *xlsub;
+
+ if ( n <= 1 ) return;
+
+ xsup = Glu->xsup;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nextl = 0;
+ nsuper = (Glu->supno)[n];
+
+ /*
+ * For each supernode ...
+ */
+ for (i = 0; i <= nsuper; i++) {
+ fsupc = xsup[i];
+ jstrt = xlsub[fsupc];
+ xlsub[fsupc] = nextl;
+ for (j = jstrt; j < xlsub[fsupc+1]; j++) {
+ lsub[nextl] = perm_r[lsub[j]]; /* Now indexed into P*A */
+ nextl++;
+ }
+ for (k = fsupc+1; k < xsup[i+1]; k++)
+ xlsub[k] = nextl; /* Other columns in supernode i */
+
+ }
+
+ xlsub[n] = nextl;
+}
+
+
+/*
+ * Diagnostic print of segment info after panel_dfs().
+ */
+void print_panel_seg(int n, int w, int jcol, int nseg,
+ int *segrep, int *repfnz)
+{
+ int j, k;
+
+ for (j = jcol; j < jcol+w; j++) {
+ printf("\tcol %d:\n", j);
+ for (k = 0; k < nseg; k++)
+ printf("\t\tseg %d, segrep %d, repfnz %d\n", k,
+ segrep[k], repfnz[(j-jcol)*n + segrep[k]]);
+ }
+
+}
+
+
+void
+StatInit(SuperLUStat_t *stat)
+{
+ register int i, w, panel_size, relax;
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ w = SUPERLU_MAX(panel_size, relax);
+ stat->panel_histo = intCalloc(w+1);
+ stat->utime = (double *) SUPERLU_MALLOC(NPHASES * sizeof(double));
+ if (!stat->utime) ABORT("SUPERLU_MALLOC fails for stat->utime");
+ stat->ops = (flops_t *) SUPERLU_MALLOC(NPHASES * sizeof(flops_t));
+ if (!stat->ops) ABORT("SUPERLU_MALLOC fails for stat->ops");
+ for (i = 0; i < NPHASES; ++i) {
+ stat->utime[i] = 0.;
+ stat->ops[i] = 0.;
+ }
+}
+
+
+void
+StatPrint(SuperLUStat_t *stat)
+{
+ double *utime;
+ flops_t *ops;
+
+ utime = stat->utime;
+ ops = stat->ops;
+ printf("Factor time = %8.2f\n", utime[FACT]);
+ if ( utime[FACT] != 0.0 )
+ printf("Factor flops = %e\tMflops = %8.2f\n", ops[FACT],
+ ops[FACT]*1e-6/utime[FACT]);
+
+ printf("Solve time = %8.2f\n", utime[SOLVE]);
+ if ( utime[SOLVE] != 0.0 )
+ printf("Solve flops = %e\tMflops = %8.2f\n", ops[SOLVE],
+ ops[SOLVE]*1e-6/utime[SOLVE]);
+
+}
+
+
+void
+StatFree(SuperLUStat_t *stat)
+{
+ SUPERLU_FREE(stat->panel_histo);
+ SUPERLU_FREE(stat->utime);
+ SUPERLU_FREE(stat->ops);
+}
+
+
+flops_t
+LUFactFlops(SuperLUStat_t *stat)
+{
+ return (stat->ops[FACT]);
+}
+
+flops_t
+LUSolveFlops(SuperLUStat_t *stat)
+{
+ return (stat->ops[SOLVE]);
+}
+
+
+
+
+
+/*
+ * Fills an integer array with a given value.
+ */
+void ifill(int *a, int alen, int ival)
+{
+ register int i;
+ for (i = 0; i < alen; i++) a[i] = ival;
+}
+
+
+
+/*
+ * Get the statistics of the supernodes
+ */
+#define NBUCKS 10
+static int max_sup_size;
+
+void super_stats(int nsuper, int *xsup)
+{
+ register int nsup1 = 0;
+ int i, isize, whichb, bl, bh;
+ int bucket[NBUCKS];
+
+ max_sup_size = 0;
+
+ for (i = 0; i <= nsuper; i++) {
+ isize = xsup[i+1] - xsup[i];
+ if ( isize == 1 ) nsup1++;
+ if ( max_sup_size < isize ) max_sup_size = isize;
+ }
+
+ printf(" Supernode statistics:\n\tno of super = %d\n", nsuper+1);
+ printf("\tmax supernode size = %d\n", max_sup_size);
+ printf("\tno of size 1 supernodes = %d\n", nsup1);
+
+ /* Histogram of the supernode sizes */
+ ifill (bucket, NBUCKS, 0);
+
+ for (i = 0; i <= nsuper; i++) {
+ isize = xsup[i+1] - xsup[i];
+ whichb = (float) isize / max_sup_size * NBUCKS;
+ if (whichb >= NBUCKS) whichb = NBUCKS - 1;
+ bucket[whichb]++;
+ }
+
+ printf("\tHistogram of supernode sizes:\n");
+ for (i = 0; i < NBUCKS; i++) {
+ bl = (float) i * max_sup_size / NBUCKS;
+ bh = (float) (i+1) * max_sup_size / NBUCKS;
+ printf("\tsnode: %d-%d\t\t%d\n", bl+1, bh, bucket[i]);
+ }
+
+}
+
+
+float SpaSize(int n, int np, float sum_npw)
+{
+ return (sum_npw*8 + np*8 + n*4)/1024.;
+}
+
+float DenseSize(int n, float sum_nw)
+{
+ return (sum_nw*8 + n*8)/1024.;;
+}
+
+
+
+/*
+ * Check whether repfnz[] == EMPTY after reset.
+ */
+void check_repfnz(int n, int w, int jcol, int *repfnz)
+{
+ int jj, k;
+
+ for (jj = jcol; jj < jcol+w; jj++)
+ for (k = 0; k < n; k++)
+ if ( repfnz[(jj-jcol)*n + k] != EMPTY ) {
+ fprintf(stderr, "col %d, repfnz_col[%d] = %d\n", jj,
+ k, repfnz[(jj-jcol)*n + k]);
+ ABORT("check_repfnz");
+ }
+}
+
+
+/* Print a summary of the testing results. */
+void
+PrintSumm(char *type, int nfail, int nrun, int nerrs)
+{
+ if ( nfail > 0 )
+ printf("%3s driver: %d out of %d tests failed to pass the threshold\n",
+ type, nfail, nrun);
+ else
+ printf("All tests for %3s driver passed the threshold (%6d tests run)\n", type, nrun);
+
+ if ( nerrs > 0 )
+ printf("%6d error messages recorded\n", nerrs);
+}
+
+
+int print_int_vec(char *what, int n, int *vec)
+{
+ int i;
+ printf("%s\n", what);
+ for (i = 0; i < n; ++i) printf("%d\t%d\n", i, vec[i]);
+ return 0;
+}
diff --git a/SRC/util.h b/SRC/util.h
new file mode 100644
index 0000000..f16ff89
--- /dev/null
+++ b/SRC/util.h
@@ -0,0 +1,267 @@
+#ifndef __SUPERLU_UTIL /* allow multiple inclusions */
+#define __SUPERLU_UTIL
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+/*
+#ifndef __STDC__
+#include <malloc.h>
+#endif
+*/
+#include <assert.h>
+
+/***********************************************************************
+ * Macros
+ ***********************************************************************/
+#define FIRSTCOL_OF_SNODE(i) (xsup[i])
+/* No of marker arrays used in the symbolic factorization,
+ each of size n */
+#define NO_MARKER 3
+#define NUM_TEMPV(m,w,t,b) ( SUPERLU_MAX(m, (t + b)*w) )
+
+#ifndef USER_ABORT
+#define USER_ABORT(msg) superlu_abort_and_exit(msg)
+#endif
+
+#define ABORT(err_msg) \
+ { char msg[256];\
+ sprintf(msg,"%s at line %d in file %s\n",err_msg,__LINE__, __FILE__);\
+ USER_ABORT(msg); }
+
+
+#ifndef USER_MALLOC
+#if 1
+#define USER_MALLOC(size) superlu_malloc(size)
+#else
+/* The following may check out some uninitialized data */
+#define USER_MALLOC(size) memset (superlu_malloc(size), '\x0F', size)
+#endif
+#endif
+
+#define SUPERLU_MALLOC(size) USER_MALLOC(size)
+
+#ifndef USER_FREE
+#define USER_FREE(addr) superlu_free(addr)
+#endif
+
+#define SUPERLU_FREE(addr) USER_FREE(addr)
+
+#define CHECK_MALLOC(where) { \
+ extern int superlu_malloc_total; \
+ printf("%s: malloc_total %d Bytes\n", \
+ where, superlu_malloc_total); \
+}
+
+#define SUPERLU_MAX(x, y) ( (x) > (y) ? (x) : (y) )
+#define SUPERLU_MIN(x, y) ( (x) < (y) ? (x) : (y) )
+
+/***********************************************************************
+ * Constants
+ ***********************************************************************/
+#define EMPTY (-1)
+/*#define NO (-1)*/
+#define FALSE 0
+#define TRUE 1
+
+/***********************************************************************
+ * Enumerate types
+ ***********************************************************************/
+typedef enum {NO, YES} yes_no_t;
+typedef enum {DOFACT, SamePattern, SamePattern_SameRowPerm, FACTORED} fact_t;
+typedef enum {NOROWPERM, LargeDiag, MY_PERMR} rowperm_t;
+typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD, MY_PERMC}colperm_t;
+typedef enum {NOTRANS, TRANS, CONJ} trans_t;
+typedef enum {NOEQUIL, ROW, COL, BOTH} DiagScale_t;
+typedef enum {NOREFINE, SINGLE=1, DOUBLE, EXTRA} IterRefine_t;
+typedef enum {LUSUP, UCOL, LSUB, USUB} MemType;
+typedef enum {HEAD, TAIL} stack_end_t;
+typedef enum {SYSTEM, USER} LU_space_t;
+
+/*
+ * The following enumerate type is used by the statistics variable
+ * to keep track of flop count and time spent at various stages.
+ *
+ * Note that not all of the fields are disjoint.
+ */
+typedef enum {
+ COLPERM, /* find a column ordering that minimizes fills */
+ RELAX, /* find artificial supernodes */
+ ETREE, /* compute column etree */
+ EQUIL, /* equilibrate the original matrix */
+ FACT, /* perform LU factorization */
+ RCOND, /* estimate reciprocal condition number */
+ SOLVE, /* forward and back solves */
+ REFINE, /* perform iterative refinement */
+ FLOAT, /* time spent in floating-point operations */
+ TRSV, /* fraction of FACT spent in xTRSV */
+ GEMV, /* fraction of FACT spent in xGEMV */
+ FERR, /* estimate error bounds after iterative refinement */
+ NPHASES /* total number of phases */
+} PhaseType;
+
+
+/***********************************************************************
+ * Type definitions
+ ***********************************************************************/
+typedef float flops_t;
+typedef unsigned char Logical;
+
+/*
+ *-- This contains the options used to control the solve process.
+ *
+ * Fact (fact_t)
+ * Specifies whether or not the factored form of the matrix
+ * A is supplied on entry, and if not, how the matrix A should
+ * be factorizaed.
+ * = DOFACT: The matrix A will be factorized from scratch, and the
+ * factors will be stored in L and U.
+ * = SamePattern: The matrix A will be factorized assuming
+ * that a factorization of a matrix with the same sparsity
+ * pattern was performed prior to this one. Therefore, this
+ * factorization will reuse column permutation vector
+ * ScalePermstruct->perm_c and the column elimination tree
+ * LUstruct->etree.
+ * = SamePattern_SameRowPerm: The matrix A will be factorized
+ * assuming that a factorization of a matrix with the same
+ * sparsity pattern and similar numerical values was performed
+ * prior to this one. Therefore, this factorization will reuse
+ * both row and column scaling factors R and C, and the
+ * both row and column permutation vectors perm_r and perm_c,
+ * distributed data structure set up from the previous symbolic
+ * factorization.
+ * = FACTORED: On entry, L, U, perm_r and perm_c contain the
+ * factored form of A. If DiagScale is not NOEQUIL, the matrix
+ * A has been equilibrated with scaling factors R and C.
+ *
+ * Equil (yes_no_t)
+ * Specifies whether to equilibrate the system (scale A's row and
+ * columns to have unit norm).
+ *
+ * ColPerm (colperm_t)
+ * Specifies what type of column permutation to use to reduce fill.
+ * = NATURAL: use the natural ordering
+ * = MMD_ATA: use minimum degree ordering on structure of A'*A
+ * = MMD_AT_PLUS_A: use minimum degree ordering on structure of A'+A
+ * = COLAMD: use approximate minimum degree column ordering
+ * = MY_PERMC: use the ordering specified in ScalePermstruct->perm_c[]
+ *
+ * Trans (trans_t)
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A**T * X = B (Transpose)
+ * = CONJ: A**H * X = B (Transpose)
+ *
+ * IterRefine (IterRefine_t)
+ * Specifies whether to perform iterative refinement.
+ * = NO: no iterative refinement
+ * = WorkingPrec: perform iterative refinement in working precision
+ * = ExtraPrec: perform iterative refinement in extra precision
+ *
+ * PrintStat (yes_no_t)
+ * Specifies whether to print the solver's statistics.
+ *
+ * DiagPivotThresh (double, in [0.0, 1.0]) (only for sequential SuperLU)
+ * Specifies the threshold used for a diagonal entry to be an
+ * acceptable pivot.
+ *
+ * PivotGrowth (yes_no_t)
+ * Specifies whether to compute the reciprocal pivot growth.
+ *
+ * ConditionNumber (ues_no_t)
+ * Specifies whether to compute the reciprocal condition number.
+ *
+ * RowPerm (rowperm_t) (only for SuperLU_DIST)
+ * Specifies whether to permute rows of the original matrix.
+ * = NO: not to permute the rows
+ * = LargeDiag: make the diagonal large relative to the off-diagonal
+ * = MY_PERMR: use the permutation given in ScalePermstruct->perm_r[]
+ *
+ * ReplaceTinyPivot (yes_no_t) (only for SuperLU_DIST)
+ * Specifies whether to replace the tiny diagonals by
+ * sqrt(epsilon)*||A|| during LU factorization.
+ *
+ * SolveInitialized (yes_no_t) (only for SuperLU_DIST)
+ * Specifies whether the initialization has been performed to the
+ * triangular solve.
+ *
+ * RefineInitialized (yes_no_t) (only for SuperLU_DIST)
+ * Specifies whether the initialization has been performed to the
+ * sparse matrix-vector multiplication routine needed in iterative
+ * refinement.
+ */
+typedef struct {
+ fact_t Fact;
+ yes_no_t Equil;
+ colperm_t ColPerm;
+ trans_t Trans;
+ IterRefine_t IterRefine;
+ yes_no_t PrintStat;
+ yes_no_t SymmetricMode;
+ double DiagPivotThresh;
+ yes_no_t PivotGrowth;
+ yes_no_t ConditionNumber;
+ rowperm_t RowPerm;
+ yes_no_t ReplaceTinyPivot;
+ yes_no_t SolveInitialized;
+ yes_no_t RefineInitialized;
+} superlu_options_t;
+
+typedef struct {
+ int *panel_histo; /* histogram of panel size distribution */
+ double *utime; /* running time at various phases */
+ flops_t *ops; /* operation count at various phases */
+ int TinyPivots; /* number of tiny pivots */
+ int RefineSteps; /* number of iterative refinement steps */
+} SuperLUStat_t;
+
+
+/***********************************************************************
+ * Prototypes
+ ***********************************************************************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void Destroy_SuperMatrix_Store(SuperMatrix *);
+extern void Destroy_CompCol_Matrix(SuperMatrix *);
+extern void Destroy_CompRow_Matrix(SuperMatrix *);
+extern void Destroy_SuperNode_Matrix(SuperMatrix *);
+extern void Destroy_CompCol_Permuted(SuperMatrix *);
+extern void Destroy_Dense_Matrix(SuperMatrix *);
+extern void get_perm_c(int, SuperMatrix *, int *);
+extern void set_default_options(superlu_options_t *options);
+extern void sp_preorder (superlu_options_t *, SuperMatrix*, int*, int*,
+ SuperMatrix*);
+extern void superlu_abort_and_exit(char*);
+extern void *superlu_malloc (size_t);
+extern int *intMalloc (int);
+extern int *intCalloc (int);
+extern void superlu_free (void*);
+extern void SetIWork (int, int, int, int *, int **, int **, int **,
+ int **, int **, int **, int **);
+extern int sp_coletree (int *, int *, int *, int, int, int *);
+extern void relax_snode (const int, int *, const int, int *, int *);
+extern void heap_relax_snode (const int, int *, const int, int *, int *);
+extern void resetrep_col (const int, const int *, int *);
+extern int spcoletree (int *, int *, int *, int, int, int *);
+extern int *TreePostorder (int, int *);
+extern double SuperLU_timer_ ();
+extern int sp_ienv (int);
+extern int lsame_ (char *, char *);
+extern int xerbla_ (char *, int *);
+extern void ifill (int *, int, int);
+extern void snode_profile (int, int *);
+extern void super_stats (int, int *);
+extern void PrintSumm (char *, int, int, int);
+extern void StatInit(SuperLUStat_t *);
+extern void StatPrint (SuperLUStat_t *);
+extern void StatFree(SuperLUStat_t *);
+extern void print_panel_seg(int, int, int, int, int *, int *);
+extern void check_repfnz(int, int, int, int *);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* __SUPERLU_UTIL */
diff --git a/SRC/xerbla.c b/SRC/xerbla.c
new file mode 100644
index 0000000..c598282
--- /dev/null
+++ b/SRC/xerbla.c
@@ -0,0 +1,40 @@
+/* Subroutine */ int xerbla_(char *srname, int *info)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ XERBLA is an error handler for the LAPACK routines.
+ It is called by an LAPACK routine if an input parameter has an
+ invalid value. A message is printed and execution stops.
+
+ Installers may consider modifying the STOP statement in order to
+ call system-specific exception-handling facilities.
+
+ Arguments
+ =========
+
+ SRNAME (input) CHARACTER*6
+ The name of the routine which called XERBLA.
+
+ INFO (input) INT
+ The position of the invalid parameter in the parameter list
+
+ of the calling routine.
+
+ =====================================================================
+*/
+
+ printf("** On entry to %6s, parameter number %2d had an illegal value\n",
+ srname, *info);
+
+/* End of XERBLA */
+
+ return 0;
+} /* xerbla_ */
+
diff --git a/SRC/zcolumn_bmod.c b/SRC/zcolumn_bmod.c
new file mode 100644
index 0000000..7f2ef75
--- /dev/null
+++ b/SRC/zcolumn_bmod.c
@@ -0,0 +1,363 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "zsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void zusolve(int, int, doublecomplex*, doublecomplex*);
+void zlsolve(int, int, doublecomplex*, doublecomplex*);
+void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
+
+
+
+/* Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+zcolumn_bmod (
+ const int jcol, /* in */
+ const int nseg, /* in */
+ doublecomplex *dense, /* in */
+ doublecomplex *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int fpanelc, /* in -- first column in the current panel */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose:
+ * ========
+ * Performs numeric block updates (sup-col) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ doublecomplex alpha, beta;
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in supernode
+ * nsupr = no of rows in supernode (used as leading dimension)
+ * luptr = location of supernodal LU-block in storage
+ * kfnz = first nonz in the k-th supernodal segment
+ * no_zeros = no of leading zeros in a supernodal U-segment
+ */
+ doublecomplex ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int fsupc, nsupc, nsupr, segsze;
+ int nrow; /* No of rows in the matrix of matrix-vector */
+ int jcolp1, jsupno, k, ksub, krep, krep_ind, ksupno;
+ register int lptr, kfnz, isub, irow, i;
+ register int no_zeros, new_next;
+ int ufirst, nextlu;
+ int fst_col; /* First column within small LU update */
+ int d_fsupc; /* Distance between the first column of the current
+ panel and the first column of the current snode. */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ doublecomplex *lusup;
+ int *xlusup;
+ int nzlumax;
+ doublecomplex *tempv1;
+ doublecomplex zero = {0.0, 0.0};
+ doublecomplex one = {1.0, 0.0};
+ doublecomplex none = {-1.0, 0.0};
+ doublecomplex comp_temp, comp_temp1;
+ int mem_error;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ nzlumax = Glu->nzlumax;
+ jcolp1 = jcol + 1;
+ jsupno = supno[jcol];
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+
+ krep = segrep[k];
+ k--;
+ ksupno = supno[krep];
+ if ( jsupno != ksupno ) { /* Outside the rectangular supernode */
+
+ fsupc = xsup[ksupno];
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ /* Distance from the current supernode to the current panel;
+ d_fsupc=0 if fsupc > fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ luptr = xlusup[fst_col] + d_fsupc;
+ lptr = xlsub[fsupc] + d_fsupc;
+
+ kfnz = repfnz[krep];
+ kfnz = SUPERLU_MAX ( kfnz, fpanelc );
+
+ segsze = krep - kfnz + 1;
+ nsupc = krep - fst_col + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nrow = nsupr - d_fsupc - nsupc;
+ krep_ind = lptr + nsupc - 1;
+
+ ops[TRSV] += 4 * segsze * (segsze - 1);
+ ops[GEMV] += 8 * nrow * segsze;
+
+
+
+ /*
+ * Case 1: Update U-segment of size 1 -- col-col update
+ */
+ if ( segsze == 1 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ z_sub(&dense[irow], &dense[irow], &comp_temp);
+ luptr++;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) { /* Case 2: 2cols-col update */
+ zz_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ z_sub(&ukj, &ukj, &comp_temp);
+ dense[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ zz_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&dense[irow], &dense[irow], &comp_temp);
+ }
+ } else { /* Case 3: 3cols-col update */
+ ukj2 = dense[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ zz_mult(&comp_temp, &ukj2, &lusup[luptr2-1]);
+ z_sub(&ukj1, &ukj1, &comp_temp);
+
+ zz_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ zz_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&ukj, &ukj, &comp_temp);
+
+ dense[lsub[krep_ind]] = ukj;
+ dense[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++;
+ luptr1++;
+ luptr2++;
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ zz_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ zz_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&dense[irow], &dense[irow], &comp_temp);
+ }
+ }
+
+
+ } else {
+ /*
+ * Case: sup-col update
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense
+ */
+
+ no_zeros = kfnz - fst_col;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*] */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ tempv[i] = dense[irow];
+ ++isub;
+ }
+
+ /* Dense triangular solve -- start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ CGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ zgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ zlsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ zmatvec (nsupr, nrow , segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+
+ /* Scatter tempv[] into SPA dense[] as a temporary storage */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense[irow] = tempv[i];
+ tempv[i] = zero;
+ ++isub;
+ }
+
+ /* Scatter tempv1[] into SPA dense[] */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ z_sub(&dense[irow], &dense[irow], &tempv1[i]);
+ tempv1[i] = zero;
+ ++isub;
+ }
+ }
+
+ } /* if jsupno ... */
+
+ } /* for each segment... */
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ nextlu = xlusup[jcol];
+ fsupc = xsup[jsupno];
+
+ /* Copy the SPA dense into L\U[*,j] */
+ new_next = nextlu + xlsub[fsupc+1] - xlsub[fsupc];
+ while ( new_next > nzlumax ) {
+ if (mem_error = zLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, Glu))
+ return (mem_error);
+ lusup = Glu->lusup;
+ lsub = Glu->lsub;
+ }
+
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = zero;
+ ++nextlu;
+ }
+
+ xlusup[jcolp1] = nextlu; /* Close L\U[*,jcol] */
+
+ /* For more updates within the panel (also within the current supernode),
+ * should start from the first column of the panel, or the first column
+ * of the supernode, whichever is bigger. There are 2 cases:
+ * 1) fsupc < fpanelc, then fst_col := fpanelc
+ * 2) fsupc >= fpanelc, then fst_col := fsupc
+ */
+ fst_col = SUPERLU_MAX ( fsupc, fpanelc );
+
+ if ( fst_col < jcol ) {
+
+ /* Distance between the current supernode and the current panel.
+ d_fsupc=0 if fsupc >= fpanelc. */
+ d_fsupc = fst_col - fsupc;
+
+ lptr = xlsub[fsupc] + d_fsupc;
+ luptr = xlusup[fst_col] + d_fsupc;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc]; /* Leading dimension */
+ nsupc = jcol - fst_col; /* Excluding jcol */
+ nrow = nsupr - d_fsupc - nsupc;
+
+ /* Points to the beginning of jcol in snode L\U(jsupno) */
+ ufirst = xlusup[jcol] + d_fsupc;
+
+ ops[TRSV] += 4 * nsupc * (nsupc - 1);
+ ops[GEMV] += 8 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#else
+ ztrsv_( "L", "N", "U", &nsupc, &lusup[luptr],
+ &nsupr, &lusup[ufirst], &incx );
+#endif
+
+ alpha = none; beta = one; /* y := beta*y + alpha*A*x */
+
+#ifdef _CRAY
+ CGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ zgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ zlsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+
+ zmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], tempv );
+
+ /* Copy updates from tempv[*] into lusup[*] */
+ isub = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ z_sub(&lusup[isub], &lusup[isub], &tempv[i]);
+ tempv[i] = zero;
+ ++isub;
+ }
+
+#endif
+
+
+ } /* if fst_col < jcol ... */
+
+ return 0;
+}
diff --git a/SRC/zcolumn_dfs.c b/SRC/zcolumn_dfs.c
new file mode 100644
index 0000000..bfae8a0
--- /dev/null
+++ b/SRC/zcolumn_dfs.c
@@ -0,0 +1,270 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+
+/* What type of supernodes we want */
+#define T2_SUPER
+
+int
+zcolumn_dfs(
+ const int m, /* in - number of rows in the matrix */
+ const int jcol, /* in */
+ int *perm_r, /* in */
+ int *nseg, /* modified - with new segments appended */
+ int *lsub_col, /* in - defines the RHS vector to start the dfs */
+ int *segrep, /* modified - with new segments appended */
+ int *repfnz, /* modified */
+ int *xprune, /* modified */
+ int *marker, /* modified */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * "column_dfs" performs a symbolic factorization on column jcol, and
+ * decide the supernode boundary.
+ *
+ * This routine does not use numeric values, but only use the RHS
+ * row indices to start the dfs.
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives. The routine returns a list of such supernodal
+ * representatives in topological order of the dfs that generates them.
+ * The location of the first nonzero in each such supernodal segment
+ * (supernodal entry location) is also returned.
+ *
+ * Local parameters
+ * ================
+ * nseg: no of segments in current U[*,j]
+ * jsuper: jsuper=EMPTY if column j does not belong to the same
+ * supernode as j-1. Otherwise, jsuper=nsuper.
+ *
+ * marker2: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * > 0 number of bytes allocated when run out of space.
+ *
+ */
+ int jcolp1, jcolm1, jsuper, nsuper, nextl;
+ int k, krep, krow, kmark, kperm;
+ int *marker2; /* Used for small panel LU */
+ int fsupc; /* First column of a snode */
+ int myfnz; /* First nonz column of a U-segment */
+ int chperm, chmark, chrep, kchild;
+ int xdfs, maxdfs, kpar, oldrep;
+ int jptr, jm1ptr;
+ int ito, ifrom, istop; /* Used to compress row subscripts */
+ int mem_error;
+ int *xsup, *supno, *lsub, *xlsub;
+ int nzlmax;
+ static int first = 1, maxsuper;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ first = 0;
+ }
+ jcolp1 = jcol + 1;
+ jcolm1 = jcol - 1;
+ nsuper = supno[jcol];
+ jsuper = nsuper;
+ nextl = xlsub[jcol];
+ marker2 = &marker[2*m];
+
+
+ /* For each nonzero in A[*,jcol] do dfs */
+ for (k = 0; lsub_col[k] != EMPTY; k++) {
+
+ krow = lsub_col[k];
+ lsub_col[k] = EMPTY;
+ kmark = marker2[krow];
+
+ /* krow was visited before, go to the next nonz */
+ if ( kmark == jcol ) continue;
+
+ /* For each unmarked nbr krow of jcol
+ * krow is in L: place it in structure of L[*,jcol]
+ */
+ marker2[krow] = jcol;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ lsub[nextl++] = krow; /* krow is indexed into A */
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = zLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( kmark != jcolm1 ) jsuper = EMPTY;/* Row index subset testing */
+ } else {
+ /* krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz[krep];
+
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > kperm ) repfnz[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker2[kchild];
+
+ if ( chmark != jcol ) { /* Not reached yet */
+ marker2[kchild] = jcol;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,k] */
+ if ( chperm == EMPTY ) {
+ lsub[nextl++] = kchild;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error =
+ zLUMemXpand(jcol,nextl,LSUB,&nzlmax,Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ if ( chmark != jcolm1 ) jsuper = EMPTY;
+ } else {
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz[chrep];
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz[chrep] = chperm;
+ } else {
+ /* Continue dfs at super-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L^t) */
+ parent[krep] = oldrep;
+ repfnz[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+ } /* else */
+
+ } /* else */
+
+ } /* if */
+
+ } /* while */
+
+ /* krow has no more unexplored nbrs;
+ * place supernode-rep krep in postorder DFS.
+ * backtrack dfs to its parent
+ */
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ kpar = parent[krep]; /* Pop from stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+ } while ( kpar != EMPTY ); /* Until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonzero ... */
+
+ /* Check to see if j belongs in the same supernode as j-1 */
+ if ( jcol == 0 ) { /* Do nothing for column 0 */
+ nsuper = supno[0] = 0;
+ } else {
+ fsupc = xsup[nsuper];
+ jptr = xlsub[jcol]; /* Not compressed yet */
+ jm1ptr = xlsub[jcolm1];
+
+#ifdef T2_SUPER
+ if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = EMPTY;
+#endif
+ /* Make sure the number of columns in a supernode doesn't
+ exceed threshold. */
+ if ( jcol - fsupc >= maxsuper ) jsuper = EMPTY;
+
+ /* If jcol starts a new supernode, reclaim storage space in
+ * lsub from the previous supernode. Note we only store
+ * the subscript set of the first and last columns of
+ * a supernode. (first for num values, last for pruning)
+ */
+ if ( jsuper == EMPTY ) { /* starts a new supernode */
+ if ( (fsupc < jcolm1-1) ) { /* >= 3 columns in nsuper */
+#ifdef CHK_COMPRESS
+ printf(" Compress lsub[] at super %d-%d\n", fsupc, jcolm1);
+#endif
+ ito = xlsub[fsupc+1];
+ xlsub[jcolm1] = ito;
+ istop = ito + jptr - jm1ptr;
+ xprune[jcolm1] = istop; /* Initialize xprune[jcol-1] */
+ xlsub[jcol] = istop;
+ for (ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)
+ lsub[ito] = lsub[ifrom];
+ nextl = ito; /* = istop + length(jcol) */
+ }
+ nsuper++;
+ supno[jcol] = nsuper;
+ } /* if a new supernode */
+
+ } /* else: jcol > 0 */
+
+ /* Tidy up the pointers before exit */
+ xsup[nsuper+1] = jcolp1;
+ supno[jcolp1] = nsuper;
+ xprune[jcol] = nextl; /* Initialize upper bound for pruning */
+ xlsub[jcolp1] = nextl;
+
+ return 0;
+}
diff --git a/SRC/zcopy_to_ucol.c b/SRC/zcopy_to_ucol.c
new file mode 100644
index 0000000..7c8969b
--- /dev/null
+++ b/SRC/zcopy_to_ucol.c
@@ -0,0 +1,105 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+#include "util.h"
+
+int
+zcopy_to_ucol(
+ int jcol, /* in */
+ int nseg, /* in */
+ int *segrep, /* in */
+ int *repfnz, /* in */
+ int *perm_r, /* in */
+ doublecomplex *dense, /* modified - reset to zero on return */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Gather from SPA dense[*] to global ucol[*].
+ */
+ int ksub, krep, ksupno;
+ int i, k, kfnz, segsze;
+ int fsupc, isub, irow;
+ int jsupno, nextu;
+ int new_next, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ doublecomplex *ucol;
+ int *usub, *xusub;
+ int nzumax;
+
+ doublecomplex zero = {0.0, 0.0};
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+ nzumax = Glu->nzumax;
+
+ jsupno = supno[jcol];
+ nextu = xusub[jcol];
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) {
+ krep = segrep[k--];
+ ksupno = supno[krep];
+
+ if ( ksupno != jsupno ) { /* Should go into ucol[] */
+ kfnz = repfnz[krep];
+ if ( kfnz != EMPTY ) { /* Nonzero U-segment */
+
+ fsupc = xsup[ksupno];
+ isub = xlsub[fsupc] + kfnz - fsupc;
+ segsze = krep - kfnz + 1;
+
+ new_next = nextu + segsze;
+ while ( new_next > nzumax ) {
+ if (mem_error = zLUMemXpand(jcol, nextu, UCOL, &nzumax, Glu))
+ return (mem_error);
+ ucol = Glu->ucol;
+ if (mem_error = zLUMemXpand(jcol, nextu, USUB, &nzumax, Glu))
+ return (mem_error);
+ usub = Glu->usub;
+ lsub = Glu->lsub;
+ }
+
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ usub[nextu] = perm_r[irow];
+ ucol[nextu] = dense[irow];
+ dense[irow] = zero;
+ nextu++;
+ isub++;
+ }
+
+ }
+
+ }
+
+ } /* for each segment... */
+
+ xusub[jcol + 1] = nextu; /* Close U[*,jcol] */
+ return 0;
+}
diff --git a/SRC/zgscon.c b/SRC/zgscon.c
new file mode 100644
index 0000000..f811069
--- /dev/null
+++ b/SRC/zgscon.c
@@ -0,0 +1,143 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: zgscon.c
+ * History: Modified from lapack routines ZGECON.
+ */
+#include <math.h>
+#include "zsp_defs.h"
+
+void
+zgscon(char *norm, SuperMatrix *L, SuperMatrix *U,
+ double anorm, double *rcond, SuperLUStat_t *stat, int *info)
+{
+/*
+ Purpose
+ =======
+
+ ZGSCON estimates the reciprocal of the condition number of a general
+ real matrix A, in either the 1-norm or the infinity-norm, using
+ the LU factorization computed by ZGETRF.
+
+ An estimate is obtained for norm(inv(A)), and the reciprocal of the
+ condition number is computed as
+ RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ NORM (input) char*
+ Specifies whether the 1-norm condition number or the
+ infinity-norm condition number is required:
+ = '1' or 'O': 1-norm;
+ = 'I': Infinity-norm.
+
+ L (input) SuperMatrix*
+ The factor L from the factorization Pr*A*Pc=L*U as computed by
+ zgstrf(). Use compressed row subscripts storage for supernodes,
+ i.e., L has types: Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+
+ U (input) SuperMatrix*
+ The factor U from the factorization Pr*A*Pc=L*U as computed by
+ zgstrf(). Use column-wise storage scheme, i.e., U has types:
+ Stype = SLU_NC, Dtype = SLU_Z, Mtype = TRU.
+
+ ANORM (input) double
+ If NORM = '1' or 'O', the 1-norm of the original matrix A.
+ If NORM = 'I', the infinity-norm of the original matrix A.
+
+ RCOND (output) double*
+ The reciprocal of the condition number of the matrix A,
+ computed as RCOND = 1/(norm(A) * norm(inv(A))).
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ int kase, kase1, onenrm, i;
+ double ainvnm;
+ doublecomplex *work;
+ extern int zrscl_(int *, doublecomplex *, doublecomplex *, int *);
+
+ extern int zlacon_(int *, doublecomplex *, doublecomplex *, double *, int *);
+
+
+ /* Test the input parameters. */
+ *info = 0;
+ onenrm = *(unsigned char *)norm == '1' || lsame_(norm, "O");
+ if (! onenrm && ! lsame_(norm, "I")) *info = -1;
+ else if (L->nrow < 0 || L->nrow != L->ncol ||
+ L->Stype != SLU_SC || L->Dtype != SLU_Z || L->Mtype != SLU_TRLU)
+ *info = -2;
+ else if (U->nrow < 0 || U->nrow != U->ncol ||
+ U->Stype != SLU_NC || U->Dtype != SLU_Z || U->Mtype != SLU_TRU)
+ *info = -3;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("zgscon", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ *rcond = 0.;
+ if ( L->nrow == 0 || U->nrow == 0) {
+ *rcond = 1.;
+ return;
+ }
+
+ work = doublecomplexCalloc( 3*L->nrow );
+
+
+ if ( !work )
+ ABORT("Malloc fails for work arrays in zgscon.");
+
+ /* Estimate the norm of inv(A). */
+ ainvnm = 0.;
+ if ( onenrm ) kase1 = 1;
+ else kase1 = 2;
+ kase = 0;
+
+ do {
+ zlacon_(&L->nrow, &work[L->nrow], &work[0], &ainvnm, &kase);
+
+ if (kase == 0) break;
+
+ if (kase == kase1) {
+ /* Multiply by inv(L). */
+ sp_ztrsv("L", "No trans", "Unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(U). */
+ sp_ztrsv("U", "No trans", "Non-unit", L, U, &work[0], stat, info);
+
+ } else {
+
+ /* Multiply by inv(U'). */
+ sp_ztrsv("U", "Transpose", "Non-unit", L, U, &work[0], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_ztrsv("L", "Transpose", "Unit", L, U, &work[0], stat, info);
+
+ }
+
+ } while ( kase != 0 );
+
+ /* Compute the estimate of the reciprocal condition number. */
+ if (ainvnm != 0.) *rcond = (1. / ainvnm) / anorm;
+
+ SUPERLU_FREE (work);
+ return;
+
+} /* zgscon */
+
diff --git a/SRC/zgsequ.c b/SRC/zgsequ.c
new file mode 100644
index 0000000..659ef1a
--- /dev/null
+++ b/SRC/zgsequ.c
@@ -0,0 +1,186 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: zgsequ.c
+ * History: Modified from LAPACK routine ZGEEQU
+ */
+#include <math.h>
+#include "zsp_defs.h"
+#include "util.h"
+
+void
+zgsequ(SuperMatrix *A, double *r, double *c, double *rowcnd,
+ double *colcnd, double *amax, int *info)
+{
+/*
+ Purpose
+ =======
+
+ ZGSEQU computes row and column scalings intended to equilibrate an
+ M-by-N sparse matrix A and reduce its condition number. R returns the row
+ scale factors and C the column scale factors, chosen to try to make
+ the largest element in each row and column of the matrix B with
+ elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+
+ R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+ number and BIGNUM = largest safe number. Use of these scaling
+ factors is not guaranteed to reduce the condition number of A but
+ works well in practice.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input) SuperMatrix*
+ The matrix of dimension (A->nrow, A->ncol) whose equilibration
+ factors are to be computed. The type of A can be:
+ Stype = SLU_NC; Dtype = SLU_Z; Mtype = SLU_GE.
+
+ R (output) double*, size A->nrow
+ If INFO = 0 or INFO > M, R contains the row scale factors
+ for A.
+
+ C (output) double*, size A->ncol
+ If INFO = 0, C contains the column scale factors for A.
+
+ ROWCND (output) double*
+ If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+ smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+ AMAX is neither too large nor too small, it is not worth
+ scaling by R.
+
+ COLCND (output) double*
+ If INFO = 0, COLCND contains the ratio of the smallest
+ C(i) to the largest C(i). If COLCND >= 0.1, it is not
+ worth scaling by C.
+
+ AMAX (output) double*
+ Absolute value of largest matrix element. If AMAX is very
+ close to overflow or very close to underflow, the matrix
+ should be scaled.
+
+ INFO (output) int*
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+ > 0: if INFO = i, and i is
+ <= A->nrow: the i-th row of A is exactly zero
+ > A->ncol: the (i-M)-th column of A is exactly zero
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ doublecomplex *Aval;
+ int i, j, irow;
+ double rcmin, rcmax;
+ double bignum, smlnum;
+ extern double dlamch_(char *);
+
+ /* Test the input parameters. */
+ *info = 0;
+ if ( A->nrow < 0 || A->ncol < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_Z || A->Mtype != SLU_GE )
+ *info = -1;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("zgsequ", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || A->ncol == 0 ) {
+ *rowcnd = 1.;
+ *colcnd = 1.;
+ *amax = 0.;
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Get machine constants. */
+ smlnum = dlamch_("S");
+ bignum = 1. / smlnum;
+
+ /* Compute row scale factors. */
+ for (i = 0; i < A->nrow; ++i) r[i] = 0.;
+
+ /* Find the maximum element in each row. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ r[irow] = SUPERLU_MAX( r[irow], z_abs1(&Aval[i]) );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ rcmax = SUPERLU_MAX(rcmax, r[i]);
+ rcmin = SUPERLU_MIN(rcmin, r[i]);
+ }
+ *amax = rcmax;
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (i = 0; i < A->nrow; ++i)
+ if (r[i] == 0.) {
+ *info = i + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (i = 0; i < A->nrow; ++i)
+ r[i] = 1. / SUPERLU_MIN( SUPERLU_MAX( r[i], smlnum ), bignum );
+ /* Compute ROWCND = min(R(I)) / max(R(I)) */
+ *rowcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ /* Compute column scale factors */
+ for (j = 0; j < A->ncol; ++j) c[j] = 0.;
+
+ /* Find the maximum element in each column, assuming the row
+ scalings computed above. */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ c[j] = SUPERLU_MAX( c[j], z_abs1(&Aval[i]) * r[irow] );
+ }
+
+ /* Find the maximum and minimum scale factors. */
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ rcmax = SUPERLU_MAX(rcmax, c[j]);
+ rcmin = SUPERLU_MIN(rcmin, c[j]);
+ }
+
+ if (rcmin == 0.) {
+ /* Find the first zero scale factor and return an error code. */
+ for (j = 0; j < A->ncol; ++j)
+ if ( c[j] == 0. ) {
+ *info = A->nrow + j + 1;
+ return;
+ }
+ } else {
+ /* Invert the scale factors. */
+ for (j = 0; j < A->ncol; ++j)
+ c[j] = 1. / SUPERLU_MIN( SUPERLU_MAX( c[j], smlnum ), bignum);
+ /* Compute COLCND = min(C(J)) / max(C(J)) */
+ *colcnd = SUPERLU_MAX( rcmin, smlnum ) / SUPERLU_MIN( rcmax, bignum );
+ }
+
+ return;
+
+} /* zgsequ */
+
+
diff --git a/SRC/zgsrfs.c b/SRC/zgsrfs.c
new file mode 100644
index 0000000..6c655fd
--- /dev/null
+++ b/SRC/zgsrfs.c
@@ -0,0 +1,447 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: zgsrfs.c
+ * History: Modified from lapack routine ZGERFS
+ */
+#include <math.h>
+#include "zsp_defs.h"
+
+void
+zgsrfs(trans_t trans, SuperMatrix *A, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, char *equed, double *R, double *C,
+ SuperMatrix *B, SuperMatrix *X, double *ferr, double *berr,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZGSRFS improves the computed solution to a system of linear
+ * equations and provides error bounds and backward error estimates for
+ * the solution.
+ *
+ * If equilibration was performed, the system becomes:
+ * (diag(R)*A_original*diag(C)) * X = diag(R)*B_original.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * A (input) SuperMatrix*
+ * The original matrix A in the system, or the scaled A if
+ * equilibration was done. The type of A can be:
+ * Stype = SLU_NC, Dtype = SLU_Z, Mtype = SLU_GE.
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * zgstrf(). Use column-wise storage scheme,
+ * i.e., U has types: Stype = SLU_NC, Dtype = SLU_Z, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (A->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * equed (input) Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by
+ * diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ *
+ * R (input) double*, dimension (A->nrow)
+ * The row scale factors for A.
+ * If equed = 'R' or 'B', A is premultiplied by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ *
+ * C (input) double*, dimension (A->ncol)
+ * The column scale factors for A.
+ * If equed = 'C' or 'B', A is postmultiplied by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ *
+ * B (input) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * The right hand side matrix B.
+ * if equed = 'R' or 'B', B is premultiplied by diag(R).
+ *
+ * X (input/output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * On entry, the solution matrix X, as computed by zgstrs().
+ * On exit, the improved solution matrix X.
+ * if *equed = 'C' or 'B', X should be premultiplied by diag(C)
+ * in order to obtain the solution to the original system.
+ *
+ * FERR (output) double*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ *
+ * BERR (output) double*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ *
+ * Internal Parameters
+ * ===================
+ *
+ * ITMAX is the maximum number of steps of iterative refinement.
+ *
+ */
+
+#define ITMAX 5
+
+ /* Table of constant values */
+ int ione = 1;
+ doublecomplex ndone = {-1., 0.};
+ doublecomplex done = {1., 0.};
+
+ /* Local variables */
+ NCformat *Astore;
+ doublecomplex *Aval;
+ SuperMatrix Bjcol;
+ DNformat *Bstore, *Xstore, *Bjcol_store;
+ doublecomplex *Bmat, *Xmat, *Bptr, *Xptr;
+ int kase;
+ double safe1, safe2;
+ int i, j, k, irow, nz, count, notran, rowequ, colequ;
+ int ldb, ldx, nrhs;
+ double s, xk, lstres, eps, safmin;
+ char transc[1];
+ trans_t transt;
+ doublecomplex *work;
+ double *rwork;
+ int *iwork;
+ extern double dlamch_(char *);
+ extern int zlacon_(int *, doublecomplex *, doublecomplex *, double *, int *);
+#ifdef _CRAY
+ extern int CCOPY(int *, doublecomplex *, int *, doublecomplex *, int *);
+ extern int CSAXPY(int *, doublecomplex *, doublecomplex *, int *, doublecomplex *, int *);
+#else
+ extern int zcopy_(int *, doublecomplex *, int *, doublecomplex *, int *);
+ extern int zaxpy_(int *, doublecomplex *, doublecomplex *, int *, doublecomplex *, int *);
+#endif
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ /* Test the input parameters */
+ *info = 0;
+ notran = (trans == NOTRANS);
+ if ( !notran && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ A->Stype != SLU_NC || A->Dtype != SLU_Z || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_Z || L->Mtype != SLU_TRLU )
+ *info = -3;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_Z || U->Mtype != SLU_TRU )
+ *info = -4;
+ else if ( ldb < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_Z || B->Mtype != SLU_GE )
+ *info = -10;
+ else if ( ldx < SUPERLU_MAX(0, A->nrow) ||
+ X->Stype != SLU_DN || X->Dtype != SLU_Z || X->Mtype != SLU_GE )
+ *info = -11;
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("zgsrfs", &i);
+ return;
+ }
+
+ /* Quick return if possible */
+ if ( A->nrow == 0 || nrhs == 0) {
+ for (j = 0; j < nrhs; ++j) {
+ ferr[j] = 0.;
+ berr[j] = 0.;
+ }
+ return;
+ }
+
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+
+ /* Allocate working space */
+ work = doublecomplexMalloc(2*A->nrow);
+ rwork = (double *) SUPERLU_MALLOC( A->nrow * sizeof(double) );
+ iwork = intMalloc(A->nrow);
+ if ( !work || !rwork || !iwork )
+ ABORT("Malloc fails for work/rwork/iwork.");
+
+ if ( notran ) {
+ *(unsigned char *)transc = 'N';
+ transt = TRANS;
+ } else {
+ *(unsigned char *)transc = 'T';
+ transt = NOTRANS;
+ }
+
+ /* NZ = maximum number of nonzero elements in each row of A, plus 1 */
+ nz = A->ncol + 1;
+ eps = dlamch_("Epsilon");
+ safmin = dlamch_("Safe minimum");
+ safe1 = nz * safmin;
+ safe2 = safe1 / eps;
+
+ /* Compute the number of nonzeros in each row (or column) of A */
+ for (i = 0; i < A->nrow; ++i) iwork[i] = 0;
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k)
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ ++iwork[Astore->rowind[i]];
+ } else {
+ for (k = 0; k < A->ncol; ++k)
+ iwork[k] = Astore->colptr[k+1] - Astore->colptr[k];
+ }
+
+ /* Copy one column of RHS B into Bjcol. */
+ Bjcol.Stype = B->Stype;
+ Bjcol.Dtype = B->Dtype;
+ Bjcol.Mtype = B->Mtype;
+ Bjcol.nrow = B->nrow;
+ Bjcol.ncol = 1;
+ Bjcol.Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !Bjcol.Store ) ABORT("SUPERLU_MALLOC fails for Bjcol.Store");
+ Bjcol_store = Bjcol.Store;
+ Bjcol_store->lda = ldb;
+ Bjcol_store->nzval = work; /* address aliasing */
+
+ /* Do for each right hand side ... */
+ for (j = 0; j < nrhs; ++j) {
+ count = 0;
+ lstres = 3.;
+ Bptr = &Bmat[j*ldb];
+ Xptr = &Xmat[j*ldx];
+
+ while (1) { /* Loop until stopping criterion is satisfied. */
+
+ /* Compute residual R = B - op(A) * X,
+ where op(A) = A, A**T, or A**H, depending on TRANS. */
+
+#ifdef _CRAY
+ CCOPY(&A->nrow, Bptr, &ione, work, &ione);
+#else
+ zcopy_(&A->nrow, Bptr, &ione, work, &ione);
+#endif
+ sp_zgemv(transc, ndone, A, Xptr, ione, done, work, ione);
+
+ /* Compute componentwise relative backward error from formula
+ max(i) ( abs(R(i)) / ( abs(op(A))*abs(X) + abs(B) )(i) )
+ where abs(Z) is the componentwise absolute value of the matrix
+ or vector Z. If the i-th component of the denominator is less
+ than SAFE2, then SAFE1 is added to the i-th component of the
+ numerator and denominator before dividing. */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = z_abs1( &Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if (notran) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = z_abs1( &Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += z_abs1(&Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ s += z_abs1(&Aval[i]) * z_abs1(&Xptr[irow]);
+ }
+ rwork[k] += s;
+ }
+ }
+ s = 0.;
+ for (i = 0; i < A->nrow; ++i) {
+ if (rwork[i] > safe2)
+ s = SUPERLU_MAX( s, z_abs1(&work[i]) / rwork[i] );
+ else
+ s = SUPERLU_MAX( s, (z_abs1(&work[i]) + safe1) /
+ (rwork[i] + safe1) );
+ }
+ berr[j] = s;
+
+ /* Test stopping criterion. Continue iterating if
+ 1) The residual BERR(J) is larger than machine epsilon, and
+ 2) BERR(J) decreased by at least a factor of 2 during the
+ last iteration, and
+ 3) At most ITMAX iterations tried. */
+
+ if (berr[j] > eps && berr[j] * 2. <= lstres && count < ITMAX) {
+ /* Update solution and try again. */
+ zgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+#ifdef _CRAY
+ CAXPY(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#else
+ zaxpy_(&A->nrow, &done, work, &ione,
+ &Xmat[j*ldx], &ione);
+#endif
+ lstres = berr[j];
+ ++count;
+ } else {
+ break;
+ }
+
+ } /* end while */
+
+ stat->RefineSteps = count;
+
+ /* Bound error from formula:
+ norm(X - XTRUE) / norm(X) .le. FERR = norm( abs(inv(op(A)))*
+ ( abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) / norm(X)
+ where
+ norm(Z) is the magnitude of the largest component of Z
+ inv(op(A)) is the inverse of op(A)
+ abs(Z) is the componentwise absolute value of the matrix or
+ vector Z
+ NZ is the maximum number of nonzeros in any row of A, plus 1
+ EPS is machine epsilon
+
+ The i-th component of abs(R)+NZ*EPS*(abs(op(A))*abs(X)+abs(B))
+ is incremented by SAFE1 if the i-th component of
+ abs(op(A))*abs(X) + abs(B) is less than SAFE2.
+
+ Use ZLACON to estimate the infinity-norm of the matrix
+ inv(op(A)) * diag(W),
+ where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) */
+
+ for (i = 0; i < A->nrow; ++i) rwork[i] = z_abs1( &Bptr[i] );
+
+ /* Compute abs(op(A))*abs(X) + abs(B). */
+ if ( notran ) {
+ for (k = 0; k < A->ncol; ++k) {
+ xk = z_abs1( &Xptr[k] );
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i)
+ rwork[Astore->rowind[i]] += z_abs1(&Aval[i]) * xk;
+ }
+ } else {
+ for (k = 0; k < A->ncol; ++k) {
+ s = 0.;
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ irow = Astore->rowind[i];
+ xk = z_abs1( &Xptr[irow] );
+ s += z_abs1(&Aval[i]) * xk;
+ }
+ rwork[k] += s;
+ }
+ }
+
+ for (i = 0; i < A->nrow; ++i)
+ if (rwork[i] > safe2)
+ rwork[i] = z_abs(&work[i]) + (iwork[i]+1)*eps*rwork[i];
+ else
+ rwork[i] = z_abs(&work[i])+(iwork[i]+1)*eps*rwork[i]+safe1;
+ kase = 0;
+
+ do {
+ zlacon_(&A->nrow, &work[A->nrow], work,
+ &ferr[j], &kase);
+ if (kase == 0) break;
+
+ if (kase == 1) {
+ /* Multiply by diag(W)*inv(op(A)**T)*(diag(C) or diag(R)). */
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) {
+ zd_mult(&work[i], &work[i], C[i]);
+ }
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&work[i], &work[i], R[i]);
+ }
+
+ zgstrs (transt, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&work[i], &work[i], rwork[i]);
+ }
+ } else {
+ /* Multiply by (diag(C) or diag(R))*inv(op(A))*diag(W). */
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&work[i], &work[i], rwork[i]);
+ }
+
+ zgstrs (trans, L, U, perm_c, perm_r, &Bjcol, stat, info);
+
+ if ( notran && colequ )
+ for (i = 0; i < A->ncol; ++i) {
+ zd_mult(&work[i], &work[i], C[i]);
+ }
+ else if ( !notran && rowequ )
+ for (i = 0; i < A->ncol; ++i) {
+ zd_mult(&work[i], &work[i], R[i]);
+ }
+ }
+
+ } while ( kase != 0 );
+
+ /* Normalize error. */
+ lstres = 0.;
+ if ( notran && colequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, C[i] * z_abs1( &Xptr[i]) );
+ } else if ( !notran && rowequ ) {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, R[i] * z_abs1( &Xptr[i]) );
+ } else {
+ for (i = 0; i < A->nrow; ++i)
+ lstres = SUPERLU_MAX( lstres, z_abs1( &Xptr[i]) );
+ }
+ if ( lstres != 0. )
+ ferr[j] /= lstres;
+
+ } /* for each RHS j ... */
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(rwork);
+ SUPERLU_FREE(iwork);
+ SUPERLU_FREE(Bjcol.Store);
+
+ return;
+
+} /* zgsrfs */
diff --git a/SRC/zgssv.c b/SRC/zgssv.c
new file mode 100644
index 0000000..4494ce7
--- /dev/null
+++ b/SRC/zgssv.c
@@ -0,0 +1,222 @@
+
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+void
+zgssv(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ SuperMatrix *L, SuperMatrix *U, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZGSSV solves the system of linear equations A*X=B, using the
+ * LU factorization from ZGSTRF. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. Permute the columns of A, forming A*Pc, where Pc
+ * is a permutation matrix. For more details of this step,
+ * see sp_preorder.c.
+ *
+ * 1.2. Factor A as Pr*A*Pc=L*U with the permutation Pr determined
+ * by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 1.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the
+ * above algorithm to the transpose of A:
+ *
+ * 2.1. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.2. Factor A as Pr*transpose(A)*Pc=L*U with the permutation Pr
+ * determined by Gaussian elimination with partial pivoting.
+ * L is unit lower triangular with offdiagonal entries
+ * bounded by 1 in magnitude, and U is upper triangular.
+ *
+ * 2.3. Solve the system of equations A*X=B using the factored
+ * form of A.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR; Dtype = SLU_Z; Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, column permutation vector of size A->ncol
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * If options->ColPerm = MY_PERMC or options->Fact = SamePattern or
+ * options->Fact = SamePattern_SameRowPerm, it is an input argument.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ * Otherwise, it is an output argument.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->RowPerm = MY_PERMR or
+ * options->Fact = SamePattern_SameRowPerm, perm_r is an
+ * input argument.
+ * otherwise it is an output argument.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_Z, Mtype = SLU_TRU.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * so the solution could not be computed.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+ DNformat *Bstore;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int lwork = 0, *etree, i;
+
+ /* Set default values for some parameters */
+ double drop_tol = 0.;
+ int panel_size; /* panel size */
+ int relax; /* no of columns in a relaxed snodes */
+ int permc_spec;
+ trans_t trans = NOTRANS;
+ double *utime;
+ double t; /* Temporary time */
+
+ /* Test the input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ if ( options->Fact != DOFACT ) *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_Z || A->Mtype != SLU_GE )
+ *info = -2;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_Z || B->Mtype != SLU_GE )
+ *info = -7;
+ if ( *info != 0 ) {
+ i = -(*info);
+ xerbla_("zgssv", &i);
+ return;
+ }
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ zCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ trans = TRANS;
+ } else {
+ if ( A->Stype == SLU_NC ) AA = A;
+ }
+
+ t = SuperLU_timer_();
+ /*
+ * Get column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t;
+
+ etree = intMalloc(A->ncol);
+
+ t = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t;
+
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+
+ /*printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));*/
+ t = SuperLU_timer_();
+ /* Compute the LU factorization of A. */
+ zgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, NULL, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t;
+
+ t = SuperLU_timer_();
+ if ( *info == 0 ) {
+ /* Solve the system A*X=B, overwriting B with X. */
+ zgstrs (trans, L, U, perm_c, perm_r, B, stat, info);
+ }
+ utime[SOLVE] = SuperLU_timer_() - t;
+
+ SUPERLU_FREE (etree);
+ Destroy_CompCol_Permuted(&AC);
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/zgssvx.c b/SRC/zgssvx.c
new file mode 100644
index 0000000..6549da1
--- /dev/null
+++ b/SRC/zgssvx.c
@@ -0,0 +1,614 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+void
+zgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+ int *etree, char *equed, double *R, double *C,
+ SuperMatrix *L, SuperMatrix *U, void *work, int lwork,
+ SuperMatrix *B, SuperMatrix *X, double *recip_pivot_growth,
+ double *rcond, double *ferr, double *berr,
+ mem_usage_t *mem_usage, SuperLUStat_t *stat, int *info )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZGSSVX solves the system of linear equations A*X=B or A'*X=B, using
+ * the LU factorization from zgstrf(). Error bounds on the solution and
+ * a condition estimate are also provided. It performs the following steps:
+ *
+ * 1. If A is stored column-wise (A->Stype = SLU_NC):
+ *
+ * 1.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A is
+ * overwritten by diag(R)*A*diag(C) and B by diag(R)*B
+ * (if options->Trans=NOTRANS) or diag(C)*B (if options->Trans
+ * = TRANS or CONJ).
+ *
+ * 1.2. Permute columns of A, forming A*Pc, where Pc is a permutation
+ * matrix that usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 1.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the matrix A (after equilibration if options->Equil = YES)
+ * as Pr*A*Pc = L*U, with Pr determined by partial pivoting.
+ *
+ * 1.4. Compute the reciprocal pivot growth factor.
+ *
+ * 1.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form of
+ * A is used to estimate the condition number of the matrix A. If
+ * the reciprocal of the condition number is less than machine
+ * precision, info = A->ncol+1 is returned as a warning, but the
+ * routine still goes on to solve for X and computes error bounds
+ * as described below.
+ *
+ * 1.6. The system of equations is solved for X using the factored form
+ * of A.
+ *
+ * 1.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 1.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * 2. If A is stored row-wise (A->Stype = SLU_NR), apply the above algorithm
+ * to the transpose of A:
+ *
+ * 2.1. If options->Equil = YES, scaling factors are computed to
+ * equilibrate the system:
+ * options->Trans = NOTRANS:
+ * diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+ * options->Trans = TRANS:
+ * (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+ * options->Trans = CONJ:
+ * (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+ * Whether or not the system will be equilibrated depends on the
+ * scaling of the matrix A, but if equilibration is used, A' is
+ * overwritten by diag(R)*A'*diag(C) and B by diag(R)*B
+ * (if trans='N') or diag(C)*B (if trans = 'T' or 'C').
+ *
+ * 2.2. Permute columns of transpose(A) (rows of A),
+ * forming transpose(A)*Pc, where Pc is a permutation matrix that
+ * usually preserves sparsity.
+ * For more details of this step, see sp_preorder.c.
+ *
+ * 2.3. If options->Fact != FACTORED, the LU decomposition is used to
+ * factor the transpose(A) (after equilibration if
+ * options->Fact = YES) as Pr*transpose(A)*Pc = L*U with the
+ * permutation Pr determined by partial pivoting.
+ *
+ * 2.4. Compute the reciprocal pivot growth factor.
+ *
+ * 2.5. If some U(i,i) = 0, so that U is exactly singular, then the
+ * routine returns with info = i. Otherwise, the factored form
+ * of transpose(A) is used to estimate the condition number of the
+ * matrix A. If the reciprocal of the condition number
+ * is less than machine precision, info = A->nrow+1 is returned as
+ * a warning, but the routine still goes on to solve for X and
+ * computes error bounds as described below.
+ *
+ * 2.6. The system of equations is solved for X using the factored form
+ * of transpose(A).
+ *
+ * 2.7. If options->IterRefine != NOREFINE, iterative refinement is
+ * applied to improve the computed solution matrix and calculate
+ * error bounds and backward error estimates for it.
+ *
+ * 2.8. If equilibration was used, the matrix X is premultiplied by
+ * diag(C) (if options->Trans = NOTRANS) or diag(R)
+ * (if options->Trans = TRANS or CONJ) so that it solves the
+ * original system before equilibration.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed and how the
+ * system will be solved.
+ *
+ * A (input/output) SuperMatrix*
+ * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
+ * of the linear equations is A->nrow. Currently, the type of A can be:
+ * Stype = SLU_NC or SLU_NR, Dtype = SLU_D, Mtype = SLU_GE.
+ * In the future, more general A may be handled.
+ *
+ * On entry, If options->Fact = FACTORED and equed is not 'N',
+ * then A must have been equilibrated by the scaling factors in
+ * R and/or C.
+ * On exit, A is not modified if options->Equil = NO, or if
+ * options->Equil = YES but equed = 'N' on exit.
+ * Otherwise, if options->Equil = YES and equed is not 'N',
+ * A is scaled as follows:
+ * If A->Stype = SLU_NC:
+ * equed = 'R': A := diag(R) * A
+ * equed = 'C': A := A * diag(C)
+ * equed = 'B': A := diag(R) * A * diag(C).
+ * If A->Stype = SLU_NR:
+ * equed = 'R': transpose(A) := diag(R) * transpose(A)
+ * equed = 'C': transpose(A) := transpose(A) * diag(C)
+ * equed = 'B': transpose(A) := diag(R) * transpose(A) * diag(C).
+ *
+ * perm_c (input/output) int*
+ * If A->Stype = SLU_NC, Column permutation vector of size A->ncol,
+ * which defines the permutation matrix Pc; perm_c[i] = j means
+ * column i of A is in position j in A*Pc.
+ * On exit, perm_c may be overwritten by the product of the input
+ * perm_c and a permutation that postorders the elimination tree
+ * of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
+ * is already in postorder.
+ *
+ * If A->Stype = SLU_NR, column permutation vector of size A->nrow,
+ * which describes permutation of columns of transpose(A)
+ * (rows of A) as described above.
+ *
+ * perm_r (input/output) int*
+ * If A->Stype = SLU_NC, row permutation vector of size A->nrow,
+ * which defines the permutation matrix Pr, and is determined
+ * by partial pivoting. perm_r[i] = j means row i of A is in
+ * position j in Pr*A.
+ *
+ * If A->Stype = SLU_NR, permutation vector of size A->ncol, which
+ * determines permutation of rows of transpose(A)
+ * (columns of A) as described above.
+ *
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by a
+ * new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument.
+ *
+ * etree (input/output) int*, dimension (A->ncol)
+ * Elimination tree of Pc'*A'*A*Pc.
+ * If options->Fact != FACTORED and options->Fact != DOFACT,
+ * etree is an input argument, otherwise it is an output argument.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ *
+ * equed (input/output) char*
+ * Specifies the form of equilibration that was done.
+ * = 'N': No equilibration.
+ * = 'R': Row equilibration, i.e., A was premultiplied by diag(R).
+ * = 'C': Column equilibration, i.e., A was postmultiplied by diag(C).
+ * = 'B': Both row and column equilibration, i.e., A was replaced
+ * by diag(R)*A*diag(C).
+ * If options->Fact = FACTORED, equed is an input argument,
+ * otherwise it is an output argument.
+ *
+ * R (input/output) double*, dimension (A->nrow)
+ * The row scale factors for A or transpose(A).
+ * If equed = 'R' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the left by diag(R).
+ * If equed = 'N' or 'C', R is not accessed.
+ * If options->Fact = FACTORED, R is an input argument,
+ * otherwise, R is output.
+ * If options->zFact = FACTORED and equed = 'R' or 'B', each element
+ * of R must be positive.
+ *
+ * C (input/output) double*, dimension (A->ncol)
+ * The column scale factors for A or transpose(A).
+ * If equed = 'C' or 'B', A (if A->Stype = SLU_NC) or transpose(A)
+ * (if A->Stype = SLU_NR) is multiplied on the right by diag(C).
+ * If equed = 'N' or 'R', C is not accessed.
+ * If options->Fact = FACTORED, C is an input argument,
+ * otherwise, C is output.
+ * If options->Fact = FACTORED and equed = 'C' or 'B', each element
+ * of C must be positive.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization
+ * Pr*A*Pc=L*U (if A->Stype SLU_= NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses compressed row subscripts storage for supernodes, i.e.,
+ * L has types: Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization
+ * Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
+ * Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
+ * Uses column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_Z, Mtype = SLU_TRU.
+ *
+ * work (workspace/output) void*, size (lwork) (in bytes)
+ * User supplied workspace, should be large enough
+ * to hold data structures for factors L and U.
+ * On exit, if fact is not 'F', L and U point to this array.
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * mem_usage->total_needed; no other side effects.
+ *
+ * See argument 'mem_usage' for memory usage statistics.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * If B->ncol = 0, only LU decomposition is performed, the triangular
+ * solve is skipped.
+ * On exit,
+ * if equed = 'N', B is not modified; otherwise
+ * if A->Stype = SLU_NC:
+ * if options->Trans = NOTRANS and equed = 'R' or 'B',
+ * B is overwritten by diag(R)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'C' of 'B',
+ * B is overwritten by diag(C)*B;
+ * if A->Stype = SLU_NR:
+ * if options->Trans = NOTRANS and equed = 'C' or 'B',
+ * B is overwritten by diag(C)*B;
+ * if options->Trans = TRANS or CONJ and equed = 'R' of 'B',
+ * B is overwritten by diag(R)*B.
+ *
+ * X (output) SuperMatrix*
+ * X has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * If info = 0 or info = A->ncol+1, X contains the solution matrix
+ * to the original system of equations. Note that A and B are modified
+ * on exit if equed is not 'N', and the solution to the equilibrated
+ * system is inv(diag(C))*X if options->Trans = NOTRANS and
+ * equed = 'C' or 'B', or inv(diag(R))*X if options->Trans = 'T' or 'C'
+ * and equed = 'R' or 'B'.
+ *
+ * recip_pivot_growth (output) double*
+ * The reciprocal pivot growth factor max_j( norm(A_j)/norm(U_j) ).
+ * The infinity norm is used. If recip_pivot_growth is much less
+ * than 1, the stability of the LU factorization could be poor.
+ *
+ * rcond (output) double*
+ * The estimate of the reciprocal condition number of the matrix A
+ * after equilibration (if done). If rcond is less than the machine
+ * precision (in particular, if rcond = 0), the matrix is singular
+ * to working precision. This condition is indicated by a return
+ * code of info > 0.
+ *
+ * FERR (output) double*, dimension (B->ncol)
+ * The estimated forward error bound for each solution vector
+ * X(j) (the j-th column of the solution matrix X).
+ * If XTRUE is the true solution corresponding to X(j), FERR(j)
+ * is an estimated upper bound for the magnitude of the largest
+ * element in (X(j) - XTRUE) divided by the magnitude of the
+ * largest element in X(j). The estimate is as reliable as
+ * the estimate for RCOND, and is almost always a slight
+ * overestimate of the true error.
+ * If options->IterRefine = NOREFINE, ferr = 1.0.
+ *
+ * BERR (output) double*, dimension (B->ncol)
+ * The componentwise relative backward error of each solution
+ * vector X(j) (i.e., the smallest relative change in
+ * any element of A or B that makes X(j) an exact solution).
+ * If options->IterRefine = NOREFINE, berr = 1.0.
+ *
+ * mem_usage (output) mem_usage_t*
+ * Record the memory usage statistics, consisting of following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * The number of memory expansions during the LU factorization.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly
+ * singular, so the solution and error bounds
+ * could not be computed.
+ * = A->ncol+1: U is nonsingular, but RCOND is less than machine
+ * precision, meaning that the matrix is singular to
+ * working precision. Nevertheless, the solution and
+ * error bounds are computed because there are a number
+ * of situations where the computed solution can be more
+ * accurate than the value of RCOND would suggest.
+ * > A->ncol+1: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol.
+ *
+ */
+
+ DNformat *Bstore, *Xstore;
+ doublecomplex *Bmat, *Xmat;
+ int ldb, ldx, nrhs;
+ SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
+ SuperMatrix AC; /* Matrix postmultiplied by Pc */
+ int colequ, equil, nofact, notran, rowequ, permc_spec;
+ trans_t trant;
+ char norm[1];
+ int i, j, info1;
+ double amax, anorm, bignum, smlnum, colcnd, rowcnd, rcmax, rcmin;
+ int relax, panel_size;
+ double diag_pivot_thresh, drop_tol;
+ double t0; /* temporary time */
+ double *utime;
+
+ /* External functions */
+ extern double zlangs(char *, SuperMatrix *);
+ extern double dlamch_(char *);
+
+ Bstore = B->Store;
+ Xstore = X->Store;
+ Bmat = Bstore->nzval;
+ Xmat = Xstore->nzval;
+ ldb = Bstore->lda;
+ ldx = Xstore->lda;
+ nrhs = B->ncol;
+
+ *info = 0;
+ nofact = (options->Fact != FACTORED);
+ equil = (options->Equil == YES);
+ notran = (options->Trans == NOTRANS);
+ if ( nofact ) {
+ *(unsigned char *)equed = 'N';
+ rowequ = FALSE;
+ colequ = FALSE;
+ } else {
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ smlnum = dlamch_("Safe minimum");
+ bignum = 1. / smlnum;
+ }
+
+#if 0
+printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n",
+ options->Fact, options->Trans, *equed);
+#endif
+
+ /* Test the input parameters */
+ if (!nofact && options->Fact != DOFACT && options->Fact != SamePattern &&
+ options->Fact != SamePattern_SameRowPerm &&
+ !notran && options->Trans != TRANS && options->Trans != CONJ &&
+ !equil && options->Equil != NO)
+ *info = -1;
+ else if ( A->nrow != A->ncol || A->nrow < 0 ||
+ (A->Stype != SLU_NC && A->Stype != SLU_NR) ||
+ A->Dtype != SLU_Z || A->Mtype != SLU_GE )
+ *info = -2;
+ else if (options->Fact == FACTORED &&
+ !(rowequ || colequ || lsame_(equed, "N")))
+ *info = -6;
+ else {
+ if (rowequ) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, R[j]);
+ rcmax = SUPERLU_MAX(rcmax, R[j]);
+ }
+ if (rcmin <= 0.) *info = -7;
+ else if ( A->nrow > 0)
+ rowcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else rowcnd = 1.;
+ }
+ if (colequ && *info == 0) {
+ rcmin = bignum;
+ rcmax = 0.;
+ for (j = 0; j < A->nrow; ++j) {
+ rcmin = SUPERLU_MIN(rcmin, C[j]);
+ rcmax = SUPERLU_MAX(rcmax, C[j]);
+ }
+ if (rcmin <= 0.) *info = -8;
+ else if (A->nrow > 0)
+ colcnd = SUPERLU_MAX(rcmin,smlnum) / SUPERLU_MIN(rcmax,bignum);
+ else colcnd = 1.;
+ }
+ if (*info == 0) {
+ if ( lwork < -1 ) *info = -12;
+ else if ( B->ncol < 0 || Bstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_Z ||
+ B->Mtype != SLU_GE )
+ *info = -13;
+ else if ( X->ncol < 0 || Xstore->lda < SUPERLU_MAX(0, A->nrow) ||
+ (B->ncol != 0 && B->ncol != X->ncol) ||
+ X->Stype != SLU_DN ||
+ X->Dtype != SLU_Z || X->Mtype != SLU_GE )
+ *info = -14;
+ }
+ }
+ if (*info != 0) {
+ i = -(*info);
+ xerbla_("zgssvx", &i);
+ return;
+ }
+
+ /* Initialization for factor parameters */
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ diag_pivot_thresh = options->DiagPivotThresh;
+ drop_tol = 0.0;
+
+ utime = stat->utime;
+
+ /* Convert A to SLU_NC format when necessary. */
+ if ( A->Stype == SLU_NR ) {
+ NRformat *Astore = A->Store;
+ AA = (SuperMatrix *) SUPERLU_MALLOC( sizeof(SuperMatrix) );
+ zCreate_CompCol_Matrix(AA, A->ncol, A->nrow, Astore->nnz,
+ Astore->nzval, Astore->colind, Astore->rowptr,
+ SLU_NC, A->Dtype, A->Mtype);
+ if ( notran ) { /* Reverse the transpose argument. */
+ trant = CONJ;
+ notran = 0;
+ } else {
+ trant = NOTRANS;
+ notran = 1;
+ }
+ } else { /* A->Stype == SLU_NC */
+ trant = options->Trans;
+ AA = A;
+ }
+
+ if ( nofact && equil ) {
+ t0 = SuperLU_timer_();
+ /* Compute row and column scalings to equilibrate the matrix A. */
+ zgsequ(AA, R, C, &rowcnd, &colcnd, &amax, &info1);
+
+ if ( info1 == 0 ) {
+ /* Equilibrate matrix A. */
+ zlaqgs(AA, R, C, rowcnd, colcnd, amax, equed);
+ rowequ = lsame_(equed, "R") || lsame_(equed, "B");
+ colequ = lsame_(equed, "C") || lsame_(equed, "B");
+ }
+ utime[EQUIL] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Scale the right hand side if equilibration was performed. */
+ if ( notran ) {
+ if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&Bmat[i+j*ldb], &Bmat[i+j*ldb], R[i]);
+ }
+ }
+ } else if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&Bmat[i+j*ldb], &Bmat[i+j*ldb], C[i]);
+ }
+ }
+ }
+
+ if ( nofact ) {
+
+ t0 = SuperLU_timer_();
+ /*
+ * Gnet column permutation vector perm_c[], according to permc_spec:
+ * permc_spec = NATURAL: natural ordering
+ * permc_spec = MMD_AT_PLUS_A: minimum degree on structure of A'+A
+ * permc_spec = MMD_ATA: minimum degree on structure of A'*A
+ * permc_spec = COLAMD: approximate minimum degree column ordering
+ * permc_spec = MY_PERMC: the ordering already supplied in perm_c[]
+ */
+ permc_spec = options->ColPerm;
+ if ( permc_spec != MY_PERMC && options->Fact == DOFACT )
+ get_perm_c(permc_spec, AA, perm_c);
+ utime[COLPERM] = SuperLU_timer_() - t0;
+
+ t0 = SuperLU_timer_();
+ sp_preorder(options, AA, perm_c, etree, &AC);
+ utime[ETREE] = SuperLU_timer_() - t0;
+
+/* printf("Factor PA = LU ... relax %d\tw %d\tmaxsuper %d\trowblk %d\n",
+ relax, panel_size, sp_ienv(3), sp_ienv(4));
+ fflush(stdout); */
+
+ /* Compute the LU factorization of A*Pc. */
+ t0 = SuperLU_timer_();
+ zgstrf(options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, L, U, stat, info);
+ utime[FACT] = SuperLU_timer_() - t0;
+
+ if ( lwork == -1 ) {
+ mem_usage->total_needed = *info - A->ncol;
+ return;
+ }
+ }
+
+ if ( options->PivotGrowth ) {
+ if ( *info > 0 ) {
+ if ( *info <= A->ncol ) {
+ /* Compute the reciprocal pivot growth factor of the leading
+ rank-deficient *info columns of A. */
+ *recip_pivot_growth = zPivotGrowth(*info, AA, perm_c, L, U);
+ }
+ return;
+ }
+
+ /* Compute the reciprocal pivot growth factor *recip_pivot_growth. */
+ *recip_pivot_growth = zPivotGrowth(A->ncol, AA, perm_c, L, U);
+ }
+
+ if ( options->ConditionNumber ) {
+ /* Estimate the reciprocal of the condition number of A. */
+ t0 = SuperLU_timer_();
+ if ( notran ) {
+ *(unsigned char *)norm = '1';
+ } else {
+ *(unsigned char *)norm = 'I';
+ }
+ anorm = zlangs(norm, AA);
+ zgscon(norm, L, U, anorm, rcond, stat, info);
+ utime[RCOND] = SuperLU_timer_() - t0;
+ }
+
+ if ( nrhs > 0 ) {
+ /* Compute the solution matrix X. */
+ for (j = 0; j < nrhs; j++) /* Save a copy of the right hand sides */
+ for (i = 0; i < B->nrow; i++)
+ Xmat[i + j*ldx] = Bmat[i + j*ldb];
+
+ t0 = SuperLU_timer_();
+ zgstrs (trant, L, U, perm_c, perm_r, X, stat, info);
+ utime[SOLVE] = SuperLU_timer_() - t0;
+
+ /* Use iterative refinement to improve the computed solution and compute
+ error bounds and backward error estimates for it. */
+ t0 = SuperLU_timer_();
+ if ( options->IterRefine != NOREFINE ) {
+ zgsrfs(trant, AA, L, U, perm_c, perm_r, equed, R, C, B,
+ X, ferr, berr, stat, info);
+ } else {
+ for (j = 0; j < nrhs; ++j) ferr[j] = berr[j] = 1.0;
+ }
+ utime[REFINE] = SuperLU_timer_() - t0;
+
+ /* Transform the solution matrix X to a solution of the original system. */
+ if ( notran ) {
+ if ( colequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&Xmat[i+j*ldx], &Xmat[i+j*ldx], C[i]);
+ }
+ }
+ } else if ( rowequ ) {
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < A->nrow; ++i) {
+ zd_mult(&Xmat[i+j*ldx], &Xmat[i+j*ldx], R[i]);
+ }
+ }
+ } /* end if nrhs > 0 */
+
+ if ( options->ConditionNumber ) {
+ /* Set INFO = A->ncol+1 if the matrix is singular to working precision. */
+ if ( *rcond < dlamch_("E") ) *info = A->ncol + 1;
+ }
+
+ if ( nofact ) {
+ zQuerySpace(L, U, mem_usage);
+ Destroy_CompCol_Permuted(&AC);
+ }
+ if ( A->Stype == SLU_NR ) {
+ Destroy_SuperMatrix_Store(AA);
+ SUPERLU_FREE(AA);
+ }
+
+}
diff --git a/SRC/zgstrf.c b/SRC/zgstrf.c
new file mode 100644
index 0000000..2a68b45
--- /dev/null
+++ b/SRC/zgstrf.c
@@ -0,0 +1,433 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+
+void
+zgstrf (superlu_options_t *options, SuperMatrix *A, double drop_tol,
+ int relax, int panel_size, int *etree, void *work, int lwork,
+ int *perm_c, int *perm_r, SuperMatrix *L, SuperMatrix *U,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZGSTRF computes an LU factorization of a general sparse m-by-n
+ * matrix A using partial pivoting with row interchanges.
+ * The factorization has the form
+ * Pr * A = L * U
+ * where Pr is a row permutation matrix, L is lower triangular with unit
+ * diagonal elements (lower trapezoidal if A->nrow > A->ncol), and U is upper
+ * triangular (upper trapezoidal if A->nrow < A->ncol).
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * options (input) superlu_options_t*
+ * The structure defines the input parameters to control
+ * how the LU decomposition will be performed.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = SLU_NCP; Dtype = SLU_Z; Mtype = SLU_GE.
+ *
+ * drop_tol (input) double (NOT IMPLEMENTED)
+ * Drop tolerance parameter. At step j of the Gaussian elimination,
+ * if abs(A_ij)/(max_i abs(A_ij)) < drop_tol, drop entry A_ij.
+ * 0 <= drop_tol <= 1. The default value of drop_tol is 0.
+ *
+ * relax (input) int
+ * To control degree of relaxing supernodes. If the number
+ * of nodes (columns) in a subtree of the elimination tree is less
+ * than relax, this subtree is considered as one supernode,
+ * regardless of the row structures of those columns.
+ *
+ * panel_size (input) int
+ * A panel consists of at most panel_size consecutive columns.
+ *
+ * etree (input) int*, dimension (A->ncol)
+ * Elimination tree of A'*A.
+ * Note: etree is a vector of parent pointers for a forest whose
+ * vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.
+ * On input, the columns of A should be permuted so that the
+ * etree is in a certain postorder.
+ *
+ * work (input/output) void*, size (lwork) (in bytes)
+ * User-supplied work space and space for the output data structures.
+ * Not referenced if lwork = 0;
+ *
+ * lwork (input) int
+ * Specifies the size of work array in bytes.
+ * = 0: allocate space internally by system malloc;
+ * > 0: use user-supplied work array of length lwork in bytes,
+ * returns error if space runs out.
+ * = -1: the routine guesses the amount of space needed without
+ * performing the factorization, and returns it in
+ * *info; no other side effects.
+ *
+ * perm_c (input) int*, dimension (A->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ * When searching for diagonal, perm_c[*] is applied to the
+ * row subscripts of A, so that diagonal threshold pivoting
+ * can find the diagonal of A, rather than that of A*Pc.
+ *
+ * perm_r (input/output) int*, dimension (A->nrow)
+ * Row permutation vector which defines the permutation matrix Pr,
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ * If options->Fact = SamePattern_SameRowPerm, the pivoting routine
+ * will try to use the input perm_r, unless a certain threshold
+ * criterion is violated. In that case, perm_r is overwritten by
+ * a new permutation determined by partial pivoting or diagonal
+ * threshold pivoting.
+ * Otherwise, perm_r is output argument;
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = SLU_NC,
+ * Dtype = SLU_Z, Mtype = SLU_TRU.
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ * > 0: if info = i, and i is
+ * <= A->ncol: U(i,i) is exactly zero. The factorization has
+ * been completed, but the factor U is exactly singular,
+ * and division by zero will occur if it is used to solve a
+ * system of equations.
+ * > A->ncol: number of bytes allocated when memory allocation
+ * failure occurred, plus A->ncol. If lwork = -1, it is
+ * the estimated amount of space needed, plus A->ncol.
+ *
+ * ======================================================================
+ *
+ * Local Working Arrays:
+ * ======================
+ * m = number of rows in the matrix
+ * n = number of columns in the matrix
+ *
+ * xprune[0:n-1]: xprune[*] points to locations in subscript
+ * vector lsub[*]. For column i, xprune[i] denotes the point where
+ * structural pruning begins. I.e. only xlsub[i],..,xprune[i]-1 need
+ * to be traversed for symbolic factorization.
+ *
+ * marker[0:3*m-1]: marker[i] = j means that node i has been
+ * reached when working on column j.
+ * Storage: relative to original row subscripts
+ * NOTE: There are 3 of them: marker/marker1 are used for panel dfs,
+ * see zpanel_dfs.c; marker2 is used for inner-factorization,
+ * see zcolumn_dfs.c.
+ *
+ * parent[0:m-1]: parent vector used during dfs
+ * Storage: relative to new row subscripts
+ *
+ * xplore[0:m-1]: xplore[i] gives the location of the next (dfs)
+ * unexplored neighbor of i in lsub[*]
+ *
+ * segrep[0:nseg-1]: contains the list of supernodal representatives
+ * in topological order of the dfs. A supernode representative is the
+ * last column of a supernode.
+ * The maximum size of segrep[] is n.
+ *
+ * repfnz[0:W*m-1]: for a nonzero segment U[*,j] that ends at a
+ * supernodal representative r, repfnz[r] is the location of the first
+ * nonzero in this segment. It is also used during the dfs: repfnz[r]>0
+ * indicates the supernode r has been explored.
+ * NOTE: There are W of them, each used for one column of a panel.
+ *
+ * panel_lsub[0:W*m-1]: temporary for the nonzeros row indices below
+ * the panel diagonal. These are filled in during zpanel_dfs(), and are
+ * used later in the inner LU factorization within the panel.
+ * panel_lsub[]/dense[] pair forms the SPA data structure.
+ * NOTE: There are W of them.
+ *
+ * dense[0:W*m-1]: sparse accumulating (SPA) vector for intermediate values;
+ * NOTE: there are W of them.
+ *
+ * tempv[0:*]: real temporary used for dense numeric kernels;
+ * The size of this array is defined by NUM_TEMPV() in zsp_defs.h.
+ *
+ */
+ /* Local working arrays */
+ NCPformat *Astore;
+ int *iperm_r; /* inverse of perm_r;
+ used when options->Fact == SamePattern_SameRowPerm */
+ int *iperm_c; /* inverse of perm_c */
+ int *iwork;
+ doublecomplex *zwork;
+ int *segrep, *repfnz, *parent, *xplore;
+ int *panel_lsub; /* dense[]/panel_lsub[] pair forms a w-wide SPA */
+ int *xprune;
+ int *marker;
+ doublecomplex *dense, *tempv;
+ int *relax_end;
+ doublecomplex *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int *xsup, *supno;
+ int *xlsub, *xlusup, *xusub;
+ int nzlumax;
+ static GlobalLU_t Glu; /* persistent to facilitate multiple factors. */
+
+ /* Local scalars */
+ fact_t fact = options->Fact;
+ double diag_pivot_thresh = options->DiagPivotThresh;
+ int pivrow; /* pivotal row number in the original matrix A */
+ int nseg1; /* no of segments in U-column above panel row jcol */
+ int nseg; /* no of segments in each U-column */
+ register int jcol;
+ register int kcol; /* end column of a relaxed snode */
+ register int icol;
+ register int i, k, jj, new_next, iinfo;
+ int m, n, min_mn, jsupno, fsupc, nextlu, nextu;
+ int w_def; /* upper bound on panel width */
+ int usepr, iperm_r_allocated = 0;
+ int nnzL, nnzU;
+ int *panel_histo = stat->panel_histo;
+ flops_t *ops = stat->ops;
+
+ iinfo = 0;
+ m = A->nrow;
+ n = A->ncol;
+ min_mn = SUPERLU_MIN(m, n);
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+
+ /* Allocate storage common to the factor routines */
+ *info = zLUMemInit(fact, work, lwork, m, n, Astore->nnz,
+ panel_size, L, U, &Glu, &iwork, &zwork);
+ if ( *info ) return;
+
+ xsup = Glu.xsup;
+ supno = Glu.supno;
+ xlsub = Glu.xlsub;
+ xlusup = Glu.xlusup;
+ xusub = Glu.xusub;
+
+ SetIWork(m, n, panel_size, iwork, &segrep, &parent, &xplore,
+ &repfnz, &panel_lsub, &xprune, &marker);
+ zSetRWork(m, panel_size, zwork, &dense, &tempv);
+
+ usepr = (fact == SamePattern_SameRowPerm);
+ if ( usepr ) {
+ /* Compute the inverse of perm_r */
+ iperm_r = (int *) intMalloc(m);
+ for (k = 0; k < m; ++k) iperm_r[perm_r[k]] = k;
+ iperm_r_allocated = 1;
+ }
+ iperm_c = (int *) intMalloc(n);
+ for (k = 0; k < n; ++k) iperm_c[perm_c[k]] = k;
+
+ /* Identify relaxed snodes */
+ relax_end = (int *) intMalloc(n);
+ if ( options->SymmetricMode == YES ) {
+ heap_relax_snode(n, etree, relax, marker, relax_end);
+ } else {
+ relax_snode(n, etree, relax, marker, relax_end);
+ }
+
+ ifill (perm_r, m, EMPTY);
+ ifill (marker, m * NO_MARKER, EMPTY);
+ supno[0] = -1;
+ xsup[0] = xlsub[0] = xusub[0] = xlusup[0] = 0;
+ w_def = panel_size;
+
+ /*
+ * Work on one "panel" at a time. A panel is one of the following:
+ * (a) a relaxed supernode at the bottom of the etree, or
+ * (b) panel_size contiguous columns, defined by the user
+ */
+ for (jcol = 0; jcol < min_mn; ) {
+
+ if ( relax_end[jcol] != EMPTY ) { /* start of a relaxed snode */
+ kcol = relax_end[jcol]; /* end of the relaxed snode */
+ panel_histo[kcol-jcol+1]++;
+
+ /* --------------------------------------
+ * Factorize the relaxed supernode(jcol:kcol)
+ * -------------------------------------- */
+ /* Determine the union of the row structure of the snode */
+ if ( (*info = zsnode_dfs(jcol, kcol, asub, xa_begin, xa_end,
+ xprune, marker, &Glu)) != 0 )
+ return;
+
+ nextu = xusub[jcol];
+ nextlu = xlusup[jcol];
+ jsupno = supno[jcol];
+ fsupc = xsup[jsupno];
+ new_next = nextlu + (xlsub[fsupc+1]-xlsub[fsupc])*(kcol-jcol+1);
+ nzlumax = Glu.nzlumax;
+ while ( new_next > nzlumax ) {
+ if ( (*info = zLUMemXpand(jcol, nextlu, LUSUP, &nzlumax, &Glu)) )
+ return;
+ }
+
+ for (icol = jcol; icol<= kcol; icol++) {
+ xusub[icol+1] = nextu;
+
+ /* Scatter into SPA dense[*] */
+ for (k = xa_begin[icol]; k < xa_end[icol]; k++)
+ dense[asub[k]] = a[k];
+
+ /* Numeric update within the snode */
+ zsnode_bmod(icol, jsupno, fsupc, dense, tempv, &Glu, stat);
+
+ if ( (*info = zpivotL(icol, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+#ifdef DEBUG
+ zprint_lu_col("[1]: ", icol, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol = icol;
+
+ } else { /* Work on one panel of panel_size columns */
+
+ /* Adjust panel_size so that a panel won't overlap with the next
+ * relaxed snode.
+ */
+ panel_size = w_def;
+ for (k = jcol + 1; k < SUPERLU_MIN(jcol+panel_size, min_mn); k++)
+ if ( relax_end[k] != EMPTY ) {
+ panel_size = k - jcol;
+ break;
+ }
+ if ( k == min_mn ) panel_size = min_mn - jcol;
+ panel_histo[panel_size]++;
+
+ /* symbolic factor on a panel of columns */
+ zpanel_dfs(m, panel_size, jcol, A, perm_r, &nseg1,
+ dense, panel_lsub, segrep, repfnz, xprune,
+ marker, parent, xplore, &Glu);
+
+ /* numeric sup-panel updates in topological order */
+ zpanel_bmod(m, panel_size, jcol, nseg1, dense,
+ tempv, segrep, repfnz, &Glu, stat);
+
+ /* Sparse LU within the panel, and below panel diagonal */
+ for ( jj = jcol; jj < jcol + panel_size; jj++) {
+ k = (jj - jcol) * m; /* column index for w-wide arrays */
+
+ nseg = nseg1; /* Begin after all the panel segments */
+
+ if ((*info = zcolumn_dfs(m, jj, perm_r, &nseg, &panel_lsub[k],
+ segrep, &repfnz[k], xprune, marker,
+ parent, xplore, &Glu)) != 0) return;
+
+ /* Numeric updates */
+ if ((*info = zcolumn_bmod(jj, (nseg - nseg1), &dense[k],
+ tempv, &segrep[nseg1], &repfnz[k],
+ jcol, &Glu, stat)) != 0) return;
+
+ /* Copy the U-segments to ucol[*] */
+ if ((*info = zcopy_to_ucol(jj, nseg, segrep, &repfnz[k],
+ perm_r, &dense[k], &Glu)) != 0)
+ return;
+
+ if ( (*info = zpivotL(jj, diag_pivot_thresh, &usepr, perm_r,
+ iperm_r, iperm_c, &pivrow, &Glu, stat)) )
+ if ( iinfo == 0 ) iinfo = *info;
+
+ /* Prune columns (0:jj-1) using column jj */
+ zpruneL(jj, perm_r, pivrow, nseg, segrep,
+ &repfnz[k], xprune, &Glu);
+
+ /* Reset repfnz[] for this column */
+ resetrep_col (nseg, segrep, &repfnz[k]);
+
+#ifdef DEBUG
+ zprint_lu_col("[2]: ", jj, pivrow, xprune, &Glu);
+#endif
+
+ }
+
+ jcol += panel_size; /* Move to the next panel */
+
+ } /* else */
+
+ } /* for */
+
+ *info = iinfo;
+
+ if ( m > n ) {
+ k = 0;
+ for (i = 0; i < m; ++i)
+ if ( perm_r[i] == EMPTY ) {
+ perm_r[i] = n + k;
+ ++k;
+ }
+ }
+
+ countnz(min_mn, xprune, &nnzL, &nnzU, &Glu);
+ fixupL(min_mn, perm_r, &Glu);
+
+ zLUWorkFree(iwork, zwork, &Glu); /* Free work space and compress storage */
+
+ if ( fact == SamePattern_SameRowPerm ) {
+ /* L and U structures may have changed due to possibly different
+ pivoting, even though the storage is available.
+ There could also be memory expansions, so the array locations
+ may have changed, */
+ ((SCformat *)L->Store)->nnz = nnzL;
+ ((SCformat *)L->Store)->nsuper = Glu.supno[n];
+ ((SCformat *)L->Store)->nzval = Glu.lusup;
+ ((SCformat *)L->Store)->nzval_colptr = Glu.xlusup;
+ ((SCformat *)L->Store)->rowind = Glu.lsub;
+ ((SCformat *)L->Store)->rowind_colptr = Glu.xlsub;
+ ((NCformat *)U->Store)->nnz = nnzU;
+ ((NCformat *)U->Store)->nzval = Glu.ucol;
+ ((NCformat *)U->Store)->rowind = Glu.usub;
+ ((NCformat *)U->Store)->colptr = Glu.xusub;
+ } else {
+ zCreate_SuperNode_Matrix(L, A->nrow, min_mn, nnzL, Glu.lusup,
+ Glu.xlusup, Glu.lsub, Glu.xlsub, Glu.supno,
+ Glu.xsup, SLU_SC, SLU_Z, SLU_TRLU);
+ zCreate_CompCol_Matrix(U, min_mn, min_mn, nnzU, Glu.ucol,
+ Glu.usub, Glu.xusub, SLU_NC, SLU_Z, SLU_TRU);
+ }
+
+ ops[FACT] += ops[TRSV] + ops[GEMV];
+
+ if ( iperm_r_allocated ) SUPERLU_FREE (iperm_r);
+ SUPERLU_FREE (iperm_c);
+ SUPERLU_FREE (relax_end);
+
+}
diff --git a/SRC/zgstrs.c b/SRC/zgstrs.c
new file mode 100644
index 0000000..95bcba7
--- /dev/null
+++ b/SRC/zgstrs.c
@@ -0,0 +1,345 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void zusolve(int, int, doublecomplex*, doublecomplex*);
+void zlsolve(int, int, doublecomplex*, doublecomplex*);
+void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
+
+
+void
+zgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * ZGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * zgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * zgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_Z, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ doublecomplex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ doublecomplex *work_col;
+#endif
+ doublecomplex temp_comp;
+ DNformat *Bstore;
+ doublecomplex *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ doublecomplex *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ doublecomplex *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void zprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_Z || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_Z || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_Z || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("zgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = doublecomplexCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = doublecomplexMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 8 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ zz_mult(&temp_comp, &rhs_work[fsupc], &Lval[luptr]);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ CGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ ztrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ zgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &work_col[i]);
+ work_col[i].r = 0.0;
+ work_col[i].i = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ zlsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ zmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &work[i]);
+ work[i].r = 0.;
+ work[i].i = 0.;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ zprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ z_div(&rhs_work[fsupc], &rhs_work[fsupc], &Lval[luptr]);
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ ztrsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ zusolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ zz_mult(&temp_comp, &rhs_work[jcol], &Uval[i]);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ zprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B or CONJ(A)*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+ if (trans == TRANS) {
+ for (k = 0; k < nrhs; ++k) {
+ /* Multiply by inv(U'). */
+ sp_ztrsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_ztrsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+ }
+ } else { /* trans == CONJ */
+ for (k = 0; k < nrhs; ++k) {
+ /* Multiply by conj(inv(U')). */
+ sp_ztrsv("U", "C", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by conj(inv(L')). */
+ sp_ztrsv("L", "C", "U", L, U, &Bmat[k*ldb], stat, info);
+ }
+ }
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+zprint_soln(int n, int nrhs, doublecomplex *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/zgstrs.c.bak b/SRC/zgstrs.c.bak
new file mode 100644
index 0000000..40dc89c
--- /dev/null
+++ b/SRC/zgstrs.c.bak
@@ -0,0 +1,339 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+
+
+/*
+ * Function prototypes
+ */
+void zusolve(int, int, doublecomplex*, doublecomplex*);
+void zlsolve(int, int, doublecomplex*, doublecomplex*);
+void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
+
+
+void
+zgstrs (trans_t trans, SuperMatrix *L, SuperMatrix *U,
+ int *perm_c, int *perm_r, SuperMatrix *B,
+ SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZGSTRS solves a system of linear equations A*X=B or A'*X=B
+ * with A sparse and B dense, using the LU factorization computed by
+ * ZGSTRF.
+ *
+ * See supermatrix.h for the definition of 'SuperMatrix' structure.
+ *
+ * Arguments
+ * =========
+ *
+ * trans (input) trans_t
+ * Specifies the form of the system of equations:
+ * = NOTRANS: A * X = B (No transpose)
+ * = TRANS: A'* X = B (Transpose)
+ * = CONJ: A**H * X = B (Conjugate transpose)
+ *
+ * L (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U as computed by
+ * zgstrf(). Use compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SLU_SC, Dtype = SLU_Z, Mtype = SLU_TRLU.
+ *
+ * U (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U as computed by
+ * zgstrf(). Use column-wise storage scheme, i.e., U has types:
+ * Stype = SLU_NC, Dtype = SLU_Z, Mtype = SLU_TRU.
+ *
+ * perm_c (input) int*, dimension (L->ncol)
+ * Column permutation vector, which defines the
+ * permutation matrix Pc; perm_c[i] = j means column i of A is
+ * in position j in A*Pc.
+ *
+ * perm_r (input) int*, dimension (L->nrow)
+ * Row permutation vector, which defines the permutation matrix Pr;
+ * perm_r[i] = j means row i of A is in position j in Pr*A.
+ *
+ * B (input/output) SuperMatrix*
+ * B has types: Stype = SLU_DN, Dtype = SLU_Z, Mtype = SLU_GE.
+ * On entry, the right hand side matrix.
+ * On exit, the solution matrix if info = 0;
+ *
+ * stat (output) SuperLUStat_t*
+ * Record the statistics on runtime and floating-point operation count.
+ * See util.h for the definition of 'SuperLUStat_t'.
+ *
+ * info (output) int*
+ * = 0: successful exit
+ * < 0: if info = -i, the i-th argument had an illegal value
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1, ftcs2, ftcs3, ftcs4;
+#endif
+ int incx = 1, incy = 1;
+#ifdef USE_VENDOR_BLAS
+ doublecomplex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ doublecomplex *work_col;
+#endif
+ doublecomplex temp_comp;
+ DNformat *Bstore;
+ doublecomplex *Bmat;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ doublecomplex *Lval, *Uval;
+ int fsupc, nrow, nsupr, nsupc, luptr, istart, irow;
+ int i, j, k, iptr, jcol, n, ldb, nrhs;
+ doublecomplex *work, *rhs_work, *soln;
+ flops_t solve_ops;
+ void zprint_soln();
+
+ /* Test input parameters ... */
+ *info = 0;
+ Bstore = B->Store;
+ ldb = Bstore->lda;
+ nrhs = B->ncol;
+ if ( trans != NOTRANS && trans != TRANS && trans != CONJ ) *info = -1;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ||
+ L->Stype != SLU_SC || L->Dtype != SLU_Z || L->Mtype != SLU_TRLU )
+ *info = -2;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ||
+ U->Stype != SLU_NC || U->Dtype != SLU_Z || U->Mtype != SLU_TRU )
+ *info = -3;
+ else if ( ldb < SUPERLU_MAX(0, L->nrow) ||
+ B->Stype != SLU_DN || B->Dtype != SLU_Z || B->Mtype != SLU_GE )
+ *info = -6;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("zgstrs", &i);
+ return;
+ }
+
+ n = L->nrow;
+ work = doublecomplexCalloc(n * nrhs);
+ if ( !work ) ABORT("Malloc fails for local work[].");
+ soln = doublecomplexMalloc(n);
+ if ( !soln ) ABORT("Malloc fails for local soln[].");
+
+ Bmat = Bstore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( trans == NOTRANS ) {
+ /* Permute right hand sides to form Pr*B */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_r[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ /* Forward solve PLy=Pb. */
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1) * nrhs;
+ solve_ops += 8 * nrow * nsupc * nrhs;
+
+ if ( nsupc == 1 ) {
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ luptr = L_NZ_START(fsupc);
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); iptr++){
+ irow = L_SUB(iptr);
+ ++luptr;
+ zz_mult(&temp_comp, &rhs_work[fsupc], &Lval[luptr]);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ } else {
+ luptr = L_NZ_START(fsupc);
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("N", strlen("N"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSM( ftcs1, ftcs1, ftcs2, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ CGEMM( ftcs2, ftcs2, &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#else
+ ztrsm_("L", "L", "N", "U", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+
+ zgemm_( "N", "N", &nrow, &nrhs, &nsupc, &alpha,
+ &Lval[luptr+nsupc], &nsupr, &Bmat[fsupc], &ldb,
+ &beta, &work[0], &n );
+#endif
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ work_col = &work[j*n];
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &work_col[i]);
+ work_col[i].r = 0.0;
+ work_col[i].i = 0.0;
+ iptr++;
+ }
+ }
+#else
+ for (j = 0; j < nrhs; j++) {
+ rhs_work = &Bmat[j*ldb];
+ zlsolve (nsupr, nsupc, &Lval[luptr], &rhs_work[fsupc]);
+ zmatvec (nsupr, nrow, nsupc, &Lval[luptr+nsupc],
+ &rhs_work[fsupc], &work[0] );
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; i++) {
+ irow = L_SUB(iptr);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &work[i]);
+ work[i].r = 0.;
+ work[i].i = 0.;
+ iptr++;
+ }
+ }
+#endif
+ } /* else ... */
+ } /* for L-solve */
+
+#ifdef DEBUG
+ printf("After L-solve: y=\n");
+ zprint_soln(n, nrhs, Bmat);
+#endif
+
+ /*
+ * Back solve Ux=y.
+ */
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1) * nrhs;
+
+ if ( nsupc == 1 ) {
+ rhs_work = &Bmat[0];
+ for (j = 0; j < nrhs; j++) {
+ z_div(&rhs_work[fsupc], &rhs_work[fsupc], &Lval[luptr]);
+ rhs_work += ldb;
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("U", strlen("U"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSM( ftcs1, ftcs2, ftcs3, ftcs3, &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#else
+ ztrsm_("L", "U", "N", "N", &nsupc, &nrhs, &alpha,
+ &Lval[luptr], &nsupr, &Bmat[fsupc], &ldb);
+#endif
+#else
+ for (j = 0; j < nrhs; j++)
+ zusolve ( nsupr, nsupc, &Lval[luptr], &Bmat[fsupc+j*ldb] );
+#endif
+ }
+
+ for (j = 0; j < nrhs; ++j) {
+ rhs_work = &Bmat[j*ldb];
+ for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++ ){
+ irow = U_SUB(i);
+ zz_mult(&temp_comp, &rhs_work[jcol], &Uval[i]);
+ z_sub(&rhs_work[irow], &rhs_work[irow], &temp_comp);
+ }
+ }
+ }
+
+ } /* for U-solve */
+
+#ifdef DEBUG
+ printf("After U-solve: x=\n");
+ zprint_soln(n, nrhs, Bmat);
+#endif
+
+ /* Compute the final solution X := Pc*X. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_c[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = solve_ops;
+
+ } else { /* Solve A'*X=B */
+ /* Permute right hand sides to form Pc'*B. */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[perm_c[k]] = rhs_work[k];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ stat->ops[SOLVE] = 0;
+
+ for (k = 0; k < nrhs; ++k) {
+
+ /* Multiply by inv(U'). */
+ sp_ztrsv("U", "T", "N", L, U, &Bmat[k*ldb], stat, info);
+
+ /* Multiply by inv(L'). */
+ sp_ztrsv("L", "T", "U", L, U, &Bmat[k*ldb], stat, info);
+
+ }
+
+ /* Compute the final solution X := Pr'*X (=inv(Pr)*X) */
+ for (i = 0; i < nrhs; i++) {
+ rhs_work = &Bmat[i*ldb];
+ for (k = 0; k < n; k++) soln[k] = rhs_work[perm_r[k]];
+ for (k = 0; k < n; k++) rhs_work[k] = soln[k];
+ }
+
+ }
+
+ SUPERLU_FREE(work);
+ SUPERLU_FREE(soln);
+}
+
+/*
+ * Diagnostic print of the solution vector
+ */
+void
+zprint_soln(int n, int nrhs, doublecomplex *soln)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ printf("\t%d: %.4f\n", i, soln[i]);
+}
diff --git a/SRC/zlacon.c b/SRC/zlacon.c
new file mode 100644
index 0000000..e240371
--- /dev/null
+++ b/SRC/zlacon.c
@@ -0,0 +1,214 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "Cnames.h"
+#include "dcomplex.h"
+
+int
+zlacon_(int *n, doublecomplex *v, doublecomplex *x, double *est, int *kase)
+
+{
+/*
+ Purpose
+ =======
+
+ ZLACON estimates the 1-norm of a square matrix A.
+ Reverse communication is used for evaluating matrix-vector products.
+
+
+ Arguments
+ =========
+
+ N (input) INT
+ The order of the matrix. N >= 1.
+
+ V (workspace) DOUBLE COMPLEX PRECISION array, dimension (N)
+ On the final return, V = A*W, where EST = norm(V)/norm(W)
+ (W is not returned).
+
+ X (input/output) DOUBLE COMPLEX PRECISION array, dimension (N)
+ On an intermediate return, X should be overwritten by
+ A * X, if KASE=1,
+ A' * X, if KASE=2,
+ where A' is the conjugate transpose of A,
+ and ZLACON must be re-called with all the other parameters
+ unchanged.
+
+
+ EST (output) DOUBLE PRECISION
+ An estimate (a lower bound) for norm(A).
+
+ KASE (input/output) INT
+ On the initial call to ZLACON, KASE should be 0.
+ On an intermediate return, KASE will be 1 or 2, indicating
+ whether X should be overwritten by A * X or A' * X.
+ On the final return from ZLACON, KASE will again be 0.
+
+ Further Details
+ ======= =======
+
+ Contributed by Nick Higham, University of Manchester.
+ Originally named CONEST, dated March 16, 1988.
+
+ Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+ a real or complex matrix, with applications to condition estimation",
+ ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+ doublecomplex zero = {0.0, 0.0};
+ doublecomplex one = {1.0, 0.0};
+
+ /* System generated locals */
+ double d__1;
+
+ /* Local variables */
+ static int iter;
+ static int jump, jlast;
+ static double altsgn, estold;
+ static int i, j;
+ double temp;
+ double safmin;
+ extern double dlamch_(char *);
+ extern int izmax1_(int *, doublecomplex *, int *);
+ extern double dzsum1_(int *, doublecomplex *, int *);
+
+ safmin = dlamch_("Safe minimum");
+ if ( *kase == 0 ) {
+ for (i = 0; i < *n; ++i) {
+ x[i].r = 1. / (double) (*n);
+ x[i].i = 0.;
+ }
+ *kase = 1;
+ jump = 1;
+ return 0;
+ }
+
+ switch (jump) {
+ case 1: goto L20;
+ case 2: goto L40;
+ case 3: goto L70;
+ case 4: goto L110;
+ case 5: goto L140;
+ }
+
+ /* ................ ENTRY (JUMP = 1)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. */
+ L20:
+ if (*n == 1) {
+ v[0] = x[0];
+ *est = z_abs(&v[0]);
+ /* ... QUIT */
+ goto L150;
+ }
+ *est = dzsum1_(n, x, &c__1);
+
+ for (i = 0; i < *n; ++i) {
+ d__1 = z_abs(&x[i]);
+ if (d__1 > safmin) {
+ d__1 = 1 / d__1;
+ x[i].r *= d__1;
+ x[i].i *= d__1;
+ } else {
+ x[i] = one;
+ }
+ }
+ *kase = 2;
+ jump = 2;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 2)
+ FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. */
+L40:
+ j = izmax1_(n, &x[0], &c__1);
+ --j;
+ iter = 2;
+
+ /* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. */
+L50:
+ for (i = 0; i < *n; ++i) x[i] = zero;
+ x[j] = one;
+ *kase = 1;
+ jump = 3;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 3)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L70:
+#ifdef _CRAY
+ CCOPY(n, x, &c__1, v, &c__1);
+#else
+ zcopy_(n, x, &c__1, v, &c__1);
+#endif
+ estold = *est;
+ *est = dzsum1_(n, v, &c__1);
+
+
+L90:
+ /* TEST FOR CYCLING. */
+ if (*est <= estold) goto L120;
+
+ for (i = 0; i < *n; ++i) {
+ d__1 = z_abs(&x[i]);
+ if (d__1 > safmin) {
+ d__1 = 1 / d__1;
+ x[i].r *= d__1;
+ x[i].i *= d__1;
+ } else {
+ x[i] = one;
+ }
+ }
+ *kase = 2;
+ jump = 4;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 4)
+ X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. */
+L110:
+ jlast = j;
+ j = izmax1_(n, &x[0], &c__1);
+ --j;
+ if (x[jlast].r != (d__1 = x[j].r, fabs(d__1)) && iter < 5) {
+ ++iter;
+ goto L50;
+ }
+
+ /* ITERATION COMPLETE. FINAL STAGE. */
+L120:
+ altsgn = 1.;
+ for (i = 1; i <= *n; ++i) {
+ x[i-1].r = altsgn * ((double)(i - 1) / (double)(*n - 1) + 1.);
+ x[i-1].i = 0.;
+ altsgn = -altsgn;
+ }
+ *kase = 1;
+ jump = 5;
+ return 0;
+
+ /* ................ ENTRY (JUMP = 5)
+ X HAS BEEN OVERWRITTEN BY A*X. */
+L140:
+ temp = dzsum1_(n, x, &c__1) / (double)(*n * 3) * 2.;
+ if (temp > *est) {
+#ifdef _CRAY
+ CCOPY(n, &x[0], &c__1, &v[0], &c__1);
+#else
+ zcopy_(n, &x[0], &c__1, &v[0], &c__1);
+#endif
+ *est = temp;
+ }
+
+L150:
+ *kase = 0;
+ return 0;
+
+} /* zlacon_ */
diff --git a/SRC/zlangs.c b/SRC/zlangs.c
new file mode 100644
index 0000000..e178c6f
--- /dev/null
+++ b/SRC/zlangs.c
@@ -0,0 +1,112 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: zlangs.c
+ * History: Modified from lapack routine ZLANGE
+ */
+#include <math.h>
+#include "zsp_defs.h"
+#include "util.h"
+
+double zlangs(char *norm, SuperMatrix *A)
+{
+/*
+ Purpose
+ =======
+
+ ZLANGS returns the value of the one norm, or the Frobenius norm, or
+ the infinity norm, or the element of largest absolute value of a
+ real matrix A.
+
+ Description
+ ===========
+
+ ZLANGE returns the value
+
+ ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+ (
+ ( norm1(A), NORM = '1', 'O' or 'o'
+ (
+ ( normI(A), NORM = 'I' or 'i'
+ (
+ ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+
+ where norm1 denotes the one norm of a matrix (maximum column sum),
+ normI denotes the infinity norm of a matrix (maximum row sum) and
+ normF denotes the Frobenius norm of a matrix (square root of sum of
+ squares). Note that max(abs(A(i,j))) is not a matrix norm.
+
+ Arguments
+ =========
+
+ NORM (input) CHARACTER*1
+ Specifies the value to be returned in ZLANGE as described above.
+ A (input) SuperMatrix*
+ The M by N sparse matrix A.
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ doublecomplex *Aval;
+ int i, j, irow;
+ double value, sum;
+ double *rwork;
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ if ( SUPERLU_MIN(A->nrow, A->ncol) == 0) {
+ value = 0.;
+
+ } else if (lsame_(norm, "M")) {
+ /* Find max(abs(A(i,j))). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ value = SUPERLU_MAX( value, z_abs( &Aval[i]) );
+
+ } else if (lsame_(norm, "O") || *(unsigned char *)norm == '1') {
+ /* Find norm1(A). */
+ value = 0.;
+ for (j = 0; j < A->ncol; ++j) {
+ sum = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++)
+ sum += z_abs( &Aval[i] );
+ value = SUPERLU_MAX(value,sum);
+ }
+
+ } else if (lsame_(norm, "I")) {
+ /* Find normI(A). */
+ if ( !(rwork = (double *) SUPERLU_MALLOC(A->nrow * sizeof(double))) )
+ ABORT("SUPERLU_MALLOC fails for rwork.");
+ for (i = 0; i < A->nrow; ++i) rwork[i] = 0.;
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) {
+ irow = Astore->rowind[i];
+ rwork[irow] += z_abs( &Aval[i] );
+ }
+ value = 0.;
+ for (i = 0; i < A->nrow; ++i)
+ value = SUPERLU_MAX(value, rwork[i]);
+
+ SUPERLU_FREE (rwork);
+
+ } else if (lsame_(norm, "F") || lsame_(norm, "E")) {
+ /* Find normF(A). */
+ ABORT("Not implemented.");
+ } else
+ ABORT("Illegal norm specified.");
+
+ return (value);
+
+} /* zlangs */
+
diff --git a/SRC/zlaqgs.c b/SRC/zlaqgs.c
new file mode 100644
index 0000000..d28393d
--- /dev/null
+++ b/SRC/zlaqgs.c
@@ -0,0 +1,140 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: zlaqgs.c
+ * History: Modified from LAPACK routine ZLAQGE
+ */
+#include <math.h>
+#include "zsp_defs.h"
+#include "util.h"
+
+void
+zlaqgs(SuperMatrix *A, double *r, double *c,
+ double rowcnd, double colcnd, double amax, char *equed)
+{
+/*
+ Purpose
+ =======
+
+ ZLAQGS equilibrates a general sparse M by N matrix A using the row and
+ scaling factors in the vectors R and C.
+
+ See supermatrix.h for the definition of 'SuperMatrix' structure.
+
+ Arguments
+ =========
+
+ A (input/output) SuperMatrix*
+ On exit, the equilibrated matrix. See EQUED for the form of
+ the equilibrated matrix. The type of A can be:
+ Stype = NC; Dtype = SLU_Z; Mtype = GE.
+
+ R (input) double*, dimension (A->nrow)
+ The row scale factors for A.
+
+ C (input) double*, dimension (A->ncol)
+ The column scale factors for A.
+
+ ROWCND (input) double
+ Ratio of the smallest R(i) to the largest R(i).
+
+ COLCND (input) double
+ Ratio of the smallest C(i) to the largest C(i).
+
+ AMAX (input) double
+ Absolute value of largest matrix entry.
+
+ EQUED (output) char*
+ Specifies the form of equilibration that was done.
+ = 'N': No equilibration
+ = 'R': Row equilibration, i.e., A has been premultiplied by
+ diag(R).
+ = 'C': Column equilibration, i.e., A has been postmultiplied
+ by diag(C).
+ = 'B': Both row and column equilibration, i.e., A has been
+ replaced by diag(R) * A * diag(C).
+
+ Internal Parameters
+ ===================
+
+ THRESH is a threshold value used to decide if row or column scaling
+ should be done based on the ratio of the row or column scaling
+ factors. If ROWCND < THRESH, row scaling is done, and if
+ COLCND < THRESH, column scaling is done.
+
+ LARGE and SMALL are threshold values used to decide if row scaling
+ should be done based on the absolute size of the largest matrix
+ element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+
+ =====================================================================
+*/
+
+#define THRESH (0.1)
+
+ /* Local variables */
+ NCformat *Astore;
+ doublecomplex *Aval;
+ int i, j, irow;
+ double large, small, cj;
+ extern double dlamch_(char *);
+ double temp;
+
+
+ /* Quick return if possible */
+ if (A->nrow <= 0 || A->ncol <= 0) {
+ *(unsigned char *)equed = 'N';
+ return;
+ }
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Initialize LARGE and SMALL. */
+ small = dlamch_("Safe minimum") / dlamch_("Precision");
+ large = 1. / small;
+
+ if (rowcnd >= THRESH && amax >= small && amax <= large) {
+ if (colcnd >= THRESH)
+ *(unsigned char *)equed = 'N';
+ else {
+ /* Column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ zd_mult(&Aval[i], &Aval[i], cj);
+ }
+ }
+ *(unsigned char *)equed = 'C';
+ }
+ } else if (colcnd >= THRESH) {
+ /* Row scaling, no column scaling */
+ for (j = 0; j < A->ncol; ++j)
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ zd_mult(&Aval[i], &Aval[i], r[irow]);
+ }
+ *(unsigned char *)equed = 'R';
+ } else {
+ /* Row and column scaling */
+ for (j = 0; j < A->ncol; ++j) {
+ cj = c[j];
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ temp = cj * r[irow];
+ zd_mult(&Aval[i], &Aval[i], temp);
+ }
+ }
+ *(unsigned char *)equed = 'B';
+ }
+
+ return;
+
+} /* zlaqgs */
+
diff --git a/SRC/zmemory.c b/SRC/zmemory.c
new file mode 100644
index 0000000..0c79e9e
--- /dev/null
+++ b/SRC/zmemory.c
@@ -0,0 +1,676 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+/* Constants */
+#define NO_MEMTYPE 4 /* 0: lusup;
+ 1: ucol;
+ 2: lsub;
+ 3: usub */
+#define GluIntArray(n) (5 * (n) + 5)
+
+/* Internal prototypes */
+void *zexpand (int *, MemType,int, int, GlobalLU_t *);
+int zLUWorkInit (int, int, int, int **, doublecomplex **, LU_space_t);
+void copy_mem_doublecomplex (int, void *, void *);
+void zStackCompress (GlobalLU_t *);
+void zSetupSpace (void *, int, LU_space_t *);
+void *zuser_malloc (int, int);
+void zuser_free (int, int);
+
+/* External prototypes (in memory.c - prec-indep) */
+extern void copy_mem_int (int, void *, void *);
+extern void user_bcopy (char *, char *, int);
+
+/* Headers for 4 types of dynamatically managed memory */
+typedef struct e_node {
+ int size; /* length of the memory that has been used */
+ void *mem; /* pointer to the new malloc'd store */
+} ExpHeader;
+
+typedef struct {
+ int size;
+ int used;
+ int top1; /* grow upward, relative to &array[0] */
+ int top2; /* grow downward */
+ void *array;
+} LU_stack_t;
+
+/* Variables local to this file */
+static ExpHeader *expanders = 0; /* Array of pointers to 4 types of memory */
+static LU_stack_t stack;
+static int no_expand;
+
+/* Macros to manipulate stack */
+#define StackFull(x) ( x + stack.used >= stack.size )
+#define NotDoubleAlign(addr) ( (long int)addr & 7 )
+#define DoubleAlign(addr) ( ((long int)addr + 7) & ~7L )
+#define TempSpace(m, w) ( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \
+ (w + 1) * m * sizeof(doublecomplex) )
+#define Reduce(alpha) ((alpha + 1) / 2) /* i.e. (alpha-1)/2 + 1 */
+
+
+
+
+/*
+ * Setup the memory model to be used for factorization.
+ * lwork = 0: use system malloc;
+ * lwork > 0: use user-supplied work[] space.
+ */
+void zSetupSpace(void *work, int lwork, LU_space_t *MemModel)
+{
+ if ( lwork == 0 ) {
+ *MemModel = SYSTEM; /* malloc/free */
+ } else if ( lwork > 0 ) {
+ *MemModel = USER; /* user provided space */
+ stack.used = 0;
+ stack.top1 = 0;
+ stack.top2 = (lwork/4)*4; /* must be word addressable */
+ stack.size = stack.top2;
+ stack.array = (void *) work;
+ }
+}
+
+
+
+void *zuser_malloc(int bytes, int which_end)
+{
+ void *buf;
+
+ if ( StackFull(bytes) ) return (NULL);
+
+ if ( which_end == HEAD ) {
+ buf = (char*) stack.array + stack.top1;
+ stack.top1 += bytes;
+ } else {
+ stack.top2 -= bytes;
+ buf = (char*) stack.array + stack.top2;
+ }
+
+ stack.used += bytes;
+ return buf;
+}
+
+
+void zuser_free(int bytes, int which_end)
+{
+ if ( which_end == HEAD ) {
+ stack.top1 -= bytes;
+ } else {
+ stack.top2 += bytes;
+ }
+ stack.used -= bytes;
+}
+
+
+
+/*
+ * mem_usage consists of the following fields:
+ * - for_lu (float)
+ * The amount of space used in bytes for the L\U data structures.
+ * - total_needed (float)
+ * The amount of space needed in bytes to perform factorization.
+ * - expansions (int)
+ * Number of memory expansions during the LU factorization.
+ */
+int zQuerySpace(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ register int n, iword, dword, panel_size = sp_ienv(1);
+
+ Lstore = L->Store;
+ Ustore = U->Store;
+ n = L->ncol;
+ iword = sizeof(int);
+ dword = sizeof(doublecomplex);
+
+ /* For LU factors */
+ mem_usage->for_lu = (float)( (4*n + 3) * iword + Lstore->nzval_colptr[n] *
+ dword + Lstore->rowind_colptr[n] * iword );
+ mem_usage->for_lu += (float)( (n + 1) * iword +
+ Ustore->colptr[n] * (dword + iword) );
+
+ /* Working storage to support factorization */
+ mem_usage->total_needed = mem_usage->for_lu +
+ (float)( (2 * panel_size + 4 + NO_MARKER) * n * iword +
+ (panel_size + 1) * n * dword );
+
+ mem_usage->expansions = --no_expand;
+
+ return 0;
+} /* zQuerySpace */
+
+/*
+ * Allocate storage for the data structures common to all factor routines.
+ * For those unpredictable size, make a guess as FILL * nnz(A).
+ * Return value:
+ * If lwork = -1, return the estimated amount of space required, plus n;
+ * otherwise, return the amount of space actually allocated when
+ * memory allocation failure occurred.
+ */
+int
+zLUMemInit(fact_t fact, void *work, int lwork, int m, int n, int annz,
+ int panel_size, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu,
+ int **iwork, doublecomplex **dwork)
+{
+ int info, iword, dword;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ doublecomplex *lusup;
+ int *xlusup;
+ doublecomplex *ucol;
+ int *usub, *xusub;
+ int nzlmax, nzumax, nzlumax;
+ int FILL = sp_ienv(6);
+
+ Glu->n = n;
+ no_expand = 0;
+ iword = sizeof(int);
+ dword = sizeof(doublecomplex);
+
+ if ( !expanders )
+ expanders = (ExpHeader*)SUPERLU_MALLOC(NO_MEMTYPE * sizeof(ExpHeader));
+ if ( !expanders ) ABORT("SUPERLU_MALLOC fails for expanders");
+
+ if ( fact != SamePattern_SameRowPerm ) {
+ /* Guess for L\U factors */
+ nzumax = nzlumax = FILL * annz;
+ nzlmax = SUPERLU_MAX(1, FILL/4.) * annz;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else {
+ zSetupSpace(work, lwork, &Glu->MemModel);
+ }
+
+#ifdef DEBUG
+ printf("zLUMemInit() called: annz %d, MemModel %d\n",
+ annz, Glu->MemModel);
+#endif
+
+ /* Integer pointers for L\U factors */
+ if ( Glu->MemModel == SYSTEM ) {
+ xsup = intMalloc(n+1);
+ supno = intMalloc(n+1);
+ xlsub = intMalloc(n+1);
+ xlusup = intMalloc(n+1);
+ xusub = intMalloc(n+1);
+ } else {
+ xsup = (int *)zuser_malloc((n+1) * iword, HEAD);
+ supno = (int *)zuser_malloc((n+1) * iword, HEAD);
+ xlsub = (int *)zuser_malloc((n+1) * iword, HEAD);
+ xlusup = (int *)zuser_malloc((n+1) * iword, HEAD);
+ xusub = (int *)zuser_malloc((n+1) * iword, HEAD);
+ }
+
+ lusup = (doublecomplex *) zexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (doublecomplex *) zexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) zexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) zexpand( &nzumax, USUB, 0, 1, Glu );
+
+ while ( !lusup || !ucol || !lsub || !usub ) {
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE(lusup);
+ SUPERLU_FREE(ucol);
+ SUPERLU_FREE(lsub);
+ SUPERLU_FREE(usub);
+ } else {
+ zuser_free((nzlumax+nzumax)*dword+(nzlmax+nzumax)*iword, HEAD);
+ }
+ nzlumax /= 2;
+ nzumax /= 2;
+ nzlmax /= 2;
+ if ( nzlumax < annz ) {
+ printf("Not enough memory to perform factorization.\n");
+ return (zmemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+ }
+ lusup = (doublecomplex *) zexpand( &nzlumax, LUSUP, 0, 0, Glu );
+ ucol = (doublecomplex *) zexpand( &nzumax, UCOL, 0, 0, Glu );
+ lsub = (int *) zexpand( &nzlmax, LSUB, 0, 0, Glu );
+ usub = (int *) zexpand( &nzumax, USUB, 0, 1, Glu );
+ }
+
+ } else {
+ /* fact == SamePattern_SameRowPerm */
+ Lstore = L->Store;
+ Ustore = U->Store;
+ xsup = Lstore->sup_to_col;
+ supno = Lstore->col_to_sup;
+ xlsub = Lstore->rowind_colptr;
+ xlusup = Lstore->nzval_colptr;
+ xusub = Ustore->colptr;
+ nzlmax = Glu->nzlmax; /* max from previous factorization */
+ nzumax = Glu->nzumax;
+ nzlumax = Glu->nzlumax;
+
+ if ( lwork == -1 ) {
+ return ( GluIntArray(n) * iword + TempSpace(m, panel_size)
+ + (nzlmax+nzumax)*iword + (nzlumax+nzumax)*dword + n );
+ } else if ( lwork == 0 ) {
+ Glu->MemModel = SYSTEM;
+ } else {
+ Glu->MemModel = USER;
+ stack.top2 = (lwork/4)*4; /* must be word-addressable */
+ stack.size = stack.top2;
+ }
+
+ lsub = expanders[LSUB].mem = Lstore->rowind;
+ lusup = expanders[LUSUP].mem = Lstore->nzval;
+ usub = expanders[USUB].mem = Ustore->rowind;
+ ucol = expanders[UCOL].mem = Ustore->nzval;;
+ expanders[LSUB].size = nzlmax;
+ expanders[LUSUP].size = nzlumax;
+ expanders[USUB].size = nzumax;
+ expanders[UCOL].size = nzumax;
+ }
+
+ Glu->xsup = xsup;
+ Glu->supno = supno;
+ Glu->lsub = lsub;
+ Glu->xlsub = xlsub;
+ Glu->lusup = lusup;
+ Glu->xlusup = xlusup;
+ Glu->ucol = ucol;
+ Glu->usub = usub;
+ Glu->xusub = xusub;
+ Glu->nzlmax = nzlmax;
+ Glu->nzumax = nzumax;
+ Glu->nzlumax = nzlumax;
+
+ info = zLUWorkInit(m, n, panel_size, iwork, dwork, Glu->MemModel);
+ if ( info )
+ return ( info + zmemory_usage(nzlmax, nzumax, nzlumax, n) + n);
+
+ ++no_expand;
+ return 0;
+
+} /* zLUMemInit */
+
+/* Allocate known working storage. Returns 0 if success, otherwise
+ returns the number of bytes allocated so far when failure occurred. */
+int
+zLUWorkInit(int m, int n, int panel_size, int **iworkptr,
+ doublecomplex **dworkptr, LU_space_t MemModel)
+{
+ int isize, dsize, extra;
+ doublecomplex *old_ptr;
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+
+ isize = ( (2 * panel_size + 3 + NO_MARKER ) * m + n ) * sizeof(int);
+ dsize = (m * panel_size +
+ NUM_TEMPV(m,panel_size,maxsuper,rowblk)) * sizeof(doublecomplex);
+
+ if ( MemModel == SYSTEM )
+ *iworkptr = (int *) intCalloc(isize/sizeof(int));
+ else
+ *iworkptr = (int *) zuser_malloc(isize, TAIL);
+ if ( ! *iworkptr ) {
+ fprintf(stderr, "zLUWorkInit: malloc fails for local iworkptr[]\n");
+ return (isize + n);
+ }
+
+ if ( MemModel == SYSTEM )
+ *dworkptr = (doublecomplex *) SUPERLU_MALLOC(dsize);
+ else {
+ *dworkptr = (doublecomplex *) zuser_malloc(dsize, TAIL);
+ if ( NotDoubleAlign(*dworkptr) ) {
+ old_ptr = *dworkptr;
+ *dworkptr = (doublecomplex*) DoubleAlign(*dworkptr);
+ *dworkptr = (doublecomplex*) ((double*)*dworkptr - 1);
+ extra = (char*)old_ptr - (char*)*dworkptr;
+#ifdef DEBUG
+ printf("zLUWorkInit: not aligned, extra %d\n", extra);
+#endif
+ stack.top2 -= extra;
+ stack.used += extra;
+ }
+ }
+ if ( ! *dworkptr ) {
+ fprintf(stderr, "malloc fails for local dworkptr[].");
+ return (isize + dsize + n);
+ }
+
+ return 0;
+}
+
+
+/*
+ * Set up pointers for real working arrays.
+ */
+void
+zSetRWork(int m, int panel_size, doublecomplex *dworkptr,
+ doublecomplex **dense, doublecomplex **tempv)
+{
+ doublecomplex zero = {0.0, 0.0};
+
+ int maxsuper = sp_ienv(3),
+ rowblk = sp_ienv(4);
+ *dense = dworkptr;
+ *tempv = *dense + panel_size*m;
+ zfill (*dense, m * panel_size, zero);
+ zfill (*tempv, NUM_TEMPV(m,panel_size,maxsuper,rowblk), zero);
+}
+
+/*
+ * Free the working storage used by factor routines.
+ */
+void zLUWorkFree(int *iwork, doublecomplex *dwork, GlobalLU_t *Glu)
+{
+ if ( Glu->MemModel == SYSTEM ) {
+ SUPERLU_FREE (iwork);
+ SUPERLU_FREE (dwork);
+ } else {
+ stack.used -= (stack.size - stack.top2);
+ stack.top2 = stack.size;
+/* zStackCompress(Glu); */
+ }
+
+ SUPERLU_FREE (expanders);
+ expanders = 0;
+}
+
+/* Expand the data structures for L and U during the factorization.
+ * Return value: 0 - successful return
+ * > 0 - number of bytes allocated when run out of space
+ */
+int
+zLUMemXpand(int jcol,
+ int next, /* number of elements currently in the factors */
+ MemType mem_type, /* which type of memory to expand */
+ int *maxlen, /* modified - maximum length of a data structure */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ void *new_mem;
+
+#ifdef DEBUG
+ printf("zLUMemXpand(): jcol %d, next %d, maxlen %d, MemType %d\n",
+ jcol, next, *maxlen, mem_type);
+#endif
+
+ if (mem_type == USUB)
+ new_mem = zexpand(maxlen, mem_type, next, 1, Glu);
+ else
+ new_mem = zexpand(maxlen, mem_type, next, 0, Glu);
+
+ if ( !new_mem ) {
+ int nzlmax = Glu->nzlmax;
+ int nzumax = Glu->nzumax;
+ int nzlumax = Glu->nzlumax;
+ fprintf(stderr, "Can't expand MemType %d: jcol %d\n", mem_type, jcol);
+ return (zmemory_usage(nzlmax, nzumax, nzlumax, Glu->n) + Glu->n);
+ }
+
+ switch ( mem_type ) {
+ case LUSUP:
+ Glu->lusup = (doublecomplex *) new_mem;
+ Glu->nzlumax = *maxlen;
+ break;
+ case UCOL:
+ Glu->ucol = (doublecomplex *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ case LSUB:
+ Glu->lsub = (int *) new_mem;
+ Glu->nzlmax = *maxlen;
+ break;
+ case USUB:
+ Glu->usub = (int *) new_mem;
+ Glu->nzumax = *maxlen;
+ break;
+ }
+
+ return 0;
+
+}
+
+
+
+void
+copy_mem_doublecomplex(int howmany, void *old, void *new)
+{
+ register int i;
+ doublecomplex *dold = old;
+ doublecomplex *dnew = new;
+ for (i = 0; i < howmany; i++) dnew[i] = dold[i];
+}
+
+/*
+ * Expand the existing storage to accommodate more fill-ins.
+ */
+void
+*zexpand (
+ int *prev_len, /* length used from previous call */
+ MemType type, /* which part of the memory to expand */
+ int len_to_copy, /* size of the memory to be copied to new store */
+ int keep_prev, /* = 1: use prev_len;
+ = 0: compute new_len to expand */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+ float EXPAND = 1.5;
+ float alpha;
+ void *new_mem, *old_mem;
+ int new_len, tries, lword, extra, bytes_to_copy;
+
+ alpha = EXPAND;
+
+ if ( no_expand == 0 || keep_prev ) /* First time allocate requested */
+ new_len = *prev_len;
+ else {
+ new_len = alpha * *prev_len;
+ }
+
+ if ( type == LSUB || type == USUB ) lword = sizeof(int);
+ else lword = sizeof(doublecomplex);
+
+ if ( Glu->MemModel == SYSTEM ) {
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ if ( no_expand != 0 ) {
+ tries = 0;
+ if ( keep_prev ) {
+ if ( !new_mem ) return (NULL);
+ } else {
+ while ( !new_mem ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ new_mem = (void *) SUPERLU_MALLOC(new_len * lword);
+/* new_mem = (void *) calloc(new_len, lword); */
+ }
+ }
+ if ( type == LSUB || type == USUB ) {
+ copy_mem_int(len_to_copy, expanders[type].mem, new_mem);
+ } else {
+ copy_mem_doublecomplex(len_to_copy, expanders[type].mem, new_mem);
+ }
+ SUPERLU_FREE (expanders[type].mem);
+ }
+ expanders[type].mem = (void *) new_mem;
+
+ } else { /* MemModel == USER */
+ if ( no_expand == 0 ) {
+ new_mem = zuser_malloc(new_len * lword, HEAD);
+ if ( NotDoubleAlign(new_mem) &&
+ (type == LUSUP || type == UCOL) ) {
+ old_mem = new_mem;
+ new_mem = (void *)DoubleAlign(new_mem);
+ extra = (char*)new_mem - (char*)old_mem;
+#ifdef DEBUG
+ printf("expand(): not aligned, extra %d\n", extra);
+#endif
+ stack.top1 += extra;
+ stack.used += extra;
+ }
+ expanders[type].mem = (void *) new_mem;
+ }
+ else {
+ tries = 0;
+ extra = (new_len - *prev_len) * lword;
+ if ( keep_prev ) {
+ if ( StackFull(extra) ) return (NULL);
+ } else {
+ while ( StackFull(extra) ) {
+ if ( ++tries > 10 ) return (NULL);
+ alpha = Reduce(alpha);
+ new_len = alpha * *prev_len;
+ extra = (new_len - *prev_len) * lword;
+ }
+ }
+
+ if ( type != USUB ) {
+ new_mem = (void*)((char*)expanders[type + 1].mem + extra);
+ bytes_to_copy = (char*)stack.array + stack.top1
+ - (char*)expanders[type + 1].mem;
+ user_bcopy(expanders[type+1].mem, new_mem, bytes_to_copy);
+
+ if ( type < USUB ) {
+ Glu->usub = expanders[USUB].mem =
+ (void*)((char*)expanders[USUB].mem + extra);
+ }
+ if ( type < LSUB ) {
+ Glu->lsub = expanders[LSUB].mem =
+ (void*)((char*)expanders[LSUB].mem + extra);
+ }
+ if ( type < UCOL ) {
+ Glu->ucol = expanders[UCOL].mem =
+ (void*)((char*)expanders[UCOL].mem + extra);
+ }
+ stack.top1 += extra;
+ stack.used += extra;
+ if ( type == UCOL ) {
+ stack.top1 += extra; /* Add same amount for USUB */
+ stack.used += extra;
+ }
+
+ } /* if ... */
+
+ } /* else ... */
+ }
+
+ expanders[type].size = new_len;
+ *prev_len = new_len;
+ if ( no_expand ) ++no_expand;
+
+ return (void *) expanders[type].mem;
+
+} /* zexpand */
+
+
+/*
+ * Compress the work[] array to remove fragmentation.
+ */
+void
+zStackCompress(GlobalLU_t *Glu)
+{
+ register int iword, dword, ndim;
+ char *last, *fragment;
+ int *ifrom, *ito;
+ doublecomplex *dfrom, *dto;
+ int *xlsub, *lsub, *xusub, *usub, *xlusup;
+ doublecomplex *ucol, *lusup;
+
+ iword = sizeof(int);
+ dword = sizeof(doublecomplex);
+ ndim = Glu->n;
+
+ xlsub = Glu->xlsub;
+ lsub = Glu->lsub;
+ xusub = Glu->xusub;
+ usub = Glu->usub;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ lusup = Glu->lusup;
+
+ dfrom = ucol;
+ dto = (doublecomplex *)((char*)lusup + xlusup[ndim] * dword);
+ copy_mem_doublecomplex(xusub[ndim], dfrom, dto);
+ ucol = dto;
+
+ ifrom = lsub;
+ ito = (int *) ((char*)ucol + xusub[ndim] * iword);
+ copy_mem_int(xlsub[ndim], ifrom, ito);
+ lsub = ito;
+
+ ifrom = usub;
+ ito = (int *) ((char*)lsub + xlsub[ndim] * iword);
+ copy_mem_int(xusub[ndim], ifrom, ito);
+ usub = ito;
+
+ last = (char*)usub + xusub[ndim] * iword;
+ fragment = (char*) (((char*)stack.array + stack.top1) - last);
+ stack.used -= (long int) fragment;
+ stack.top1 -= (long int) fragment;
+
+ Glu->ucol = ucol;
+ Glu->lsub = lsub;
+ Glu->usub = usub;
+
+#ifdef DEBUG
+ printf("zStackCompress: fragment %d\n", fragment);
+ /* for (last = 0; last < ndim; ++last)
+ print_lu_col("After compress:", last, 0);*/
+#endif
+
+}
+
+/*
+ * Allocate storage for original matrix A
+ */
+void
+zallocateA(int n, int nnz, doublecomplex **a, int **asub, int **xa)
+{
+ *a = (doublecomplex *) doublecomplexMalloc(nnz);
+ *asub = (int *) intMalloc(nnz);
+ *xa = (int *) intMalloc(n+1);
+}
+
+
+doublecomplex *doublecomplexMalloc(int n)
+{
+ doublecomplex *buf;
+ buf = (doublecomplex *) SUPERLU_MALLOC(n * sizeof(doublecomplex));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in doublecomplexMalloc()\n");
+ }
+ return (buf);
+}
+
+doublecomplex *doublecomplexCalloc(int n)
+{
+ doublecomplex *buf;
+ register int i;
+ doublecomplex zero = {0.0, 0.0};
+ buf = (doublecomplex *) SUPERLU_MALLOC(n * sizeof(doublecomplex));
+ if ( !buf ) {
+ ABORT("SUPERLU_MALLOC failed for buf in doublecomplexCalloc()\n");
+ }
+ for (i = 0; i < n; ++i) buf[i] = zero;
+ return (buf);
+}
+
+
+int zmemory_usage(const int nzlmax, const int nzumax,
+ const int nzlumax, const int n)
+{
+ register int iword, dword;
+
+ iword = sizeof(int);
+ dword = sizeof(doublecomplex);
+
+ return (10 * n * iword +
+ nzlmax * iword + nzumax * (iword + dword) + nzlumax * dword);
+
+}
diff --git a/SRC/zmyblas2.c b/SRC/zmyblas2.c
new file mode 100644
index 0000000..59450cd
--- /dev/null
+++ b/SRC/zmyblas2.c
@@ -0,0 +1,183 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: zmyblas2.c
+ * Purpose:
+ * Level 2 BLAS operations: solves and matvec, written in C.
+ * Note:
+ * This is only used when the system lacks an efficient BLAS library.
+ */
+#include "dcomplex.h"
+
+/*
+ * Solves a dense UNIT lower triangular system. The unit lower
+ * triangular matrix is stored in a 2D array M(1:nrow,1:ncol).
+ * The solution will be returned in the rhs vector.
+ */
+void zlsolve ( int ldm, int ncol, doublecomplex *M, doublecomplex *rhs )
+{
+ int k;
+ doublecomplex x0, x1, x2, x3, temp;
+ doublecomplex *M0;
+ doublecomplex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+
+ M0 = &M[0];
+
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+ Mki2 = Mki1 + ldm + 1;
+ Mki3 = Mki2 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x1, &rhs[firstcol+1], &temp);
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x2, &rhs[firstcol+2], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&x2, &x2, &temp);
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x3, &rhs[firstcol+3], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&x3, &x3, &temp);
+ zz_mult(&temp, &x2, Mki2); Mki2++;
+ z_sub(&x3, &x3, &temp);
+
+ rhs[++firstcol] = x1;
+ rhs[++firstcol] = x2;
+ rhs[++firstcol] = x3;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x2, Mki2); Mki2++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x3, Mki3); Mki3++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ }
+
+ M0 += 4 * ldm + 4;
+ }
+
+ if ( firstcol < ncol - 1 ) { /* Do 2 columns */
+ Mki0 = M0 + 1;
+ Mki1 = Mki0 + ldm + 1;
+
+ x0 = rhs[firstcol];
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&x1, &rhs[firstcol+1], &temp);
+
+ rhs[++firstcol] = x1;
+ ++firstcol;
+
+ for (k = firstcol; k < ncol; k++) {
+ zz_mult(&temp, &x0, Mki0); Mki0++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ zz_mult(&temp, &x1, Mki1); Mki1++;
+ z_sub(&rhs[k], &rhs[k], &temp);
+ }
+ }
+
+}
+
+/*
+ * Solves a dense upper triangular system. The upper triangular matrix is
+ * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned
+ * in the rhs vector.
+ */
+void
+zusolve ( ldm, ncol, M, rhs )
+int ldm; /* in */
+int ncol; /* in */
+doublecomplex *M; /* in */
+doublecomplex *rhs; /* modified */
+{
+ doublecomplex xj, temp;
+ int jcol, j, irow;
+
+ jcol = ncol - 1;
+
+ for (j = 0; j < ncol; j++) {
+
+ z_div(&xj, &rhs[jcol], &M[jcol + jcol*ldm]); /* M(jcol, jcol) */
+ rhs[jcol] = xj;
+
+ for (irow = 0; irow < jcol; irow++) {
+ zz_mult(&temp, &xj, &M[irow+jcol*ldm]); /* M(irow, jcol) */
+ z_sub(&rhs[irow], &rhs[irow], &temp);
+ }
+
+ jcol--;
+
+ }
+}
+
+
+/*
+ * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec.
+ * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[].
+ */
+void zmatvec ( ldm, nrow, ncol, M, vec, Mxvec )
+int ldm; /* in -- leading dimension of M */
+int nrow; /* in */
+int ncol; /* in */
+doublecomplex *M; /* in */
+doublecomplex *vec; /* in */
+doublecomplex *Mxvec; /* in/out */
+{
+ doublecomplex vi0, vi1, vi2, vi3;
+ doublecomplex *M0, temp;
+ doublecomplex *Mki0, *Mki1, *Mki2, *Mki3;
+ register int firstcol = 0;
+ int k;
+
+ M0 = &M[0];
+
+ while ( firstcol < ncol - 3 ) { /* Do 4 columns */
+ Mki0 = M0;
+ Mki1 = Mki0 + ldm;
+ Mki2 = Mki1 + ldm;
+ Mki3 = Mki2 + ldm;
+
+ vi0 = vec[firstcol++];
+ vi1 = vec[firstcol++];
+ vi2 = vec[firstcol++];
+ vi3 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ zz_mult(&temp, &vi0, Mki0); Mki0++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ zz_mult(&temp, &vi1, Mki1); Mki1++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ zz_mult(&temp, &vi2, Mki2); Mki2++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ zz_mult(&temp, &vi3, Mki3); Mki3++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+
+ M0 += 4 * ldm;
+ }
+
+ while ( firstcol < ncol ) { /* Do 1 column */
+ Mki0 = M0;
+ vi0 = vec[firstcol++];
+ for (k = 0; k < nrow; k++) {
+ zz_mult(&temp, &vi0, Mki0); Mki0++;
+ z_add(&Mxvec[k], &Mxvec[k], &temp);
+ }
+ M0 += ldm;
+ }
+
+}
+
diff --git a/SRC/zpanel_bmod.c b/SRC/zpanel_bmod.c
new file mode 100644
index 0000000..658c945
--- /dev/null
+++ b/SRC/zpanel_bmod.c
@@ -0,0 +1,478 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "zsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void zlsolve(int, int, doublecomplex *, doublecomplex *);
+void zmatvec(int, int, int, doublecomplex *, doublecomplex *, doublecomplex *);
+extern void zcheck_tempv();
+
+void
+zpanel_bmod (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ const int nseg, /* in */
+ doublecomplex *dense, /* out, of size n by w */
+ doublecomplex *tempv, /* working array */
+ int *segrep, /* in */
+ int *repfnz, /* in, of size n by w */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs numeric block updates (sup-panel) in topological order.
+ * It features: col-col, 2cols-col, 3cols-col, and sup-col updates.
+ * Special processing on the supernodal portion of L\U[*,j]
+ *
+ * Before entering this routine, the original nonzeros in the panel
+ * were already copied into the spa[m,w].
+ *
+ * Updated/Output parameters-
+ * dense[0:m-1,w]: L[*,j:j+w-1] and U[*,j:j+w-1] are returned
+ * collectively in the m-by-w vector dense[*].
+ *
+ */
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ doublecomplex alpha, beta;
+#endif
+
+ register int k, ksub;
+ int fsupc, nsupc, nsupr, nrow;
+ int krep, krep_ind;
+ doublecomplex ukj, ukj1, ukj2;
+ int luptr, luptr1, luptr2;
+ int segsze;
+ int block_nrow; /* no of rows in a block row */
+ register int lptr; /* Points to the row subscripts of a supernode */
+ int kfnz, irow, no_zeros;
+ register int isub, isub1, i;
+ register int jj; /* Index through each column in the panel */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ doublecomplex *lusup;
+ int *xlusup;
+ int *repfnz_col; /* repfnz[] for a column in the panel */
+ doublecomplex *dense_col; /* dense[] for a column in the panel */
+ doublecomplex *tempv1; /* Used in 1-D update */
+ doublecomplex *TriTmp, *MatvecTmp; /* used in 2-D update */
+ doublecomplex zero = {0.0, 0.0};
+ doublecomplex one = {1.0, 0.0};
+ doublecomplex comp_temp, comp_temp1;
+ register int ldaTmp;
+ register int r_ind, r_hi;
+ static int first = 1, maxsuper, rowblk, colblk;
+ flops_t *ops = stat->ops;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ if ( first ) {
+ maxsuper = sp_ienv(3);
+ rowblk = sp_ienv(4);
+ colblk = sp_ienv(5);
+ first = 0;
+ }
+ ldaTmp = maxsuper + rowblk;
+
+ /*
+ * For each nonz supernode segment of U[*,j] in topological order
+ */
+ k = nseg - 1;
+ for (ksub = 0; ksub < nseg; ksub++) { /* for each updating supernode */
+
+ /* krep = representative of current k-th supernode
+ * fsupc = first supernodal column
+ * nsupc = no of columns in a supernode
+ * nsupr = no of rows in a supernode
+ */
+ krep = segrep[k--];
+ fsupc = xsup[supno[krep]];
+ nsupc = krep - fsupc + 1;
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nrow = nsupr - nsupc;
+ lptr = xlsub[fsupc];
+ krep_ind = lptr + nsupc - 1;
+
+ repfnz_col = repfnz;
+ dense_col = dense;
+
+ if ( nsupc >= colblk && nrow > rowblk ) { /* 2-D block update */
+
+ TriTmp = tempv;
+
+ /* Sequence through each column in panel -- triangular solves */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp ) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += 4 * segsze * (segsze - 1);
+ ops[GEMV] += 8 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ z_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ zz_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ z_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++;
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ zz_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ zz_mult(&comp_temp, &ukj2, &lusup[luptr2-1]);
+ z_sub(&ukj1, &ukj1, &comp_temp);
+
+ zz_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ zz_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ luptr++; luptr1++; luptr2++;
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ zz_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ zz_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ }
+
+ } else { /* segsze >= 4 */
+
+ /* Copy U[*,j] segment from dense[*] to TriTmp[*], which
+ holds the result of triangular solves. */
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ TriTmp[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#else
+ ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, TriTmp, &incx );
+#endif
+#else
+ zlsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
+#endif
+
+
+ } /* else ... */
+
+ } /* for jj ... end tri-solves */
+
+ /* Block row updates; push all the way into dense[*] block */
+ for ( r_ind = 0; r_ind < nrow; r_ind += rowblk ) {
+
+ r_hi = SUPERLU_MIN(nrow, r_ind + rowblk);
+ block_nrow = SUPERLU_MIN(rowblk, r_hi - r_ind);
+ luptr = xlusup[fsupc] + nsupc + r_ind;
+ isub1 = lptr + nsupc + r_ind;
+
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ /* Sequence through each column in panel -- matrix-vector */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ /* Perform a block update, and scatter the result of
+ matrix-vector to dense[]. */
+ no_zeros = kfnz - fsupc;
+ luptr1 = luptr + nsupr * no_zeros;
+ MatvecTmp = &TriTmp[maxsuper];
+
+#ifdef USE_VENDOR_BLAS
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ CGEMV(ftcs2, &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#else
+ zgemv_("N", &block_nrow, &segsze, &alpha, &lusup[luptr1],
+ &nsupr, TriTmp, &incx, &beta, MatvecTmp, &incy);
+#endif
+#else
+ zmatvec(nsupr, block_nrow, segsze, &lusup[luptr1],
+ TriTmp, MatvecTmp);
+#endif
+
+ /* Scatter MatvecTmp[*] into SPA dense[*] temporarily
+ * such that MatvecTmp[*] can be re-used for the
+ * the next blok row update. dense[] will be copied into
+ * global store after the whole panel has been finished.
+ */
+ isub = isub1;
+ for (i = 0; i < block_nrow; i++) {
+ irow = lsub[isub];
+ z_sub(&dense_col[irow], &dense_col[irow],
+ &MatvecTmp[i]);
+ MatvecTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } /* for each block row ... */
+
+ /* Scatter the triangular solves into SPA dense[*] */
+ repfnz_col = repfnz;
+ TriTmp = tempv;
+ dense_col = dense;
+
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m, TriTmp += ldaTmp) {
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ if ( segsze <= 3 ) continue; /* skip unrolled cases */
+
+ no_zeros = kfnz - fsupc;
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = TriTmp[i];
+ TriTmp[i] = zero;
+ ++isub;
+ }
+
+ } /* for jj ... */
+
+ } else { /* 1-D block modification */
+
+
+ /* Sequence through each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++,
+ repfnz_col += m, dense_col += m) {
+
+ kfnz = repfnz_col[krep];
+ if ( kfnz == EMPTY ) continue; /* Skip any zero segment */
+
+ segsze = krep - kfnz + 1;
+ luptr = xlusup[fsupc];
+
+ ops[TRSV] += 4 * segsze * (segsze - 1);
+ ops[GEMV] += 8 * nrow * segsze;
+
+ /* Case 1: Update U-segment of size 1 -- col-col update */
+ if ( segsze == 1 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc;
+
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; i++) {
+ irow = lsub[i];
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ z_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ ++luptr;
+ }
+
+ } else if ( segsze <= 3 ) {
+ ukj = dense_col[lsub[krep_ind]];
+ luptr += nsupr*(nsupc-1) + nsupc-1;
+ ukj1 = dense_col[lsub[krep_ind - 1]];
+ luptr1 = luptr - nsupr;
+
+ if ( segsze == 2 ) {
+ zz_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ z_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1;
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ zz_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ } else {
+ ukj2 = dense_col[lsub[krep_ind - 2]];
+ luptr2 = luptr1 - nsupr;
+ zz_mult(&comp_temp, &ukj2, &lusup[luptr2-1]);
+ z_sub(&ukj1, &ukj1, &comp_temp);
+
+ zz_mult(&comp_temp, &ukj1, &lusup[luptr1]);
+ zz_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&ukj, &ukj, &comp_temp);
+ dense_col[lsub[krep_ind]] = ukj;
+ dense_col[lsub[krep_ind-1]] = ukj1;
+ for (i = lptr + nsupc; i < xlsub[fsupc+1]; ++i) {
+ irow = lsub[i];
+ ++luptr; ++luptr1; ++luptr2;
+ zz_mult(&comp_temp, &ukj, &lusup[luptr]);
+ zz_mult(&comp_temp1, &ukj1, &lusup[luptr1]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ zz_mult(&comp_temp1, &ukj2, &lusup[luptr2]);
+ z_add(&comp_temp, &comp_temp, &comp_temp1);
+ z_sub(&dense_col[irow], &dense_col[irow], &comp_temp);
+ }
+ }
+
+ } else { /* segsze >= 4 */
+ /*
+ * Perform a triangular solve and block update,
+ * then scatter the result of sup-col update to dense[].
+ */
+ no_zeros = kfnz - fsupc;
+
+ /* Copy U[*,j] segment from dense[*] to tempv[*]:
+ * The result of triangular solve is in tempv[*];
+ * The result of matrix vector update is in dense_col[*]
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; ++i) {
+ irow = lsub[isub];
+ tempv[i] = dense_col[irow]; /* Gather */
+ ++isub;
+ }
+
+ /* start effective triangle */
+ luptr += nsupr * no_zeros + no_zeros;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#else
+ ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
+ &nsupr, tempv, &incx );
+#endif
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ alpha = one;
+ beta = zero;
+#ifdef _CRAY
+ CGEMV( ftcs2, &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#else
+ zgemv_( "N", &nrow, &segsze, &alpha, &lusup[luptr],
+ &nsupr, tempv, &incx, &beta, tempv1, &incy );
+#endif
+#else
+ zlsolve ( nsupr, segsze, &lusup[luptr], tempv );
+
+ luptr += segsze; /* Dense matrix-vector */
+ tempv1 = &tempv[segsze];
+ zmatvec (nsupr, nrow, segsze, &lusup[luptr], tempv, tempv1);
+#endif
+
+ /* Scatter tempv[*] into SPA dense[*] temporarily, such
+ * that tempv[*] can be used for the triangular solve of
+ * the next column of the panel. They will be copied into
+ * ucol[*] after the whole panel has been finished.
+ */
+ isub = lptr + no_zeros;
+ for (i = 0; i < segsze; i++) {
+ irow = lsub[isub];
+ dense_col[irow] = tempv[i];
+ tempv[i] = zero;
+ isub++;
+ }
+
+ /* Scatter the update from tempv1[*] into SPA dense[*] */
+ /* Start dense rectangular L */
+ for (i = 0; i < nrow; i++) {
+ irow = lsub[isub];
+ z_sub(&dense_col[irow], &dense_col[irow], &tempv1[i]);
+ tempv1[i] = zero;
+ ++isub;
+ }
+
+ } /* else segsze>=4 ... */
+
+ } /* for each column in the panel... */
+
+ } /* else 1-D update ... */
+
+ } /* for each updating supernode ... */
+
+}
+
+
+
diff --git a/SRC/zpanel_dfs.c b/SRC/zpanel_dfs.c
new file mode 100644
index 0000000..c9ed6ce
--- /dev/null
+++ b/SRC/zpanel_dfs.c
@@ -0,0 +1,249 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+#include "util.h"
+
+void
+zpanel_dfs (
+ const int m, /* in - number of rows in the matrix */
+ const int w, /* in */
+ const int jcol, /* in */
+ SuperMatrix *A, /* in - original matrix */
+ int *perm_r, /* in */
+ int *nseg, /* out */
+ doublecomplex *dense, /* out */
+ int *panel_lsub, /* out */
+ int *segrep, /* out */
+ int *repfnz, /* out */
+ int *xprune, /* out */
+ int *marker, /* out */
+ int *parent, /* working array */
+ int *xplore, /* working array */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Performs a symbolic factorization on a panel of columns [jcol, jcol+w).
+ *
+ * A supernode representative is the last column of a supernode.
+ * The nonzeros in U[*,j] are segments that end at supernodal
+ * representatives.
+ *
+ * The routine returns one list of the supernodal representatives
+ * in topological order of the dfs that generates them. This list is
+ * a superset of the topological order of each individual column within
+ * the panel.
+ * The location of the first nonzero in each supernodal segment
+ * (supernodal entry location) is also returned. Each column has a
+ * separate list for this purpose.
+ *
+ * Two marker arrays are used for dfs:
+ * marker[i] == jj, if i was visited during dfs of current column jj;
+ * marker1[i] >= jcol, if i was visited by earlier columns in this panel;
+ *
+ * marker: A-row --> A-row/col (0/1)
+ * repfnz: SuperA-col --> PA-row
+ * parent: SuperA-col --> SuperA-col
+ * xplore: SuperA-col --> index to L-structure
+ *
+ */
+ NCPformat *Astore;
+ doublecomplex *a;
+ int *asub;
+ int *xa_begin, *xa_end;
+ int krep, chperm, chmark, chrep, oldrep, kchild, myfnz;
+ int k, krow, kmark, kperm;
+ int xdfs, maxdfs, kpar;
+ int jj; /* index through each column in the panel */
+ int *marker1; /* marker1[jj] >= jcol if vertex jj was visited
+ by a previous column within this panel. */
+ int *repfnz_col; /* start of each column in the panel */
+ doublecomplex *dense_col; /* start of each column in the panel */
+ int nextl_col; /* next available position in panel_lsub[*,jj] */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+
+ /* Initialize pointers */
+ Astore = A->Store;
+ a = Astore->nzval;
+ asub = Astore->rowind;
+ xa_begin = Astore->colbeg;
+ xa_end = Astore->colend;
+ marker1 = marker + m;
+ repfnz_col = repfnz;
+ dense_col = dense;
+ *nseg = 0;
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+
+ /* For each column in the panel */
+ for (jj = jcol; jj < jcol + w; jj++) {
+ nextl_col = (jj - jcol) * m;
+
+#ifdef CHK_DFS
+ printf("\npanel col %d: ", jj);
+#endif
+
+ /* For each nonz in A[*,jj] do dfs */
+ for (k = xa_begin[jj]; k < xa_end[jj]; k++) {
+ krow = asub[k];
+ dense_col[krow] = a[k];
+ kmark = marker[krow];
+ if ( kmark == jj )
+ continue; /* krow visited before, go to the next nonzero */
+
+ /* For each unmarked nbr krow of jj
+ * krow is in L: place it in structure of L[*,jj]
+ */
+ marker[krow] = jj;
+ kperm = perm_r[krow];
+
+ if ( kperm == EMPTY ) {
+ panel_lsub[nextl_col++] = krow; /* krow is indexed into A */
+ }
+ /*
+ * krow is in U: if its supernode-rep krep
+ * has been explored, update repfnz[*]
+ */
+ else {
+
+ krep = xsup[supno[kperm]+1] - 1;
+ myfnz = repfnz_col[krep];
+
+#ifdef CHK_DFS
+ printf("krep %d, myfnz %d, perm_r[%d] %d\n", krep, myfnz, krow, kperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Representative visited before */
+ if ( myfnz > kperm ) repfnz_col[krep] = kperm;
+ /* continue; */
+ }
+ else {
+ /* Otherwise, perform dfs starting at krep */
+ oldrep = EMPTY;
+ parent[krep] = oldrep;
+ repfnz_col[krep] = kperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ do {
+ /*
+ * For each unmarked kchild of krep
+ */
+ while ( xdfs < maxdfs ) {
+
+ kchild = lsub[xdfs];
+ xdfs++;
+ chmark = marker[kchild];
+
+ if ( chmark != jj ) { /* Not reached yet */
+ marker[kchild] = jj;
+ chperm = perm_r[kchild];
+
+ /* Case kchild is in L: place it in L[*,j] */
+ if ( chperm == EMPTY ) {
+ panel_lsub[nextl_col++] = kchild;
+ }
+ /* Case kchild is in U:
+ * chrep = its supernode-rep. If its rep has
+ * been explored, update its repfnz[*]
+ */
+ else {
+
+ chrep = xsup[supno[chperm]+1] - 1;
+ myfnz = repfnz_col[chrep];
+#ifdef CHK_DFS
+ printf("chrep %d,myfnz %d,perm_r[%d] %d\n",chrep,myfnz,kchild,chperm);
+#endif
+ if ( myfnz != EMPTY ) { /* Visited before */
+ if ( myfnz > chperm )
+ repfnz_col[chrep] = chperm;
+ }
+ else {
+ /* Cont. dfs at snode-rep of kchild */
+ xplore[krep] = xdfs;
+ oldrep = krep;
+ krep = chrep; /* Go deeper down G(L) */
+ parent[krep] = oldrep;
+ repfnz_col[krep] = chperm;
+ xdfs = xlsub[krep];
+ maxdfs = xprune[krep];
+#ifdef CHK_DFS
+ printf(" xdfs %d, maxdfs %d: ", xdfs, maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } /* else */
+
+ } /* else */
+
+ } /* if... */
+
+ } /* while xdfs < maxdfs */
+
+ /* krow has no more unexplored nbrs:
+ * Place snode-rep krep in postorder DFS, if this
+ * segment is seen for the first time. (Note that
+ * "repfnz[krep]" may change later.)
+ * Backtrack dfs to its parent.
+ */
+ if ( marker1[krep] < jcol ) {
+ segrep[*nseg] = krep;
+ ++(*nseg);
+ marker1[krep] = jj;
+ }
+
+ kpar = parent[krep]; /* Pop stack, mimic recursion */
+ if ( kpar == EMPTY ) break; /* dfs done */
+ krep = kpar;
+ xdfs = xplore[krep];
+ maxdfs = xprune[krep];
+
+#ifdef CHK_DFS
+ printf(" pop stack: krep %d,xdfs %d,maxdfs %d: ", krep,xdfs,maxdfs);
+ for (i = xdfs; i < maxdfs; i++) printf(" %d", lsub[i]);
+ printf("\n");
+#endif
+ } while ( kpar != EMPTY ); /* do-while - until empty stack */
+
+ } /* else */
+
+ } /* else */
+
+ } /* for each nonz in A[*,jj] */
+
+ repfnz_col += m; /* Move to next column */
+ dense_col += m;
+
+ } /* for jj ... */
+
+}
diff --git a/SRC/zpivotL.c b/SRC/zpivotL.c
new file mode 100644
index 0000000..26afc4c
--- /dev/null
+++ b/SRC/zpivotL.c
@@ -0,0 +1,174 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include <stdlib.h>
+#include "zsp_defs.h"
+
+#undef DEBUG
+
+int
+zpivotL(
+ const int jcol, /* in */
+ const double u, /* in - diagonal pivoting threshold */
+ int *usepr, /* re-use the pivot sequence given by perm_r/iperm_r */
+ int *perm_r, /* may be modified */
+ int *iperm_r, /* in - inverse of perm_r */
+ int *iperm_c, /* in - used to find diagonal of Pc*A*Pc' */
+ int *pivrow, /* out */
+ GlobalLU_t *Glu, /* modified - global LU data structures */
+ SuperLUStat_t *stat /* output */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Performs the numerical pivoting on the current column of L,
+ * and the CDIV operation.
+ *
+ * Pivot policy:
+ * (1) Compute thresh = u * max_(i>=j) abs(A_ij);
+ * (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN
+ * pivot row = k;
+ * ELSE IF abs(A_jj) >= thresh THEN
+ * pivot row = j;
+ * ELSE
+ * pivot row = m;
+ *
+ * Note: If you absolutely want to use a given pivot order, then set u=0.0.
+ *
+ * Return value: 0 success;
+ * i > 0 U(i,i) is exactly zero.
+ *
+ */
+ doublecomplex one = {1.0, 0.0};
+ int fsupc; /* first column in the supernode */
+ int nsupc; /* no of columns in the supernode */
+ int nsupr; /* no of rows in the supernode */
+ int lptr; /* points to the starting subscript of the supernode */
+ int pivptr, old_pivptr, diag, diagind;
+ double pivmax, rtemp, thresh;
+ doublecomplex temp;
+ doublecomplex *lu_sup_ptr;
+ doublecomplex *lu_col_ptr;
+ int *lsub_ptr;
+ int isub, icol, k, itemp;
+ int *lsub, *xlsub;
+ doublecomplex *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ /* Initialize pointers */
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ fsupc = (Glu->xsup)[(Glu->supno)[jcol]];
+ nsupc = jcol - fsupc; /* excluding jcol; nsupc >= 0 */
+ lptr = xlsub[fsupc];
+ nsupr = xlsub[fsupc+1] - lptr;
+ lu_sup_ptr = &lusup[xlusup[fsupc]]; /* start of the current supernode */
+ lu_col_ptr = &lusup[xlusup[jcol]]; /* start of jcol in the supernode */
+ lsub_ptr = &lsub[lptr]; /* start of row indices of the supernode */
+
+#ifdef DEBUG
+if ( jcol == MIN_COL ) {
+ printf("Before cdiv: col %d\n", jcol);
+ for (k = nsupc; k < nsupr; k++)
+ printf(" lu[%d] %f\n", lsub_ptr[k], lu_col_ptr[k]);
+}
+#endif
+
+ /* Determine the largest abs numerical value for partial pivoting;
+ Also search for user-specified pivot, and diagonal element. */
+ if ( *usepr ) *pivrow = iperm_r[jcol];
+ diagind = iperm_c[jcol];
+ pivmax = 0.0;
+ pivptr = nsupc;
+ diag = EMPTY;
+ old_pivptr = nsupc;
+ for (isub = nsupc; isub < nsupr; ++isub) {
+ rtemp = z_abs1 (&lu_col_ptr[isub]);
+ if ( rtemp > pivmax ) {
+ pivmax = rtemp;
+ pivptr = isub;
+ }
+ if ( *usepr && lsub_ptr[isub] == *pivrow ) old_pivptr = isub;
+ if ( lsub_ptr[isub] == diagind ) diag = isub;
+ }
+
+ /* Test for singularity */
+ if ( pivmax == 0.0 ) {
+ *pivrow = lsub_ptr[pivptr];
+ perm_r[*pivrow] = jcol;
+ *usepr = 0;
+ return (jcol+1);
+ }
+
+ thresh = u * pivmax;
+
+ /* Choose appropriate pivotal element by our policy. */
+ if ( *usepr ) {
+ rtemp = z_abs1 (&lu_col_ptr[old_pivptr]);
+ if ( rtemp != 0.0 && rtemp >= thresh )
+ pivptr = old_pivptr;
+ else
+ *usepr = 0;
+ }
+ if ( *usepr == 0 ) {
+ /* Use diagonal pivot? */
+ if ( diag >= 0 ) { /* diagonal exists */
+ rtemp = z_abs1 (&lu_col_ptr[diag]);
+ if ( rtemp != 0.0 && rtemp >= thresh ) pivptr = diag;
+ }
+ *pivrow = lsub_ptr[pivptr];
+ }
+
+ /* Record pivot row */
+ perm_r[*pivrow] = jcol;
+
+ /* Interchange row subscripts */
+ if ( pivptr != nsupc ) {
+ itemp = lsub_ptr[pivptr];
+ lsub_ptr[pivptr] = lsub_ptr[nsupc];
+ lsub_ptr[nsupc] = itemp;
+
+ /* Interchange numerical values as well, for the whole snode, such
+ * that L is indexed the same way as A.
+ */
+ for (icol = 0; icol <= nsupc; icol++) {
+ itemp = pivptr + icol * nsupr;
+ temp = lu_sup_ptr[itemp];
+ lu_sup_ptr[itemp] = lu_sup_ptr[nsupc + icol*nsupr];
+ lu_sup_ptr[nsupc + icol*nsupr] = temp;
+ }
+ } /* if */
+
+ /* cdiv operation */
+ ops[FACT] += 10 * (nsupr - nsupc);
+
+ z_div(&temp, &one, &lu_col_ptr[nsupc]);
+ for (k = nsupc+1; k < nsupr; k++)
+ zz_mult(&lu_col_ptr[k], &lu_col_ptr[k], &temp);
+
+ return 0;
+}
+
diff --git a/SRC/zpivotgrowth.c b/SRC/zpivotgrowth.c
new file mode 100644
index 0000000..59e0c82
--- /dev/null
+++ b/SRC/zpivotgrowth.c
@@ -0,0 +1,110 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "zsp_defs.h"
+#include "util.h"
+
+double
+zPivotGrowth(int ncols, SuperMatrix *A, int *perm_c,
+ SuperMatrix *L, SuperMatrix *U)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Compute the reciprocal pivot growth factor of the leading ncols columns
+ * of the matrix, using the formula:
+ * min_j ( max_i(abs(A_ij)) / max_i(abs(U_ij)) )
+ *
+ * Arguments
+ * =========
+ *
+ * ncols (input) int
+ * The number of columns of matrices A, L and U.
+ *
+ * A (input) SuperMatrix*
+ * Original matrix A, permuted by columns, of dimension
+ * (A->nrow, A->ncol). The type of A can be:
+ * Stype = NC; Dtype = SLU_Z; Mtype = GE.
+ *
+ * L (output) SuperMatrix*
+ * The factor L from the factorization Pr*A=L*U; use compressed row
+ * subscripts storage for supernodes, i.e., L has type:
+ * Stype = SC; Dtype = SLU_Z; Mtype = TRLU.
+ *
+ * U (output) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U. Use column-wise
+ * storage scheme, i.e., U has types: Stype = NC;
+ * Dtype = SLU_Z; Mtype = TRU.
+ *
+ */
+ NCformat *Astore;
+ SCformat *Lstore;
+ NCformat *Ustore;
+ doublecomplex *Aval, *Lval, *Uval;
+ int fsupc, nsupr, luptr, nz_in_U;
+ int i, j, k, oldcol;
+ int *inv_perm_c;
+ double rpg, maxaj, maxuj;
+ extern double dlamch_(char *);
+ double smlnum;
+ doublecomplex *luval;
+ doublecomplex temp_comp;
+
+ /* Get machine constants. */
+ smlnum = dlamch_("S");
+ rpg = 1. / smlnum;
+
+ Astore = A->Store;
+ Lstore = L->Store;
+ Ustore = U->Store;
+ Aval = Astore->nzval;
+ Lval = Lstore->nzval;
+ Uval = Ustore->nzval;
+
+ inv_perm_c = (int *) SUPERLU_MALLOC(A->ncol*sizeof(int));
+ for (j = 0; j < A->ncol; ++j) inv_perm_c[perm_c[j]] = j;
+
+ for (k = 0; k <= Lstore->nsuper; ++k) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ luptr = L_NZ_START(fsupc);
+ luval = &Lval[luptr];
+ nz_in_U = 1;
+
+ for (j = fsupc; j < L_FST_SUPC(k+1) && j < ncols; ++j) {
+ maxaj = 0.;
+ oldcol = inv_perm_c[j];
+ for (i = Astore->colptr[oldcol]; i < Astore->colptr[oldcol+1]; ++i)
+ maxaj = SUPERLU_MAX( maxaj, z_abs1( &Aval[i]) );
+
+ maxuj = 0.;
+ for (i = Ustore->colptr[j]; i < Ustore->colptr[j+1]; i++)
+ maxuj = SUPERLU_MAX( maxuj, z_abs1( &Uval[i]) );
+
+ /* Supernode */
+ for (i = 0; i < nz_in_U; ++i)
+ maxuj = SUPERLU_MAX( maxuj, z_abs1( &luval[i]) );
+
+ ++nz_in_U;
+ luval += nsupr;
+
+ if ( maxuj == 0. )
+ rpg = SUPERLU_MIN( rpg, 1.);
+ else
+ rpg = SUPERLU_MIN( rpg, maxaj / maxuj );
+ }
+
+ if ( j >= ncols ) break;
+ }
+
+ SUPERLU_FREE(inv_perm_c);
+ return (rpg);
+}
diff --git a/SRC/zpruneL.c b/SRC/zpruneL.c
new file mode 100644
index 0000000..ee24f7f
--- /dev/null
+++ b/SRC/zpruneL.c
@@ -0,0 +1,149 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+#include "util.h"
+
+void
+zpruneL(
+ const int jcol, /* in */
+ const int *perm_r, /* in */
+ const int pivrow, /* in */
+ const int nseg, /* in */
+ const int *segrep, /* in */
+ const int *repfnz, /* in */
+ int *xprune, /* out */
+ GlobalLU_t *Glu /* modified - global LU data structures */
+ )
+{
+/*
+ * Purpose
+ * =======
+ * Prunes the L-structure of supernodes whose L-structure
+ * contains the current pivot row "pivrow"
+ *
+ */
+ doublecomplex utemp;
+ int jsupno, irep, irep1, kmin, kmax, krow, movnum;
+ int i, ktemp, minloc, maxloc;
+ int do_prune; /* logical variable */
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ doublecomplex *lusup;
+ int *xlusup;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ /*
+ * For each supernode-rep irep in U[*,j]
+ */
+ jsupno = supno[jcol];
+ for (i = 0; i < nseg; i++) {
+
+ irep = segrep[i];
+ irep1 = irep + 1;
+ do_prune = FALSE;
+
+ /* Don't prune with a zero U-segment */
+ if ( repfnz[irep] == EMPTY )
+ continue;
+
+ /* If a snode overlaps with the next panel, then the U-segment
+ * is fragmented into two parts -- irep and irep1. We should let
+ * pruning occur at the rep-column in irep1's snode.
+ */
+ if ( supno[irep] == supno[irep1] ) /* Don't prune */
+ continue;
+
+ /*
+ * If it has not been pruned & it has a nonz in row L[pivrow,i]
+ */
+ if ( supno[irep] != jsupno ) {
+ if ( xprune[irep] >= xlsub[irep1] ) {
+ kmin = xlsub[irep];
+ kmax = xlsub[irep1] - 1;
+ for (krow = kmin; krow <= kmax; krow++)
+ if ( lsub[krow] == pivrow ) {
+ do_prune = TRUE;
+ break;
+ }
+ }
+
+ if ( do_prune ) {
+
+ /* Do a quicksort-type partition
+ * movnum=TRUE means that the num values have to be exchanged.
+ */
+ movnum = FALSE;
+ if ( irep == xsup[supno[irep]] ) /* Snode of size 1 */
+ movnum = TRUE;
+
+ while ( kmin <= kmax ) {
+
+ if ( perm_r[lsub[kmax]] == EMPTY )
+ kmax--;
+ else if ( perm_r[lsub[kmin]] != EMPTY )
+ kmin++;
+ else { /* kmin below pivrow, and kmax above pivrow:
+ * interchange the two subscripts
+ */
+ ktemp = lsub[kmin];
+ lsub[kmin] = lsub[kmax];
+ lsub[kmax] = ktemp;
+
+ /* If the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript
+ * interchange performed, similar interchange must be
+ * done on the numerical values.
+ */
+ if ( movnum ) {
+ minloc = xlusup[irep] + (kmin - xlsub[irep]);
+ maxloc = xlusup[irep] + (kmax - xlsub[irep]);
+ utemp = lusup[minloc];
+ lusup[minloc] = lusup[maxloc];
+ lusup[maxloc] = utemp;
+ }
+
+ kmin++;
+ kmax--;
+
+ }
+
+ } /* while */
+
+ xprune[irep] = kmin; /* Pruning */
+
+#ifdef CHK_PRUNE
+ printf(" After zpruneL(),using col %d: xprune[%d] = %d\n",
+ jcol, irep, kmin);
+#endif
+ } /* if do_prune */
+
+ } /* if */
+
+ } /* for each U-segment... */
+}
diff --git a/SRC/zreadhb.c b/SRC/zreadhb.c
new file mode 100644
index 0000000..c98951a
--- /dev/null
+++ b/SRC/zreadhb.c
@@ -0,0 +1,266 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "zsp_defs.h"
+
+
+/* Eat up the rest of the current line */
+int zDumpLine(FILE *fp)
+{
+ register int c;
+ while ((c = fgetc(fp)) != '\n') ;
+ return 0;
+}
+
+int zParseIntFormat(char *buf, int *num, int *size)
+{
+ char *tmp;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ sscanf(tmp, "%d", num);
+ while (*tmp != 'I' && *tmp != 'i') ++tmp;
+ ++tmp;
+ sscanf(tmp, "%d", size);
+ return 0;
+}
+
+int zParseFloatFormat(char *buf, int *num, int *size)
+{
+ char *tmp, *period;
+
+ tmp = buf;
+ while (*tmp++ != '(') ;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ while (*tmp != 'E' && *tmp != 'e' && *tmp != 'D' && *tmp != 'd'
+ && *tmp != 'F' && *tmp != 'f') {
+ /* May find kP before nE/nD/nF, like (1P6F13.6). In this case the
+ num picked up refers to P, which should be skipped. */
+ if (*tmp=='p' || *tmp=='P') {
+ ++tmp;
+ *num = atoi(tmp); /*sscanf(tmp, "%d", num);*/
+ } else {
+ ++tmp;
+ }
+ }
+ ++tmp;
+ period = tmp;
+ while (*period != '.' && *period != ')') ++period ;
+ *period = '\0';
+ *size = atoi(tmp); /*sscanf(tmp, "%2d", size);*/
+
+ return 0;
+}
+
+int zReadVector(FILE *fp, int n, int *where, int perline, int persize)
+{
+ register int i, j, item;
+ char tmp, buf[100];
+
+ i = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ item = atoi(&buf[j*persize]);
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ where[i++] = item - 1;
+ }
+ }
+
+ return 0;
+}
+
+/* Read complex numbers as pairs of (real, imaginary) */
+int zReadValues(FILE *fp, int n, doublecomplex *destination, int perline, int persize)
+{
+ register int i, j, k, s, pair;
+ register double realpart;
+ char tmp, buf[100];
+
+ i = pair = 0;
+ while (i < n) {
+ fgets(buf, 100, fp); /* read a line at a time */
+ for (j=0; j<perline && i<n; j++) {
+ tmp = buf[(j+1)*persize]; /* save the char at that place */
+ buf[(j+1)*persize] = 0; /* null terminate */
+ s = j*persize;
+ for (k = 0; k < persize; ++k) /* No D_ format in C */
+ if ( buf[s+k] == 'D' || buf[s+k] == 'd' ) buf[s+k] = 'E';
+ if ( pair == 0 ) {
+ /* The value is real part */
+ realpart = atof(&buf[s]);
+ pair = 1;
+ } else {
+ /* The value is imaginary part */
+ destination[i].r = realpart;
+ destination[i++].i = atof(&buf[s]);
+ pair = 0;
+ }
+ buf[(j+1)*persize] = tmp; /* recover the char at that place */
+ }
+ }
+
+ return 0;
+}
+
+
+void
+zreadhb(int *nrow, int *ncol, int *nonz,
+ doublecomplex **nzval, int **rowind, int **colptr)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * Read a DOUBLE COMPLEX PRECISION matrix stored in Harwell-Boeing format
+ * as described below.
+ *
+ * Line 1 (A72,A8)
+ * Col. 1 - 72 Title (TITLE)
+ * Col. 73 - 80 Key (KEY)
+ *
+ * Line 2 (5I14)
+ * Col. 1 - 14 Total number of lines excluding header (TOTCRD)
+ * Col. 15 - 28 Number of lines for pointers (PTRCRD)
+ * Col. 29 - 42 Number of lines for row (or variable) indices (INDCRD)
+ * Col. 43 - 56 Number of lines for numerical values (VALCRD)
+ * Col. 57 - 70 Number of lines for right-hand sides (RHSCRD)
+ * (including starting guesses and solution vectors
+ * if present)
+ * (zero indicates no right-hand side data is present)
+ *
+ * Line 3 (A3, 11X, 4I14)
+ * Col. 1 - 3 Matrix type (see below) (MXTYPE)
+ * Col. 15 - 28 Number of rows (or variables) (NROW)
+ * Col. 29 - 42 Number of columns (or elements) (NCOL)
+ * Col. 43 - 56 Number of row (or variable) indices (NNZERO)
+ * (equal to number of entries for assembled matrices)
+ * Col. 57 - 70 Number of elemental matrix entries (NELTVL)
+ * (zero in the case of assembled matrices)
+ * Line 4 (2A16, 2A20)
+ * Col. 1 - 16 Format for pointers (PTRFMT)
+ * Col. 17 - 32 Format for row (or variable) indices (INDFMT)
+ * Col. 33 - 52 Format for numerical values of coefficient matrix (VALFMT)
+ * Col. 53 - 72 Format for numerical values of right-hand sides (RHSFMT)
+ *
+ * Line 5 (A3, 11X, 2I14) Only present if there are right-hand sides present
+ * Col. 1 Right-hand side type:
+ * F for full storage or M for same format as matrix
+ * Col. 2 G if a starting vector(s) (Guess) is supplied. (RHSTYP)
+ * Col. 3 X if an exact solution vector(s) is supplied.
+ * Col. 15 - 28 Number of right-hand sides (NRHS)
+ * Col. 29 - 42 Number of row indices (NRHSIX)
+ * (ignored in case of unassembled matrices)
+ *
+ * The three character type field on line 3 describes the matrix type.
+ * The following table lists the permitted values for each of the three
+ * characters. As an example of the type field, RSA denotes that the matrix
+ * is real, symmetric, and assembled.
+ *
+ * First Character:
+ * R Real matrix
+ * C Complex matrix
+ * P Pattern only (no numerical values supplied)
+ *
+ * Second Character:
+ * S Symmetric
+ * U Unsymmetric
+ * H Hermitian
+ * Z Skew symmetric
+ * R Rectangular
+ *
+ * Third Character:
+ * A Assembled
+ * E Elemental matrices (unassembled)
+ *
+ */
+
+ register int i, numer_lines = 0, rhscrd = 0;
+ int tmp, colnum, colsize, rownum, rowsize, valnum, valsize;
+ char buf[100], type[4], key[10];
+ FILE *fp;
+
+ fp = stdin;
+
+ /* Line 1 */
+ fgets(buf, 100, fp);
+ fputs(buf, stdout);
+#if 0
+ fscanf(fp, "%72c", buf); buf[72] = 0;
+ printf("Title: %s", buf);
+ fscanf(fp, "%8c", key); key[8] = 0;
+ printf("Key: %s\n", key);
+ zDumpLine(fp);
+#endif
+
+ /* Line 2 */
+ for (i=0; i<5; i++) {
+ fscanf(fp, "%14c", buf); buf[14] = 0;
+ sscanf(buf, "%d", &tmp);
+ if (i == 3) numer_lines = tmp;
+ if (i == 4 && tmp) rhscrd = tmp;
+ }
+ zDumpLine(fp);
+
+ /* Line 3 */
+ fscanf(fp, "%3c", type);
+ fscanf(fp, "%11c", buf); /* pad */
+ type[3] = 0;
+#ifdef DEBUG
+ printf("Matrix type %s\n", type);
+#endif
+
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nrow);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", ncol);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", nonz);
+ fscanf(fp, "%14c", buf); sscanf(buf, "%d", &tmp);
+
+ if (tmp != 0)
+ printf("This is not an assembled matrix!\n");
+ if (*nrow != *ncol)
+ printf("Matrix is not square.\n");
+ zDumpLine(fp);
+
+ /* Allocate storage for the three arrays ( nzval, rowind, colptr ) */
+ zallocateA(*ncol, *nonz, nzval, rowind, colptr);
+
+ /* Line 4: format statement */
+ fscanf(fp, "%16c", buf);
+ zParseIntFormat(buf, &colnum, &colsize);
+ fscanf(fp, "%16c", buf);
+ zParseIntFormat(buf, &rownum, &rowsize);
+ fscanf(fp, "%20c", buf);
+ zParseFloatFormat(buf, &valnum, &valsize);
+ fscanf(fp, "%20c", buf);
+ zDumpLine(fp);
+
+ /* Line 5: right-hand side */
+ if ( rhscrd ) zDumpLine(fp); /* skip RHSFMT */
+
+#ifdef DEBUG
+ printf("%d rows, %d nonzeros\n", *nrow, *nonz);
+ printf("colnum %d, colsize %d\n", colnum, colsize);
+ printf("rownum %d, rowsize %d\n", rownum, rowsize);
+ printf("valnum %d, valsize %d\n", valnum, valsize);
+#endif
+
+ zReadVector(fp, *ncol+1, *colptr, colnum, colsize);
+ zReadVector(fp, *nonz, *rowind, rownum, rowsize);
+ if ( numer_lines ) {
+ zReadValues(fp, *nonz, *nzval, valnum, valsize);
+ }
+
+ fclose(fp);
+
+}
+
diff --git a/SRC/zsnode_bmod.c b/SRC/zsnode_bmod.c
new file mode 100644
index 0000000..8ec938b
--- /dev/null
+++ b/SRC/zsnode_bmod.c
@@ -0,0 +1,118 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+
+
+/*
+ * Performs numeric block updates within the relaxed snode.
+ */
+int
+zsnode_bmod (
+ const int jcol, /* in */
+ const int jsupno, /* in */
+ const int fsupc, /* in */
+ doublecomplex *dense, /* in */
+ doublecomplex *tempv, /* working array */
+ GlobalLU_t *Glu, /* modified */
+ SuperLUStat_t *stat /* output */
+ )
+{
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ int incx = 1, incy = 1;
+ doublecomplex alpha = {-1.0, 0.0}, beta = {1.0, 0.0};
+#endif
+
+ doublecomplex comp_zero = {0.0, 0.0};
+ int luptr, nsupc, nsupr, nrow;
+ int isub, irow, i, iptr;
+ register int ufirst, nextlu;
+ int *lsub, *xlsub;
+ doublecomplex *lusup;
+ int *xlusup;
+ flops_t *ops = stat->ops;
+
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+
+ nextlu = xlusup[jcol];
+
+ /*
+ * Process the supernodal portion of L\U[*,j]
+ */
+ for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
+ irow = lsub[isub];
+ lusup[nextlu] = dense[irow];
+ dense[irow] = comp_zero;
+ ++nextlu;
+ }
+
+ xlusup[jcol + 1] = nextlu; /* Initialize xlusup for next column */
+
+ if ( fsupc < jcol ) {
+
+ luptr = xlusup[fsupc];
+ nsupr = xlsub[fsupc+1] - xlsub[fsupc];
+ nsupc = jcol - fsupc; /* Excluding jcol */
+ ufirst = xlusup[jcol]; /* Points to the beginning of column
+ jcol in supernode L\U(jsupno). */
+ nrow = nsupr - nsupc;
+
+ ops[TRSV] += 4 * nsupc * (nsupc - 1);
+ ops[GEMV] += 8 * nrow * nsupc;
+
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ CGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#else
+ ztrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
+ &lusup[ufirst], &incx );
+ zgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
+ &lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
+#endif
+#else
+ zlsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
+ zmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
+ &lusup[ufirst], &tempv[0] );
+
+ /* Scatter tempv[*] into lusup[*] */
+ iptr = ufirst + nsupc;
+ for (i = 0; i < nrow; i++) {
+ z_sub(&lusup[iptr], &lusup[iptr], &tempv[i]);
+ ++iptr;
+ tempv[i] = comp_zero;
+ }
+#endif
+
+ }
+
+ return 0;
+}
diff --git a/SRC/zsnode_dfs.c b/SRC/zsnode_dfs.c
new file mode 100644
index 0000000..b1bec95
--- /dev/null
+++ b/SRC/zsnode_dfs.c
@@ -0,0 +1,106 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include "zsp_defs.h"
+#include "util.h"
+
+int
+zsnode_dfs (
+ const int jcol, /* in - start of the supernode */
+ const int kcol, /* in - end of the supernode */
+ const int *asub, /* in */
+ const int *xa_begin, /* in */
+ const int *xa_end, /* in */
+ int *xprune, /* out */
+ int *marker, /* modified */
+ GlobalLU_t *Glu /* modified */
+ )
+{
+/* Purpose
+ * =======
+ * zsnode_dfs() - Determine the union of the row structures of those
+ * columns within the relaxed snode.
+ * Note: The relaxed snodes are leaves of the supernodal etree, therefore,
+ * the portion outside the rectangular supernode must be zero.
+ *
+ * Return value
+ * ============
+ * 0 success;
+ * >0 number of bytes allocated when run out of memory.
+ *
+ */
+ register int i, k, ifrom, ito, nextl, new_next;
+ int nsuper, krow, kmark, mem_error;
+ int *xsup, *supno;
+ int *lsub, *xlsub;
+ int nzlmax;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ nzlmax = Glu->nzlmax;
+
+ nsuper = ++supno[jcol]; /* Next available supernode number */
+ nextl = xlsub[jcol];
+
+ for (i = jcol; i <= kcol; i++) {
+ /* For each nonzero in A[*,i] */
+ for (k = xa_begin[i]; k < xa_end[i]; k++) {
+ krow = asub[k];
+ kmark = marker[krow];
+ if ( kmark != kcol ) { /* First time visit krow */
+ marker[krow] = kcol;
+ lsub[nextl++] = krow;
+ if ( nextl >= nzlmax ) {
+ if ( mem_error = zLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ }
+ }
+ supno[i] = nsuper;
+ }
+
+ /* Supernode > 1, then make a copy of the subscripts for pruning */
+ if ( jcol < kcol ) {
+ new_next = nextl + (nextl - xlsub[jcol]);
+ while ( new_next > nzlmax ) {
+ if ( mem_error = zLUMemXpand(jcol, nextl, LSUB, &nzlmax, Glu) )
+ return (mem_error);
+ lsub = Glu->lsub;
+ }
+ ito = nextl;
+ for (ifrom = xlsub[jcol]; ifrom < nextl; )
+ lsub[ito++] = lsub[ifrom++];
+ for (i = jcol+1; i <= kcol; i++) xlsub[i] = nextl;
+ nextl = ito;
+ }
+
+ xsup[nsuper+1] = kcol + 1;
+ supno[kcol+1] = nsuper;
+ xprune[kcol] = nextl;
+ xlsub[kcol+1] = nextl;
+
+ return 0;
+}
+
diff --git a/SRC/zsp_blas2.c b/SRC/zsp_blas2.c
new file mode 100644
index 0000000..18470c5
--- /dev/null
+++ b/SRC/zsp_blas2.c
@@ -0,0 +1,561 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: zsp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "zsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void zusolve(int, int, doublecomplex*, doublecomplex*);
+void zlsolve(int, int, doublecomplex*, doublecomplex*);
+void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
+
+
+int
+sp_ztrsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, doublecomplex *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_ztrsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A^H*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_Z, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_Z, Mtype = TRU.
+ *
+ * x - (input/output) doublecomplex*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ doublecomplex *Lval, *Uval;
+ int incx = 1, incy = 1;
+ doublecomplex temp;
+ doublecomplex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ doublecomplex comp_zero = {0.0, 0.0};
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ doublecomplex *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") &&
+ !lsame_(trans, "C")) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_ztrsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = doublecomplexCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_ztrsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1);
+ solve_ops += 8 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ zz_mult(&comp_zero, &x[fsupc], &Lval[luptr]);
+ z_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ CGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ ztrsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ zgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ zlsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ zmatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ z_sub(&x[irow], &x[irow], &work[i]); /* Scatter */
+ work[i] = comp_zero;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ z_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ zz_mult(&comp_zero, &x[fsupc], &Uval[i]);
+ z_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ zusolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ zz_mult(&comp_zero, &x[jcol], &Uval[i]);
+ z_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else if ( lsame_(trans, "T") ) { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 8 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ zz_mult(&comp_zero, &x[irow], &Lval[i]);
+ z_sub(&x[jcol], &x[jcol], &comp_zero);
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += 4 * nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ zz_mult(&comp_zero, &x[irow], &Uval[i]);
+ z_sub(&x[jcol], &x[jcol], &comp_zero);
+ }
+ }
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ z_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ } else { /* Form x := conj(inv(A'))*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := conj(inv(L'))*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 8 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ zz_conj(&temp, &Lval[i]);
+ zz_mult(&comp_zero, &x[irow], &temp);
+ z_sub(&x[jcol], &x[jcol], &comp_zero);
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += 4 * nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd(trans, strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ ZTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("L", trans, "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := conj(inv(U'))*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ zz_conj(&temp, &Uval[i]);
+ zz_mult(&comp_zero, &x[irow], &temp);
+ z_sub(&x[jcol], &x[jcol], &comp_zero);
+ }
+ }
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ zz_conj(&temp, &Lval[luptr]);
+ z_div(&x[fsupc], &x[fsupc], &temp);
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd(trans, strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ ZTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("U", trans, "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+int
+sp_zgemv(char *trans, doublecomplex alpha, SuperMatrix *A, doublecomplex *x,
+ int incx, doublecomplex beta, doublecomplex *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_zgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) doublecomplex
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+
+ X - (input) doublecomplex*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) doublecomplex
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) doublecomplex*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ doublecomplex *Aval;
+ int info;
+ doublecomplex temp, temp1;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+ doublecomplex comp_zero = {0.0, 0.0};
+ doublecomplex comp_one = {1.0, 0.0};
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_zgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 ||
+ z_eq(&alpha, &comp_zero) &&
+ z_eq(&beta, &comp_one))
+ return 0;
+
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if ( !z_eq(&beta, &comp_one) ) {
+ if (incy == 1) {
+ if ( z_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) y[i] = comp_zero;
+ else
+ for (i = 0; i < leny; ++i)
+ zz_mult(&y[i], &beta, &y[i]);
+ } else {
+ iy = ky;
+ if ( z_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) {
+ y[iy] = comp_zero;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ zz_mult(&y[iy], &beta, &y[iy]);
+ iy += incy;
+ }
+ }
+ }
+
+ if ( z_eq(&alpha, &comp_zero) ) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if ( !z_eq(&x[jx], &comp_zero) ) {
+ zz_mult(&temp, &alpha, &x[jx]);
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ zz_mult(&temp1, &temp, &Aval[i]);
+ z_add(&y[irow], &y[irow], &temp1);
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = comp_zero;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ zz_mult(&temp1, &Aval[i], &x[irow]);
+ z_add(&temp, &temp, &temp1);
+ }
+ zz_mult(&temp1, &alpha, &temp);
+ z_add(&y[jy], &y[jy], &temp1);
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_zgemv */
+
diff --git a/SRC/zsp_blas2.c.bak b/SRC/zsp_blas2.c.bak
new file mode 100644
index 0000000..5ab0334
--- /dev/null
+++ b/SRC/zsp_blas2.c.bak
@@ -0,0 +1,479 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: zsp_blas2.c
+ * Purpose: Sparse BLAS 2, using some dense BLAS 2 operations.
+ */
+
+#include "zsp_defs.h"
+
+/*
+ * Function prototypes
+ */
+void zusolve(int, int, doublecomplex*, doublecomplex*);
+void zlsolve(int, int, doublecomplex*, doublecomplex*);
+void zmatvec(int, int, int, doublecomplex*, doublecomplex*, doublecomplex*);
+
+
+int
+sp_ztrsv(char *uplo, char *trans, char *diag, SuperMatrix *L,
+ SuperMatrix *U, doublecomplex *x, SuperLUStat_t *stat, int *info)
+{
+/*
+ * Purpose
+ * =======
+ *
+ * sp_ztrsv() solves one of the systems of equations
+ * A*x = b, or A'*x = b,
+ * where b and x are n element vectors and A is a sparse unit , or
+ * non-unit, upper or lower triangular matrix.
+ * No test for singularity or near-singularity is included in this
+ * routine. Such tests must be performed before calling this routine.
+ *
+ * Parameters
+ * ==========
+ *
+ * uplo - (input) char*
+ * On entry, uplo specifies whether the matrix is an upper or
+ * lower triangular matrix as follows:
+ * uplo = 'U' or 'u' A is an upper triangular matrix.
+ * uplo = 'L' or 'l' A is a lower triangular matrix.
+ *
+ * trans - (input) char*
+ * On entry, trans specifies the equations to be solved as
+ * follows:
+ * trans = 'N' or 'n' A*x = b.
+ * trans = 'T' or 't' A'*x = b.
+ * trans = 'C' or 'c' A'*x = b.
+ *
+ * diag - (input) char*
+ * On entry, diag specifies whether or not A is unit
+ * triangular as follows:
+ * diag = 'U' or 'u' A is assumed to be unit triangular.
+ * diag = 'N' or 'n' A is not assumed to be unit
+ * triangular.
+ *
+ * L - (input) SuperMatrix*
+ * The factor L from the factorization Pr*A*Pc=L*U. Use
+ * compressed row subscripts storage for supernodes,
+ * i.e., L has types: Stype = SC, Dtype = SLU_Z, Mtype = TRLU.
+ *
+ * U - (input) SuperMatrix*
+ * The factor U from the factorization Pr*A*Pc=L*U.
+ * U has types: Stype = NC, Dtype = SLU_Z, Mtype = TRU.
+ *
+ * x - (input/output) doublecomplex*
+ * Before entry, the incremented array X must contain the n
+ * element right-hand side vector b. On exit, X is overwritten
+ * with the solution vector x.
+ *
+ * info - (output) int*
+ * If *info = -i, the i-th argument had an illegal value.
+ *
+ */
+#ifdef _CRAY
+ _fcd ftcs1 = _cptofcd("L", strlen("L")),
+ ftcs2 = _cptofcd("N", strlen("N")),
+ ftcs3 = _cptofcd("U", strlen("U"));
+#endif
+ SCformat *Lstore;
+ NCformat *Ustore;
+ doublecomplex *Lval, *Uval;
+ int incx = 1, incy = 1;
+ doublecomplex alpha = {1.0, 0.0}, beta = {1.0, 0.0};
+ doublecomplex comp_zero = {0.0, 0.0};
+ int nrow;
+ int fsupc, nsupr, nsupc, luptr, istart, irow;
+ int i, k, iptr, jcol;
+ doublecomplex *work;
+ flops_t solve_ops;
+
+ /* Test the input parameters */
+ *info = 0;
+ if ( !lsame_(uplo,"L") && !lsame_(uplo, "U") ) *info = -1;
+ else if ( !lsame_(trans, "N") && !lsame_(trans, "T") ) *info = -2;
+ else if ( !lsame_(diag, "U") && !lsame_(diag, "N") ) *info = -3;
+ else if ( L->nrow != L->ncol || L->nrow < 0 ) *info = -4;
+ else if ( U->nrow != U->ncol || U->nrow < 0 ) *info = -5;
+ if ( *info ) {
+ i = -(*info);
+ xerbla_("sp_ztrsv", &i);
+ return 0;
+ }
+
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+ solve_ops = 0;
+
+ if ( !(work = doublecomplexCalloc(L->nrow)) )
+ ABORT("Malloc fails for work in sp_ztrsv().");
+
+ if ( lsame_(trans, "N") ) { /* Form x := inv(A)*x. */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L)*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+ nrow = nsupr - nsupc;
+
+ solve_ops += 4 * nsupc * (nsupc - 1);
+ solve_ops += 8 * nrow * nsupc;
+
+ if ( nsupc == 1 ) {
+ for (iptr=istart+1; iptr < L_SUB_START(fsupc+1); ++iptr) {
+ irow = L_SUB(iptr);
+ ++luptr;
+ zz_mult(&comp_zero, &x[fsupc], &Lval[luptr]);
+ z_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ CGEMV(ftcs2, &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#else
+ ztrsv_("L", "N", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+
+ zgemv_("N", &nrow, &nsupc, &alpha, &Lval[luptr+nsupc],
+ &nsupr, &x[fsupc], &incx, &beta, &work[0], &incy);
+#endif
+#else
+ zlsolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc]);
+
+ zmatvec ( nsupr, nsupr-nsupc, nsupc, &Lval[luptr+nsupc],
+ &x[fsupc], &work[0] );
+#endif
+
+ iptr = istart + nsupc;
+ for (i = 0; i < nrow; ++i, ++iptr) {
+ irow = L_SUB(iptr);
+ z_sub(&x[irow], &x[irow], &work[i]); /* Scatter */
+ work[i] = comp_zero;
+
+ }
+ }
+ } /* for k ... */
+
+ } else {
+ /* Form x := inv(U)*x */
+
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; k--) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ z_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ for (i = U_NZ_START(fsupc); i < U_NZ_START(fsupc+1); ++i) {
+ irow = U_SUB(i);
+ zz_mult(&comp_zero, &x[fsupc], &Uval[i]);
+ z_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ } else {
+#ifdef USE_VENDOR_BLAS
+#ifdef _CRAY
+ CTRSV(ftcs3, ftcs2, ftcs2, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("U", "N", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+#else
+ zusolve ( nsupr, nsupc, &Lval[luptr], &x[fsupc] );
+#endif
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1);
+ i++) {
+ irow = U_SUB(i);
+ zz_mult(&comp_zero, &x[jcol], &Uval[i]);
+ z_sub(&x[irow], &x[irow], &comp_zero);
+ }
+ }
+ }
+ } /* for k ... */
+
+ }
+ } else { /* Form x := inv(A')*x */
+
+ if ( lsame_(uplo, "L") ) {
+ /* Form x := inv(L')*x */
+ if ( L->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = Lstore->nsuper; k >= 0; --k) {
+ fsupc = L_FST_SUPC(k);
+ istart = L_SUB_START(fsupc);
+ nsupr = L_SUB_START(fsupc+1) - istart;
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ solve_ops += 8 * (nsupr - nsupc) * nsupc;
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ iptr = istart + nsupc;
+ for (i = L_NZ_START(jcol) + nsupc;
+ i < L_NZ_START(jcol+1); i++) {
+ irow = L_SUB(iptr);
+ zz_mult(&comp_zero, &x[irow], &Lval[i]);
+ z_sub(&x[jcol], &x[jcol], &comp_zero);
+ iptr++;
+ }
+ }
+
+ if ( nsupc > 1 ) {
+ solve_ops += 4 * nsupc * (nsupc - 1);
+#ifdef _CRAY
+ ftcs1 = _cptofcd("L", strlen("L"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("U", strlen("U"));
+ CTRSV(ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("L", "T", "U", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ }
+ } else {
+ /* Form x := inv(U')*x */
+ if ( U->nrow == 0 ) return 0; /* Quick return */
+
+ for (k = 0; k <= Lstore->nsuper; k++) {
+ fsupc = L_FST_SUPC(k);
+ nsupr = L_SUB_START(fsupc+1) - L_SUB_START(fsupc);
+ nsupc = L_FST_SUPC(k+1) - fsupc;
+ luptr = L_NZ_START(fsupc);
+
+ for (jcol = fsupc; jcol < L_FST_SUPC(k+1); jcol++) {
+ solve_ops += 8*(U_NZ_START(jcol+1) - U_NZ_START(jcol));
+ for (i = U_NZ_START(jcol); i < U_NZ_START(jcol+1); i++) {
+ irow = U_SUB(i);
+ zz_mult(&comp_zero, &x[irow], &Uval[i]);
+ z_sub(&x[jcol], &x[jcol], &comp_zero);
+ }
+ }
+
+ solve_ops += 4 * nsupc * (nsupc + 1);
+
+ if ( nsupc == 1 ) {
+ z_div(&x[fsupc], &x[fsupc], &Lval[luptr]);
+ } else {
+#ifdef _CRAY
+ ftcs1 = _cptofcd("U", strlen("U"));
+ ftcs2 = _cptofcd("T", strlen("T"));
+ ftcs3 = _cptofcd("N", strlen("N"));
+ CTRSV( ftcs1, ftcs2, ftcs3, &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#else
+ ztrsv_("U", "T", "N", &nsupc, &Lval[luptr], &nsupr,
+ &x[fsupc], &incx);
+#endif
+ }
+ } /* for k ... */
+ }
+ }
+
+ stat->ops[SOLVE] += solve_ops;
+ SUPERLU_FREE(work);
+ return 0;
+}
+
+
+
+int
+sp_zgemv(char *trans, doublecomplex alpha, SuperMatrix *A, doublecomplex *x,
+ int incx, doublecomplex beta, doublecomplex *y, int incy)
+{
+/* Purpose
+ =======
+
+ sp_zgemv() performs one of the matrix-vector operations
+ y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
+ where alpha and beta are scalars, x and y are vectors and A is a
+ sparse A->nrow by A->ncol matrix.
+
+ Parameters
+ ==========
+
+ TRANS - (input) char*
+ On entry, TRANS specifies the operation to be performed as
+ follows:
+ TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+ TRANS = 'T' or 't' y := alpha*A'*x + beta*y.
+ TRANS = 'C' or 'c' y := alpha*A'*x + beta*y.
+
+ ALPHA - (input) doublecomplex
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Before entry, the leading m by n part of the array A must
+ contain the matrix of coefficients.
+
+ X - (input) doublecomplex*, array of DIMENSION at least
+ ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+ Before entry, the incremented array X must contain the
+ vector x.
+
+ INCX - (input) int
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+
+ BETA - (input) doublecomplex
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+
+ Y - (output) doublecomplex*, array of DIMENSION at least
+ ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+ and at least
+ ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+ Before entry with BETA non-zero, the incremented array Y
+ must contain the vector y. On exit, Y is overwritten by the
+ updated vector y.
+
+ INCY - (input) int
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+
+ ==== Sparse Level 2 Blas routine.
+*/
+
+ /* Local variables */
+ NCformat *Astore;
+ doublecomplex *Aval;
+ int info;
+ doublecomplex temp, temp1;
+ int lenx, leny, i, j, irow;
+ int iy, jx, jy, kx, ky;
+ int notran;
+ doublecomplex comp_zero = {0.0, 0.0};
+ doublecomplex comp_one = {1.0, 0.0};
+
+ notran = lsame_(trans, "N");
+ Astore = A->Store;
+ Aval = Astore->nzval;
+
+ /* Test the input parameters */
+ info = 0;
+ if ( !notran && !lsame_(trans, "T") && !lsame_(trans, "C")) info = 1;
+ else if ( A->nrow < 0 || A->ncol < 0 ) info = 3;
+ else if (incx == 0) info = 5;
+ else if (incy == 0) info = 8;
+ if (info != 0) {
+ xerbla_("sp_zgemv ", &info);
+ return 0;
+ }
+
+ /* Quick return if possible. */
+ if (A->nrow == 0 || A->ncol == 0 ||
+ z_eq(&alpha, &comp_zero) &&
+ z_eq(&beta, &comp_one))
+ return 0;
+
+
+ /* Set LENX and LENY, the lengths of the vectors x and y, and set
+ up the start points in X and Y. */
+ if (lsame_(trans, "N")) {
+ lenx = A->ncol;
+ leny = A->nrow;
+ } else {
+ lenx = A->nrow;
+ leny = A->ncol;
+ }
+ if (incx > 0) kx = 0;
+ else kx = - (lenx - 1) * incx;
+ if (incy > 0) ky = 0;
+ else ky = - (leny - 1) * incy;
+
+ /* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through A. */
+ /* First form y := beta*y. */
+ if ( !z_eq(&beta, &comp_one) ) {
+ if (incy == 1) {
+ if ( z_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) y[i] = comp_zero;
+ else
+ for (i = 0; i < leny; ++i)
+ zz_mult(&y[i], &beta, &y[i]);
+ } else {
+ iy = ky;
+ if ( z_eq(&beta, &comp_zero) )
+ for (i = 0; i < leny; ++i) {
+ y[iy] = comp_zero;
+ iy += incy;
+ }
+ else
+ for (i = 0; i < leny; ++i) {
+ zz_mult(&y[iy], &beta, &y[iy]);
+ iy += incy;
+ }
+ }
+ }
+
+ if ( z_eq(&alpha, &comp_zero) ) return 0;
+
+ if ( notran ) {
+ /* Form y := alpha*A*x + y. */
+ jx = kx;
+ if (incy == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ if ( !z_eq(&x[jx], &comp_zero) ) {
+ zz_mult(&temp, &alpha, &x[jx]);
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ zz_mult(&temp1, &temp, &Aval[i]);
+ z_add(&y[irow], &y[irow], &temp1);
+ }
+ }
+ jx += incx;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ } else {
+ /* Form y := alpha*A'*x + y. */
+ jy = ky;
+ if (incx == 1) {
+ for (j = 0; j < A->ncol; ++j) {
+ temp = comp_zero;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ zz_mult(&temp1, &Aval[i], &x[irow]);
+ z_add(&temp, &temp, &temp1);
+ }
+ zz_mult(&temp1, &alpha, &temp);
+ z_add(&y[jy], &y[jy], &temp1);
+ jy += incy;
+ }
+ } else {
+ ABORT("Not implemented.");
+ }
+ }
+ return 0;
+} /* sp_zgemv */
+
diff --git a/SRC/zsp_blas3.c b/SRC/zsp_blas3.c
new file mode 100644
index 0000000..9825161
--- /dev/null
+++ b/SRC/zsp_blas3.c
@@ -0,0 +1,121 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+/*
+ * File name: sp_blas3.c
+ * Purpose: Sparse BLAS3, using some dense BLAS3 operations.
+ */
+
+#include "zsp_defs.h"
+#include "util.h"
+
+int
+sp_zgemm(char *transa, char *transb, int m, int n, int k,
+ doublecomplex alpha, SuperMatrix *A, doublecomplex *b, int ldb,
+ doublecomplex beta, doublecomplex *c, int ldc)
+{
+/* Purpose
+ =======
+
+ sp_z performs one of the matrix-matrix operations
+
+ C := alpha*op( A )*op( B ) + beta*C,
+
+ where op( X ) is one of
+
+ op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ),
+
+ alpha and beta are scalars, and A, B and C are matrices, with op( A )
+ an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+
+
+ Parameters
+ ==========
+
+ TRANSA - (input) char*
+ On entry, TRANSA specifies the form of op( A ) to be used in
+ the matrix multiplication as follows:
+ TRANSA = 'N' or 'n', op( A ) = A.
+ TRANSA = 'T' or 't', op( A ) = A'.
+ TRANSA = 'C' or 'c', op( A ) = conjg( A' ).
+ Unchanged on exit.
+
+ TRANSB - (input) char*
+ On entry, TRANSB specifies the form of op( B ) to be used in
+ the matrix multiplication as follows:
+ TRANSB = 'N' or 'n', op( B ) = B.
+ TRANSB = 'T' or 't', op( B ) = B'.
+ TRANSB = 'C' or 'c', op( B ) = conjg( B' ).
+ Unchanged on exit.
+
+ M - (input) int
+ On entry, M specifies the number of rows of the matrix
+ op( A ) and of the matrix C. M must be at least zero.
+ Unchanged on exit.
+
+ N - (input) int
+ On entry, N specifies the number of columns of the matrix
+ op( B ) and the number of columns of the matrix C. N must be
+ at least zero.
+ Unchanged on exit.
+
+ K - (input) int
+ On entry, K specifies the number of columns of the matrix
+ op( A ) and the number of rows of the matrix op( B ). K must
+ be at least zero.
+ Unchanged on exit.
+
+ ALPHA - (input) doublecomplex
+ On entry, ALPHA specifies the scalar alpha.
+
+ A - (input) SuperMatrix*
+ Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
+ Currently, the type of A can be:
+ Stype = NC or NCP; Dtype = SLU_Z; Mtype = GE.
+ In the future, more general A can be handled.
+
+ B - DOUBLE COMPLEX PRECISION array of DIMENSION ( LDB, kb ), where kb is
+ n when TRANSB = 'N' or 'n', and is k otherwise.
+ Before entry with TRANSB = 'N' or 'n', the leading k by n
+ part of the array B must contain the matrix B, otherwise
+ the leading n by k part of the array B must contain the
+ matrix B.
+ Unchanged on exit.
+
+ LDB - (input) int
+ On entry, LDB specifies the first dimension of B as declared
+ in the calling (sub) program. LDB must be at least max( 1, n ).
+ Unchanged on exit.
+
+ BETA - (input) doublecomplex
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then C need not be set on input.
+
+ C - DOUBLE COMPLEX PRECISION array of DIMENSION ( LDC, n ).
+ Before entry, the leading m by n part of the array C must
+ contain the matrix C, except when beta is zero, in which
+ case C need not be set on entry.
+ On exit, the array C is overwritten by the m by n matrix
+ ( alpha*op( A )*B + beta*C ).
+
+ LDC - (input) int
+ On entry, LDC specifies the first dimension of C as declared
+ in the calling (sub)program. LDC must be at least max(1,m).
+ Unchanged on exit.
+
+ ==== Sparse Level 3 Blas routine.
+*/
+ int incx = 1, incy = 1;
+ int j;
+
+ for (j = 0; j < n; ++j) {
+ sp_zgemv(transa, alpha, A, &b[ldb*j], incx, beta, &c[ldc*j], incy);
+ }
+ return 0;
+}
diff --git a/SRC/zsp_defs.h b/SRC/zsp_defs.h
new file mode 100644
index 0000000..f0450d4
--- /dev/null
+++ b/SRC/zsp_defs.h
@@ -0,0 +1,237 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#ifndef __SUPERLU_zSP_DEFS /* allow multiple inclusions */
+#define __SUPERLU_zSP_DEFS
+
+/*
+ * File name: zsp_defs.h
+ * Purpose: Sparse matrix types and function prototypes
+ * History:
+ */
+
+#ifdef _CRAY
+#include <fortran.h>
+#include <string.h>
+#endif
+
+/* Define my integer type int_t */
+typedef int int_t; /* default */
+
+#include "Cnames.h"
+#include "supermatrix.h"
+#include "util.h"
+#include "dcomplex.h"
+
+
+/*
+ * Global data structures used in LU factorization -
+ *
+ * nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].
+ * (xsup,supno): supno[i] is the supernode no to which i belongs;
+ * xsup(s) points to the beginning of the s-th supernode.
+ * e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12)
+ * xsup 0 1 2 4 7 12
+ * Note: dfs will be performed on supernode rep. relative to the new
+ * row pivoting ordering
+ *
+ * (xlsub,lsub): lsub[*] contains the compressed subscript of
+ * rectangular supernodes; xlsub[j] points to the starting
+ * location of the j-th column in lsub[*]. Note that xlsub
+ * is indexed by column.
+ * Storage: original row subscripts
+ *
+ * During the course of sparse LU factorization, we also use
+ * (xlsub,lsub) for the purpose of symmetric pruning. For each
+ * supernode {s,s+1,...,t=s+r} with first column s and last
+ * column t, the subscript set
+ * lsub[j], j=xlsub[s], .., xlsub[s+1]-1
+ * is the structure of column s (i.e. structure of this supernode).
+ * It is used for the storage of numerical values.
+ * Furthermore,
+ * lsub[j], j=xlsub[t], .., xlsub[t+1]-1
+ * is the structure of the last column t of this supernode.
+ * It is for the purpose of symmetric pruning. Therefore, the
+ * structural subscripts can be rearranged without making physical
+ * interchanges among the numerical values.
+ *
+ * However, if the supernode has only one column, then we
+ * only keep one set of subscripts. For any subscript interchange
+ * performed, similar interchange must be done on the numerical
+ * values.
+ *
+ * The last column structures (for pruning) will be removed
+ * after the numercial LU factorization phase.
+ *
+ * (xlusup,lusup): lusup[*] contains the numerical values of the
+ * rectangular supernodes; xlusup[j] points to the starting
+ * location of the j-th column in storage vector lusup[*]
+ * Note: xlusup is indexed by column.
+ * Each rectangular supernode is stored by column-major
+ * scheme, consistent with Fortran 2-dim array storage.
+ *
+ * (xusub,ucol,usub): ucol[*] stores the numerical values of
+ * U-columns outside the rectangular supernodes. The row
+ * subscript of nonzero ucol[k] is stored in usub[k].
+ * xusub[i] points to the starting location of column i in ucol.
+ * Storage: new row subscripts; that is subscripts of PA.
+ */
+typedef struct {
+ int *xsup; /* supernode and column mapping */
+ int *supno;
+ int *lsub; /* compressed L subscripts */
+ int *xlsub;
+ doublecomplex *lusup; /* L supernodes */
+ int *xlusup;
+ doublecomplex *ucol; /* U columns */
+ int *usub;
+ int *xusub;
+ int nzlmax; /* current max size of lsub */
+ int nzumax; /* " " " ucol */
+ int nzlumax; /* " " " lusup */
+ int n; /* number of columns in the matrix */
+ LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
+} GlobalLU_t;
+
+typedef struct {
+ float for_lu;
+ float total_needed;
+ int expansions;
+} mem_usage_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Driver routines */
+extern void
+zgssv(superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t *, int *);
+extern void
+zgssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,
+ char *, double *, double *, SuperMatrix *, SuperMatrix *,
+ void *, int, SuperMatrix *, SuperMatrix *,
+ double *, double *, double *, double *,
+ mem_usage_t *, SuperLUStat_t *, int *);
+
+/* Supernodal LU factor related */
+extern void
+zCreate_CompCol_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+zCreate_CompRow_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
+ int *, int *, Stype_t, Dtype_t, Mtype_t);
+extern void
+zCopy_CompCol_Matrix(SuperMatrix *, SuperMatrix *);
+extern void
+zCreate_Dense_Matrix(SuperMatrix *, int, int, doublecomplex *, int,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+zCreate_SuperNode_Matrix(SuperMatrix *, int, int, int, doublecomplex *,
+ int *, int *, int *, int *, int *,
+ Stype_t, Dtype_t, Mtype_t);
+extern void
+zCopy_Dense_Matrix(int, int, doublecomplex *, int, doublecomplex *, int);
+
+extern void countnz (const int, int *, int *, int *, GlobalLU_t *);
+extern void fixupL (const int, const int *, GlobalLU_t *);
+
+extern void zallocateA (int, int, doublecomplex **, int **, int **);
+extern void zgstrf (superlu_options_t*, SuperMatrix*, double,
+ int, int, int*, void *, int, int *, int *,
+ SuperMatrix *, SuperMatrix *, SuperLUStat_t*, int *);
+extern int zsnode_dfs (const int, const int, const int *, const int *,
+ const int *, int *, int *, GlobalLU_t *);
+extern int zsnode_bmod (const int, const int, const int, doublecomplex *,
+ doublecomplex *, GlobalLU_t *, SuperLUStat_t*);
+extern void zpanel_dfs (const int, const int, const int, SuperMatrix *,
+ int *, int *, doublecomplex *, int *, int *, int *,
+ int *, int *, int *, int *, GlobalLU_t *);
+extern void zpanel_bmod (const int, const int, const int, const int,
+ doublecomplex *, doublecomplex *, int *, int *,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int zcolumn_dfs (const int, const int, int *, int *, int *, int *,
+ int *, int *, int *, int *, int *, GlobalLU_t *);
+extern int zcolumn_bmod (const int, const int, doublecomplex *,
+ doublecomplex *, int *, int *, int,
+ GlobalLU_t *, SuperLUStat_t*);
+extern int zcopy_to_ucol (int, int, int *, int *, int *,
+ doublecomplex *, GlobalLU_t *);
+extern int zpivotL (const int, const double, int *, int *,
+ int *, int *, int *, GlobalLU_t *, SuperLUStat_t*);
+extern void zpruneL (const int, const int *, const int, const int,
+ const int *, const int *, int *, GlobalLU_t *);
+extern void zreadmt (int *, int *, int *, doublecomplex **, int **, int **);
+extern void zGenXtrue (int, int, doublecomplex *, int);
+extern void zFillRHS (trans_t, int, doublecomplex *, int, SuperMatrix *,
+ SuperMatrix *);
+extern void zgstrs (trans_t, SuperMatrix *, SuperMatrix *, int *, int *,
+ SuperMatrix *, SuperLUStat_t*, int *);
+
+
+/* Driver related */
+
+extern void zgsequ (SuperMatrix *, double *, double *, double *,
+ double *, double *, int *);
+extern void zlaqgs (SuperMatrix *, double *, double *, double,
+ double, double, char *);
+extern void zgscon (char *, SuperMatrix *, SuperMatrix *,
+ double, double *, SuperLUStat_t*, int *);
+extern double zPivotGrowth(int, SuperMatrix *, int *,
+ SuperMatrix *, SuperMatrix *);
+extern void zgsrfs (trans_t, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, int *, char *, double *,
+ double *, SuperMatrix *, SuperMatrix *,
+ double *, double *, SuperLUStat_t*, int *);
+
+extern int sp_ztrsv (char *, char *, char *, SuperMatrix *,
+ SuperMatrix *, doublecomplex *, SuperLUStat_t*, int *);
+extern int sp_zgemv (char *, doublecomplex, SuperMatrix *, doublecomplex *,
+ int, doublecomplex, doublecomplex *, int);
+
+extern int sp_zgemm (char *, char *, int, int, int, doublecomplex,
+ SuperMatrix *, doublecomplex *, int, doublecomplex,
+ doublecomplex *, int);
+
+/* Memory-related */
+extern int zLUMemInit (fact_t, void *, int, int, int, int, int,
+ SuperMatrix *, SuperMatrix *,
+ GlobalLU_t *, int **, doublecomplex **);
+extern void zSetRWork (int, int, doublecomplex *, doublecomplex **, doublecomplex **);
+extern void zLUWorkFree (int *, doublecomplex *, GlobalLU_t *);
+extern int zLUMemXpand (int, int, MemType, int *, GlobalLU_t *);
+
+extern doublecomplex *doublecomplexMalloc(int);
+extern doublecomplex *doublecomplexCalloc(int);
+extern double *doubleMalloc(int);
+extern double *doubleCalloc(int);
+extern int zmemory_usage(const int, const int, const int, const int);
+extern int zQuerySpace (SuperMatrix *, SuperMatrix *, mem_usage_t *);
+
+/* Auxiliary routines */
+extern void zreadhb(int *, int *, int *, doublecomplex **, int **, int **);
+extern void zCompRow_to_CompCol(int, int, int, doublecomplex*, int*, int*,
+ doublecomplex **, int **, int **);
+extern void zfill (doublecomplex *, int, doublecomplex);
+extern void zinf_norm_error (int, SuperMatrix *, doublecomplex *);
+extern void PrintPerf (SuperMatrix *, SuperMatrix *, mem_usage_t *,
+ doublecomplex, doublecomplex, doublecomplex *, doublecomplex *, char *);
+
+/* Routines for debugging */
+extern void zPrint_CompCol_Matrix(char *, SuperMatrix *);
+extern void zPrint_SuperNode_Matrix(char *, SuperMatrix *);
+extern void zPrint_Dense_Matrix(char *, SuperMatrix *);
+extern void print_lu_col(char *, int, int, int *, GlobalLU_t *);
+extern void check_tempv(int, doublecomplex *);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* __SUPERLU_zSP_DEFS */
+
diff --git a/SRC/zutil.c b/SRC/zutil.c
new file mode 100644
index 0000000..d7c76b4
--- /dev/null
+++ b/SRC/zutil.c
@@ -0,0 +1,481 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ Copyright (c) 1994 by Xerox Corporation. All rights reserved.
+
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
+ EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+
+ Permission is hereby granted to use or copy this program for any
+ purpose, provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is
+ granted, provided the above notices are retained, and a notice that
+ the code was modified is included with the above copyright notice.
+*/
+
+#include <math.h>
+#include "zsp_defs.h"
+
+void
+zCreate_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ doublecomplex *nzval, int *rowind, int *colptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NCformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NCformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->rowind = rowind;
+ Astore->colptr = colptr;
+}
+
+void
+zCreate_CompRow_Matrix(SuperMatrix *A, int m, int n, int nnz,
+ doublecomplex *nzval, int *colind, int *rowptr,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ NRformat *Astore;
+
+ A->Stype = stype;
+ A->Dtype = dtype;
+ A->Mtype = mtype;
+ A->nrow = m;
+ A->ncol = n;
+ A->Store = (void *) SUPERLU_MALLOC( sizeof(NRformat) );
+ if ( !(A->Store) ) ABORT("SUPERLU_MALLOC fails for A->Store");
+ Astore = A->Store;
+ Astore->nnz = nnz;
+ Astore->nzval = nzval;
+ Astore->colind = colind;
+ Astore->rowptr = rowptr;
+}
+
+/* Copy matrix A into matrix B. */
+void
+zCopy_CompCol_Matrix(SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore, *Bstore;
+ int ncol, nnz, i;
+
+ B->Stype = A->Stype;
+ B->Dtype = A->Dtype;
+ B->Mtype = A->Mtype;
+ B->nrow = A->nrow;;
+ B->ncol = ncol = A->ncol;
+ Astore = (NCformat *) A->Store;
+ Bstore = (NCformat *) B->Store;
+ Bstore->nnz = nnz = Astore->nnz;
+ for (i = 0; i < nnz; ++i)
+ ((doublecomplex *)Bstore->nzval)[i] = ((doublecomplex *)Astore->nzval)[i];
+ for (i = 0; i < nnz; ++i) Bstore->rowind[i] = Astore->rowind[i];
+ for (i = 0; i <= ncol; ++i) Bstore->colptr[i] = Astore->colptr[i];
+}
+
+
+void
+zCreate_Dense_Matrix(SuperMatrix *X, int m, int n, doublecomplex *x, int ldx,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ DNformat *Xstore;
+
+ X->Stype = stype;
+ X->Dtype = dtype;
+ X->Mtype = mtype;
+ X->nrow = m;
+ X->ncol = n;
+ X->Store = (void *) SUPERLU_MALLOC( sizeof(DNformat) );
+ if ( !(X->Store) ) ABORT("SUPERLU_MALLOC fails for X->Store");
+ Xstore = (DNformat *) X->Store;
+ Xstore->lda = ldx;
+ Xstore->nzval = (doublecomplex *) x;
+}
+
+void
+zCopy_Dense_Matrix(int M, int N, doublecomplex *X, int ldx,
+ doublecomplex *Y, int ldy)
+{
+/*
+ *
+ * Purpose
+ * =======
+ *
+ * Copies a two-dimensional matrix X to another matrix Y.
+ */
+ int i, j;
+
+ for (j = 0; j < N; ++j)
+ for (i = 0; i < M; ++i)
+ Y[i + j*ldy] = X[i + j*ldx];
+}
+
+void
+zCreate_SuperNode_Matrix(SuperMatrix *L, int m, int n, int nnz,
+ doublecomplex *nzval, int *nzval_colptr, int *rowind,
+ int *rowind_colptr, int *col_to_sup, int *sup_to_col,
+ Stype_t stype, Dtype_t dtype, Mtype_t mtype)
+{
+ SCformat *Lstore;
+
+ L->Stype = stype;
+ L->Dtype = dtype;
+ L->Mtype = mtype;
+ L->nrow = m;
+ L->ncol = n;
+ L->Store = (void *) SUPERLU_MALLOC( sizeof(SCformat) );
+ if ( !(L->Store) ) ABORT("SUPERLU_MALLOC fails for L->Store");
+ Lstore = L->Store;
+ Lstore->nnz = nnz;
+ Lstore->nsuper = col_to_sup[n];
+ Lstore->nzval = nzval;
+ Lstore->nzval_colptr = nzval_colptr;
+ Lstore->rowind = rowind;
+ Lstore->rowind_colptr = rowind_colptr;
+ Lstore->col_to_sup = col_to_sup;
+ Lstore->sup_to_col = sup_to_col;
+
+}
+
+
+/*
+ * Convert a row compressed storage into a column compressed storage.
+ */
+void
+zCompRow_to_CompCol(int m, int n, int nnz,
+ doublecomplex *a, int *colind, int *rowptr,
+ doublecomplex **at, int **rowind, int **colptr)
+{
+ register int i, j, col, relpos;
+ int *marker;
+
+ /* Allocate storage for another copy of the matrix. */
+ *at = (doublecomplex *) doublecomplexMalloc(nnz);
+ *rowind = (int *) intMalloc(nnz);
+ *colptr = (int *) intMalloc(n+1);
+ marker = (int *) intCalloc(n);
+
+ /* Get counts of each column of A, and set up column pointers */
+ for (i = 0; i < m; ++i)
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) ++marker[colind[j]];
+ (*colptr)[0] = 0;
+ for (j = 0; j < n; ++j) {
+ (*colptr)[j+1] = (*colptr)[j] + marker[j];
+ marker[j] = (*colptr)[j];
+ }
+
+ /* Transfer the matrix into the compressed column storage. */
+ for (i = 0; i < m; ++i) {
+ for (j = rowptr[i]; j < rowptr[i+1]; ++j) {
+ col = colind[j];
+ relpos = marker[col];
+ (*rowind)[relpos] = i;
+ (*at)[relpos] = a[j];
+ ++marker[col];
+ }
+ }
+
+ SUPERLU_FREE(marker);
+}
+
+
+void
+zPrint_CompCol_Matrix(char *what, SuperMatrix *A)
+{
+ NCformat *Astore;
+ register int i,n;
+ double *dp;
+
+ printf("\nCompCol matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (NCformat *) A->Store;
+ dp = (double *) Astore->nzval;
+ printf("nrow %d, ncol %d, nnz %d\n", A->nrow,A->ncol,Astore->nnz);
+ printf("nzval: ");
+ for (i = 0; i < 2*Astore->colptr[n]; ++i) printf("%f ", dp[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->colptr[n]; ++i) printf("%d ", Astore->rowind[i]);
+ printf("\ncolptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->colptr[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+zPrint_SuperNode_Matrix(char *what, SuperMatrix *A)
+{
+ SCformat *Astore;
+ register int i, j, k, c, d, n, nsup;
+ double *dp;
+ int *col_to_sup, *sup_to_col, *rowind, *rowind_colptr;
+
+ printf("\nSuperNode matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ n = A->ncol;
+ Astore = (SCformat *) A->Store;
+ dp = (double *) Astore->nzval;
+ col_to_sup = Astore->col_to_sup;
+ sup_to_col = Astore->sup_to_col;
+ rowind_colptr = Astore->rowind_colptr;
+ rowind = Astore->rowind;
+ printf("nrow %d, ncol %d, nnz %d, nsuper %d\n",
+ A->nrow,A->ncol,Astore->nnz,Astore->nsuper);
+ printf("nzval:\n");
+ for (k = 0; k <= Astore->nsuper; ++k) {
+ c = sup_to_col[k];
+ nsup = sup_to_col[k+1] - c;
+ for (j = c; j < c + nsup; ++j) {
+ d = Astore->nzval_colptr[j];
+ for (i = rowind_colptr[c]; i < rowind_colptr[c+1]; ++i) {
+ printf("%d\t%d\t%e\t%e\n", rowind[i], j, dp[d++], dp[d++]);
+ }
+ }
+ }
+#if 0
+ for (i = 0; i < 2*Astore->nzval_colptr[n]; ++i) printf("%f ", dp[i]);
+#endif
+ printf("\nnzval_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->nzval_colptr[i]);
+ printf("\nrowind: ");
+ for (i = 0; i < Astore->rowind_colptr[n]; ++i)
+ printf("%d ", Astore->rowind[i]);
+ printf("\nrowind_colptr: ");
+ for (i = 0; i <= n; ++i) printf("%d ", Astore->rowind_colptr[i]);
+ printf("\ncol_to_sup: ");
+ for (i = 0; i < n; ++i) printf("%d ", col_to_sup[i]);
+ printf("\nsup_to_col: ");
+ for (i = 0; i <= Astore->nsuper+1; ++i)
+ printf("%d ", sup_to_col[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void
+zPrint_Dense_Matrix(char *what, SuperMatrix *A)
+{
+ DNformat *Astore;
+ register int i;
+ double *dp;
+
+ printf("\nDense matrix %s:\n", what);
+ printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype);
+ Astore = (DNformat *) A->Store;
+ dp = (double *) Astore->nzval;
+ printf("nrow %d, ncol %d, lda %d\n", A->nrow,A->ncol,Astore->lda);
+ printf("\nnzval: ");
+ for (i = 0; i < 2*A->nrow; ++i) printf("%f ", dp[i]);
+ printf("\n");
+ fflush(stdout);
+}
+
+/*
+ * Diagnostic print of column "jcol" in the U/L factor.
+ */
+void
+zprint_lu_col(char *msg, int jcol, int pivrow, int *xprune, GlobalLU_t *Glu)
+{
+ int i, k, fsupc;
+ int *xsup, *supno;
+ int *xlsub, *lsub;
+ doublecomplex *lusup;
+ int *xlusup;
+ doublecomplex *ucol;
+ int *usub, *xusub;
+
+ xsup = Glu->xsup;
+ supno = Glu->supno;
+ lsub = Glu->lsub;
+ xlsub = Glu->xlsub;
+ lusup = Glu->lusup;
+ xlusup = Glu->xlusup;
+ ucol = Glu->ucol;
+ usub = Glu->usub;
+ xusub = Glu->xusub;
+
+ printf("%s", msg);
+ printf("col %d: pivrow %d, supno %d, xprune %d\n",
+ jcol, pivrow, supno[jcol], xprune[jcol]);
+
+ printf("\tU-col:\n");
+ for (i = xusub[jcol]; i < xusub[jcol+1]; i++)
+ printf("\t%d%10.4f, %10.4f\n", usub[i], ucol[i].r, ucol[i].i);
+ printf("\tL-col in rectangular snode:\n");
+ fsupc = xsup[supno[jcol]]; /* first col of the snode */
+ i = xlsub[fsupc];
+ k = xlusup[jcol];
+ while ( i < xlsub[fsupc+1] && k < xlusup[jcol+1] ) {
+ printf("\t%d\t%10.4f, %10.4f\n", lsub[i], lusup[k].r, lusup[k].i);
+ i++; k++;
+ }
+ fflush(stdout);
+}
+
+
+/*
+ * Check whether tempv[] == 0. This should be true before and after
+ * calling any numeric routines, i.e., "panel_bmod" and "column_bmod".
+ */
+void zcheck_tempv(int n, doublecomplex *tempv)
+{
+ int i;
+
+ for (i = 0; i < n; i++) {
+ if ((tempv[i].r != 0.0) || (tempv[i].i != 0.0))
+ {
+ fprintf(stderr,"tempv[%d] = {%f, %f}\n", i, tempv[i].r, tempv[i].i);
+ ABORT("zcheck_tempv");
+ }
+ }
+}
+
+
+void
+zGenXtrue(int n, int nrhs, doublecomplex *x, int ldx)
+{
+ int i, j;
+ for (j = 0; j < nrhs; ++j)
+ for (i = 0; i < n; ++i) {
+ x[i + j*ldx].r = 1.0;
+ x[i + j*ldx].i = 0.0;
+ }
+}
+
+/*
+ * Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's
+ */
+void
+zFillRHS(trans_t trans, int nrhs, doublecomplex *x, int ldx,
+ SuperMatrix *A, SuperMatrix *B)
+{
+ NCformat *Astore;
+ doublecomplex *Aval;
+ DNformat *Bstore;
+ doublecomplex *rhs;
+ doublecomplex one = {1.0, 0.0};
+ doublecomplex zero = {0.0, 0.0};
+ int ldc;
+ char transc[1];
+
+ Astore = A->Store;
+ Aval = (doublecomplex *) Astore->nzval;
+ Bstore = B->Store;
+ rhs = Bstore->nzval;
+ ldc = Bstore->lda;
+
+ if ( trans == NOTRANS ) *(unsigned char *)transc = 'N';
+ else *(unsigned char *)transc = 'T';
+
+ sp_zgemm(transc, "N", A->nrow, nrhs, A->ncol, one, A,
+ x, ldx, zero, rhs, ldc);
+
+}
+
+/*
+ * Fills a doublecomplex precision array with a given value.
+ */
+void
+zfill(doublecomplex *a, int alen, doublecomplex dval)
+{
+ register int i;
+ for (i = 0; i < alen; i++) a[i] = dval;
+}
+
+
+
+/*
+ * Check the inf-norm of the error vector
+ */
+void zinf_norm_error(int nrhs, SuperMatrix *X, doublecomplex *xtrue)
+{
+ DNformat *Xstore;
+ double err, xnorm;
+ doublecomplex *Xmat, *soln_work;
+ doublecomplex temp;
+ int i, j;
+
+ Xstore = X->Store;
+ Xmat = Xstore->nzval;
+
+ for (j = 0; j < nrhs; j++) {
+ soln_work = &Xmat[j*Xstore->lda];
+ err = xnorm = 0.0;
+ for (i = 0; i < X->nrow; i++) {
+ z_sub(&temp, &soln_work[i], &xtrue[i]);
+ err = SUPERLU_MAX(err, z_abs(&temp));
+ xnorm = SUPERLU_MAX(xnorm, z_abs(&soln_work[i]));
+ }
+ err = err / xnorm;
+ printf("||X - Xtrue||/||X|| = %e\n", err);
+ }
+}
+
+
+
+/* Print performance of the code. */
+void
+zPrintPerf(SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage,
+ double rpg, double rcond, double *ferr,
+ double *berr, char *equed, SuperLUStat_t *stat)
+{
+ SCformat *Lstore;
+ NCformat *Ustore;
+ double *utime;
+ flops_t *ops;
+
+ utime = stat->utime;
+ ops = stat->ops;
+
+ if ( utime[FACT] != 0. )
+ printf("Factor flops = %e\tMflops = %8.2f\n", ops[FACT],
+ ops[FACT]*1e-6/utime[FACT]);
+ printf("Identify relaxed snodes = %8.2f\n", utime[RELAX]);
+ if ( utime[SOLVE] != 0. )
+ printf("Solve flops = %.0f, Mflops = %8.2f\n", ops[SOLVE],
+ ops[SOLVE]*1e-6/utime[SOLVE]);
+
+ Lstore = (SCformat *) L->Store;
+ Ustore = (NCformat *) U->Store;
+ printf("\tNo of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("\tNo of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("\tNo of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz);
+
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage->for_lu/1e6, mem_usage->total_needed/1e6,
+ mem_usage->expansions);
+
+ printf("\tFactor\tMflops\tSolve\tMflops\tEtree\tEquil\tRcond\tRefine\n");
+ printf("PERF:%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f\n",
+ utime[FACT], ops[FACT]*1e-6/utime[FACT],
+ utime[SOLVE], ops[SOLVE]*1e-6/utime[SOLVE],
+ utime[ETREE], utime[EQUIL], utime[RCOND], utime[REFINE]);
+
+ printf("\tRpg\t\tRcond\t\tFerr\t\tBerr\t\tEquil?\n");
+ printf("NUM:\t%e\t%e\t%e\t%e\t%s\n",
+ rpg, rcond, ferr[0], berr[0], equed);
+
+}
+
+
+
+
+print_doublecomplex_vec(char *what, int n, doublecomplex *vec)
+{
+ int i;
+ printf("%s: n %d\n", what, n);
+ for (i = 0; i < n; ++i) printf("%d\t%f%f\n", i, vec[i].r, vec[i].i);
+ return 0;
+}
+
diff --git a/TESTING/MATGEN/Cnames.h b/TESTING/MATGEN/Cnames.h
new file mode 120000
index 0000000..0398527
--- /dev/null
+++ b/TESTING/MATGEN/Cnames.h
@@ -0,0 +1 @@
+../../SRC/Cnames.h
\ No newline at end of file
diff --git a/TESTING/MATGEN/Cnames.h.bak b/TESTING/MATGEN/Cnames.h.bak
new file mode 100644
index 0000000..28eecfa
--- /dev/null
+++ b/TESTING/MATGEN/Cnames.h.bak
@@ -0,0 +1,197 @@
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 1, 1997
+ *
+ */
+#ifndef __SUPERLU_CNAMES /* allow multiple inclusions */
+#define __SUPERLU_CNAMES
+
+/*
+ * These macros define how C routines will be called. ADD_ assumes that
+ * they will be called by fortran, which expects C routines to have an
+ * underscore postfixed to the name (Suns, and the Intel expect this).
+ * NOCHANGE indicates that fortran will be calling, and that it expects
+ * the name called by fortran to be identical to that compiled by the C
+ * (RS6K's do this). UPCASE says it expects C routines called by fortran
+ * to be in all upcase (CRAY wants this).
+ */
+
+#define ADD_ 0
+#define NOCHANGE 1
+#define UPCASE 2
+#define C_CALL 3
+
+#ifdef UpCase
+#define F77_CALL_C UPCASE
+#endif
+
+#ifdef NoChange
+#define F77_CALL_C NOCHANGE
+#endif
+
+#ifdef Add_
+#define F77_CALL_C ADD_
+#endif
+
+#ifndef F77_CALL_C
+#define F77_CALL_C ADD_
+#endif
+
+#if (F77_CALL_C == ADD_)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * No redefinition necessary to have following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void dgemm_(...)
+ *
+ * This is the default.
+ */
+
+#endif
+
+#if (F77_CALL_C == UPCASE)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void DGEMM(...)
+ */
+#define sasum_ SASUM
+#define isamax_ ISAMAX
+#define scopy_ SCOPY
+#define sscal_ SSCAL
+#define sger_ SGER
+#define snrm2_ SNRM2
+#define ssymv_ SSYMV
+#define sdot_ SDOT
+#define saxpy_ SAXPY
+#define ssyr2_ SSYR2
+#define srot_ SROT
+#define sgemv_ SGEMV
+#define strsv_ STRSV
+#define sgemm_ SGEMM
+#define strsm_ STRSM
+
+#define dasum_ SASUM
+#define idamax_ ISAMAX
+#define dcopy_ SCOPY
+#define dscal_ SSCAL
+#define dger_ SGER
+#define dnrm2_ SNRM2
+#define dsymv_ SSYMV
+#define ddot_ SDOT
+#define daxpy_ SAXPY
+#define dsyr2_ SSYR2
+#define drot_ SROT
+#define dgemv_ SGEMV
+#define dtrsv_ STRSV
+#define dgemm_ SGEMM
+#define dtrsm_ STRSM
+
+#define scasum_ SCASUM
+#define icamax_ ICAMAX
+#define ccopy_ CCOPY
+#define cscal_ CSCAL
+#define scnrm2_ SCNRM2
+#define caxpy_ CAXPY
+#define cgemv_ CGEMV
+#define ctrsv_ CTRSV
+#define cgemm_ CGEMM
+#define ctrsm_ CTRSM
+#define cgerc_ CGERC
+#define chemv_ CHEMV
+#define cher2_ CHER2
+
+#define dzasum_ SCASUM
+#define izamax_ ICAMAX
+#define zcopy_ CCOPY
+#define zscal_ CSCAL
+#define dznrm2_ SCNRM2
+#define zaxpy_ CAXPY
+#define zgemv_ CGEMV
+#define ztrsv_ CTRSV
+#define zgemm_ CGEMM
+#define ztrsm_ CTRSM
+#define zgerc_ CGERC
+#define zhemv_ CHEMV
+#define zher2_ CHER2
+
+#define c_bridge_dgssv_ C_BRIDGE_DGSSV
+#endif
+
+#if (F77_CALL_C == NOCHANGE)
+/*
+ * These defines set up the naming scheme required to have a fortran 77
+ * routine call a C routine
+ * for following Fortran to C interface:
+ * FORTRAN CALL C DECLARATION
+ * call dgemm(...) void dgemm(...)
+ */
+#define sasum_ sasum
+#define isamax_ isamax
+#define scopy_ scopy
+#define sscal_ sscal
+#define sger_ sger
+#define snrm2_ snrm2
+#define ssymv_ ssymv
+#define sdot_ sdot
+#define saxpy_ saxpy
+#define ssyr2_ ssyr2
+#define srot_ srot
+#define sgemv_ sgemv
+#define strsv_ strsv
+#define sgemm_ sgemm
+#define strsm_ strsm
+
+#define dasum_ dasum
+#define idamax_ idamax
+#define dcopy_ dcopy
+#define dscal_ dscal
+#define dger_ dger
+#define dnrm2_ dnrm2
+#define dsymv_ dsymv
+#define ddot_ ddot
+#define daxpy_ daxpy
+#define dsyr2_ dsyr2
+#define drot_ drot
+#define dgemv_ dgemv
+#define dtrsv_ dtrsv
+#define dgemm_ dgemm
+#define dtrsm_ dtrsm
+
+#define scasum_ scasum
+#define icamax_ icamax
+#define ccopy_ ccopy
+#define cscal_ cscal
+#define scnrm2_ scnrm2
+#define caxpy_ caxpy
+#define cgemv_ cgemv
+#define ctrsv_ ctrsv
+#define cgemm_ cgemm
+#define ctrsm_ ctrsm
+#define cgerc_ cgerc
+#define chemv_ chemv
+#define cher2_ cher2
+
+#define dzasum_ dzasum
+#define izamax_ izamax
+#define zcopy_ zcopy
+#define zscal_ zscal
+#define dznrm2_ dznrm2
+#define zaxpy_ zaxpy
+#define zgemv_ zgemv
+#define ztrsv_ ztrsv
+#define zgemm_ zgemm
+#define ztrsm_ ztrsm
+#define zgerc_ zgerc
+#define zhemv_ zhemv
+#define zher2_ zher2
+
+#define c_bridge_dgssv_ c_bridge_dgssv
+#endif
+
+#endif /* __SUPERLU_CNAMES */
diff --git a/TESTING/MATGEN/Makefile b/TESTING/MATGEN/Makefile
new file mode 100644
index 0000000..b40dfbb
--- /dev/null
+++ b/TESTING/MATGEN/Makefile
@@ -0,0 +1,81 @@
+include ../../make.inc
+
+#######################################################################
+# This is the makefile to create a library of the test matrix
+# generators used in LAPACK. The files are organized as follows:
+#
+# SCATGEN -- Auxiliary routines called from both REAL and COMPLEX
+# DZATGEN -- Auxiliary routines called from both DOUBLE PRECISION
+# and COMPLEX*16
+# SMATGEN -- Single precision real matrix generation routines
+# CMATGEN -- Single precision complex matrix generation routines
+# DMATGEN -- Double precision real matrix generation routines
+# ZMATGEN -- Double precision complex matrix generation routines
+#
+# The library can be set up to include routines for any combination
+# of the four precisions. To create or add to the library, enter make
+# followed by one or more of the precisions desired. Some examples:
+# make single
+# make single complex
+# make single double complex complex16
+# Alternatively, the command
+# make
+# without any arguments creates a library of all four precisions.
+# The library is called
+# tmglib.a
+# and is created at the LAPACK directory level.
+#
+# To remove the object files after the library is created, enter
+# make clean
+#
+#######################################################################
+ALLAUX = lsamen.o
+
+SCATGEN = slatm1.o slaran.o slarnd.o slaruv.o slabad.o slarnv.o
+SLASRC = slatb4.o slaset.o slartg.o
+SMATGEN = slatms.o slatme.o slatmr.o \
+ slagge.o slagsy.o slarge.o slaror.o slarot.o slatm2.o slatm3.o
+SINTRINSIC = r_lg10.o r_sign.o pow_dd.o
+
+DZATGEN = dlatm1.o dlaran.o dlarnd.o dlaruv.o dlabad.o dlarnv.o
+DLASRC = dlatb4.o dlaset.o dlartg.o
+DMATGEN = dlatms.o dlatme.o dlatmr.o \
+ dlagge.o dlagsy.o dlarge.o dlaror.o dlarot.o dlatm2.o dlatm3.o
+DINTRINSIC = d_lg10.o d_sign.o pow_dd.o
+
+CLASRC = clatb4.o claset.o clartg.o clarnv.o clacgv.o csymv.o
+CMATGEN = clatms.o clatme.o clatmr.o \
+ clagge.o clagsy.o clarge.o claror.o clarot.o clatm2.o clatm3.o \
+ claghe.o clarnd.o cdotc.o
+
+ZLASRC = zlatb4.o zlaset.o zlartg.o zlarnv.o zlacgv.o zsymv.o
+ZMATGEN = zlatms.o zlatme.o zlatmr.o \
+ zlagge.o zlagsy.o zlarge.o zlaror.o zlarot.o zlatm2.o zlatm3.o \
+ zlaghe.o zlarnd.o zdotc.o
+
+all: single double complex complex16
+
+single: $(SMATGEN) $(SCATGEN) $(SLASRC) $(SINTRINSIC) $(ALLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(TMGLIB) $(SMATGEN) $(SCATGEN) \
+ $(SLASRC) $(SINTRINSIC) $(ALLAUX)
+ $(RANLIB) ../$(TMGLIB)
+
+double: $(DMATGEN) $(DZATGEN) $(DLASRC) $(DINTRINSIC) $(ALLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(TMGLIB) $(DMATGEN) $(DZATGEN) \
+ $(DLASRC) $(DINTRINSIC) $(ALLAUX)
+ $(RANLIB) ../$(TMGLIB)
+
+complex: $(CMATGEN) $(SCATGEN) $(CLASRC) $(SINTRINSIC) $(ALLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(TMGLIB) $(CMATGEN) $(SCATGEN) \
+ $(CLASRC) $(SINTRINSIC) $(ALLAUX)
+ $(RANLIB) ../$(TMGLIB)
+
+complex16: $(ZMATGEN) $(DZATGEN) $(ZLASRC) $(DINSTRINSIC) $(ALLAUX)
+ $(ARCH) $(ARCHFLAGS) ../$(TMGLIB) $(ZMATGEN) $(DZATGEN) \
+ $(ZLASRC) $(DINTRINSIC) $(ALLAUX)
+ $(RANLIB) ../$(TMGLIB)
+
+clean:
+ rm -f *.o ../$(TMGLIB)
+
+.c.o: ; $(CC) $(CFLAGS) $(CDEFS) -c $<
diff --git a/TESTING/MATGEN/cdotc.c b/TESTING/MATGEN/cdotc.c
new file mode 100644
index 0000000..c7a153f
--- /dev/null
+++ b/TESTING/MATGEN/cdotc.c
@@ -0,0 +1,87 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Complex */ VOID cdotc_(complex * ret_val, integer *n, complex *cx, integer
+ *incx, complex *cy, integer *incy)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer i;
+ static complex ctemp;
+ static integer ix, iy;
+
+
+/* forms the dot product of two vectors, conjugating the first
+ vector.
+ jack dongarra, linpack, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+
+ Parameter adjustments */
+ --cy;
+ --cx;
+
+ /* Function Body */
+ ctemp.r = 0.f, ctemp.i = 0.f;
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ if (*n <= 0) {
+ return ;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ r_cnjg(&q__3, &cx[ix]);
+ i__2 = iy;
+ q__2.r = q__3.r * cy[iy].r - q__3.i * cy[iy].i, q__2.i = q__3.r *
+ cy[iy].i + q__3.i * cy[iy].r;
+ q__1.r = ctemp.r + q__2.r, q__1.i = ctemp.i + q__2.i;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ r_cnjg(&q__3, &cx[i]);
+ i__2 = i;
+ q__2.r = q__3.r * cy[i].r - q__3.i * cy[i].i, q__2.i = q__3.r *
+ cy[i].i + q__3.i * cy[i].r;
+ q__1.r = ctemp.r + q__2.r, q__1.i = ctemp.i + q__2.i;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+/* L30: */
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+} /* cdotc_ */
+
diff --git a/TESTING/MATGEN/clacgv.c b/TESTING/MATGEN/clacgv.c
new file mode 100644
index 0000000..4525fd4
--- /dev/null
+++ b/TESTING/MATGEN/clacgv.c
@@ -0,0 +1,76 @@
+#include "f2c.h"
+
+/* Subroutine */ int clacgv_(integer *n, complex *x, integer *incx)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ CLACGV conjugates a complex vector of length N.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The length of the vector X. N >= 0.
+
+ X (input/output) COMPLEX array, dimension
+ (1+(N-1)*abs(INCX))
+ On entry, the vector of length N to be conjugated.
+ On exit, X is overwritten with conjg(X).
+
+ INCX (input) INTEGER
+ The spacing between successive elements of X.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2;
+ complex q__1;
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+ /* Local variables */
+ static integer ioff, i;
+
+
+#define X(I) x[(I)-1]
+
+
+ if (*incx == 1) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ r_cnjg(&q__1, &X(i));
+ X(i).r = q__1.r, X(i).i = q__1.i;
+/* L10: */
+ }
+ } else {
+ ioff = 1;
+ if (*incx < 0) {
+ ioff = 1 - (*n - 1) * *incx;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = ioff;
+ r_cnjg(&q__1, &X(ioff));
+ X(ioff).r = q__1.r, X(ioff).i = q__1.i;
+ ioff += *incx;
+/* L20: */
+ }
+ }
+ return 0;
+
+/* End of CLACGV */
+
+} /* clacgv_ */
+
diff --git a/TESTING/MATGEN/clagge.c b/TESTING/MATGEN/clagge.c
new file mode 100644
index 0000000..898a234
--- /dev/null
+++ b/TESTING/MATGEN/clagge.c
@@ -0,0 +1,464 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static complex c_b2 = {1.f,0.f};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int clagge_(integer *m, integer *n, integer *kl, integer *ku,
+ real *d, complex *a, integer *lda, integer *iseed, complex *work,
+ integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublereal d__1;
+ complex q__1;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void c_div(complex *, complex *, complex *);
+
+ /* Local variables */
+ static integer i, j;
+ extern /* Subroutine */ int cgerc_(integer *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, integer *),
+ cscal_(integer *, complex *, complex *, integer *), cgemv_(char *
+ , integer *, integer *, complex *, complex *, integer *, complex *
+ , integer *, complex *, complex *, integer *);
+ extern real scnrm2_(integer *, complex *, integer *);
+ static complex wa, wb;
+ extern /* Subroutine */ int clacgv_(integer *, complex *, integer *);
+ static real wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), clarnv_(
+ integer *, integer *, integer *, complex *);
+ static complex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLAGGE generates a complex general m by n matrix A, by pre- and post-
+
+ multiplying a real diagonal matrix D with random unitary matrices:
+ A = U*D*V. The lower and upper bandwidths may then be reduced to
+ kl and ku by additional unitary transformations.
+
+ Arguments
+ =========
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ KL (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= KL <= M-1.
+
+ KU (input) INTEGER
+ The number of nonzero superdiagonals within the band of A.
+ 0 <= KU <= N-1.
+
+ D (input) REAL array, dimension (min(M,N))
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) COMPLEX array, dimension (LDA,N)
+ The generated m by n matrix A.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= M.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX array, dimension (M+N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*m < 0) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (*kl < 0 || *kl > *m - 1) {
+ *info = -3;
+ } else if (*ku < 0 || *ku > *n - 1) {
+ *info = -4;
+ } else if (*lda < max(1,*m)) {
+ *info = -7;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("CLAGGE", &i__1);
+ return 0;
+ }
+
+/* initialize A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = min(*m,*n);
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i + i * a_dim1;
+ i__3 = i;
+ a[i__2].r = d[i__3], a[i__2].i = 0.f;
+/* L30: */
+ }
+
+/* pre- and post-multiply A by random unitary matrices */
+
+ for (i = min(*m,*n); i >= 1; --i) {
+ if (i < *m) {
+
+/* generate random reflection */
+
+ i__1 = *m - i + 1;
+ clarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *m - i + 1;
+ wn = scnrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / c_abs(&work[1]);
+ q__1.r = d__1 * work[1].r, q__1.i = d__1 * work[1].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ q__1.r = work[1].r + wa.r, q__1.i = work[1].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__1 = *m - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__1, &q__1, &work[2], &c__1);
+ work[1].r = 1.f, work[1].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the lef
+t */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ cgemv_("Conjugate transpose", &i__1, &i__2, &c_b2, &a[i + i *
+ a_dim1], lda, &work[1], &c__1, &c_b1, &work[*m + 1], &
+ c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__1, &i__2, &q__1, &work[1], &c__1, &work[*m + 1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+ if (i < *n) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ clarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = scnrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / c_abs(&work[1]);
+ q__1.r = d__1 * work[1].r, q__1.i = d__1 * work[1].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ q__1.r = work[1].r + wa.r, q__1.i = work[1].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__1 = *n - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__1, &q__1, &work[2], &c__1);
+ work[1].r = 1.f, work[1].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the rig
+ht */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ cgemv_("No transpose", &i__1, &i__2, &c_b2, &a[i + i * a_dim1],
+ lda, &work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__1, &i__2, &q__1, &work[*n + 1], &c__1, &work[1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to KL and number of superdiagonals
+ to KU
+
+ Computing MAX */
+ i__2 = *m - 1 - *kl, i__3 = *n - 1 - *ku;
+ i__1 = max(i__2,i__3);
+ for (i = 1; i <= i__1; ++i) {
+ if (*kl <= *ku) {
+
+/* annihilate subdiagonal elements first (necessary if K
+L = 0)
+
+ Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = scnrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ d__1 = wn / c_abs(&a[*kl + i + i * a_dim1]);
+ i__2 = *kl + i + i * a_dim1;
+ q__1.r = d__1 * a[i__2].r, q__1.i = d__1 * a[i__2].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ i__2 = *kl + i + i * a_dim1;
+ q__1.r = a[i__2].r + wa.r, q__1.i = a[i__2].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__2 = *m - *kl - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__2, &q__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ i__2 = *kl + i + i * a_dim1;
+ a[i__2].r = 1.f, a[i__2].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ cgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*kl + i
+ + (i + 1) * a_dim1], lda, &a[*kl + i + i * a_dim1], &
+ c__1, &c_b1, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__2, &i__3, &q__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ i__2 = *kl + i + i * a_dim1;
+ q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ }
+
+/* Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = scnrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ d__1 = wn / c_abs(&a[i + (*ku + i) * a_dim1]);
+ i__2 = i + (*ku + i) * a_dim1;
+ q__1.r = d__1 * a[i__2].r, q__1.i = d__1 * a[i__2].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ i__2 = i + (*ku + i) * a_dim1;
+ q__1.r = a[i__2].r + wa.r, q__1.i = a[i__2].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__2 = *n - *ku - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__2, &q__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ a[i__2].r = 1.f, a[i__2].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *n - *ku - i + 1;
+ clacgv_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ cgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i + 1 + (*ku +
+ i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda, &
+ c_b1, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__2, &i__3, &q__1, &work[1], &c__1, &a[i + (*ku + i)
+ * a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ }
+ } else {
+
+/* annihilate superdiagonal elements first (necessary if
+
+ KU = 0)
+
+ Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = scnrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ d__1 = wn / c_abs(&a[i + (*ku + i) * a_dim1]);
+ i__2 = i + (*ku + i) * a_dim1;
+ q__1.r = d__1 * a[i__2].r, q__1.i = d__1 * a[i__2].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ i__2 = i + (*ku + i) * a_dim1;
+ q__1.r = a[i__2].r + wa.r, q__1.i = a[i__2].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__2 = *n - *ku - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__2, &q__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ a[i__2].r = 1.f, a[i__2].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *n - *ku - i + 1;
+ clacgv_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ cgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i + 1 + (*ku +
+ i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda, &
+ c_b1, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__2, &i__3, &q__1, &work[1], &c__1, &a[i + (*ku + i)
+ * a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ }
+
+/* Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = scnrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ d__1 = wn / c_abs(&a[*kl + i + i * a_dim1]);
+ i__2 = *kl + i + i * a_dim1;
+ q__1.r = d__1 * a[i__2].r, q__1.i = d__1 * a[i__2].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ i__2 = *kl + i + i * a_dim1;
+ q__1.r = a[i__2].r + wa.r, q__1.i = a[i__2].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__2 = *m - *kl - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__2, &q__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ i__2 = *kl + i + i * a_dim1;
+ a[i__2].r = 1.f, a[i__2].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ cgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*kl + i
+ + (i + 1) * a_dim1], lda, &a[*kl + i + i * a_dim1], &
+ c__1, &c_b1, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__2, &i__3, &q__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ i__2 = *kl + i + i * a_dim1;
+ q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ }
+ }
+
+ i__2 = *m;
+ for (j = *kl + i + 1; j <= i__2; ++j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L50: */
+ }
+
+ i__2 = *n;
+ for (j = *ku + i + 1; j <= i__2; ++j) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L60: */
+ }
+/* L70: */
+ }
+ return 0;
+
+/* End of CLAGGE */
+
+} /* clagge_ */
+
diff --git a/TESTING/MATGEN/claghe.c b/TESTING/MATGEN/claghe.c
new file mode 100644
index 0000000..7a8835e
--- /dev/null
+++ b/TESTING/MATGEN/claghe.c
@@ -0,0 +1,309 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static complex c_b2 = {1.f,0.f};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int claghe_(integer *n, integer *k, real *d, complex *a,
+ integer *lda, integer *iseed, complex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublereal d__1;
+ complex q__1, q__2, q__3, q__4;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void c_div(complex *, complex *, complex *), r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ extern /* Subroutine */ int cher2_(char *, integer *, complex *, complex *
+ , integer *, complex *, integer *, complex *, integer *);
+ static integer i, j;
+ extern /* Subroutine */ int cgerc_(integer *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, integer *);
+ static complex alpha;
+ extern /* Subroutine */ int cscal_(integer *, complex *, complex *,
+ integer *);
+ extern /* Complex */ VOID cdotc_(complex *, integer *, complex *, integer
+ *, complex *, integer *);
+ extern /* Subroutine */ int cgemv_(char *, integer *, integer *, complex *
+ , complex *, integer *, complex *, integer *, complex *, complex *
+ , integer *), chemv_(char *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, complex *,
+ integer *), caxpy_(integer *, complex *, complex *,
+ integer *, complex *, integer *);
+ extern real scnrm2_(integer *, complex *, integer *);
+ static complex wa, wb;
+ static real wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), clarnv_(
+ integer *, integer *, integer *, complex *);
+ static complex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLAGHE generates a complex hermitian matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with a random unitary matrix:
+ A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+
+ unitary transformations.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ K (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= K <= N-1.
+
+ D (input) REAL array, dimension (N)
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) COMPLEX array, dimension (LDA,N)
+ The generated n by n hermitian matrix A (the full matrix is
+ stored).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*k < 0 || *k > *n - 1) {
+ *info = -2;
+ } else if (*lda < max(1,*n)) {
+ *info = -5;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("CLAGHE", &i__1);
+ return 0;
+ }
+
+/* initialize lower triangle of A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i + i * a_dim1;
+ i__3 = i;
+ a[i__2].r = d[i__3], a[i__2].i = 0.f;
+/* L30: */
+ }
+
+/* Generate lower triangle of hermitian matrix */
+
+ for (i = *n - 1; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ clarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = scnrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / c_abs(&work[1]);
+ q__1.r = d__1 * work[1].r, q__1.i = d__1 * work[1].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ q__1.r = work[1].r + wa.r, q__1.i = work[1].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__1 = *n - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__1, &q__1, &work[2], &c__1);
+ work[1].r = 1.f, work[1].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply random reflection to A(i:n,i:n) from the left
+ and the right
+
+ compute y := tau * A * u */
+
+ i__1 = *n - i + 1;
+ chemv_("Lower", &i__1, &tau, &a[i + i * a_dim1], lda, &work[1], &c__1,
+ &c_b1, &work[*n + 1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ q__3.r = -.5f, q__3.i = 0.f;
+ q__2.r = q__3.r * tau.r - q__3.i * tau.i, q__2.i = q__3.r * tau.i +
+ q__3.i * tau.r;
+ i__1 = *n - i + 1;
+ cdotc_(&q__4, &i__1, &work[*n + 1], &c__1, &work[1], &c__1);
+ q__1.r = q__2.r * q__4.r - q__2.i * q__4.i, q__1.i = q__2.r * q__4.i
+ + q__2.i * q__4.r;
+ alpha.r = q__1.r, alpha.i = q__1.i;
+ i__1 = *n - i + 1;
+ caxpy_(&i__1, &alpha, &work[1], &c__1, &work[*n + 1], &c__1);
+
+/* apply the transformation as a rank-2 update to A(i:n,i:n) */
+
+ i__1 = *n - i + 1;
+ q__1.r = -1.f, q__1.i = 0.f;
+ cher2_("Lower", &i__1, &q__1, &work[1], &c__1, &work[*n + 1], &c__1, &
+ a[i + i * a_dim1], lda);
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to K */
+
+ i__1 = *n - 1 - *k;
+ for (i = 1; i <= i__1; ++i) {
+
+/* generate reflection to annihilate A(k+i+1:n,i) */
+
+ i__2 = *n - *k - i + 1;
+ wn = scnrm2_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ d__1 = wn / c_abs(&a[*k + i + i * a_dim1]);
+ i__2 = *k + i + i * a_dim1;
+ q__1.r = d__1 * a[i__2].r, q__1.i = d__1 * a[i__2].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ i__2 = *k + i + i * a_dim1;
+ q__1.r = a[i__2].r + wa.r, q__1.i = a[i__2].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__2 = *n - *k - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__2, &q__1, &a[*k + i + 1 + i * a_dim1], &c__1);
+ i__2 = *k + i + i * a_dim1;
+ a[i__2].r = 1.f, a[i__2].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply reflection to A(k+i:n,i+1:k+i-1) from the left */
+
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ cgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*k + i + (i + 1)
+ * a_dim1], lda, &a[*k + i + i * a_dim1], &c__1, &c_b1, &work[
+ 1], &c__1);
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__2, &i__3, &q__1, &a[*k + i + i * a_dim1], &c__1, &work[1],
+ &c__1, &a[*k + i + (i + 1) * a_dim1], lda);
+
+/* apply reflection to A(k+i:n,k+i:n) from the left and the rig
+ht
+
+ compute y := tau * A * u */
+
+ i__2 = *n - *k - i + 1;
+ chemv_("Lower", &i__2, &tau, &a[*k + i + (*k + i) * a_dim1], lda, &a[*
+ k + i + i * a_dim1], &c__1, &c_b1, &work[1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ q__3.r = -.5f, q__3.i = 0.f;
+ q__2.r = q__3.r * tau.r - q__3.i * tau.i, q__2.i = q__3.r * tau.i +
+ q__3.i * tau.r;
+ i__2 = *n - *k - i + 1;
+ cdotc_(&q__4, &i__2, &work[1], &c__1, &a[*k + i + i * a_dim1], &c__1);
+ q__1.r = q__2.r * q__4.r - q__2.i * q__4.i, q__1.i = q__2.r * q__4.i
+ + q__2.i * q__4.r;
+ alpha.r = q__1.r, alpha.i = q__1.i;
+ i__2 = *n - *k - i + 1;
+ caxpy_(&i__2, &alpha, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1)
+ ;
+
+/* apply hermitian rank-2 update to A(k+i:n,k+i:n) */
+
+ i__2 = *n - *k - i + 1;
+ q__1.r = -1.f, q__1.i = 0.f;
+ cher2_("Lower", &i__2, &q__1, &a[*k + i + i * a_dim1], &c__1, &work[1]
+ , &c__1, &a[*k + i + (*k + i) * a_dim1], lda);
+
+ i__2 = *k + i + i * a_dim1;
+ q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ i__2 = *n;
+ for (j = *k + i + 1; j <= i__2; ++j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L50: */
+ }
+/* L60: */
+ }
+
+/* Store full hermitian matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = j + i * a_dim1;
+ r_cnjg(&q__1, &a[i + j * a_dim1]);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L70: */
+ }
+/* L80: */
+ }
+ return 0;
+
+/* End of CLAGHE */
+
+} /* claghe_ */
+
diff --git a/TESTING/MATGEN/clagsy.c b/TESTING/MATGEN/clagsy.c
new file mode 100644
index 0000000..92ac859
--- /dev/null
+++ b/TESTING/MATGEN/clagsy.c
@@ -0,0 +1,363 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static complex c_b2 = {1.f,0.f};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int clagsy_(integer *n, integer *k, real *d, complex *a,
+ integer *lda, integer *iseed, complex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6, i__7, i__8,
+ i__9;
+ doublereal d__1;
+ complex q__1, q__2, q__3, q__4;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void c_div(complex *, complex *, complex *);
+
+ /* Local variables */
+ static integer i, j;
+ extern /* Subroutine */ int cgerc_(integer *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, integer *);
+ static complex alpha;
+ extern /* Subroutine */ int cscal_(integer *, complex *, complex *,
+ integer *);
+ extern /* Complex */ VOID cdotc_(complex *, integer *, complex *, integer
+ *, complex *, integer *);
+ extern /* Subroutine */ int cgemv_(char *, integer *, integer *, complex *
+ , complex *, integer *, complex *, integer *, complex *, complex *
+ , integer *), caxpy_(integer *, complex *, complex *,
+ integer *, complex *, integer *), csymv_(char *, integer *,
+ complex *, complex *, integer *, complex *, integer *, complex *,
+ complex *, integer *);
+ extern real scnrm2_(integer *, complex *, integer *);
+ static integer ii, jj;
+ static complex wa, wb;
+ extern /* Subroutine */ int clacgv_(integer *, complex *, integer *);
+ static real wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), clarnv_(
+ integer *, integer *, integer *, complex *);
+ static complex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLAGSY generates a complex symmetric matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with a random unitary matrix:
+ A = U*D*U**T. The semi-bandwidth may then be reduced to k by
+ additional unitary transformations.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ K (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= K <= N-1.
+
+ D (input) REAL array, dimension (N)
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) COMPLEX array, dimension (LDA,N)
+ The generated n by n symmetric matrix A (the full matrix is
+ stored).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*k < 0 || *k > *n - 1) {
+ *info = -2;
+ } else if (*lda < max(1,*n)) {
+ *info = -5;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("CLAGSY", &i__1);
+ return 0;
+ }
+
+/* initialize lower triangle of A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i + i * a_dim1;
+ i__3 = i;
+ a[i__2].r = d[i__3], a[i__2].i = 0.f;
+/* L30: */
+ }
+
+/* Generate lower triangle of symmetric matrix */
+
+ for (i = *n - 1; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ clarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = scnrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / c_abs(&work[1]);
+ q__1.r = d__1 * work[1].r, q__1.i = d__1 * work[1].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ q__1.r = work[1].r + wa.r, q__1.i = work[1].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__1 = *n - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__1, &q__1, &work[2], &c__1);
+ work[1].r = 1.f, work[1].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply random reflection to A(i:n,i:n) from the left
+ and the right
+
+ compute y := tau * A * conjg(u) */
+
+ i__1 = *n - i + 1;
+ clacgv_(&i__1, &work[1], &c__1);
+ i__1 = *n - i + 1;
+ csymv_("Lower", &i__1, &tau, &a[i + i * a_dim1], lda, &work[1], &c__1,
+ &c_b1, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ clacgv_(&i__1, &work[1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( u, y ) * u */
+
+ q__3.r = -.5f, q__3.i = 0.f;
+ q__2.r = q__3.r * tau.r - q__3.i * tau.i, q__2.i = q__3.r * tau.i +
+ q__3.i * tau.r;
+ i__1 = *n - i + 1;
+ cdotc_(&q__4, &i__1, &work[1], &c__1, &work[*n + 1], &c__1);
+ q__1.r = q__2.r * q__4.r - q__2.i * q__4.i, q__1.i = q__2.r * q__4.i
+ + q__2.i * q__4.r;
+ alpha.r = q__1.r, alpha.i = q__1.i;
+ i__1 = *n - i + 1;
+ caxpy_(&i__1, &alpha, &work[1], &c__1, &work[*n + 1], &c__1);
+
+/* apply the transformation as a rank-2 update to A(i:n,i:n)
+
+ CALL CSYR2( 'Lower', N-I+1, -ONE, WORK, 1, WORK( N+1 ), 1,
+
+ $ A( I, I ), LDA ) */
+
+ i__1 = *n;
+ for (jj = i; jj <= i__1; ++jj) {
+ i__2 = *n;
+ for (ii = jj; ii <= i__2; ++ii) {
+ i__3 = ii + jj * a_dim1;
+ i__4 = ii + jj * a_dim1;
+ i__5 = ii - i + 1;
+ i__6 = *n + jj - i + 1;
+ q__3.r = work[i__5].r * work[i__6].r - work[i__5].i * work[
+ i__6].i, q__3.i = work[i__5].r * work[i__6].i + work[
+ i__5].i * work[i__6].r;
+ q__2.r = a[i__4].r - q__3.r, q__2.i = a[i__4].i - q__3.i;
+ i__7 = *n + ii - i + 1;
+ i__8 = jj - i + 1;
+ q__4.r = work[i__7].r * work[i__8].r - work[i__7].i * work[
+ i__8].i, q__4.i = work[i__7].r * work[i__8].i + work[
+ i__7].i * work[i__8].r;
+ q__1.r = q__2.r - q__4.r, q__1.i = q__2.i - q__4.i;
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L40: */
+ }
+/* L50: */
+ }
+/* L60: */
+ }
+
+/* Reduce number of subdiagonals to K */
+
+ i__1 = *n - 1 - *k;
+ for (i = 1; i <= i__1; ++i) {
+
+/* generate reflection to annihilate A(k+i+1:n,i) */
+
+ i__2 = *n - *k - i + 1;
+ wn = scnrm2_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ d__1 = wn / c_abs(&a[*k + i + i * a_dim1]);
+ i__2 = *k + i + i * a_dim1;
+ q__1.r = d__1 * a[i__2].r, q__1.i = d__1 * a[i__2].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ i__2 = *k + i + i * a_dim1;
+ q__1.r = a[i__2].r + wa.r, q__1.i = a[i__2].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__2 = *n - *k - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__2, &q__1, &a[*k + i + 1 + i * a_dim1], &c__1);
+ i__2 = *k + i + i * a_dim1;
+ a[i__2].r = 1.f, a[i__2].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* apply reflection to A(k+i:n,i+1:k+i-1) from the left */
+
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ cgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*k + i + (i + 1)
+ * a_dim1], lda, &a[*k + i + i * a_dim1], &c__1, &c_b1, &work[
+ 1], &c__1);
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__2, &i__3, &q__1, &a[*k + i + i * a_dim1], &c__1, &work[1],
+ &c__1, &a[*k + i + (i + 1) * a_dim1], lda);
+
+/* apply reflection to A(k+i:n,k+i:n) from the left and the rig
+ht
+
+ compute y := tau * A * conjg(u) */
+
+ i__2 = *n - *k - i + 1;
+ clacgv_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ i__2 = *n - *k - i + 1;
+ csymv_("Lower", &i__2, &tau, &a[*k + i + (*k + i) * a_dim1], lda, &a[*
+ k + i + i * a_dim1], &c__1, &c_b1, &work[1], &c__1);
+ i__2 = *n - *k - i + 1;
+ clacgv_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( u, y ) * u */
+
+ q__3.r = -.5f, q__3.i = 0.f;
+ q__2.r = q__3.r * tau.r - q__3.i * tau.i, q__2.i = q__3.r * tau.i +
+ q__3.i * tau.r;
+ i__2 = *n - *k - i + 1;
+ cdotc_(&q__4, &i__2, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1);
+ q__1.r = q__2.r * q__4.r - q__2.i * q__4.i, q__1.i = q__2.r * q__4.i
+ + q__2.i * q__4.r;
+ alpha.r = q__1.r, alpha.i = q__1.i;
+ i__2 = *n - *k - i + 1;
+ caxpy_(&i__2, &alpha, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1)
+ ;
+
+/* apply symmetric rank-2 update to A(k+i:n,k+i:n)
+
+ CALL CSYR2( 'Lower', N-K-I+1, -ONE, A( K+I, I ), 1, WORK, 1,
+
+ $ A( K+I, K+I ), LDA ) */
+
+ i__2 = *n;
+ for (jj = *k + i; jj <= i__2; ++jj) {
+ i__3 = *n;
+ for (ii = jj; ii <= i__3; ++ii) {
+ i__4 = ii + jj * a_dim1;
+ i__5 = ii + jj * a_dim1;
+ i__6 = ii + i * a_dim1;
+ i__7 = jj - *k - i + 1;
+ q__3.r = a[i__6].r * work[i__7].r - a[i__6].i * work[i__7].i,
+ q__3.i = a[i__6].r * work[i__7].i + a[i__6].i * work[
+ i__7].r;
+ q__2.r = a[i__5].r - q__3.r, q__2.i = a[i__5].i - q__3.i;
+ i__8 = ii - *k - i + 1;
+ i__9 = jj + i * a_dim1;
+ q__4.r = work[i__8].r * a[i__9].r - work[i__8].i * a[i__9].i,
+ q__4.i = work[i__8].r * a[i__9].i + work[i__8].i * a[
+ i__9].r;
+ q__1.r = q__2.r - q__4.r, q__1.i = q__2.i - q__4.i;
+ a[i__4].r = q__1.r, a[i__4].i = q__1.i;
+/* L70: */
+ }
+/* L80: */
+ }
+
+ i__2 = *k + i + i * a_dim1;
+ q__1.r = -(doublereal)wa.r, q__1.i = -(doublereal)wa.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ i__2 = *n;
+ for (j = *k + i + 1; j <= i__2; ++j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+/* L90: */
+ }
+/* L100: */
+ }
+
+/* Store full symmetric matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = j + i * a_dim1;
+ i__4 = i + j * a_dim1;
+ a[i__3].r = a[i__4].r, a[i__3].i = a[i__4].i;
+/* L110: */
+ }
+/* L120: */
+ }
+ return 0;
+
+/* End of CLAGSY */
+
+} /* clagsy_ */
+
diff --git a/TESTING/MATGEN/clarge.c b/TESTING/MATGEN/clarge.c
new file mode 100644
index 0000000..7924697
--- /dev/null
+++ b/TESTING/MATGEN/clarge.c
@@ -0,0 +1,160 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static complex c_b2 = {1.f,0.f};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int clarge_(integer *n, complex *a, integer *lda, integer *
+ iseed, complex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1;
+ doublereal d__1;
+ complex q__1;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void c_div(complex *, complex *, complex *);
+
+ /* Local variables */
+ static integer i;
+ extern /* Subroutine */ int cgerc_(integer *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, integer *),
+ cscal_(integer *, complex *, complex *, integer *), cgemv_(char *
+ , integer *, integer *, complex *, complex *, integer *, complex *
+ , integer *, complex *, complex *, integer *);
+ extern real scnrm2_(integer *, complex *, integer *);
+ static complex wa, wb;
+ static real wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), clarnv_(
+ integer *, integer *, integer *, complex *);
+ static complex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLARGE pre- and post-multiplies a complex general n by n matrix A
+ with a random unitary matrix: A = U*D*U'.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ A (input/output) COMPLEX array, dimension (LDA,N)
+ On entry, the original n by n matrix A.
+ On exit, A is overwritten by U*A*U' for some random
+ unitary matrix U.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*lda < max(1,*n)) {
+ *info = -3;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("CLARGE", &i__1);
+ return 0;
+ }
+
+/* pre- and post-multiply A by random unitary matrix */
+
+ for (i = *n; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ clarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = scnrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / c_abs(&work[1]);
+ q__1.r = d__1 * work[1].r, q__1.i = d__1 * work[1].i;
+ wa.r = q__1.r, wa.i = q__1.i;
+ if (wn == 0.f) {
+ tau.r = 0.f, tau.i = 0.f;
+ } else {
+ q__1.r = work[1].r + wa.r, q__1.i = work[1].i + wa.i;
+ wb.r = q__1.r, wb.i = q__1.i;
+ i__1 = *n - i;
+ c_div(&q__1, &c_b2, &wb);
+ cscal_(&i__1, &q__1, &work[2], &c__1);
+ work[1].r = 1.f, work[1].i = 0.f;
+ c_div(&q__1, &wb, &wa);
+ d__1 = q__1.r;
+ tau.r = d__1, tau.i = 0.f;
+ }
+
+/* multiply A(i:n,1:n) by random reflection from the left */
+
+ i__1 = *n - i + 1;
+ cgemv_("Conjugate transpose", &i__1, n, &c_b2, &a[i + a_dim1], lda, &
+ work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&i__1, n, &q__1, &work[1], &c__1, &work[*n + 1], &c__1, &a[i +
+ a_dim1], lda);
+
+/* multiply A(1:n,i:n) by random reflection from the right */
+
+ i__1 = *n - i + 1;
+ cgemv_("No transpose", n, &i__1, &c_b2, &a[i * a_dim1 + 1], lda, &
+ work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(n, &i__1, &q__1, &work[*n + 1], &c__1, &work[1], &c__1, &a[i *
+ a_dim1 + 1], lda);
+/* L10: */
+ }
+ return 0;
+
+/* End of CLARGE */
+
+} /* clarge_ */
+
diff --git a/TESTING/MATGEN/clarnd.c b/TESTING/MATGEN/clarnd.c
new file mode 100644
index 0000000..a450c11
--- /dev/null
+++ b/TESTING/MATGEN/clarnd.c
@@ -0,0 +1,125 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Complex */ VOID clarnd_(complex * ret_val, integer *idist, integer *iseed)
+{
+ /* System generated locals */
+ doublereal d__1, d__2;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal);
+ void c_exp(complex *, complex *);
+
+ /* Local variables */
+ static real t1, t2;
+ extern doublereal slaran_(integer *);
+
+
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLARND returns a random complex number from a uniform or normal
+ distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: real and imaginary parts each uniform (0,1)
+ = 2: real and imaginary parts each uniform (-1,1)
+ = 3: real and imaginary parts each normal (0,1)
+ = 4: uniformly distributed on the disc abs(z) <= 1
+ = 5: uniformly distributed on the circle abs(z) = 1
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine SLARAN to generate a random
+
+ real number from a uniform (0,1) distribution. The Box-Muller method
+
+ is used to transform numbers from a uniform to a normal distribution.
+
+
+ =====================================================================
+
+
+
+ Generate a pair of real random numbers from a uniform (0,1)
+ distribution
+
+ Parameter adjustments */
+ --iseed;
+
+ /* Function Body */
+ t1 = slaran_(&iseed[1]);
+ t2 = slaran_(&iseed[1]);
+
+ if (*idist == 1) {
+
+/* real and imaginary parts each uniform (0,1) */
+
+ q__1.r = t1, q__1.i = t2;
+ ret_val->r = q__1.r, ret_val->i = q__1.i;
+ } else if (*idist == 2) {
+
+/* real and imaginary parts each uniform (-1,1) */
+
+ d__1 = t1 * 2.f - 1.f;
+ d__2 = t2 * 2.f - 1.f;
+ q__1.r = d__1, q__1.i = d__2;
+ ret_val->r = q__1.r, ret_val->i = q__1.i;
+ } else if (*idist == 3) {
+
+/* real and imaginary parts each normal (0,1) */
+
+ d__1 = sqrt(log(t1) * -2.f);
+ d__2 = t2 * 6.2831853071795864769252867663f;
+ q__3.r = 0.f, q__3.i = d__2;
+ c_exp(&q__2, &q__3);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ ret_val->r = q__1.r, ret_val->i = q__1.i;
+ } else if (*idist == 4) {
+
+/* uniform distribution on the unit disc abs(z) <= 1 */
+
+ d__1 = sqrt(t1);
+ d__2 = t2 * 6.2831853071795864769252867663f;
+ q__3.r = 0.f, q__3.i = d__2;
+ c_exp(&q__2, &q__3);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ ret_val->r = q__1.r, ret_val->i = q__1.i;
+ } else if (*idist == 5) {
+
+/* uniform distribution on the unit circle abs(z) = 1 */
+
+ d__1 = t2 * 6.2831853071795864769252867663f;
+ q__2.r = 0.f, q__2.i = d__1;
+ c_exp(&q__1, &q__2);
+ ret_val->r = q__1.r, ret_val->i = q__1.i;
+ }
+ return ;
+
+/* End of CLARND */
+
+} /* clarnd_ */
+
diff --git a/TESTING/MATGEN/clarnv.c b/TESTING/MATGEN/clarnv.c
new file mode 100644
index 0000000..45b1570
--- /dev/null
+++ b/TESTING/MATGEN/clarnv.c
@@ -0,0 +1,172 @@
+#include "f2c.h"
+
+/* Subroutine */ int clarnv_(integer *idist, integer *iseed, integer *n,
+ complex *x)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLARNV returns a vector of n random complex numbers from a uniform or
+
+ normal distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: real and imaginary parts each uniform (0,1)
+ = 2: real and imaginary parts each uniform (-1,1)
+ = 3: real and imaginary parts each normal (0,1)
+ = 4: uniformly distributed on the disc abs(z) < 1
+ = 5: uniformly distributed on the circle abs(z) = 1
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ N (input) INTEGER
+ The number of random numbers to be generated.
+
+ X (output) COMPLEX array, dimension (N)
+ The generated random numbers.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine SLARUV to generate random
+ real numbers from a uniform (0,1) distribution, in batches of up to
+ 128 using vectorisable code. The Box-Muller method is used to
+ transform numbers from a uniform to a normal distribution.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4, i__5;
+ doublereal d__1, d__2;
+ complex q__1, q__2, q__3;
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal);
+ void c_exp(complex *, complex *);
+ /* Local variables */
+ static integer i;
+ static real u[128];
+ static integer il, iv;
+ extern /* Subroutine */ int slaruv_(integer *, integer *, real *);
+
+
+#define X(I) x[(I)-1]
+#define ISEED(I) iseed[(I)-1]
+
+
+ i__1 = *n;
+ for (iv = 1; iv <= *n; iv += 64) {
+/* Computing MIN */
+ i__2 = 64, i__3 = *n - iv + 1;
+ il = min(i__2,i__3);
+
+/* Call SLARUV to generate 2*IL real numbers from a uniform (0,
+1)
+ distribution (2*IL <= LV) */
+
+ i__2 = il << 1;
+ slaruv_(&ISEED(1), &i__2, u);
+
+ if (*idist == 1) {
+
+/* Copy generated numbers */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ i__4 = (i << 1) - 2;
+ i__5 = (i << 1) - 1;
+ q__1.r = u[(i<<1)-2], q__1.i = u[(i<<1)-1];
+ X(iv+i-1).r = q__1.r, X(iv+i-1).i = q__1.i;
+/* L10: */
+ }
+ } else if (*idist == 2) {
+
+/* Convert generated numbers to uniform (-1,1) distribut
+ion */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = u[(i << 1) - 2] * 2.f - 1.f;
+ d__2 = u[(i << 1) - 1] * 2.f - 1.f;
+ q__1.r = d__1, q__1.i = d__2;
+ X(iv+i-1).r = q__1.r, X(iv+i-1).i = q__1.i;
+/* L20: */
+ }
+ } else if (*idist == 3) {
+
+/* Convert generated numbers to normal (0,1) distributio
+n */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = sqrt(log(u[(i << 1) - 2]) * -2.f);
+ d__2 = u[(i << 1) - 1] * 6.2831853071795864769252867663f;
+ q__3.r = 0.f, q__3.i = d__2;
+ c_exp(&q__2, &q__3);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ X(iv+i-1).r = q__1.r, X(iv+i-1).i = q__1.i;
+/* L30: */
+ }
+ } else if (*idist == 4) {
+
+/* Convert generated numbers to complex numbers uniforml
+y
+ distributed on the unit disk */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = sqrt(u[(i << 1) - 2]);
+ d__2 = u[(i << 1) - 1] * 6.2831853071795864769252867663f;
+ q__3.r = 0.f, q__3.i = d__2;
+ c_exp(&q__2, &q__3);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ X(iv+i-1).r = q__1.r, X(iv+i-1).i = q__1.i;
+/* L40: */
+ }
+ } else if (*idist == 5) {
+
+/* Convert generated numbers to complex numbers uniforml
+y
+ distributed on the unit circle */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = u[(i << 1) - 1] * 6.2831853071795864769252867663f;
+ q__2.r = 0.f, q__2.i = d__1;
+ c_exp(&q__1, &q__2);
+ X(iv+i-1).r = q__1.r, X(iv+i-1).i = q__1.i;
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ return 0;
+
+/* End of CLARNV */
+
+} /* clarnv_ */
+
diff --git a/TESTING/MATGEN/claror.c b/TESTING/MATGEN/claror.c
new file mode 100644
index 0000000..8b18c21
--- /dev/null
+++ b/TESTING/MATGEN/claror.c
@@ -0,0 +1,351 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static complex c_b2 = {1.f,0.f};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int claror_(char *side, char *init, integer *m, integer *n,
+ complex *a, integer *lda, integer *iseed, complex *x, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ complex q__1, q__2;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer kbeg, jcol;
+ static real xabs;
+ static integer irow, j;
+ extern /* Subroutine */ int cgerc_(integer *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, integer *),
+ cscal_(integer *, complex *, complex *, integer *);
+ extern logical lsame_(char *, char *);
+ extern /* Subroutine */ int cgemv_(char *, integer *, integer *, complex *
+ , complex *, integer *, complex *, integer *, complex *, complex *
+ , integer *);
+ static complex csign;
+ static integer ixfrm, itype, nxfrm;
+ static real xnorm;
+ extern real scnrm2_(integer *, complex *, integer *);
+ extern /* Subroutine */ int clacgv_(integer *, complex *, integer *);
+ extern /* Complex */ VOID clarnd_(complex *, integer *, integer *);
+ extern /* Subroutine */ int claset_(char *, integer *, integer *, complex
+ *, complex *, complex *, integer *), xerbla_(char *,
+ integer *);
+ static real factor;
+ static complex xnorms;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLAROR pre- or post-multiplies an M by N matrix A by a random
+ unitary matrix U, overwriting A. A may optionally be
+ initialized to the identity matrix before multiplying by U.
+ U is generated using the method of G.W. Stewart
+ ( SIAM J. Numer. Anal. 17, 1980, pp. 403-409 ).
+ (BLAS-2 version)
+
+ Arguments
+ =========
+
+ SIDE - CHARACTER*1
+ SIDE specifies whether A is multiplied on the left or right
+
+ by U.
+ SIDE = 'L' Multiply A on the left (premultiply) by U
+ SIDE = 'R' Multiply A on the right (postmultiply) by U*
+ SIDE = 'C' Multiply A on the left by U and the right by U*
+ SIDE = 'T' Multiply A on the left by U and the right by U'
+ Not modified.
+
+ INIT - CHARACTER*1
+ INIT specifies whether or not A should be initialized to
+ the identity matrix.
+ INIT = 'I' Initialize A to (a section of) the
+ identity matrix before applying U.
+ INIT = 'N' No initialization. Apply U to the
+ input matrix A.
+
+ INIT = 'I' may be used to generate square (i.e., unitary)
+ or rectangular orthogonal matrices (orthogonality being
+ in the sense of CDOTC):
+
+ For square matrices, M=N, and SIDE many be either 'L' or
+ 'R'; the rows will be orthogonal to each other, as will the
+
+ columns.
+ For rectangular matrices where M < N, SIDE = 'R' will
+ produce a dense matrix whose rows will be orthogonal and
+ whose columns will not, while SIDE = 'L' will produce a
+ matrix whose rows will be orthogonal, and whose first M
+ columns will be orthogonal, the remaining columns being
+ zero.
+ For matrices where M > N, just use the previous
+ explaination, interchanging 'L' and 'R' and "rows" and
+ "columns".
+
+ Not modified.
+
+ M - INTEGER
+ Number of rows of A. Not modified.
+
+ N - INTEGER
+ Number of columns of A. Not modified.
+
+ A - COMPLEX array, dimension ( LDA, N )
+ Input and output array. Overwritten by U A ( if SIDE = 'L' )
+
+ or by A U ( if SIDE = 'R' )
+ or by U A U* ( if SIDE = 'C')
+ or by U A U' ( if SIDE = 'T') on exit.
+
+ LDA - INTEGER
+ Leading dimension of A. Must be at least MAX ( 1, M ).
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. The array elements should be between 0 and 4095;
+
+ if not they will be reduced mod 4096. Also, ISEED(4) must
+ be odd. The random number generator uses a linear
+ congruential sequence limited to small integers, and so
+ should produce machine independent random numbers. The
+ values of ISEED are changed on exit, and can be used in the
+
+ next call to CLAROR to continue the same random number
+ sequence.
+ Modified.
+
+ X - COMPLEX array, dimension ( 3*MAX( M, N ) )
+ Workspace. Of length:
+ 2*M + N if SIDE = 'L',
+ 2*N + M if SIDE = 'R',
+ 3*N if SIDE = 'C' or 'T'.
+ Modified.
+
+ INFO - INTEGER
+ An error flag. It is set to:
+ 0 if no error.
+ 1 if CLARND returned a bad random number (installation
+ problem)
+ -1 if SIDE is not L, R, C, or T.
+ -3 if M is negative.
+ -4 if N is negative or if SIDE is C or T and N is not equal
+
+ to M.
+ -6 if LDA is less than M.
+
+ =====================================================================
+
+
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --x;
+
+ /* Function Body */
+ if (*n == 0 || *m == 0) {
+ return 0;
+ }
+
+ itype = 0;
+ if (lsame_(side, "L")) {
+ itype = 1;
+ } else if (lsame_(side, "R")) {
+ itype = 2;
+ } else if (lsame_(side, "C")) {
+ itype = 3;
+ } else if (lsame_(side, "T")) {
+ itype = 4;
+ }
+
+/* Check for argument errors. */
+
+ *info = 0;
+ if (itype == 0) {
+ *info = -1;
+ } else if (*m < 0) {
+ *info = -3;
+ } else if (*n < 0 || itype == 3 && *n != *m) {
+ *info = -4;
+ } else if (*lda < *m) {
+ *info = -6;
+ }
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("CLAROR", &i__1);
+ return 0;
+ }
+
+ if (itype == 1) {
+ nxfrm = *m;
+ } else {
+ nxfrm = *n;
+ }
+
+/* Initialize A to the identity matrix if desired */
+
+ if (lsame_(init, "I")) {
+ claset_("Full", m, n, &c_b1, &c_b2, &a[a_offset], lda);
+ }
+
+/* If no rotation possible, still multiply by
+ a random complex number from the circle |x| = 1
+
+ 2) Compute Rotation by computing Householder
+ Transformations H(2), H(3), ..., H(n). Note that the
+ order in which they are computed is irrelevant. */
+
+ i__1 = nxfrm;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ x[i__2].r = 0.f, x[i__2].i = 0.f;
+/* L40: */
+ }
+
+ i__1 = nxfrm;
+ for (ixfrm = 2; ixfrm <= i__1; ++ixfrm) {
+ kbeg = nxfrm - ixfrm + 1;
+
+/* Generate independent normal( 0, 1 ) random numbers */
+
+ i__2 = nxfrm;
+ for (j = kbeg; j <= i__2; ++j) {
+ i__3 = j;
+ clarnd_(&q__1, &c__3, &iseed[1]);
+ x[i__3].r = q__1.r, x[i__3].i = q__1.i;
+/* L50: */
+ }
+
+/* Generate a Householder transformation from the random vector
+ X */
+
+ xnorm = scnrm2_(&ixfrm, &x[kbeg], &c__1);
+ xabs = c_abs(&x[kbeg]);
+ if (xabs != 0.f) {
+ i__2 = kbeg;
+ q__1.r = x[i__2].r / xabs, q__1.i = x[i__2].i / xabs;
+ csign.r = q__1.r, csign.i = q__1.i;
+ } else {
+ csign.r = 1.f, csign.i = 0.f;
+ }
+ q__1.r = xnorm * csign.r, q__1.i = xnorm * csign.i;
+ xnorms.r = q__1.r, xnorms.i = q__1.i;
+ i__2 = nxfrm + kbeg;
+ q__1.r = -(doublereal)csign.r, q__1.i = -(doublereal)csign.i;
+ x[i__2].r = q__1.r, x[i__2].i = q__1.i;
+ factor = xnorm * (xnorm + xabs);
+ if (dabs(factor) < 1e-20f) {
+ *info = 1;
+ i__2 = -(*info);
+ xerbla_("CLAROR", &i__2);
+ return 0;
+ } else {
+ factor = 1.f / factor;
+ }
+ i__2 = kbeg;
+ i__3 = kbeg;
+ q__1.r = x[i__3].r + xnorms.r, q__1.i = x[i__3].i + xnorms.i;
+ x[i__2].r = q__1.r, x[i__2].i = q__1.i;
+
+/* Apply Householder transformation to A */
+
+ if (itype == 1 || itype == 3 || itype == 4) {
+
+/* Apply H(k) on the left of A */
+
+ cgemv_("C", &ixfrm, n, &c_b2, &a[kbeg + a_dim1], lda, &x[kbeg], &
+ c__1, &c_b1, &x[(nxfrm << 1) + 1], &c__1);
+ q__2.r = factor, q__2.i = 0.f;
+ q__1.r = -(doublereal)q__2.r, q__1.i = -(doublereal)q__2.i;
+ cgerc_(&ixfrm, n, &q__1, &x[kbeg], &c__1, &x[(nxfrm << 1) + 1], &
+ c__1, &a[kbeg + a_dim1], lda);
+
+ }
+
+ if (itype >= 2 && itype <= 4) {
+
+/* Apply H(k)* (or H(k)') on the right of A */
+
+ if (itype == 4) {
+ clacgv_(&ixfrm, &x[kbeg], &c__1);
+ }
+
+ cgemv_("N", m, &ixfrm, &c_b2, &a[kbeg * a_dim1 + 1], lda, &x[kbeg]
+ , &c__1, &c_b1, &x[(nxfrm << 1) + 1], &c__1);
+ q__2.r = factor, q__2.i = 0.f;
+ q__1.r = -(doublereal)q__2.r, q__1.i = -(doublereal)q__2.i;
+ cgerc_(m, &ixfrm, &q__1, &x[(nxfrm << 1) + 1], &c__1, &x[kbeg], &
+ c__1, &a[kbeg * a_dim1 + 1], lda);
+
+ }
+/* L60: */
+ }
+
+ clarnd_(&q__1, &c__3, &iseed[1]);
+ x[1].r = q__1.r, x[1].i = q__1.i;
+ xabs = c_abs(&x[1]);
+ if (xabs != 0.f) {
+ q__1.r = x[1].r / xabs, q__1.i = x[1].i / xabs;
+ csign.r = q__1.r, csign.i = q__1.i;
+ } else {
+ csign.r = 1.f, csign.i = 0.f;
+ }
+ i__1 = nxfrm << 1;
+ x[i__1].r = csign.r, x[i__1].i = csign.i;
+
+/* Scale the matrix A by D. */
+
+ if (itype == 1 || itype == 3 || itype == 4) {
+ i__1 = *m;
+ for (irow = 1; irow <= i__1; ++irow) {
+ r_cnjg(&q__1, &x[nxfrm + irow]);
+ cscal_(n, &q__1, &a[irow + a_dim1], lda);
+/* L70: */
+ }
+ }
+
+ if (itype == 2 || itype == 3) {
+ i__1 = *n;
+ for (jcol = 1; jcol <= i__1; ++jcol) {
+ cscal_(m, &x[nxfrm + jcol], &a[jcol * a_dim1 + 1], &c__1);
+/* L80: */
+ }
+ }
+
+ if (itype == 4) {
+ i__1 = *n;
+ for (jcol = 1; jcol <= i__1; ++jcol) {
+ r_cnjg(&q__1, &x[nxfrm + jcol]);
+ cscal_(m, &q__1, &a[jcol * a_dim1 + 1], &c__1);
+/* L90: */
+ }
+ }
+ return 0;
+
+/* End of CLAROR */
+
+} /* claror_ */
+
diff --git a/TESTING/MATGEN/clarot.c b/TESTING/MATGEN/clarot.c
new file mode 100644
index 0000000..8d33b2a
--- /dev/null
+++ b/TESTING/MATGEN/clarot.c
@@ -0,0 +1,365 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__4 = 4;
+static integer c__8 = 8;
+
+/* Subroutine */ int clarot_(logical *lrows, logical *lleft, logical *lright,
+ integer *nl, complex *c, complex *s, complex *a, integer *lda,
+ complex *xleft, complex *xright)
+{
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4;
+ complex q__1, q__2, q__3, q__4, q__5, q__6;
+
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer iinc, j, inext;
+ static complex tempx;
+ static integer ix, iy, nt;
+ static complex xt[2], yt[2];
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static integer iyt;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ CLAROT applies a (Givens) rotation to two adjacent rows or
+ columns, where one element of the first and/or last column/row
+ may be a separate variable. This is specifically indended
+ for use on matrices stored in some format other than GE, so
+ that elements of the matrix may be used or modified for which
+ no array element is provided.
+
+ One example is a symmetric matrix in SB format (bandwidth=4), for
+
+ which UPLO='L': Two adjacent rows will have the format:
+
+ row j: * * * * * . . . .
+ row j+1: * * * * * . . . .
+
+ '*' indicates elements for which storage is provided,
+ '.' indicates elements for which no storage is provided, but
+ are not necessarily zero; their values are determined by
+ symmetry. ' ' indicates elements which are necessarily zero,
+ and have no storage provided.
+
+ Those columns which have two '*'s can be handled by SROT.
+ Those columns which have no '*'s can be ignored, since as long
+ as the Givens rotations are carefully applied to preserve
+ symmetry, their values are determined.
+ Those columns which have one '*' have to be handled separately,
+ by using separate variables "p" and "q":
+
+ row j: * * * * * p . . .
+ row j+1: q * * * * * . . . .
+
+ The element p would have to be set correctly, then that column
+ is rotated, setting p to its new value. The next call to
+ CLAROT would rotate columns j and j+1, using p, and restore
+ symmetry. The element q would start out being zero, and be
+ made non-zero by the rotation. Later, rotations would presumably
+
+ be chosen to zero q out.
+
+ Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+ ------- ------- ---------
+
+ General dense matrix:
+
+ CALL CLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+ A(i,1),LDA, DUMMY, DUMMY)
+
+ General banded matrix in GB format:
+
+ j = MAX(1, i-KL )
+ NL = MIN( N, i+KU+1 ) + 1-j
+ CALL CLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+ A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,KL+1) ]
+
+ Symmetric banded matrix in SY format, bandwidth K,
+ lower triangle only:
+
+ j = MAX(1, i-K )
+ NL = MIN( K+1, i ) + 1
+ CALL CLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+ A(i,j), LDA, XLEFT, XRIGHT )
+
+ Same, but upper triangle only:
+
+ NL = MIN( K+1, N-i ) + 1
+ CALL CLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+ A(i,i), LDA, XLEFT, XRIGHT )
+
+ Symmetric banded matrix in SB format, bandwidth K,
+ lower triangle only:
+
+ [ same as for SY, except:]
+ . . . .
+ A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,K+1) ]
+
+ Same, but upper triangle only:
+ . . .
+ A(K+1,i), LDA-1, XLEFT, XRIGHT )
+
+ Rotating columns is just the transpose of rotating rows, except
+
+ for GB and SB: (rotating columns i and i+1)
+
+ GB:
+ j = MAX(1, i-KU )
+ NL = MIN( N, i+KL+1 ) + 1-j
+ CALL CLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+ A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ [note that KU+j+1-i is just MAX(1,KU+2-i)]
+
+ SB: (upper triangle)
+
+ . . . . . .
+ A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ SB: (lower triangle)
+
+ . . . . . .
+ A(1,i),LDA-1, XTOP, XBOTTM )
+
+ Arguments
+ =========
+
+ LROWS - LOGICAL
+ If .TRUE., then CLAROT will rotate two rows. If .FALSE.,
+ then it will rotate two columns.
+ Not modified.
+
+ LLEFT - LOGICAL
+ If .TRUE., then XLEFT will be used instead of the
+ corresponding element of A for the first element in the
+ second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+ If .FALSE., then the corresponding element of A will be
+ used.
+ Not modified.
+
+ LRIGHT - LOGICAL
+ If .TRUE., then XRIGHT will be used instead of the
+ corresponding element of A for the last element in the
+ first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+
+ .FALSE., then the corresponding element of A will be used.
+ Not modified.
+
+ NL - INTEGER
+ The length of the rows (if LROWS=.TRUE.) or columns (if
+ LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+ used, the columns/rows they are in should be included in
+ NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+ least 2. The number of rows/columns to be rotated
+ exclusive of those involving XLEFT and/or XRIGHT may
+ not be negative, i.e., NL minus how many of LLEFT and
+ LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+ will be called.
+ Not modified.
+
+ C, S - COMPLEX
+ Specify the Givens rotation to be applied. If LROWS is
+ true, then the matrix ( c s )
+ ( _ _ )
+ (-s c ) is applied from the left;
+ if false, then the transpose (not conjugated) thereof is
+ applied from the right. Note that in contrast to the
+ output of CROTG or to most versions of CROT, both C and S
+ are complex. For a Givens rotation, |C|**2 + |S|**2 should
+
+ be 1, but this is not checked.
+ Not modified.
+
+ A - COMPLEX array.
+ The array containing the rows/columns to be rotated. The
+ first element of A should be the upper left element to
+ be rotated.
+ Read and modified.
+
+ LDA - INTEGER
+ The "effective" leading dimension of A. If A contains
+ a matrix stored in GE, HE, or SY format, then this is just
+ the leading dimension of A as dimensioned in the calling
+ routine. If A contains a matrix stored in band (GB, HB, or
+
+ SB) format, then this should be *one less* than the leading
+
+ dimension used in the calling routine. Thus, if A were
+ dimensioned A(LDA,*) in CLAROT, then A(1,j) would be the
+ j-th element in the first of the two rows to be rotated,
+ and A(2,j) would be the j-th in the second, regardless of
+ how the array may be stored in the calling routine. [A
+ cannot, however, actually be dimensioned thus, since for
+ band format, the row number may exceed LDA, which is not
+ legal FORTRAN.]
+ If LROWS=.TRUE., then LDA must be at least 1, otherwise
+ it must be at least NL minus the number of .TRUE. values
+ in XLEFT and XRIGHT.
+ Not modified.
+
+ XLEFT - COMPLEX
+ If LLEFT is .TRUE., then XLEFT will be used and modified
+ instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ XRIGHT - COMPLEX
+ If LRIGHT is .TRUE., then XRIGHT will be used and modified
+ instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ =====================================================================
+
+
+
+ Set up indices, arrays for ends
+
+ Parameter adjustments */
+ --a;
+
+ /* Function Body */
+ if (*lrows) {
+ iinc = *lda;
+ inext = 1;
+ } else {
+ iinc = 1;
+ inext = *lda;
+ }
+
+ if (*lleft) {
+ nt = 1;
+ ix = iinc + 1;
+ iy = *lda + 2;
+ xt[0].r = a[1].r, xt[0].i = a[1].i;
+ yt[0].r = xleft->r, yt[0].i = xleft->i;
+ } else {
+ nt = 0;
+ ix = 1;
+ iy = inext + 1;
+ }
+
+ if (*lright) {
+ iyt = inext + 1 + (*nl - 1) * iinc;
+ ++nt;
+ i__1 = nt - 1;
+ xt[i__1].r = xright->r, xt[i__1].i = xright->i;
+ i__1 = nt - 1;
+ i__2 = iyt;
+ yt[i__1].r = a[i__2].r, yt[i__1].i = a[i__2].i;
+ }
+
+/* Check for errors */
+
+ if (*nl < nt) {
+ xerbla_("CLAROT", &c__4);
+ return 0;
+ }
+ if (*lda <= 0 || ! (*lrows) && *lda < *nl - nt) {
+ xerbla_("CLAROT", &c__8);
+ return 0;
+ }
+
+/* Rotate
+
+ CROT( NL-NT, A(IX),IINC, A(IY),IINC, C, S ) with complex C, S */
+
+ i__1 = *nl - nt - 1;
+ for (j = 0; j <= i__1; ++j) {
+ i__2 = ix + j * iinc;
+ q__2.r = c->r * a[i__2].r - c->i * a[i__2].i, q__2.i = c->r * a[i__2]
+ .i + c->i * a[i__2].r;
+ i__3 = iy + j * iinc;
+ q__3.r = s->r * a[i__3].r - s->i * a[i__3].i, q__3.i = s->r * a[i__3]
+ .i + s->i * a[i__3].r;
+ q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
+ tempx.r = q__1.r, tempx.i = q__1.i;
+ i__2 = iy + j * iinc;
+ r_cnjg(&q__4, s);
+ q__3.r = -(doublereal)q__4.r, q__3.i = -(doublereal)q__4.i;
+ i__3 = ix + j * iinc;
+ q__2.r = q__3.r * a[i__3].r - q__3.i * a[i__3].i, q__2.i = q__3.r * a[
+ i__3].i + q__3.i * a[i__3].r;
+ r_cnjg(&q__6, c);
+ i__4 = iy + j * iinc;
+ q__5.r = q__6.r * a[i__4].r - q__6.i * a[i__4].i, q__5.i = q__6.r * a[
+ i__4].i + q__6.i * a[i__4].r;
+ q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+ i__2 = ix + j * iinc;
+ a[i__2].r = tempx.r, a[i__2].i = tempx.i;
+/* L10: */
+ }
+
+/* CROT( NT, XT,1, YT,1, C, S ) with complex C, S */
+
+ i__1 = nt;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j - 1;
+ q__2.r = c->r * xt[i__2].r - c->i * xt[i__2].i, q__2.i = c->r * xt[
+ i__2].i + c->i * xt[i__2].r;
+ i__3 = j - 1;
+ q__3.r = s->r * yt[i__3].r - s->i * yt[i__3].i, q__3.i = s->r * yt[
+ i__3].i + s->i * yt[i__3].r;
+ q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
+ tempx.r = q__1.r, tempx.i = q__1.i;
+ i__2 = j - 1;
+ r_cnjg(&q__4, s);
+ q__3.r = -(doublereal)q__4.r, q__3.i = -(doublereal)q__4.i;
+ i__3 = j - 1;
+ q__2.r = q__3.r * xt[i__3].r - q__3.i * xt[i__3].i, q__2.i = q__3.r *
+ xt[i__3].i + q__3.i * xt[i__3].r;
+ r_cnjg(&q__6, c);
+ i__4 = j - 1;
+ q__5.r = q__6.r * yt[i__4].r - q__6.i * yt[i__4].i, q__5.i = q__6.r *
+ yt[i__4].i + q__6.i * yt[i__4].r;
+ q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i;
+ yt[i__2].r = q__1.r, yt[i__2].i = q__1.i;
+ i__2 = j - 1;
+ xt[i__2].r = tempx.r, xt[i__2].i = tempx.i;
+/* L20: */
+ }
+
+/* Stuff values back into XLEFT, XRIGHT, etc. */
+
+ if (*lleft) {
+ a[1].r = xt[0].r, a[1].i = xt[0].i;
+ xleft->r = yt[0].r, xleft->i = yt[0].i;
+ }
+
+ if (*lright) {
+ i__1 = nt - 1;
+ xright->r = xt[i__1].r, xright->i = xt[i__1].i;
+ i__1 = iyt;
+ i__2 = nt - 1;
+ a[i__1].r = yt[i__2].r, a[i__1].i = yt[i__2].i;
+ }
+
+ return 0;
+
+/* End of CLAROT */
+
+} /* clarot_ */
+
diff --git a/TESTING/MATGEN/clartg.c b/TESTING/MATGEN/clartg.c
new file mode 100644
index 0000000..c290985
--- /dev/null
+++ b/TESTING/MATGEN/clartg.c
@@ -0,0 +1,147 @@
+#include "f2c.h"
+
+/* Subroutine */ int clartg_(complex *f, complex *g, real *cs, complex *sn,
+ complex *r)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLARTG generates a plane rotation so that
+
+ [ CS SN ] [ F ] [ R ]
+ [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1.
+ [ -SN CS ] [ G ] [ 0 ]
+
+ This is a faster version of the BLAS1 routine CROTG, except for
+ the following differences:
+ F and G are unchanged on return.
+ If G=0, then CS=1 and SN=0.
+ If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
+ floating point operations.
+
+ Arguments
+ =========
+
+ F (input) COMPLEX
+ The first component of vector to be rotated.
+
+ G (input) COMPLEX
+ The second component of vector to be rotated.
+
+ CS (output) REAL
+ The cosine of the rotation.
+
+ SN (output) COMPLEX
+ The sine of the rotation.
+
+ R (output) COMPLEX
+ The nonzero component of the rotated vector.
+
+ =====================================================================
+
+
+
+ [ 25 or 38 ops for main paths ] */
+ /* System generated locals */
+ real r__1, r__2;
+ doublereal d__1;
+ complex q__1, q__2, q__3;
+ /* Builtin functions */
+ void r_cnjg(complex *, complex *);
+ double c_abs(complex *), r_imag(complex *), sqrt(doublereal);
+ /* Local variables */
+ static real d, f1, f2, g1, g2, fa, ga, di;
+ static complex fs, gs, ss;
+
+
+ if (g->r == 0.f && g->i == 0.f) {
+ *cs = 1.f;
+ sn->r = 0.f, sn->i = 0.f;
+ r->r = f->r, r->i = f->i;
+ } else if (f->r == 0.f && f->i == 0.f) {
+ *cs = 0.f;
+
+ r_cnjg(&q__2, g);
+ d__1 = c_abs(g);
+ q__1.r = q__2.r / d__1, q__1.i = q__2.i / d__1;
+ sn->r = q__1.r, sn->i = q__1.i;
+ d__1 = c_abs(g);
+ r->r = d__1, r->i = 0.f;
+
+/* SN = ONE
+ R = G */
+
+ } else {
+ f1 = (r__1 = f->r, dabs(r__1)) + (r__2 = r_imag(f), dabs(r__2));
+ g1 = (r__1 = g->r, dabs(r__1)) + (r__2 = r_imag(g), dabs(r__2));
+ if (f1 >= g1) {
+ q__1.r = g->r / f1, q__1.i = g->i / f1;
+ gs.r = q__1.r, gs.i = q__1.i;
+/* Computing 2nd power */
+ r__1 = gs.r;
+/* Computing 2nd power */
+ r__2 = r_imag(&gs);
+ g2 = r__1 * r__1 + r__2 * r__2;
+ q__1.r = f->r / f1, q__1.i = f->i / f1;
+ fs.r = q__1.r, fs.i = q__1.i;
+/* Computing 2nd power */
+ r__1 = fs.r;
+/* Computing 2nd power */
+ r__2 = r_imag(&fs);
+ f2 = r__1 * r__1 + r__2 * r__2;
+ d = sqrt(g2 / f2 + 1.f);
+ *cs = 1.f / d;
+ r_cnjg(&q__3, &gs);
+ q__2.r = q__3.r * fs.r - q__3.i * fs.i, q__2.i = q__3.r * fs.i +
+ q__3.i * fs.r;
+ d__1 = *cs / f2;
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ sn->r = q__1.r, sn->i = q__1.i;
+ q__1.r = d * f->r, q__1.i = d * f->i;
+ r->r = q__1.r, r->i = q__1.i;
+ } else {
+ q__1.r = f->r / g1, q__1.i = f->i / g1;
+ fs.r = q__1.r, fs.i = q__1.i;
+/* Computing 2nd power */
+ r__1 = fs.r;
+/* Computing 2nd power */
+ r__2 = r_imag(&fs);
+ f2 = r__1 * r__1 + r__2 * r__2;
+ fa = sqrt(f2);
+ q__1.r = g->r / g1, q__1.i = g->i / g1;
+ gs.r = q__1.r, gs.i = q__1.i;
+/* Computing 2nd power */
+ r__1 = gs.r;
+/* Computing 2nd power */
+ r__2 = r_imag(&gs);
+ g2 = r__1 * r__1 + r__2 * r__2;
+ ga = sqrt(g2);
+ d = sqrt(f2 / g2 + 1.f);
+ di = 1.f / d;
+ *cs = fa / ga * di;
+ r_cnjg(&q__3, &gs);
+ q__2.r = q__3.r * fs.r - q__3.i * fs.i, q__2.i = q__3.r * fs.i +
+ q__3.i * fs.r;
+ d__1 = fa * ga;
+ q__1.r = q__2.r / d__1, q__1.i = q__2.i / d__1;
+ ss.r = q__1.r, ss.i = q__1.i;
+ q__1.r = di * ss.r, q__1.i = di * ss.i;
+ sn->r = q__1.r, sn->i = q__1.i;
+ q__2.r = g->r * ss.r - g->i * ss.i, q__2.i = g->r * ss.i + g->i *
+ ss.r;
+ q__1.r = d * q__2.r, q__1.i = d * q__2.i;
+ r->r = q__1.r, r->i = q__1.i;
+ }
+ }
+ return 0;
+
+/* End of CLARTG */
+
+} /* clartg_ */
+
diff --git a/TESTING/MATGEN/claset.c b/TESTING/MATGEN/claset.c
new file mode 100644
index 0000000..6d98ba2
--- /dev/null
+++ b/TESTING/MATGEN/claset.c
@@ -0,0 +1,144 @@
+#include "f2c.h"
+
+/* Subroutine */ int claset_(char *uplo, integer *m, integer *n, complex *
+ alpha, complex *beta, complex *a, integer *lda)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ CLASET initializes a 2-D array A to BETA on the diagonal and
+ ALPHA on the offdiagonals.
+
+ Arguments
+ =========
+
+ UPLO (input) CHARACTER*1
+ Specifies the part of the matrix A to be set.
+ = 'U': Upper triangular part is set. The lower triangle
+
+ is unchanged.
+ = 'L': Lower triangular part is set. The upper triangle
+
+ is unchanged.
+ Otherwise: All of the matrix A is set.
+
+ M (input) INTEGER
+ On entry, M specifies the number of rows of A.
+
+ N (input) INTEGER
+ On entry, N specifies the number of columns of A.
+
+ ALPHA (input) COMPLEX
+ All the offdiagonal array elements are set to ALPHA.
+
+ BETA (input) COMPLEX
+ All the diagonal array elements are set to BETA.
+
+ A (input/output) COMPLEX array, dimension (LDA,N)
+ On entry, the m by n matrix A.
+ On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
+ A(i,i) = BETA , 1 <= i <= min(m,n)
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= max(1,M).
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ /* Local variables */
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+
+
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ if (lsame_(uplo, "U")) {
+
+/* Set the diagonal to BETA and the strictly upper triangular
+
+ part of the array to ALPHA. */
+
+ i__1 = *n;
+ for (j = 2; j <= *n; ++j) {
+/* Computing MIN */
+ i__3 = j - 1;
+ i__2 = min(i__3,*m);
+ for (i = 1; i <= min(j-1,*m); ++i) {
+ i__3 = i + j * a_dim1;
+ A(i,j).r = alpha->r, A(i,j).i = alpha->i;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = min(*n,*m);
+ for (i = 1; i <= min(*n,*m); ++i) {
+ i__2 = i + i * a_dim1;
+ A(i,i).r = beta->r, A(i,i).i = beta->i;
+/* L30: */
+ }
+
+ } else if (lsame_(uplo, "L")) {
+
+/* Set the diagonal to BETA and the strictly lower triangular
+
+ part of the array to ALPHA. */
+
+ i__1 = min(*m,*n);
+ for (j = 1; j <= min(*m,*n); ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ A(i,j).r = alpha->r, A(i,j).i = alpha->i;
+/* L40: */
+ }
+/* L50: */
+ }
+ i__1 = min(*n,*m);
+ for (i = 1; i <= min(*n,*m); ++i) {
+ i__2 = i + i * a_dim1;
+ A(i,i).r = beta->r, A(i,i).i = beta->i;
+/* L60: */
+ }
+
+ } else {
+
+/* Set the array to BETA on the diagonal and ALPHA on the
+ offdiagonal. */
+
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ A(i,j).r = alpha->r, A(i,j).i = alpha->i;
+/* L70: */
+ }
+/* L80: */
+ }
+ i__1 = min(*m,*n);
+ for (i = 1; i <= min(*m,*n); ++i) {
+ i__2 = i + i * a_dim1;
+ A(i,i).r = beta->r, A(i,i).i = beta->i;
+/* L90: */
+ }
+ }
+
+ return 0;
+
+/* End of CLASET */
+
+} /* claset_ */
+
diff --git a/TESTING/MATGEN/clatb4.c b/TESTING/MATGEN/clatb4.c
new file mode 100644
index 0000000..ad2c3dd
--- /dev/null
+++ b/TESTING/MATGEN/clatb4.c
@@ -0,0 +1,466 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__2 = 2;
+
+/* Subroutine */ int clatb4_(char *path, integer *imat, integer *m, integer *
+ n, char *type, integer *kl, integer *ku, real *anorm, integer *mode,
+ real *cndnum, char *dist)
+{
+ /* Initialized data */
+
+ static logical first = TRUE_;
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Builtin functions */
+ double sqrt(doublereal);
+
+ /* Local variables */
+ static real badc1, badc2, large, small;
+ static char c2[2];
+ extern /* Subroutine */ int slabad_(real *, real *);
+ extern doublereal slamch_(char *);
+ extern logical lsamen_(integer *, char *, char *);
+ static integer mat;
+ static real eps;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ CLATB4 sets parameters for the matrix generator based on the type of
+
+ matrix to be generated.
+
+ Arguments
+ =========
+
+ PATH (input) CHARACTER*3
+ The LAPACK path name.
+
+ IMAT (input) INTEGER
+ An integer key describing which matrix to generate for this
+ path.
+
+ M (input) INTEGER
+ The number of rows in the matrix to be generated.
+
+ N (input) INTEGER
+ The number of columns in the matrix to be generated.
+
+ TYPE (output) CHARACTER*1
+ The type of the matrix to be generated:
+ = 'S': symmetric matrix
+ = 'P': symmetric positive (semi)definite matrix
+ = 'N': nonsymmetric matrix
+
+ KL (output) INTEGER
+ The lower band width of the matrix to be generated.
+
+ KU (output) INTEGER
+ The upper band width of the matrix to be generated.
+
+ ANORM (output) REAL
+ The desired norm of the matrix to be generated. The diagonal
+
+ matrix of singular values or eigenvalues is scaled by this
+ value.
+
+ MODE (output) INTEGER
+ A key indicating how to choose the vector of eigenvalues.
+
+ CNDNUM (output) REAL
+ The desired condition number.
+
+ DIST (output) CHARACTER*1
+ The type of distribution to be used by the random number
+ generator.
+
+ =====================================================================
+
+
+
+ Set some constants for use in the subroutine. */
+
+ if (first) {
+ first = FALSE_;
+ eps = slamch_("Precision");
+ badc2 = .1f / eps;
+ badc1 = sqrt(badc2);
+ small = slamch_("Safe minimum");
+ large = 1.f / small;
+
+/* If it looks like we're on a Cray, take the square root of
+ SMALL and LARGE to avoid overflow and underflow problems. */
+
+ slabad_(&small, &large);
+ small = small / eps * .25f;
+ large = 1.f / small;
+ }
+
+ /* s_copy(c2, path + 1, 2L, 2L);*/
+ strncpy(c2, path + 1, 2);
+
+/* Set some parameters we don't plan to change. */
+
+ *(unsigned char *)dist = 'S';
+ *mode = 3;
+
+/* xQR, xLQ, xQL, xRQ: Set parameters to generate a general
+ M x N matrix. */
+
+ if (lsamen_(&c__2, c2, "QR") || lsamen_(&c__2, c2, "LQ")
+ || lsamen_(&c__2, c2, "QL") || lsamen_(&c__2, c2, "RQ")) {
+
+/* Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GE")) {
+
+/* xGE: Set parameters to generate a general M x N matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 10) {
+ *anorm = small;
+ } else if (*imat == 11) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GB")) {
+
+/* xGB: Set parameters to generate a general banded matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2 * .1f;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GT")) {
+
+/* xGT: Set parameters to generate a general tridiagonal matri
+x.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PO") || lsamen_(&c__2, c2, "PP") || lsamen_(&c__2, c2, "HE") || lsamen_(&c__2, c2,
+ "HP") || lsamen_(&c__2, c2, "SY") || lsamen_(&
+ c__2, c2, "SP")) {
+
+/* xPO, xPP, xHE, xHP, xSY, xSP: Set parameters to generate a
+
+ symmetric or Hermitian matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = *(unsigned char *)c2;
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 6) {
+ *cndnum = badc1;
+ } else if (*imat == 7) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 8) {
+ *anorm = small;
+ } else if (*imat == 9) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PB")) {
+
+/* xPB: Set parameters to generate a symmetric band matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'P';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PT")) {
+
+/* xPT: Set parameters to generate a symmetric positive defini
+te
+ tridiagonal matrix. */
+
+ *(unsigned char *)type = 'P';
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TR") || lsamen_(&c__2, c2, "TP")) {
+
+/* xTR, xTP: Set parameters to generate a triangular matrix
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ mat = abs(*imat);
+ if (mat == 1 || mat == 7) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat < 0) {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (mat == 3 || mat == 9) {
+ *cndnum = badc1;
+ } else if (mat == 4 || mat == 10) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (mat == 5) {
+ *anorm = small;
+ } else if (mat == 6) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TB")) {
+
+/* xTB: Set parameters to generate a triangular band matrix.
+
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 2 || *imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 3 || *imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 4) {
+ *anorm = small;
+ } else if (*imat == 5) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+ }
+ if (*n <= 1) {
+ *cndnum = 1.f;
+ }
+
+ return 0;
+
+/* End of CLATB4 */
+
+} /* clatb4_ */
+
diff --git a/TESTING/MATGEN/clatm2.c b/TESTING/MATGEN/clatm2.c
new file mode 100644
index 0000000..5faccf1
--- /dev/null
+++ b/TESTING/MATGEN/clatm2.c
@@ -0,0 +1,283 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Complex */ VOID clatm2_(complex * ret_val, integer *m, integer *n, integer
+ *i, integer *j, integer *kl, integer *ku, integer *idist, integer *
+ iseed, complex *d, integer *igrade, complex *dl, complex *dr, integer
+ *ipvtng, integer *iwork, real *sparse)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ void c_div(complex *, complex *, complex *), r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer isub, jsub;
+ static complex ctemp;
+ extern /* Complex */ VOID clarnd_(complex *, integer *, integer *);
+ extern doublereal slaran_(integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ CLATM2 returns the (I,J) entry of a random matrix of dimension
+ (M, N) described by the other paramters. It is called by the
+ CLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by CLATMR which has already checked the parameters.
+
+ Use of CLATM2 differs from CLATM3 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With CLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With CLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, CLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. CLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+
+ The matrix whose (I,J) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If I is outside (1..M) or J is outside (1..N), return zero
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of entry to be returned. Not modified.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => real and imaginary parts each UNIFORM( 0, 1 )
+ 2 => real and imaginary parts each UNIFORM( -1, 1 )
+ 3 => real and imaginary parts each NORMAL( 0, 1 )
+ 4 => complex number uniform in DISK( 0 , 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - COMPLEX array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( CONJG(DL) )
+ 6 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - COMPLEX array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - COMPLEX array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) in position K was originally in
+ position IWORK( K ).
+ This differs from IWORK for CLATM3. Not modified.
+
+ SPARSE - REAL between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ return ;
+ }
+
+/* Check for banding */
+
+ if (*j > *i + *ku || *j < *i - *kl) {
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ return ;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.f) {
+ if (slaran_(&iseed[1]) < *sparse) {
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ return ;
+ }
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ isub = *i;
+ jsub = *j;
+ } else if (*ipvtng == 1) {
+ isub = iwork[*i];
+ jsub = *j;
+ } else if (*ipvtng == 2) {
+ isub = *i;
+ jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ isub = iwork[*i];
+ jsub = iwork[*j];
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (isub == jsub) {
+ i__1 = isub;
+ ctemp.r = d[i__1].r, ctemp.i = d[i__1].i;
+ } else {
+ clarnd_(&q__1, idist, &iseed[1]);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ }
+ if (*igrade == 1) {
+ i__1 = isub;
+ q__1.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__1.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 2) {
+ i__1 = jsub;
+ q__1.r = ctemp.r * dr[i__1].r - ctemp.i * dr[i__1].i, q__1.i =
+ ctemp.r * dr[i__1].i + ctemp.i * dr[i__1].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 3) {
+ i__1 = isub;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = jsub;
+ q__1.r = q__2.r * dr[i__2].r - q__2.i * dr[i__2].i, q__1.i = q__2.r *
+ dr[i__2].i + q__2.i * dr[i__2].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 4 && isub != jsub) {
+ i__1 = isub;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ c_div(&q__1, &q__2, &dl[jsub]);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 5) {
+ i__1 = isub;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ r_cnjg(&q__3, &dl[jsub]);
+ q__1.r = q__2.r * q__3.r - q__2.i * q__3.i, q__1.i = q__2.r * q__3.i
+ + q__2.i * q__3.r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 6) {
+ i__1 = isub;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = jsub;
+ q__1.r = q__2.r * dl[i__2].r - q__2.i * dl[i__2].i, q__1.i = q__2.r *
+ dl[i__2].i + q__2.i * dl[i__2].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+
+/* End of CLATM2 */
+
+} /* clatm2_ */
+
diff --git a/TESTING/MATGEN/clatm3.c b/TESTING/MATGEN/clatm3.c
new file mode 100644
index 0000000..a582ad6
--- /dev/null
+++ b/TESTING/MATGEN/clatm3.c
@@ -0,0 +1,295 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Complex */ VOID clatm3_(complex * ret_val, integer *m, integer *n, integer
+ *i, integer *j, integer *isub, integer *jsub, integer *kl, integer *
+ ku, integer *idist, integer *iseed, complex *d, integer *igrade,
+ complex *dl, complex *dr, integer *ipvtng, integer *iwork, real *
+ sparse)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ complex q__1, q__2, q__3;
+
+ /* Builtin functions */
+ void c_div(complex *, complex *, complex *), r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static complex ctemp;
+ extern /* Complex */ VOID clarnd_(complex *, integer *, integer *);
+ extern doublereal slaran_(integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ CLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+ dimension (M, N) described by the other paramters. (ISUB,JSUB)
+ is the final position of the (I,J) entry after pivoting
+ according to IPVTNG and IWORK. CLATM3 is called by the
+ CLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by CLATMR which has already checked the parameters.
+
+ Use of CLATM3 differs from CLATM2 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With CLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With CLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, CLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. CLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+ in different orders for different pivot orders).
+
+ The matrix whose (ISUB,JSUB) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of unpivoted entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of unpivoted entry to be returned. Not modified.
+
+ ISUB - INTEGER
+ Row of pivoted entry to be returned. Changed on exit.
+
+ JSUB - INTEGER
+ Column of pivoted entry to be returned. Changed on exit.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => real and imaginary parts each UNIFORM( 0, 1 )
+ 2 => real and imaginary parts each UNIFORM( -1, 1 )
+ 3 => real and imaginary parts each NORMAL( 0, 1 )
+ 4 => complex number uniform in DISK( 0 , 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - COMPLEX array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( CONJG(DL) )
+ 6 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - COMPLEX array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - COMPLEX array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) originally in position K is in
+ position IWORK( K ) after pivoting.
+ This differs from IWORK for CLATM2. Not modified.
+
+ SPARSE - REAL between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ *isub = *i;
+ *jsub = *j;
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ return ;
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ *isub = *i;
+ *jsub = *j;
+ } else if (*ipvtng == 1) {
+ *isub = iwork[*i];
+ *jsub = *j;
+ } else if (*ipvtng == 2) {
+ *isub = *i;
+ *jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ *isub = iwork[*i];
+ *jsub = iwork[*j];
+ }
+
+/* Check for banding */
+
+ if (*jsub > *isub + *ku || *jsub < *isub - *kl) {
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ return ;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.f) {
+ if (slaran_(&iseed[1]) < *sparse) {
+ ret_val->r = 0.f, ret_val->i = 0.f;
+ return ;
+ }
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (*i == *j) {
+ i__1 = *i;
+ ctemp.r = d[i__1].r, ctemp.i = d[i__1].i;
+ } else {
+ clarnd_(&q__1, idist, &iseed[1]);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ }
+ if (*igrade == 1) {
+ i__1 = *i;
+ q__1.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__1.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 2) {
+ i__1 = *j;
+ q__1.r = ctemp.r * dr[i__1].r - ctemp.i * dr[i__1].i, q__1.i =
+ ctemp.r * dr[i__1].i + ctemp.i * dr[i__1].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 3) {
+ i__1 = *i;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = *j;
+ q__1.r = q__2.r * dr[i__2].r - q__2.i * dr[i__2].i, q__1.i = q__2.r *
+ dr[i__2].i + q__2.i * dr[i__2].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 4 && *i != *j) {
+ i__1 = *i;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ c_div(&q__1, &q__2, &dl[*j]);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 5) {
+ i__1 = *i;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ r_cnjg(&q__3, &dl[*j]);
+ q__1.r = q__2.r * q__3.r - q__2.i * q__3.i, q__1.i = q__2.r * q__3.i
+ + q__2.i * q__3.r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ } else if (*igrade == 6) {
+ i__1 = *i;
+ q__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, q__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = *j;
+ q__1.r = q__2.r * dl[i__2].r - q__2.i * dl[i__2].i, q__1.i = q__2.r *
+ dl[i__2].i + q__2.i * dl[i__2].r;
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+
+/* End of CLATM3 */
+
+} /* clatm3_ */
+
diff --git a/TESTING/MATGEN/clatme.c b/TESTING/MATGEN/clatme.c
new file mode 100644
index 0000000..7f4363b
--- /dev/null
+++ b/TESTING/MATGEN/clatme.c
@@ -0,0 +1,623 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static complex c_b2 = {1.f,0.f};
+static integer c__1 = 1;
+static integer c__0 = 0;
+static integer c__5 = 5;
+
+/* Subroutine */ int clatme_(integer *n, char *dist, integer *iseed, complex *
+ d, integer *mode, real *cond, complex *dmax__, char *ei, char *rsign,
+ char *upper, char *sim, real *ds, integer *modes, real *conds,
+ integer *kl, integer *ku, real *anorm, complex *a, integer *lda,
+ complex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ real r__1, r__2;
+ complex q__1, q__2;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static logical bads;
+ static integer isim;
+ static real temp;
+ static integer i, j;
+ extern /* Subroutine */ int cgerc_(integer *, integer *, complex *,
+ complex *, integer *, complex *, integer *, complex *, integer *);
+ static complex alpha;
+ extern /* Subroutine */ int cscal_(integer *, complex *, complex *,
+ integer *);
+ extern logical lsame_(char *, char *);
+ extern /* Subroutine */ int cgemv_(char *, integer *, integer *, complex *
+ , complex *, integer *, complex *, integer *, complex *, complex *
+ , integer *);
+ static integer iinfo;
+ static real tempa[1];
+ static integer icols, idist;
+ extern /* Subroutine */ int ccopy_(integer *, complex *, integer *,
+ complex *, integer *);
+ static integer irows;
+ extern /* Subroutine */ int clatm1_(integer *, real *, integer *, integer
+ *, integer *, complex *, integer *, integer *), slatm1_(integer *,
+ real *, integer *, integer *, integer *, real *, integer *,
+ integer *);
+ static integer ic, jc;
+ extern doublereal clange_(char *, integer *, integer *, complex *,
+ integer *, real *);
+ static integer ir;
+ extern /* Subroutine */ int clarge_(integer *, complex *, integer *,
+ integer *, complex *, integer *), clarfg_(integer *, complex *,
+ complex *, integer *, complex *), clacgv_(integer *, complex *,
+ integer *);
+ extern /* Complex */ VOID clarnd_(complex *, integer *, integer *);
+ static real ralpha;
+ extern /* Subroutine */ int csscal_(integer *, real *, complex *, integer
+ *), claset_(char *, integer *, integer *, complex *, complex *,
+ complex *, integer *), xerbla_(char *, integer *),
+ clarnv_(integer *, integer *, integer *, complex *);
+ static integer irsign, iupper;
+ static complex xnorms;
+ static integer jcr;
+ static complex tau;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLATME generates random non-symmetric square matrices with
+ specified eigenvalues for testing LAPACK programs.
+
+ CLATME operates by applying the following sequence of
+ operations:
+
+ 1. Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and RSIGN
+ as described below.
+
+ 2. If UPPER='T', the upper triangle of A is set to random values
+ out of distribution DIST.
+
+ 3. If SIM='T', A is multiplied on the left by a random matrix
+ X, whose singular values are specified by DS, MODES, and
+ CONDS, and on the right by X inverse.
+
+ 4. If KL < N-1, the lower bandwidth is reduced to KL using
+ Householder transformations. If KU < N-1, the upper
+ bandwidth is reduced to KU.
+
+ 5. If ANORM is not negative, the matrix is scaled to have
+ maximum-element-norm ANORM.
+
+ (Note: since the matrix cannot be reduced beyond Hessenberg form,
+
+ no packing options are available.)
+
+ Arguments
+ =========
+
+ N - INTEGER
+ The number of columns (or rows) of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values, and on the
+ upper triangle (see UPPER).
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ 'D' => uniform on the complex disc |z| < 1.
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to CLATME
+ to continue the same random number sequence.
+ Changed on exit.
+
+ D - COMPLEX array, dimension ( N )
+ This array is used to specify the eigenvalues of A. If
+ MODE=0, then D is assumed to contain the eigenvalues
+ otherwise they will be computed according to MODE, COND,
+ DMAX, and RSIGN and placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the eigenvalues are to
+ be specified:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is between 1 and 4, D has entries ranging
+ from 1 to 1/COND, if between -1 and -4, D has entries
+ ranging from 1/COND to 1,
+ Not modified.
+
+ COND - REAL
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - COMPLEX
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))). Note that DMAX need not be
+ positive or real: if DMAX is negative or complex (or zero),
+
+ D will be scaled by a negative or complex number (or zero).
+
+ If RSIGN='F' then the largest (absolute) eigenvalue will be
+
+ equal to DMAX.
+ Not modified.
+
+ EI - CHARACTER*1 (ignored)
+ Not modified.
+
+ RSIGN - CHARACTER*1
+ If MODE is not 0, 6, or -6, and RSIGN='T', then the
+ elements of D, as computed according to MODE and COND, will
+
+ be multiplied by a random complex number from the unit
+ circle |z| = 1. If RSIGN='F', they will not be. RSIGN may
+
+ only have the values 'T' or 'F'.
+ Not modified.
+
+ UPPER - CHARACTER*1
+ If UPPER='T', then the elements of A above the diagonal
+ will be set to random numbers out of DIST. If UPPER='F',
+ they will not. UPPER may only have the values 'T' or 'F'.
+ Not modified.
+
+ SIM - CHARACTER*1
+ If SIM='T', then A will be operated on by a "similarity
+ transform", i.e., multiplied on the left by a matrix X and
+ on the right by X inverse. X = U S V, where U and V are
+ random unitary matrices and S is a (diagonal) matrix of
+ singular values specified by DS, MODES, and CONDS. If
+ SIM='F', then A will not be transformed.
+ Not modified.
+
+ DS - REAL array, dimension ( N )
+ This array is used to specify the singular values of X,
+ in the same way that D specifies the eigenvalues of A.
+ If MODE=0, the DS contains the singular values, which
+ may not be zero.
+ Modified if MODE is nonzero.
+
+ MODES - INTEGER
+ CONDS - REAL
+ Similar to MODE and COND, but for specifying the diagonal
+ of S. MODES=-6 and +6 are not allowed (since they would
+ result in randomly ill-conditioned eigenvalues.)
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. KL=1
+ specifies upper Hessenberg form. If KL is at least N-1,
+ then A will have full lower bandwidth.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. KU=1
+ specifies lower Hessenberg form. If KU is at least N-1,
+ then A will have full upper bandwidth; if KU and KL
+ are both at least N-1, then A will be dense. Only one of
+ KU and KL may be less than N-1.
+ Not modified.
+
+ ANORM - REAL
+ If ANORM is not negative, then A will be scaled by a non-
+ negative real number to make the maximum-element-norm of A
+ to be ANORM.
+ Not modified.
+
+ A - COMPLEX array, dimension ( LDA, N )
+ On exit A is the desired test matrix.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. LDA must be at least M.
+ Not modified.
+
+ WORK - COMPLEX array, dimension ( 3*N )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => N negative
+ -2 => DIST illegal string
+ -5 => MODE not in range -6 to 6
+ -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -9 => RSIGN is not 'T' or 'F'
+ -10 => UPPER is not 'T' or 'F'
+ -11 => SIM is not 'T' or 'F'
+ -12 => MODES=0 and DS has a zero singular value.
+ -13 => MODES is not in the range -5 to 5.
+ -14 => MODES is nonzero and CONDS is less than 1.
+ -15 => KL is less than 1.
+ -16 => KU is less than 1, or KL and KU are both less than
+ N-1.
+ -19 => LDA is less than M.
+ 1 => Error return from CLATM1 (computing D)
+ 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+ 3 => Error return from SLATM1 (computing DS)
+ 4 => Error return from CLARGE
+ 5 => Zero singular value from SLATM1.
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --ds;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else if (lsame_(dist, "D")) {
+ idist = 4;
+ } else {
+ idist = -1;
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode UPPER */
+
+ if (lsame_(upper, "T")) {
+ iupper = 1;
+ } else if (lsame_(upper, "F")) {
+ iupper = 0;
+ } else {
+ iupper = -1;
+ }
+
+/* Decode SIM */
+
+ if (lsame_(sim, "T")) {
+ isim = 1;
+ } else if (lsame_(sim, "F")) {
+ isim = 0;
+ } else {
+ isim = -1;
+ }
+
+/* Check DS, if MODES=0 and ISIM=1 */
+
+ bads = FALSE_;
+ if (*modes == 0 && isim == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ if (ds[j] == 0.f) {
+ bads = TRUE_;
+ }
+/* L10: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*n < 0) {
+ *info = -1;
+ } else if (idist == -1) {
+ *info = -2;
+ } else if (abs(*mode) > 6) {
+ *info = -5;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.f) {
+ *info = -6;
+ } else if (irsign == -1) {
+ *info = -9;
+ } else if (iupper == -1) {
+ *info = -10;
+ } else if (isim == -1) {
+ *info = -11;
+ } else if (bads) {
+ *info = -12;
+ } else if (isim == 1 && abs(*modes) > 5) {
+ *info = -13;
+ } else if (isim == 1 && *modes != 0 && *conds < 1.f) {
+ *info = -14;
+ } else if (*kl < 1) {
+ *info = -15;
+ } else if (*ku < 1 || *ku < *n - 1 && *kl < *n - 1) {
+ *info = -16;
+ } else if (*lda < max(1,*n)) {
+ *info = -19;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("CLATME", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L20: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up diagonal of A
+
+ Compute D according to COND and MODE */
+
+ clatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = c_abs(&d[1]);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ r__1 = temp, r__2 = c_abs(&d[i]);
+ temp = dmax(r__1,r__2);
+/* L30: */
+ }
+
+ if (temp > 0.f) {
+ q__1.r = dmax__->r / temp, q__1.i = dmax__->i / temp;
+ alpha.r = q__1.r, alpha.i = q__1.i;
+ } else {
+ *info = 2;
+ return 0;
+ }
+
+ cscal_(n, &alpha, &d[1], &c__1);
+
+ }
+
+ claset_("Full", n, n, &c_b1, &c_b1, &a[a_offset], lda);
+ i__1 = *lda + 1;
+ ccopy_(n, &d[1], &c__1, &a[a_offset], &i__1);
+
+/* 3) If UPPER='T', set upper triangle of A to random numbers. */
+
+ if (iupper != 0) {
+ i__1 = *n;
+ for (jc = 2; jc <= i__1; ++jc) {
+ i__2 = jc - 1;
+ clarnv_(&idist, &iseed[1], &i__2, &a[jc * a_dim1 + 1]);
+/* L40: */
+ }
+ }
+
+/* 4) If SIM='T', apply similarity transformation.
+
+ -1
+ Transform is X A X , where X = U S V, thus
+
+ it is U S V A V' (1/S) U' */
+
+ if (isim != 0) {
+
+/* Compute S (singular values of the eigenvector matrix)
+ according to CONDS and MODES */
+
+ slatm1_(modes, conds, &c__0, &c__0, &iseed[1], &ds[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+
+/* Multiply by V and V' */
+
+ clarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+
+/* Multiply by S and (1/S) */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ csscal_(n, &ds[j], &a[j + a_dim1], lda);
+ if (ds[j] != 0.f) {
+ r__1 = 1.f / ds[j];
+ csscal_(n, &r__1, &a[j * a_dim1 + 1], &c__1);
+ } else {
+ *info = 5;
+ return 0;
+ }
+/* L50: */
+ }
+
+/* Multiply by U and U' */
+
+ clarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 5) Reduce the bandwidth. */
+
+ if (*kl < *n - 1) {
+
+/* Reduce bandwidth -- kill column */
+
+ i__1 = *n - 1;
+ for (jcr = *kl + 1; jcr <= i__1; ++jcr) {
+ ic = jcr - *kl;
+ irows = *n + 1 - jcr;
+ icols = *n + *kl - jcr;
+
+ ccopy_(&irows, &a[jcr + ic * a_dim1], &c__1, &work[1], &c__1);
+ xnorms.r = work[1].r, xnorms.i = work[1].i;
+ clarfg_(&irows, &xnorms, &work[2], &c__1, &tau);
+ r_cnjg(&q__1, &tau);
+ tau.r = q__1.r, tau.i = q__1.i;
+ work[1].r = 1.f, work[1].i = 0.f;
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ alpha.r = q__1.r, alpha.i = q__1.i;
+
+ cgemv_("C", &irows, &icols, &c_b2, &a[jcr + (ic + 1) * a_dim1],
+ lda, &work[1], &c__1, &c_b1, &work[irows + 1], &c__1);
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&irows, &icols, &q__1, &work[1], &c__1, &work[irows + 1], &
+ c__1, &a[jcr + (ic + 1) * a_dim1], lda);
+
+ cgemv_("N", n, &irows, &c_b2, &a[jcr * a_dim1 + 1], lda, &work[1],
+ &c__1, &c_b1, &work[irows + 1], &c__1);
+ r_cnjg(&q__2, &tau);
+ q__1.r = -(doublereal)q__2.r, q__1.i = -(doublereal)q__2.i;
+ cgerc_(n, &irows, &q__1, &work[irows + 1], &c__1, &work[1], &c__1,
+ &a[jcr * a_dim1 + 1], lda);
+
+ i__2 = jcr + ic * a_dim1;
+ a[i__2].r = xnorms.r, a[i__2].i = xnorms.i;
+ i__2 = irows - 1;
+ claset_("Full", &i__2, &c__1, &c_b1, &c_b1, &a[jcr + 1 + ic *
+ a_dim1], lda);
+
+ i__2 = icols + 1;
+ cscal_(&i__2, &alpha, &a[jcr + ic * a_dim1], lda);
+ r_cnjg(&q__1, &alpha);
+ cscal_(n, &q__1, &a[jcr * a_dim1 + 1], &c__1);
+/* L60: */
+ }
+ } else if (*ku < *n - 1) {
+
+/* Reduce upper bandwidth -- kill a row at a time. */
+
+ i__1 = *n - 1;
+ for (jcr = *ku + 1; jcr <= i__1; ++jcr) {
+ ir = jcr - *ku;
+ irows = *n + *ku - jcr;
+ icols = *n + 1 - jcr;
+
+ ccopy_(&icols, &a[ir + jcr * a_dim1], lda, &work[1], &c__1);
+ xnorms.r = work[1].r, xnorms.i = work[1].i;
+ clarfg_(&icols, &xnorms, &work[2], &c__1, &tau);
+ r_cnjg(&q__1, &tau);
+ tau.r = q__1.r, tau.i = q__1.i;
+ work[1].r = 1.f, work[1].i = 0.f;
+ i__2 = icols - 1;
+ clacgv_(&i__2, &work[2], &c__1);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ alpha.r = q__1.r, alpha.i = q__1.i;
+
+ cgemv_("N", &irows, &icols, &c_b2, &a[ir + 1 + jcr * a_dim1], lda,
+ &work[1], &c__1, &c_b1, &work[icols + 1], &c__1);
+ q__1.r = -(doublereal)tau.r, q__1.i = -(doublereal)tau.i;
+ cgerc_(&irows, &icols, &q__1, &work[icols + 1], &c__1, &work[1], &
+ c__1, &a[ir + 1 + jcr * a_dim1], lda);
+
+ cgemv_("C", &icols, n, &c_b2, &a[jcr + a_dim1], lda, &work[1], &
+ c__1, &c_b1, &work[icols + 1], &c__1);
+ r_cnjg(&q__2, &tau);
+ q__1.r = -(doublereal)q__2.r, q__1.i = -(doublereal)q__2.i;
+ cgerc_(&icols, n, &q__1, &work[1], &c__1, &work[icols + 1], &c__1,
+ &a[jcr + a_dim1], lda);
+
+ i__2 = ir + jcr * a_dim1;
+ a[i__2].r = xnorms.r, a[i__2].i = xnorms.i;
+ i__2 = icols - 1;
+ claset_("Full", &c__1, &i__2, &c_b1, &c_b1, &a[ir + (jcr + 1) *
+ a_dim1], lda);
+
+ i__2 = irows + 1;
+ cscal_(&i__2, &alpha, &a[ir + jcr * a_dim1], &c__1);
+ r_cnjg(&q__1, &alpha);
+ cscal_(n, &q__1, &a[jcr + a_dim1], lda);
+/* L70: */
+ }
+ }
+
+/* Scale the matrix to have norm ANORM */
+
+ if (*anorm >= 0.f) {
+ temp = clange_("M", n, n, &a[a_offset], lda, tempa);
+ if (temp > 0.f) {
+ ralpha = *anorm / temp;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ csscal_(n, &ralpha, &a[j * a_dim1 + 1], &c__1);
+/* L80: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CLATME */
+
+} /* clatme_ */
+
diff --git a/TESTING/MATGEN/clatmr.c b/TESTING/MATGEN/clatmr.c
new file mode 100644
index 0000000..c16c48e
--- /dev/null
+++ b/TESTING/MATGEN/clatmr.c
@@ -0,0 +1,1507 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__0 = 0;
+static integer c__1 = 1;
+
+/* Subroutine */ int clatmr_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, complex *d, integer *mode, real *cond, complex *
+ dmax__, char *rsign, char *grade, complex *dl, integer *model, real *
+ condl, complex *dr, integer *moder, real *condr, char *pivtng,
+ integer *ipivot, integer *kl, integer *ku, real *sparse, real *anorm,
+ char *pack, complex *a, integer *lda, integer *iwork, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+ real r__1, r__2;
+ doublereal d__1;
+ complex q__1, q__2;
+
+ /* Builtin functions */
+ double c_abs(complex *);
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer isub, jsub;
+ static real temp;
+ static integer isym, i, j, k, ipack;
+ extern logical lsame_(char *, char *);
+ static real tempa[1];
+ static complex ctemp;
+ static integer iisub, idist, jjsub, mnmin;
+ static logical dzero;
+ static integer mnsub;
+ static real onorm;
+ static integer mxsub, npvts;
+ extern /* Subroutine */ int clatm1_(integer *, real *, integer *, integer
+ *, integer *, complex *, integer *, integer *);
+ extern /* Complex */ VOID clatm2_(complex *, integer *, integer *,
+ integer *, integer *, integer *, integer *, integer *, integer *,
+ complex *, integer *, complex *, complex *, integer *, integer *,
+ real *), clatm3_(complex *, integer *, integer *, integer *,
+ integer *, integer *, integer *, integer *, integer *, integer *,
+ integer *, complex *, integer *, complex *, complex *, integer *,
+ integer *, real *);
+ static complex calpha;
+ extern doublereal clangb_(char *, integer *, integer *, integer *,
+ complex *, integer *, real *), clange_(char *, integer *,
+ integer *, complex *, integer *, real *);
+ static integer igrade;
+ extern doublereal clansb_(char *, char *, integer *, integer *, complex *,
+ integer *, real *);
+ extern /* Subroutine */ int csscal_(integer *, real *, complex *, integer
+ *);
+ static logical fulbnd;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical badpvt;
+ extern doublereal clansp_(char *, char *, integer *, complex *, real *), clansy_(char *, char *, integer *, complex *,
+ integer *, real *);
+ static integer irsign, ipvtng, kll, kuu;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ CLATMR generates random matrices of various types for testing
+ LAPACK programs.
+
+ CLATMR operates by applying the following sequence of
+ operations:
+
+ Generate a matrix A with random entries of distribution DIST
+ which is symmetric if SYM='S', Hermitian if SYM='H', and
+ nonsymmetric if SYM='N'.
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX and RSIGN
+ as described below.
+
+ Grade the matrix, if desired, from the left and/or right
+ as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+ MODER and CONDR also determine the grading as described
+ below.
+
+ Permute, if desired, the rows and/or columns as specified by
+ PIVTNG and IPIVOT.
+
+ Set random entries to zero, if desired, to get a random sparse
+ matrix as specified by SPARSE.
+
+ Make A a band matrix, if desired, by zeroing out the matrix
+ outside a band of lower bandwidth KL and upper bandwidth KU.
+
+
+ Scale A, if desired, to have maximum entry ANORM.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if symmetric or Hermitian)
+ zero out lower half (if symmetric or Hermitian)
+ store the upper half columnwise (if symmetric or Hermitian
+ or square upper triangular)
+ store the lower half columnwise (if symmetric or Hermitian
+ or square lower triangular)
+ same as upper half rowwise if symmetric
+ same as conjugate upper half rowwise if Hermitian
+ store the lower triangle in banded format
+ (if symmetric or Hermitian)
+ store the upper triangle in banded format
+ (if symmetric or Hermitian)
+ store the entire matrix in banded format
+
+ Note: If two calls to CLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+
+ If two calls to CLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be and
+ is not maintained with less than full bandwidth.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of A. Not modified.
+
+ N - INTEGER
+ Number of columns of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate a random matrix .
+ 'U' => real and imaginary parts are independent
+ UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => real and imaginary parts are independent
+ UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => real and imaginary parts are independent
+ NORMAL( 0, 1 ) ( 'N' for normal )
+ 'D' => uniform on interior of unit disk ( 'D' for disk )
+ Not modified.
+
+ ISEED - INTEGER array, dimension (4)
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to CLATMR
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='S', generated matrix is symmetric.
+ If SYM='H', generated matrix is Hermitian.
+ If SYM='N', generated matrix is nonsymmetric.
+ Not modified.
+
+ D - COMPLEX array, dimension (min(M,N))
+ On entry this array specifies the diagonal entries
+ of the diagonal of A. D may either be specified
+ on entry, or set according to MODE and COND as described
+ below. If the matrix is Hermitian, the real part of D
+ will be taken. May be changed on exit if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry describes how D is to be used:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ Not modified.
+
+ COND - REAL
+ On entry, used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - COMPLEX
+ If MODE neither -6, 0 nor 6, the diagonal is scaled by
+ DMAX / max(abs(D(i))), so that maximum absolute entry
+ of diagonal is abs(DMAX). If DMAX is complex (or zero),
+ diagonal will be scaled by a complex number (or zero).
+
+ RSIGN - CHARACTER*1
+ If MODE neither -6, 0 nor 6, specifies sign of diagonal
+ as follows:
+ 'T' => diagonal entries are multiplied by a random complex
+ number uniformly distributed with absolute value 1
+ 'F' => diagonal unchanged
+ Not modified.
+
+ GRADE - CHARACTER*1
+ Specifies grading of matrix as follows:
+ 'N' => no grading
+ 'L' => matrix premultiplied by diag( DL )
+ (only if matrix nonsymmetric)
+ 'R' => matrix postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'B' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'H' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( CONJG(DL) )
+ (only if matrix Hermitian or nonsymmetric)
+ 'S' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ (only if matrix symmetric or nonsymmetric)
+ 'E' => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ ( 'S' for similarity )
+ (only if matrix nonsymmetric)
+ Note: if GRADE='S', then M must equal N.
+ Not modified.
+
+ DL - COMPLEX array, dimension (M)
+ If MODEL=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODEL is not zero, then DL will be set according
+ to MODEL and CONDL, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DL).
+
+ If GRADE='E', then DL cannot have zero entries.
+ Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+
+ MODEL - INTEGER
+ This specifies how the diagonal array DL is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDL - REAL
+ When MODEL is not zero, this specifies the condition number
+
+ of the computed DL. Not modified.
+
+ DR - COMPLEX array, dimension (N)
+ If MODER=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODER is not zero, then DR will be set according
+ to MODER and CONDR, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DR).
+
+ Not referenced if GRADE = 'N', 'L', 'H' or 'S'.
+ Changed on exit.
+
+ MODER - INTEGER
+ This specifies how the diagonal array DR is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDR - REAL
+ When MODER is not zero, this specifies the condition number
+
+ of the computed DR. Not modified.
+
+ PIVTNG - CHARACTER*1
+ On entry specifies pivoting permutations as follows:
+ 'N' or ' ' => none.
+ 'L' => left or row pivoting (matrix must be nonsymmetric).
+ 'R' => right or column pivoting (matrix must be
+ nonsymmetric).
+ 'B' or 'F' => both or full pivoting, i.e., on both sides.
+ In this case, M must equal N
+
+ If two calls to CLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be
+ maintained with less than full bandwidth.
+
+ IPIVOT - INTEGER array, dimension (N or M)
+ This array specifies the permutation used. After the
+ basic matrix is generated, the rows, columns, or both
+ are permuted. If, say, row pivoting is selected, CLATMR
+ starts with the *last* row and interchanges the M-th and
+ IPIVOT(M)-th rows, then moves to the next-to-last row,
+ interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+ and so on. In terms of "2-cycles", the permutation is
+ (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+ where the rightmost cycle is applied first. This is the
+ *inverse* of the effect of pivoting in LINPACK. The idea
+ is that factoring (with pivoting) an identity matrix
+ which has been inverse-pivoted in this way should
+ result in a pivot vector identical to IPIVOT.
+ Not referenced if PIVTNG = 'N'. Not modified.
+
+ SPARSE - REAL
+ On entry specifies the sparsity of the matrix if a sparse
+ matrix is to be generated. SPARSE should lie between
+ 0 and 1. To generate a sparse matrix, for each matrix entry
+
+ a uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ KL - INTEGER
+ On entry specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL at least M-1 implies the matrix is not
+ banded. Must equal KU if matrix is symmetric or Hermitian.
+ Not modified.
+
+ KU - INTEGER
+ On entry specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU at least N-1 implies the matrix is not
+ banded. Must equal KL if matrix is symmetric or Hermitian.
+ Not modified.
+
+ ANORM - REAL
+ On entry specifies maximum entry of output matrix
+ (output matrix will by multiplied by a constant so that
+ its largest absolute entry equal ANORM)
+ if ANORM is nonnegative. If ANORM is negative no scaling
+ is done. Not modified.
+
+ PACK - CHARACTER*1
+ On entry specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries
+ (if symmetric or Hermitian)
+ 'L' => zero out all superdiagonal entries
+ (if symmetric or Hermitian)
+ 'C' => store the upper triangle columnwise
+ (only if matrix symmetric or Hermitian or
+ square upper triangular)
+ 'R' => store the lower triangle columnwise
+ (only if matrix symmetric or Hermitian or
+ square lower triangular)
+ (same as upper half rowwise if symmetric)
+ (same as conjugate upper half rowwise if Hermitian)
+ 'B' => store the lower triangle in band storage scheme
+ (only if matrix symmetric or Hermitian)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if matrix symmetric or Hermitian)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, HB or TB - use 'B' or 'Q'
+ PP, HP or TP - use 'C' or 'R'
+
+ If two calls to CLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - COMPLEX array, dimension (LDA,N)
+ On exit A is the desired test matrix. Only those
+ entries of A which are significant on output
+ will be referenced (even if A is in packed or band
+ storage format). The 'unoccupied corners' of A in
+ band format will be zeroed out.
+
+ LDA - INTEGER
+ on entry LDA specifies the first dimension of A as
+ declared in the calling program.
+ If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+
+ If PACK='C' or 'R', LDA must be at least 1.
+ If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+ If PACK='Z', LDA must be at least KUU+KLL+1, where
+ KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+ Not modified.
+
+ IWORK - INTEGER array, dimension (N or M)
+ Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+
+
+ INFO - INTEGER
+ Error parameter on exit:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S' or 'H'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+ -11 => GRADE illegal string, or GRADE='E' and
+ M not equal to N, or GRADE='L', 'R', 'B', 'S' or 'E'
+
+ and SYM = 'H', or GRADE='L', 'R', 'B', 'H' or 'E'
+ and SYM = 'S'
+ -12 => GRADE = 'E' and DL contains zero
+ -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+
+ 'S' or 'E'
+ -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+
+ and MODEL neither -6, 0 nor 6
+ -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+ -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+ MODER neither -6, 0 nor 6
+ -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+ M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+ or 'H'
+ -19 => IPIVOT contains out of range number and
+ PIVTNG not equal to 'N'
+ -20 => KL negative
+ -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+
+ -22 => SPARSE not in range 0. to 1.
+ -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+ and SYM='N', or PACK='C' and SYM='N' and either KL
+ not equal to 0 or N not equal to M, or PACK='R' and
+ SYM='N', and either KU not equal to 0 or N not equal
+
+ to M
+ -26 => LDA too small
+ 1 => Error return from CLATM1 (computing D)
+ 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+ 3 => Error return from CLATM1 (computing DL)
+ 4 => Error return from CLATM1 (computing DR)
+ 5 => ANORM is positive, but matrix constructed prior to
+ attempting to scale it to have norm ANORM, is zero
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --dl;
+ --dr;
+ --ipivot;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iwork;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else if (lsame_(dist, "D")) {
+ idist = 4;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "H")) {
+ isym = 0;
+ } else if (lsame_(sym, "N")) {
+ isym = 1;
+ } else if (lsame_(sym, "S")) {
+ isym = 2;
+ } else {
+ isym = -1;
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode PIVTNG */
+
+ if (lsame_(pivtng, "N")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, " ")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, "L")) {
+ ipvtng = 1;
+ npvts = *m;
+ } else if (lsame_(pivtng, "R")) {
+ ipvtng = 2;
+ npvts = *n;
+ } else if (lsame_(pivtng, "B")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else if (lsame_(pivtng, "F")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else {
+ ipvtng = -1;
+ }
+
+/* Decode GRADE */
+
+ if (lsame_(grade, "N")) {
+ igrade = 0;
+ } else if (lsame_(grade, "L")) {
+ igrade = 1;
+ } else if (lsame_(grade, "R")) {
+ igrade = 2;
+ } else if (lsame_(grade, "B")) {
+ igrade = 3;
+ } else if (lsame_(grade, "E")) {
+ igrade = 4;
+ } else if (lsame_(grade, "H")) {
+ igrade = 5;
+ } else if (lsame_(grade, "S")) {
+ igrade = 6;
+ } else {
+ igrade = -1;
+ }
+
+/* Decode PACK */
+
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ kll = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ kuu = min(i__1,i__2);
+
+/* If inv(DL) is used, check to see if DL has a zero entry. */
+
+ dzero = FALSE_;
+ if (igrade == 4 && *model == 0) {
+ i__1 = *m;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i;
+ if (dl[i__2].r == 0.f && dl[i__2].i == 0.f) {
+ dzero = TRUE_;
+ }
+/* L10: */
+ }
+ }
+
+/* Check values in IPIVOT */
+
+ badpvt = FALSE_;
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (j = 1; j <= i__1; ++j) {
+ if (ipivot[j] <= 0 || ipivot[j] > npvts) {
+ badpvt = TRUE_;
+ }
+/* L20: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && (isym == 0 || isym == 2)) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (*mode < -6 || *mode > 6) {
+ *info = -7;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && *cond < 1.f) {
+ *info = -8;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && irsign == -1) {
+ *info = -10;
+ } else if (igrade == -1 || igrade == 4 && *m != *n || (igrade == 1 ||
+ igrade == 2 || igrade == 3 || igrade == 4 || igrade == 6) && isym
+ == 0 || (igrade == 1 || igrade == 2 || igrade == 3 || igrade == 4
+ || igrade == 5) && isym == 2) {
+ *info = -11;
+ } else if (igrade == 4 && dzero) {
+ *info = -12;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5 ||
+ igrade == 6) && (*model < -6 || *model > 6)) {
+ *info = -13;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5 ||
+ igrade == 6) && (*model != -6 && *model != 0 && *model != 6) && *
+ condl < 1.f) {
+ *info = -14;
+ } else if ((igrade == 2 || igrade == 3) && (*moder < -6 || *moder > 6)) {
+ *info = -16;
+ } else if ((igrade == 2 || igrade == 3) && (*moder != -6 && *moder != 0 &&
+ *moder != 6) && *condr < 1.f) {
+ *info = -17;
+ } else if (ipvtng == -1 || ipvtng == 3 && *m != *n || (ipvtng == 1 ||
+ ipvtng == 2) && (isym == 0 || isym == 2)) {
+ *info = -18;
+ } else if (ipvtng != 0 && badpvt) {
+ *info = -19;
+ } else if (*kl < 0) {
+ *info = -20;
+ } else if (*ku < 0 || (isym == 0 || isym == 2) && *kl != *ku) {
+ *info = -21;
+ } else if (*sparse < 0.f || *sparse > 1.f) {
+ *info = -22;
+ } else if (ipack == -1 || (ipack == 1 || ipack == 2 || ipack == 5 ||
+ ipack == 6) && isym == 1 || ipack == 3 && isym == 1 && (*kl != 0
+ || *m != *n) || ipack == 4 && isym == 1 && (*ku != 0 || *m != *n))
+ {
+ *info = -24;
+ } else if ((ipack == 0 || ipack == 1 || ipack == 2) && *lda < max(1,*m) ||
+ (ipack == 3 || ipack == 4) && *lda < 1 || (ipack == 5 || ipack ==
+ 6) && *lda < kuu + 1 || ipack == 7 && *lda < kll + kuu + 1) {
+ *info = -26;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("CLATMR", &i__1);
+ return 0;
+ }
+
+/* Decide if we can pivot consistently */
+
+ fulbnd = FALSE_;
+ if (kuu == *n - 1 && kll == *m - 1) {
+ fulbnd = TRUE_;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L30: */
+ }
+
+ iseed[4] = (iseed[4] / 2 << 1) + 1;
+
+/* 2) Set up D, DL, and DR, if indicated.
+
+ Compute D according to COND and MODE */
+
+ clatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, info);
+ if (*info != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && *mode != -6 && *mode != 6) {
+
+/* Scale by DMAX */
+
+ temp = c_abs(&d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ r__1 = temp, r__2 = c_abs(&d[i]);
+ temp = dmax(r__1,r__2);
+/* L40: */
+ }
+ if (temp == 0.f && (dmax__->r != 0.f || dmax__->i != 0.f)) {
+ *info = 2;
+ return 0;
+ }
+ if (temp != 0.f) {
+ q__1.r = dmax__->r / temp, q__1.i = dmax__->i / temp;
+ calpha.r = q__1.r, calpha.i = q__1.i;
+ } else {
+ calpha.r = 1.f, calpha.i = 0.f;
+ }
+ i__1 = mnmin;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i;
+ i__3 = i;
+ q__1.r = calpha.r * d[i__3].r - calpha.i * d[i__3].i, q__1.i =
+ calpha.r * d[i__3].i + calpha.i * d[i__3].r;
+ d[i__2].r = q__1.r, d[i__2].i = q__1.i;
+/* L50: */
+ }
+
+ }
+
+/* If matrix Hermitian, make D real */
+
+ if (isym == 0) {
+ i__1 = mnmin;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i;
+ i__3 = i;
+ d__1 = d[i__3].r;
+ d[i__2].r = d__1, d[i__2].i = 0.f;
+/* L60: */
+ }
+ }
+
+/* Compute DL if grading set */
+
+ if (igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5 || igrade ==
+ 6) {
+ clatm1_(model, condl, &c__0, &idist, &iseed[1], &dl[1], m, info);
+ if (*info != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* Compute DR if grading set */
+
+ if (igrade == 2 || igrade == 3) {
+ clatm1_(moder, condr, &c__0, &idist, &iseed[1], &dr[1], n, info);
+ if (*info != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 3) Generate IWORK if pivoting */
+
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ iwork[i] = i;
+/* L70: */
+ }
+ if (fulbnd) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L80: */
+ }
+ } else {
+ for (i = npvts; i >= 1; --i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L90: */
+ }
+ }
+ }
+
+/* 4) Generate matrices for each kind of PACKing
+ Always sweep matrix columnwise (if symmetric, upper
+ half only) so that matrix generated does not depend
+ on PACK */
+
+ if (fulbnd) {
+
+/* Use CLATM3 so matrices generated with differing PIVOTing onl
+y
+ differ only in the order of their rows and/or columns. */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ i__3 = isub + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ i__3 = jsub + isub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L100: */
+ }
+/* L110: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ i__3 = isub + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+/* L120: */
+ }
+/* L130: */
+ }
+ } else if (isym == 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ i__3 = isub + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ i__3 = jsub + isub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+/* L140: */
+ }
+/* L150: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == isub && isym == 0) {
+ i__3 = mnsub + mxsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = mnsub + mxsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ if (mnsub != mxsub) {
+ i__3 = mxsub + mnsub * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ }
+/* L160: */
+ }
+/* L170: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == jsub && isym == 0) {
+ i__3 = mxsub + mnsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = mxsub + mnsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ if (mnsub != mxsub) {
+ i__3 = mnsub + mxsub * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ }
+/* L180: */
+ }
+/* L190: */
+ }
+
+ } else if (ipack == 3) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+
+/* Compute K = location of (ISUB,JSUB) ent
+ry in packed
+ array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ k = mxsub * (mxsub - 1) / 2 + mnsub;
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ if (mxsub == isub && isym == 0) {
+ i__3 = iisub + jjsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = iisub + jjsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+/* L200: */
+ }
+/* L210: */
+ }
+
+ } else if (ipack == 4) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+
+/* Compute K = location of (I,J) entry in
+packed array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mnsub == 1) {
+ k = mxsub;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - mnsub + 1) * (*n -
+ mnsub + 2) / 2 + mxsub - mnsub + 1;
+ }
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ if (mxsub == jsub && isym == 0) {
+ i__3 = iisub + jjsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = iisub + jjsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+/* L220: */
+ }
+/* L230: */
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ i__3 = j - i + 1 + (i + *n) * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ } else {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == jsub && isym == 0) {
+ i__3 = mxsub - mnsub + 1 + mnsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = mxsub - mnsub + 1 + mnsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ }
+/* L240: */
+ }
+/* L250: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == isub && isym == 0) {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+/* L260: */
+ }
+/* L270: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym != 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (i < 1) {
+ i__3 = j - i + 1 + kuu + (i + *n) * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ }
+ if (mxsub == isub && isym == 0) {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ if (i >= 1 && mnsub != mxsub) {
+ if (mnsub == isub && isym == 0) {
+ i__3 = mxsub - mnsub + 1 + kuu + mnsub *
+ a_dim1;
+ r_cnjg(&q__1, &ctemp);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = mxsub - mnsub + 1 + kuu + mnsub *
+ a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ }
+/* L280: */
+ }
+/* L290: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ clatm3_(&q__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ i__3 = isub - jsub + kuu + 1 + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+/* L300: */
+ }
+/* L310: */
+ }
+ }
+
+ }
+
+ } else {
+
+/* Use CLATM2 */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ i__3 = j + i * a_dim1;
+ r_cnjg(&q__1, &a[i + j * a_dim1]);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L320: */
+ }
+/* L330: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L340: */
+ }
+/* L350: */
+ }
+ } else if (isym == 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ i__3 = j + i * a_dim1;
+ i__4 = i + j * a_dim1;
+ a[i__3].r = a[i__4].r, a[i__3].i = a[i__4].i;
+/* L360: */
+ }
+/* L370: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1], &
+ d[1], &igrade, &dl[1], &dr[1], &ipvtng, &iwork[1],
+ sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ if (i != j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ }
+/* L380: */
+ }
+/* L390: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ if (isym == 0) {
+ i__3 = j + i * a_dim1;
+ clatm2_(&q__2, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ r_cnjg(&q__1, &q__2);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = j + i * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ }
+ if (i != j) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ }
+/* L400: */
+ }
+/* L410: */
+ }
+
+ } else if (ipack == 3) {
+
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ i__3 = isub + jsub * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1], &
+ d[1], &igrade, &dl[1], &dr[1], &ipvtng, &iwork[1],
+ sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L420: */
+ }
+/* L430: */
+ }
+
+ } else if (ipack == 4) {
+
+ if (isym == 0 || isym == 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+
+/* Compute K = location of (I,J) en
+try in packed array */
+
+ if (i == 1) {
+ k = j;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - i + 1) * (*n - i +
+ 2) / 2 + j - i + 1;
+ }
+
+/* Convert K to (ISUB,JSUB) locatio
+n */
+
+ jsub = (k - 1) / *lda + 1;
+ isub = k - *lda * (jsub - 1);
+
+ i__3 = isub + jsub * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ if (isym == 0) {
+ i__3 = isub + jsub * a_dim1;
+ r_cnjg(&q__1, &a[isub + jsub * a_dim1]);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ }
+/* L440: */
+ }
+/* L450: */
+ }
+ } else {
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ i__3 = isub + jsub * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L460: */
+ }
+/* L470: */
+ }
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ i__3 = j - i + 1 + (i + *n) * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ } else {
+ if (isym == 0) {
+ i__3 = j - i + 1 + i * a_dim1;
+ clatm2_(&q__2, m, n, &i, &j, kl, ku, &idist, &
+ iseed[1], &d[1], &igrade, &dl[1], &dr[1],
+ &ipvtng, &iwork[1], sparse);
+ r_cnjg(&q__1, &q__2);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = j - i + 1 + i * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &
+ iseed[1], &d[1], &igrade, &dl[1], &dr[1],
+ &ipvtng, &iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ }
+ }
+/* L480: */
+ }
+/* L490: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ i__3 = i - j + kuu + 1 + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1], &
+ d[1], &igrade, &dl[1], &dr[1], &ipvtng, &iwork[1],
+ sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L500: */
+ }
+/* L510: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym != 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ i__3 = i - j + kuu + 1 + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ if (i < 1) {
+ i__3 = j - i + 1 + kuu + (i + *n) * a_dim1;
+ a[i__3].r = 0.f, a[i__3].i = 0.f;
+ }
+ if (i >= 1 && i != j) {
+ if (isym == 0) {
+ i__3 = j - i + 1 + kuu + i * a_dim1;
+ r_cnjg(&q__1, &a[i - j + kuu + 1 + j * a_dim1]
+ );
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+ } else {
+ i__3 = j - i + 1 + kuu + i * a_dim1;
+ i__4 = i - j + kuu + 1 + j * a_dim1;
+ a[i__3].r = a[i__4].r, a[i__3].i = a[i__4].i;
+ }
+ }
+/* L520: */
+ }
+/* L530: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ i__3 = i - j + kuu + 1 + j * a_dim1;
+ clatm2_(&q__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = q__1.r, a[i__3].i = q__1.i;
+/* L540: */
+ }
+/* L550: */
+ }
+ }
+
+ }
+
+ }
+
+/* 5) Scaling the norm */
+
+ if (ipack == 0) {
+ onorm = clange_("M", m, n, &a[a_offset], lda, tempa);
+ } else if (ipack == 1) {
+ onorm = clansy_("M", "U", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 2) {
+ onorm = clansy_("M", "L", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 3) {
+ onorm = clansp_("M", "U", n, &a[a_offset], tempa);
+ } else if (ipack == 4) {
+ onorm = clansp_("M", "L", n, &a[a_offset], tempa);
+ } else if (ipack == 5) {
+ onorm = clansb_("M", "L", n, &kll, &a[a_offset], lda, tempa);
+ } else if (ipack == 6) {
+ onorm = clansb_("M", "U", n, &kuu, &a[a_offset], lda, tempa);
+ } else if (ipack == 7) {
+ onorm = clangb_("M", n, &kll, &kuu, &a[a_offset], lda, tempa);
+ }
+
+ if (*anorm >= 0.f) {
+
+ if (*anorm > 0.f && onorm == 0.f) {
+
+/* Desired scaling impossible */
+
+ *info = 5;
+ return 0;
+
+ } else if (*anorm > 1.f && onorm < 1.f || *anorm < 1.f && onorm > 1.f)
+ {
+
+/* Scale carefully to avoid over / underflow */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ r__1 = 1.f / onorm;
+ csscal_(m, &r__1, &a[j * a_dim1 + 1], &c__1);
+ csscal_(m, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L560: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ r__1 = 1.f / onorm;
+ csscal_(&i__1, &r__1, &a[a_offset], &c__1);
+ i__1 = *n * (*n + 1) / 2;
+ csscal_(&i__1, anorm, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ r__1 = 1.f / onorm;
+ csscal_(&i__2, &r__1, &a[j * a_dim1 + 1], &c__1);
+ i__2 = kll + kuu + 1;
+ csscal_(&i__2, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L570: */
+ }
+
+ }
+
+ } else {
+
+/* Scale straightforwardly */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ r__1 = *anorm / onorm;
+ csscal_(m, &r__1, &a[j * a_dim1 + 1], &c__1);
+/* L580: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ r__1 = *anorm / onorm;
+ csscal_(&i__1, &r__1, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ r__1 = *anorm / onorm;
+ csscal_(&i__2, &r__1, &a[j * a_dim1 + 1], &c__1);
+/* L590: */
+ }
+ }
+
+ }
+
+ }
+
+/* End of CLATMR */
+
+ return 0;
+} /* clatmr_ */
+
diff --git a/TESTING/MATGEN/clatms.c b/TESTING/MATGEN/clatms.c
new file mode 100644
index 0000000..bb5462a
--- /dev/null
+++ b/TESTING/MATGEN/clatms.c
@@ -0,0 +1,1650 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static complex c_b1 = {0.f,0.f};
+static integer c__1 = 1;
+static integer c__5 = 5;
+static logical c_true = TRUE_;
+static logical c_false = FALSE_;
+
+/* Subroutine */ int clatms_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, real *d, integer *mode, real *cond, real *dmax__,
+ integer *kl, integer *ku, char *pack, complex *a, integer *lda,
+ complex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+ real r__1, r__2, r__3;
+ doublereal d__1;
+ complex q__1, q__2, q__3;
+ logical L__1;
+
+ /* Builtin functions */
+ double cos(doublereal), sin(doublereal);
+ void r_cnjg(complex *, complex *);
+
+ /* Local variables */
+ static integer ilda, icol;
+ static real temp;
+ static logical csym;
+ static integer irow, isym;
+ static complex c;
+ static integer i, j, k;
+ static complex s;
+ static real alpha, angle;
+ static integer ipack;
+ static real realc;
+ static integer ioffg;
+ extern logical lsame_(char *, char *);
+ static integer iinfo;
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *);
+ static complex ctemp;
+ static integer idist, mnmin, iskew;
+ static complex extra, dummy;
+ extern /* Subroutine */ int slatm1_(integer *, real *, integer *, integer
+ *, integer *, real *, integer *, integer *);
+ static integer ic, jc, nc;
+ extern /* Subroutine */ int clagge_(integer *, integer *, integer *,
+ integer *, real *, complex *, integer *, integer *, complex *,
+ integer *), claghe_(integer *, integer *, real *, complex *,
+ integer *, integer *, complex *, integer *);
+ static integer il;
+ static complex ct;
+ static integer iendch, ir, jr, ipackg, mr;
+ extern /* Complex */ VOID clarnd_(complex *, integer *, integer *);
+ static integer minlda;
+ static complex st;
+ extern /* Subroutine */ int claset_(char *, integer *, integer *, complex
+ *, complex *, complex *, integer *), clartg_(complex *,
+ complex *, real *, complex *, complex *), xerbla_(char *, integer
+ *), clagsy_(integer *, integer *, real *, complex *,
+ integer *, integer *, complex *, integer *);
+ extern doublereal slarnd_(integer *, integer *);
+ extern /* Subroutine */ int clarot_(logical *, logical *, logical *,
+ integer *, complex *, complex *, complex *, integer *, complex *,
+ complex *);
+ static logical iltemp, givens;
+ static integer ioffst, irsign;
+ static logical ilextr, topdwn;
+ static integer ir1, ir2, isympk, jch, llb, jkl, jku, uub;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ CLATMS generates random matrices with specified singular values
+ (or hermitian with specified eigenvalues)
+ for testing LAPACK programs.
+
+ CLATMS operates by applying the following sequence of
+ operations:
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and SYM
+ as described below.
+
+ Generate a matrix with the appropriate band structure, by one
+ of two methods:
+
+ Method A:
+ Generate a dense M x N matrix by multiplying D on the left
+ and the right by random unitary matrices, then:
+
+ Reduce the bandwidth according to KL and KU, using
+ Householder transformations.
+
+ Method B:
+ Convert the bandwidth-0 (i.e., diagonal) matrix to a
+ bandwidth-1 matrix using Givens rotations, "chasing"
+ out-of-band elements back, much as in QR; then convert
+ the bandwidth-1 to a bandwidth-2 matrix, etc. Note
+ that for reasonably small bandwidths (relative to M and
+
+ N) this requires less storage, as a dense matrix is not
+
+ generated. Also, for hermitian or symmetric matrices,
+ only one triangle is generated.
+
+ Method A is chosen if the bandwidth is a large fraction of the
+ order of the matrix, and LDA is at least M (so a dense
+ matrix can be stored.) Method B is chosen if the bandwidth
+
+ is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
+ non-symmetric), or LDA is less than M and not less than the
+
+ bandwidth.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if hermitian)
+ zero out lower half (if hermitian)
+ store the upper half columnwise (if hermitian or upper
+ triangular)
+ store the lower half columnwise (if hermitian or lower
+ triangular)
+ store the lower triangle in banded format (if hermitian or
+ lower triangular)
+ store the upper triangle in banded format (if hermitian or
+ upper triangular)
+ store the entire matrix in banded format
+ If Method B is chosen, and band format is specified, then the
+ matrix will be generated in the band format, so no repacking
+
+ will be necessary.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ The number of rows of A. Not modified.
+
+ N - INTEGER
+ The number of columns of A. N must equal M if the matrix
+ is symmetric or hermitian (i.e., if SYM is not 'N')
+ Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values.
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to CLATMS
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='H', the generated matrix is hermitian, with
+ eigenvalues specified by D, COND, MODE, and DMAX; they
+ may be positive, negative, or zero.
+ If SYM='P', the generated matrix is hermitian, with
+ eigenvalues (= singular values) specified by D, COND,
+ MODE, and DMAX; they will not be negative.
+ If SYM='N', the generated matrix is nonsymmetric, with
+ singular values specified by D, COND, MODE, and DMAX;
+ they will not be negative.
+ If SYM='S', the generated matrix is (complex) symmetric,
+ with singular values specified by D, COND, MODE, and
+ DMAX; they will not be negative.
+ Not modified.
+
+ D - REAL array, dimension ( MIN( M, N ) )
+ This array is used to specify the singular values or
+ eigenvalues of A (see SYM, above.) If MODE=0, then D is
+ assumed to contain the singular/eigenvalues, otherwise
+ they will be computed according to MODE, COND, and DMAX,
+ and placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the singular/eigenvalues are to
+
+ be specified:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ If SYM='H', and MODE is neither 0, 6, nor -6, then
+ the elements of D will also be multiplied by a random
+ sign (i.e., +1 or -1.)
+ Not modified.
+
+ COND - REAL
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - REAL
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+
+ singular value (which is to say the norm) will be abs(DMAX).
+
+ Note that DMAX need not be positive: if DMAX is negative
+ (or zero), D will be scaled by a negative number (or zero).
+
+ Not modified.
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL being at least M-1 means that the matrix
+
+ has full lower bandwidth. KL must equal KU if the matrix
+ is symmetric or hermitian.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU being at least N-1 means that the matrix
+
+ has full upper bandwidth. KL must equal KU if the matrix
+ is symmetric or hermitian.
+ Not modified.
+
+ PACK - CHARACTER*1
+ This specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries (if symmetric
+ or hermitian)
+ 'L' => zero out all superdiagonal entries (if symmetric
+ or hermitian)
+ 'C' => store the upper triangle columnwise (only if the
+ matrix is symmetric, hermitian, or upper triangular)
+
+ 'R' => store the lower triangle columnwise (only if the
+ matrix is symmetric, hermitian, or lower triangular)
+
+ 'B' => store the lower triangle in band storage scheme
+ (only if the matrix is symmetric, hermitian, or
+ lower triangular)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if the matrix is symmetric, hermitian, or
+ upper triangular)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, SB, HB, or TB - use 'B' or 'Q'
+ PP, SP, HB, or TP - use 'C' or 'R'
+
+ If two calls to CLATMS differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - COMPLEX array, dimension ( LDA, N )
+ On exit A is the desired test matrix. A is first generated
+
+ in full (unpacked) form, and then packed, if so specified
+ by PACK. Thus, the first M elements of the first N
+ columns will always be modified. If PACK specifies a
+ packed or banded storage scheme, all LDA elements of the
+ first N columns will be modified; the elements of the
+ array which do not correspond to elements of the generated
+ matrix are set to zero.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+ LDA must be at least M. If PACK='B' or 'Q', then LDA must
+ be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+ If PACK='Z', LDA must be large enough to hold the packed
+ array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+ Not modified.
+
+ WORK - COMPLEX array, dimension ( 3*MAX( N, M ) )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => KL negative
+ -11 => KU negative, or SYM is not 'N' and KU is not equal to
+
+ KL
+ -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+
+ or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+ or PACK='R' or 'B' and SYM='N' and KU is not zero;
+ or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+
+ N.
+ -14 => LDA is less than M, or PACK='Z' and LDA is less than
+
+ MIN(KU,N-1) + MIN(KL,M-1) + 1.
+ 1 => Error return from SLATM1
+ 2 => Cannot scale to DMAX (max. sing. value is 0)
+ 3 => Error return from CLAGGE, CLAGHE or CLAGSY
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "N")) {
+ isym = 1;
+ irsign = 0;
+ csym = FALSE_;
+ } else if (lsame_(sym, "P")) {
+ isym = 2;
+ irsign = 0;
+ csym = FALSE_;
+ } else if (lsame_(sym, "S")) {
+ isym = 2;
+ irsign = 0;
+ csym = TRUE_;
+ } else if (lsame_(sym, "H")) {
+ isym = 2;
+ irsign = 1;
+ csym = FALSE_;
+ } else {
+ isym = -1;
+ }
+
+/* Decode PACK */
+
+ isympk = 0;
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ isympk = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ isympk = 1;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ isympk = 2;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ isympk = 3;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ isympk = 3;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ isympk = 2;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ llb = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ uub = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *m, i__2 = *n + llb;
+ mr = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *n, i__2 = *m + uub;
+ nc = min(i__1,i__2);
+
+ if (ipack == 5 || ipack == 6) {
+ minlda = uub + 1;
+ } else if (ipack == 7) {
+ minlda = llb + uub + 1;
+ } else {
+ minlda = *m;
+ }
+
+/* Use Givens rotation method if bandwidth small enough,
+ or if LDA is too small to store the matrix unpacked. */
+
+ givens = FALSE_;
+ if (isym == 1) {
+/* Computing MAX */
+ i__1 = 1, i__2 = mr + nc;
+ if ((real) (llb + uub) < (real) max(i__1,i__2) * .3f) {
+ givens = TRUE_;
+ }
+ } else {
+ if (llb << 1 < *m) {
+ givens = TRUE_;
+ }
+ }
+ if (*lda < *m && *lda >= minlda) {
+ givens = TRUE_;
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && isym != 1) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (abs(*mode) > 6) {
+ *info = -7;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.f) {
+ *info = -8;
+ } else if (*kl < 0) {
+ *info = -10;
+ } else if (*ku < 0 || isym != 1 && *kl != *ku) {
+ *info = -11;
+ } else if (ipack == -1 || isympk == 1 && isym == 1 || isympk == 2 && isym
+ == 1 && *kl > 0 || isympk == 3 && isym == 1 && *ku > 0 || isympk
+ != 0 && *m != *n) {
+ *info = -12;
+ } else if (*lda < max(1,minlda)) {
+ *info = -14;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("CLATMS", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L10: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up D if indicated.
+
+ Compute D according to COND and MODE */
+
+ slatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+
+/* Choose Top-Down if D is (apparently) increasing,
+ Bottom-Up if D is (apparently) decreasing. */
+
+ if (dabs(d[1]) <= (r__1 = d[mnmin], dabs(r__1))) {
+ topdwn = TRUE_;
+ } else {
+ topdwn = FALSE_;
+ }
+
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = dabs(d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ r__2 = temp, r__3 = (r__1 = d[i], dabs(r__1));
+ temp = dmax(r__2,r__3);
+/* L20: */
+ }
+
+ if (temp > 0.f) {
+ alpha = *dmax__ / temp;
+ } else {
+ *info = 2;
+ return 0;
+ }
+
+ sscal_(&mnmin, &alpha, &d[1], &c__1);
+
+ }
+
+ claset_("Full", lda, n, &c_b1, &c_b1, &a[a_offset], lda);
+
+/* 3) Generate Banded Matrix using Givens rotations.
+ Also the special case of UUB=LLB=0
+
+ Compute Addressing constants to cover all
+ storage formats. Whether GE, HE, SY, GB, HB, or SB,
+ upper or lower triangle or both,
+ the (i,j)-th element is in
+ A( i - ISKEW*j + IOFFST, j ) */
+
+ if (ipack > 4) {
+ ilda = *lda - 1;
+ iskew = 1;
+ if (ipack > 5) {
+ ioffst = uub + 1;
+ } else {
+ ioffst = 1;
+ }
+ } else {
+ ilda = *lda;
+ iskew = 0;
+ ioffst = 0;
+ }
+
+/* IPACKG is the format that the matrix is generated in. If this is
+ different from IPACK, then the matrix must be repacked at the
+ end. It also signals how to compute the norm, for scaling. */
+
+ ipackg = 0;
+
+/* Diagonal Matrix -- We are done, unless it
+ is to be stored HP/SP/PP/TP (PACK='R' or 'C') */
+
+ if (llb == 0 && uub == 0) {
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = (1 - iskew) * j + ioffst + j * a_dim1;
+ i__3 = j;
+ q__1.r = d[i__3], q__1.i = 0.f;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+/* L30: */
+ }
+
+ if (ipack <= 2 || ipack >= 5) {
+ ipackg = ipack;
+ }
+
+ } else if (givens) {
+
+/* Check whether to use Givens rotations,
+ Householder transformations, or nothing. */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ if (ipack > 4) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = (1 - iskew) * j + ioffst + j * a_dim1;
+ i__3 = j;
+ q__1.r = d[i__3], q__1.i = 0.f;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+/* L40: */
+ }
+
+ if (topdwn) {
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ Last row actually rotated is M
+ Last column actually rotated is MIN( M+
+JKU, N )
+
+ Computing MIN */
+ i__3 = *m + jku;
+ i__2 = min(i__3,*n) + jkl - 1;
+ for (jr = 1; jr <= i__2; ++jr) {
+ extra.r = 0.f, extra.i = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ d__1 = cos(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ c.r = q__1.r, c.i = q__1.i;
+ d__1 = sin(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MAX */
+ i__3 = 1, i__4 = jr - jkl;
+ icol = max(i__3,i__4);
+ if (jr < *m) {
+/* Computing MIN */
+ i__3 = *n, i__4 = jr + jku;
+ il = min(i__3,i__4) + 1 - icol;
+ L__1 = jr > jkl;
+ clarot_(&c_true, &L__1, &c_false, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ir = jr;
+ ic = icol;
+ i__3 = -jkl - jku;
+ for (jch = jr - jkl; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ir < *m) {
+ clartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &realc,
+ &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__2.r = realc * dummy.r, q__2.i = realc *
+ dummy.i;
+ r_cnjg(&q__1, &q__2);
+ c.r = q__1.r, c.i = q__1.i;
+ q__3.r = -(doublereal)s.r, q__3.i = -(
+ doublereal)s.i;
+ q__2.r = q__3.r * dummy.r - q__3.i * dummy.i,
+ q__2.i = q__3.r * dummy.i + q__3.i *
+ dummy.r;
+ r_cnjg(&q__1, &q__2);
+ s.r = q__1.r, s.i = q__1.i;
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ ctemp.r = 0.f, ctemp.i = 0.f;
+ iltemp = jch > jku;
+ clarot_(&c_false, &iltemp, &c_true, &il, &c, &s, &
+ a[irow - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &ctemp, &extra);
+ if (iltemp) {
+ clartg_(&a[irow + 1 - iskew * (ic + 1) +
+ ioffst + (ic + 1) * a_dim1], &ctemp, &
+ realc, &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__2.r = realc * dummy.r, q__2.i = realc *
+ dummy.i;
+ r_cnjg(&q__1, &q__2);
+ c.r = q__1.r, c.i = q__1.i;
+ q__3.r = -(doublereal)s.r, q__3.i = -(
+ doublereal)s.i;
+ q__2.r = q__3.r * dummy.r - q__3.i * dummy.i,
+ q__2.i = q__3.r * dummy.i + q__3.i *
+ dummy.r;
+ r_cnjg(&q__1, &q__2);
+ s.r = q__1.r, s.i = q__1.i;
+
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ extra.r = 0.f, extra.i = 0.f;
+ L__1 = jch > jku + jkl;
+ clarot_(&c_true, &L__1, &c_true, &il, &c, &s,
+ &a[irow - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &extra, &ctemp)
+ ;
+ ic = icol;
+ ir = irow;
+ }
+/* L50: */
+ }
+/* L60: */
+ }
+/* L70: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ Computing MIN */
+ i__3 = *n + jkl;
+ i__2 = min(i__3,*m) + jku - 1;
+ for (jc = 1; jc <= i__2; ++jc) {
+ extra.r = 0.f, extra.i = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ d__1 = cos(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ c.r = q__1.r, c.i = q__1.i;
+ d__1 = sin(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MAX */
+ i__3 = 1, i__4 = jc - jku;
+ irow = max(i__3,i__4);
+ if (jc < *n) {
+/* Computing MIN */
+ i__3 = *m, i__4 = jc + jkl;
+ il = min(i__3,i__4) + 1 - irow;
+ L__1 = jc > jku;
+ clarot_(&c_false, &L__1, &c_false, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ic = jc;
+ ir = irow;
+ i__3 = -jkl - jku;
+ for (jch = jc - jku; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ic < *n) {
+ clartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &realc,
+ &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__2.r = realc * dummy.r, q__2.i = realc *
+ dummy.i;
+ r_cnjg(&q__1, &q__2);
+ c.r = q__1.r, c.i = q__1.i;
+ q__3.r = -(doublereal)s.r, q__3.i = -(
+ doublereal)s.i;
+ q__2.r = q__3.r * dummy.r - q__3.i * dummy.i,
+ q__2.i = q__3.r * dummy.i + q__3.i *
+ dummy.r;
+ r_cnjg(&q__1, &q__2);
+ s.r = q__1.r, s.i = q__1.i;
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ ctemp.r = 0.f, ctemp.i = 0.f;
+ iltemp = jch > jkl;
+ clarot_(&c_true, &iltemp, &c_true, &il, &c, &s, &
+ a[ir - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &ctemp, &extra);
+ if (iltemp) {
+ clartg_(&a[ir + 1 - iskew * (icol + 1) +
+ ioffst + (icol + 1) * a_dim1], &ctemp,
+ &realc, &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__2.r = realc * dummy.r, q__2.i = realc *
+ dummy.i;
+ r_cnjg(&q__1, &q__2);
+ c.r = q__1.r, c.i = q__1.i;
+ q__3.r = -(doublereal)s.r, q__3.i = -(
+ doublereal)s.i;
+ q__2.r = q__3.r * dummy.r - q__3.i * dummy.i,
+ q__2.i = q__3.r * dummy.i + q__3.i *
+ dummy.r;
+ r_cnjg(&q__1, &q__2);
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ extra.r = 0.f, extra.i = 0.f;
+ L__1 = jch > jkl + jku;
+ clarot_(&c_false, &L__1, &c_true, &il, &c, &s,
+ &a[irow - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &extra, &ctemp)
+ ;
+ ic = icol;
+ ir = irow;
+ }
+/* L80: */
+ }
+/* L90: */
+ }
+/* L100: */
+ }
+
+ } else {
+
+/* Bottom-Up -- Start at the bottom right. */
+
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ First row actually rotated is M
+ First column actually rotated is MIN( M
++JKU, N )
+
+ Computing MIN */
+ i__2 = *m, i__3 = *n + jkl;
+ iendch = min(i__2,i__3) - 1;
+/* Computing MIN */
+ i__2 = *m + jku;
+ i__3 = 1 - jkl;
+ for (jc = min(i__2,*n) - 1; jc >= i__3; --jc) {
+ extra.r = 0.f, extra.i = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ d__1 = cos(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ c.r = q__1.r, c.i = q__1.i;
+ d__1 = sin(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - jku + 1;
+ irow = max(i__2,i__4);
+ if (jc > 0) {
+/* Computing MIN */
+ i__2 = *m, i__4 = jc + jkl + 1;
+ il = min(i__2,i__4) + 1 - irow;
+ L__1 = jc + jkl < *m;
+ clarot_(&c_false, &c_false, &L__1, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ic = jc;
+ i__2 = iendch;
+ i__4 = jkl + jku;
+ for (jch = jc + jkl; i__4 < 0 ? jch >= i__2 : jch <=
+ i__2; jch += i__4) {
+ ilextr = ic > 0;
+ if (ilextr) {
+ clartg_(&a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &extra, &realc, &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__1.r = realc * dummy.r, q__1.i = realc *
+ dummy.i;
+ c.r = q__1.r, c.i = q__1.i;
+ q__1.r = s.r * dummy.r - s.i * dummy.i,
+ q__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = q__1.r, s.i = q__1.i;
+ }
+ ic = max(1,ic);
+/* Computing MIN */
+ i__5 = *n - 1, i__6 = jch + jku;
+ icol = min(i__5,i__6);
+ iltemp = jch + jku < *n;
+ ctemp.r = 0.f, ctemp.i = 0.f;
+ i__5 = icol + 2 - ic;
+ clarot_(&c_true, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &extra, &ctemp);
+ if (iltemp) {
+ clartg_(&a[jch - iskew * icol + ioffst + icol
+ * a_dim1], &ctemp, &realc, &s, &dummy)
+ ;
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__1.r = realc * dummy.r, q__1.i = realc *
+ dummy.i;
+ c.r = q__1.r, c.i = q__1.i;
+ q__1.r = s.r * dummy.r - s.i * dummy.i,
+ q__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra.r = 0.f, extra.i = 0.f;
+ L__1 = jch + jkl + jku <= iendch;
+ clarot_(&c_false, &c_true, &L__1, &il, &c, &s,
+ &a[jch - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &ctemp, &extra)
+ ;
+ ic = icol;
+ }
+/* L110: */
+ }
+/* L120: */
+ }
+/* L130: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ First row actually rotated is MIN( N+JK
+L, M )
+ First column actually rotated is N
+
+ Computing MIN */
+ i__3 = *n, i__4 = *m + jku;
+ iendch = min(i__3,i__4) - 1;
+/* Computing MIN */
+ i__3 = *n + jkl;
+ i__4 = 1 - jku;
+ for (jr = min(i__3,*m) - 1; jr >= i__4; --jr) {
+ extra.r = 0.f, extra.i = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ d__1 = cos(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ c.r = q__1.r, c.i = q__1.i;
+ d__1 = sin(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MAX */
+ i__3 = 1, i__2 = jr - jkl + 1;
+ icol = max(i__3,i__2);
+ if (jr > 0) {
+/* Computing MIN */
+ i__3 = *n, i__2 = jr + jku + 1;
+ il = min(i__3,i__2) + 1 - icol;
+ L__1 = jr + jku < *n;
+ clarot_(&c_true, &c_false, &L__1, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ir = jr;
+ i__3 = iendch;
+ i__2 = jkl + jku;
+ for (jch = jr + jku; i__2 < 0 ? jch >= i__3 : jch <=
+ i__3; jch += i__2) {
+ ilextr = ir > 0;
+ if (ilextr) {
+ clartg_(&a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &extra, &realc, &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__1.r = realc * dummy.r, q__1.i = realc *
+ dummy.i;
+ c.r = q__1.r, c.i = q__1.i;
+ q__1.r = s.r * dummy.r - s.i * dummy.i,
+ q__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = q__1.r, s.i = q__1.i;
+ }
+ ir = max(1,ir);
+/* Computing MIN */
+ i__5 = *m - 1, i__6 = jch + jkl;
+ irow = min(i__5,i__6);
+ iltemp = jch + jkl < *m;
+ ctemp.r = 0.f, ctemp.i = 0.f;
+ i__5 = irow + 2 - ir;
+ clarot_(&c_false, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &extra, &ctemp);
+ if (iltemp) {
+ clartg_(&a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &ctemp, &realc, &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__1.r = realc * dummy.r, q__1.i = realc *
+ dummy.i;
+ c.r = q__1.r, c.i = q__1.i;
+ q__1.r = s.r * dummy.r - s.i * dummy.i,
+ q__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = q__1.r, s.i = q__1.i;
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra.r = 0.f, extra.i = 0.f;
+ L__1 = jch + jkl + jku <= iendch;
+ clarot_(&c_true, &c_true, &L__1, &il, &c, &s,
+ &a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &ctemp, &extra);
+ ir = irow;
+ }
+/* L140: */
+ }
+/* L150: */
+ }
+/* L160: */
+ }
+
+ }
+
+ } else {
+
+/* Symmetric -- A = U D U'
+ Hermitian -- A = U D U* */
+
+ ipackg = ipack;
+ ioffg = ioffst;
+
+ if (topdwn) {
+
+/* Top-Down -- Generate Upper triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 6;
+ ioffg = uub + 1;
+ } else {
+ ipackg = 1;
+ }
+
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__4 = (1 - iskew) * j + ioffg + j * a_dim1;
+ i__2 = j;
+ q__1.r = d[i__2], q__1.i = 0.f;
+ a[i__4].r = q__1.r, a[i__4].i = q__1.i;
+/* L170: */
+ }
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ i__4 = *n - 1;
+ for (jc = 1; jc <= i__4; ++jc) {
+/* Computing MAX */
+ i__2 = 1, i__3 = jc - k;
+ irow = max(i__2,i__3);
+/* Computing MIN */
+ i__2 = jc + 1, i__3 = k + 2;
+ il = min(i__2,i__3);
+ extra.r = 0.f, extra.i = 0.f;
+ i__2 = jc - iskew * (jc + 1) + ioffg + (jc + 1) *
+ a_dim1;
+ ctemp.r = a[i__2].r, ctemp.i = a[i__2].i;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ d__1 = cos(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ c.r = q__1.r, c.i = q__1.i;
+ d__1 = sin(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ s.r = q__1.r, s.i = q__1.i;
+ if (csym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ r_cnjg(&q__1, &ctemp);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ r_cnjg(&q__1, &c);
+ ct.r = q__1.r, ct.i = q__1.i;
+ r_cnjg(&q__1, &s);
+ st.r = q__1.r, st.i = q__1.i;
+ }
+ L__1 = jc > k;
+ clarot_(&c_false, &L__1, &c_true, &il, &c, &s, &a[
+ irow - iskew * jc + ioffg + jc * a_dim1], &
+ ilda, &extra, &ctemp);
+/* Computing MIN */
+ i__3 = k, i__5 = *n - jc;
+ i__2 = min(i__3,i__5) + 1;
+ clarot_(&c_true, &c_true, &c_false, &i__2, &ct, &st, &
+ a[(1 - iskew) * jc + ioffg + jc * a_dim1], &
+ ilda, &ctemp, &dummy);
+
+/* Chase EXTRA back up the matrix
+*/
+
+ icol = jc;
+ i__2 = -k;
+ for (jch = jc - k; i__2 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__2) {
+ clartg_(&a[jch + 1 - iskew * (icol + 1) + ioffg +
+ (icol + 1) * a_dim1], &extra, &realc, &s,
+ &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__2.r = realc * dummy.r, q__2.i = realc *
+ dummy.i;
+ r_cnjg(&q__1, &q__2);
+ c.r = q__1.r, c.i = q__1.i;
+ q__3.r = -(doublereal)s.r, q__3.i = -(doublereal)
+ s.i;
+ q__2.r = q__3.r * dummy.r - q__3.i * dummy.i,
+ q__2.i = q__3.r * dummy.i + q__3.i *
+ dummy.r;
+ r_cnjg(&q__1, &q__2);
+ s.r = q__1.r, s.i = q__1.i;
+ i__3 = jch - iskew * (jch + 1) + ioffg + (jch + 1)
+ * a_dim1;
+ ctemp.r = a[i__3].r, ctemp.i = a[i__3].i;
+ if (csym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ r_cnjg(&q__1, &ctemp);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ r_cnjg(&q__1, &c);
+ ct.r = q__1.r, ct.i = q__1.i;
+ r_cnjg(&q__1, &s);
+ st.r = q__1.r, st.i = q__1.i;
+ }
+ i__3 = k + 2;
+ clarot_(&c_true, &c_true, &c_true, &i__3, &c, &s,
+ &a[(1 - iskew) * jch + ioffg + jch *
+ a_dim1], &ilda, &ctemp, &extra);
+/* Computing MAX */
+ i__3 = 1, i__5 = jch - k;
+ irow = max(i__3,i__5);
+/* Computing MIN */
+ i__3 = jch + 1, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra.r = 0.f, extra.i = 0.f;
+ L__1 = jch > k;
+ clarot_(&c_false, &L__1, &c_true, &il, &ct, &st, &
+ a[irow - iskew * jch + ioffg + jch *
+ a_dim1], &ilda, &extra, &ctemp);
+ icol = jch;
+/* L180: */
+ }
+/* L190: */
+ }
+/* L200: */
+ }
+
+/* If we need lower triangle, copy from upper. No
+te that
+ the order of copying is chosen to work for 'q'
+ -> 'b' */
+
+ if (ipack != ipackg && ipack != 3) {
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ irow = ioffst - iskew * jc;
+ if (csym) {
+/* Computing MIN */
+ i__2 = *n, i__3 = jc + uub;
+ i__4 = min(i__2,i__3);
+ for (jr = jc; jr <= i__4; ++jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ i__3 = jc - iskew * jr + ioffg + jr * a_dim1;
+ a[i__2].r = a[i__3].r, a[i__2].i = a[i__3].i;
+/* L210: */
+ }
+ } else {
+/* Computing MIN */
+ i__2 = *n, i__3 = jc + uub;
+ i__4 = min(i__2,i__3);
+ for (jr = jc; jr <= i__4; ++jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ r_cnjg(&q__1, &a[jc - iskew * jr + ioffg + jr
+ * a_dim1]);
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+/* L220: */
+ }
+ }
+/* L230: */
+ }
+ if (ipack == 5) {
+ i__1 = *n;
+ for (jc = *n - uub + 1; jc <= i__1; ++jc) {
+ i__4 = uub + 1;
+ for (jr = *n + 2 - jc; jr <= i__4; ++jr) {
+ i__2 = jr + jc * a_dim1;
+ a[i__2].r = 0.f, a[i__2].i = 0.f;
+/* L240: */
+ }
+/* L250: */
+ }
+ }
+ if (ipackg == 6) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ } else {
+
+/* Bottom-Up -- Generate Lower triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 5;
+ if (ipack == 6) {
+ ioffg = 1;
+ }
+ } else {
+ ipackg = 2;
+ }
+
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__4 = (1 - iskew) * j + ioffg + j * a_dim1;
+ i__2 = j;
+ q__1.r = d[i__2], q__1.i = 0.f;
+ a[i__4].r = q__1.r, a[i__4].i = q__1.i;
+/* L260: */
+ }
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ for (jc = *n - 1; jc >= 1; --jc) {
+/* Computing MIN */
+ i__4 = *n + 1 - jc, i__2 = k + 2;
+ il = min(i__4,i__2);
+ extra.r = 0.f, extra.i = 0.f;
+ i__4 = (1 - iskew) * jc + 1 + ioffg + jc * a_dim1;
+ ctemp.r = a[i__4].r, ctemp.i = a[i__4].i;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ d__1 = cos(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ c.r = q__1.r, c.i = q__1.i;
+ d__1 = sin(angle);
+ clarnd_(&q__2, &c__5, &iseed[1]);
+ q__1.r = d__1 * q__2.r, q__1.i = d__1 * q__2.i;
+ s.r = q__1.r, s.i = q__1.i;
+ if (csym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ r_cnjg(&q__1, &ctemp);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ r_cnjg(&q__1, &c);
+ ct.r = q__1.r, ct.i = q__1.i;
+ r_cnjg(&q__1, &s);
+ st.r = q__1.r, st.i = q__1.i;
+ }
+ L__1 = *n - jc > k;
+ clarot_(&c_false, &c_true, &L__1, &il, &c, &s, &a[(1
+ - iskew) * jc + ioffg + jc * a_dim1], &ilda, &
+ ctemp, &extra);
+/* Computing MAX */
+ i__4 = 1, i__2 = jc - k + 1;
+ icol = max(i__4,i__2);
+ i__4 = jc + 2 - icol;
+ clarot_(&c_true, &c_false, &c_true, &i__4, &ct, &st, &
+ a[jc - iskew * icol + ioffg + icol * a_dim1],
+ &ilda, &dummy, &ctemp);
+
+/* Chase EXTRA back down the matrix
+ */
+
+ icol = jc;
+ i__4 = *n - 1;
+ i__2 = k;
+ for (jch = jc + k; i__2 < 0 ? jch >= i__4 : jch <=
+ i__4; jch += i__2) {
+ clartg_(&a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &extra, &realc, &s, &dummy);
+ clarnd_(&q__1, &c__5, &iseed[1]);
+ dummy.r = q__1.r, dummy.i = q__1.i;
+ q__1.r = realc * dummy.r, q__1.i = realc *
+ dummy.i;
+ c.r = q__1.r, c.i = q__1.i;
+ q__1.r = s.r * dummy.r - s.i * dummy.i, q__1.i =
+ s.r * dummy.i + s.i * dummy.r;
+ s.r = q__1.r, s.i = q__1.i;
+ i__3 = (1 - iskew) * jch + 1 + ioffg + jch *
+ a_dim1;
+ ctemp.r = a[i__3].r, ctemp.i = a[i__3].i;
+ if (csym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ r_cnjg(&q__1, &ctemp);
+ ctemp.r = q__1.r, ctemp.i = q__1.i;
+ r_cnjg(&q__1, &c);
+ ct.r = q__1.r, ct.i = q__1.i;
+ r_cnjg(&q__1, &s);
+ st.r = q__1.r, st.i = q__1.i;
+ }
+ i__3 = k + 2;
+ clarot_(&c_true, &c_true, &c_true, &i__3, &c, &s,
+ &a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &ilda, &extra, &ctemp);
+/* Computing MIN */
+ i__3 = *n + 1 - jch, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra.r = 0.f, extra.i = 0.f;
+ L__1 = *n - jch > k;
+ clarot_(&c_false, &c_true, &L__1, &il, &ct, &st, &
+ a[(1 - iskew) * jch + ioffg + jch *
+ a_dim1], &ilda, &ctemp, &extra);
+ icol = jch;
+/* L270: */
+ }
+/* L280: */
+ }
+/* L290: */
+ }
+
+/* If we need upper triangle, copy from lower. No
+te that
+ the order of copying is chosen to work for 'b'
+ -> 'q' */
+
+ if (ipack != ipackg && ipack != 4) {
+ for (jc = *n; jc >= 1; --jc) {
+ irow = ioffst - iskew * jc;
+ if (csym) {
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - uub;
+ i__1 = max(i__2,i__4);
+ for (jr = jc; jr >= i__1; --jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ i__4 = jc - iskew * jr + ioffg + jr * a_dim1;
+ a[i__2].r = a[i__4].r, a[i__2].i = a[i__4].i;
+/* L300: */
+ }
+ } else {
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - uub;
+ i__1 = max(i__2,i__4);
+ for (jr = jc; jr >= i__1; --jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ r_cnjg(&q__1, &a[jc - iskew * jr + ioffg + jr
+ * a_dim1]);
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+/* L310: */
+ }
+ }
+/* L320: */
+ }
+ if (ipack == 6) {
+ i__1 = uub;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ i__4 = jr + jc * a_dim1;
+ a[i__4].r = 0.f, a[i__4].i = 0.f;
+/* L330: */
+ }
+/* L340: */
+ }
+ }
+ if (ipackg == 5) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ }
+
+/* Ensure that the diagonal is real if Hermitian */
+
+ if (! csym) {
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ irow = ioffst + (1 - iskew) * jc;
+ i__2 = irow + jc * a_dim1;
+ i__4 = irow + jc * a_dim1;
+ d__1 = a[i__4].r;
+ q__1.r = d__1, q__1.i = 0.f;
+ a[i__2].r = q__1.r, a[i__2].i = q__1.i;
+/* L350: */
+ }
+ }
+
+ }
+
+ } else {
+
+/* 4) Generate Banded Matrix by first
+ Rotating by random Unitary matrices,
+ then reducing the bandwidth using Householder
+ transformations.
+
+ Note: we should get here only if LDA .ge. N */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ clagge_(&mr, &nc, &llb, &uub, &d[1], &a[a_offset], lda, &iseed[1],
+ &work[1], &iinfo);
+ } else {
+
+/* Symmetric -- A = U D U' or
+ Hermitian -- A = U D U* */
+
+ if (csym) {
+ clagsy_(m, &llb, &d[1], &a[a_offset], lda, &iseed[1], &work[1]
+ , &iinfo);
+ } else {
+ claghe_(m, &llb, &d[1], &a[a_offset], lda, &iseed[1], &work[1]
+ , &iinfo);
+ }
+ }
+
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* 5) Pack the matrix */
+
+ if (ipack != ipackg) {
+ if (ipack == 1) {
+
+/* 'U' -- Upper triangular, not packed */
+
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__4 = i + j * a_dim1;
+ a[i__4].r = 0.f, a[i__4].i = 0.f;
+/* L360: */
+ }
+/* L370: */
+ }
+
+ } else if (ipack == 2) {
+
+/* 'L' -- Lower triangular, not packed */
+
+ i__1 = *m;
+ for (j = 2; j <= i__1; ++j) {
+ i__2 = j - 1;
+ for (i = 1; i <= i__2; ++i) {
+ i__4 = i + j * a_dim1;
+ a[i__4].r = 0.f, a[i__4].i = 0.f;
+/* L380: */
+ }
+/* L390: */
+ }
+
+ } else if (ipack == 3) {
+
+/* 'C' -- Upper triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ i__4 = irow + icol * a_dim1;
+ i__3 = i + j * a_dim1;
+ a[i__4].r = a[i__3].r, a[i__4].i = a[i__3].i;
+/* L400: */
+ }
+/* L410: */
+ }
+
+ } else if (ipack == 4) {
+
+/* 'R' -- Lower triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ i__4 = irow + icol * a_dim1;
+ i__3 = i + j * a_dim1;
+ a[i__4].r = a[i__3].r, a[i__4].i = a[i__3].i;
+/* L420: */
+ }
+/* L430: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* 'B' -- The lower triangle is packed as a band matrix.
+
+ 'Q' -- The upper triangle is packed as a band matrix.
+
+ 'Z' -- The whole matrix is packed as a band matrix.
+*/
+
+ if (ipack == 5) {
+ uub = 0;
+ }
+ if (ipack == 6) {
+ llb = 0;
+ }
+
+ i__1 = uub;
+ for (j = 1; j <= i__1; ++j) {
+/* Computing MIN */
+ i__2 = j + llb;
+ for (i = min(i__2,*m); i >= 1; --i) {
+ i__2 = i - j + uub + 1 + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ a[i__2].r = a[i__4].r, a[i__2].i = a[i__4].i;
+/* L440: */
+ }
+/* L450: */
+ }
+
+ i__1 = *n;
+ for (j = uub + 2; j <= i__1; ++j) {
+/* Computing MIN */
+ i__4 = j + llb;
+ i__2 = min(i__4,*m);
+ for (i = j - uub; i <= i__2; ++i) {
+ i__4 = i - j + uub + 1 + j * a_dim1;
+ i__3 = i + j * a_dim1;
+ a[i__4].r = a[i__3].r, a[i__4].i = a[i__3].i;
+/* L460: */
+ }
+/* L470: */
+ }
+ }
+
+/* If packed, zero out extraneous elements.
+
+ Symmetric/Triangular Packed --
+ zero out everything after A(IROW,ICOL) */
+
+ if (ipack == 3 || ipack == 4) {
+ i__1 = *m;
+ for (jc = icol; jc <= i__1; ++jc) {
+ i__2 = *lda;
+ for (jr = irow + 1; jr <= i__2; ++jr) {
+ i__4 = jr + jc * a_dim1;
+ a[i__4].r = 0.f, a[i__4].i = 0.f;
+/* L480: */
+ }
+ irow = 0;
+/* L490: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* Packed Band --
+ 1st row is now in A( UUB+2-j, j), zero above it
+ m-th row is now in A( M+UUB-j,j), zero below it
+ last non-zero diagonal is now in A( UUB+LLB+1,j ),
+
+ zero below it, too. */
+
+ ir1 = uub + llb + 2;
+ ir2 = uub + *m + 2;
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ i__4 = jr + jc * a_dim1;
+ a[i__4].r = 0.f, a[i__4].i = 0.f;
+/* L500: */
+ }
+/* Computing MAX
+ Computing MIN */
+ i__3 = ir1, i__5 = ir2 - jc;
+ i__2 = 1, i__4 = min(i__3,i__5);
+ i__6 = *lda;
+ for (jr = max(i__2,i__4); jr <= i__6; ++jr) {
+ i__2 = jr + jc * a_dim1;
+ a[i__2].r = 0.f, a[i__2].i = 0.f;
+/* L510: */
+ }
+/* L520: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CLATMS */
+
+} /* clatms_ */
+
diff --git a/TESTING/MATGEN/csymv.c b/TESTING/MATGEN/csymv.c
new file mode 100644
index 0000000..94470c2
--- /dev/null
+++ b/TESTING/MATGEN/csymv.c
@@ -0,0 +1,408 @@
+#include "f2c.h"
+
+/* Subroutine */ int csymv_(char *uplo, integer *n, complex *alpha, complex *
+ a, integer *lda, complex *x, integer *incx, complex *beta, complex *y,
+ integer *incy)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ CSYMV performs the matrix-vector operation
+
+ y := alpha*A*x + beta*y,
+
+ where alpha and beta are scalars, x and y are n element vectors and
+ A is an n by n symmetric matrix.
+
+ Arguments
+ ==========
+
+ UPLO - CHARACTER*1
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - COMPLEX array, dimension ( LDA, N )
+ Before entry, with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the symmetric matrix and the strictly
+ lower triangular part of A is not referenced.
+ Before entry, with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the symmetric matrix and the strictly
+ upper triangular part of A is not referenced.
+ Unchanged on exit.
+
+ LDA - INTEGER
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, N ).
+ Unchanged on exit.
+
+ X - COMPLEX array, dimension at least
+ ( 1 + ( N - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the N-
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - COMPLEX
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - COMPLEX array, dimension at least
+ ( 1 + ( N - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y. On exit, Y is overwritten by the updated
+ vector y.
+
+ INCY - INTEGER
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ =====================================================================
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ complex q__1, q__2, q__3, q__4;
+ /* Local variables */
+ static integer info;
+ static complex temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*lda < max(1,*n)) {
+ info = 5;
+ } else if (*incx == 0) {
+ info = 7;
+ } else if (*incy == 0) {
+ info = 10;
+ }
+ if (info != 0) {
+ xerbla_("CSYMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || alpha->r == 0.f && alpha->i == 0.f && (beta->r == 1.f &&
+ beta->i == 0.f)) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y. */
+
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A.
+
+ First form y := beta*y. */
+
+ if (beta->r != 1.f || beta->i != 0.f) {
+ if (*incy == 1) {
+ if (beta->r == 0.f && beta->i == 0.f) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ Y(i).r = 0.f, Y(i).i = 0.f;
+/* L10: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ q__1.r = beta->r * Y(i).r - beta->i * Y(i).i,
+ q__1.i = beta->r * Y(i).i + beta->i * Y(i)
+ .r;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (beta->r == 0.f && beta->i == 0.f) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ Y(iy).r = 0.f, Y(iy).i = 0.f;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ q__1.r = beta->r * Y(iy).r - beta->i * Y(iy).i,
+ q__1.i = beta->r * Y(iy).i + beta->i * Y(iy)
+ .r;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (alpha->r == 0.f && alpha->i == 0.f) {
+ return 0;
+ }
+ if (lsame_(uplo, "U")) {
+
+/* Form y when A is stored in upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ q__1.r = alpha->r * X(j).r - alpha->i * X(j).i, q__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(i).r + q__2.r, q__1.i = Y(i).i + q__2.i;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ q__2.r = A(i,j).r * X(i).r - A(i,j).i * X(i).i,
+ q__2.i = A(i,j).r * X(i).i + A(i,j).i * X(
+ i).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+/* L50: */
+ }
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ q__3.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, q__3.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ q__2.r = Y(j).r + q__3.r, q__2.i = Y(j).i + q__3.i;
+ q__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ Y(j).r = q__1.r, Y(j).i = q__1.i;
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ q__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, q__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(iy).r + q__2.r, q__1.i = Y(iy).i + q__2.i;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ q__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(ix).i,
+ q__2.i = A(i,j).r * X(ix).i + A(i,j).i * X(
+ ix).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ q__3.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, q__3.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ q__2.r = Y(jy).r + q__3.r, q__2.i = Y(jy).i + q__3.i;
+ q__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y when A is stored in lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ q__1.r = alpha->r * X(j).r - alpha->i * X(j).i, q__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ q__2.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, q__2.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ q__1.r = Y(j).r + q__2.r, q__1.i = Y(j).i + q__2.i;
+ Y(j).r = q__1.r, Y(j).i = q__1.i;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(i).r + q__2.r, q__1.i = Y(i).i + q__2.i;
+ Y(i).r = q__1.r, Y(i).i = q__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ q__2.r = A(i,j).r * X(i).r - A(i,j).i * X(i).i,
+ q__2.i = A(i,j).r * X(i).i + A(i,j).i * X(
+ i).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+/* L90: */
+ }
+ i__2 = j;
+ i__3 = j;
+ q__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = Y(j).r + q__2.r, q__1.i = Y(j).i + q__2.i;
+ Y(j).r = q__1.r, Y(j).i = q__1.i;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ q__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, q__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = q__1.r, temp1.i = q__1.i;
+ temp2.r = 0.f, temp2.i = 0.f;
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ q__2.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, q__2.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ q__1.r = Y(jy).r + q__2.r, q__1.i = Y(jy).i + q__2.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ q__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ q__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ q__1.r = Y(iy).r + q__2.r, q__1.i = Y(iy).i + q__2.i;
+ Y(iy).r = q__1.r, Y(iy).i = q__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ q__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(ix).i,
+ q__2.i = A(i,j).r * X(ix).i + A(i,j).i * X(
+ ix).r;
+ q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;
+ temp2.r = q__1.r, temp2.i = q__1.i;
+/* L110: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ q__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ q__1.r = Y(jy).r + q__2.r, q__1.i = Y(jy).i + q__2.i;
+ Y(jy).r = q__1.r, Y(jy).i = q__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of CSYMV */
+
+} /* csymv_ */
+
diff --git a/TESTING/MATGEN/d_lg10.c b/TESTING/MATGEN/d_lg10.c
new file mode 100644
index 0000000..f03ff00
--- /dev/null
+++ b/TESTING/MATGEN/d_lg10.c
@@ -0,0 +1,15 @@
+#include "f2c.h"
+
+#define log10e 0.43429448190325182765
+
+#ifdef KR_headers
+double log();
+double d_lg10(x) doublereal *x;
+#else
+#undef abs
+#include "math.h"
+double d_lg10(doublereal *x)
+#endif
+{
+return( log10e * log(*x) );
+}
diff --git a/TESTING/MATGEN/d_sign.c b/TESTING/MATGEN/d_sign.c
new file mode 100644
index 0000000..514ff0b
--- /dev/null
+++ b/TESTING/MATGEN/d_sign.c
@@ -0,0 +1,12 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+double d_sign(a,b) doublereal *a, *b;
+#else
+double d_sign(doublereal *a, doublereal *b)
+#endif
+{
+double x;
+x = (*a >= 0 ? *a : - *a);
+return( *b >= 0 ? x : -x);
+}
diff --git a/TESTING/MATGEN/dlabad.c b/TESTING/MATGEN/dlabad.c
new file mode 100644
index 0000000..03fa9fd
--- /dev/null
+++ b/TESTING/MATGEN/dlabad.c
@@ -0,0 +1,60 @@
+#include "f2c.h"
+
+/* Subroutine */ int dlabad_(doublereal *small, doublereal *large)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLABAD takes as input the values computed by SLAMCH for underflow and
+
+ overflow, and returns the square root of each of these values if the
+
+ log of LARGE is sufficiently large. This subroutine is intended to
+ identify machines with a large exponent range, such as the Crays, and
+
+ redefine the underflow and overflow limits to be the square roots of
+
+ the values computed by DLAMCH. This subroutine is needed because
+ DLAMCH does not compensate for poor arithmetic in the upper half of
+ the exponent range, as is found on a Cray.
+
+ Arguments
+ =========
+
+ SMALL (input/output) DOUBLE PRECISION
+ On entry, the underflow threshold as computed by DLAMCH.
+ On exit, if LOG10(LARGE) is sufficiently large, the square
+ root of SMALL, otherwise unchanged.
+
+ LARGE (input/output) DOUBLE PRECISION
+ On entry, the overflow threshold as computed by DLAMCH.
+ On exit, if LOG10(LARGE) is sufficiently large, the square
+ root of LARGE, otherwise unchanged.
+
+ =====================================================================
+
+
+
+ If it looks like we're on a Cray, take the square root of
+ SMALL and LARGE to avoid overflow and underflow problems. */
+ /* Builtin functions */
+ double d_lg10(doublereal *), sqrt(doublereal);
+
+
+ if (d_lg10(large) > 2e3) {
+ *small = sqrt(*small);
+ *large = sqrt(*large);
+ }
+
+ return 0;
+
+/* End of DLABAD */
+
+} /* dlabad_ */
+
diff --git a/TESTING/MATGEN/dlagge.c b/TESTING/MATGEN/dlagge.c
new file mode 100644
index 0000000..8d4e4ba
--- /dev/null
+++ b/TESTING/MATGEN/dlagge.c
@@ -0,0 +1,402 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__3 = 3;
+static integer c__1 = 1;
+static doublereal c_b11 = 1.;
+static doublereal c_b13 = 0.;
+
+/* Subroutine */ int dlagge_(integer *m, integer *n, integer *kl, integer *ku,
+ doublereal *d, doublereal *a, integer *lda, integer *iseed,
+ doublereal *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublereal d__1;
+
+ /* Builtin functions */
+ double d_sign(doublereal *, doublereal *);
+
+ /* Local variables */
+ extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ integer *);
+ extern doublereal dnrm2_(integer *, doublereal *, integer *);
+ static integer i, j;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *), dgemv_(char *, integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ doublereal *, integer *);
+ static doublereal wa, wb, wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), dlarnv_(
+ integer *, integer *, integer *, doublereal *);
+ static doublereal tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0)
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ DLAGGE generates a real general m by n matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with random orthogonal matrices:
+
+ A = U*D*V. The lower and upper bandwidths may then be reduced to
+ kl and ku by additional orthogonal transformations.
+
+ Arguments
+ =========
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ KL (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= KL <= M-1.
+
+ KU (input) INTEGER
+ The number of nonzero superdiagonals within the band of A.
+ 0 <= KU <= N-1.
+
+ D (input) DOUBLE PRECISION array, dimension (min(M,N))
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) DOUBLE PRECISION array, dimension (LDA,N)
+ The generated m by n matrix A.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= M.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) DOUBLE PRECISION array, dimension (M+N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*m < 0) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (*kl < 0 || *kl > *m - 1) {
+ *info = -3;
+ } else if (*ku < 0 || *ku > *n - 1) {
+ *info = -4;
+ } else if (*lda < max(1,*m)) {
+ *info = -7;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("DLAGGE", &i__1);
+ return 0;
+ }
+
+/* initialize A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = min(*m,*n);
+ for (i = 1; i <= i__1; ++i) {
+ a[i + i * a_dim1] = d[i];
+/* L30: */
+ }
+
+/* pre- and post-multiply A by random orthogonal matrices */
+
+ for (i = min(*m,*n); i >= 1; --i) {
+ if (i < *m) {
+
+/* generate random reflection */
+
+ i__1 = *m - i + 1;
+ dlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *m - i + 1;
+ wn = dnrm2_(&i__1, &work[1], &c__1);
+ wa = d_sign(&wn, &work[1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *m - i;
+ d__1 = 1. / wb;
+ dscal_(&i__1, &d__1, &work[2], &c__1);
+ work[1] = 1.;
+ tau = wb / wa;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the lef
+t */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ dgemv_("Transpose", &i__1, &i__2, &c_b11, &a[i + i * a_dim1], lda,
+ &work[1], &c__1, &c_b13, &work[*m + 1], &c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ d__1 = -tau;
+ dger_(&i__1, &i__2, &d__1, &work[1], &c__1, &work[*m + 1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+ if (i < *n) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ dlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dnrm2_(&i__1, &work[1], &c__1);
+ wa = d_sign(&wn, &work[1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *n - i;
+ d__1 = 1. / wb;
+ dscal_(&i__1, &d__1, &work[2], &c__1);
+ work[1] = 1.;
+ tau = wb / wa;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the rig
+ht */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ dgemv_("No transpose", &i__1, &i__2, &c_b11, &a[i + i * a_dim1],
+ lda, &work[1], &c__1, &c_b13, &work[*n + 1], &c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ d__1 = -tau;
+ dger_(&i__1, &i__2, &d__1, &work[*n + 1], &c__1, &work[1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to KL and number of superdiagonals
+ to KU
+
+ Computing MAX */
+ i__2 = *m - 1 - *kl, i__3 = *n - 1 - *ku;
+ i__1 = max(i__2,i__3);
+ for (i = 1; i <= i__1; ++i) {
+ if (*kl <= *ku) {
+
+/* annihilate subdiagonal elements first (necessary if K
+L = 0)
+
+ Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = dnrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ wa = d_sign(&wn, &a[*kl + i + i * a_dim1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = a[*kl + i + i * a_dim1] + wa;
+ i__2 = *m - *kl - i;
+ d__1 = 1. / wb;
+ dscal_(&i__2, &d__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ a[*kl + i + i * a_dim1] = 1.;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ dgemv_("Transpose", &i__2, &i__3, &c_b11, &a[*kl + i + (i + 1)
+ * a_dim1], lda, &a[*kl + i + i * a_dim1], &c__1, &
+ c_b13, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ d__1 = -tau;
+ dger_(&i__2, &i__3, &d__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ a[*kl + i + i * a_dim1] = -wa;
+ }
+
+/* Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = dnrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ wa = d_sign(&wn, &a[i + (*ku + i) * a_dim1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = a[i + (*ku + i) * a_dim1] + wa;
+ i__2 = *n - *ku - i;
+ d__1 = 1. / wb;
+ dscal_(&i__2, &d__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = 1.;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ dgemv_("No transpose", &i__2, &i__3, &c_b11, &a[i + 1 + (*ku
+ + i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda,
+ &c_b13, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ d__1 = -tau;
+ dger_(&i__2, &i__3, &d__1, &work[1], &c__1, &a[i + (*ku + i) *
+ a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = -wa;
+ }
+ } else {
+
+/* annihilate superdiagonal elements first (necessary if
+
+ KU = 0)
+
+ Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = dnrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ wa = d_sign(&wn, &a[i + (*ku + i) * a_dim1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = a[i + (*ku + i) * a_dim1] + wa;
+ i__2 = *n - *ku - i;
+ d__1 = 1. / wb;
+ dscal_(&i__2, &d__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = 1.;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ dgemv_("No transpose", &i__2, &i__3, &c_b11, &a[i + 1 + (*ku
+ + i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda,
+ &c_b13, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ d__1 = -tau;
+ dger_(&i__2, &i__3, &d__1, &work[1], &c__1, &a[i + (*ku + i) *
+ a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = -wa;
+ }
+
+/* Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = dnrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ wa = d_sign(&wn, &a[*kl + i + i * a_dim1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = a[*kl + i + i * a_dim1] + wa;
+ i__2 = *m - *kl - i;
+ d__1 = 1. / wb;
+ dscal_(&i__2, &d__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ a[*kl + i + i * a_dim1] = 1.;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ dgemv_("Transpose", &i__2, &i__3, &c_b11, &a[*kl + i + (i + 1)
+ * a_dim1], lda, &a[*kl + i + i * a_dim1], &c__1, &
+ c_b13, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ d__1 = -tau;
+ dger_(&i__2, &i__3, &d__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ a[*kl + i + i * a_dim1] = -wa;
+ }
+ }
+
+ i__2 = *m;
+ for (j = *kl + i + 1; j <= i__2; ++j) {
+ a[j + i * a_dim1] = 0.;
+/* L50: */
+ }
+
+ i__2 = *n;
+ for (j = *ku + i + 1; j <= i__2; ++j) {
+ a[i + j * a_dim1] = 0.;
+/* L60: */
+ }
+/* L70: */
+ }
+ return 0;
+
+/* End of DLAGGE */
+
+} /* dlagge_ */
+
diff --git a/TESTING/MATGEN/dlagsy.c b/TESTING/MATGEN/dlagsy.c
new file mode 100644
index 0000000..46c837a
--- /dev/null
+++ b/TESTING/MATGEN/dlagsy.c
@@ -0,0 +1,276 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__3 = 3;
+static integer c__1 = 1;
+static doublereal c_b12 = 0.;
+static doublereal c_b19 = -1.;
+static doublereal c_b26 = 1.;
+
+/* Subroutine */ int dlagsy_(integer *n, integer *k, doublereal *d,
+ doublereal *a, integer *lda, integer *iseed, doublereal *work,
+ integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublereal d__1;
+
+ /* Builtin functions */
+ double d_sign(doublereal *, doublereal *);
+
+ /* Local variables */
+ extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ integer *);
+ extern doublereal ddot_(integer *, doublereal *, integer *, doublereal *,
+ integer *), dnrm2_(integer *, doublereal *, integer *);
+ extern /* Subroutine */ int dsyr2_(char *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ integer *);
+ static integer i, j;
+ static doublereal alpha;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *), dgemv_(char *, integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ doublereal *, integer *), daxpy_(integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *), dsymv_(char *,
+ integer *, doublereal *, doublereal *, integer *, doublereal *,
+ integer *, doublereal *, doublereal *, integer *);
+ static doublereal wa, wb, wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), dlarnv_(
+ integer *, integer *, integer *, doublereal *);
+ static doublereal tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0)
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ DLAGSY generates a real symmetric matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with a random orthogonal matrix:
+
+ A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+
+ orthogonal transformations.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ K (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= K <= N-1.
+
+ D (input) DOUBLE PRECISION array, dimension (N)
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) DOUBLE PRECISION array, dimension (LDA,N)
+ The generated n by n symmetric matrix A (the full matrix is
+ stored).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*k < 0 || *k > *n - 1) {
+ *info = -2;
+ } else if (*lda < max(1,*n)) {
+ *info = -5;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("DLAGSY", &i__1);
+ return 0;
+ }
+
+/* initialize lower triangle of A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ a[i + i * a_dim1] = d[i];
+/* L30: */
+ }
+
+/* Generate lower triangle of symmetric matrix */
+
+ for (i = *n - 1; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ dlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dnrm2_(&i__1, &work[1], &c__1);
+ wa = d_sign(&wn, &work[1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *n - i;
+ d__1 = 1. / wb;
+ dscal_(&i__1, &d__1, &work[2], &c__1);
+ work[1] = 1.;
+ tau = wb / wa;
+ }
+
+/* apply random reflection to A(i:n,i:n) from the left
+ and the right
+
+ compute y := tau * A * u */
+
+ i__1 = *n - i + 1;
+ dsymv_("Lower", &i__1, &tau, &a[i + i * a_dim1], lda, &work[1], &c__1,
+ &c_b12, &work[*n + 1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ i__1 = *n - i + 1;
+ alpha = tau * -.5 * ddot_(&i__1, &work[*n + 1], &c__1, &work[1], &
+ c__1);
+ i__1 = *n - i + 1;
+ daxpy_(&i__1, &alpha, &work[1], &c__1, &work[*n + 1], &c__1);
+
+/* apply the transformation as a rank-2 update to A(i:n,i:n) */
+
+ i__1 = *n - i + 1;
+ dsyr2_("Lower", &i__1, &c_b19, &work[1], &c__1, &work[*n + 1], &c__1,
+ &a[i + i * a_dim1], lda);
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to K */
+
+ i__1 = *n - 1 - *k;
+ for (i = 1; i <= i__1; ++i) {
+
+/* generate reflection to annihilate A(k+i+1:n,i) */
+
+ i__2 = *n - *k - i + 1;
+ wn = dnrm2_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ wa = d_sign(&wn, &a[*k + i + i * a_dim1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = a[*k + i + i * a_dim1] + wa;
+ i__2 = *n - *k - i;
+ d__1 = 1. / wb;
+ dscal_(&i__2, &d__1, &a[*k + i + 1 + i * a_dim1], &c__1);
+ a[*k + i + i * a_dim1] = 1.;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(k+i:n,i+1:k+i-1) from the left */
+
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ dgemv_("Transpose", &i__2, &i__3, &c_b26, &a[*k + i + (i + 1) *
+ a_dim1], lda, &a[*k + i + i * a_dim1], &c__1, &c_b12, &work[1]
+ , &c__1);
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ d__1 = -tau;
+ dger_(&i__2, &i__3, &d__1, &a[*k + i + i * a_dim1], &c__1, &work[1], &
+ c__1, &a[*k + i + (i + 1) * a_dim1], lda);
+
+/* apply reflection to A(k+i:n,k+i:n) from the left and the rig
+ht
+
+ compute y := tau * A * u */
+
+ i__2 = *n - *k - i + 1;
+ dsymv_("Lower", &i__2, &tau, &a[*k + i + (*k + i) * a_dim1], lda, &a[*
+ k + i + i * a_dim1], &c__1, &c_b12, &work[1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ i__2 = *n - *k - i + 1;
+ alpha = tau * -.5 * ddot_(&i__2, &work[1], &c__1, &a[*k + i + i *
+ a_dim1], &c__1);
+ i__2 = *n - *k - i + 1;
+ daxpy_(&i__2, &alpha, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1)
+ ;
+
+/* apply symmetric rank-2 update to A(k+i:n,k+i:n) */
+
+ i__2 = *n - *k - i + 1;
+ dsyr2_("Lower", &i__2, &c_b19, &a[*k + i + i * a_dim1], &c__1, &work[
+ 1], &c__1, &a[*k + i + (*k + i) * a_dim1], lda);
+
+ a[*k + i + i * a_dim1] = -wa;
+ i__2 = *n;
+ for (j = *k + i + 1; j <= i__2; ++j) {
+ a[j + i * a_dim1] = 0.;
+/* L50: */
+ }
+/* L60: */
+ }
+
+/* Store full symmetric matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ a[j + i * a_dim1] = a[i + j * a_dim1];
+/* L70: */
+ }
+/* L80: */
+ }
+ return 0;
+
+/* End of DLAGSY */
+
+} /* dlagsy_ */
+
diff --git a/TESTING/MATGEN/dlaran.c b/TESTING/MATGEN/dlaran.c
new file mode 100644
index 0000000..c4101b8
--- /dev/null
+++ b/TESTING/MATGEN/dlaran.c
@@ -0,0 +1,92 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dlaran_(integer *iseed)
+{
+ /* System generated locals */
+ doublereal ret_val;
+
+ /* Local variables */
+ static integer it1, it2, it3, it4;
+
+
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ DLARAN returns a random real number from a uniform (0,1)
+ distribution.
+
+ Arguments
+ =========
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ Further Details
+ ===============
+
+ This routine uses a multiplicative congruential method with modulus
+ 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+ 'Multiplicative congruential random number generators with modulus
+ 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+ b = 48', Math. Comp. 189, pp 331-344, 1990).
+
+ 48-bit integers are stored in 4 integer array elements with 12 bits
+ per element. Hence the routine is portable across machines with
+ integers of 32 bits or more.
+
+ =====================================================================
+
+
+
+ multiply the seed by the multiplier modulo 2**48
+
+ Parameter adjustments */
+ --iseed;
+
+ /* Function Body */
+ it4 = iseed[4] * 2549;
+ it3 = it4 / 4096;
+ it4 -= it3 << 12;
+ it3 = it3 + iseed[3] * 2549 + iseed[4] * 2508;
+ it2 = it3 / 4096;
+ it3 -= it2 << 12;
+ it2 = it2 + iseed[2] * 2549 + iseed[3] * 2508 + iseed[4] * 322;
+ it1 = it2 / 4096;
+ it2 -= it1 << 12;
+ it1 = it1 + iseed[1] * 2549 + iseed[2] * 2508 + iseed[3] * 322 + iseed[4]
+ * 494;
+ it1 %= 4096;
+
+/* return updated seed */
+
+ iseed[1] = it1;
+ iseed[2] = it2;
+ iseed[3] = it3;
+ iseed[4] = it4;
+
+/* convert 48-bit integer to a real number in the interval (0,1) */
+
+ ret_val = ((doublereal) it1 + ((doublereal) it2 + ((doublereal) it3 + (
+ doublereal) it4 * 2.44140625e-4) * 2.44140625e-4) * 2.44140625e-4)
+ * 2.44140625e-4;
+ return ret_val;
+
+/* End of DLARAN */
+
+} /* dlaran_ */
+
diff --git a/TESTING/MATGEN/dlarge.c b/TESTING/MATGEN/dlarge.c
new file mode 100644
index 0000000..86840c4
--- /dev/null
+++ b/TESTING/MATGEN/dlarge.c
@@ -0,0 +1,154 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__3 = 3;
+static integer c__1 = 1;
+static doublereal c_b8 = 1.;
+static doublereal c_b10 = 0.;
+
+/* Subroutine */ int dlarge_(integer *n, doublereal *a, integer *lda, integer
+ *iseed, doublereal *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1;
+ doublereal d__1;
+
+ /* Builtin functions */
+ double d_sign(doublereal *, doublereal *);
+
+ /* Local variables */
+ extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ integer *);
+ extern doublereal dnrm2_(integer *, doublereal *, integer *);
+ static integer i;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *), dgemv_(char *, integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ doublereal *, integer *);
+ static doublereal wa, wb, wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), dlarnv_(
+ integer *, integer *, integer *, doublereal *);
+ static doublereal tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0)
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ DLARGE pre- and post-multiplies a real general n by n matrix A
+ with a random orthogonal matrix: A = U*D*U'.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ On entry, the original n by n matrix A.
+ On exit, A is overwritten by U*A*U' for some random
+ orthogonal matrix U.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*lda < max(1,*n)) {
+ *info = -3;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("DLARGE", &i__1);
+ return 0;
+ }
+
+/* pre- and post-multiply A by random orthogonal matrix */
+
+ for (i = *n; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ dlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dnrm2_(&i__1, &work[1], &c__1);
+ wa = d_sign(&wn, &work[1]);
+ if (wn == 0.) {
+ tau = 0.;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *n - i;
+ d__1 = 1. / wb;
+ dscal_(&i__1, &d__1, &work[2], &c__1);
+ work[1] = 1.;
+ tau = wb / wa;
+ }
+
+/* multiply A(i:n,1:n) by random reflection from the left */
+
+ i__1 = *n - i + 1;
+ dgemv_("Transpose", &i__1, n, &c_b8, &a[i + a_dim1], lda, &work[1], &
+ c__1, &c_b10, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ d__1 = -tau;
+ dger_(&i__1, n, &d__1, &work[1], &c__1, &work[*n + 1], &c__1, &a[i +
+ a_dim1], lda);
+
+/* multiply A(1:n,i:n) by random reflection from the right */
+
+ i__1 = *n - i + 1;
+ dgemv_("No transpose", n, &i__1, &c_b8, &a[i * a_dim1 + 1], lda, &
+ work[1], &c__1, &c_b10, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ d__1 = -tau;
+ dger_(n, &i__1, &d__1, &work[*n + 1], &c__1, &work[1], &c__1, &a[i *
+ a_dim1 + 1], lda);
+/* L10: */
+ }
+ return 0;
+
+/* End of DLARGE */
+
+} /* dlarge_ */
+
diff --git a/TESTING/MATGEN/dlarnd.c b/TESTING/MATGEN/dlarnd.c
new file mode 100644
index 0000000..20ec813
--- /dev/null
+++ b/TESTING/MATGEN/dlarnd.c
@@ -0,0 +1,94 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dlarnd_(integer *idist, integer *iseed)
+{
+ /* System generated locals */
+ doublereal ret_val;
+
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal), cos(doublereal);
+
+ /* Local variables */
+ static doublereal t1, t2;
+ extern doublereal dlaran_(integer *);
+
+
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLARND returns a random real number from a uniform or normal
+ distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: uniform (0,1)
+ = 2: uniform (-1,1)
+ = 3: normal (0,1)
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine DLARAN to generate a random
+
+ real number from a uniform (0,1) distribution. The Box-Muller method
+
+ is used to transform numbers from a uniform to a normal distribution.
+
+
+ =====================================================================
+
+
+
+ Generate a real random number from a uniform (0,1) distribution
+
+ Parameter adjustments */
+ --iseed;
+
+ /* Function Body */
+ t1 = dlaran_(&iseed[1]);
+
+ if (*idist == 1) {
+
+/* uniform (0,1) */
+
+ ret_val = t1;
+ } else if (*idist == 2) {
+
+/* uniform (-1,1) */
+
+ ret_val = t1 * 2. - 1.;
+ } else if (*idist == 3) {
+
+/* normal (0,1) */
+
+ t2 = dlaran_(&iseed[1]);
+ ret_val = sqrt(log(t1) * -2.) * cos(t2 *
+ 6.2831853071795864769252867663);
+ }
+ return ret_val;
+
+/* End of DLARND */
+
+} /* dlarnd_ */
+
diff --git a/TESTING/MATGEN/dlarnv.c b/TESTING/MATGEN/dlarnv.c
new file mode 100644
index 0000000..c0b3f3e
--- /dev/null
+++ b/TESTING/MATGEN/dlarnv.c
@@ -0,0 +1,126 @@
+#include "f2c.h"
+
+/* Subroutine */ int dlarnv_(integer *idist, integer *iseed, integer *n,
+ doublereal *x)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLARNV returns a vector of n random real numbers from a uniform or
+ normal distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: uniform (0,1)
+ = 2: uniform (-1,1)
+ = 3: normal (0,1)
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ N (input) INTEGER
+ The number of random numbers to be generated.
+
+ X (output) DOUBLE PRECISION array, dimension (N)
+ The generated random numbers.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine DLARUV to generate random
+ real numbers from a uniform (0,1) distribution, in batches of up to
+ 128 using vectorisable code. The Box-Muller method is used to
+ transform numbers from a uniform to a normal distribution.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal), cos(doublereal);
+ /* Local variables */
+ static integer i;
+ static doublereal u[128];
+ static integer il, iv;
+ extern /* Subroutine */ int dlaruv_(integer *, integer *, doublereal *);
+ static integer il2;
+
+
+#define U(I) u[(I)]
+#define X(I) x[(I)-1]
+#define ISEED(I) iseed[(I)-1]
+
+
+ i__1 = *n;
+ for (iv = 1; iv <= *n; iv += 64) {
+/* Computing MIN */
+ i__2 = 64, i__3 = *n - iv + 1;
+ il = min(i__2,i__3);
+ if (*idist == 3) {
+ il2 = il << 1;
+ } else {
+ il2 = il;
+ }
+
+/* Call DLARUV to generate IL2 numbers from a uniform (0,1)
+ distribution (IL2 <= LV) */
+
+ dlaruv_(&ISEED(1), &il2, u);
+
+ if (*idist == 1) {
+
+/* Copy generated numbers */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ X(iv + i - 1) = U(i - 1);
+/* L10: */
+ }
+ } else if (*idist == 2) {
+
+/* Convert generated numbers to uniform (-1,1) distribut
+ion */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ X(iv + i - 1) = U(i - 1) * 2. - 1.;
+/* L20: */
+ }
+ } else if (*idist == 3) {
+
+/* Convert generated numbers to normal (0,1) distributio
+n */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ X(iv + i - 1) = sqrt(log(U((i << 1) - 2)) * -2.) * cos(U((i <<
+ 1) - 1) * 6.2831853071795864769252867663);
+/* L30: */
+ }
+ }
+/* L40: */
+ }
+ return 0;
+
+/* End of DLARNV */
+
+} /* dlarnv_ */
+
diff --git a/TESTING/MATGEN/dlaror.c b/TESTING/MATGEN/dlaror.c
new file mode 100644
index 0000000..17b12d4
--- /dev/null
+++ b/TESTING/MATGEN/dlaror.c
@@ -0,0 +1,291 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublereal c_b9 = 0.;
+static doublereal c_b10 = 1.;
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int dlaror_(char *side, char *init, integer *m, integer *n,
+ doublereal *a, integer *lda, integer *iseed, doublereal *x, integer *
+ info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ doublereal d__1;
+
+ /* Builtin functions */
+ double d_sign(doublereal *, doublereal *);
+
+ /* Local variables */
+ static integer kbeg;
+ extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ integer *);
+ static integer jcol, irow;
+ extern doublereal dnrm2_(integer *, doublereal *, integer *);
+ static integer j;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *);
+ extern logical lsame_(char *, char *);
+ extern /* Subroutine */ int dgemv_(char *, integer *, integer *,
+ doublereal *, doublereal *, integer *, doublereal *, integer *,
+ doublereal *, doublereal *, integer *);
+ static integer ixfrm, itype, nxfrm;
+ static doublereal xnorm;
+ extern doublereal dlarnd_(integer *, integer *);
+ extern /* Subroutine */ int dlaset_(char *, integer *, integer *,
+ doublereal *, doublereal *, doublereal *, integer *),
+ xerbla_(char *, integer *);
+ static doublereal factor, xnorms;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLAROR pre- or post-multiplies an M by N matrix A by a random
+ orthogonal matrix U, overwriting A. A may optionally be initialized
+
+ to the identity matrix before multiplying by U. U is generated using
+
+ the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).
+
+
+ Arguments
+ =========
+
+ SIDE (input) CHARACTER*1
+ Specifies whether A is multiplied on the left or right by U.
+
+ = 'L': Multiply A on the left (premultiply) by U
+ = 'R': Multiply A on the right (postmultiply) by U'
+ = 'C' or 'T': Multiply A on the left by U and the right
+ by U' (Here, U' means U-transpose.)
+
+ INIT (input) CHARACTER*1
+ Specifies whether or not A should be initialized to the
+ identity matrix.
+ = 'I': Initialize A to (a section of) the identity matrix
+ before applying U.
+ = 'N': No initialization. Apply U to the input matrix A.
+
+ INIT = 'I' may be used to generate square or rectangular
+ orthogonal matrices:
+
+ For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
+
+ to each other, as will the columns.
+
+ If M < N, SIDE = 'R' produces a dense matrix whose rows are
+ orthogonal and whose columns are not, while SIDE = 'L'
+ produces a matrix whose rows are orthogonal, and whose first
+
+ M columns are orthogonal, and whose remaining columns are
+ zero.
+
+ If M > N, SIDE = 'L' produces a dense matrix whose columns
+ are orthogonal and whose rows are not, while SIDE = 'R'
+ produces a matrix whose columns are orthogonal, and whose
+ first M rows are orthogonal, and whose remaining rows are
+ zero.
+
+ M (input) INTEGER
+ The number of rows of A.
+
+ N (input) INTEGER
+ The number of columns of A.
+
+ A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
+ On entry, the array A.
+ On exit, overwritten by U A ( if SIDE = 'L' ),
+ or by A U ( if SIDE = 'R' ),
+ or by U A U' ( if SIDE = 'C' or 'T').
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= max(1,M).
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry ISEED specifies the seed of the random number
+ generator. The array elements should be between 0 and 4095;
+ if not they will be reduced mod 4096. Also, ISEED(4) must
+ be odd. The random number generator uses a linear
+ congruential sequence limited to small integers, and so
+ should produce machine independent random numbers. The
+ values of ISEED are changed on exit, and can be used in the
+ next call to DLAROR to continue the same random number
+ sequence.
+
+ X (workspace) DOUBLE PRECISION array, dimension (3*MAX( M, N ))
+
+ Workspace of length
+ 2*M + N if SIDE = 'L',
+ 2*N + M if SIDE = 'R',
+ 3*N if SIDE = 'C' or 'T'.
+
+ INFO (output) INTEGER
+ An error flag. It is set to:
+ = 0: normal return
+ < 0: if INFO = -k, the k-th argument had an illegal value
+ = 1: if the random numbers generated by DLARND are bad.
+
+ =====================================================================
+
+
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --x;
+
+ /* Function Body */
+ if (*n == 0 || *m == 0) {
+ return 0;
+ }
+
+ itype = 0;
+ if (lsame_(side, "L")) {
+ itype = 1;
+ } else if (lsame_(side, "R")) {
+ itype = 2;
+ } else if (lsame_(side, "C") || lsame_(side, "T")) {
+ itype = 3;
+ }
+
+/* Check for argument errors. */
+
+ *info = 0;
+ if (itype == 0) {
+ *info = -1;
+ } else if (*m < 0) {
+ *info = -3;
+ } else if (*n < 0 || itype == 3 && *n != *m) {
+ *info = -4;
+ } else if (*lda < *m) {
+ *info = -6;
+ }
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("DLAROR", &i__1);
+ return 0;
+ }
+
+ if (itype == 1) {
+ nxfrm = *m;
+ } else {
+ nxfrm = *n;
+ }
+
+/* Initialize A to the identity matrix if desired */
+
+ if (lsame_(init, "I")) {
+ dlaset_("Full", m, n, &c_b9, &c_b10, &a[a_offset], lda);
+ }
+
+/* If no rotation possible, multiply by random +/-1
+
+ Compute rotation by computing Householder transformations
+ H(2), H(3), ..., H(nhouse) */
+
+ i__1 = nxfrm;
+ for (j = 1; j <= i__1; ++j) {
+ x[j] = 0.;
+/* L10: */
+ }
+
+ i__1 = nxfrm;
+ for (ixfrm = 2; ixfrm <= i__1; ++ixfrm) {
+ kbeg = nxfrm - ixfrm + 1;
+
+/* Generate independent normal( 0, 1 ) random numbers */
+
+ i__2 = nxfrm;
+ for (j = kbeg; j <= i__2; ++j) {
+ x[j] = dlarnd_(&c__3, &iseed[1]);
+/* L20: */
+ }
+
+/* Generate a Householder transformation from the random vector
+ X */
+
+ xnorm = dnrm2_(&ixfrm, &x[kbeg], &c__1);
+ xnorms = d_sign(&xnorm, &x[kbeg]);
+ d__1 = -x[kbeg];
+ x[kbeg + nxfrm] = d_sign(&c_b10, &d__1);
+ factor = xnorms * (xnorms + x[kbeg]);
+ if (abs(factor) < 1e-20) {
+ *info = 1;
+ xerbla_("DLAROR", info);
+ return 0;
+ } else {
+ factor = 1. / factor;
+ }
+ x[kbeg] += xnorms;
+
+/* Apply Householder transformation to A */
+
+ if (itype == 1 || itype == 3) {
+
+/* Apply H(k) from the left. */
+
+ dgemv_("T", &ixfrm, n, &c_b10, &a[kbeg + a_dim1], lda, &x[kbeg], &
+ c__1, &c_b9, &x[(nxfrm << 1) + 1], &c__1);
+ d__1 = -factor;
+ dger_(&ixfrm, n, &d__1, &x[kbeg], &c__1, &x[(nxfrm << 1) + 1], &
+ c__1, &a[kbeg + a_dim1], lda);
+
+ }
+
+ if (itype == 2 || itype == 3) {
+
+/* Apply H(k) from the right. */
+
+ dgemv_("N", m, &ixfrm, &c_b10, &a[kbeg * a_dim1 + 1], lda, &x[
+ kbeg], &c__1, &c_b9, &x[(nxfrm << 1) + 1], &c__1);
+ d__1 = -factor;
+ dger_(m, &ixfrm, &d__1, &x[(nxfrm << 1) + 1], &c__1, &x[kbeg], &
+ c__1, &a[kbeg * a_dim1 + 1], lda);
+
+ }
+/* L30: */
+ }
+
+ d__1 = dlarnd_(&c__3, &iseed[1]);
+ x[nxfrm * 2] = d_sign(&c_b10, &d__1);
+
+/* Scale the matrix A by D. */
+
+ if (itype == 1 || itype == 3) {
+ i__1 = *m;
+ for (irow = 1; irow <= i__1; ++irow) {
+ dscal_(n, &x[nxfrm + irow], &a[irow + a_dim1], lda);
+/* L40: */
+ }
+ }
+
+ if (itype == 2 || itype == 3) {
+ i__1 = *n;
+ for (jcol = 1; jcol <= i__1; ++jcol) {
+ dscal_(m, &x[nxfrm + jcol], &a[jcol * a_dim1 + 1], &c__1);
+/* L50: */
+ }
+ }
+ return 0;
+
+/* End of DLAROR */
+
+} /* dlaror_ */
+
diff --git a/TESTING/MATGEN/dlarot.c b/TESTING/MATGEN/dlarot.c
new file mode 100644
index 0000000..9fcad67
--- /dev/null
+++ b/TESTING/MATGEN/dlarot.c
@@ -0,0 +1,299 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__4 = 4;
+static integer c__8 = 8;
+static integer c__1 = 1;
+
+/* Subroutine */ int dlarot_(logical *lrows, logical *lleft, logical *lright,
+ integer *nl, doublereal *c, doublereal *s, doublereal *a, integer *
+ lda, doublereal *xleft, doublereal *xright)
+{
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer iinc;
+ extern /* Subroutine */ int drot_(integer *, doublereal *, integer *,
+ doublereal *, integer *, doublereal *, doublereal *);
+ static integer inext, ix, iy, nt;
+ static doublereal xt[2], yt[2];
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static integer iyt;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ DLAROT applies a (Givens) rotation to two adjacent rows or
+ columns, where one element of the first and/or last column/row
+ may be a separate variable. This is specifically indended
+ for use on matrices stored in some format other than GE, so
+ that elements of the matrix may be used or modified for which
+ no array element is provided.
+
+ One example is a symmetric matrix in SB format (bandwidth=4), for
+
+ which UPLO='L': Two adjacent rows will have the format:
+
+ row j: * * * * * . . . .
+ row j+1: * * * * * . . . .
+
+ '*' indicates elements for which storage is provided,
+ '.' indicates elements for which no storage is provided, but
+ are not necessarily zero; their values are determined by
+ symmetry. ' ' indicates elements which are necessarily zero,
+ and have no storage provided.
+
+ Those columns which have two '*'s can be handled by DROT.
+ Those columns which have no '*'s can be ignored, since as long
+ as the Givens rotations are carefully applied to preserve
+ symmetry, their values are determined.
+ Those columns which have one '*' have to be handled separately,
+ by using separate variables "p" and "q":
+
+ row j: * * * * * p . . .
+ row j+1: q * * * * * . . . .
+
+ The element p would have to be set correctly, then that column
+ is rotated, setting p to its new value. The next call to
+ DLAROT would rotate columns j and j+1, using p, and restore
+ symmetry. The element q would start out being zero, and be
+ made non-zero by the rotation. Later, rotations would presumably
+
+ be chosen to zero q out.
+
+ Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+ ------- ------- ---------
+
+ General dense matrix:
+
+ CALL DLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+ A(i,1),LDA, DUMMY, DUMMY)
+
+ General banded matrix in GB format:
+
+ j = MAX(1, i-KL )
+ NL = MIN( N, i+KU+1 ) + 1-j
+ CALL DLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+ A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,KL+1) ]
+
+ Symmetric banded matrix in SY format, bandwidth K,
+ lower triangle only:
+
+ j = MAX(1, i-K )
+ NL = MIN( K+1, i ) + 1
+ CALL DLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+ A(i,j), LDA, XLEFT, XRIGHT )
+
+ Same, but upper triangle only:
+
+ NL = MIN( K+1, N-i ) + 1
+ CALL DLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+ A(i,i), LDA, XLEFT, XRIGHT )
+
+ Symmetric banded matrix in SB format, bandwidth K,
+ lower triangle only:
+
+ [ same as for SY, except:]
+ . . . .
+ A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,K+1) ]
+
+ Same, but upper triangle only:
+ . . .
+ A(K+1,i), LDA-1, XLEFT, XRIGHT )
+
+ Rotating columns is just the transpose of rotating rows, except
+
+ for GB and SB: (rotating columns i and i+1)
+
+ GB:
+ j = MAX(1, i-KU )
+ NL = MIN( N, i+KL+1 ) + 1-j
+ CALL DLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+ A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ [note that KU+j+1-i is just MAX(1,KU+2-i)]
+
+ SB: (upper triangle)
+
+ . . . . . .
+ A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ SB: (lower triangle)
+
+ . . . . . .
+ A(1,i),LDA-1, XTOP, XBOTTM )
+
+ Arguments
+ =========
+
+ LROWS - LOGICAL
+ If .TRUE., then DLAROT will rotate two rows. If .FALSE.,
+ then it will rotate two columns.
+ Not modified.
+
+ LLEFT - LOGICAL
+ If .TRUE., then XLEFT will be used instead of the
+ corresponding element of A for the first element in the
+ second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+ If .FALSE., then the corresponding element of A will be
+ used.
+ Not modified.
+
+ LRIGHT - LOGICAL
+ If .TRUE., then XRIGHT will be used instead of the
+ corresponding element of A for the last element in the
+ first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+
+ .FALSE., then the corresponding element of A will be used.
+ Not modified.
+
+ NL - INTEGER
+ The length of the rows (if LROWS=.TRUE.) or columns (if
+ LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+ used, the columns/rows they are in should be included in
+ NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+ least 2. The number of rows/columns to be rotated
+ exclusive of those involving XLEFT and/or XRIGHT may
+ not be negative, i.e., NL minus how many of LLEFT and
+ LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+ will be called.
+ Not modified.
+
+ C, S - DOUBLE PRECISION
+ Specify the Givens rotation to be applied. If LROWS is
+ true, then the matrix ( c s )
+ (-s c ) is applied from the left;
+ if false, then the transpose thereof is applied from the
+ right. For a Givens rotation, C**2 + S**2 should be 1,
+ but this is not checked.
+ Not modified.
+
+ A - DOUBLE PRECISION array.
+ The array containing the rows/columns to be rotated. The
+ first element of A should be the upper left element to
+ be rotated.
+ Read and modified.
+
+ LDA - INTEGER
+ The "effective" leading dimension of A. If A contains
+ a matrix stored in GE or SY format, then this is just
+ the leading dimension of A as dimensioned in the calling
+ routine. If A contains a matrix stored in band (GB or SB)
+ format, then this should be *one less* than the leading
+ dimension used in the calling routine. Thus, if
+ A were dimensioned A(LDA,*) in DLAROT, then A(1,j) would
+ be the j-th element in the first of the two rows
+ to be rotated, and A(2,j) would be the j-th in the second,
+ regardless of how the array may be stored in the calling
+ routine. [A cannot, however, actually be dimensioned thus,
+
+ since for band format, the row number may exceed LDA, which
+
+ is not legal FORTRAN.]
+ If LROWS=.TRUE., then LDA must be at least 1, otherwise
+ it must be at least NL minus the number of .TRUE. values
+ in XLEFT and XRIGHT.
+ Not modified.
+
+ XLEFT - DOUBLE PRECISION
+ If LLEFT is .TRUE., then XLEFT will be used and modified
+ instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ XRIGHT - DOUBLE PRECISION
+ If LRIGHT is .TRUE., then XRIGHT will be used and modified
+ instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ =====================================================================
+
+
+
+ Set up indices, arrays for ends
+
+ Parameter adjustments */
+ --a;
+
+ /* Function Body */
+ if (*lrows) {
+ iinc = *lda;
+ inext = 1;
+ } else {
+ iinc = 1;
+ inext = *lda;
+ }
+
+ if (*lleft) {
+ nt = 1;
+ ix = iinc + 1;
+ iy = *lda + 2;
+ xt[0] = a[1];
+ yt[0] = *xleft;
+ } else {
+ nt = 0;
+ ix = 1;
+ iy = inext + 1;
+ }
+
+ if (*lright) {
+ iyt = inext + 1 + (*nl - 1) * iinc;
+ ++nt;
+ xt[nt - 1] = *xright;
+ yt[nt - 1] = a[iyt];
+ }
+
+/* Check for errors */
+
+ if (*nl < nt) {
+ xerbla_("DLAROT", &c__4);
+ return 0;
+ }
+ if (*lda <= 0 || ! (*lrows) && *lda < *nl - nt) {
+ xerbla_("DLAROT", &c__8);
+ return 0;
+ }
+
+/* Rotate */
+
+ i__1 = *nl - nt;
+ drot_(&i__1, &a[ix], &iinc, &a[iy], &iinc, c, s);
+ drot_(&nt, xt, &c__1, yt, &c__1, c, s);
+
+/* Stuff values back into XLEFT, XRIGHT, etc. */
+
+ if (*lleft) {
+ a[1] = xt[0];
+ *xleft = yt[0];
+ }
+
+ if (*lright) {
+ *xright = xt[nt - 1];
+ a[iyt] = yt[nt - 1];
+ }
+
+ return 0;
+
+/* End of DLAROT */
+
+} /* dlarot_ */
+
diff --git a/TESTING/MATGEN/dlartg.c b/TESTING/MATGEN/dlartg.c
new file mode 100644
index 0000000..5763969
--- /dev/null
+++ b/TESTING/MATGEN/dlartg.c
@@ -0,0 +1,158 @@
+#include "f2c.h"
+
+/* Subroutine */ int dlartg_(doublereal *f, doublereal *g, doublereal *cs,
+ doublereal *sn, doublereal *r)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLARTG generate a plane rotation so that
+
+ [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
+ [ -SN CS ] [ G ] [ 0 ]
+
+ This is a slower, more accurate version of the BLAS1 routine DROTG,
+ with the following other differences:
+ F and G are unchanged on return.
+ If G=0, then CS=1 and SN=0.
+ If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
+ floating point operations (saves work in DBDSQR when
+ there are zeros on the diagonal).
+
+ If F exceeds G in magnitude, CS will be positive.
+
+ Arguments
+ =========
+
+ F (input) DOUBLE PRECISION
+ The first component of vector to be rotated.
+
+ G (input) DOUBLE PRECISION
+ The second component of vector to be rotated.
+
+ CS (output) DOUBLE PRECISION
+ The cosine of the rotation.
+
+ SN (output) DOUBLE PRECISION
+ The sine of the rotation.
+
+ R (output) DOUBLE PRECISION
+ The nonzero component of the rotated vector.
+
+ =====================================================================
+*/
+ /* Initialized data */
+ static logical first = TRUE_;
+ /* System generated locals */
+ integer i__1;
+ doublereal d__1, d__2;
+ /* Builtin functions */
+ double log(doublereal), pow_di(doublereal *, integer *), sqrt(doublereal);
+ /* Local variables */
+ static integer i;
+ static doublereal scale;
+ static integer count;
+ static doublereal f1, g1, safmn2, safmx2;
+ extern doublereal dlamch_(char *);
+ static doublereal safmin, eps;
+
+
+
+ if (first) {
+ first = FALSE_;
+ safmin = dlamch_("S");
+ eps = dlamch_("E");
+ d__1 = dlamch_("B");
+ i__1 = (integer) (log(safmin / eps) / log(dlamch_("B")) / 2.);
+ safmn2 = pow_di(&d__1, &i__1);
+ safmx2 = 1. / safmn2;
+ }
+ if (*g == 0.) {
+ *cs = 1.;
+ *sn = 0.;
+ *r = *f;
+ } else if (*f == 0.) {
+ *cs = 0.;
+ *sn = 1.;
+ *r = *g;
+ } else {
+ f1 = *f;
+ g1 = *g;
+/* Computing MAX */
+ d__1 = abs(f1), d__2 = abs(g1);
+ scale = max(d__1,d__2);
+ if (scale >= safmx2) {
+ count = 0;
+L10:
+ ++count;
+ f1 *= safmn2;
+ g1 *= safmn2;
+/* Computing MAX */
+ d__1 = abs(f1), d__2 = abs(g1);
+ scale = max(d__1,d__2);
+ if (scale >= safmx2) {
+ goto L10;
+ }
+/* Computing 2nd power */
+ d__1 = f1;
+/* Computing 2nd power */
+ d__2 = g1;
+ *r = sqrt(d__1 * d__1 + d__2 * d__2);
+ *cs = f1 / *r;
+ *sn = g1 / *r;
+ i__1 = count;
+ for (i = 1; i <= count; ++i) {
+ *r *= safmx2;
+/* L20: */
+ }
+ } else if (scale <= safmn2) {
+ count = 0;
+L30:
+ ++count;
+ f1 *= safmx2;
+ g1 *= safmx2;
+/* Computing MAX */
+ d__1 = abs(f1), d__2 = abs(g1);
+ scale = max(d__1,d__2);
+ if (scale <= safmn2) {
+ goto L30;
+ }
+/* Computing 2nd power */
+ d__1 = f1;
+/* Computing 2nd power */
+ d__2 = g1;
+ *r = sqrt(d__1 * d__1 + d__2 * d__2);
+ *cs = f1 / *r;
+ *sn = g1 / *r;
+ i__1 = count;
+ for (i = 1; i <= count; ++i) {
+ *r *= safmn2;
+/* L40: */
+ }
+ } else {
+/* Computing 2nd power */
+ d__1 = f1;
+/* Computing 2nd power */
+ d__2 = g1;
+ *r = sqrt(d__1 * d__1 + d__2 * d__2);
+ *cs = f1 / *r;
+ *sn = g1 / *r;
+ }
+ if (abs(*f) > abs(*g) && *cs < 0.) {
+ *cs = -(*cs);
+ *sn = -(*sn);
+ *r = -(*r);
+ }
+ }
+ return 0;
+
+/* End of DLARTG */
+
+} /* dlartg_ */
+
diff --git a/TESTING/MATGEN/dlaruv.c b/TESTING/MATGEN/dlaruv.c
new file mode 100644
index 0000000..41b4a01
--- /dev/null
+++ b/TESTING/MATGEN/dlaruv.c
@@ -0,0 +1,152 @@
+#include "f2c.h"
+
+/* Subroutine */ int dlaruv_(integer *iseed, integer *n, doublereal *x)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLARUV returns a vector of n random real numbers from a uniform (0,1)
+
+ distribution (n <= 128).
+
+ This is an auxiliary routine called by DLARNV and ZLARNV.
+
+ Arguments
+ =========
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ N (input) INTEGER
+ The number of random numbers to be generated. N <= 128.
+
+ X (output) DOUBLE PRECISION array, dimension (N)
+ The generated random numbers.
+
+ Further Details
+ ===============
+
+ This routine uses a multiplicative congruential method with modulus
+ 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+ 'Multiplicative congruential random number generators with modulus
+ 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+ b = 48', Math. Comp. 189, pp 331-344, 1990).
+
+ 48-bit integers are stored in 4 integer array elements with 12 bits
+ per element. Hence the routine is portable across machines with
+ integers of 32 bits or more.
+
+ =====================================================================
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* Initialized data */
+ static integer mm[512] /* was [128][4] */ = { 494,2637,255,2008,1253,
+ 3344,4084,1739,3143,3468,688,1657,1238,3166,1292,3422,1270,2016,
+ 154,2862,697,1706,491,931,1444,444,3577,3944,2184,1661,3482,657,
+ 3023,3618,1267,1828,164,3798,3087,2400,2870,3876,1905,1593,1797,
+ 1234,3460,328,2861,1950,617,2070,3331,769,1558,2412,2800,189,287,
+ 2045,1227,2838,209,2770,3654,3993,192,2253,3491,2889,2857,2094,
+ 1818,688,1407,634,3231,815,3524,1914,516,164,303,2144,3480,119,
+ 3357,837,2826,2332,2089,3780,1700,3712,150,2000,3375,1621,3090,
+ 3765,1149,3146,33,3082,2741,359,3316,1749,185,2784,2202,2199,1364,
+ 1244,2020,3160,2785,2772,1217,1822,1245,2252,3904,2774,997,2573,
+ 1148,545,322,789,1440,752,2859,123,1848,643,2405,2638,2344,46,
+ 3814,913,3649,339,3808,822,2832,3078,3633,2970,637,2249,2081,4019,
+ 1478,242,481,2075,4058,622,3376,812,234,641,4005,1122,3135,2640,
+ 2302,40,1832,2247,2034,2637,1287,1691,496,1597,2394,2584,1843,336,
+ 1472,2407,433,2096,1761,2810,566,442,41,1238,1086,603,840,3168,
+ 1499,1084,3438,2408,1589,2391,288,26,512,1456,171,1677,2657,2270,
+ 2587,2961,1970,1817,676,1410,3723,2803,3185,184,663,499,3784,1631,
+ 1925,3912,1398,1349,1441,2224,2411,1907,3192,2786,382,37,759,2948,
+ 1862,3802,2423,2051,2295,1332,1832,2405,3638,3661,327,3660,716,
+ 1842,3987,1368,1848,2366,2508,3754,1766,3572,2893,307,1297,3966,
+ 758,2598,3406,2922,1038,2934,2091,2451,1580,1958,2055,1507,1078,
+ 3273,17,854,2916,3971,2889,3831,2621,1541,893,736,3992,787,2125,
+ 2364,2460,257,1574,3912,1216,3248,3401,2124,2762,149,2245,166,466,
+ 4018,1399,190,2879,153,2320,18,712,2159,2318,2091,3443,1510,449,
+ 1956,2201,3137,3399,1321,2271,3667,2703,629,2365,2431,1113,3922,
+ 2554,184,2099,3228,4012,1921,3452,3901,572,3309,3171,817,3039,
+ 1696,1256,3715,2077,3019,1497,1101,717,51,981,1978,1813,3881,76,
+ 3846,3694,1682,124,1660,3997,479,1141,886,3514,1301,3604,1888,
+ 1836,1990,2058,692,1194,20,3285,2046,2107,3508,3525,3801,2549,
+ 1145,2253,305,3301,1065,3133,2913,3285,1241,1197,3729,2501,1673,
+ 541,2753,949,2361,1165,4081,2725,3305,3069,3617,3733,409,2157,
+ 1361,3973,1865,2525,1409,3445,3577,77,3761,2149,1449,3005,225,85,
+ 3673,3117,3089,1349,2057,413,65,1845,697,3085,3441,1573,3689,2941,
+ 929,533,2841,4077,721,2821,2249,2397,2817,245,1913,1997,3121,997,
+ 1833,2877,1633,981,2009,941,2449,197,2441,285,1473,2741,3129,909,
+ 2801,421,4073,2813,2337,1429,1177,1901,81,1669,2633,2269,129,1141,
+ 249,3917,2481,3941,2217,2749,3041,1877,345,2861,1809,3141,2825,
+ 157,2881,3637,1465,2829,2161,3365,361,2685,3745,2325,3609,3821,
+ 3537,517,3017,2141,1537 };
+ /* System generated locals */
+ integer i__1;
+ /* Local variables */
+ static integer i, i1, i2, i3, i4, it1, it2, it3, it4;
+
+
+#define MM(I) mm[(I)]
+#define WAS(I) was[(I)]
+#define ISEED(I) iseed[(I)-1]
+#define X(I) x[(I)-1]
+
+
+
+ i1 = ISEED(1);
+ i2 = ISEED(2);
+ i3 = ISEED(3);
+ i4 = ISEED(4);
+
+ i__1 = min(*n,128);
+ for (i = 1; i <= min(*n,128); ++i) {
+
+/* Multiply the seed by i-th power of the multiplier modulo 2**
+48 */
+
+ it4 = i4 * MM(i + 383);
+ it3 = it4 / 4096;
+ it4 -= it3 << 12;
+ it3 = it3 + i3 * MM(i + 383) + i4 * MM(i + 255);
+ it2 = it3 / 4096;
+ it3 -= it2 << 12;
+ it2 = it2 + i2 * MM(i + 383) + i3 * MM(i + 255) + i4 * MM(i + 127);
+ it1 = it2 / 4096;
+ it2 -= it1 << 12;
+ it1 = it1 + i1 * MM(i + 383) + i2 * MM(i + 255) + i3 * MM(i + 127) +
+ i4 * MM(i - 1);
+ it1 %= 4096;
+
+/* Convert 48-bit integer to a real number in the interval (0,1
+) */
+
+ X(i) = ((doublereal) it1 + ((doublereal) it2 + ((doublereal) it3 + (
+ doublereal) it4 * 2.44140625e-4) * 2.44140625e-4) *
+ 2.44140625e-4) * 2.44140625e-4;
+/* L10: */
+ }
+
+/* Return final value of seed */
+
+ ISEED(1) = it1;
+ ISEED(2) = it2;
+ ISEED(3) = it3;
+ ISEED(4) = it4;
+ return 0;
+
+/* End of DLARUV */
+
+} /* dlaruv_ */
+
diff --git a/TESTING/MATGEN/dlaset.c b/TESTING/MATGEN/dlaset.c
new file mode 100644
index 0000000..064a99d
--- /dev/null
+++ b/TESTING/MATGEN/dlaset.c
@@ -0,0 +1,131 @@
+#include "f2c.h"
+
+/* Subroutine */ int dlaset_(char *uplo, integer *m, integer *n, doublereal *
+ alpha, doublereal *beta, doublereal *a, integer *lda)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLASET initializes an m-by-n matrix A to BETA on the diagonal and
+ ALPHA on the offdiagonals.
+
+ Arguments
+ =========
+
+ UPLO (input) CHARACTER*1
+ Specifies the part of the matrix A to be set.
+ = 'U': Upper triangular part is set; the strictly lower
+
+ triangular part of A is not changed.
+ = 'L': Lower triangular part is set; the strictly upper
+
+ triangular part of A is not changed.
+ Otherwise: All of the matrix A is set.
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ ALPHA (input) DOUBLE PRECISION
+ The constant to which the offdiagonal elements are to be set.
+
+
+ BETA (input) DOUBLE PRECISION
+ The constant to which the diagonal elements are to be set.
+
+ A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ On exit, the leading m-by-n submatrix of A is set as follows:
+
+
+ if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
+ if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
+ otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
+
+ and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= max(1,M).
+
+ =====================================================================
+
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ /* Local variables */
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ if (lsame_(uplo, "U")) {
+
+/* Set the strictly upper triangular or trapezoidal part of the
+
+ array to ALPHA. */
+
+ i__1 = *n;
+ for (j = 2; j <= *n; ++j) {
+/* Computing MIN */
+ i__3 = j - 1;
+ i__2 = min(i__3,*m);
+ for (i = 1; i <= min(j-1,*m); ++i) {
+ A(i,j) = *alpha;
+/* L10: */
+ }
+/* L20: */
+ }
+
+ } else if (lsame_(uplo, "L")) {
+
+/* Set the strictly lower triangular or trapezoidal part of the
+
+ array to ALPHA. */
+
+ i__1 = min(*m,*n);
+ for (j = 1; j <= min(*m,*n); ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= *m; ++i) {
+ A(i,j) = *alpha;
+/* L30: */
+ }
+/* L40: */
+ }
+
+ } else {
+
+/* Set the leading m-by-n submatrix to ALPHA. */
+
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ A(i,j) = *alpha;
+/* L50: */
+ }
+/* L60: */
+ }
+ }
+
+/* Set the first min(M,N) diagonal elements to BETA. */
+
+ i__1 = min(*m,*n);
+ for (i = 1; i <= min(*m,*n); ++i) {
+ A(i,i) = *beta;
+/* L70: */
+ }
+
+ return 0;
+
+/* End of DLASET */
+
+} /* dlaset_ */
+
diff --git a/TESTING/MATGEN/dlatb4.c b/TESTING/MATGEN/dlatb4.c
new file mode 100644
index 0000000..c26760a
--- /dev/null
+++ b/TESTING/MATGEN/dlatb4.c
@@ -0,0 +1,463 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__2 = 2;
+
+/* Subroutine */ int dlatb4_(char *path, integer *imat, integer *m, integer *
+ n, char *type, integer *kl, integer *ku, doublereal *anorm, integer *
+ mode, doublereal *cndnum, char *dist)
+{
+ /* Initialized data */
+
+ static logical first = TRUE_;
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Builtin functions */
+ double sqrt(doublereal);
+
+ /* Local variables */
+ static doublereal badc1, badc2, large, small;
+ static char c2[2];
+ extern /* Subroutine */ int dlabad_(doublereal *, doublereal *);
+ extern doublereal dlamch_(char *);
+ extern logical lsamen_(integer *, char *, char *);
+ static integer mat;
+ static doublereal eps;
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+ Purpose
+ =======
+
+ DLATB4 sets parameters for the matrix generator based on the type of
+
+ matrix to be generated.
+
+ Arguments
+ =========
+
+ PATH (input) CHARACTER*3
+ The LAPACK path name.
+
+ IMAT (input) INTEGER
+ An integer key describing which matrix to generate for this
+ path.
+
+ M (input) INTEGER
+ The number of rows in the matrix to be generated.
+
+ N (input) INTEGER
+ The number of columns in the matrix to be generated.
+
+ TYPE (output) CHARACTER*1
+ The type of the matrix to be generated:
+ = 'S': symmetric matrix
+ = 'P': symmetric positive (semi)definite matrix
+ = 'N': nonsymmetric matrix
+
+ KL (output) INTEGER
+ The lower band width of the matrix to be generated.
+
+ KU (output) INTEGER
+ The upper band width of the matrix to be generated.
+
+ ANORM (output) DOUBLE PRECISION
+ The desired norm of the matrix to be generated. The diagonal
+
+ matrix of singular values or eigenvalues is scaled by this
+ value.
+
+ MODE (output) INTEGER
+ A key indicating how to choose the vector of eigenvalues.
+
+ CNDNUM (output) DOUBLE PRECISION
+ The desired condition number.
+
+ DIST (output) CHARACTER*1
+ The type of distribution to be used by the random number
+ generator.
+
+ =====================================================================
+
+
+
+ Set some constants for use in the subroutine. */
+
+ if (first) {
+ first = FALSE_;
+ eps = dlamch_("Precision");
+ badc2 = .1 / eps;
+ badc1 = sqrt(badc2);
+ small = dlamch_("Safe minimum");
+ large = 1. / small;
+
+/* If it looks like we're on a Cray, take the square root of
+ SMALL and LARGE to avoid overflow and underflow problems. */
+
+ dlabad_(&small, &large);
+ small = small / eps * .25;
+ large = 1. / small;
+ }
+
+ strncpy(c2, path + 1, 2);
+
+/* Set some parameters we don't plan to change. */
+
+ *(unsigned char *)dist = 'S';
+ *mode = 3;
+
+ if (lsamen_(&c__2, c2, "QR") || lsamen_(&c__2, c2, "LQ")
+ || lsamen_(&c__2, c2, "QL") || lsamen_(&c__2, c2, "RQ")) {
+
+/* xQR, xLQ, xQL, xRQ: Set parameters to generate a general
+ M x N matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GE")) {
+
+/* xGE: Set parameters to generate a general M x N matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 10) {
+ *anorm = small;
+ } else if (*imat == 11) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GB")) {
+
+/* xGB: Set parameters to generate a general banded matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2 * .1;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GT")) {
+
+/* xGT: Set parameters to generate a general tridiagonal matri
+x.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PO") || lsamen_(&c__2, c2, "PP") || lsamen_(&c__2, c2, "SY") || lsamen_(&c__2, c2,
+ "SP")) {
+
+/* xPO, xPP, xSY, xSP: Set parameters to generate a
+ symmetric matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = *(unsigned char *)c2;
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 6) {
+ *cndnum = badc1;
+ } else if (*imat == 7) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 8) {
+ *anorm = small;
+ } else if (*imat == 9) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PB")) {
+
+/* xPB: Set parameters to generate a symmetric band matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'P';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PT")) {
+
+/* xPT: Set parameters to generate a symmetric positive defini
+te
+ tridiagonal matrix. */
+
+ *(unsigned char *)type = 'P';
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TR") || lsamen_(&c__2, c2, "TP")) {
+
+/* xTR, xTP: Set parameters to generate a triangular matrix
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ mat = abs(*imat);
+ if (mat == 1 || mat == 7) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat < 0) {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (mat == 3 || mat == 9) {
+ *cndnum = badc1;
+ } else if (mat == 4) {
+ *cndnum = badc2;
+ } else if (mat == 10) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (mat == 5) {
+ *anorm = small;
+ } else if (mat == 6) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TB")) {
+
+/* xTB: Set parameters to generate a triangular band matrix.
+
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 2 || *imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 3 || *imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 4) {
+ *anorm = small;
+ } else if (*imat == 5) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+ }
+ if (*n <= 1) {
+ *cndnum = 1.;
+ }
+
+ return 0;
+
+/* End of DLATB4 */
+
+} /* dlatb4_ */
+
diff --git a/TESTING/MATGEN/dlatm1.c b/TESTING/MATGEN/dlatm1.c
new file mode 100644
index 0000000..bbd69fb
--- /dev/null
+++ b/TESTING/MATGEN/dlatm1.c
@@ -0,0 +1,266 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int dlatm1_(integer *mode, doublereal *cond, integer *irsign,
+ integer *idist, integer *iseed, doublereal *d, integer *n, integer *
+ info)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ doublereal d__1;
+
+ /* Builtin functions */
+ double pow_dd(doublereal *, doublereal *), pow_di(doublereal *, integer *)
+ , log(doublereal), exp(doublereal);
+
+ /* Local variables */
+ static doublereal temp;
+ static integer i;
+ static doublereal alpha;
+ extern doublereal dlaran_(integer *);
+ extern /* Subroutine */ int xerbla_(char *, integer *), dlarnv_(
+ integer *, integer *, integer *, doublereal *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLATM1 computes the entries of D(1..N) as specified by
+ MODE, COND and IRSIGN. IDIST and ISEED determine the generation
+ of random numbers. DLATM1 is called by SLATMR to generate
+ random test matrices for LAPACK programs.
+
+ Arguments
+ =========
+
+ MODE - INTEGER
+ On entry describes how D is to be computed:
+ MODE = 0 means do not change D.
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ IRSIGN - INTEGER
+ On entry, if MODE neither -6, 0 nor 6, determines sign of
+ entries of D
+ 0 => leave entries of D unchanged
+ 1 => multiply each entry of D by 1 or -1 with probability .5
+
+
+ IDIST - CHARACTER*1
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => UNIFORM( 0, 1 )
+ 2 => UNIFORM( -1, 1 )
+ 3 => NORMAL( 0, 1 )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. The random number generator uses a
+ linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to DLATM1
+ to continue the same random number sequence.
+ Changed on exit.
+
+ D - DOUBLE PRECISION array, dimension ( MIN( M , N ) )
+ Array to be computed according to MODE, COND and IRSIGN.
+ May be changed on exit if MODE is nonzero.
+
+ N - INTEGER
+ Number of entries of D. Not modified.
+
+ INFO - INTEGER
+ 0 => normal termination
+ -1 => if MODE not in range -6 to 6
+ -2 => if MODE neither -6, 0 nor 6, and
+ IRSIGN neither 0 nor 1
+ -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+ -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
+
+ -7 => if N negative
+
+ =====================================================================
+
+
+
+ Decode and Test the input parameters. Initialize flags & seed.
+
+ Parameter adjustments */
+ --d;
+ --iseed;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+/* Set INFO if an error */
+
+ if (*mode < -6 || *mode > 6) {
+ *info = -1;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && (*irsign != 0 && *
+ irsign != 1)) {
+ *info = -2;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && *cond < 1.) {
+ *info = -3;
+ } else if ((*mode == 6 || *mode == -6) && (*idist < 1 || *idist > 3)) {
+ *info = -4;
+ } else if (*n < 0) {
+ *info = -7;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("DLATM1", &i__1);
+ return 0;
+ }
+
+/* Compute D according to COND and MODE */
+
+ if (*mode != 0) {
+ switch (abs(*mode)) {
+ case 1: goto L10;
+ case 2: goto L30;
+ case 3: goto L50;
+ case 4: goto L70;
+ case 5: goto L90;
+ case 6: goto L110;
+ }
+
+/* One large D value: */
+
+L10:
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = 1. / *cond;
+/* L20: */
+ }
+ d[1] = 1.;
+ goto L120;
+
+/* One small D value: */
+
+L30:
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = 1.;
+/* L40: */
+ }
+ d[*n] = 1. / *cond;
+ goto L120;
+
+/* Exponentially distributed D values: */
+
+L50:
+ d[1] = 1.;
+ if (*n > 1) {
+ d__1 = -1. / (doublereal) (*n - 1);
+ alpha = pow_dd(cond, &d__1);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+ i__2 = i - 1;
+ d[i] = pow_di(&alpha, &i__2);
+/* L60: */
+ }
+ }
+ goto L120;
+
+/* Arithmetically distributed D values: */
+
+L70:
+ d[1] = 1.;
+ if (*n > 1) {
+ temp = 1. / *cond;
+ alpha = (1. - temp) / (doublereal) (*n - 1);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+ d[i] = (doublereal) (*n - i) * alpha + temp;
+/* L80: */
+ }
+ }
+ goto L120;
+
+/* Randomly distributed D values on ( 1/COND , 1): */
+
+L90:
+ alpha = log(1. / *cond);
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = exp(alpha * dlaran_(&iseed[1]));
+/* L100: */
+ }
+ goto L120;
+
+/* Randomly distributed D values from IDIST */
+
+L110:
+ dlarnv_(idist, &iseed[1], n, &d[1]);
+
+L120:
+
+/* If MODE neither -6 nor 0 nor 6, and IRSIGN = 1, assign
+ random signs to D */
+
+ if (*mode != -6 && *mode != 0 && *mode != 6 && *irsign == 1) {
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ temp = dlaran_(&iseed[1]);
+ if (temp > .5) {
+ d[i] = -d[i];
+ }
+/* L130: */
+ }
+ }
+
+/* Reverse if MODE < 0 */
+
+ if (*mode < 0) {
+ i__1 = *n / 2;
+ for (i = 1; i <= i__1; ++i) {
+ temp = d[i];
+ d[i] = d[*n + 1 - i];
+ d[*n + 1 - i] = temp;
+/* L140: */
+ }
+ }
+
+ }
+
+ return 0;
+
+/* End of DLATM1 */
+
+} /* dlatm1_ */
+
diff --git a/TESTING/MATGEN/dlatm2.c b/TESTING/MATGEN/dlatm2.c
new file mode 100644
index 0000000..b4f2b28
--- /dev/null
+++ b/TESTING/MATGEN/dlatm2.c
@@ -0,0 +1,241 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dlatm2_(integer *m, integer *n, integer *i, integer *j, integer *
+ kl, integer *ku, integer *idist, integer *iseed, doublereal *d,
+ integer *igrade, doublereal *dl, doublereal *dr, integer *ipvtng,
+ integer *iwork, doublereal *sparse)
+{
+ /* System generated locals */
+ doublereal ret_val;
+
+ /* Local variables */
+ static integer isub, jsub;
+ static doublereal temp;
+ extern doublereal dlaran_(integer *), dlarnd_(integer *, integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ DLATM2 returns the (I,J) entry of a random matrix of dimension
+ (M, N) described by the other paramters. It is called by the
+ DLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by DLATMR which has already checked the parameters.
+
+ Use of DLATM2 differs from SLATM3 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With DLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With DLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, DLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. DLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+
+ The matrix whose (I,J) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If I is outside (1..M) or J is outside (1..N), return zero
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of entry to be returned. Not modified.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => UNIFORM( 0, 1 )
+ 2 => UNIFORM( -1, 1 )
+ 3 => NORMAL( 0, 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - DOUBLE PRECISION array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - DOUBLE PRECISION array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - DOUBLE PRECISION array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) in position K was originally in
+ position IWORK( K ).
+ This differs from IWORK for DLATM3. Not modified.
+
+ SPARSE - DOUBLE PRECISION between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ ret_val = 0.;
+ return ret_val;
+ }
+
+/* Check for banding */
+
+ if (*j > *i + *ku || *j < *i - *kl) {
+ ret_val = 0.;
+ return ret_val;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.) {
+ if (dlaran_(&iseed[1]) < *sparse) {
+ ret_val = 0.;
+ return ret_val;
+ }
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ isub = *i;
+ jsub = *j;
+ } else if (*ipvtng == 1) {
+ isub = iwork[*i];
+ jsub = *j;
+ } else if (*ipvtng == 2) {
+ isub = *i;
+ jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ isub = iwork[*i];
+ jsub = iwork[*j];
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (isub == jsub) {
+ temp = d[isub];
+ } else {
+ temp = dlarnd_(idist, &iseed[1]);
+ }
+ if (*igrade == 1) {
+ temp *= dl[isub];
+ } else if (*igrade == 2) {
+ temp *= dr[jsub];
+ } else if (*igrade == 3) {
+ temp = temp * dl[isub] * dr[jsub];
+ } else if (*igrade == 4 && isub != jsub) {
+ temp = temp * dl[isub] / dl[jsub];
+ } else if (*igrade == 5) {
+ temp = temp * dl[isub] * dl[jsub];
+ }
+ ret_val = temp;
+ return ret_val;
+
+/* End of DLATM2 */
+
+} /* dlatm2_ */
+
diff --git a/TESTING/MATGEN/dlatm3.c b/TESTING/MATGEN/dlatm3.c
new file mode 100644
index 0000000..1302755
--- /dev/null
+++ b/TESTING/MATGEN/dlatm3.c
@@ -0,0 +1,252 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal dlatm3_(integer *m, integer *n, integer *i, integer *j, integer *
+ isub, integer *jsub, integer *kl, integer *ku, integer *idist,
+ integer *iseed, doublereal *d, integer *igrade, doublereal *dl,
+ doublereal *dr, integer *ipvtng, integer *iwork, doublereal *sparse)
+{
+ /* System generated locals */
+ doublereal ret_val;
+
+ /* Local variables */
+ static doublereal temp;
+ extern doublereal dlaran_(integer *), dlarnd_(integer *, integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ DLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+ dimension (M, N) described by the other paramters. (ISUB,JSUB)
+ is the final position of the (I,J) entry after pivoting
+ according to IPVTNG and IWORK. DLATM3 is called by the
+ DLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by DLATMR which has already checked the parameters.
+
+ Use of DLATM3 differs from SLATM2 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With DLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With DLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, DLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. DLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+ in different orders for different pivot orders).
+
+ The matrix whose (ISUB,JSUB) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of unpivoted entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of unpivoted entry to be returned. Not modified.
+
+ ISUB - INTEGER
+ Row of pivoted entry to be returned. Changed on exit.
+
+ JSUB - INTEGER
+ Column of pivoted entry to be returned. Changed on exit.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => UNIFORM( 0, 1 )
+ 2 => UNIFORM( -1, 1 )
+ 3 => NORMAL( 0, 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - DOUBLE PRECISION array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - DOUBLE PRECISION array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - DOUBLE PRECISION array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) originally in position K is in
+ position IWORK( K ) after pivoting.
+ This differs from IWORK for DLATM2. Not modified.
+
+ SPARSE - DOUBLE PRECISION between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ *isub = *i;
+ *jsub = *j;
+ ret_val = 0.;
+ return ret_val;
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ *isub = *i;
+ *jsub = *j;
+ } else if (*ipvtng == 1) {
+ *isub = iwork[*i];
+ *jsub = *j;
+ } else if (*ipvtng == 2) {
+ *isub = *i;
+ *jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ *isub = iwork[*i];
+ *jsub = iwork[*j];
+ }
+
+/* Check for banding */
+
+ if (*jsub > *isub + *ku || *jsub < *isub - *kl) {
+ ret_val = 0.;
+ return ret_val;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.) {
+ if (dlaran_(&iseed[1]) < *sparse) {
+ ret_val = 0.;
+ return ret_val;
+ }
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (*i == *j) {
+ temp = d[*i];
+ } else {
+ temp = dlarnd_(idist, &iseed[1]);
+ }
+ if (*igrade == 1) {
+ temp *= dl[*i];
+ } else if (*igrade == 2) {
+ temp *= dr[*j];
+ } else if (*igrade == 3) {
+ temp = temp * dl[*i] * dr[*j];
+ } else if (*igrade == 4 && *i != *j) {
+ temp = temp * dl[*i] / dl[*j];
+ } else if (*igrade == 5) {
+ temp = temp * dl[*i] * dl[*j];
+ }
+ ret_val = temp;
+ return ret_val;
+
+/* End of DLATM3 */
+
+} /* dlatm3_ */
+
diff --git a/TESTING/MATGEN/dlatme.c b/TESTING/MATGEN/dlatme.c
new file mode 100644
index 0000000..33a15b4
--- /dev/null
+++ b/TESTING/MATGEN/dlatme.c
@@ -0,0 +1,682 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__1 = 1;
+static doublereal c_b23 = 0.;
+static integer c__0 = 0;
+static doublereal c_b39 = 1.;
+
+/* Subroutine */ int dlatme_(integer *n, char *dist, integer *iseed,
+ doublereal *d, integer *mode, doublereal *cond, doublereal *dmax__,
+ char *ei, char *rsign, char *upper, char *sim, doublereal *ds,
+ integer *modes, doublereal *conds, integer *kl, integer *ku,
+ doublereal *anorm, doublereal *a, integer *lda, doublereal *work,
+ integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ doublereal d__1, d__2, d__3;
+
+ /* Local variables */
+ static logical bads;
+ extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
+ doublereal *, integer *, doublereal *, integer *, doublereal *,
+ integer *);
+ static integer isim;
+ static doublereal temp;
+ static logical badei;
+ static integer i, j;
+ static doublereal alpha;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *);
+ extern logical lsame_(char *, char *);
+ extern /* Subroutine */ int dgemv_(char *, integer *, integer *,
+ doublereal *, doublereal *, integer *, doublereal *, integer *,
+ doublereal *, doublereal *, integer *);
+ static integer iinfo;
+ static doublereal tempa[1];
+ static integer icols;
+ static logical useei;
+ static integer idist;
+ extern /* Subroutine */ int dcopy_(integer *, doublereal *, integer *,
+ doublereal *, integer *);
+ static integer irows;
+ extern /* Subroutine */ int dlatm1_(integer *, doublereal *, integer *,
+ integer *, integer *, doublereal *, integer *, integer *);
+ static integer ic, jc;
+ extern doublereal dlange_(char *, integer *, integer *, doublereal *,
+ integer *, doublereal *);
+ static integer ir, jr;
+ extern /* Subroutine */ int dlarge_(integer *, doublereal *, integer *,
+ integer *, doublereal *, integer *), dlarfg_(integer *,
+ doublereal *, doublereal *, integer *, doublereal *);
+ extern doublereal dlaran_(integer *);
+ extern /* Subroutine */ int dlaset_(char *, integer *, integer *,
+ doublereal *, doublereal *, doublereal *, integer *),
+ xerbla_(char *, integer *), dlarnv_(integer *, integer *,
+ integer *, doublereal *);
+ static integer irsign, iupper;
+ static doublereal xnorms;
+ static integer jcr;
+ static doublereal tau;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLATME generates random non-symmetric square matrices with
+ specified eigenvalues for testing LAPACK programs.
+
+ DLATME operates by applying the following sequence of
+ operations:
+
+ 1. Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and RSIGN
+ as described below.
+
+ 2. If complex conjugate pairs are desired (MODE=0 and EI(1)='R',
+ or MODE=5), certain pairs of adjacent elements of D are
+ interpreted as the real and complex parts of a complex
+ conjugate pair; A thus becomes block diagonal, with 1x1
+ and 2x2 blocks.
+
+ 3. If UPPER='T', the upper triangle of A is set to random values
+ out of distribution DIST.
+
+ 4. If SIM='T', A is multiplied on the left by a random matrix
+ X, whose singular values are specified by DS, MODES, and
+ CONDS, and on the right by X inverse.
+
+ 5. If KL < N-1, the lower bandwidth is reduced to KL using
+ Householder transformations. If KU < N-1, the upper
+ bandwidth is reduced to KU.
+
+ 6. If ANORM is not negative, the matrix is scaled to have
+ maximum-element-norm ANORM.
+
+ (Note: since the matrix cannot be reduced beyond Hessenberg form,
+
+ no packing options are available.)
+
+ Arguments
+ =========
+
+ N - INTEGER
+ The number of columns (or rows) of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values, and for the
+ upper triangle (see UPPER).
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to DLATME
+ to continue the same random number sequence.
+ Changed on exit.
+
+ D - DOUBLE PRECISION array, dimension ( N )
+ This array is used to specify the eigenvalues of A. If
+ MODE=0, then D is assumed to contain the eigenvalues (but
+ see the description of EI), otherwise they will be
+ computed according to MODE, COND, DMAX, and RSIGN and
+ placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the eigenvalues are to
+ be specified:
+ MODE = 0 means use D (with EI) as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed. Each odd-even pair
+ of elements will be either used as two real
+ eigenvalues or as the real and imaginary part
+ of a complex conjugate pair of eigenvalues;
+ the choice of which is done is random, with
+ 50-50 probability, for each pair.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is between 1 and 4, D has entries ranging
+ from 1 to 1/COND, if between -1 and -4, D has entries
+ ranging from 1/COND to 1,
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - DOUBLE PRECISION
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))). Note that DMAX need not be
+ positive: if DMAX is negative (or zero), D will be
+ scaled by a negative number (or zero).
+ Not modified.
+
+ EI - CHARACTER*1 array, dimension ( N )
+ If MODE is 0, and EI(1) is not ' ' (space character),
+ this array specifies which elements of D (on input) are
+ real eigenvalues and which are the real and imaginary parts
+
+ of a complex conjugate pair of eigenvalues. The elements
+ of EI may then only have the values 'R' and 'I'. If
+ EI(j)='R' and EI(j+1)='I', then the j-th eigenvalue is
+ CMPLX( D(j) , D(j+1) ), and the (j+1)-th is the complex
+ conjugate thereof. If EI(j)=EI(j+1)='R', then the j-th
+ eigenvalue is D(j) (i.e., real). EI(1) may not be 'I',
+ nor may two adjacent elements of EI both have the value 'I'.
+
+ If MODE is not 0, then EI is ignored. If MODE is 0 and
+ EI(1)=' ', then the eigenvalues will all be real.
+ Not modified.
+
+ RSIGN - CHARACTER*1
+ If MODE is not 0, 6, or -6, and RSIGN='T', then the
+ elements of D, as computed according to MODE and COND, will
+
+ be multiplied by a random sign (+1 or -1). If RSIGN='F',
+ they will not be. RSIGN may only have the values 'T' or
+ 'F'.
+ Not modified.
+
+ UPPER - CHARACTER*1
+ If UPPER='T', then the elements of A above the diagonal
+ (and above the 2x2 diagonal blocks, if A has complex
+ eigenvalues) will be set to random numbers out of DIST.
+ If UPPER='F', they will not. UPPER may only have the
+ values 'T' or 'F'.
+ Not modified.
+
+ SIM - CHARACTER*1
+ If SIM='T', then A will be operated on by a "similarity
+ transform", i.e., multiplied on the left by a matrix X and
+ on the right by X inverse. X = U S V, where U and V are
+ random unitary matrices and S is a (diagonal) matrix of
+ singular values specified by DS, MODES, and CONDS. If
+ SIM='F', then A will not be transformed.
+ Not modified.
+
+ DS - DOUBLE PRECISION array, dimension ( N )
+ This array is used to specify the singular values of X,
+ in the same way that D specifies the eigenvalues of A.
+ If MODE=0, the DS contains the singular values, which
+ may not be zero.
+ Modified if MODE is nonzero.
+
+ MODES - INTEGER
+ CONDS - DOUBLE PRECISION
+ Same as MODE and COND, but for specifying the diagonal
+ of S. MODES=-6 and +6 are not allowed (since they would
+ result in randomly ill-conditioned eigenvalues.)
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. KL=1
+ specifies upper Hessenberg form. If KL is at least N-1,
+ then A will have full lower bandwidth. KL must be at
+ least 1.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. KU=1
+ specifies lower Hessenberg form. If KU is at least N-1,
+ then A will have full upper bandwidth; if KU and KL
+ are both at least N-1, then A will be dense. Only one of
+ KU and KL may be less than N-1. KU must be at least 1.
+ Not modified.
+
+ ANORM - DOUBLE PRECISION
+ If ANORM is not negative, then A will be scaled by a non-
+ negative real number to make the maximum-element-norm of A
+ to be ANORM.
+ Not modified.
+
+ A - DOUBLE PRECISION array, dimension ( LDA, N )
+ On exit A is the desired test matrix.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. LDA must be at least N.
+ Not modified.
+
+ WORK - DOUBLE PRECISION array, dimension ( 3*N )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => N negative
+ -2 => DIST illegal string
+ -5 => MODE not in range -6 to 6
+ -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -8 => EI(1) is not ' ' or 'R', EI(j) is not 'R' or 'I', or
+
+ two adjacent elements of EI are 'I'.
+ -9 => RSIGN is not 'T' or 'F'
+ -10 => UPPER is not 'T' or 'F'
+ -11 => SIM is not 'T' or 'F'
+ -12 => MODES=0 and DS has a zero singular value.
+ -13 => MODES is not in the range -5 to 5.
+ -14 => MODES is nonzero and CONDS is less than 1.
+ -15 => KL is less than 1.
+ -16 => KU is less than 1, or KL and KU are both less than
+ N-1.
+ -19 => LDA is less than N.
+ 1 => Error return from DLATM1 (computing D)
+ 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+ 3 => Error return from DLATM1 (computing DS)
+ 4 => Error return from DLARGE
+ 5 => Zero singular value from DLATM1.
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --ei;
+ --ds;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Check EI */
+
+ useei = TRUE_;
+ badei = FALSE_;
+ if (lsame_(ei + 1, " ") || *mode != 0) {
+ useei = FALSE_;
+ } else {
+ if (lsame_(ei + 1, "R")) {
+ i__1 = *n;
+ for (j = 2; j <= i__1; ++j) {
+ if (lsame_(ei + j, "I")) {
+ if (lsame_(ei + (j - 1), "I")) {
+ badei = TRUE_;
+ }
+ } else {
+ if (! lsame_(ei + j, "R")) {
+ badei = TRUE_;
+ }
+ }
+/* L10: */
+ }
+ } else {
+ badei = TRUE_;
+ }
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode UPPER */
+
+ if (lsame_(upper, "T")) {
+ iupper = 1;
+ } else if (lsame_(upper, "F")) {
+ iupper = 0;
+ } else {
+ iupper = -1;
+ }
+
+/* Decode SIM */
+
+ if (lsame_(sim, "T")) {
+ isim = 1;
+ } else if (lsame_(sim, "F")) {
+ isim = 0;
+ } else {
+ isim = -1;
+ }
+
+/* Check DS, if MODES=0 and ISIM=1 */
+
+ bads = FALSE_;
+ if (*modes == 0 && isim == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ if (ds[j] == 0.) {
+ bads = TRUE_;
+ }
+/* L20: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*n < 0) {
+ *info = -1;
+ } else if (idist == -1) {
+ *info = -2;
+ } else if (abs(*mode) > 6) {
+ *info = -5;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.) {
+ *info = -6;
+ } else if (badei) {
+ *info = -8;
+ } else if (irsign == -1) {
+ *info = -9;
+ } else if (iupper == -1) {
+ *info = -10;
+ } else if (isim == -1) {
+ *info = -11;
+ } else if (bads) {
+ *info = -12;
+ } else if (isim == 1 && abs(*modes) > 5) {
+ *info = -13;
+ } else if (isim == 1 && *modes != 0 && *conds < 1.) {
+ *info = -14;
+ } else if (*kl < 1) {
+ *info = -15;
+ } else if (*ku < 1 || *ku < *n - 1 && *kl < *n - 1) {
+ *info = -16;
+ } else if (*lda < max(1,*n)) {
+ *info = -19;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("DLATME", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L30: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up diagonal of A
+
+ Compute D according to COND and MODE */
+
+ dlatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = abs(d[1]);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ d__2 = temp, d__3 = (d__1 = d[i], abs(d__1));
+ temp = max(d__2,d__3);
+/* L40: */
+ }
+
+ if (temp > 0.) {
+ alpha = *dmax__ / temp;
+ } else if (*dmax__ != 0.) {
+ *info = 2;
+ return 0;
+ } else {
+ alpha = 0.;
+ }
+
+ dscal_(n, &alpha, &d[1], &c__1);
+
+ }
+
+ dlaset_("Full", n, n, &c_b23, &c_b23, &a[a_offset], lda);
+ i__1 = *lda + 1;
+ dcopy_(n, &d[1], &c__1, &a[a_offset], &i__1);
+
+/* Set up complex conjugate pairs */
+
+ if (*mode == 0) {
+ if (useei) {
+ i__1 = *n;
+ for (j = 2; j <= i__1; ++j) {
+ if (lsame_(ei + j, "I")) {
+ a[j - 1 + j * a_dim1] = a[j + j * a_dim1];
+ a[j + (j - 1) * a_dim1] = -a[j + j * a_dim1];
+ a[j + j * a_dim1] = a[j - 1 + (j - 1) * a_dim1];
+ }
+/* L50: */
+ }
+ }
+
+ } else if (abs(*mode) == 5) {
+
+ i__1 = *n;
+ for (j = 2; j <= i__1; j += 2) {
+ if (dlaran_(&iseed[1]) > .5) {
+ a[j - 1 + j * a_dim1] = a[j + j * a_dim1];
+ a[j + (j - 1) * a_dim1] = -a[j + j * a_dim1];
+ a[j + j * a_dim1] = a[j - 1 + (j - 1) * a_dim1];
+ }
+/* L60: */
+ }
+ }
+
+/* 3) If UPPER='T', set upper triangle of A to random numbers.
+ (but don't modify the corners of 2x2 blocks.) */
+
+ if (iupper != 0) {
+ i__1 = *n;
+ for (jc = 2; jc <= i__1; ++jc) {
+ if (a[jc - 1 + jc * a_dim1] != 0.) {
+ jr = jc - 2;
+ } else {
+ jr = jc - 1;
+ }
+ dlarnv_(&idist, &iseed[1], &jr, &a[jc * a_dim1 + 1]);
+/* L70: */
+ }
+ }
+
+/* 4) If SIM='T', apply similarity transformation.
+
+ -1
+ Transform is X A X , where X = U S V, thus
+
+ it is U S V A V' (1/S) U' */
+
+ if (isim != 0) {
+
+/* Compute S (singular values of the eigenvector matrix)
+ according to CONDS and MODES */
+
+ dlatm1_(modes, conds, &c__0, &c__0, &iseed[1], &ds[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+
+/* Multiply by V and V' */
+
+ dlarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+
+/* Multiply by S and (1/S) */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ dscal_(n, &ds[j], &a[j + a_dim1], lda);
+ if (ds[j] != 0.) {
+ d__1 = 1. / ds[j];
+ dscal_(n, &d__1, &a[j * a_dim1 + 1], &c__1);
+ } else {
+ *info = 5;
+ return 0;
+ }
+/* L80: */
+ }
+
+/* Multiply by U and U' */
+
+ dlarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 5) Reduce the bandwidth. */
+
+ if (*kl < *n - 1) {
+
+/* Reduce bandwidth -- kill column */
+
+ i__1 = *n - 1;
+ for (jcr = *kl + 1; jcr <= i__1; ++jcr) {
+ ic = jcr - *kl;
+ irows = *n + 1 - jcr;
+ icols = *n + *kl - jcr;
+
+ dcopy_(&irows, &a[jcr + ic * a_dim1], &c__1, &work[1], &c__1);
+ xnorms = work[1];
+ dlarfg_(&irows, &xnorms, &work[2], &c__1, &tau);
+ work[1] = 1.;
+
+ dgemv_("T", &irows, &icols, &c_b39, &a[jcr + (ic + 1) * a_dim1],
+ lda, &work[1], &c__1, &c_b23, &work[irows + 1], &c__1)
+ ;
+ d__1 = -tau;
+ dger_(&irows, &icols, &d__1, &work[1], &c__1, &work[irows + 1], &
+ c__1, &a[jcr + (ic + 1) * a_dim1], lda);
+
+ dgemv_("N", n, &irows, &c_b39, &a[jcr * a_dim1 + 1], lda, &work[1]
+ , &c__1, &c_b23, &work[irows + 1], &c__1);
+ d__1 = -tau;
+ dger_(n, &irows, &d__1, &work[irows + 1], &c__1, &work[1], &c__1,
+ &a[jcr * a_dim1 + 1], lda);
+
+ a[jcr + ic * a_dim1] = xnorms;
+ i__2 = irows - 1;
+ dlaset_("Full", &i__2, &c__1, &c_b23, &c_b23, &a[jcr + 1 + ic *
+ a_dim1], lda);
+/* L90: */
+ }
+ } else if (*ku < *n - 1) {
+
+/* Reduce upper bandwidth -- kill a row at a time. */
+
+ i__1 = *n - 1;
+ for (jcr = *ku + 1; jcr <= i__1; ++jcr) {
+ ir = jcr - *ku;
+ irows = *n + *ku - jcr;
+ icols = *n + 1 - jcr;
+
+ dcopy_(&icols, &a[ir + jcr * a_dim1], lda, &work[1], &c__1);
+ xnorms = work[1];
+ dlarfg_(&icols, &xnorms, &work[2], &c__1, &tau);
+ work[1] = 1.;
+
+ dgemv_("N", &irows, &icols, &c_b39, &a[ir + 1 + jcr * a_dim1],
+ lda, &work[1], &c__1, &c_b23, &work[icols + 1], &c__1)
+ ;
+ d__1 = -tau;
+ dger_(&irows, &icols, &d__1, &work[icols + 1], &c__1, &work[1], &
+ c__1, &a[ir + 1 + jcr * a_dim1], lda);
+
+ dgemv_("C", &icols, n, &c_b39, &a[jcr + a_dim1], lda, &work[1], &
+ c__1, &c_b23, &work[icols + 1], &c__1);
+ d__1 = -tau;
+ dger_(&icols, n, &d__1, &work[1], &c__1, &work[icols + 1], &c__1,
+ &a[jcr + a_dim1], lda);
+
+ a[ir + jcr * a_dim1] = xnorms;
+ i__2 = icols - 1;
+ dlaset_("Full", &c__1, &i__2, &c_b23, &c_b23, &a[ir + (jcr + 1) *
+ a_dim1], lda);
+/* L100: */
+ }
+ }
+
+/* Scale the matrix to have norm ANORM */
+
+ if (*anorm >= 0.) {
+ temp = dlange_("M", n, n, &a[a_offset], lda, tempa);
+ if (temp > 0.) {
+ alpha = *anorm / temp;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ dscal_(n, &alpha, &a[j * a_dim1 + 1], &c__1);
+/* L110: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of DLATME */
+
+} /* dlatme_ */
+
diff --git a/TESTING/MATGEN/dlatmr.c b/TESTING/MATGEN/dlatmr.c
new file mode 100644
index 0000000..7998df1
--- /dev/null
+++ b/TESTING/MATGEN/dlatmr.c
@@ -0,0 +1,1288 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__0 = 0;
+static integer c__1 = 1;
+
+/* Subroutine */ int dlatmr_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, doublereal *d, integer *mode, doublereal *cond,
+ doublereal *dmax__, char *rsign, char *grade, doublereal *dl, integer
+ *model, doublereal *condl, doublereal *dr, integer *moder, doublereal
+ *condr, char *pivtng, integer *ipivot, integer *kl, integer *ku,
+ doublereal *sparse, doublereal *anorm, char *pack, doublereal *a,
+ integer *lda, integer *iwork, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ doublereal d__1, d__2, d__3;
+
+ /* Local variables */
+ static integer isub, jsub;
+ static doublereal temp;
+ static integer isym, i, j, k;
+ static doublereal alpha;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *);
+ static integer ipack;
+ extern logical lsame_(char *, char *);
+ static doublereal tempa[1];
+ static integer iisub, idist, jjsub, mnmin;
+ static logical dzero;
+ static integer mnsub;
+ static doublereal onorm;
+ static integer mxsub, npvts;
+ extern /* Subroutine */ int dlatm1_(integer *, doublereal *, integer *,
+ integer *, integer *, doublereal *, integer *, integer *);
+ extern doublereal dlatm2_(integer *, integer *, integer *, integer *,
+ integer *, integer *, integer *, integer *, doublereal *, integer
+ *, doublereal *, doublereal *, integer *, integer *, doublereal *)
+ , dlatm3_(integer *, integer *, integer *, integer *, integer *,
+ integer *, integer *, integer *, integer *, integer *, doublereal
+ *, integer *, doublereal *, doublereal *, integer *, integer *,
+ doublereal *), dlangb_(char *, integer *, integer *, integer *,
+ doublereal *, integer *, doublereal *), dlange_(char *,
+ integer *, integer *, doublereal *, integer *, doublereal *);
+ static integer igrade;
+ extern doublereal dlansb_(char *, char *, integer *, integer *,
+ doublereal *, integer *, doublereal *);
+ static logical fulbnd;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical badpvt;
+ extern doublereal dlansp_(char *, char *, integer *, doublereal *,
+ doublereal *), dlansy_(char *, char *, integer *,
+ doublereal *, integer *, doublereal *);
+ static integer irsign, ipvtng, kll, kuu;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ DLATMR generates random matrices of various types for testing
+ LAPACK programs.
+
+ DLATMR operates by applying the following sequence of
+ operations:
+
+ Generate a matrix A with random entries of distribution DIST
+ which is symmetric if SYM='S', and nonsymmetric
+ if SYM='N'.
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX and RSIGN
+ as described below.
+
+ Grade the matrix, if desired, from the left and/or right
+ as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+ MODER and CONDR also determine the grading as described
+ below.
+
+ Permute, if desired, the rows and/or columns as specified by
+ PIVTNG and IPIVOT.
+
+ Set random entries to zero, if desired, to get a random sparse
+ matrix as specified by SPARSE.
+
+ Make A a band matrix, if desired, by zeroing out the matrix
+ outside a band of lower bandwidth KL and upper bandwidth KU.
+
+
+ Scale A, if desired, to have maximum entry ANORM.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if symmetric)
+ zero out lower half (if symmetric)
+ store the upper half columnwise (if symmetric or
+ square upper triangular)
+ store the lower half columnwise (if symmetric or
+ square lower triangular)
+ same as upper half rowwise if symmetric
+ store the lower triangle in banded format (if symmetric)
+ store the upper triangle in banded format (if symmetric)
+ store the entire matrix in banded format
+
+ Note: If two calls to DLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+
+ If two calls to DLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be and
+ is not maintained with less than full bandwidth.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of A. Not modified.
+
+ N - INTEGER
+ Number of columns of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate a random matrix .
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension (4)
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to DLATMR
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='S' or 'H', generated matrix is symmetric.
+ If SYM='N', generated matrix is nonsymmetric.
+ Not modified.
+
+ D - DOUBLE PRECISION array, dimension (min(M,N))
+ On entry this array specifies the diagonal entries
+ of the diagonal of A. D may either be specified
+ on entry, or set according to MODE and COND as described
+ below. May be changed on exit if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry describes how D is to be used:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - DOUBLE PRECISION
+ If MODE neither -6, 0 nor 6, the diagonal is scaled by
+ DMAX / max(abs(D(i))), so that maximum absolute entry
+ of diagonal is abs(DMAX). If DMAX is negative (or zero),
+ diagonal will be scaled by a negative number (or zero).
+
+ RSIGN - CHARACTER*1
+ If MODE neither -6, 0 nor 6, specifies sign of diagonal
+ as follows:
+ 'T' => diagonal entries are multiplied by 1 or -1
+ with probability .5
+ 'F' => diagonal unchanged
+ Not modified.
+
+ GRADE - CHARACTER*1
+ Specifies grading of matrix as follows:
+ 'N' => no grading
+ 'L' => matrix premultiplied by diag( DL )
+ (only if matrix nonsymmetric)
+ 'R' => matrix postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'B' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'S' or 'H' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ ('S' for symmetric, or 'H' for Hermitian)
+ 'E' => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ ( 'E' for eigenvalue invariance)
+ (only if matrix nonsymmetric)
+ Note: if GRADE='E', then M must equal N.
+ Not modified.
+
+ DL - DOUBLE PRECISION array, dimension (M)
+ If MODEL=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODEL is not zero, then DL will be set according
+ to MODEL and CONDL, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DL).
+
+ If GRADE='E', then DL cannot have zero entries.
+ Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+
+ MODEL - INTEGER
+ This specifies how the diagonal array DL is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDL - DOUBLE PRECISION
+ When MODEL is not zero, this specifies the condition number
+
+ of the computed DL. Not modified.
+
+ DR - DOUBLE PRECISION array, dimension (N)
+ If MODER=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODER is not zero, then DR will be set according
+ to MODER and CONDR, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DR).
+
+ Not referenced if GRADE = 'N', 'L', 'H', 'S' or 'E'.
+ Changed on exit.
+
+ MODER - INTEGER
+ This specifies how the diagonal array DR is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDR - DOUBLE PRECISION
+ When MODER is not zero, this specifies the condition number
+
+ of the computed DR. Not modified.
+
+ PIVTNG - CHARACTER*1
+ On entry specifies pivoting permutations as follows:
+ 'N' or ' ' => none.
+ 'L' => left or row pivoting (matrix must be nonsymmetric).
+ 'R' => right or column pivoting (matrix must be
+ nonsymmetric).
+ 'B' or 'F' => both or full pivoting, i.e., on both sides.
+ In this case, M must equal N
+
+ If two calls to DLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be
+ maintained with less than full bandwidth.
+
+ IPIVOT - INTEGER array, dimension (N or M)
+ This array specifies the permutation used. After the
+ basic matrix is generated, the rows, columns, or both
+ are permuted. If, say, row pivoting is selected, DLATMR
+ starts with the *last* row and interchanges the M-th and
+ IPIVOT(M)-th rows, then moves to the next-to-last row,
+ interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+ and so on. In terms of "2-cycles", the permutation is
+ (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+ where the rightmost cycle is applied first. This is the
+ *inverse* of the effect of pivoting in LINPACK. The idea
+ is that factoring (with pivoting) an identity matrix
+ which has been inverse-pivoted in this way should
+ result in a pivot vector identical to IPIVOT.
+ Not referenced if PIVTNG = 'N'. Not modified.
+
+ SPARSE - DOUBLE PRECISION
+ On entry specifies the sparsity of the matrix if a sparse
+ matrix is to be generated. SPARSE should lie between
+ 0 and 1. To generate a sparse matrix, for each matrix entry
+
+ a uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ KL - INTEGER
+ On entry specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL at least M-1 implies the matrix is not
+ banded. Must equal KU if matrix is symmetric.
+ Not modified.
+
+ KU - INTEGER
+ On entry specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU at least N-1 implies the matrix is not
+ banded. Must equal KL if matrix is symmetric.
+ Not modified.
+
+ ANORM - DOUBLE PRECISION
+ On entry specifies maximum entry of output matrix
+ (output matrix will by multiplied by a constant so that
+ its largest absolute entry equal ANORM)
+ if ANORM is nonnegative. If ANORM is negative no scaling
+ is done. Not modified.
+
+ PACK - CHARACTER*1
+ On entry specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries (if symmetric)
+ 'L' => zero out all superdiagonal entries (if symmetric)
+ 'C' => store the upper triangle columnwise
+ (only if matrix symmetric or square upper triangular)
+
+ 'R' => store the lower triangle columnwise
+ (only if matrix symmetric or square lower triangular)
+
+ (same as upper half rowwise if symmetric)
+ 'B' => store the lower triangle in band storage scheme
+ (only if matrix symmetric)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if matrix symmetric)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, SB or TB - use 'B' or 'Q'
+ PP, SP or TP - use 'C' or 'R'
+
+ If two calls to DLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - DOUBLE PRECISION array, dimension (LDA,N)
+ On exit A is the desired test matrix. Only those
+ entries of A which are significant on output
+ will be referenced (even if A is in packed or band
+ storage format). The 'unoccupied corners' of A in
+ band format will be zeroed out.
+
+ LDA - INTEGER
+ on entry LDA specifies the first dimension of A as
+ declared in the calling program.
+ If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+
+ If PACK='C' or 'R', LDA must be at least 1.
+ If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+ If PACK='Z', LDA must be at least KUU+KLL+1, where
+ KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+ Not modified.
+
+ IWORK - INTEGER array, dimension ( N or M)
+ Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+
+
+ INFO - INTEGER
+ Error parameter on exit:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S' or 'H'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+ -11 => GRADE illegal string, or GRADE='E' and
+ M not equal to N, or GRADE='L', 'R', 'B' or 'E' and
+ SYM = 'S' or 'H'
+ -12 => GRADE = 'E' and DL contains zero
+ -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+
+ 'S' or 'E'
+ -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+
+ and MODEL neither -6, 0 nor 6
+ -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+ -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+ MODER neither -6, 0 nor 6
+ -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+ M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+ or 'H'
+ -19 => IPIVOT contains out of range number and
+ PIVTNG not equal to 'N'
+ -20 => KL negative
+ -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+
+ -22 => SPARSE not in range 0. to 1.
+ -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+ and SYM='N', or PACK='C' and SYM='N' and either KL
+ not equal to 0 or N not equal to M, or PACK='R' and
+ SYM='N', and either KU not equal to 0 or N not equal
+
+ to M
+ -26 => LDA too small
+ 1 => Error return from DLATM1 (computing D)
+ 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+ 3 => Error return from DLATM1 (computing DL)
+ 4 => Error return from DLATM1 (computing DR)
+ 5 => ANORM is positive, but matrix constructed prior to
+ attempting to scale it to have norm ANORM, is zero
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --dl;
+ --dr;
+ --ipivot;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iwork;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "S")) {
+ isym = 0;
+ } else if (lsame_(sym, "N")) {
+ isym = 1;
+ } else if (lsame_(sym, "H")) {
+ isym = 0;
+ } else {
+ isym = -1;
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode PIVTNG */
+
+ if (lsame_(pivtng, "N")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, " ")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, "L")) {
+ ipvtng = 1;
+ npvts = *m;
+ } else if (lsame_(pivtng, "R")) {
+ ipvtng = 2;
+ npvts = *n;
+ } else if (lsame_(pivtng, "B")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else if (lsame_(pivtng, "F")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else {
+ ipvtng = -1;
+ }
+
+/* Decode GRADE */
+
+ if (lsame_(grade, "N")) {
+ igrade = 0;
+ } else if (lsame_(grade, "L")) {
+ igrade = 1;
+ } else if (lsame_(grade, "R")) {
+ igrade = 2;
+ } else if (lsame_(grade, "B")) {
+ igrade = 3;
+ } else if (lsame_(grade, "E")) {
+ igrade = 4;
+ } else if (lsame_(grade, "H") || lsame_(grade, "S")) {
+ igrade = 5;
+ } else {
+ igrade = -1;
+ }
+
+/* Decode PACK */
+
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ kll = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ kuu = min(i__1,i__2);
+
+/* If inv(DL) is used, check to see if DL has a zero entry. */
+
+ dzero = FALSE_;
+ if (igrade == 4 && *model == 0) {
+ i__1 = *m;
+ for (i = 1; i <= i__1; ++i) {
+ if (dl[i] == 0.) {
+ dzero = TRUE_;
+ }
+/* L10: */
+ }
+ }
+
+/* Check values in IPIVOT */
+
+ badpvt = FALSE_;
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (j = 1; j <= i__1; ++j) {
+ if (ipivot[j] <= 0 || ipivot[j] > npvts) {
+ badpvt = TRUE_;
+ }
+/* L20: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && isym == 0) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (*mode < -6 || *mode > 6) {
+ *info = -7;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && *cond < 1.) {
+ *info = -8;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && irsign == -1) {
+ *info = -10;
+ } else if (igrade == -1 || igrade == 4 && *m != *n || igrade >= 1 &&
+ igrade <= 4 && isym == 0) {
+ *info = -11;
+ } else if (igrade == 4 && dzero) {
+ *info = -12;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5) && (
+ *model < -6 || *model > 6)) {
+ *info = -13;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5) && (
+ *model != -6 && *model != 0 && *model != 6) && *condl < 1.) {
+ *info = -14;
+ } else if ((igrade == 2 || igrade == 3) && (*moder < -6 || *moder > 6)) {
+ *info = -16;
+ } else if ((igrade == 2 || igrade == 3) && (*moder != -6 && *moder != 0 &&
+ *moder != 6) && *condr < 1.) {
+ *info = -17;
+ } else if (ipvtng == -1 || ipvtng == 3 && *m != *n || (ipvtng == 1 ||
+ ipvtng == 2) && isym == 0) {
+ *info = -18;
+ } else if (ipvtng != 0 && badpvt) {
+ *info = -19;
+ } else if (*kl < 0) {
+ *info = -20;
+ } else if (*ku < 0 || isym == 0 && *kl != *ku) {
+ *info = -21;
+ } else if (*sparse < 0. || *sparse > 1.) {
+ *info = -22;
+ } else if (ipack == -1 || (ipack == 1 || ipack == 2 || ipack == 5 ||
+ ipack == 6) && isym == 1 || ipack == 3 && isym == 1 && (*kl != 0
+ || *m != *n) || ipack == 4 && isym == 1 && (*ku != 0 || *m != *n))
+ {
+ *info = -24;
+ } else if ((ipack == 0 || ipack == 1 || ipack == 2) && *lda < max(1,*m) ||
+ (ipack == 3 || ipack == 4) && *lda < 1 || (ipack == 5 || ipack ==
+ 6) && *lda < kuu + 1 || ipack == 7 && *lda < kll + kuu + 1) {
+ *info = -26;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("DLATMR", &i__1);
+ return 0;
+ }
+
+/* Decide if we can pivot consistently */
+
+ fulbnd = FALSE_;
+ if (kuu == *n - 1 && kll == *m - 1) {
+ fulbnd = TRUE_;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L30: */
+ }
+
+ iseed[4] = (iseed[4] / 2 << 1) + 1;
+
+/* 2) Set up D, DL, and DR, if indicated.
+
+ Compute D according to COND and MODE */
+
+ dlatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, info);
+ if (*info != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && *mode != -6 && *mode != 6) {
+
+/* Scale by DMAX */
+
+ temp = abs(d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ d__2 = temp, d__3 = (d__1 = d[i], abs(d__1));
+ temp = max(d__2,d__3);
+/* L40: */
+ }
+ if (temp == 0. && *dmax__ != 0.) {
+ *info = 2;
+ return 0;
+ }
+ if (temp != 0.) {
+ alpha = *dmax__ / temp;
+ } else {
+ alpha = 1.;
+ }
+ i__1 = mnmin;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = alpha * d[i];
+/* L50: */
+ }
+
+ }
+
+/* Compute DL if grading set */
+
+ if (igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5) {
+ dlatm1_(model, condl, &c__0, &idist, &iseed[1], &dl[1], m, info);
+ if (*info != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* Compute DR if grading set */
+
+ if (igrade == 2 || igrade == 3) {
+ dlatm1_(moder, condr, &c__0, &idist, &iseed[1], &dr[1], n, info);
+ if (*info != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 3) Generate IWORK if pivoting */
+
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ iwork[i] = i;
+/* L60: */
+ }
+ if (fulbnd) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L70: */
+ }
+ } else {
+ for (i = npvts; i >= 1; --i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L80: */
+ }
+ }
+ }
+
+/* 4) Generate matrices for each kind of PACKing
+ Always sweep matrix columnwise (if symmetric, upper
+ half only) so that matrix generated does not depend
+ on PACK */
+
+ if (fulbnd) {
+
+/* Use DLATM3 so matrices generated with differing PIVOTing onl
+y
+ differ only in the order of their rows and/or columns. */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[isub + jsub * a_dim1] = temp;
+ a[jsub + isub * a_dim1] = temp;
+/* L90: */
+ }
+/* L100: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[isub + jsub * a_dim1] = temp;
+/* L110: */
+ }
+/* L120: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mnsub + mxsub * a_dim1] = temp;
+ if (mnsub != mxsub) {
+ a[mxsub + mnsub * a_dim1] = 0.;
+ }
+/* L130: */
+ }
+/* L140: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mxsub + mnsub * a_dim1] = temp;
+ if (mnsub != mxsub) {
+ a[mnsub + mxsub * a_dim1] = 0.;
+ }
+/* L150: */
+ }
+/* L160: */
+ }
+
+ } else if (ipack == 3) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+
+/* Compute K = location of (ISUB,JSUB) ent
+ry in packed
+ array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ k = mxsub * (mxsub - 1) / 2 + mnsub;
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ a[iisub + jjsub * a_dim1] = temp;
+/* L170: */
+ }
+/* L180: */
+ }
+
+ } else if (ipack == 4) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+
+/* Compute K = location of (I,J) entry in
+packed array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mnsub == 1) {
+ k = mxsub;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - mnsub + 1) * (*n -
+ mnsub + 2) / 2 + mxsub - mnsub + 1;
+ }
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ a[iisub + jjsub * a_dim1] = temp;
+/* L190: */
+ }
+/* L200: */
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ a[j - i + 1 + (i + *n) * a_dim1] = 0.;
+ } else {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mxsub - mnsub + 1 + mnsub * a_dim1] = temp;
+ }
+/* L210: */
+ }
+/* L220: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mnsub - mxsub + kuu + 1 + mxsub * a_dim1] = temp;
+/* L230: */
+ }
+/* L240: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mnsub - mxsub + kuu + 1 + mxsub * a_dim1] = temp;
+ if (i < 1) {
+ a[j - i + 1 + kuu + (i + *n) * a_dim1] = 0.;
+ }
+ if (i >= 1 && mnsub != mxsub) {
+ a[mxsub - mnsub + 1 + kuu + mnsub * a_dim1] =
+ temp;
+ }
+/* L250: */
+ }
+/* L260: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ temp = dlatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[isub - jsub + kuu + 1 + jsub * a_dim1] = temp;
+/* L270: */
+ }
+/* L280: */
+ }
+ }
+
+ }
+
+ } else {
+
+/* Use DLATM2 */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = dlatm2_(m, n, &i, &j, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[j + i * a_dim1] = a[i + j * a_dim1];
+/* L290: */
+ }
+/* L300: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = dlatm2_(m, n, &i, &j, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+/* L310: */
+ }
+/* L320: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = dlatm2_(m, n, &i, &j, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ if (i != j) {
+ a[j + i * a_dim1] = 0.;
+ }
+/* L330: */
+ }
+/* L340: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ a[j + i * a_dim1] = dlatm2_(m, n, &i, &j, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ if (i != j) {
+ a[i + j * a_dim1] = 0.;
+ }
+/* L350: */
+ }
+/* L360: */
+ }
+
+ } else if (ipack == 3) {
+
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ a[isub + jsub * a_dim1] = dlatm2_(m, n, &i, &j, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[1],
+ &ipvtng, &iwork[1], sparse);
+/* L370: */
+ }
+/* L380: */
+ }
+
+ } else if (ipack == 4) {
+
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+
+/* Compute K = location of (I,J) en
+try in packed array */
+
+ if (i == 1) {
+ k = j;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - i + 1) * (*n - i +
+ 2) / 2 + j - i + 1;
+ }
+
+/* Convert K to (ISUB,JSUB) locatio
+n */
+
+ jsub = (k - 1) / *lda + 1;
+ isub = k - *lda * (jsub - 1);
+
+ a[isub + jsub * a_dim1] = dlatm2_(m, n, &i, &j, kl,
+ ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+/* L390: */
+ }
+/* L400: */
+ }
+ } else {
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ a[isub + jsub * a_dim1] = dlatm2_(m, n, &i, &j, kl,
+ ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+/* L410: */
+ }
+/* L420: */
+ }
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ a[j - i + 1 + (i + *n) * a_dim1] = 0.;
+ } else {
+ a[j - i + 1 + i * a_dim1] = dlatm2_(m, n, &i, &j, kl,
+ ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+ }
+/* L430: */
+ }
+/* L440: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ a[i - j + kuu + 1 + j * a_dim1] = dlatm2_(m, n, &i, &j,
+ kl, ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+/* L450: */
+ }
+/* L460: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ a[i - j + kuu + 1 + j * a_dim1] = dlatm2_(m, n, &i, &
+ j, kl, ku, &idist, &iseed[1], &d[1], &igrade,
+ &dl[1], &dr[1], &ipvtng, &iwork[1], sparse);
+ if (i < 1) {
+ a[j - i + 1 + kuu + (i + *n) * a_dim1] = 0.;
+ }
+ if (i >= 1 && i != j) {
+ a[j - i + 1 + kuu + i * a_dim1] = a[i - j + kuu +
+ 1 + j * a_dim1];
+ }
+/* L470: */
+ }
+/* L480: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ a[i - j + kuu + 1 + j * a_dim1] = dlatm2_(m, n, &i, &
+ j, kl, ku, &idist, &iseed[1], &d[1], &igrade,
+ &dl[1], &dr[1], &ipvtng, &iwork[1], sparse);
+/* L490: */
+ }
+/* L500: */
+ }
+ }
+
+ }
+
+ }
+
+/* 5) Scaling the norm */
+
+ if (ipack == 0) {
+ onorm = dlange_("M", m, n, &a[a_offset], lda, tempa);
+ } else if (ipack == 1) {
+ onorm = dlansy_("M", "U", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 2) {
+ onorm = dlansy_("M", "L", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 3) {
+ onorm = dlansp_("M", "U", n, &a[a_offset], tempa);
+ } else if (ipack == 4) {
+ onorm = dlansp_("M", "L", n, &a[a_offset], tempa);
+ } else if (ipack == 5) {
+ onorm = dlansb_("M", "L", n, &kll, &a[a_offset], lda, tempa);
+ } else if (ipack == 6) {
+ onorm = dlansb_("M", "U", n, &kuu, &a[a_offset], lda, tempa);
+ } else if (ipack == 7) {
+ onorm = dlangb_("M", n, &kll, &kuu, &a[a_offset], lda, tempa);
+ }
+
+ if (*anorm >= 0.) {
+
+ if (*anorm > 0. && onorm == 0.) {
+
+/* Desired scaling impossible */
+
+ *info = 5;
+ return 0;
+
+ } else if (*anorm > 1. && onorm < 1. || *anorm < 1. && onorm > 1.) {
+
+/* Scale carefully to avoid over / underflow */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ d__1 = 1. / onorm;
+ dscal_(m, &d__1, &a[j * a_dim1 + 1], &c__1);
+ dscal_(m, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L510: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ d__1 = 1. / onorm;
+ dscal_(&i__1, &d__1, &a[a_offset], &c__1);
+ i__1 = *n * (*n + 1) / 2;
+ dscal_(&i__1, anorm, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ d__1 = 1. / onorm;
+ dscal_(&i__2, &d__1, &a[j * a_dim1 + 1], &c__1);
+ i__2 = kll + kuu + 1;
+ dscal_(&i__2, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L520: */
+ }
+
+ }
+
+ } else {
+
+/* Scale straightforwardly */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ d__1 = *anorm / onorm;
+ dscal_(m, &d__1, &a[j * a_dim1 + 1], &c__1);
+/* L530: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ d__1 = *anorm / onorm;
+ dscal_(&i__1, &d__1, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ d__1 = *anorm / onorm;
+ dscal_(&i__2, &d__1, &a[j * a_dim1 + 1], &c__1);
+/* L540: */
+ }
+ }
+
+ }
+
+ }
+
+/* End of DLATMR */
+
+ return 0;
+} /* dlatmr_ */
+
diff --git a/TESTING/MATGEN/dlatms.c b/TESTING/MATGEN/dlatms.c
new file mode 100644
index 0000000..2426951
--- /dev/null
+++ b/TESTING/MATGEN/dlatms.c
@@ -0,0 +1,1341 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__1 = 1;
+static doublereal c_b22 = 0.;
+static logical c_true = TRUE_;
+static logical c_false = FALSE_;
+
+int
+dlatms_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, doublereal *d, integer *mode, doublereal *cond,
+ doublereal *dmax__, integer *kl, integer *ku, char *pack,
+ doublereal *a, integer *lda, doublereal *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+ doublereal d__1, d__2, d__3;
+ logical L__1;
+
+ /* Builtin functions */
+ double cos(doublereal), sin(doublereal);
+
+ /* Local variables */
+ static integer ilda, icol;
+ static doublereal temp;
+ static integer irow, isym;
+ static doublereal c;
+ static integer i, j, k;
+ static doublereal s, alpha, angle;
+ static integer ipack;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *);
+ static integer ioffg;
+ extern logical lsame_(char *, char *);
+ static integer iinfo, idist, mnmin;
+ extern /* Subroutine */ int dcopy_(integer *, doublereal *, integer *,
+ doublereal *, integer *);
+ static integer iskew;
+ static doublereal extra, dummy;
+ extern /* Subroutine */ int dlatm1_(integer *, doublereal *, integer *,
+ integer *, integer *, doublereal *, integer *, integer *);
+ static integer ic, jc, nc;
+ extern /* Subroutine */ int dlagge_(integer *, integer *, integer *,
+ integer *, doublereal *, doublereal *, integer *, integer *,
+ doublereal *, integer *);
+ static integer il, iendch, ir, jr, ipackg, mr, minlda;
+ extern doublereal dlarnd_(integer *, integer *);
+ extern /* Subroutine */ int dlaset_(char *, integer *, integer *,
+ doublereal *, doublereal *, doublereal *, integer *),
+ dlartg_(doublereal *, doublereal *, doublereal *, doublereal *,
+ doublereal *), xerbla_(char *, integer *), dlagsy_(
+ integer *, integer *, doublereal *, doublereal *, integer *,
+ integer *, doublereal *, integer *), dlarot_(logical *, logical *,
+ logical *, integer *, doublereal *, doublereal *, doublereal *,
+ integer *, doublereal *, doublereal *);
+ static logical iltemp, givens;
+ static integer ioffst, irsign;
+ static logical ilextr, topdwn;
+ static integer ir1, ir2, isympk, jch, llb, jkl, jku, uub;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ DLATMS generates random matrices with specified singular values
+ (or symmetric/hermitian with specified eigenvalues)
+ for testing LAPACK programs.
+
+ DLATMS operates by applying the following sequence of
+ operations:
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and SYM
+ as described below.
+
+ Generate a matrix with the appropriate band structure, by one
+ of two methods:
+
+ Method A:
+ Generate a dense M x N matrix by multiplying D on the left
+ and the right by random unitary matrices, then:
+
+ Reduce the bandwidth according to KL and KU, using
+ Householder transformations.
+
+ Method B:
+ Convert the bandwidth-0 (i.e., diagonal) matrix to a
+ bandwidth-1 matrix using Givens rotations, "chasing"
+ out-of-band elements back, much as in QR; then
+ convert the bandwidth-1 to a bandwidth-2 matrix, etc.
+ Note that for reasonably small bandwidths (relative to
+ M and N) this requires less storage, as a dense matrix
+ is not generated. Also, for symmetric matrices, only
+ one triangle is generated.
+
+ Method A is chosen if the bandwidth is a large fraction of the
+ order of the matrix, and LDA is at least M (so a dense
+ matrix can be stored.) Method B is chosen if the bandwidth
+
+ is small (< 1/2 N for symmetric, < .3 N+M for
+ non-symmetric), or LDA is less than M and not less than the
+
+ bandwidth.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if symmetric)
+ zero out lower half (if symmetric)
+ store the upper half columnwise (if symmetric or upper
+ triangular)
+ store the lower half columnwise (if symmetric or lower
+ triangular)
+ store the lower triangle in banded format (if symmetric
+ or lower triangular)
+ store the upper triangle in banded format (if symmetric
+ or upper triangular)
+ store the entire matrix in banded format
+ If Method B is chosen, and band format is specified, then the
+ matrix will be generated in the band format, so no repacking
+
+ will be necessary.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ The number of rows of A. Not modified.
+
+ N - INTEGER
+ The number of columns of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values.
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to DLATMS
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='S' or 'H', the generated matrix is symmetric, with
+ eigenvalues specified by D, COND, MODE, and DMAX; they
+ may be positive, negative, or zero.
+ If SYM='P', the generated matrix is symmetric, with
+ eigenvalues (= singular values) specified by D, COND,
+ MODE, and DMAX; they will not be negative.
+ If SYM='N', the generated matrix is nonsymmetric, with
+ singular values specified by D, COND, MODE, and DMAX;
+ they will not be negative.
+ Not modified.
+
+ D - DOUBLE PRECISION array, dimension ( MIN( M , N ) )
+ This array is used to specify the singular values or
+ eigenvalues of A (see SYM, above.) If MODE=0, then D is
+ assumed to contain the singular/eigenvalues, otherwise
+ they will be computed according to MODE, COND, and DMAX,
+ and placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the singular/eigenvalues are to
+
+ be specified:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
+ the elements of D will also be multiplied by a random
+ sign (i.e., +1 or -1.)
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - DOUBLE PRECISION
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+
+ singular value (which is to say the norm) will be abs(DMAX).
+
+ Note that DMAX need not be positive: if DMAX is negative
+ (or zero), D will be scaled by a negative number (or zero).
+
+ Not modified.
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL being at least M-1 means that the matrix
+
+ has full lower bandwidth. KL must equal KU if the matrix
+ is symmetric.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU being at least N-1 means that the matrix
+
+ has full upper bandwidth. KL must equal KU if the matrix
+ is symmetric.
+ Not modified.
+
+ PACK - CHARACTER*1
+ This specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries (if symmetric)
+ 'L' => zero out all superdiagonal entries (if symmetric)
+ 'C' => store the upper triangle columnwise
+ (only if the matrix is symmetric or upper triangular)
+
+ 'R' => store the lower triangle columnwise
+ (only if the matrix is symmetric or lower triangular)
+
+ 'B' => store the lower triangle in band storage scheme
+ (only if matrix symmetric or lower triangular)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if matrix symmetric or upper triangular)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, SB or TB - use 'B' or 'Q'
+ PP, SP or TP - use 'C' or 'R'
+
+ If two calls to DLATMS differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - DOUBLE PRECISION array, dimension ( LDA, N )
+ On exit A is the desired test matrix. A is first generated
+ in full (unpacked) form, and then packed, if so specified
+ by PACK. Thus, the first M elements of the first N
+ columns will always be modified. If PACK specifies a
+ packed or banded storage scheme, all LDA elements of the
+ first N columns will be modified; the elements of the
+ array which do not correspond to elements of the generated
+ matrix are set to zero.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+ LDA must be at least M. If PACK='B' or 'Q', then LDA must
+ be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+ If PACK='Z', LDA must be large enough to hold the packed
+ array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+ Not modified.
+
+ WORK - DOUBLE PRECISION array, dimension ( 3*MAX( N , M ) )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => KL negative
+ -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+
+ -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+
+ or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+ or PACK='R' or 'B' and SYM='N' and KU is not zero;
+ or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+
+ N.
+ -14 => LDA is less than M, or PACK='Z' and LDA is less than
+
+ MIN(KU,N-1) + MIN(KL,M-1) + 1.
+ 1 => Error return from DLATM1
+ 2 => Cannot scale to DMAX (max. sing. value is 0)
+ 3 => Error return from DLAGGE or SLAGSY
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "N")) {
+ isym = 1;
+ irsign = 0;
+ } else if (lsame_(sym, "P")) {
+ isym = 2;
+ irsign = 0;
+ } else if (lsame_(sym, "S")) {
+ isym = 2;
+ irsign = 1;
+ } else if (lsame_(sym, "H")) {
+ isym = 2;
+ irsign = 1;
+ } else {
+ isym = -1;
+ }
+
+/* Decode PACK */
+
+ isympk = 0;
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ isympk = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ isympk = 1;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ isympk = 2;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ isympk = 3;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ isympk = 3;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ isympk = 2;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ llb = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ uub = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *m, i__2 = *n + llb;
+ mr = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *n, i__2 = *m + uub;
+ nc = min(i__1,i__2);
+
+ if (ipack == 5 || ipack == 6) {
+ minlda = uub + 1;
+ } else if (ipack == 7) {
+ minlda = llb + uub + 1;
+ } else {
+ minlda = *m;
+ }
+
+/* Use Givens rotation method if bandwidth small enough,
+ or if LDA is too small to store the matrix unpacked. */
+
+ givens = FALSE_;
+ if (isym == 1) {
+/* Computing MAX */
+ i__1 = 1, i__2 = mr + nc;
+ if ((doublereal) (llb + uub) < (doublereal) max(i__1,i__2) * .3) {
+ givens = TRUE_;
+ }
+ } else {
+ if (llb << 1 < *m) {
+ givens = TRUE_;
+ }
+ }
+ if (*lda < *m && *lda >= minlda) {
+ givens = TRUE_;
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && isym != 1) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (abs(*mode) > 6) {
+ *info = -7;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.) {
+ *info = -8;
+ } else if (*kl < 0) {
+ *info = -10;
+ } else if (*ku < 0 || isym != 1 && *kl != *ku) {
+ *info = -11;
+ } else if (ipack == -1 || isympk == 1 && isym == 1 || isympk == 2 && isym
+ == 1 && *kl > 0 || isympk == 3 && isym == 1 && *ku > 0 || isympk
+ != 0 && *m != *n) {
+ *info = -12;
+ } else if (*lda < max(1,minlda)) {
+ *info = -14;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("DLATMS", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L10: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up D if indicated.
+
+ Compute D according to COND and MODE */
+
+ dlatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+
+/* Choose Top-Down if D is (apparently) increasing,
+ Bottom-Up if D is (apparently) decreasing. */
+
+ if (abs(d[1]) <= (d__1 = d[mnmin], abs(d__1))) {
+ topdwn = TRUE_;
+ } else {
+ topdwn = FALSE_;
+ }
+
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = abs(d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ d__2 = temp, d__3 = (d__1 = d[i], abs(d__1));
+ temp = max(d__2,d__3);
+/* L20: */
+ }
+
+ if (temp > 0.) {
+ alpha = *dmax__ / temp;
+ } else {
+ *info = 2;
+ return 0;
+ }
+
+ dscal_(&mnmin, &alpha, &d[1], &c__1);
+
+ }
+
+/* 3) Generate Banded Matrix using Givens rotations.
+ Also the special case of UUB=LLB=0
+
+ Compute Addressing constants to cover all
+ storage formats. Whether GE, SY, GB, or SB,
+ upper or lower triangle or both,
+ the (i,j)-th element is in
+ A( i - ISKEW*j + IOFFST, j ) */
+
+ if (ipack > 4) {
+ ilda = *lda - 1;
+ iskew = 1;
+ if (ipack > 5) {
+ ioffst = uub + 1;
+ } else {
+ ioffst = 1;
+ }
+ } else {
+ ilda = *lda;
+ iskew = 0;
+ ioffst = 0;
+ }
+
+/* IPACKG is the format that the matrix is generated in. If this is
+ different from IPACK, then the matrix must be repacked at the
+ end. It also signals how to compute the norm, for scaling. */
+
+ ipackg = 0;
+ dlaset_("Full", lda, n, &c_b22, &c_b22, &a[a_offset], lda);
+
+/* Diagonal Matrix -- We are done, unless it
+ is to be stored SP/PP/TP (PACK='R' or 'C') */
+
+ if (llb == 0 && uub == 0) {
+ i__1 = ilda + 1;
+ dcopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffst + a_dim1], &i__1);
+ if (ipack <= 2 || ipack >= 5) {
+ ipackg = ipack;
+ }
+
+ } else if (givens) {
+
+/* Check whether to use Givens rotations,
+ Householder transformations, or nothing. */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ if (ipack > 4) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+
+ i__1 = ilda + 1;
+ dcopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffst + a_dim1], &
+ i__1);
+
+ if (topdwn) {
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ Last row actually rotated is M
+ Last column actually rotated is MIN( M+
+JKU, N )
+
+ Computing MIN */
+ i__3 = *m + jku;
+ i__2 = min(i__3,*n) + jkl - 1;
+ for (jr = 1; jr <= i__2; ++jr) {
+ extra = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__3 = 1, i__4 = jr - jkl;
+ icol = max(i__3,i__4);
+ if (jr < *m) {
+/* Computing MIN */
+ i__3 = *n, i__4 = jr + jku;
+ il = min(i__3,i__4) + 1 - icol;
+ L__1 = jr > jkl;
+ dlarot_(&c_true, &L__1, &c_false, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ir = jr;
+ ic = icol;
+ i__3 = -jkl - jku;
+ for (jch = jr - jkl; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ir < *m) {
+ dlartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &c, &s,
+ &dummy);
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ temp = 0.;
+ iltemp = jch > jku;
+ d__1 = -s;
+ dlarot_(&c_false, &iltemp, &c_true, &il, &c, &
+ d__1, &a[irow - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &temp, &extra);
+ if (iltemp) {
+ dlartg_(&a[irow + 1 - iskew * (ic + 1) +
+ ioffst + (ic + 1) * a_dim1], &temp, &
+ c, &s, &dummy);
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ extra = 0.;
+ L__1 = jch > jku + jkl;
+ d__1 = -s;
+ dlarot_(&c_true, &L__1, &c_true, &il, &c, &
+ d__1, &a[irow - iskew * icol + ioffst
+ + icol * a_dim1], &ilda, &extra, &
+ temp);
+ ic = icol;
+ ir = irow;
+ }
+/* L30: */
+ }
+/* L40: */
+ }
+/* L50: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ Computing MIN */
+ i__3 = *n + jkl;
+ i__2 = min(i__3,*m) + jku - 1;
+ for (jc = 1; jc <= i__2; ++jc) {
+ extra = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__3 = 1, i__4 = jc - jku;
+ irow = max(i__3,i__4);
+ if (jc < *n) {
+/* Computing MIN */
+ i__3 = *m, i__4 = jc + jkl;
+ il = min(i__3,i__4) + 1 - irow;
+ L__1 = jc > jku;
+ dlarot_(&c_false, &L__1, &c_false, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ic = jc;
+ ir = irow;
+ i__3 = -jkl - jku;
+ for (jch = jc - jku; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ic < *n) {
+ dlartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &c, &s,
+ &dummy);
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ temp = 0.;
+ iltemp = jch > jkl;
+ d__1 = -s;
+ dlarot_(&c_true, &iltemp, &c_true, &il, &c, &d__1,
+ &a[ir - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &temp, &extra);
+ if (iltemp) {
+ dlartg_(&a[ir + 1 - iskew * (icol + 1) +
+ ioffst + (icol + 1) * a_dim1], &temp,
+ &c, &s, &dummy);
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ extra = 0.;
+ L__1 = jch > jkl + jku;
+ d__1 = -s;
+ dlarot_(&c_false, &L__1, &c_true, &il, &c, &
+ d__1, &a[irow - iskew * icol + ioffst
+ + icol * a_dim1], &ilda, &extra, &
+ temp);
+ ic = icol;
+ ir = irow;
+ }
+/* L60: */
+ }
+/* L70: */
+ }
+/* L80: */
+ }
+
+ } else {
+
+/* Bottom-Up -- Start at the bottom right. */
+
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ First row actually rotated is M
+ First column actually rotated is MIN( M
++JKU, N )
+
+ Computing MIN */
+ i__2 = *m, i__3 = *n + jkl;
+ iendch = min(i__2,i__3) - 1;
+/* Computing MIN */
+ i__2 = *m + jku;
+ i__3 = 1 - jkl;
+ for (jc = min(i__2,*n) - 1; jc >= i__3; --jc) {
+ extra = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - jku + 1;
+ irow = max(i__2,i__4);
+ if (jc > 0) {
+/* Computing MIN */
+ i__2 = *m, i__4 = jc + jkl + 1;
+ il = min(i__2,i__4) + 1 - irow;
+ L__1 = jc + jkl < *m;
+ dlarot_(&c_false, &c_false, &L__1, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ic = jc;
+ i__2 = iendch;
+ i__4 = jkl + jku;
+ for (jch = jc + jkl; i__4 < 0 ? jch >= i__2 : jch <=
+ i__2; jch += i__4) {
+ ilextr = ic > 0;
+ if (ilextr) {
+ dlartg_(&a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &extra, &c, &s, &dummy);
+ }
+ ic = max(1,ic);
+/* Computing MIN */
+ i__5 = *n - 1, i__6 = jch + jku;
+ icol = min(i__5,i__6);
+ iltemp = jch + jku < *n;
+ temp = 0.;
+ i__5 = icol + 2 - ic;
+ dlarot_(&c_true, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &extra, &temp);
+ if (iltemp) {
+ dlartg_(&a[jch - iskew * icol + ioffst + icol
+ * a_dim1], &temp, &c, &s, &dummy);
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra = 0.;
+ L__1 = jch + jkl + jku <= iendch;
+ dlarot_(&c_false, &c_true, &L__1, &il, &c, &s,
+ &a[jch - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &temp, &extra);
+ ic = icol;
+ }
+/* L90: */
+ }
+/* L100: */
+ }
+/* L110: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ First row actually rotated is MIN( N+JK
+L, M )
+ First column actually rotated is N
+
+ Computing MIN */
+ i__3 = *n, i__4 = *m + jku;
+ iendch = min(i__3,i__4) - 1;
+/* Computing MIN */
+ i__3 = *n + jkl;
+ i__4 = 1 - jku;
+ for (jr = min(i__3,*m) - 1; jr >= i__4; --jr) {
+ extra = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__3 = 1, i__2 = jr - jkl + 1;
+ icol = max(i__3,i__2);
+ if (jr > 0) {
+/* Computing MIN */
+ i__3 = *n, i__2 = jr + jku + 1;
+ il = min(i__3,i__2) + 1 - icol;
+ L__1 = jr + jku < *n;
+ dlarot_(&c_true, &c_false, &L__1, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ir = jr;
+ i__3 = iendch;
+ i__2 = jkl + jku;
+ for (jch = jr + jku; i__2 < 0 ? jch >= i__3 : jch <=
+ i__3; jch += i__2) {
+ ilextr = ir > 0;
+ if (ilextr) {
+ dlartg_(&a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &extra, &c, &s, &dummy);
+ }
+ ir = max(1,ir);
+/* Computing MIN */
+ i__5 = *m - 1, i__6 = jch + jkl;
+ irow = min(i__5,i__6);
+ iltemp = jch + jkl < *m;
+ temp = 0.;
+ i__5 = irow + 2 - ir;
+ dlarot_(&c_false, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &extra, &temp);
+ if (iltemp) {
+ dlartg_(&a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &temp, &c, &s, &dummy);
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra = 0.;
+ L__1 = jch + jkl + jku <= iendch;
+ dlarot_(&c_true, &c_true, &L__1, &il, &c, &s,
+ &a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &temp, &extra);
+ ir = irow;
+ }
+/* L120: */
+ }
+/* L130: */
+ }
+/* L140: */
+ }
+ }
+
+ } else {
+
+/* Symmetric -- A = U D U' */
+
+ ipackg = ipack;
+ ioffg = ioffst;
+
+ if (topdwn) {
+
+/* Top-Down -- Generate Upper triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 6;
+ ioffg = uub + 1;
+ } else {
+ ipackg = 1;
+ }
+ i__1 = ilda + 1;
+ dcopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffg + a_dim1], &
+ i__1);
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ i__4 = *n - 1;
+ for (jc = 1; jc <= i__4; ++jc) {
+/* Computing MAX */
+ i__2 = 1, i__3 = jc - k;
+ irow = max(i__2,i__3);
+/* Computing MIN */
+ i__2 = jc + 1, i__3 = k + 2;
+ il = min(i__2,i__3);
+ extra = 0.;
+ temp = a[jc - iskew * (jc + 1) + ioffg + (jc + 1) *
+ a_dim1];
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ c = cos(angle);
+ s = sin(angle);
+ L__1 = jc > k;
+ dlarot_(&c_false, &L__1, &c_true, &il, &c, &s, &a[
+ irow - iskew * jc + ioffg + jc * a_dim1], &
+ ilda, &extra, &temp);
+/* Computing MIN */
+ i__3 = k, i__5 = *n - jc;
+ i__2 = min(i__3,i__5) + 1;
+ dlarot_(&c_true, &c_true, &c_false, &i__2, &c, &s, &a[
+ (1 - iskew) * jc + ioffg + jc * a_dim1], &
+ ilda, &temp, &dummy);
+
+/* Chase EXTRA back up the matrix
+*/
+
+ icol = jc;
+ i__2 = -k;
+ for (jch = jc - k; i__2 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__2) {
+ dlartg_(&a[jch + 1 - iskew * (icol + 1) + ioffg +
+ (icol + 1) * a_dim1], &extra, &c, &s, &
+ dummy);
+ temp = a[jch - iskew * (jch + 1) + ioffg + (jch +
+ 1) * a_dim1];
+ i__3 = k + 2;
+ d__1 = -s;
+ dlarot_(&c_true, &c_true, &c_true, &i__3, &c, &
+ d__1, &a[(1 - iskew) * jch + ioffg + jch *
+ a_dim1], &ilda, &temp, &extra);
+/* Computing MAX */
+ i__3 = 1, i__5 = jch - k;
+ irow = max(i__3,i__5);
+/* Computing MIN */
+ i__3 = jch + 1, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra = 0.;
+ L__1 = jch > k;
+ d__1 = -s;
+ dlarot_(&c_false, &L__1, &c_true, &il, &c, &d__1,
+ &a[irow - iskew * jch + ioffg + jch *
+ a_dim1], &ilda, &extra, &temp);
+ icol = jch;
+/* L150: */
+ }
+/* L160: */
+ }
+/* L170: */
+ }
+
+/* If we need lower triangle, copy from upper. No
+te that
+ the order of copying is chosen to work for 'q'
+ -> 'b' */
+
+ if (ipack != ipackg && ipack != 3) {
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ irow = ioffst - iskew * jc;
+/* Computing MIN */
+ i__2 = *n, i__3 = jc + uub;
+ i__4 = min(i__2,i__3);
+ for (jr = jc; jr <= i__4; ++jr) {
+ a[jr + irow + jc * a_dim1] = a[jc - iskew * jr +
+ ioffg + jr * a_dim1];
+/* L180: */
+ }
+/* L190: */
+ }
+ if (ipack == 5) {
+ i__1 = *n;
+ for (jc = *n - uub + 1; jc <= i__1; ++jc) {
+ i__4 = uub + 1;
+ for (jr = *n + 2 - jc; jr <= i__4; ++jr) {
+ a[jr + jc * a_dim1] = 0.;
+/* L200: */
+ }
+/* L210: */
+ }
+ }
+ if (ipackg == 6) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ } else {
+
+/* Bottom-Up -- Generate Lower triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 5;
+ if (ipack == 6) {
+ ioffg = 1;
+ }
+ } else {
+ ipackg = 2;
+ }
+ i__1 = ilda + 1;
+ dcopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffg + a_dim1], &
+ i__1);
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ for (jc = *n - 1; jc >= 1; --jc) {
+/* Computing MIN */
+ i__4 = *n + 1 - jc, i__2 = k + 2;
+ il = min(i__4,i__2);
+ extra = 0.;
+ temp = a[(1 - iskew) * jc + 1 + ioffg + jc * a_dim1];
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ c = cos(angle);
+ s = -sin(angle);
+ L__1 = *n - jc > k;
+ dlarot_(&c_false, &c_true, &L__1, &il, &c, &s, &a[(1
+ - iskew) * jc + ioffg + jc * a_dim1], &ilda, &
+ temp, &extra);
+/* Computing MAX */
+ i__4 = 1, i__2 = jc - k + 1;
+ icol = max(i__4,i__2);
+ i__4 = jc + 2 - icol;
+ dlarot_(&c_true, &c_false, &c_true, &i__4, &c, &s, &a[
+ jc - iskew * icol + ioffg + icol * a_dim1], &
+ ilda, &dummy, &temp);
+
+/* Chase EXTRA back down the matrix
+ */
+
+ icol = jc;
+ i__4 = *n - 1;
+ i__2 = k;
+ for (jch = jc + k; i__2 < 0 ? jch >= i__4 : jch <=
+ i__4; jch += i__2) {
+ dlartg_(&a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &extra, &c, &s, &dummy);
+ temp = a[(1 - iskew) * jch + 1 + ioffg + jch *
+ a_dim1];
+ i__3 = k + 2;
+ dlarot_(&c_true, &c_true, &c_true, &i__3, &c, &s,
+ &a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &ilda, &extra, &temp);
+/* Computing MIN */
+ i__3 = *n + 1 - jch, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra = 0.;
+ L__1 = *n - jch > k;
+ dlarot_(&c_false, &c_true, &L__1, &il, &c, &s, &a[
+ (1 - iskew) * jch + ioffg + jch * a_dim1],
+ &ilda, &temp, &extra);
+ icol = jch;
+/* L220: */
+ }
+/* L230: */
+ }
+/* L240: */
+ }
+
+/* If we need upper triangle, copy from lower. No
+te that
+ the order of copying is chosen to work for 'b'
+ -> 'q' */
+
+ if (ipack != ipackg && ipack != 4) {
+ for (jc = *n; jc >= 1; --jc) {
+ irow = ioffst - iskew * jc;
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - uub;
+ i__1 = max(i__2,i__4);
+ for (jr = jc; jr >= i__1; --jr) {
+ a[jr + irow + jc * a_dim1] = a[jc - iskew * jr +
+ ioffg + jr * a_dim1];
+/* L250: */
+ }
+/* L260: */
+ }
+ if (ipack == 6) {
+ i__1 = uub;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ a[jr + jc * a_dim1] = 0.;
+/* L270: */
+ }
+/* L280: */
+ }
+ }
+ if (ipackg == 5) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ }
+ }
+
+ } else {
+
+/* 4) Generate Banded Matrix by first
+ Rotating by random Unitary matrices,
+ then reducing the bandwidth using Householder
+ transformations.
+
+ Note: we should get here only if LDA .ge. N */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ dlagge_(&mr, &nc, &llb, &uub, &d[1], &a[a_offset], lda, &iseed[1],
+ &work[1], &iinfo);
+ } else {
+
+/* Symmetric -- A = U D U' */
+
+ dlagsy_(m, &llb, &d[1], &a[a_offset], lda, &iseed[1], &work[1], &
+ iinfo);
+
+ }
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* 5) Pack the matrix */
+
+ if (ipack != ipackg) {
+ if (ipack == 1) {
+
+/* 'U' -- Upper triangular, not packed */
+
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.;
+/* L290: */
+ }
+/* L300: */
+ }
+
+ } else if (ipack == 2) {
+
+/* 'L' -- Lower triangular, not packed */
+
+ i__1 = *m;
+ for (j = 2; j <= i__1; ++j) {
+ i__2 = j - 1;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.;
+/* L310: */
+ }
+/* L320: */
+ }
+
+ } else if (ipack == 3) {
+
+/* 'C' -- Upper triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ a[irow + icol * a_dim1] = a[i + j * a_dim1];
+/* L330: */
+ }
+/* L340: */
+ }
+
+ } else if (ipack == 4) {
+
+/* 'R' -- Lower triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ a[irow + icol * a_dim1] = a[i + j * a_dim1];
+/* L350: */
+ }
+/* L360: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* 'B' -- The lower triangle is packed as a band matrix.
+
+ 'Q' -- The upper triangle is packed as a band matrix.
+
+ 'Z' -- The whole matrix is packed as a band matrix.
+*/
+
+ if (ipack == 5) {
+ uub = 0;
+ }
+ if (ipack == 6) {
+ llb = 0;
+ }
+
+ i__1 = uub;
+ for (j = 1; j <= i__1; ++j) {
+/* Computing MIN */
+ i__2 = j + llb;
+ for (i = min(i__2,*m); i >= 1; --i) {
+ a[i - j + uub + 1 + j * a_dim1] = a[i + j * a_dim1];
+/* L370: */
+ }
+/* L380: */
+ }
+
+ i__1 = *n;
+ for (j = uub + 2; j <= i__1; ++j) {
+/* Computing MIN */
+ i__4 = j + llb;
+ i__2 = min(i__4,*m);
+ for (i = j - uub; i <= i__2; ++i) {
+ a[i - j + uub + 1 + j * a_dim1] = a[i + j * a_dim1];
+/* L390: */
+ }
+/* L400: */
+ }
+ }
+
+/* If packed, zero out extraneous elements.
+
+ Symmetric/Triangular Packed --
+ zero out everything after A(IROW,ICOL) */
+
+ if (ipack == 3 || ipack == 4) {
+ i__1 = *m;
+ for (jc = icol; jc <= i__1; ++jc) {
+ i__2 = *lda;
+ for (jr = irow + 1; jr <= i__2; ++jr) {
+ a[jr + jc * a_dim1] = 0.;
+/* L410: */
+ }
+ irow = 0;
+/* L420: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* Packed Band --
+ 1st row is now in A( UUB+2-j, j), zero above it
+ m-th row is now in A( M+UUB-j,j), zero below it
+ last non-zero diagonal is now in A( UUB+LLB+1,j ),
+
+ zero below it, too. */
+
+ ir1 = uub + llb + 2;
+ ir2 = uub + *m + 2;
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ a[jr + jc * a_dim1] = 0.;
+/* L430: */
+ }
+/* Computing MAX
+ Computing MIN */
+ i__3 = ir1, i__5 = ir2 - jc;
+ i__2 = 1, i__4 = min(i__3,i__5);
+ i__6 = *lda;
+ for (jr = max(i__2,i__4); jr <= i__6; ++jr) {
+ a[jr + jc * a_dim1] = 0.;
+/* L440: */
+ }
+/* L450: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of DLATMS */
+
+} /* dlatms_ */
+
diff --git a/TESTING/MATGEN/f2c.h b/TESTING/MATGEN/f2c.h
new file mode 100644
index 0000000..caa33e1
--- /dev/null
+++ b/TESTING/MATGEN/f2c.h
@@ -0,0 +1,48 @@
+/* f2c.h -- Standard Fortran to C header file */
+
+/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
+
+ - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
+
+#include "Cnames.h"
+
+#ifndef F2C_INCLUDE
+#define F2C_INCLUDE
+
+#if 0
+typedef long int integer; /* 64 on 64-bit machine */
+typedef long int logical;
+#endif
+
+typedef int integer;
+typedef int logical;
+
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
+typedef short int shortlogical;
+typedef char logical1;
+typedef char integer1;
+/* typedef long long longint; */ /* system-dependent */
+
+#define TRUE_ (1)
+#define FALSE_ (0)
+
+/* Extern is for use with -E */
+#ifndef Extern
+#define Extern extern
+#endif
+
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define dabs(x) (doublereal)abs(x)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#define dmin(a,b) (doublereal)min(a,b)
+#define dmax(a,b) (doublereal)max(a,b)
+
+#define VOID void
+
+#endif
diff --git a/TESTING/MATGEN/lsamen.c b/TESTING/MATGEN/lsamen.c
new file mode 100644
index 0000000..270716d
--- /dev/null
+++ b/TESTING/MATGEN/lsamen.c
@@ -0,0 +1,69 @@
+#include "f2c.h"
+
+logical lsamen_(integer *n, char *ca, char *cb)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ LSAMEN tests if the first N letters of CA are the same as the
+ first N letters of CB, regardless of case.
+ LSAMEN returns .TRUE. if CA and CB are equivalent except for case
+ and .FALSE. otherwise. LSAMEN also returns .FALSE. if LEN( CA )
+ or LEN( CB ) is less than N.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The number of characters in CA and CB to be compared.
+
+ CA (input) CHARACTER*(*)
+ CB (input) CHARACTER*(*)
+ CA and CB specify two character strings of length at least N.
+
+ Only the first N characters of each string will be accessed.
+
+
+ =====================================================================
+*/
+ /* System generated locals */
+ integer i__1;
+ logical ret_val;
+ /* Local variables */
+ static integer i;
+ extern logical lsame_(char *, char *);
+
+
+ ret_val = FALSE_;
+ if (strlen(ca) < *n || strlen(cb) < *n) {
+ goto L20;
+ }
+
+/* Do for each character in the two strings. */
+
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+
+/* Test if the characters are equal using LSAME. */
+
+ if (! lsame_(ca + (i - 1), cb + (i - 1))) {
+ goto L20;
+ }
+
+/* L10: */
+ }
+ ret_val = TRUE_;
+
+L20:
+ return ret_val;
+
+/* End of LSAMEN */
+
+} /* lsamen_ */
+
diff --git a/TESTING/MATGEN/pow_dd.c b/TESTING/MATGEN/pow_dd.c
new file mode 100644
index 0000000..d2bb0e3
--- /dev/null
+++ b/TESTING/MATGEN/pow_dd.c
@@ -0,0 +1,13 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+double pow();
+double pow_dd(ap, bp) doublereal *ap, *bp;
+#else
+#undef abs
+#include "math.h"
+double pow_dd(doublereal *ap, doublereal *bp)
+#endif
+{
+return(pow(*ap, *bp) );
+}
diff --git a/TESTING/MATGEN/r_lg10.c b/TESTING/MATGEN/r_lg10.c
new file mode 100644
index 0000000..4ea02f4
--- /dev/null
+++ b/TESTING/MATGEN/r_lg10.c
@@ -0,0 +1,15 @@
+#include "f2c.h"
+
+#define log10e 0.43429448190325182765
+
+#ifdef KR_headers
+double log();
+double r_lg10(x) real *x;
+#else
+#undef abs
+#include "math.h"
+double r_lg10(real *x)
+#endif
+{
+return( log10e * log(*x) );
+}
diff --git a/TESTING/MATGEN/r_sign.c b/TESTING/MATGEN/r_sign.c
new file mode 100644
index 0000000..df6d02a
--- /dev/null
+++ b/TESTING/MATGEN/r_sign.c
@@ -0,0 +1,12 @@
+#include "f2c.h"
+
+#ifdef KR_headers
+double r_sign(a,b) real *a, *b;
+#else
+double r_sign(real *a, real *b)
+#endif
+{
+double x;
+x = (*a >= 0 ? *a : - *a);
+return( *b >= 0 ? x : -x);
+}
diff --git a/TESTING/MATGEN/slabad.c b/TESTING/MATGEN/slabad.c
new file mode 100644
index 0000000..9294196
--- /dev/null
+++ b/TESTING/MATGEN/slabad.c
@@ -0,0 +1,60 @@
+#include "f2c.h"
+
+/* Subroutine */ int slabad_(real *small, real *large)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLABAD takes as input the values computed by SLAMCH for underflow and
+
+ overflow, and returns the square root of each of these values if the
+
+ log of LARGE is sufficiently large. This subroutine is intended to
+ identify machines with a large exponent range, such as the Crays, and
+
+ redefine the underflow and overflow limits to be the square roots of
+
+ the values computed by SLAMCH. This subroutine is needed because
+ SLAMCH does not compensate for poor arithmetic in the upper half of
+ the exponent range, as is found on a Cray.
+
+ Arguments
+ =========
+
+ SMALL (input/output) REAL
+ On entry, the underflow threshold as computed by SLAMCH.
+ On exit, if LOG10(LARGE) is sufficiently large, the square
+ root of SMALL, otherwise unchanged.
+
+ LARGE (input/output) REAL
+ On entry, the overflow threshold as computed by SLAMCH.
+ On exit, if LOG10(LARGE) is sufficiently large, the square
+ root of LARGE, otherwise unchanged.
+
+ =====================================================================
+
+
+
+ If it looks like we're on a Cray, take the square root of
+ SMALL and LARGE to avoid overflow and underflow problems. */
+ /* Builtin functions */
+ double r_lg10(real *), sqrt(doublereal);
+
+
+ if (r_lg10(large) > 2e3f) {
+ *small = sqrt(*small);
+ *large = sqrt(*large);
+ }
+
+ return 0;
+
+/* End of SLABAD */
+
+} /* slabad_ */
+
diff --git a/TESTING/MATGEN/slagge.c b/TESTING/MATGEN/slagge.c
new file mode 100644
index 0000000..7844658
--- /dev/null
+++ b/TESTING/MATGEN/slagge.c
@@ -0,0 +1,400 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__3 = 3;
+static integer c__1 = 1;
+static real c_b11 = 1.f;
+static real c_b13 = 0.f;
+
+/* Subroutine */ int slagge_(integer *m, integer *n, integer *kl, integer *ku,
+ real *d, real *a, integer *lda, integer *iseed, real *work, integer *
+ info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ real r__1;
+
+ /* Builtin functions */
+ double r_sign(real *, real *);
+
+ /* Local variables */
+ extern /* Subroutine */ int sger_(integer *, integer *, real *, real *,
+ integer *, real *, integer *, real *, integer *);
+ extern real snrm2_(integer *, real *, integer *);
+ static integer i, j;
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *),
+ sgemv_(char *, integer *, integer *, real *, real *, integer *,
+ real *, integer *, real *, real *, integer *);
+ static real wa, wb, wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), slarnv_(
+ integer *, integer *, integer *, real *);
+ static real tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0)
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLAGGE generates a real general m by n matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with random orthogonal matrices:
+
+ A = U*D*V. The lower and upper bandwidths may then be reduced to
+ kl and ku by additional orthogonal transformations.
+
+ Arguments
+ =========
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ KL (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= KL <= M-1.
+
+ KU (input) INTEGER
+ The number of nonzero superdiagonals within the band of A.
+ 0 <= KU <= N-1.
+
+ D (input) REAL array, dimension (min(M,N))
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) REAL array, dimension (LDA,N)
+ The generated m by n matrix A.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= M.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) REAL array, dimension (M+N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*m < 0) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (*kl < 0 || *kl > *m - 1) {
+ *info = -3;
+ } else if (*ku < 0 || *ku > *n - 1) {
+ *info = -4;
+ } else if (*lda < max(1,*m)) {
+ *info = -7;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("SLAGGE", &i__1);
+ return 0;
+ }
+
+/* initialize A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.f;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = min(*m,*n);
+ for (i = 1; i <= i__1; ++i) {
+ a[i + i * a_dim1] = d[i];
+/* L30: */
+ }
+
+/* pre- and post-multiply A by random orthogonal matrices */
+
+ for (i = min(*m,*n); i >= 1; --i) {
+ if (i < *m) {
+
+/* generate random reflection */
+
+ i__1 = *m - i + 1;
+ slarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *m - i + 1;
+ wn = snrm2_(&i__1, &work[1], &c__1);
+ wa = r_sign(&wn, &work[1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *m - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__1, &r__1, &work[2], &c__1);
+ work[1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the lef
+t */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ sgemv_("Transpose", &i__1, &i__2, &c_b11, &a[i + i * a_dim1], lda,
+ &work[1], &c__1, &c_b13, &work[*m + 1], &c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ r__1 = -(doublereal)tau;
+ sger_(&i__1, &i__2, &r__1, &work[1], &c__1, &work[*m + 1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+ if (i < *n) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ slarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = snrm2_(&i__1, &work[1], &c__1);
+ wa = r_sign(&wn, &work[1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *n - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__1, &r__1, &work[2], &c__1);
+ work[1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the rig
+ht */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ sgemv_("No transpose", &i__1, &i__2, &c_b11, &a[i + i * a_dim1],
+ lda, &work[1], &c__1, &c_b13, &work[*n + 1], &c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ r__1 = -(doublereal)tau;
+ sger_(&i__1, &i__2, &r__1, &work[*n + 1], &c__1, &work[1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to KL and number of superdiagonals
+ to KU
+
+ Computing MAX */
+ i__2 = *m - 1 - *kl, i__3 = *n - 1 - *ku;
+ i__1 = max(i__2,i__3);
+ for (i = 1; i <= i__1; ++i) {
+ if (*kl <= *ku) {
+
+/* annihilate subdiagonal elements first (necessary if K
+L = 0)
+
+ Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = snrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ wa = r_sign(&wn, &a[*kl + i + i * a_dim1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = a[*kl + i + i * a_dim1] + wa;
+ i__2 = *m - *kl - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__2, &r__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ a[*kl + i + i * a_dim1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ sgemv_("Transpose", &i__2, &i__3, &c_b11, &a[*kl + i + (i + 1)
+ * a_dim1], lda, &a[*kl + i + i * a_dim1], &c__1, &
+ c_b13, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ r__1 = -(doublereal)tau;
+ sger_(&i__2, &i__3, &r__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ a[*kl + i + i * a_dim1] = -(doublereal)wa;
+ }
+
+/* Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = snrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ wa = r_sign(&wn, &a[i + (*ku + i) * a_dim1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = a[i + (*ku + i) * a_dim1] + wa;
+ i__2 = *n - *ku - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__2, &r__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ sgemv_("No transpose", &i__2, &i__3, &c_b11, &a[i + 1 + (*ku
+ + i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda,
+ &c_b13, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ r__1 = -(doublereal)tau;
+ sger_(&i__2, &i__3, &r__1, &work[1], &c__1, &a[i + (*ku + i) *
+ a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = -(doublereal)wa;
+ }
+ } else {
+
+/* annihilate superdiagonal elements first (necessary if
+
+ KU = 0)
+
+ Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = snrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ wa = r_sign(&wn, &a[i + (*ku + i) * a_dim1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = a[i + (*ku + i) * a_dim1] + wa;
+ i__2 = *n - *ku - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__2, &r__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ sgemv_("No transpose", &i__2, &i__3, &c_b11, &a[i + 1 + (*ku
+ + i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda,
+ &c_b13, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ r__1 = -(doublereal)tau;
+ sger_(&i__2, &i__3, &r__1, &work[1], &c__1, &a[i + (*ku + i) *
+ a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ a[i + (*ku + i) * a_dim1] = -(doublereal)wa;
+ }
+
+/* Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = snrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ wa = r_sign(&wn, &a[*kl + i + i * a_dim1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = a[*kl + i + i * a_dim1] + wa;
+ i__2 = *m - *kl - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__2, &r__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ a[*kl + i + i * a_dim1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ sgemv_("Transpose", &i__2, &i__3, &c_b11, &a[*kl + i + (i + 1)
+ * a_dim1], lda, &a[*kl + i + i * a_dim1], &c__1, &
+ c_b13, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ r__1 = -(doublereal)tau;
+ sger_(&i__2, &i__3, &r__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ a[*kl + i + i * a_dim1] = -(doublereal)wa;
+ }
+ }
+
+ i__2 = *m;
+ for (j = *kl + i + 1; j <= i__2; ++j) {
+ a[j + i * a_dim1] = 0.f;
+/* L50: */
+ }
+
+ i__2 = *n;
+ for (j = *ku + i + 1; j <= i__2; ++j) {
+ a[i + j * a_dim1] = 0.f;
+/* L60: */
+ }
+/* L70: */
+ }
+ return 0;
+
+/* End of SLAGGE */
+
+} /* slagge_ */
+
diff --git a/TESTING/MATGEN/slagsy.c b/TESTING/MATGEN/slagsy.c
new file mode 100644
index 0000000..0471b82
--- /dev/null
+++ b/TESTING/MATGEN/slagsy.c
@@ -0,0 +1,272 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__3 = 3;
+static integer c__1 = 1;
+static real c_b12 = 0.f;
+static real c_b19 = -1.f;
+static real c_b26 = 1.f;
+
+/* Subroutine */ int slagsy_(integer *n, integer *k, real *d, real *a,
+ integer *lda, integer *iseed, real *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ real r__1;
+
+ /* Builtin functions */
+ double r_sign(real *, real *);
+
+ /* Local variables */
+ extern /* Subroutine */ int sger_(integer *, integer *, real *, real *,
+ integer *, real *, integer *, real *, integer *);
+ extern real sdot_(integer *, real *, integer *, real *, integer *),
+ snrm2_(integer *, real *, integer *);
+ static integer i, j;
+ extern /* Subroutine */ int ssyr2_(char *, integer *, real *, real *,
+ integer *, real *, integer *, real *, integer *);
+ static real alpha;
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *),
+ sgemv_(char *, integer *, integer *, real *, real *, integer *,
+ real *, integer *, real *, real *, integer *), saxpy_(
+ integer *, real *, real *, integer *, real *, integer *), ssymv_(
+ char *, integer *, real *, real *, integer *, real *, integer *,
+ real *, real *, integer *);
+ static real wa, wb, wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), slarnv_(
+ integer *, integer *, integer *, real *);
+ static real tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0)
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLAGSY generates a real symmetric matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with a random orthogonal matrix:
+
+ A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+
+ orthogonal transformations.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ K (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= K <= N-1.
+
+ D (input) REAL array, dimension (N)
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) REAL array, dimension (LDA,N)
+ The generated n by n symmetric matrix A (the full matrix is
+ stored).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) REAL array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*k < 0 || *k > *n - 1) {
+ *info = -2;
+ } else if (*lda < max(1,*n)) {
+ *info = -5;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("SLAGSY", &i__1);
+ return 0;
+ }
+
+/* initialize lower triangle of A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.f;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ a[i + i * a_dim1] = d[i];
+/* L30: */
+ }
+
+/* Generate lower triangle of symmetric matrix */
+
+ for (i = *n - 1; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ slarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = snrm2_(&i__1, &work[1], &c__1);
+ wa = r_sign(&wn, &work[1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *n - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__1, &r__1, &work[2], &c__1);
+ work[1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* apply random reflection to A(i:n,i:n) from the left
+ and the right
+
+ compute y := tau * A * u */
+
+ i__1 = *n - i + 1;
+ ssymv_("Lower", &i__1, &tau, &a[i + i * a_dim1], lda, &work[1], &c__1,
+ &c_b12, &work[*n + 1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ i__1 = *n - i + 1;
+ alpha = tau * -.5f * sdot_(&i__1, &work[*n + 1], &c__1, &work[1], &
+ c__1);
+ i__1 = *n - i + 1;
+ saxpy_(&i__1, &alpha, &work[1], &c__1, &work[*n + 1], &c__1);
+
+/* apply the transformation as a rank-2 update to A(i:n,i:n) */
+
+ i__1 = *n - i + 1;
+ ssyr2_("Lower", &i__1, &c_b19, &work[1], &c__1, &work[*n + 1], &c__1,
+ &a[i + i * a_dim1], lda);
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to K */
+
+ i__1 = *n - 1 - *k;
+ for (i = 1; i <= i__1; ++i) {
+
+/* generate reflection to annihilate A(k+i+1:n,i) */
+
+ i__2 = *n - *k - i + 1;
+ wn = snrm2_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ wa = r_sign(&wn, &a[*k + i + i * a_dim1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = a[*k + i + i * a_dim1] + wa;
+ i__2 = *n - *k - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__2, &r__1, &a[*k + i + 1 + i * a_dim1], &c__1);
+ a[*k + i + i * a_dim1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* apply reflection to A(k+i:n,i+1:k+i-1) from the left */
+
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ sgemv_("Transpose", &i__2, &i__3, &c_b26, &a[*k + i + (i + 1) *
+ a_dim1], lda, &a[*k + i + i * a_dim1], &c__1, &c_b12, &work[1]
+ , &c__1);
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ r__1 = -(doublereal)tau;
+ sger_(&i__2, &i__3, &r__1, &a[*k + i + i * a_dim1], &c__1, &work[1], &
+ c__1, &a[*k + i + (i + 1) * a_dim1], lda);
+
+/* apply reflection to A(k+i:n,k+i:n) from the left and the rig
+ht
+
+ compute y := tau * A * u */
+
+ i__2 = *n - *k - i + 1;
+ ssymv_("Lower", &i__2, &tau, &a[*k + i + (*k + i) * a_dim1], lda, &a[*
+ k + i + i * a_dim1], &c__1, &c_b12, &work[1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ i__2 = *n - *k - i + 1;
+ alpha = tau * -.5f * sdot_(&i__2, &work[1], &c__1, &a[*k + i + i *
+ a_dim1], &c__1);
+ i__2 = *n - *k - i + 1;
+ saxpy_(&i__2, &alpha, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1)
+ ;
+
+/* apply symmetric rank-2 update to A(k+i:n,k+i:n) */
+
+ i__2 = *n - *k - i + 1;
+ ssyr2_("Lower", &i__2, &c_b19, &a[*k + i + i * a_dim1], &c__1, &work[
+ 1], &c__1, &a[*k + i + (*k + i) * a_dim1], lda);
+
+ a[*k + i + i * a_dim1] = -(doublereal)wa;
+ i__2 = *n;
+ for (j = *k + i + 1; j <= i__2; ++j) {
+ a[j + i * a_dim1] = 0.f;
+/* L50: */
+ }
+/* L60: */
+ }
+
+/* Store full symmetric matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ a[j + i * a_dim1] = a[i + j * a_dim1];
+/* L70: */
+ }
+/* L80: */
+ }
+ return 0;
+
+/* End of SLAGSY */
+
+} /* slagsy_ */
+
diff --git a/TESTING/MATGEN/slaran.c b/TESTING/MATGEN/slaran.c
new file mode 100644
index 0000000..d4723ea
--- /dev/null
+++ b/TESTING/MATGEN/slaran.c
@@ -0,0 +1,92 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal slaran_(integer *iseed)
+{
+ /* System generated locals */
+ real ret_val;
+
+ /* Local variables */
+ static integer it1, it2, it3, it4;
+
+
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLARAN returns a random real number from a uniform (0,1)
+ distribution.
+
+ Arguments
+ =========
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ Further Details
+ ===============
+
+ This routine uses a multiplicative congruential method with modulus
+ 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+ 'Multiplicative congruential random number generators with modulus
+ 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+ b = 48', Math. Comp. 189, pp 331-344, 1990).
+
+ 48-bit integers are stored in 4 integer array elements with 12 bits
+ per element. Hence the routine is portable across machines with
+ integers of 32 bits or more.
+
+ =====================================================================
+
+
+
+ multiply the seed by the multiplier modulo 2**48
+
+ Parameter adjustments */
+ --iseed;
+
+ /* Function Body */
+ it4 = iseed[4] * 2549;
+ it3 = it4 / 4096;
+ it4 -= it3 << 12;
+ it3 = it3 + iseed[3] * 2549 + iseed[4] * 2508;
+ it2 = it3 / 4096;
+ it3 -= it2 << 12;
+ it2 = it2 + iseed[2] * 2549 + iseed[3] * 2508 + iseed[4] * 322;
+ it1 = it2 / 4096;
+ it2 -= it1 << 12;
+ it1 = it1 + iseed[1] * 2549 + iseed[2] * 2508 + iseed[3] * 322 + iseed[4]
+ * 494;
+ it1 %= 4096;
+
+/* return updated seed */
+
+ iseed[1] = it1;
+ iseed[2] = it2;
+ iseed[3] = it3;
+ iseed[4] = it4;
+
+/* convert 48-bit integer to a real number in the interval (0,1) */
+
+ ret_val = ((real) it1 + ((real) it2 + ((real) it3 + (real) it4 *
+ 2.44140625e-4f) * 2.44140625e-4f) * 2.44140625e-4f) *
+ 2.44140625e-4f;
+ return ret_val;
+
+/* End of SLARAN */
+
+} /* slaran_ */
+
diff --git a/TESTING/MATGEN/slarge.c b/TESTING/MATGEN/slarge.c
new file mode 100644
index 0000000..557f474
--- /dev/null
+++ b/TESTING/MATGEN/slarge.c
@@ -0,0 +1,152 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__3 = 3;
+static integer c__1 = 1;
+static real c_b8 = 1.f;
+static real c_b10 = 0.f;
+
+/* Subroutine */ int slarge_(integer *n, real *a, integer *lda, integer *
+ iseed, real *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1;
+ real r__1;
+
+ /* Builtin functions */
+ double r_sign(real *, real *);
+
+ /* Local variables */
+ extern /* Subroutine */ int sger_(integer *, integer *, real *, real *,
+ integer *, real *, integer *, real *, integer *);
+ extern real snrm2_(integer *, real *, integer *);
+ static integer i;
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *),
+ sgemv_(char *, integer *, integer *, real *, real *, integer *,
+ real *, integer *, real *, real *, integer *);
+ static real wa, wb, wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), slarnv_(
+ integer *, integer *, integer *, real *);
+ static real tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0)
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLARGE pre- and post-multiplies a real general n by n matrix A
+ with a random orthogonal matrix: A = U*D*U'.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ A (input/output) REAL array, dimension (LDA,N)
+ On entry, the original n by n matrix A.
+ On exit, A is overwritten by U*A*U' for some random
+ orthogonal matrix U.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) REAL array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*lda < max(1,*n)) {
+ *info = -3;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("SLARGE", &i__1);
+ return 0;
+ }
+
+/* pre- and post-multiply A by random orthogonal matrix */
+
+ for (i = *n; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ slarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = snrm2_(&i__1, &work[1], &c__1);
+ wa = r_sign(&wn, &work[1]);
+ if (wn == 0.f) {
+ tau = 0.f;
+ } else {
+ wb = work[1] + wa;
+ i__1 = *n - i;
+ r__1 = 1.f / wb;
+ sscal_(&i__1, &r__1, &work[2], &c__1);
+ work[1] = 1.f;
+ tau = wb / wa;
+ }
+
+/* multiply A(i:n,1:n) by random reflection from the left */
+
+ i__1 = *n - i + 1;
+ sgemv_("Transpose", &i__1, n, &c_b8, &a[i + a_dim1], lda, &work[1], &
+ c__1, &c_b10, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ r__1 = -(doublereal)tau;
+ sger_(&i__1, n, &r__1, &work[1], &c__1, &work[*n + 1], &c__1, &a[i +
+ a_dim1], lda);
+
+/* multiply A(1:n,i:n) by random reflection from the right */
+
+ i__1 = *n - i + 1;
+ sgemv_("No transpose", n, &i__1, &c_b8, &a[i * a_dim1 + 1], lda, &
+ work[1], &c__1, &c_b10, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ r__1 = -(doublereal)tau;
+ sger_(n, &i__1, &r__1, &work[*n + 1], &c__1, &work[1], &c__1, &a[i *
+ a_dim1 + 1], lda);
+/* L10: */
+ }
+ return 0;
+
+/* End of SLARGE */
+
+} /* slarge_ */
+
diff --git a/TESTING/MATGEN/slarnd.c b/TESTING/MATGEN/slarnd.c
new file mode 100644
index 0000000..e3fcc0e
--- /dev/null
+++ b/TESTING/MATGEN/slarnd.c
@@ -0,0 +1,94 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal slarnd_(integer *idist, integer *iseed)
+{
+ /* System generated locals */
+ real ret_val;
+
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal), cos(doublereal);
+
+ /* Local variables */
+ static real t1, t2;
+ extern doublereal slaran_(integer *);
+
+
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLARND returns a random real number from a uniform or normal
+ distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: uniform (0,1)
+ = 2: uniform (-1,1)
+ = 3: normal (0,1)
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine SLARAN to generate a random
+
+ real number from a uniform (0,1) distribution. The Box-Muller method
+
+ is used to transform numbers from a uniform to a normal distribution.
+
+
+ =====================================================================
+
+
+
+ Generate a real random number from a uniform (0,1) distribution
+
+ Parameter adjustments */
+ --iseed;
+
+ /* Function Body */
+ t1 = slaran_(&iseed[1]);
+
+ if (*idist == 1) {
+
+/* uniform (0,1) */
+
+ ret_val = t1;
+ } else if (*idist == 2) {
+
+/* uniform (-1,1) */
+
+ ret_val = t1 * 2.f - 1.f;
+ } else if (*idist == 3) {
+
+/* normal (0,1) */
+
+ t2 = slaran_(&iseed[1]);
+ ret_val = sqrt(log(t1) * -2.f) * cos(t2 *
+ 6.2831853071795864769252867663f);
+ }
+ return ret_val;
+
+/* End of SLARND */
+
+} /* slarnd_ */
+
diff --git a/TESTING/MATGEN/slarnv.c b/TESTING/MATGEN/slarnv.c
new file mode 100644
index 0000000..ee41fa8
--- /dev/null
+++ b/TESTING/MATGEN/slarnv.c
@@ -0,0 +1,124 @@
+#include "f2c.h"
+
+/* Subroutine */ int slarnv_(integer *idist, integer *iseed, integer *n, real
+ *x)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLARNV returns a vector of n random real numbers from a uniform or
+ normal distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: uniform (0,1)
+ = 2: uniform (-1,1)
+ = 3: normal (0,1)
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ N (input) INTEGER
+ The number of random numbers to be generated.
+
+ X (output) REAL array, dimension (N)
+ The generated random numbers.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine SLARUV to generate random
+ real numbers from a uniform (0,1) distribution, in batches of up to
+ 128 using vectorisable code. The Box-Muller method is used to
+ transform numbers from a uniform to a normal distribution.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2, i__3;
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal), cos(doublereal);
+ /* Local variables */
+ static integer i;
+ static real u[128];
+ static integer il, iv, il2;
+ extern /* Subroutine */ int slaruv_(integer *, integer *, real *);
+
+
+#define X(I) x[(I)-1]
+#define ISEED(I) iseed[(I)-1]
+
+
+ i__1 = *n;
+ for (iv = 1; iv <= *n; iv += 64) {
+/* Computing MIN */
+ i__2 = 64, i__3 = *n - iv + 1;
+ il = min(i__2,i__3);
+ if (*idist == 3) {
+ il2 = il << 1;
+ } else {
+ il2 = il;
+ }
+
+/* Call SLARUV to generate IL2 numbers from a uniform (0,1)
+ distribution (IL2 <= LV) */
+
+ slaruv_(&ISEED(1), &il2, u);
+
+ if (*idist == 1) {
+
+/* Copy generated numbers */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ X(iv + i - 1) = u[i - 1];
+/* L10: */
+ }
+ } else if (*idist == 2) {
+
+/* Convert generated numbers to uniform (-1,1) distribut
+ion */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ X(iv + i - 1) = u[i - 1] * 2.f - 1.f;
+/* L20: */
+ }
+ } else if (*idist == 3) {
+
+/* Convert generated numbers to normal (0,1) distributio
+n */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ X(iv + i - 1) = sqrt(log(u[(i << 1) - 2]) * -2.f) * cos(u[(i
+ << 1) - 1] * 6.2831853071795864769252867663f);
+/* L30: */
+ }
+ }
+/* L40: */
+ }
+ return 0;
+
+/* End of SLARNV */
+
+} /* slarnv_ */
+
diff --git a/TESTING/MATGEN/slaror.c b/TESTING/MATGEN/slaror.c
new file mode 100644
index 0000000..e33c902
--- /dev/null
+++ b/TESTING/MATGEN/slaror.c
@@ -0,0 +1,287 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static real c_b9 = 0.f;
+static real c_b10 = 1.f;
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int slaror_(char *side, char *init, integer *m, integer *n,
+ real *a, integer *lda, integer *iseed, real *x, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ real r__1;
+
+ /* Builtin functions */
+ double r_sign(real *, real *);
+
+ /* Local variables */
+ static integer kbeg, jcol;
+ extern /* Subroutine */ int sger_(integer *, integer *, real *, real *,
+ integer *, real *, integer *, real *, integer *);
+ static integer irow;
+ extern real snrm2_(integer *, real *, integer *);
+ static integer j;
+ extern logical lsame_(char *, char *);
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *),
+ sgemv_(char *, integer *, integer *, real *, real *, integer *,
+ real *, integer *, real *, real *, integer *);
+ static integer ixfrm, itype, nxfrm;
+ static real xnorm;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static real factor;
+ extern doublereal slarnd_(integer *, integer *);
+ extern /* Subroutine */ int slaset_(char *, integer *, integer *, real *,
+ real *, real *, integer *);
+ static real xnorms;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLAROR pre- or post-multiplies an M by N matrix A by a random
+ orthogonal matrix U, overwriting A. A may optionally be initialized
+
+ to the identity matrix before multiplying by U. U is generated using
+
+ the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).
+
+
+ Arguments
+ =========
+
+ SIDE (input) CHARACTER*1
+ Specifies whether A is multiplied on the left or right by U.
+
+ = 'L': Multiply A on the left (premultiply) by U
+ = 'R': Multiply A on the right (postmultiply) by U'
+ = 'C' or 'T': Multiply A on the left by U and the right
+ by U' (Here, U' means U-transpose.)
+
+ INIT (input) CHARACTER*1
+ Specifies whether or not A should be initialized to the
+ identity matrix.
+ = 'I': Initialize A to (a section of) the identity matrix
+ before applying U.
+ = 'N': No initialization. Apply U to the input matrix A.
+
+ INIT = 'I' may be used to generate square or rectangular
+ orthogonal matrices:
+
+ For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
+
+ to each other, as will the columns.
+
+ If M < N, SIDE = 'R' produces a dense matrix whose rows are
+ orthogonal and whose columns are not, while SIDE = 'L'
+ produces a matrix whose rows are orthogonal, and whose first
+
+ M columns are orthogonal, and whose remaining columns are
+ zero.
+
+ If M > N, SIDE = 'L' produces a dense matrix whose columns
+ are orthogonal and whose rows are not, while SIDE = 'R'
+ produces a matrix whose columns are orthogonal, and whose
+ first M rows are orthogonal, and whose remaining rows are
+ zero.
+
+ M (input) INTEGER
+ The number of rows of A.
+
+ N (input) INTEGER
+ The number of columns of A.
+
+ A (input/output) REAL array, dimension (LDA, N)
+ On entry, the array A.
+ On exit, overwritten by U A ( if SIDE = 'L' ),
+ or by A U ( if SIDE = 'R' ),
+ or by U A U' ( if SIDE = 'C' or 'T').
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= max(1,M).
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry ISEED specifies the seed of the random number
+ generator. The array elements should be between 0 and 4095;
+ if not they will be reduced mod 4096. Also, ISEED(4) must
+ be odd. The random number generator uses a linear
+ congruential sequence limited to small integers, and so
+ should produce machine independent random numbers. The
+ values of ISEED are changed on exit, and can be used in the
+ next call to SLAROR to continue the same random number
+ sequence.
+
+ X (workspace) REAL array, dimension (3*MAX( M, N ))
+ Workspace of length
+ 2*M + N if SIDE = 'L',
+ 2*N + M if SIDE = 'R',
+ 3*N if SIDE = 'C' or 'T'.
+
+ INFO (output) INTEGER
+ An error flag. It is set to:
+ = 0: normal return
+ < 0: if INFO = -k, the k-th argument had an illegal value
+ = 1: if the random numbers generated by SLARND are bad.
+
+ =====================================================================
+
+
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --x;
+
+ /* Function Body */
+ if (*n == 0 || *m == 0) {
+ return 0;
+ }
+
+ itype = 0;
+ if (lsame_(side, "L")) {
+ itype = 1;
+ } else if (lsame_(side, "R")) {
+ itype = 2;
+ } else if (lsame_(side, "C") || lsame_(side, "T")) {
+ itype = 3;
+ }
+
+/* Check for argument errors. */
+
+ *info = 0;
+ if (itype == 0) {
+ *info = -1;
+ } else if (*m < 0) {
+ *info = -3;
+ } else if (*n < 0 || itype == 3 && *n != *m) {
+ *info = -4;
+ } else if (*lda < *m) {
+ *info = -6;
+ }
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("SLAROR", &i__1);
+ return 0;
+ }
+
+ if (itype == 1) {
+ nxfrm = *m;
+ } else {
+ nxfrm = *n;
+ }
+
+/* Initialize A to the identity matrix if desired */
+
+ if (lsame_(init, "I")) {
+ slaset_("Full", m, n, &c_b9, &c_b10, &a[a_offset], lda);
+ }
+
+/* If no rotation possible, multiply by random +/-1
+
+ Compute rotation by computing Householder transformations
+ H(2), H(3), ..., H(nhouse) */
+
+ i__1 = nxfrm;
+ for (j = 1; j <= i__1; ++j) {
+ x[j] = 0.f;
+/* L10: */
+ }
+
+ i__1 = nxfrm;
+ for (ixfrm = 2; ixfrm <= i__1; ++ixfrm) {
+ kbeg = nxfrm - ixfrm + 1;
+
+/* Generate independent normal( 0, 1 ) random numbers */
+
+ i__2 = nxfrm;
+ for (j = kbeg; j <= i__2; ++j) {
+ x[j] = slarnd_(&c__3, &iseed[1]);
+/* L20: */
+ }
+
+/* Generate a Householder transformation from the random vector
+ X */
+
+ xnorm = snrm2_(&ixfrm, &x[kbeg], &c__1);
+ xnorms = r_sign(&xnorm, &x[kbeg]);
+ r__1 = -(doublereal)x[kbeg];
+ x[kbeg + nxfrm] = r_sign(&c_b10, &r__1);
+ factor = xnorms * (xnorms + x[kbeg]);
+ if (dabs(factor) < 1e-20f) {
+ *info = 1;
+ xerbla_("SLAROR", info);
+ return 0;
+ } else {
+ factor = 1.f / factor;
+ }
+ x[kbeg] += xnorms;
+
+/* Apply Householder transformation to A */
+
+ if (itype == 1 || itype == 3) {
+
+/* Apply H(k) from the left. */
+
+ sgemv_("T", &ixfrm, n, &c_b10, &a[kbeg + a_dim1], lda, &x[kbeg], &
+ c__1, &c_b9, &x[(nxfrm << 1) + 1], &c__1);
+ r__1 = -(doublereal)factor;
+ sger_(&ixfrm, n, &r__1, &x[kbeg], &c__1, &x[(nxfrm << 1) + 1], &
+ c__1, &a[kbeg + a_dim1], lda);
+
+ }
+
+ if (itype == 2 || itype == 3) {
+
+/* Apply H(k) from the right. */
+
+ sgemv_("N", m, &ixfrm, &c_b10, &a[kbeg * a_dim1 + 1], lda, &x[
+ kbeg], &c__1, &c_b9, &x[(nxfrm << 1) + 1], &c__1);
+ r__1 = -(doublereal)factor;
+ sger_(m, &ixfrm, &r__1, &x[(nxfrm << 1) + 1], &c__1, &x[kbeg], &
+ c__1, &a[kbeg * a_dim1 + 1], lda);
+
+ }
+/* L30: */
+ }
+
+ r__1 = slarnd_(&c__3, &iseed[1]);
+ x[nxfrm * 2] = r_sign(&c_b10, &r__1);
+
+/* Scale the matrix A by D. */
+
+ if (itype == 1 || itype == 3) {
+ i__1 = *m;
+ for (irow = 1; irow <= i__1; ++irow) {
+ sscal_(n, &x[nxfrm + irow], &a[irow + a_dim1], lda);
+/* L40: */
+ }
+ }
+
+ if (itype == 2 || itype == 3) {
+ i__1 = *n;
+ for (jcol = 1; jcol <= i__1; ++jcol) {
+ sscal_(m, &x[nxfrm + jcol], &a[jcol * a_dim1 + 1], &c__1);
+/* L50: */
+ }
+ }
+ return 0;
+
+/* End of SLAROR */
+
+} /* slaror_ */
+
diff --git a/TESTING/MATGEN/slarot.c b/TESTING/MATGEN/slarot.c
new file mode 100644
index 0000000..0ec97fa
--- /dev/null
+++ b/TESTING/MATGEN/slarot.c
@@ -0,0 +1,299 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__4 = 4;
+static integer c__8 = 8;
+static integer c__1 = 1;
+
+/* Subroutine */ int slarot_(logical *lrows, logical *lleft, logical *lright,
+ integer *nl, real *c, real *s, real *a, integer *lda, real *xleft,
+ real *xright)
+{
+ /* System generated locals */
+ integer i__1;
+
+ /* Local variables */
+ static integer iinc;
+ extern /* Subroutine */ int srot_(integer *, real *, integer *, real *,
+ integer *, real *, real *);
+ static integer inext, ix, iy, nt;
+ static real xt[2], yt[2];
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static integer iyt;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLAROT applies a (Givens) rotation to two adjacent rows or
+ columns, where one element of the first and/or last column/row
+ may be a separate variable. This is specifically indended
+ for use on matrices stored in some format other than GE, so
+ that elements of the matrix may be used or modified for which
+ no array element is provided.
+
+ One example is a symmetric matrix in SB format (bandwidth=4), for
+
+ which UPLO='L': Two adjacent rows will have the format:
+
+ row j: * * * * * . . . .
+ row j+1: * * * * * . . . .
+
+ '*' indicates elements for which storage is provided,
+ '.' indicates elements for which no storage is provided, but
+ are not necessarily zero; their values are determined by
+ symmetry. ' ' indicates elements which are necessarily zero,
+ and have no storage provided.
+
+ Those columns which have two '*'s can be handled by SROT.
+ Those columns which have no '*'s can be ignored, since as long
+ as the Givens rotations are carefully applied to preserve
+ symmetry, their values are determined.
+ Those columns which have one '*' have to be handled separately,
+ by using separate variables "p" and "q":
+
+ row j: * * * * * p . . .
+ row j+1: q * * * * * . . . .
+
+ The element p would have to be set correctly, then that column
+ is rotated, setting p to its new value. The next call to
+ SLAROT would rotate columns j and j+1, using p, and restore
+ symmetry. The element q would start out being zero, and be
+ made non-zero by the rotation. Later, rotations would presumably
+
+ be chosen to zero q out.
+
+ Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+ ------- ------- ---------
+
+ General dense matrix:
+
+ CALL SLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+ A(i,1),LDA, DUMMY, DUMMY)
+
+ General banded matrix in GB format:
+
+ j = MAX(1, i-KL )
+ NL = MIN( N, i+KU+1 ) + 1-j
+ CALL SLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+ A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,KL+1) ]
+
+ Symmetric banded matrix in SY format, bandwidth K,
+ lower triangle only:
+
+ j = MAX(1, i-K )
+ NL = MIN( K+1, i ) + 1
+ CALL SLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+ A(i,j), LDA, XLEFT, XRIGHT )
+
+ Same, but upper triangle only:
+
+ NL = MIN( K+1, N-i ) + 1
+ CALL SLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+ A(i,i), LDA, XLEFT, XRIGHT )
+
+ Symmetric banded matrix in SB format, bandwidth K,
+ lower triangle only:
+
+ [ same as for SY, except:]
+ . . . .
+ A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,K+1) ]
+
+ Same, but upper triangle only:
+ . . .
+ A(K+1,i), LDA-1, XLEFT, XRIGHT )
+
+ Rotating columns is just the transpose of rotating rows, except
+
+ for GB and SB: (rotating columns i and i+1)
+
+ GB:
+ j = MAX(1, i-KU )
+ NL = MIN( N, i+KL+1 ) + 1-j
+ CALL SLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+ A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ [note that KU+j+1-i is just MAX(1,KU+2-i)]
+
+ SB: (upper triangle)
+
+ . . . . . .
+ A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ SB: (lower triangle)
+
+ . . . . . .
+ A(1,i),LDA-1, XTOP, XBOTTM )
+
+ Arguments
+ =========
+
+ LROWS - LOGICAL
+ If .TRUE., then SLAROT will rotate two rows. If .FALSE.,
+ then it will rotate two columns.
+ Not modified.
+
+ LLEFT - LOGICAL
+ If .TRUE., then XLEFT will be used instead of the
+ corresponding element of A for the first element in the
+ second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+ If .FALSE., then the corresponding element of A will be
+ used.
+ Not modified.
+
+ LRIGHT - LOGICAL
+ If .TRUE., then XRIGHT will be used instead of the
+ corresponding element of A for the last element in the
+ first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+
+ .FALSE., then the corresponding element of A will be used.
+ Not modified.
+
+ NL - INTEGER
+ The length of the rows (if LROWS=.TRUE.) or columns (if
+ LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+ used, the columns/rows they are in should be included in
+ NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+ least 2. The number of rows/columns to be rotated
+ exclusive of those involving XLEFT and/or XRIGHT may
+ not be negative, i.e., NL minus how many of LLEFT and
+ LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+ will be called.
+ Not modified.
+
+ C, S - REAL
+ Specify the Givens rotation to be applied. If LROWS is
+ true, then the matrix ( c s )
+ (-s c ) is applied from the left;
+ if false, then the transpose thereof is applied from the
+ right. For a Givens rotation, C**2 + S**2 should be 1,
+ but this is not checked.
+ Not modified.
+
+ A - REAL array.
+ The array containing the rows/columns to be rotated. The
+ first element of A should be the upper left element to
+ be rotated.
+ Read and modified.
+
+ LDA - INTEGER
+ The "effective" leading dimension of A. If A contains
+ a matrix stored in GE or SY format, then this is just
+ the leading dimension of A as dimensioned in the calling
+ routine. If A contains a matrix stored in band (GB or SB)
+ format, then this should be *one less* than the leading
+ dimension used in the calling routine. Thus, if
+ A were dimensioned A(LDA,*) in SLAROT, then A(1,j) would
+ be the j-th element in the first of the two rows
+ to be rotated, and A(2,j) would be the j-th in the second,
+ regardless of how the array may be stored in the calling
+ routine. [A cannot, however, actually be dimensioned thus,
+
+ since for band format, the row number may exceed LDA, which
+
+ is not legal FORTRAN.]
+ If LROWS=.TRUE., then LDA must be at least 1, otherwise
+ it must be at least NL minus the number of .TRUE. values
+ in XLEFT and XRIGHT.
+ Not modified.
+
+ XLEFT - REAL
+ If LLEFT is .TRUE., then XLEFT will be used and modified
+ instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ XRIGHT - REAL
+ If LRIGHT is .TRUE., then XRIGHT will be used and modified
+ instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ =====================================================================
+
+
+
+ Set up indices, arrays for ends
+
+ Parameter adjustments */
+ --a;
+
+ /* Function Body */
+ if (*lrows) {
+ iinc = *lda;
+ inext = 1;
+ } else {
+ iinc = 1;
+ inext = *lda;
+ }
+
+ if (*lleft) {
+ nt = 1;
+ ix = iinc + 1;
+ iy = *lda + 2;
+ xt[0] = a[1];
+ yt[0] = *xleft;
+ } else {
+ nt = 0;
+ ix = 1;
+ iy = inext + 1;
+ }
+
+ if (*lright) {
+ iyt = inext + 1 + (*nl - 1) * iinc;
+ ++nt;
+ xt[nt - 1] = *xright;
+ yt[nt - 1] = a[iyt];
+ }
+
+/* Check for errors */
+
+ if (*nl < nt) {
+ xerbla_("SLAROT", &c__4);
+ return 0;
+ }
+ if (*lda <= 0 || ! (*lrows) && *lda < *nl - nt) {
+ xerbla_("SLAROT", &c__8);
+ return 0;
+ }
+
+/* Rotate */
+
+ i__1 = *nl - nt;
+ srot_(&i__1, &a[ix], &iinc, &a[iy], &iinc, c, s);
+ srot_(&nt, xt, &c__1, yt, &c__1, c, s);
+
+/* Stuff values back into XLEFT, XRIGHT, etc. */
+
+ if (*lleft) {
+ a[1] = xt[0];
+ *xleft = yt[0];
+ }
+
+ if (*lright) {
+ *xright = xt[nt - 1];
+ a[iyt] = yt[nt - 1];
+ }
+
+ return 0;
+
+/* End of SLAROT */
+
+} /* slarot_ */
+
diff --git a/TESTING/MATGEN/slartg.c b/TESTING/MATGEN/slartg.c
new file mode 100644
index 0000000..692b2db
--- /dev/null
+++ b/TESTING/MATGEN/slartg.c
@@ -0,0 +1,157 @@
+#include "f2c.h"
+
+/* Subroutine */ int slartg_(real *f, real *g, real *cs, real *sn, real *r)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLARTG generate a plane rotation so that
+
+ [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
+ [ -SN CS ] [ G ] [ 0 ]
+
+ This is a slower, more accurate version of the BLAS1 routine SROTG,
+ with the following other differences:
+ F and G are unchanged on return.
+ If G=0, then CS=1 and SN=0.
+ If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
+ floating point operations (saves work in SBDSQR when
+ there are zeros on the diagonal).
+
+ If F exceeds G in magnitude, CS will be positive.
+
+ Arguments
+ =========
+
+ F (input) REAL
+ The first component of vector to be rotated.
+
+ G (input) REAL
+ The second component of vector to be rotated.
+
+ CS (output) REAL
+ The cosine of the rotation.
+
+ SN (output) REAL
+ The sine of the rotation.
+
+ R (output) REAL
+ The nonzero component of the rotated vector.
+
+ =====================================================================
+*/
+ /* Initialized data */
+ static logical first = TRUE_;
+ /* System generated locals */
+ integer i__1;
+ real r__1, r__2;
+ /* Builtin functions */
+ double log(doublereal), pow_ri(real *, integer *), sqrt(doublereal);
+ /* Local variables */
+ static integer i;
+ static real scale;
+ static integer count;
+ static real f1, g1, safmn2, safmx2;
+ extern doublereal slamch_(char *);
+ static real safmin, eps;
+
+
+
+ if (first) {
+ first = FALSE_;
+ safmin = slamch_("S");
+ eps = slamch_("E");
+ r__1 = slamch_("B");
+ i__1 = (integer) (log(safmin / eps) / log(slamch_("B")) / 2.f);
+ safmn2 = pow_ri(&r__1, &i__1);
+ safmx2 = 1.f / safmn2;
+ }
+ if (*g == 0.f) {
+ *cs = 1.f;
+ *sn = 0.f;
+ *r = *f;
+ } else if (*f == 0.f) {
+ *cs = 0.f;
+ *sn = 1.f;
+ *r = *g;
+ } else {
+ f1 = *f;
+ g1 = *g;
+/* Computing MAX */
+ r__1 = dabs(f1), r__2 = dabs(g1);
+ scale = dmax(r__1,r__2);
+ if (scale >= safmx2) {
+ count = 0;
+L10:
+ ++count;
+ f1 *= safmn2;
+ g1 *= safmn2;
+/* Computing MAX */
+ r__1 = dabs(f1), r__2 = dabs(g1);
+ scale = dmax(r__1,r__2);
+ if (scale >= safmx2) {
+ goto L10;
+ }
+/* Computing 2nd power */
+ r__1 = f1;
+/* Computing 2nd power */
+ r__2 = g1;
+ *r = sqrt(r__1 * r__1 + r__2 * r__2);
+ *cs = f1 / *r;
+ *sn = g1 / *r;
+ i__1 = count;
+ for (i = 1; i <= count; ++i) {
+ *r *= safmx2;
+/* L20: */
+ }
+ } else if (scale <= safmn2) {
+ count = 0;
+L30:
+ ++count;
+ f1 *= safmx2;
+ g1 *= safmx2;
+/* Computing MAX */
+ r__1 = dabs(f1), r__2 = dabs(g1);
+ scale = dmax(r__1,r__2);
+ if (scale <= safmn2) {
+ goto L30;
+ }
+/* Computing 2nd power */
+ r__1 = f1;
+/* Computing 2nd power */
+ r__2 = g1;
+ *r = sqrt(r__1 * r__1 + r__2 * r__2);
+ *cs = f1 / *r;
+ *sn = g1 / *r;
+ i__1 = count;
+ for (i = 1; i <= count; ++i) {
+ *r *= safmn2;
+/* L40: */
+ }
+ } else {
+/* Computing 2nd power */
+ r__1 = f1;
+/* Computing 2nd power */
+ r__2 = g1;
+ *r = sqrt(r__1 * r__1 + r__2 * r__2);
+ *cs = f1 / *r;
+ *sn = g1 / *r;
+ }
+ if (dabs(*f) > dabs(*g) && *cs < 0.f) {
+ *cs = -(doublereal)(*cs);
+ *sn = -(doublereal)(*sn);
+ *r = -(doublereal)(*r);
+ }
+ }
+ return 0;
+
+/* End of SLARTG */
+
+} /* slartg_ */
+
diff --git a/TESTING/MATGEN/slaruv.c b/TESTING/MATGEN/slaruv.c
new file mode 100644
index 0000000..b2fd4b7
--- /dev/null
+++ b/TESTING/MATGEN/slaruv.c
@@ -0,0 +1,152 @@
+#include "f2c.h"
+
+/* Subroutine */ int slaruv_(integer *iseed, integer *n, real *x)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLARUV returns a vector of n random real numbers from a uniform (0,1)
+
+ distribution (n <= 128).
+
+ This is an auxiliary routine called by SLARNV and CLARNV.
+
+ Arguments
+ =========
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ N (input) INTEGER
+ The number of random numbers to be generated. N <= 128.
+
+ X (output) REAL array, dimension (N)
+ The generated random numbers.
+
+ Further Details
+ ===============
+
+ This routine uses a multiplicative congruential method with modulus
+ 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+ 'Multiplicative congruential random number generators with modulus
+ 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+ b = 48', Math. Comp. 189, pp 331-344, 1990).
+
+ 48-bit integers are stored in 4 integer array elements with 12 bits
+ per element. Hence the routine is portable across machines with
+ integers of 32 bits or more.
+
+ =====================================================================
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* Initialized data */
+ static integer mm[512] /* was [128][4] */ = { 494,2637,255,2008,1253,
+ 3344,4084,1739,3143,3468,688,1657,1238,3166,1292,3422,1270,2016,
+ 154,2862,697,1706,491,931,1444,444,3577,3944,2184,1661,3482,657,
+ 3023,3618,1267,1828,164,3798,3087,2400,2870,3876,1905,1593,1797,
+ 1234,3460,328,2861,1950,617,2070,3331,769,1558,2412,2800,189,287,
+ 2045,1227,2838,209,2770,3654,3993,192,2253,3491,2889,2857,2094,
+ 1818,688,1407,634,3231,815,3524,1914,516,164,303,2144,3480,119,
+ 3357,837,2826,2332,2089,3780,1700,3712,150,2000,3375,1621,3090,
+ 3765,1149,3146,33,3082,2741,359,3316,1749,185,2784,2202,2199,1364,
+ 1244,2020,3160,2785,2772,1217,1822,1245,2252,3904,2774,997,2573,
+ 1148,545,322,789,1440,752,2859,123,1848,643,2405,2638,2344,46,
+ 3814,913,3649,339,3808,822,2832,3078,3633,2970,637,2249,2081,4019,
+ 1478,242,481,2075,4058,622,3376,812,234,641,4005,1122,3135,2640,
+ 2302,40,1832,2247,2034,2637,1287,1691,496,1597,2394,2584,1843,336,
+ 1472,2407,433,2096,1761,2810,566,442,41,1238,1086,603,840,3168,
+ 1499,1084,3438,2408,1589,2391,288,26,512,1456,171,1677,2657,2270,
+ 2587,2961,1970,1817,676,1410,3723,2803,3185,184,663,499,3784,1631,
+ 1925,3912,1398,1349,1441,2224,2411,1907,3192,2786,382,37,759,2948,
+ 1862,3802,2423,2051,2295,1332,1832,2405,3638,3661,327,3660,716,
+ 1842,3987,1368,1848,2366,2508,3754,1766,3572,2893,307,1297,3966,
+ 758,2598,3406,2922,1038,2934,2091,2451,1580,1958,2055,1507,1078,
+ 3273,17,854,2916,3971,2889,3831,2621,1541,893,736,3992,787,2125,
+ 2364,2460,257,1574,3912,1216,3248,3401,2124,2762,149,2245,166,466,
+ 4018,1399,190,2879,153,2320,18,712,2159,2318,2091,3443,1510,449,
+ 1956,2201,3137,3399,1321,2271,3667,2703,629,2365,2431,1113,3922,
+ 2554,184,2099,3228,4012,1921,3452,3901,572,3309,3171,817,3039,
+ 1696,1256,3715,2077,3019,1497,1101,717,51,981,1978,1813,3881,76,
+ 3846,3694,1682,124,1660,3997,479,1141,886,3514,1301,3604,1888,
+ 1836,1990,2058,692,1194,20,3285,2046,2107,3508,3525,3801,2549,
+ 1145,2253,305,3301,1065,3133,2913,3285,1241,1197,3729,2501,1673,
+ 541,2753,949,2361,1165,4081,2725,3305,3069,3617,3733,409,2157,
+ 1361,3973,1865,2525,1409,3445,3577,77,3761,2149,1449,3005,225,85,
+ 3673,3117,3089,1349,2057,413,65,1845,697,3085,3441,1573,3689,2941,
+ 929,533,2841,4077,721,2821,2249,2397,2817,245,1913,1997,3121,997,
+ 1833,2877,1633,981,2009,941,2449,197,2441,285,1473,2741,3129,909,
+ 2801,421,4073,2813,2337,1429,1177,1901,81,1669,2633,2269,129,1141,
+ 249,3917,2481,3941,2217,2749,3041,1877,345,2861,1809,3141,2825,
+ 157,2881,3637,1465,2829,2161,3365,361,2685,3745,2325,3609,3821,
+ 3537,517,3017,2141,1537 };
+ /* System generated locals */
+ integer i__1;
+ /* Local variables */
+ static integer i, i1, i2, i3, i4, it1, it2, it3, it4;
+
+
+#define MM(I) mm[(I)]
+#define WAS(I) was[(I)]
+#define ISEED(I) iseed[(I)-1]
+#define X(I) x[(I)-1]
+
+
+
+ i1 = ISEED(1);
+ i2 = ISEED(2);
+ i3 = ISEED(3);
+ i4 = ISEED(4);
+
+ i__1 = min(*n,128);
+ for (i = 1; i <= min(*n,128); ++i) {
+
+/* Multiply the seed by i-th power of the multiplier modulo 2**
+48 */
+
+ it4 = i4 * MM(i + 383);
+ it3 = it4 / 4096;
+ it4 -= it3 << 12;
+ it3 = it3 + i3 * MM(i + 383) + i4 * MM(i + 255);
+ it2 = it3 / 4096;
+ it3 -= it2 << 12;
+ it2 = it2 + i2 * MM(i + 383) + i3 * MM(i + 255) + i4 * MM(i + 127);
+ it1 = it2 / 4096;
+ it2 -= it1 << 12;
+ it1 = it1 + i1 * MM(i + 383) + i2 * MM(i + 255) + i3 * MM(i + 127) +
+ i4 * MM(i - 1);
+ it1 %= 4096;
+
+/* Convert 48-bit integer to a real number in the interval (0,1
+) */
+
+ X(i) = ((real) it1 + ((real) it2 + ((real) it3 + (real) it4 *
+ 2.44140625e-4f) * 2.44140625e-4f) * 2.44140625e-4f) *
+ 2.44140625e-4f;
+/* L10: */
+ }
+
+/* Return final value of seed */
+
+ ISEED(1) = it1;
+ ISEED(2) = it2;
+ ISEED(3) = it3;
+ ISEED(4) = it4;
+ return 0;
+
+/* End of SLARUV */
+
+} /* slaruv_ */
+
diff --git a/TESTING/MATGEN/slaset.c b/TESTING/MATGEN/slaset.c
new file mode 100644
index 0000000..9ea5eee
--- /dev/null
+++ b/TESTING/MATGEN/slaset.c
@@ -0,0 +1,136 @@
+#include "f2c.h"
+
+/* Subroutine */ int slaset_(char *uplo, integer *m, integer *n, real *alpha,
+ real *beta, real *a, integer *lda)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ SLASET initializes an m-by-n matrix A to BETA on the diagonal and
+ ALPHA on the offdiagonals.
+
+ Arguments
+ =========
+
+ UPLO (input) CHARACTER*1
+ Specifies the part of the matrix A to be set.
+ = 'U': Upper triangular part is set; the strictly lower
+
+ triangular part of A is not changed.
+ = 'L': Lower triangular part is set; the strictly upper
+
+ triangular part of A is not changed.
+ Otherwise: All of the matrix A is set.
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ ALPHA (input) REAL
+ The constant to which the offdiagonal elements are to be set.
+
+
+ BETA (input) REAL
+ The constant to which the diagonal elements are to be set.
+
+ A (input/output) REAL array, dimension (LDA,N)
+ On exit, the leading m-by-n submatrix of A is set as follows:
+
+
+ if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
+ if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
+ otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
+
+ and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= max(1,M).
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ /* Local variables */
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+
+
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ if (lsame_(uplo, "U")) {
+
+/* Set the strictly upper triangular or trapezoidal part of the
+
+ array to ALPHA. */
+
+ i__1 = *n;
+ for (j = 2; j <= *n; ++j) {
+/* Computing MIN */
+ i__3 = j - 1;
+ i__2 = min(i__3,*m);
+ for (i = 1; i <= min(j-1,*m); ++i) {
+ A(i,j) = *alpha;
+/* L10: */
+ }
+/* L20: */
+ }
+
+ } else if (lsame_(uplo, "L")) {
+
+/* Set the strictly lower triangular or trapezoidal part of the
+
+ array to ALPHA. */
+
+ i__1 = min(*m,*n);
+ for (j = 1; j <= min(*m,*n); ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= *m; ++i) {
+ A(i,j) = *alpha;
+/* L30: */
+ }
+/* L40: */
+ }
+
+ } else {
+
+/* Set the leading m-by-n submatrix to ALPHA. */
+
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ A(i,j) = *alpha;
+/* L50: */
+ }
+/* L60: */
+ }
+ }
+
+/* Set the first min(M,N) diagonal elements to BETA. */
+
+ i__1 = min(*m,*n);
+ for (i = 1; i <= min(*m,*n); ++i) {
+ A(i,i) = *beta;
+/* L70: */
+ }
+
+ return 0;
+
+/* End of SLASET */
+
+} /* slaset_ */
+
diff --git a/TESTING/MATGEN/slatb4.c b/TESTING/MATGEN/slatb4.c
new file mode 100644
index 0000000..33387a5
--- /dev/null
+++ b/TESTING/MATGEN/slatb4.c
@@ -0,0 +1,465 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__2 = 2;
+
+/* Subroutine */ int slatb4_(char *path, integer *imat, integer *m, integer *
+ n, char *type, integer *kl, integer *ku, real *anorm, integer *mode,
+ real *cndnum, char *dist)
+{
+ /* Initialized data */
+
+ static logical first = TRUE_;
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Builtin functions */
+ double sqrt(doublereal);
+
+ /* Local variables */
+ static real badc1, badc2, large, small;
+ static char c2[2];
+ extern /* Subroutine */ int slabad_(real *, real *);
+ extern doublereal slamch_(char *);
+ extern logical lsamen_(integer *, char *, char *);
+ static integer mat;
+ static real eps;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLATB4 sets parameters for the matrix generator based on the type of
+
+ matrix to be generated.
+
+ Arguments
+ =========
+
+ PATH (input) CHARACTER*3
+ The LAPACK path name.
+
+ IMAT (input) INTEGER
+ An integer key describing which matrix to generate for this
+ path.
+
+ M (input) INTEGER
+ The number of rows in the matrix to be generated.
+
+ N (input) INTEGER
+ The number of columns in the matrix to be generated.
+
+ TYPE (output) CHARACTER*1
+ The type of the matrix to be generated:
+ = 'S': symmetric matrix
+ = 'P': symmetric positive (semi)definite matrix
+ = 'N': nonsymmetric matrix
+
+ KL (output) INTEGER
+ The lower band width of the matrix to be generated.
+
+ KU (output) INTEGER
+ The upper band width of the matrix to be generated.
+
+ ANORM (output) REAL
+ The desired norm of the matrix to be generated. The diagonal
+
+ matrix of singular values or eigenvalues is scaled by this
+ value.
+
+ MODE (output) INTEGER
+ A key indicating how to choose the vector of eigenvalues.
+
+ CNDNUM (output) REAL
+ The desired condition number.
+
+ DIST (output) CHARACTER*1
+ The type of distribution to be used by the random number
+ generator.
+
+ =====================================================================
+
+
+
+ Set some constants for use in the subroutine. */
+
+ if (first) {
+ first = FALSE_;
+ eps = slamch_("Precision");
+ badc2 = .1f / eps;
+ badc1 = sqrt(badc2);
+ small = slamch_("Safe minimum");
+ large = 1.f / small;
+
+/* If it looks like we're on a Cray, take the square root of
+ SMALL and LARGE to avoid overflow and underflow problems. */
+
+ slabad_(&small, &large);
+ small = small / eps * .25f;
+ large = 1.f / small;
+ }
+
+ strncpy(c2, path + 1, 2);
+
+/* Set some parameters we don't plan to change. */
+
+ *(unsigned char *)dist = 'S';
+ *mode = 3;
+
+ if (lsamen_(&c__2, c2, "QR") || lsamen_(&c__2, c2, "LQ")
+ || lsamen_(&c__2, c2, "QL") || lsamen_(&c__2, c2, "RQ")) {
+
+/* xQR, xLQ, xQL, xRQ: Set parameters to generate a general
+ M x N matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GE")) {
+
+/* xGE: Set parameters to generate a general M x N matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 10) {
+ *anorm = small;
+ } else if (*imat == 11) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GB")) {
+
+/* xGB: Set parameters to generate a general banded matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2 * .1f;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GT")) {
+
+/* xGT: Set parameters to generate a general tridiagonal matri
+x.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PO") || lsamen_(&c__2, c2, "PP") || lsamen_(&c__2, c2, "SY") || lsamen_(&c__2, c2,
+ "SP")) {
+
+/* xPO, xPP, xSY, xSP: Set parameters to generate a
+ symmetric matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = *(unsigned char *)c2;
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 6) {
+ *cndnum = badc1;
+ } else if (*imat == 7) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 8) {
+ *anorm = small;
+ } else if (*imat == 9) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PB")) {
+
+/* xPB: Set parameters to generate a symmetric band matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'P';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PT")) {
+
+/* xPT: Set parameters to generate a symmetric positive defini
+te
+ tridiagonal matrix. */
+
+ *(unsigned char *)type = 'P';
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TR") || lsamen_(&c__2, c2, "TP")) {
+
+/* xTR, xTP: Set parameters to generate a triangular matrix
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ mat = abs(*imat);
+ if (mat == 1 || mat == 7) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat < 0) {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (mat == 3 || mat == 9) {
+ *cndnum = badc1;
+ } else if (mat == 4) {
+ *cndnum = badc2;
+ } else if (mat == 10) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (mat == 5) {
+ *anorm = small;
+ } else if (mat == 6) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TB")) {
+
+/* xTB: Set parameters to generate a triangular band matrix.
+
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 2 || *imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 3 || *imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.f;
+ }
+
+ if (*imat == 4) {
+ *anorm = small;
+ } else if (*imat == 5) {
+ *anorm = large;
+ } else {
+ *anorm = 1.f;
+ }
+ }
+ if (*n <= 1) {
+ *cndnum = 1.f;
+ }
+
+ return 0;
+
+/* End of SLATB4 */
+
+} /* slatb4_ */
+
diff --git a/TESTING/MATGEN/slatm1.c b/TESTING/MATGEN/slatm1.c
new file mode 100644
index 0000000..0a648b5
--- /dev/null
+++ b/TESTING/MATGEN/slatm1.c
@@ -0,0 +1,267 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Subroutine */ int slatm1_(integer *mode, real *cond, integer *irsign,
+ integer *idist, integer *iseed, real *d, integer *n, integer *info)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ doublereal d__1, d__2;
+
+ /* Builtin functions */
+ double pow_dd(doublereal *, doublereal *), pow_ri(real *, integer *), log(
+ doublereal), exp(doublereal);
+
+ /* Local variables */
+ static real temp;
+ static integer i;
+ static real alpha;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ extern doublereal slaran_(integer *);
+ extern /* Subroutine */ int slarnv_(integer *, integer *, integer *, real
+ *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLATM1 computes the entries of D(1..N) as specified by
+ MODE, COND and IRSIGN. IDIST and ISEED determine the generation
+ of random numbers. SLATM1 is called by SLATMR to generate
+ random test matrices for LAPACK programs.
+
+ Arguments
+ =========
+
+ MODE - INTEGER
+ On entry describes how D is to be computed:
+ MODE = 0 means do not change D.
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ Not modified.
+
+ COND - REAL
+ On entry, used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ IRSIGN - INTEGER
+ On entry, if MODE neither -6, 0 nor 6, determines sign of
+ entries of D
+ 0 => leave entries of D unchanged
+ 1 => multiply each entry of D by 1 or -1 with probability .5
+
+
+ IDIST - CHARACTER*1
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => UNIFORM( 0, 1 )
+ 2 => UNIFORM( -1, 1 )
+ 3 => NORMAL( 0, 1 )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. The random number generator uses a
+ linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to SLATM1
+ to continue the same random number sequence.
+ Changed on exit.
+
+ D - REAL array, dimension ( MIN( M , N ) )
+ Array to be computed according to MODE, COND and IRSIGN.
+ May be changed on exit if MODE is nonzero.
+
+ N - INTEGER
+ Number of entries of D. Not modified.
+
+ INFO - INTEGER
+ 0 => normal termination
+ -1 => if MODE not in range -6 to 6
+ -2 => if MODE neither -6, 0 nor 6, and
+ IRSIGN neither 0 nor 1
+ -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+ -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
+
+ -7 => if N negative
+
+ =====================================================================
+
+
+
+ Decode and Test the input parameters. Initialize flags & seed.
+
+ Parameter adjustments */
+ --d;
+ --iseed;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+/* Set INFO if an error */
+
+ if (*mode < -6 || *mode > 6) {
+ *info = -1;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && (*irsign != 0 && *
+ irsign != 1)) {
+ *info = -2;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && *cond < 1.f) {
+ *info = -3;
+ } else if ((*mode == 6 || *mode == -6) && (*idist < 1 || *idist > 3)) {
+ *info = -4;
+ } else if (*n < 0) {
+ *info = -7;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("SLATM1", &i__1);
+ return 0;
+ }
+
+/* Compute D according to COND and MODE */
+
+ if (*mode != 0) {
+ switch (abs(*mode)) {
+ case 1: goto L10;
+ case 2: goto L30;
+ case 3: goto L50;
+ case 4: goto L70;
+ case 5: goto L90;
+ case 6: goto L110;
+ }
+
+/* One large D value: */
+
+L10:
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = 1.f / *cond;
+/* L20: */
+ }
+ d[1] = 1.f;
+ goto L120;
+
+/* One small D value: */
+
+L30:
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = 1.f;
+/* L40: */
+ }
+ d[*n] = 1.f / *cond;
+ goto L120;
+
+/* Exponentially distributed D values: */
+
+L50:
+ d[1] = 1.f;
+ if (*n > 1) {
+ d__1 = (doublereal) (*cond);
+ d__2 = (doublereal) (-1.f / (real) (*n - 1));
+ alpha = pow_dd(&d__1, &d__2);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+ i__2 = i - 1;
+ d[i] = pow_ri(&alpha, &i__2);
+/* L60: */
+ }
+ }
+ goto L120;
+
+/* Arithmetically distributed D values: */
+
+L70:
+ d[1] = 1.f;
+ if (*n > 1) {
+ temp = 1.f / *cond;
+ alpha = (1.f - temp) / (real) (*n - 1);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+ d[i] = (real) (*n - i) * alpha + temp;
+/* L80: */
+ }
+ }
+ goto L120;
+
+/* Randomly distributed D values on ( 1/COND , 1): */
+
+L90:
+ alpha = log(1.f / *cond);
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = exp(alpha * slaran_(&iseed[1]));
+/* L100: */
+ }
+ goto L120;
+
+/* Randomly distributed D values from IDIST */
+
+L110:
+ slarnv_(idist, &iseed[1], n, &d[1]);
+
+L120:
+
+/* If MODE neither -6 nor 0 nor 6, and IRSIGN = 1, assign
+ random signs to D */
+
+ if (*mode != -6 && *mode != 0 && *mode != 6 && *irsign == 1) {
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ temp = slaran_(&iseed[1]);
+ if (temp > .5f) {
+ d[i] = -(doublereal)d[i];
+ }
+/* L130: */
+ }
+ }
+
+/* Reverse if MODE < 0 */
+
+ if (*mode < 0) {
+ i__1 = *n / 2;
+ for (i = 1; i <= i__1; ++i) {
+ temp = d[i];
+ d[i] = d[*n + 1 - i];
+ d[*n + 1 - i] = temp;
+/* L140: */
+ }
+ }
+
+ }
+
+ return 0;
+
+/* End of SLATM1 */
+
+} /* slatm1_ */
+
diff --git a/TESTING/MATGEN/slatm2.c b/TESTING/MATGEN/slatm2.c
new file mode 100644
index 0000000..e81bb47
--- /dev/null
+++ b/TESTING/MATGEN/slatm2.c
@@ -0,0 +1,241 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal slatm2_(integer *m, integer *n, integer *i, integer *j, integer *
+ kl, integer *ku, integer *idist, integer *iseed, real *d, integer *
+ igrade, real *dl, real *dr, integer *ipvtng, integer *iwork, real *
+ sparse)
+{
+ /* System generated locals */
+ real ret_val;
+
+ /* Local variables */
+ static integer isub, jsub;
+ static real temp;
+ extern doublereal slaran_(integer *), slarnd_(integer *, integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ SLATM2 returns the (I,J) entry of a random matrix of dimension
+ (M, N) described by the other paramters. It is called by the
+ SLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by SLATMR which has already checked the parameters.
+
+ Use of SLATM2 differs from SLATM3 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With SLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With SLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, SLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. SLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+
+ The matrix whose (I,J) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If I is outside (1..M) or J is outside (1..N), return zero
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of entry to be returned. Not modified.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => UNIFORM( 0, 1 )
+ 2 => UNIFORM( -1, 1 )
+ 3 => NORMAL( 0, 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - REAL array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - REAL array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - REAL array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) in position K was originally in
+ position IWORK( K ).
+ This differs from IWORK for SLATM3. Not modified.
+
+ SPARSE - REAL between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ ret_val = 0.f;
+ return ret_val;
+ }
+
+/* Check for banding */
+
+ if (*j > *i + *ku || *j < *i - *kl) {
+ ret_val = 0.f;
+ return ret_val;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.f) {
+ if (slaran_(&iseed[1]) < *sparse) {
+ ret_val = 0.f;
+ return ret_val;
+ }
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ isub = *i;
+ jsub = *j;
+ } else if (*ipvtng == 1) {
+ isub = iwork[*i];
+ jsub = *j;
+ } else if (*ipvtng == 2) {
+ isub = *i;
+ jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ isub = iwork[*i];
+ jsub = iwork[*j];
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (isub == jsub) {
+ temp = d[isub];
+ } else {
+ temp = slarnd_(idist, &iseed[1]);
+ }
+ if (*igrade == 1) {
+ temp *= dl[isub];
+ } else if (*igrade == 2) {
+ temp *= dr[jsub];
+ } else if (*igrade == 3) {
+ temp = temp * dl[isub] * dr[jsub];
+ } else if (*igrade == 4 && isub != jsub) {
+ temp = temp * dl[isub] / dl[jsub];
+ } else if (*igrade == 5) {
+ temp = temp * dl[isub] * dl[jsub];
+ }
+ ret_val = temp;
+ return ret_val;
+
+/* End of SLATM2 */
+
+} /* slatm2_ */
+
diff --git a/TESTING/MATGEN/slatm3.c b/TESTING/MATGEN/slatm3.c
new file mode 100644
index 0000000..be6f4ec
--- /dev/null
+++ b/TESTING/MATGEN/slatm3.c
@@ -0,0 +1,252 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+doublereal slatm3_(integer *m, integer *n, integer *i, integer *j, integer *
+ isub, integer *jsub, integer *kl, integer *ku, integer *idist,
+ integer *iseed, real *d, integer *igrade, real *dl, real *dr, integer
+ *ipvtng, integer *iwork, real *sparse)
+{
+ /* System generated locals */
+ real ret_val;
+
+ /* Local variables */
+ static real temp;
+ extern doublereal slaran_(integer *), slarnd_(integer *, integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ SLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+ dimension (M, N) described by the other paramters. (ISUB,JSUB)
+ is the final position of the (I,J) entry after pivoting
+ according to IPVTNG and IWORK. SLATM3 is called by the
+ SLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by SLATMR which has already checked the parameters.
+
+ Use of SLATM3 differs from SLATM2 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With SLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With SLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, SLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. SLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+ in different orders for different pivot orders).
+
+ The matrix whose (ISUB,JSUB) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of unpivoted entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of unpivoted entry to be returned. Not modified.
+
+ ISUB - INTEGER
+ Row of pivoted entry to be returned. Changed on exit.
+
+ JSUB - INTEGER
+ Column of pivoted entry to be returned. Changed on exit.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => UNIFORM( 0, 1 )
+ 2 => UNIFORM( -1, 1 )
+ 3 => NORMAL( 0, 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - REAL array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - REAL array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - REAL array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) originally in position K is in
+ position IWORK( K ) after pivoting.
+ This differs from IWORK for SLATM2. Not modified.
+
+ SPARSE - REAL between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ *isub = *i;
+ *jsub = *j;
+ ret_val = 0.f;
+ return ret_val;
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ *isub = *i;
+ *jsub = *j;
+ } else if (*ipvtng == 1) {
+ *isub = iwork[*i];
+ *jsub = *j;
+ } else if (*ipvtng == 2) {
+ *isub = *i;
+ *jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ *isub = iwork[*i];
+ *jsub = iwork[*j];
+ }
+
+/* Check for banding */
+
+ if (*jsub > *isub + *ku || *jsub < *isub - *kl) {
+ ret_val = 0.f;
+ return ret_val;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.f) {
+ if (slaran_(&iseed[1]) < *sparse) {
+ ret_val = 0.f;
+ return ret_val;
+ }
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (*i == *j) {
+ temp = d[*i];
+ } else {
+ temp = slarnd_(idist, &iseed[1]);
+ }
+ if (*igrade == 1) {
+ temp *= dl[*i];
+ } else if (*igrade == 2) {
+ temp *= dr[*j];
+ } else if (*igrade == 3) {
+ temp = temp * dl[*i] * dr[*j];
+ } else if (*igrade == 4 && *i != *j) {
+ temp = temp * dl[*i] / dl[*j];
+ } else if (*igrade == 5) {
+ temp = temp * dl[*i] * dl[*j];
+ }
+ ret_val = temp;
+ return ret_val;
+
+/* End of SLATM3 */
+
+} /* slatm3_ */
+
diff --git a/TESTING/MATGEN/slatme.c b/TESTING/MATGEN/slatme.c
new file mode 100644
index 0000000..929c5e0
--- /dev/null
+++ b/TESTING/MATGEN/slatme.c
@@ -0,0 +1,676 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__1 = 1;
+static real c_b23 = 0.f;
+static integer c__0 = 0;
+static real c_b39 = 1.f;
+
+/* Subroutine */ int slatme_(integer *n, char *dist, integer *iseed, real *d,
+ integer *mode, real *cond, real *dmax__, char *ei, char *rsign, char *
+ upper, char *sim, real *ds, integer *modes, real *conds, integer *kl,
+ integer *ku, real *anorm, real *a, integer *lda, real *work, integer *
+ info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ real r__1, r__2, r__3;
+
+ /* Local variables */
+ static logical bads;
+ extern /* Subroutine */ int sger_(integer *, integer *, real *, real *,
+ integer *, real *, integer *, real *, integer *);
+ static integer isim;
+ static real temp;
+ static logical badei;
+ static integer i, j;
+ static real alpha;
+ extern logical lsame_(char *, char *);
+ static integer iinfo;
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *);
+ static real tempa[1];
+ static integer icols;
+ static logical useei;
+ static integer idist;
+ extern /* Subroutine */ int sgemv_(char *, integer *, integer *, real *,
+ real *, integer *, real *, integer *, real *, real *, integer *), scopy_(integer *, real *, integer *, real *, integer *);
+ static integer irows;
+ extern /* Subroutine */ int slatm1_(integer *, real *, integer *, integer
+ *, integer *, real *, integer *, integer *);
+ static integer ic, jc, ir, jr;
+ extern doublereal slange_(char *, integer *, integer *, real *, integer *,
+ real *);
+ extern /* Subroutine */ int slarge_(integer *, real *, integer *, integer
+ *, real *, integer *), slarfg_(integer *, real *, real *, integer
+ *, real *), xerbla_(char *, integer *);
+ extern doublereal slaran_(integer *);
+ static integer irsign;
+ extern /* Subroutine */ int slaset_(char *, integer *, integer *, real *,
+ real *, real *, integer *);
+ static integer iupper;
+ extern /* Subroutine */ int slarnv_(integer *, integer *, integer *, real
+ *);
+ static real xnorms;
+ static integer jcr;
+ static real tau;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLATME generates random non-symmetric square matrices with
+ specified eigenvalues for testing LAPACK programs.
+
+ SLATME operates by applying the following sequence of
+ operations:
+
+ 1. Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and RSIGN
+ as described below.
+
+ 2. If complex conjugate pairs are desired (MODE=0 and EI(1)='R',
+ or MODE=5), certain pairs of adjacent elements of D are
+ interpreted as the real and complex parts of a complex
+ conjugate pair; A thus becomes block diagonal, with 1x1
+ and 2x2 blocks.
+
+ 3. If UPPER='T', the upper triangle of A is set to random values
+ out of distribution DIST.
+
+ 4. If SIM='T', A is multiplied on the left by a random matrix
+ X, whose singular values are specified by DS, MODES, and
+ CONDS, and on the right by X inverse.
+
+ 5. If KL < N-1, the lower bandwidth is reduced to KL using
+ Householder transformations. If KU < N-1, the upper
+ bandwidth is reduced to KU.
+
+ 6. If ANORM is not negative, the matrix is scaled to have
+ maximum-element-norm ANORM.
+
+ (Note: since the matrix cannot be reduced beyond Hessenberg form,
+
+ no packing options are available.)
+
+ Arguments
+ =========
+
+ N - INTEGER
+ The number of columns (or rows) of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values, and for the
+ upper triangle (see UPPER).
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to SLATME
+ to continue the same random number sequence.
+ Changed on exit.
+
+ D - REAL array, dimension ( N )
+ This array is used to specify the eigenvalues of A. If
+ MODE=0, then D is assumed to contain the eigenvalues (but
+ see the description of EI), otherwise they will be
+ computed according to MODE, COND, DMAX, and RSIGN and
+ placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the eigenvalues are to
+ be specified:
+ MODE = 0 means use D (with EI) as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed. Each odd-even pair
+ of elements will be either used as two real
+ eigenvalues or as the real and imaginary part
+ of a complex conjugate pair of eigenvalues;
+ the choice of which is done is random, with
+ 50-50 probability, for each pair.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is between 1 and 4, D has entries ranging
+ from 1 to 1/COND, if between -1 and -4, D has entries
+ ranging from 1/COND to 1,
+ Not modified.
+
+ COND - REAL
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - REAL
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))). Note that DMAX need not be
+ positive: if DMAX is negative (or zero), D will be
+ scaled by a negative number (or zero).
+ Not modified.
+
+ EI - CHARACTER*1 array, dimension ( N )
+ If MODE is 0, and EI(1) is not ' ' (space character),
+ this array specifies which elements of D (on input) are
+ real eigenvalues and which are the real and imaginary parts
+
+ of a complex conjugate pair of eigenvalues. The elements
+ of EI may then only have the values 'R' and 'I'. If
+ EI(j)='R' and EI(j+1)='I', then the j-th eigenvalue is
+ CMPLX( D(j) , D(j+1) ), and the (j+1)-th is the complex
+ conjugate thereof. If EI(j)=EI(j+1)='R', then the j-th
+ eigenvalue is D(j) (i.e., real). EI(1) may not be 'I',
+ nor may two adjacent elements of EI both have the value 'I'.
+
+ If MODE is not 0, then EI is ignored. If MODE is 0 and
+ EI(1)=' ', then the eigenvalues will all be real.
+ Not modified.
+
+ RSIGN - CHARACTER*1
+ If MODE is not 0, 6, or -6, and RSIGN='T', then the
+ elements of D, as computed according to MODE and COND, will
+
+ be multiplied by a random sign (+1 or -1). If RSIGN='F',
+ they will not be. RSIGN may only have the values 'T' or
+ 'F'.
+ Not modified.
+
+ UPPER - CHARACTER*1
+ If UPPER='T', then the elements of A above the diagonal
+ (and above the 2x2 diagonal blocks, if A has complex
+ eigenvalues) will be set to random numbers out of DIST.
+ If UPPER='F', they will not. UPPER may only have the
+ values 'T' or 'F'.
+ Not modified.
+
+ SIM - CHARACTER*1
+ If SIM='T', then A will be operated on by a "similarity
+ transform", i.e., multiplied on the left by a matrix X and
+ on the right by X inverse. X = U S V, where U and V are
+ random unitary matrices and S is a (diagonal) matrix of
+ singular values specified by DS, MODES, and CONDS. If
+ SIM='F', then A will not be transformed.
+ Not modified.
+
+ DS - REAL array, dimension ( N )
+ This array is used to specify the singular values of X,
+ in the same way that D specifies the eigenvalues of A.
+ If MODE=0, the DS contains the singular values, which
+ may not be zero.
+ Modified if MODE is nonzero.
+
+ MODES - INTEGER
+ CONDS - REAL
+ Same as MODE and COND, but for specifying the diagonal
+ of S. MODES=-6 and +6 are not allowed (since they would
+ result in randomly ill-conditioned eigenvalues.)
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. KL=1
+ specifies upper Hessenberg form. If KL is at least N-1,
+ then A will have full lower bandwidth. KL must be at
+ least 1.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. KU=1
+ specifies lower Hessenberg form. If KU is at least N-1,
+ then A will have full upper bandwidth; if KU and KL
+ are both at least N-1, then A will be dense. Only one of
+ KU and KL may be less than N-1. KU must be at least 1.
+ Not modified.
+
+ ANORM - REAL
+ If ANORM is not negative, then A will be scaled by a non-
+ negative real number to make the maximum-element-norm of A
+ to be ANORM.
+ Not modified.
+
+ A - REAL array, dimension ( LDA, N )
+ On exit A is the desired test matrix.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. LDA must be at least N.
+ Not modified.
+
+ WORK - REAL array, dimension ( 3*N )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => N negative
+ -2 => DIST illegal string
+ -5 => MODE not in range -6 to 6
+ -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -8 => EI(1) is not ' ' or 'R', EI(j) is not 'R' or 'I', or
+
+ two adjacent elements of EI are 'I'.
+ -9 => RSIGN is not 'T' or 'F'
+ -10 => UPPER is not 'T' or 'F'
+ -11 => SIM is not 'T' or 'F'
+ -12 => MODES=0 and DS has a zero singular value.
+ -13 => MODES is not in the range -5 to 5.
+ -14 => MODES is nonzero and CONDS is less than 1.
+ -15 => KL is less than 1.
+ -16 => KU is less than 1, or KL and KU are both less than
+ N-1.
+ -19 => LDA is less than N.
+ 1 => Error return from SLATM1 (computing D)
+ 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+ 3 => Error return from SLATM1 (computing DS)
+ 4 => Error return from SLARGE
+ 5 => Zero singular value from SLATM1.
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --ei;
+ --ds;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Check EI */
+
+ useei = TRUE_;
+ badei = FALSE_;
+ if (lsame_(ei + 1, " ") || *mode != 0) {
+ useei = FALSE_;
+ } else {
+ if (lsame_(ei + 1, "R")) {
+ i__1 = *n;
+ for (j = 2; j <= i__1; ++j) {
+ if (lsame_(ei + j, "I")) {
+ if (lsame_(ei + (j - 1), "I")) {
+ badei = TRUE_;
+ }
+ } else {
+ if (! lsame_(ei + j, "R")) {
+ badei = TRUE_;
+ }
+ }
+/* L10: */
+ }
+ } else {
+ badei = TRUE_;
+ }
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode UPPER */
+
+ if (lsame_(upper, "T")) {
+ iupper = 1;
+ } else if (lsame_(upper, "F")) {
+ iupper = 0;
+ } else {
+ iupper = -1;
+ }
+
+/* Decode SIM */
+
+ if (lsame_(sim, "T")) {
+ isim = 1;
+ } else if (lsame_(sim, "F")) {
+ isim = 0;
+ } else {
+ isim = -1;
+ }
+
+/* Check DS, if MODES=0 and ISIM=1 */
+
+ bads = FALSE_;
+ if (*modes == 0 && isim == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ if (ds[j] == 0.f) {
+ bads = TRUE_;
+ }
+/* L20: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*n < 0) {
+ *info = -1;
+ } else if (idist == -1) {
+ *info = -2;
+ } else if (abs(*mode) > 6) {
+ *info = -5;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.f) {
+ *info = -6;
+ } else if (badei) {
+ *info = -8;
+ } else if (irsign == -1) {
+ *info = -9;
+ } else if (iupper == -1) {
+ *info = -10;
+ } else if (isim == -1) {
+ *info = -11;
+ } else if (bads) {
+ *info = -12;
+ } else if (isim == 1 && abs(*modes) > 5) {
+ *info = -13;
+ } else if (isim == 1 && *modes != 0 && *conds < 1.f) {
+ *info = -14;
+ } else if (*kl < 1) {
+ *info = -15;
+ } else if (*ku < 1 || *ku < *n - 1 && *kl < *n - 1) {
+ *info = -16;
+ } else if (*lda < max(1,*n)) {
+ *info = -19;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("SLATME", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L30: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up diagonal of A
+
+ Compute D according to COND and MODE */
+
+ slatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = dabs(d[1]);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ r__2 = temp, r__3 = (r__1 = d[i], dabs(r__1));
+ temp = dmax(r__2,r__3);
+/* L40: */
+ }
+
+ if (temp > 0.f) {
+ alpha = *dmax__ / temp;
+ } else if (*dmax__ != 0.f) {
+ *info = 2;
+ return 0;
+ } else {
+ alpha = 0.f;
+ }
+
+ sscal_(n, &alpha, &d[1], &c__1);
+
+ }
+
+ slaset_("Full", n, n, &c_b23, &c_b23, &a[a_offset], lda);
+ i__1 = *lda + 1;
+ scopy_(n, &d[1], &c__1, &a[a_offset], &i__1);
+
+/* Set up complex conjugate pairs */
+
+ if (*mode == 0) {
+ if (useei) {
+ i__1 = *n;
+ for (j = 2; j <= i__1; ++j) {
+ if (lsame_(ei + j, "I")) {
+ a[j - 1 + j * a_dim1] = a[j + j * a_dim1];
+ a[j + (j - 1) * a_dim1] = -(doublereal)a[j + j * a_dim1];
+ a[j + j * a_dim1] = a[j - 1 + (j - 1) * a_dim1];
+ }
+/* L50: */
+ }
+ }
+
+ } else if (abs(*mode) == 5) {
+
+ i__1 = *n;
+ for (j = 2; j <= i__1; j += 2) {
+ if (slaran_(&iseed[1]) > .5f) {
+ a[j - 1 + j * a_dim1] = a[j + j * a_dim1];
+ a[j + (j - 1) * a_dim1] = -(doublereal)a[j + j * a_dim1];
+ a[j + j * a_dim1] = a[j - 1 + (j - 1) * a_dim1];
+ }
+/* L60: */
+ }
+ }
+
+/* 3) If UPPER='T', set upper triangle of A to random numbers.
+ (but don't modify the corners of 2x2 blocks.) */
+
+ if (iupper != 0) {
+ i__1 = *n;
+ for (jc = 2; jc <= i__1; ++jc) {
+ if (a[jc - 1 + jc * a_dim1] != 0.f) {
+ jr = jc - 2;
+ } else {
+ jr = jc - 1;
+ }
+ slarnv_(&idist, &iseed[1], &jr, &a[jc * a_dim1 + 1]);
+/* L70: */
+ }
+ }
+
+/* 4) If SIM='T', apply similarity transformation.
+
+ -1
+ Transform is X A X , where X = U S V, thus
+
+ it is U S V A V' (1/S) U' */
+
+ if (isim != 0) {
+
+/* Compute S (singular values of the eigenvector matrix)
+ according to CONDS and MODES */
+
+ slatm1_(modes, conds, &c__0, &c__0, &iseed[1], &ds[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+
+/* Multiply by V and V' */
+
+ slarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+
+/* Multiply by S and (1/S) */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ sscal_(n, &ds[j], &a[j + a_dim1], lda);
+ if (ds[j] != 0.f) {
+ r__1 = 1.f / ds[j];
+ sscal_(n, &r__1, &a[j * a_dim1 + 1], &c__1);
+ } else {
+ *info = 5;
+ return 0;
+ }
+/* L80: */
+ }
+
+/* Multiply by U and U' */
+
+ slarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 5) Reduce the bandwidth. */
+
+ if (*kl < *n - 1) {
+
+/* Reduce bandwidth -- kill column */
+
+ i__1 = *n - 1;
+ for (jcr = *kl + 1; jcr <= i__1; ++jcr) {
+ ic = jcr - *kl;
+ irows = *n + 1 - jcr;
+ icols = *n + *kl - jcr;
+
+ scopy_(&irows, &a[jcr + ic * a_dim1], &c__1, &work[1], &c__1);
+ xnorms = work[1];
+ slarfg_(&irows, &xnorms, &work[2], &c__1, &tau);
+ work[1] = 1.f;
+
+ sgemv_("T", &irows, &icols, &c_b39, &a[jcr + (ic + 1) * a_dim1],
+ lda, &work[1], &c__1, &c_b23, &work[irows + 1], &c__1)
+ ;
+ r__1 = -(doublereal)tau;
+ sger_(&irows, &icols, &r__1, &work[1], &c__1, &work[irows + 1], &
+ c__1, &a[jcr + (ic + 1) * a_dim1], lda);
+
+ sgemv_("N", n, &irows, &c_b39, &a[jcr * a_dim1 + 1], lda, &work[1]
+ , &c__1, &c_b23, &work[irows + 1], &c__1);
+ r__1 = -(doublereal)tau;
+ sger_(n, &irows, &r__1, &work[irows + 1], &c__1, &work[1], &c__1,
+ &a[jcr * a_dim1 + 1], lda);
+
+ a[jcr + ic * a_dim1] = xnorms;
+ i__2 = irows - 1;
+ slaset_("Full", &i__2, &c__1, &c_b23, &c_b23, &a[jcr + 1 + ic *
+ a_dim1], lda);
+/* L90: */
+ }
+ } else if (*ku < *n - 1) {
+
+/* Reduce upper bandwidth -- kill a row at a time. */
+
+ i__1 = *n - 1;
+ for (jcr = *ku + 1; jcr <= i__1; ++jcr) {
+ ir = jcr - *ku;
+ irows = *n + *ku - jcr;
+ icols = *n + 1 - jcr;
+
+ scopy_(&icols, &a[ir + jcr * a_dim1], lda, &work[1], &c__1);
+ xnorms = work[1];
+ slarfg_(&icols, &xnorms, &work[2], &c__1, &tau);
+ work[1] = 1.f;
+
+ sgemv_("N", &irows, &icols, &c_b39, &a[ir + 1 + jcr * a_dim1],
+ lda, &work[1], &c__1, &c_b23, &work[icols + 1], &c__1)
+ ;
+ r__1 = -(doublereal)tau;
+ sger_(&irows, &icols, &r__1, &work[icols + 1], &c__1, &work[1], &
+ c__1, &a[ir + 1 + jcr * a_dim1], lda);
+
+ sgemv_("C", &icols, n, &c_b39, &a[jcr + a_dim1], lda, &work[1], &
+ c__1, &c_b23, &work[icols + 1], &c__1);
+ r__1 = -(doublereal)tau;
+ sger_(&icols, n, &r__1, &work[1], &c__1, &work[icols + 1], &c__1,
+ &a[jcr + a_dim1], lda);
+
+ a[ir + jcr * a_dim1] = xnorms;
+ i__2 = icols - 1;
+ slaset_("Full", &c__1, &i__2, &c_b23, &c_b23, &a[ir + (jcr + 1) *
+ a_dim1], lda);
+/* L100: */
+ }
+ }
+
+/* Scale the matrix to have norm ANORM */
+
+ if (*anorm >= 0.f) {
+ temp = slange_("M", n, n, &a[a_offset], lda, tempa);
+ if (temp > 0.f) {
+ alpha = *anorm / temp;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ sscal_(n, &alpha, &a[j * a_dim1 + 1], &c__1);
+/* L110: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of SLATME */
+
+} /* slatme_ */
+
diff --git a/TESTING/MATGEN/slatmr.c b/TESTING/MATGEN/slatmr.c
new file mode 100644
index 0000000..31c39fe
--- /dev/null
+++ b/TESTING/MATGEN/slatmr.c
@@ -0,0 +1,1289 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__0 = 0;
+static integer c__1 = 1;
+
+/* Subroutine */ int slatmr_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, real *d, integer *mode, real *cond, real *dmax__,
+ char *rsign, char *grade, real *dl, integer *model, real *condl, real
+ *dr, integer *moder, real *condr, char *pivtng, integer *ipivot,
+ integer *kl, integer *ku, real *sparse, real *anorm, char *pack, real
+ *a, integer *lda, integer *iwork, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ real r__1, r__2, r__3;
+
+ /* Local variables */
+ static integer isub, jsub;
+ static real temp;
+ static integer isym, i, j, k;
+ static real alpha;
+ static integer ipack;
+ extern logical lsame_(char *, char *);
+ static real tempa[1];
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *);
+ static integer iisub, idist, jjsub, mnmin;
+ static logical dzero;
+ static integer mnsub;
+ static real onorm;
+ static integer mxsub, npvts;
+ extern /* Subroutine */ int slatm1_(integer *, real *, integer *, integer
+ *, integer *, real *, integer *, integer *);
+ extern doublereal slatm2_(integer *, integer *, integer *, integer *,
+ integer *, integer *, integer *, integer *, real *, integer *,
+ real *, real *, integer *, integer *, real *), slatm3_(integer *,
+ integer *, integer *, integer *, integer *, integer *, integer *,
+ integer *, integer *, integer *, real *, integer *, real *, real *
+ , integer *, integer *, real *);
+ static integer igrade;
+ extern doublereal slangb_(char *, integer *, integer *, integer *, real *,
+ integer *, real *), slange_(char *, integer *, integer *,
+ real *, integer *, real *);
+ static logical fulbnd;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical badpvt;
+ extern doublereal slansb_(char *, char *, integer *, integer *, real *,
+ integer *, real *);
+ static integer irsign;
+ extern doublereal slansp_(char *, char *, integer *, real *, real *);
+ static integer ipvtng;
+ extern doublereal slansy_(char *, char *, integer *, real *, integer *,
+ real *);
+ static integer kll, kuu;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ SLATMR generates random matrices of various types for testing
+ LAPACK programs.
+
+ SLATMR operates by applying the following sequence of
+ operations:
+
+ Generate a matrix A with random entries of distribution DIST
+ which is symmetric if SYM='S', and nonsymmetric
+ if SYM='N'.
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX and RSIGN
+ as described below.
+
+ Grade the matrix, if desired, from the left and/or right
+ as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+ MODER and CONDR also determine the grading as described
+ below.
+
+ Permute, if desired, the rows and/or columns as specified by
+ PIVTNG and IPIVOT.
+
+ Set random entries to zero, if desired, to get a random sparse
+ matrix as specified by SPARSE.
+
+ Make A a band matrix, if desired, by zeroing out the matrix
+ outside a band of lower bandwidth KL and upper bandwidth KU.
+
+
+ Scale A, if desired, to have maximum entry ANORM.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if symmetric)
+ zero out lower half (if symmetric)
+ store the upper half columnwise (if symmetric or
+ square upper triangular)
+ store the lower half columnwise (if symmetric or
+ square lower triangular)
+ same as upper half rowwise if symmetric
+ store the lower triangle in banded format (if symmetric)
+ store the upper triangle in banded format (if symmetric)
+ store the entire matrix in banded format
+
+ Note: If two calls to SLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+
+ If two calls to SLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be and
+ is not maintained with less than full bandwidth.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of A. Not modified.
+
+ N - INTEGER
+ Number of columns of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate a random matrix .
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension (4)
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to SLATMR
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='S' or 'H', generated matrix is symmetric.
+ If SYM='N', generated matrix is nonsymmetric.
+ Not modified.
+
+ D - REAL array, dimension (min(M,N))
+ On entry this array specifies the diagonal entries
+ of the diagonal of A. D may either be specified
+ on entry, or set according to MODE and COND as described
+ below. May be changed on exit if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry describes how D is to be used:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ Not modified.
+
+ COND - REAL
+ On entry, used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - REAL
+ If MODE neither -6, 0 nor 6, the diagonal is scaled by
+ DMAX / max(abs(D(i))), so that maximum absolute entry
+ of diagonal is abs(DMAX). If DMAX is negative (or zero),
+ diagonal will be scaled by a negative number (or zero).
+
+ RSIGN - CHARACTER*1
+ If MODE neither -6, 0 nor 6, specifies sign of diagonal
+ as follows:
+ 'T' => diagonal entries are multiplied by 1 or -1
+ with probability .5
+ 'F' => diagonal unchanged
+ Not modified.
+
+ GRADE - CHARACTER*1
+ Specifies grading of matrix as follows:
+ 'N' => no grading
+ 'L' => matrix premultiplied by diag( DL )
+ (only if matrix nonsymmetric)
+ 'R' => matrix postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'B' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'S' or 'H' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ ('S' for symmetric, or 'H' for Hermitian)
+ 'E' => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ ( 'E' for eigenvalue invariance)
+ (only if matrix nonsymmetric)
+ Note: if GRADE='E', then M must equal N.
+ Not modified.
+
+ DL - REAL array, dimension (M)
+ If MODEL=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODEL is not zero, then DL will be set according
+ to MODEL and CONDL, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DL).
+
+ If GRADE='E', then DL cannot have zero entries.
+ Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+
+ MODEL - INTEGER
+ This specifies how the diagonal array DL is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDL - REAL
+ When MODEL is not zero, this specifies the condition number
+
+ of the computed DL. Not modified.
+
+ DR - REAL array, dimension (N)
+ If MODER=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODER is not zero, then DR will be set according
+ to MODER and CONDR, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DR).
+
+ Not referenced if GRADE = 'N', 'L', 'H', 'S' or 'E'.
+ Changed on exit.
+
+ MODER - INTEGER
+ This specifies how the diagonal array DR is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDR - REAL
+ When MODER is not zero, this specifies the condition number
+
+ of the computed DR. Not modified.
+
+ PIVTNG - CHARACTER*1
+ On entry specifies pivoting permutations as follows:
+ 'N' or ' ' => none.
+ 'L' => left or row pivoting (matrix must be nonsymmetric).
+ 'R' => right or column pivoting (matrix must be
+ nonsymmetric).
+ 'B' or 'F' => both or full pivoting, i.e., on both sides.
+ In this case, M must equal N
+
+ If two calls to SLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be
+ maintained with less than full bandwidth.
+
+ IPIVOT - INTEGER array, dimension (N or M)
+ This array specifies the permutation used. After the
+ basic matrix is generated, the rows, columns, or both
+ are permuted. If, say, row pivoting is selected, SLATMR
+ starts with the *last* row and interchanges the M-th and
+ IPIVOT(M)-th rows, then moves to the next-to-last row,
+ interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+ and so on. In terms of "2-cycles", the permutation is
+ (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+ where the rightmost cycle is applied first. This is the
+ *inverse* of the effect of pivoting in LINPACK. The idea
+ is that factoring (with pivoting) an identity matrix
+ which has been inverse-pivoted in this way should
+ result in a pivot vector identical to IPIVOT.
+ Not referenced if PIVTNG = 'N'. Not modified.
+
+ SPARSE - REAL
+ On entry specifies the sparsity of the matrix if a sparse
+ matrix is to be generated. SPARSE should lie between
+ 0 and 1. To generate a sparse matrix, for each matrix entry
+
+ a uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ KL - INTEGER
+ On entry specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL at least M-1 implies the matrix is not
+ banded. Must equal KU if matrix is symmetric.
+ Not modified.
+
+ KU - INTEGER
+ On entry specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU at least N-1 implies the matrix is not
+ banded. Must equal KL if matrix is symmetric.
+ Not modified.
+
+ ANORM - REAL
+ On entry specifies maximum entry of output matrix
+ (output matrix will by multiplied by a constant so that
+ its largest absolute entry equal ANORM)
+ if ANORM is nonnegative. If ANORM is negative no scaling
+ is done. Not modified.
+
+ PACK - CHARACTER*1
+ On entry specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries (if symmetric)
+ 'L' => zero out all superdiagonal entries (if symmetric)
+ 'C' => store the upper triangle columnwise
+ (only if matrix symmetric or square upper triangular)
+
+ 'R' => store the lower triangle columnwise
+ (only if matrix symmetric or square lower triangular)
+
+ (same as upper half rowwise if symmetric)
+ 'B' => store the lower triangle in band storage scheme
+ (only if matrix symmetric)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if matrix symmetric)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, SB or TB - use 'B' or 'Q'
+ PP, SP or TP - use 'C' or 'R'
+
+ If two calls to SLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - REAL array, dimension (LDA,N)
+ On exit A is the desired test matrix. Only those
+ entries of A which are significant on output
+ will be referenced (even if A is in packed or band
+ storage format). The 'unoccupied corners' of A in
+ band format will be zeroed out.
+
+ LDA - INTEGER
+ on entry LDA specifies the first dimension of A as
+ declared in the calling program.
+ If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+
+ If PACK='C' or 'R', LDA must be at least 1.
+ If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+ If PACK='Z', LDA must be at least KUU+KLL+1, where
+ KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+ Not modified.
+
+ IWORK - INTEGER array, dimension ( N or M)
+ Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+
+
+ INFO - INTEGER
+ Error parameter on exit:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S' or 'H'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+ -11 => GRADE illegal string, or GRADE='E' and
+ M not equal to N, or GRADE='L', 'R', 'B' or 'E' and
+ SYM = 'S' or 'H'
+ -12 => GRADE = 'E' and DL contains zero
+ -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+
+ 'S' or 'E'
+ -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+
+ and MODEL neither -6, 0 nor 6
+ -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+ -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+ MODER neither -6, 0 nor 6
+ -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+ M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+ or 'H'
+ -19 => IPIVOT contains out of range number and
+ PIVTNG not equal to 'N'
+ -20 => KL negative
+ -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+
+ -22 => SPARSE not in range 0. to 1.
+ -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+ and SYM='N', or PACK='C' and SYM='N' and either KL
+ not equal to 0 or N not equal to M, or PACK='R' and
+ SYM='N', and either KU not equal to 0 or N not equal
+
+ to M
+ -26 => LDA too small
+ 1 => Error return from SLATM1 (computing D)
+ 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+ 3 => Error return from SLATM1 (computing DL)
+ 4 => Error return from SLATM1 (computing DR)
+ 5 => ANORM is positive, but matrix constructed prior to
+ attempting to scale it to have norm ANORM, is zero
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --dl;
+ --dr;
+ --ipivot;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iwork;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "S")) {
+ isym = 0;
+ } else if (lsame_(sym, "N")) {
+ isym = 1;
+ } else if (lsame_(sym, "H")) {
+ isym = 0;
+ } else {
+ isym = -1;
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode PIVTNG */
+
+ if (lsame_(pivtng, "N")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, " ")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, "L")) {
+ ipvtng = 1;
+ npvts = *m;
+ } else if (lsame_(pivtng, "R")) {
+ ipvtng = 2;
+ npvts = *n;
+ } else if (lsame_(pivtng, "B")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else if (lsame_(pivtng, "F")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else {
+ ipvtng = -1;
+ }
+
+/* Decode GRADE */
+
+ if (lsame_(grade, "N")) {
+ igrade = 0;
+ } else if (lsame_(grade, "L")) {
+ igrade = 1;
+ } else if (lsame_(grade, "R")) {
+ igrade = 2;
+ } else if (lsame_(grade, "B")) {
+ igrade = 3;
+ } else if (lsame_(grade, "E")) {
+ igrade = 4;
+ } else if (lsame_(grade, "H") || lsame_(grade, "S")) {
+ igrade = 5;
+ } else {
+ igrade = -1;
+ }
+
+/* Decode PACK */
+
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ kll = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ kuu = min(i__1,i__2);
+
+/* If inv(DL) is used, check to see if DL has a zero entry. */
+
+ dzero = FALSE_;
+ if (igrade == 4 && *model == 0) {
+ i__1 = *m;
+ for (i = 1; i <= i__1; ++i) {
+ if (dl[i] == 0.f) {
+ dzero = TRUE_;
+ }
+/* L10: */
+ }
+ }
+
+/* Check values in IPIVOT */
+
+ badpvt = FALSE_;
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (j = 1; j <= i__1; ++j) {
+ if (ipivot[j] <= 0 || ipivot[j] > npvts) {
+ badpvt = TRUE_;
+ }
+/* L20: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && isym == 0) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (*mode < -6 || *mode > 6) {
+ *info = -7;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && *cond < 1.f) {
+ *info = -8;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && irsign == -1) {
+ *info = -10;
+ } else if (igrade == -1 || igrade == 4 && *m != *n || igrade >= 1 &&
+ igrade <= 4 && isym == 0) {
+ *info = -11;
+ } else if (igrade == 4 && dzero) {
+ *info = -12;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5) && (
+ *model < -6 || *model > 6)) {
+ *info = -13;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5) && (
+ *model != -6 && *model != 0 && *model != 6) && *condl < 1.f) {
+ *info = -14;
+ } else if ((igrade == 2 || igrade == 3) && (*moder < -6 || *moder > 6)) {
+ *info = -16;
+ } else if ((igrade == 2 || igrade == 3) && (*moder != -6 && *moder != 0 &&
+ *moder != 6) && *condr < 1.f) {
+ *info = -17;
+ } else if (ipvtng == -1 || ipvtng == 3 && *m != *n || (ipvtng == 1 ||
+ ipvtng == 2) && isym == 0) {
+ *info = -18;
+ } else if (ipvtng != 0 && badpvt) {
+ *info = -19;
+ } else if (*kl < 0) {
+ *info = -20;
+ } else if (*ku < 0 || isym == 0 && *kl != *ku) {
+ *info = -21;
+ } else if (*sparse < 0.f || *sparse > 1.f) {
+ *info = -22;
+ } else if (ipack == -1 || (ipack == 1 || ipack == 2 || ipack == 5 ||
+ ipack == 6) && isym == 1 || ipack == 3 && isym == 1 && (*kl != 0
+ || *m != *n) || ipack == 4 && isym == 1 && (*ku != 0 || *m != *n))
+ {
+ *info = -24;
+ } else if ((ipack == 0 || ipack == 1 || ipack == 2) && *lda < max(1,*m) ||
+ (ipack == 3 || ipack == 4) && *lda < 1 || (ipack == 5 || ipack ==
+ 6) && *lda < kuu + 1 || ipack == 7 && *lda < kll + kuu + 1) {
+ *info = -26;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("SLATMR", &i__1);
+ return 0;
+ }
+
+/* Decide if we can pivot consistently */
+
+ fulbnd = FALSE_;
+ if (kuu == *n - 1 && kll == *m - 1) {
+ fulbnd = TRUE_;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L30: */
+ }
+
+ iseed[4] = (iseed[4] / 2 << 1) + 1;
+
+/* 2) Set up D, DL, and DR, if indicated.
+
+ Compute D according to COND and MODE */
+
+ slatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, info);
+ if (*info != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && *mode != -6 && *mode != 6) {
+
+/* Scale by DMAX */
+
+ temp = dabs(d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ r__2 = temp, r__3 = (r__1 = d[i], dabs(r__1));
+ temp = dmax(r__2,r__3);
+/* L40: */
+ }
+ if (temp == 0.f && *dmax__ != 0.f) {
+ *info = 2;
+ return 0;
+ }
+ if (temp != 0.f) {
+ alpha = *dmax__ / temp;
+ } else {
+ alpha = 1.f;
+ }
+ i__1 = mnmin;
+ for (i = 1; i <= i__1; ++i) {
+ d[i] = alpha * d[i];
+/* L50: */
+ }
+
+ }
+
+/* Compute DL if grading set */
+
+ if (igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5) {
+ slatm1_(model, condl, &c__0, &idist, &iseed[1], &dl[1], m, info);
+ if (*info != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* Compute DR if grading set */
+
+ if (igrade == 2 || igrade == 3) {
+ slatm1_(moder, condr, &c__0, &idist, &iseed[1], &dr[1], n, info);
+ if (*info != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 3) Generate IWORK if pivoting */
+
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ iwork[i] = i;
+/* L60: */
+ }
+ if (fulbnd) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L70: */
+ }
+ } else {
+ for (i = npvts; i >= 1; --i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L80: */
+ }
+ }
+ }
+
+/* 4) Generate matrices for each kind of PACKing
+ Always sweep matrix columnwise (if symmetric, upper
+ half only) so that matrix generated does not depend
+ on PACK */
+
+ if (fulbnd) {
+
+/* Use SLATM3 so matrices generated with differing PIVOTing onl
+y
+ differ only in the order of their rows and/or columns. */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[isub + jsub * a_dim1] = temp;
+ a[jsub + isub * a_dim1] = temp;
+/* L90: */
+ }
+/* L100: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[isub + jsub * a_dim1] = temp;
+/* L110: */
+ }
+/* L120: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mnsub + mxsub * a_dim1] = temp;
+ if (mnsub != mxsub) {
+ a[mxsub + mnsub * a_dim1] = 0.f;
+ }
+/* L130: */
+ }
+/* L140: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mxsub + mnsub * a_dim1] = temp;
+ if (mnsub != mxsub) {
+ a[mnsub + mxsub * a_dim1] = 0.f;
+ }
+/* L150: */
+ }
+/* L160: */
+ }
+
+ } else if (ipack == 3) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+
+/* Compute K = location of (ISUB,JSUB) ent
+ry in packed
+ array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ k = mxsub * (mxsub - 1) / 2 + mnsub;
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ a[iisub + jjsub * a_dim1] = temp;
+/* L170: */
+ }
+/* L180: */
+ }
+
+ } else if (ipack == 4) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+
+/* Compute K = location of (I,J) entry in
+packed array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mnsub == 1) {
+ k = mxsub;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - mnsub + 1) * (*n -
+ mnsub + 2) / 2 + mxsub - mnsub + 1;
+ }
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ a[iisub + jjsub * a_dim1] = temp;
+/* L190: */
+ }
+/* L200: */
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ a[j - i + 1 + (i + *n) * a_dim1] = 0.f;
+ } else {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mxsub - mnsub + 1 + mnsub * a_dim1] = temp;
+ }
+/* L210: */
+ }
+/* L220: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mnsub - mxsub + kuu + 1 + mxsub * a_dim1] = temp;
+/* L230: */
+ }
+/* L240: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ a[mnsub - mxsub + kuu + 1 + mxsub * a_dim1] = temp;
+ if (i < 1) {
+ a[j - i + 1 + kuu + (i + *n) * a_dim1] = 0.f;
+ }
+ if (i >= 1 && mnsub != mxsub) {
+ a[mxsub - mnsub + 1 + kuu + mnsub * a_dim1] =
+ temp;
+ }
+/* L250: */
+ }
+/* L260: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ temp = slatm3_(m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[isub - jsub + kuu + 1 + jsub * a_dim1] = temp;
+/* L270: */
+ }
+/* L280: */
+ }
+ }
+
+ }
+
+ } else {
+
+/* Use SLATM2 */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = slatm2_(m, n, &i, &j, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ a[j + i * a_dim1] = a[i + j * a_dim1];
+/* L290: */
+ }
+/* L300: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = slatm2_(m, n, &i, &j, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+/* L310: */
+ }
+/* L320: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = slatm2_(m, n, &i, &j, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ if (i != j) {
+ a[j + i * a_dim1] = 0.f;
+ }
+/* L330: */
+ }
+/* L340: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ a[j + i * a_dim1] = slatm2_(m, n, &i, &j, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ if (i != j) {
+ a[i + j * a_dim1] = 0.f;
+ }
+/* L350: */
+ }
+/* L360: */
+ }
+
+ } else if (ipack == 3) {
+
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ a[isub + jsub * a_dim1] = slatm2_(m, n, &i, &j, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[1],
+ &ipvtng, &iwork[1], sparse);
+/* L370: */
+ }
+/* L380: */
+ }
+
+ } else if (ipack == 4) {
+
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+
+/* Compute K = location of (I,J) en
+try in packed array */
+
+ if (i == 1) {
+ k = j;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - i + 1) * (*n - i +
+ 2) / 2 + j - i + 1;
+ }
+
+/* Convert K to (ISUB,JSUB) locatio
+n */
+
+ jsub = (k - 1) / *lda + 1;
+ isub = k - *lda * (jsub - 1);
+
+ a[isub + jsub * a_dim1] = slatm2_(m, n, &i, &j, kl,
+ ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+/* L390: */
+ }
+/* L400: */
+ }
+ } else {
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ a[isub + jsub * a_dim1] = slatm2_(m, n, &i, &j, kl,
+ ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+/* L410: */
+ }
+/* L420: */
+ }
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ a[j - i + 1 + (i + *n) * a_dim1] = 0.f;
+ } else {
+ a[j - i + 1 + i * a_dim1] = slatm2_(m, n, &i, &j, kl,
+ ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+ }
+/* L430: */
+ }
+/* L440: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ a[i - j + kuu + 1 + j * a_dim1] = slatm2_(m, n, &i, &j,
+ kl, ku, &idist, &iseed[1], &d[1], &igrade, &dl[1],
+ &dr[1], &ipvtng, &iwork[1], sparse);
+/* L450: */
+ }
+/* L460: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ a[i - j + kuu + 1 + j * a_dim1] = slatm2_(m, n, &i, &
+ j, kl, ku, &idist, &iseed[1], &d[1], &igrade,
+ &dl[1], &dr[1], &ipvtng, &iwork[1], sparse);
+ if (i < 1) {
+ a[j - i + 1 + kuu + (i + *n) * a_dim1] = 0.f;
+ }
+ if (i >= 1 && i != j) {
+ a[j - i + 1 + kuu + i * a_dim1] = a[i - j + kuu +
+ 1 + j * a_dim1];
+ }
+/* L470: */
+ }
+/* L480: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ a[i - j + kuu + 1 + j * a_dim1] = slatm2_(m, n, &i, &
+ j, kl, ku, &idist, &iseed[1], &d[1], &igrade,
+ &dl[1], &dr[1], &ipvtng, &iwork[1], sparse);
+/* L490: */
+ }
+/* L500: */
+ }
+ }
+
+ }
+
+ }
+
+/* 5) Scaling the norm */
+
+ if (ipack == 0) {
+ onorm = slange_("M", m, n, &a[a_offset], lda, tempa);
+ } else if (ipack == 1) {
+ onorm = slansy_("M", "U", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 2) {
+ onorm = slansy_("M", "L", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 3) {
+ onorm = slansp_("M", "U", n, &a[a_offset], tempa);
+ } else if (ipack == 4) {
+ onorm = slansp_("M", "L", n, &a[a_offset], tempa);
+ } else if (ipack == 5) {
+ onorm = slansb_("M", "L", n, &kll, &a[a_offset], lda, tempa);
+ } else if (ipack == 6) {
+ onorm = slansb_("M", "U", n, &kuu, &a[a_offset], lda, tempa);
+ } else if (ipack == 7) {
+ onorm = slangb_("M", n, &kll, &kuu, &a[a_offset], lda, tempa);
+ }
+
+ if (*anorm >= 0.f) {
+
+ if (*anorm > 0.f && onorm == 0.f) {
+
+/* Desired scaling impossible */
+
+ *info = 5;
+ return 0;
+
+ } else if (*anorm > 1.f && onorm < 1.f || *anorm < 1.f && onorm > 1.f)
+ {
+
+/* Scale carefully to avoid over / underflow */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ r__1 = 1.f / onorm;
+ sscal_(m, &r__1, &a[j * a_dim1 + 1], &c__1);
+ sscal_(m, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L510: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ r__1 = 1.f / onorm;
+ sscal_(&i__1, &r__1, &a[a_offset], &c__1);
+ i__1 = *n * (*n + 1) / 2;
+ sscal_(&i__1, anorm, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ r__1 = 1.f / onorm;
+ sscal_(&i__2, &r__1, &a[j * a_dim1 + 1], &c__1);
+ i__2 = kll + kuu + 1;
+ sscal_(&i__2, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L520: */
+ }
+
+ }
+
+ } else {
+
+/* Scale straightforwardly */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ r__1 = *anorm / onorm;
+ sscal_(m, &r__1, &a[j * a_dim1 + 1], &c__1);
+/* L530: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ r__1 = *anorm / onorm;
+ sscal_(&i__1, &r__1, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ r__1 = *anorm / onorm;
+ sscal_(&i__2, &r__1, &a[j * a_dim1 + 1], &c__1);
+/* L540: */
+ }
+ }
+
+ }
+
+ }
+
+/* End of SLATMR */
+
+ return 0;
+} /* slatmr_ */
+
diff --git a/TESTING/MATGEN/slatms.c b/TESTING/MATGEN/slatms.c
new file mode 100644
index 0000000..2bf2342
--- /dev/null
+++ b/TESTING/MATGEN/slatms.c
@@ -0,0 +1,1337 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__1 = 1;
+static real c_b22 = 0.f;
+static logical c_true = TRUE_;
+static logical c_false = FALSE_;
+
+/* Subroutine */ int slatms_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, real *d, integer *mode, real *cond, real *dmax__,
+ integer *kl, integer *ku, char *pack, real *a, integer *lda, real *
+ work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+ real r__1, r__2, r__3;
+ logical L__1;
+
+ /* Builtin functions */
+ double cos(doublereal), sin(doublereal);
+
+ /* Local variables */
+ static integer ilda, icol;
+ static real temp;
+ static integer irow, isym;
+ static real c;
+ static integer i, j, k;
+ static real s, alpha, angle;
+ static integer ipack, ioffg;
+ extern logical lsame_(char *, char *);
+ static integer iinfo;
+ extern /* Subroutine */ int sscal_(integer *, real *, real *, integer *);
+ static integer idist, mnmin, iskew;
+ static real extra, dummy;
+ extern /* Subroutine */ int scopy_(integer *, real *, integer *, real *,
+ integer *), slatm1_(integer *, real *, integer *, integer *,
+ integer *, real *, integer *, integer *);
+ static integer ic, jc, nc, il, iendch, ir, jr, ipackg, mr;
+ extern /* Subroutine */ int slagge_(integer *, integer *, integer *,
+ integer *, real *, real *, integer *, integer *, real *, integer *
+ );
+ static integer minlda;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ extern doublereal slarnd_(integer *, integer *);
+ static logical iltemp, givens;
+ static integer ioffst, irsign;
+ extern /* Subroutine */ int slartg_(real *, real *, real *, real *, real *
+ ), slaset_(char *, integer *, integer *, real *, real *, real *,
+ integer *), slagsy_(integer *, integer *, real *, real *,
+ integer *, integer *, real *, integer *), slarot_(logical *,
+ logical *, logical *, integer *, real *, real *, real *, integer *
+ , real *, real *);
+ static logical ilextr, topdwn;
+ static integer ir1, ir2, isympk, jch, llb, jkl, jku, uub;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ SLATMS generates random matrices with specified singular values
+ (or symmetric/hermitian with specified eigenvalues)
+ for testing LAPACK programs.
+
+ SLATMS operates by applying the following sequence of
+ operations:
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and SYM
+ as described below.
+
+ Generate a matrix with the appropriate band structure, by one
+ of two methods:
+
+ Method A:
+ Generate a dense M x N matrix by multiplying D on the left
+ and the right by random unitary matrices, then:
+
+ Reduce the bandwidth according to KL and KU, using
+ Householder transformations.
+
+ Method B:
+ Convert the bandwidth-0 (i.e., diagonal) matrix to a
+ bandwidth-1 matrix using Givens rotations, "chasing"
+ out-of-band elements back, much as in QR; then
+ convert the bandwidth-1 to a bandwidth-2 matrix, etc.
+ Note that for reasonably small bandwidths (relative to
+ M and N) this requires less storage, as a dense matrix
+ is not generated. Also, for symmetric matrices, only
+ one triangle is generated.
+
+ Method A is chosen if the bandwidth is a large fraction of the
+ order of the matrix, and LDA is at least M (so a dense
+ matrix can be stored.) Method B is chosen if the bandwidth
+
+ is small (< 1/2 N for symmetric, < .3 N+M for
+ non-symmetric), or LDA is less than M and not less than the
+
+ bandwidth.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if symmetric)
+ zero out lower half (if symmetric)
+ store the upper half columnwise (if symmetric or upper
+ triangular)
+ store the lower half columnwise (if symmetric or lower
+ triangular)
+ store the lower triangle in banded format (if symmetric
+ or lower triangular)
+ store the upper triangle in banded format (if symmetric
+ or upper triangular)
+ store the entire matrix in banded format
+ If Method B is chosen, and band format is specified, then the
+ matrix will be generated in the band format, so no repacking
+
+ will be necessary.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ The number of rows of A. Not modified.
+
+ N - INTEGER
+ The number of columns of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values.
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to SLATMS
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='S' or 'H', the generated matrix is symmetric, with
+ eigenvalues specified by D, COND, MODE, and DMAX; they
+ may be positive, negative, or zero.
+ If SYM='P', the generated matrix is symmetric, with
+ eigenvalues (= singular values) specified by D, COND,
+ MODE, and DMAX; they will not be negative.
+ If SYM='N', the generated matrix is nonsymmetric, with
+ singular values specified by D, COND, MODE, and DMAX;
+ they will not be negative.
+ Not modified.
+
+ D - REAL array, dimension ( MIN( M , N ) )
+ This array is used to specify the singular values or
+ eigenvalues of A (see SYM, above.) If MODE=0, then D is
+ assumed to contain the singular/eigenvalues, otherwise
+ they will be computed according to MODE, COND, and DMAX,
+ and placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the singular/eigenvalues are to
+
+ be specified:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
+ the elements of D will also be multiplied by a random
+ sign (i.e., +1 or -1.)
+ Not modified.
+
+ COND - REAL
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - REAL
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+
+ singular value (which is to say the norm) will be abs(DMAX).
+
+ Note that DMAX need not be positive: if DMAX is negative
+ (or zero), D will be scaled by a negative number (or zero).
+
+ Not modified.
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL being at least M-1 means that the matrix
+
+ has full lower bandwidth. KL must equal KU if the matrix
+ is symmetric.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU being at least N-1 means that the matrix
+
+ has full upper bandwidth. KL must equal KU if the matrix
+ is symmetric.
+ Not modified.
+
+ PACK - CHARACTER*1
+ This specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries (if symmetric)
+ 'L' => zero out all superdiagonal entries (if symmetric)
+ 'C' => store the upper triangle columnwise
+ (only if the matrix is symmetric or upper triangular)
+
+ 'R' => store the lower triangle columnwise
+ (only if the matrix is symmetric or lower triangular)
+
+ 'B' => store the lower triangle in band storage scheme
+ (only if matrix symmetric or lower triangular)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if matrix symmetric or upper triangular)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, SB or TB - use 'B' or 'Q'
+ PP, SP or TP - use 'C' or 'R'
+
+ If two calls to SLATMS differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - REAL array, dimension ( LDA, N )
+ On exit A is the desired test matrix. A is first generated
+
+ in full (unpacked) form, and then packed, if so specified
+ by PACK. Thus, the first M elements of the first N
+ columns will always be modified. If PACK specifies a
+ packed or banded storage scheme, all LDA elements of the
+ first N columns will be modified; the elements of the
+ array which do not correspond to elements of the generated
+ matrix are set to zero.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+ LDA must be at least M. If PACK='B' or 'Q', then LDA must
+ be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+ If PACK='Z', LDA must be large enough to hold the packed
+ array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+ Not modified.
+
+ WORK - REAL array, dimension ( 3*MAX( N , M ) )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => KL negative
+ -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+
+ -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+
+ or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+ or PACK='R' or 'B' and SYM='N' and KU is not zero;
+ or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+
+ N.
+ -14 => LDA is less than M, or PACK='Z' and LDA is less than
+
+ MIN(KU,N-1) + MIN(KL,M-1) + 1.
+ 1 => Error return from SLATM1
+ 2 => Cannot scale to DMAX (max. sing. value is 0)
+ 3 => Error return from SLAGGE or SLAGSY
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "N")) {
+ isym = 1;
+ irsign = 0;
+ } else if (lsame_(sym, "P")) {
+ isym = 2;
+ irsign = 0;
+ } else if (lsame_(sym, "S")) {
+ isym = 2;
+ irsign = 1;
+ } else if (lsame_(sym, "H")) {
+ isym = 2;
+ irsign = 1;
+ } else {
+ isym = -1;
+ }
+
+/* Decode PACK */
+
+ isympk = 0;
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ isympk = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ isympk = 1;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ isympk = 2;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ isympk = 3;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ isympk = 3;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ isympk = 2;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ llb = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ uub = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *m, i__2 = *n + llb;
+ mr = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *n, i__2 = *m + uub;
+ nc = min(i__1,i__2);
+
+ if (ipack == 5 || ipack == 6) {
+ minlda = uub + 1;
+ } else if (ipack == 7) {
+ minlda = llb + uub + 1;
+ } else {
+ minlda = *m;
+ }
+
+/* Use Givens rotation method if bandwidth small enough,
+ or if LDA is too small to store the matrix unpacked. */
+
+ givens = FALSE_;
+ if (isym == 1) {
+/* Computing MAX */
+ i__1 = 1, i__2 = mr + nc;
+ if ((real) (llb + uub) < (real) max(i__1,i__2) * .3f) {
+ givens = TRUE_;
+ }
+ } else {
+ if (llb << 1 < *m) {
+ givens = TRUE_;
+ }
+ }
+ if (*lda < *m && *lda >= minlda) {
+ givens = TRUE_;
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && isym != 1) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (abs(*mode) > 6) {
+ *info = -7;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.f) {
+ *info = -8;
+ } else if (*kl < 0) {
+ *info = -10;
+ } else if (*ku < 0 || isym != 1 && *kl != *ku) {
+ *info = -11;
+ } else if (ipack == -1 || isympk == 1 && isym == 1 || isympk == 2 && isym
+ == 1 && *kl > 0 || isympk == 3 && isym == 1 && *ku > 0 || isympk
+ != 0 && *m != *n) {
+ *info = -12;
+ } else if (*lda < max(1,minlda)) {
+ *info = -14;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("SLATMS", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L10: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up D if indicated.
+
+ Compute D according to COND and MODE */
+
+ slatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+
+/* Choose Top-Down if D is (apparently) increasing,
+ Bottom-Up if D is (apparently) decreasing. */
+
+ if (dabs(d[1]) <= (r__1 = d[mnmin], dabs(r__1))) {
+ topdwn = TRUE_;
+ } else {
+ topdwn = FALSE_;
+ }
+
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = dabs(d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ r__2 = temp, r__3 = (r__1 = d[i], dabs(r__1));
+ temp = dmax(r__2,r__3);
+/* L20: */
+ }
+
+ if (temp > 0.f) {
+ alpha = *dmax__ / temp;
+ } else {
+ *info = 2;
+ return 0;
+ }
+
+ sscal_(&mnmin, &alpha, &d[1], &c__1);
+
+ }
+
+/* 3) Generate Banded Matrix using Givens rotations.
+ Also the special case of UUB=LLB=0
+
+ Compute Addressing constants to cover all
+ storage formats. Whether GE, SY, GB, or SB,
+ upper or lower triangle or both,
+ the (i,j)-th element is in
+ A( i - ISKEW*j + IOFFST, j ) */
+
+ if (ipack > 4) {
+ ilda = *lda - 1;
+ iskew = 1;
+ if (ipack > 5) {
+ ioffst = uub + 1;
+ } else {
+ ioffst = 1;
+ }
+ } else {
+ ilda = *lda;
+ iskew = 0;
+ ioffst = 0;
+ }
+
+/* IPACKG is the format that the matrix is generated in. If this is
+ different from IPACK, then the matrix must be repacked at the
+ end. It also signals how to compute the norm, for scaling. */
+
+ ipackg = 0;
+ slaset_("Full", lda, n, &c_b22, &c_b22, &a[a_offset], lda);
+
+/* Diagonal Matrix -- We are done, unless it
+ is to be stored SP/PP/TP (PACK='R' or 'C') */
+
+ if (llb == 0 && uub == 0) {
+ i__1 = ilda + 1;
+ scopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffst + a_dim1], &i__1);
+ if (ipack <= 2 || ipack >= 5) {
+ ipackg = ipack;
+ }
+
+ } else if (givens) {
+
+/* Check whether to use Givens rotations,
+ Householder transformations, or nothing. */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ if (ipack > 4) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+
+ i__1 = ilda + 1;
+ scopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffst + a_dim1], &
+ i__1);
+
+ if (topdwn) {
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ Last row actually rotated is M
+ Last column actually rotated is MIN( M+
+JKU, N )
+
+ Computing MIN */
+ i__3 = *m + jku;
+ i__2 = min(i__3,*n) + jkl - 1;
+ for (jr = 1; jr <= i__2; ++jr) {
+ extra = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__3 = 1, i__4 = jr - jkl;
+ icol = max(i__3,i__4);
+ if (jr < *m) {
+/* Computing MIN */
+ i__3 = *n, i__4 = jr + jku;
+ il = min(i__3,i__4) + 1 - icol;
+ L__1 = jr > jkl;
+ slarot_(&c_true, &L__1, &c_false, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ir = jr;
+ ic = icol;
+ i__3 = -jkl - jku;
+ for (jch = jr - jkl; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ir < *m) {
+ slartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &c, &s,
+ &dummy);
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ temp = 0.f;
+ iltemp = jch > jku;
+ r__1 = -(doublereal)s;
+ slarot_(&c_false, &iltemp, &c_true, &il, &c, &
+ r__1, &a[irow - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &temp, &extra);
+ if (iltemp) {
+ slartg_(&a[irow + 1 - iskew * (ic + 1) +
+ ioffst + (ic + 1) * a_dim1], &temp, &
+ c, &s, &dummy);
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ extra = 0.f;
+ L__1 = jch > jku + jkl;
+ r__1 = -(doublereal)s;
+ slarot_(&c_true, &L__1, &c_true, &il, &c, &
+ r__1, &a[irow - iskew * icol + ioffst
+ + icol * a_dim1], &ilda, &extra, &
+ temp);
+ ic = icol;
+ ir = irow;
+ }
+/* L30: */
+ }
+/* L40: */
+ }
+/* L50: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ Computing MIN */
+ i__3 = *n + jkl;
+ i__2 = min(i__3,*m) + jku - 1;
+ for (jc = 1; jc <= i__2; ++jc) {
+ extra = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__3 = 1, i__4 = jc - jku;
+ irow = max(i__3,i__4);
+ if (jc < *n) {
+/* Computing MIN */
+ i__3 = *m, i__4 = jc + jkl;
+ il = min(i__3,i__4) + 1 - irow;
+ L__1 = jc > jku;
+ slarot_(&c_false, &L__1, &c_false, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ic = jc;
+ ir = irow;
+ i__3 = -jkl - jku;
+ for (jch = jc - jku; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ic < *n) {
+ slartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &c, &s,
+ &dummy);
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ temp = 0.f;
+ iltemp = jch > jkl;
+ r__1 = -(doublereal)s;
+ slarot_(&c_true, &iltemp, &c_true, &il, &c, &r__1,
+ &a[ir - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &temp, &extra);
+ if (iltemp) {
+ slartg_(&a[ir + 1 - iskew * (icol + 1) +
+ ioffst + (icol + 1) * a_dim1], &temp,
+ &c, &s, &dummy);
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ extra = 0.f;
+ L__1 = jch > jkl + jku;
+ r__1 = -(doublereal)s;
+ slarot_(&c_false, &L__1, &c_true, &il, &c, &
+ r__1, &a[irow - iskew * icol + ioffst
+ + icol * a_dim1], &ilda, &extra, &
+ temp);
+ ic = icol;
+ ir = irow;
+ }
+/* L60: */
+ }
+/* L70: */
+ }
+/* L80: */
+ }
+
+ } else {
+
+/* Bottom-Up -- Start at the bottom right. */
+
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ First row actually rotated is M
+ First column actually rotated is MIN( M
++JKU, N )
+
+ Computing MIN */
+ i__2 = *m, i__3 = *n + jkl;
+ iendch = min(i__2,i__3) - 1;
+/* Computing MIN */
+ i__2 = *m + jku;
+ i__3 = 1 - jkl;
+ for (jc = min(i__2,*n) - 1; jc >= i__3; --jc) {
+ extra = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - jku + 1;
+ irow = max(i__2,i__4);
+ if (jc > 0) {
+/* Computing MIN */
+ i__2 = *m, i__4 = jc + jkl + 1;
+ il = min(i__2,i__4) + 1 - irow;
+ L__1 = jc + jkl < *m;
+ slarot_(&c_false, &c_false, &L__1, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ic = jc;
+ i__2 = iendch;
+ i__4 = jkl + jku;
+ for (jch = jc + jkl; i__4 < 0 ? jch >= i__2 : jch <=
+ i__2; jch += i__4) {
+ ilextr = ic > 0;
+ if (ilextr) {
+ slartg_(&a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &extra, &c, &s, &dummy);
+ }
+ ic = max(1,ic);
+/* Computing MIN */
+ i__5 = *n - 1, i__6 = jch + jku;
+ icol = min(i__5,i__6);
+ iltemp = jch + jku < *n;
+ temp = 0.f;
+ i__5 = icol + 2 - ic;
+ slarot_(&c_true, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &extra, &temp);
+ if (iltemp) {
+ slartg_(&a[jch - iskew * icol + ioffst + icol
+ * a_dim1], &temp, &c, &s, &dummy);
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra = 0.f;
+ L__1 = jch + jkl + jku <= iendch;
+ slarot_(&c_false, &c_true, &L__1, &il, &c, &s,
+ &a[jch - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &temp, &extra);
+ ic = icol;
+ }
+/* L90: */
+ }
+/* L100: */
+ }
+/* L110: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ First row actually rotated is MIN( N+JK
+L, M )
+ First column actually rotated is N
+
+ Computing MIN */
+ i__3 = *n, i__4 = *m + jku;
+ iendch = min(i__3,i__4) - 1;
+/* Computing MIN */
+ i__3 = *n + jkl;
+ i__4 = 1 - jku;
+ for (jr = min(i__3,*m) - 1; jr >= i__4; --jr) {
+ extra = 0.f;
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ c = cos(angle);
+ s = sin(angle);
+/* Computing MAX */
+ i__3 = 1, i__2 = jr - jkl + 1;
+ icol = max(i__3,i__2);
+ if (jr > 0) {
+/* Computing MIN */
+ i__3 = *n, i__2 = jr + jku + 1;
+ il = min(i__3,i__2) + 1 - icol;
+ L__1 = jr + jku < *n;
+ slarot_(&c_true, &c_false, &L__1, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ir = jr;
+ i__3 = iendch;
+ i__2 = jkl + jku;
+ for (jch = jr + jku; i__2 < 0 ? jch >= i__3 : jch <=
+ i__3; jch += i__2) {
+ ilextr = ir > 0;
+ if (ilextr) {
+ slartg_(&a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &extra, &c, &s, &dummy);
+ }
+ ir = max(1,ir);
+/* Computing MIN */
+ i__5 = *m - 1, i__6 = jch + jkl;
+ irow = min(i__5,i__6);
+ iltemp = jch + jkl < *m;
+ temp = 0.f;
+ i__5 = irow + 2 - ir;
+ slarot_(&c_false, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &extra, &temp);
+ if (iltemp) {
+ slartg_(&a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &temp, &c, &s, &dummy);
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra = 0.f;
+ L__1 = jch + jkl + jku <= iendch;
+ slarot_(&c_true, &c_true, &L__1, &il, &c, &s,
+ &a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &temp, &extra);
+ ir = irow;
+ }
+/* L120: */
+ }
+/* L130: */
+ }
+/* L140: */
+ }
+ }
+
+ } else {
+
+/* Symmetric -- A = U D U' */
+
+ ipackg = ipack;
+ ioffg = ioffst;
+
+ if (topdwn) {
+
+/* Top-Down -- Generate Upper triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 6;
+ ioffg = uub + 1;
+ } else {
+ ipackg = 1;
+ }
+ i__1 = ilda + 1;
+ scopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffg + a_dim1], &
+ i__1);
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ i__4 = *n - 1;
+ for (jc = 1; jc <= i__4; ++jc) {
+/* Computing MAX */
+ i__2 = 1, i__3 = jc - k;
+ irow = max(i__2,i__3);
+/* Computing MIN */
+ i__2 = jc + 1, i__3 = k + 2;
+ il = min(i__2,i__3);
+ extra = 0.f;
+ temp = a[jc - iskew * (jc + 1) + ioffg + (jc + 1) *
+ a_dim1];
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ c = cos(angle);
+ s = sin(angle);
+ L__1 = jc > k;
+ slarot_(&c_false, &L__1, &c_true, &il, &c, &s, &a[
+ irow - iskew * jc + ioffg + jc * a_dim1], &
+ ilda, &extra, &temp);
+/* Computing MIN */
+ i__3 = k, i__5 = *n - jc;
+ i__2 = min(i__3,i__5) + 1;
+ slarot_(&c_true, &c_true, &c_false, &i__2, &c, &s, &a[
+ (1 - iskew) * jc + ioffg + jc * a_dim1], &
+ ilda, &temp, &dummy);
+
+/* Chase EXTRA back up the matrix
+*/
+
+ icol = jc;
+ i__2 = -k;
+ for (jch = jc - k; i__2 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__2) {
+ slartg_(&a[jch + 1 - iskew * (icol + 1) + ioffg +
+ (icol + 1) * a_dim1], &extra, &c, &s, &
+ dummy);
+ temp = a[jch - iskew * (jch + 1) + ioffg + (jch +
+ 1) * a_dim1];
+ i__3 = k + 2;
+ r__1 = -(doublereal)s;
+ slarot_(&c_true, &c_true, &c_true, &i__3, &c, &
+ r__1, &a[(1 - iskew) * jch + ioffg + jch *
+ a_dim1], &ilda, &temp, &extra);
+/* Computing MAX */
+ i__3 = 1, i__5 = jch - k;
+ irow = max(i__3,i__5);
+/* Computing MIN */
+ i__3 = jch + 1, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra = 0.f;
+ L__1 = jch > k;
+ r__1 = -(doublereal)s;
+ slarot_(&c_false, &L__1, &c_true, &il, &c, &r__1,
+ &a[irow - iskew * jch + ioffg + jch *
+ a_dim1], &ilda, &extra, &temp);
+ icol = jch;
+/* L150: */
+ }
+/* L160: */
+ }
+/* L170: */
+ }
+
+/* If we need lower triangle, copy from upper. No
+te that
+ the order of copying is chosen to work for 'q'
+ -> 'b' */
+
+ if (ipack != ipackg && ipack != 3) {
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ irow = ioffst - iskew * jc;
+/* Computing MIN */
+ i__2 = *n, i__3 = jc + uub;
+ i__4 = min(i__2,i__3);
+ for (jr = jc; jr <= i__4; ++jr) {
+ a[jr + irow + jc * a_dim1] = a[jc - iskew * jr +
+ ioffg + jr * a_dim1];
+/* L180: */
+ }
+/* L190: */
+ }
+ if (ipack == 5) {
+ i__1 = *n;
+ for (jc = *n - uub + 1; jc <= i__1; ++jc) {
+ i__4 = uub + 1;
+ for (jr = *n + 2 - jc; jr <= i__4; ++jr) {
+ a[jr + jc * a_dim1] = 0.f;
+/* L200: */
+ }
+/* L210: */
+ }
+ }
+ if (ipackg == 6) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ } else {
+
+/* Bottom-Up -- Generate Lower triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 5;
+ if (ipack == 6) {
+ ioffg = 1;
+ }
+ } else {
+ ipackg = 2;
+ }
+ i__1 = ilda + 1;
+ scopy_(&mnmin, &d[1], &c__1, &a[1 - iskew + ioffg + a_dim1], &
+ i__1);
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ for (jc = *n - 1; jc >= 1; --jc) {
+/* Computing MIN */
+ i__4 = *n + 1 - jc, i__2 = k + 2;
+ il = min(i__4,i__2);
+ extra = 0.f;
+ temp = a[(1 - iskew) * jc + 1 + ioffg + jc * a_dim1];
+ angle = slarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663f;
+ c = cos(angle);
+ s = -(doublereal)sin(angle);
+ L__1 = *n - jc > k;
+ slarot_(&c_false, &c_true, &L__1, &il, &c, &s, &a[(1
+ - iskew) * jc + ioffg + jc * a_dim1], &ilda, &
+ temp, &extra);
+/* Computing MAX */
+ i__4 = 1, i__2 = jc - k + 1;
+ icol = max(i__4,i__2);
+ i__4 = jc + 2 - icol;
+ slarot_(&c_true, &c_false, &c_true, &i__4, &c, &s, &a[
+ jc - iskew * icol + ioffg + icol * a_dim1], &
+ ilda, &dummy, &temp);
+
+/* Chase EXTRA back down the matrix
+ */
+
+ icol = jc;
+ i__4 = *n - 1;
+ i__2 = k;
+ for (jch = jc + k; i__2 < 0 ? jch >= i__4 : jch <=
+ i__4; jch += i__2) {
+ slartg_(&a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &extra, &c, &s, &dummy);
+ temp = a[(1 - iskew) * jch + 1 + ioffg + jch *
+ a_dim1];
+ i__3 = k + 2;
+ slarot_(&c_true, &c_true, &c_true, &i__3, &c, &s,
+ &a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &ilda, &extra, &temp);
+/* Computing MIN */
+ i__3 = *n + 1 - jch, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra = 0.f;
+ L__1 = *n - jch > k;
+ slarot_(&c_false, &c_true, &L__1, &il, &c, &s, &a[
+ (1 - iskew) * jch + ioffg + jch * a_dim1],
+ &ilda, &temp, &extra);
+ icol = jch;
+/* L220: */
+ }
+/* L230: */
+ }
+/* L240: */
+ }
+
+/* If we need upper triangle, copy from lower. No
+te that
+ the order of copying is chosen to work for 'b'
+ -> 'q' */
+
+ if (ipack != ipackg && ipack != 4) {
+ for (jc = *n; jc >= 1; --jc) {
+ irow = ioffst - iskew * jc;
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - uub;
+ i__1 = max(i__2,i__4);
+ for (jr = jc; jr >= i__1; --jr) {
+ a[jr + irow + jc * a_dim1] = a[jc - iskew * jr +
+ ioffg + jr * a_dim1];
+/* L250: */
+ }
+/* L260: */
+ }
+ if (ipack == 6) {
+ i__1 = uub;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ a[jr + jc * a_dim1] = 0.f;
+/* L270: */
+ }
+/* L280: */
+ }
+ }
+ if (ipackg == 5) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ }
+ }
+
+ } else {
+
+/* 4) Generate Banded Matrix by first
+ Rotating by random Unitary matrices,
+ then reducing the bandwidth using Householder
+ transformations.
+
+ Note: we should get here only if LDA .ge. N */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ slagge_(&mr, &nc, &llb, &uub, &d[1], &a[a_offset], lda, &iseed[1],
+ &work[1], &iinfo);
+ } else {
+
+/* Symmetric -- A = U D U' */
+
+ slagsy_(m, &llb, &d[1], &a[a_offset], lda, &iseed[1], &work[1], &
+ iinfo);
+
+ }
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* 5) Pack the matrix */
+
+ if (ipack != ipackg) {
+ if (ipack == 1) {
+
+/* 'U' -- Upper triangular, not packed */
+
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.f;
+/* L290: */
+ }
+/* L300: */
+ }
+
+ } else if (ipack == 2) {
+
+/* 'L' -- Lower triangular, not packed */
+
+ i__1 = *m;
+ for (j = 2; j <= i__1; ++j) {
+ i__2 = j - 1;
+ for (i = 1; i <= i__2; ++i) {
+ a[i + j * a_dim1] = 0.f;
+/* L310: */
+ }
+/* L320: */
+ }
+
+ } else if (ipack == 3) {
+
+/* 'C' -- Upper triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ a[irow + icol * a_dim1] = a[i + j * a_dim1];
+/* L330: */
+ }
+/* L340: */
+ }
+
+ } else if (ipack == 4) {
+
+/* 'R' -- Lower triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ a[irow + icol * a_dim1] = a[i + j * a_dim1];
+/* L350: */
+ }
+/* L360: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* 'B' -- The lower triangle is packed as a band matrix.
+
+ 'Q' -- The upper triangle is packed as a band matrix.
+
+ 'Z' -- The whole matrix is packed as a band matrix.
+*/
+
+ if (ipack == 5) {
+ uub = 0;
+ }
+ if (ipack == 6) {
+ llb = 0;
+ }
+
+ i__1 = uub;
+ for (j = 1; j <= i__1; ++j) {
+/* Computing MIN */
+ i__2 = j + llb;
+ for (i = min(i__2,*m); i >= 1; --i) {
+ a[i - j + uub + 1 + j * a_dim1] = a[i + j * a_dim1];
+/* L370: */
+ }
+/* L380: */
+ }
+
+ i__1 = *n;
+ for (j = uub + 2; j <= i__1; ++j) {
+/* Computing MIN */
+ i__4 = j + llb;
+ i__2 = min(i__4,*m);
+ for (i = j - uub; i <= i__2; ++i) {
+ a[i - j + uub + 1 + j * a_dim1] = a[i + j * a_dim1];
+/* L390: */
+ }
+/* L400: */
+ }
+ }
+
+/* If packed, zero out extraneous elements.
+
+ Symmetric/Triangular Packed --
+ zero out everything after A(IROW,ICOL) */
+
+ if (ipack == 3 || ipack == 4) {
+ i__1 = *m;
+ for (jc = icol; jc <= i__1; ++jc) {
+ i__2 = *lda;
+ for (jr = irow + 1; jr <= i__2; ++jr) {
+ a[jr + jc * a_dim1] = 0.f;
+/* L410: */
+ }
+ irow = 0;
+/* L420: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* Packed Band --
+ 1st row is now in A( UUB+2-j, j), zero above it
+ m-th row is now in A( M+UUB-j,j), zero below it
+ last non-zero diagonal is now in A( UUB+LLB+1,j ),
+
+ zero below it, too. */
+
+ ir1 = uub + llb + 2;
+ ir2 = uub + *m + 2;
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ a[jr + jc * a_dim1] = 0.f;
+/* L430: */
+ }
+/* Computing MAX
+ Computing MIN */
+ i__3 = ir1, i__5 = ir2 - jc;
+ i__2 = 1, i__4 = min(i__3,i__5);
+ i__6 = *lda;
+ for (jr = max(i__2,i__4); jr <= i__6; ++jr) {
+ a[jr + jc * a_dim1] = 0.f;
+/* L440: */
+ }
+/* L450: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of SLATMS */
+
+} /* slatms_ */
+
diff --git a/TESTING/MATGEN/zdotc.c b/TESTING/MATGEN/zdotc.c
new file mode 100644
index 0000000..63ba4fb
--- /dev/null
+++ b/TESTING/MATGEN/zdotc.c
@@ -0,0 +1,85 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Double Complex */ VOID zdotc_(doublecomplex * ret_val, integer *n,
+ doublecomplex *zx, integer *incx, doublecomplex *zy, integer *incy)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer i;
+ static doublecomplex ztemp;
+ static integer ix, iy;
+
+
+/* forms the dot product of a vector.
+ jack dongarra, 3/11/78.
+ modified 12/3/93, array(1) declarations changed to array(*)
+
+
+ Parameter adjustments */
+ --zy;
+ --zx;
+
+ /* Function Body */
+ ztemp.r = 0., ztemp.i = 0.;
+ ret_val->r = 0., ret_val->i = 0.;
+ if (*n <= 0) {
+ return ;
+ }
+ if (*incx == 1 && *incy == 1) {
+ goto L20;
+ }
+
+/* code for unequal increments or equal increments
+ not equal to 1 */
+
+ ix = 1;
+ iy = 1;
+ if (*incx < 0) {
+ ix = (-(*n) + 1) * *incx + 1;
+ }
+ if (*incy < 0) {
+ iy = (-(*n) + 1) * *incy + 1;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ d_cnjg(&z__3, &zx[ix]);
+ i__2 = iy;
+ z__2.r = z__3.r * zy[iy].r - z__3.i * zy[iy].i, z__2.i = z__3.r *
+ zy[iy].i + z__3.i * zy[iy].r;
+ z__1.r = ztemp.r + z__2.r, z__1.i = ztemp.i + z__2.i;
+ ztemp.r = z__1.r, ztemp.i = z__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L10: */
+ }
+ ret_val->r = ztemp.r, ret_val->i = ztemp.i;
+ return ;
+
+/* code for both increments equal to 1 */
+
+L20:
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ d_cnjg(&z__3, &zx[i]);
+ i__2 = i;
+ z__2.r = z__3.r * zy[i].r - z__3.i * zy[i].i, z__2.i = z__3.r *
+ zy[i].i + z__3.i * zy[i].r;
+ z__1.r = ztemp.r + z__2.r, z__1.i = ztemp.i + z__2.i;
+ ztemp.r = z__1.r, ztemp.i = z__1.i;
+/* L30: */
+ }
+ ret_val->r = ztemp.r, ret_val->i = ztemp.i;
+ return ;
+} /* zdotc_ */
+
diff --git a/TESTING/MATGEN/zlacgv.c b/TESTING/MATGEN/zlacgv.c
new file mode 100644
index 0000000..ba1df58
--- /dev/null
+++ b/TESTING/MATGEN/zlacgv.c
@@ -0,0 +1,76 @@
+#include "f2c.h"
+
+/* Subroutine */ int zlacgv_(integer *n, doublecomplex *x, integer *incx)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ ZLACGV conjugates a complex vector of length N.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The length of the vector X. N >= 0.
+
+ X (input/output) COMPLEX*16 array, dimension
+ (1+(N-1)*abs(INCX))
+ On entry, the vector of length N to be conjugated.
+ On exit, X is overwritten with conjg(X).
+
+ INCX (input) INTEGER
+ The spacing between successive elements of X.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2;
+ doublecomplex z__1;
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+ /* Local variables */
+ static integer ioff, i;
+
+
+#define X(I) x[(I)-1]
+
+
+ if (*incx == 1) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ d_cnjg(&z__1, &X(i));
+ X(i).r = z__1.r, X(i).i = z__1.i;
+/* L10: */
+ }
+ } else {
+ ioff = 1;
+ if (*incx < 0) {
+ ioff = 1 - (*n - 1) * *incx;
+ }
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = ioff;
+ d_cnjg(&z__1, &X(ioff));
+ X(ioff).r = z__1.r, X(ioff).i = z__1.i;
+ ioff += *incx;
+/* L20: */
+ }
+ }
+ return 0;
+
+/* End of ZLACGV */
+
+} /* zlacgv_ */
+
diff --git a/TESTING/MATGEN/zlagge.c b/TESTING/MATGEN/zlagge.c
new file mode 100644
index 0000000..0129749
--- /dev/null
+++ b/TESTING/MATGEN/zlagge.c
@@ -0,0 +1,465 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static doublecomplex c_b2 = {1.,0.};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int zlagge_(integer *m, integer *n, integer *kl, integer *ku,
+ doublereal *d, doublecomplex *a, integer *lda, integer *iseed,
+ doublecomplex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublereal d__1;
+ doublecomplex z__1;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer i, j;
+ extern /* Subroutine */ int zgerc_(integer *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *), zscal_(integer *, doublecomplex *,
+ doublecomplex *, integer *), zgemv_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *);
+ extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
+ static doublecomplex wa, wb;
+ static doublereal wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), zlacgv_(
+ integer *, doublecomplex *, integer *), zlarnv_(integer *,
+ integer *, integer *, doublecomplex *);
+ static doublecomplex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLAGGE generates a complex general m by n matrix A, by pre- and post-
+
+ multiplying a real diagonal matrix D with random unitary matrices:
+ A = U*D*V. The lower and upper bandwidths may then be reduced to
+ kl and ku by additional unitary transformations.
+
+ Arguments
+ =========
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ KL (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= KL <= M-1.
+
+ KU (input) INTEGER
+ The number of nonzero superdiagonals within the band of A.
+ 0 <= KU <= N-1.
+
+ D (input) DOUBLE PRECISION array, dimension (min(M,N))
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) COMPLEX*16 array, dimension (LDA,N)
+ The generated m by n matrix A.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= M.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX*16 array, dimension (M+N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*m < 0) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (*kl < 0 || *kl > *m - 1) {
+ *info = -3;
+ } else if (*ku < 0 || *ku > *n - 1) {
+ *info = -4;
+ } else if (*lda < max(1,*m)) {
+ *info = -7;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("ZLAGGE", &i__1);
+ return 0;
+ }
+
+/* initialize A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = min(*m,*n);
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i + i * a_dim1;
+ i__3 = i;
+ a[i__2].r = d[i__3], a[i__2].i = 0.;
+/* L30: */
+ }
+
+/* pre- and post-multiply A by random unitary matrices */
+
+ for (i = min(*m,*n); i >= 1; --i) {
+ if (i < *m) {
+
+/* generate random reflection */
+
+ i__1 = *m - i + 1;
+ zlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *m - i + 1;
+ wn = dznrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / z_abs(&work[1]);
+ z__1.r = d__1 * work[1].r, z__1.i = d__1 * work[1].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ z__1.r = work[1].r + wa.r, z__1.i = work[1].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__1 = *m - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__1, &z__1, &work[2], &c__1);
+ work[1].r = 1., work[1].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the lef
+t */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ zgemv_("Conjugate transpose", &i__1, &i__2, &c_b2, &a[i + i *
+ a_dim1], lda, &work[1], &c__1, &c_b1, &work[*m + 1], &
+ c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__1, &i__2, &z__1, &work[1], &c__1, &work[*m + 1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+ if (i < *n) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ zlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dznrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / z_abs(&work[1]);
+ z__1.r = d__1 * work[1].r, z__1.i = d__1 * work[1].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ z__1.r = work[1].r + wa.r, z__1.i = work[1].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__1 = *n - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__1, &z__1, &work[2], &c__1);
+ work[1].r = 1., work[1].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* multiply A(i:m,i:n) by random reflection from the rig
+ht */
+
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ zgemv_("No transpose", &i__1, &i__2, &c_b2, &a[i + i * a_dim1],
+ lda, &work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
+ i__1 = *m - i + 1;
+ i__2 = *n - i + 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__1, &i__2, &z__1, &work[*n + 1], &c__1, &work[1], &c__1,
+ &a[i + i * a_dim1], lda);
+ }
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to KL and number of superdiagonals
+ to KU
+
+ Computing MAX */
+ i__2 = *m - 1 - *kl, i__3 = *n - 1 - *ku;
+ i__1 = max(i__2,i__3);
+ for (i = 1; i <= i__1; ++i) {
+ if (*kl <= *ku) {
+
+/* annihilate subdiagonal elements first (necessary if K
+L = 0)
+
+ Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = dznrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ d__1 = wn / z_abs(&a[*kl + i + i * a_dim1]);
+ i__2 = *kl + i + i * a_dim1;
+ z__1.r = d__1 * a[i__2].r, z__1.i = d__1 * a[i__2].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ i__2 = *kl + i + i * a_dim1;
+ z__1.r = a[i__2].r + wa.r, z__1.i = a[i__2].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__2 = *m - *kl - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__2, &z__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ i__2 = *kl + i + i * a_dim1;
+ a[i__2].r = 1., a[i__2].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*kl + i
+ + (i + 1) * a_dim1], lda, &a[*kl + i + i * a_dim1], &
+ c__1, &c_b1, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__2, &i__3, &z__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ i__2 = *kl + i + i * a_dim1;
+ z__1.r = -wa.r, z__1.i = -wa.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ }
+
+/* Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = dznrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ d__1 = wn / z_abs(&a[i + (*ku + i) * a_dim1]);
+ i__2 = i + (*ku + i) * a_dim1;
+ z__1.r = d__1 * a[i__2].r, z__1.i = d__1 * a[i__2].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ i__2 = i + (*ku + i) * a_dim1;
+ z__1.r = a[i__2].r + wa.r, z__1.i = a[i__2].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__2 = *n - *ku - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__2, &z__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ a[i__2].r = 1., a[i__2].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *n - *ku - i + 1;
+ zlacgv_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ zgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i + 1 + (*ku +
+ i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda, &
+ c_b1, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__2, &i__3, &z__1, &work[1], &c__1, &a[i + (*ku + i)
+ * a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ z__1.r = -wa.r, z__1.i = -wa.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ }
+ } else {
+
+/* annihilate superdiagonal elements first (necessary if
+
+ KU = 0)
+
+ Computing MIN */
+ i__2 = *n - 1 - *ku;
+ if (i <= min(i__2,*m)) {
+
+/* generate reflection to annihilate A(i,ku+i+1:n
+) */
+
+ i__2 = *n - *ku - i + 1;
+ wn = dznrm2_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ d__1 = wn / z_abs(&a[i + (*ku + i) * a_dim1]);
+ i__2 = i + (*ku + i) * a_dim1;
+ z__1.r = d__1 * a[i__2].r, z__1.i = d__1 * a[i__2].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ i__2 = i + (*ku + i) * a_dim1;
+ z__1.r = a[i__2].r + wa.r, z__1.i = a[i__2].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__2 = *n - *ku - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__2, &z__1, &a[i + (*ku + i + 1) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ a[i__2].r = 1., a[i__2].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply reflection to A(i+1:m,ku+i:n) from the r
+ight */
+
+ i__2 = *n - *ku - i + 1;
+ zlacgv_(&i__2, &a[i + (*ku + i) * a_dim1], lda);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ zgemv_("No transpose", &i__2, &i__3, &c_b2, &a[i + 1 + (*ku +
+ i) * a_dim1], lda, &a[i + (*ku + i) * a_dim1], lda, &
+ c_b1, &work[1], &c__1);
+ i__2 = *m - i;
+ i__3 = *n - *ku - i + 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__2, &i__3, &z__1, &work[1], &c__1, &a[i + (*ku + i)
+ * a_dim1], lda, &a[i + 1 + (*ku + i) * a_dim1], lda);
+ i__2 = i + (*ku + i) * a_dim1;
+ z__1.r = -wa.r, z__1.i = -wa.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ }
+
+/* Computing MIN */
+ i__2 = *m - 1 - *kl;
+ if (i <= min(i__2,*n)) {
+
+/* generate reflection to annihilate A(kl+i+1:m,i
+) */
+
+ i__2 = *m - *kl - i + 1;
+ wn = dznrm2_(&i__2, &a[*kl + i + i * a_dim1], &c__1);
+ d__1 = wn / z_abs(&a[*kl + i + i * a_dim1]);
+ i__2 = *kl + i + i * a_dim1;
+ z__1.r = d__1 * a[i__2].r, z__1.i = d__1 * a[i__2].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ i__2 = *kl + i + i * a_dim1;
+ z__1.r = a[i__2].r + wa.r, z__1.i = a[i__2].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__2 = *m - *kl - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__2, &z__1, &a[*kl + i + 1 + i * a_dim1], &c__1);
+ i__2 = *kl + i + i * a_dim1;
+ a[i__2].r = 1., a[i__2].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply reflection to A(kl+i:m,i+1:n) from the l
+eft */
+
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*kl + i
+ + (i + 1) * a_dim1], lda, &a[*kl + i + i * a_dim1], &
+ c__1, &c_b1, &work[1], &c__1);
+ i__2 = *m - *kl - i + 1;
+ i__3 = *n - i;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__2, &i__3, &z__1, &a[*kl + i + i * a_dim1], &c__1, &
+ work[1], &c__1, &a[*kl + i + (i + 1) * a_dim1], lda);
+ i__2 = *kl + i + i * a_dim1;
+ z__1.r = -wa.r, z__1.i = -wa.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ }
+ }
+
+ i__2 = *m;
+ for (j = *kl + i + 1; j <= i__2; ++j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L50: */
+ }
+
+ i__2 = *n;
+ for (j = *ku + i + 1; j <= i__2; ++j) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L60: */
+ }
+/* L70: */
+ }
+ return 0;
+
+/* End of ZLAGGE */
+
+} /* zlagge_ */
+
diff --git a/TESTING/MATGEN/zlaghe.c b/TESTING/MATGEN/zlaghe.c
new file mode 100644
index 0000000..4cad7aa
--- /dev/null
+++ b/TESTING/MATGEN/zlaghe.c
@@ -0,0 +1,314 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static doublecomplex c_b2 = {1.,0.};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int zlaghe_(integer *n, integer *k, doublereal *d,
+ doublecomplex *a, integer *lda, integer *iseed, doublecomplex *work,
+ integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublereal d__1;
+ doublecomplex z__1, z__2, z__3, z__4;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *), d_cnjg(
+ doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ extern /* Subroutine */ int zher2_(char *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *);
+ static integer i, j;
+ static doublecomplex alpha;
+ extern /* Subroutine */ int zgerc_(integer *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *), zscal_(integer *, doublecomplex *,
+ doublecomplex *, integer *);
+ extern /* Double Complex */ VOID zdotc_(doublecomplex *, integer *,
+ doublecomplex *, integer *, doublecomplex *, integer *);
+ extern /* Subroutine */ int zgemv_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *),
+ zhemv_(char *, integer *, doublecomplex *, doublecomplex *,
+ integer *, doublecomplex *, integer *, doublecomplex *,
+ doublecomplex *, integer *), zaxpy_(integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *);
+ extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
+ static doublecomplex wa, wb;
+ static doublereal wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), zlarnv_(
+ integer *, integer *, integer *, doublecomplex *);
+ static doublecomplex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLAGHE generates a complex hermitian matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with a random unitary matrix:
+ A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+
+ unitary transformations.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ K (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= K <= N-1.
+
+ D (input) DOUBLE PRECISION array, dimension (N)
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) COMPLEX*16 array, dimension (LDA,N)
+ The generated n by n hermitian matrix A (the full matrix is
+ stored).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX*16 array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*k < 0 || *k > *n - 1) {
+ *info = -2;
+ } else if (*lda < max(1,*n)) {
+ *info = -5;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("ZLAGHE", &i__1);
+ return 0;
+ }
+
+/* initialize lower triangle of A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i + i * a_dim1;
+ i__3 = i;
+ a[i__2].r = d[i__3], a[i__2].i = 0.;
+/* L30: */
+ }
+
+/* Generate lower triangle of hermitian matrix */
+
+ for (i = *n - 1; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ zlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dznrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / z_abs(&work[1]);
+ z__1.r = d__1 * work[1].r, z__1.i = d__1 * work[1].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ z__1.r = work[1].r + wa.r, z__1.i = work[1].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__1 = *n - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__1, &z__1, &work[2], &c__1);
+ work[1].r = 1., work[1].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply random reflection to A(i:n,i:n) from the left
+ and the right
+
+ compute y := tau * A * u */
+
+ i__1 = *n - i + 1;
+ zhemv_("Lower", &i__1, &tau, &a[i + i * a_dim1], lda, &work[1], &c__1,
+ &c_b1, &work[*n + 1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ z__3.r = -.5, z__3.i = 0.;
+ z__2.r = z__3.r * tau.r - z__3.i * tau.i, z__2.i = z__3.r * tau.i +
+ z__3.i * tau.r;
+ i__1 = *n - i + 1;
+ zdotc_(&z__4, &i__1, &work[*n + 1], &c__1, &work[1], &c__1);
+ z__1.r = z__2.r * z__4.r - z__2.i * z__4.i, z__1.i = z__2.r * z__4.i
+ + z__2.i * z__4.r;
+ alpha.r = z__1.r, alpha.i = z__1.i;
+ i__1 = *n - i + 1;
+ zaxpy_(&i__1, &alpha, &work[1], &c__1, &work[*n + 1], &c__1);
+
+/* apply the transformation as a rank-2 update to A(i:n,i:n) */
+
+ i__1 = *n - i + 1;
+ z__1.r = -1., z__1.i = 0.;
+ zher2_("Lower", &i__1, &z__1, &work[1], &c__1, &work[*n + 1], &c__1, &
+ a[i + i * a_dim1], lda);
+/* L40: */
+ }
+
+/* Reduce number of subdiagonals to K */
+
+ i__1 = *n - 1 - *k;
+ for (i = 1; i <= i__1; ++i) {
+
+/* generate reflection to annihilate A(k+i+1:n,i) */
+
+ i__2 = *n - *k - i + 1;
+ wn = dznrm2_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ d__1 = wn / z_abs(&a[*k + i + i * a_dim1]);
+ i__2 = *k + i + i * a_dim1;
+ z__1.r = d__1 * a[i__2].r, z__1.i = d__1 * a[i__2].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ i__2 = *k + i + i * a_dim1;
+ z__1.r = a[i__2].r + wa.r, z__1.i = a[i__2].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__2 = *n - *k - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__2, &z__1, &a[*k + i + 1 + i * a_dim1], &c__1);
+ i__2 = *k + i + i * a_dim1;
+ a[i__2].r = 1., a[i__2].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply reflection to A(k+i:n,i+1:k+i-1) from the left */
+
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*k + i + (i + 1)
+ * a_dim1], lda, &a[*k + i + i * a_dim1], &c__1, &c_b1, &work[
+ 1], &c__1);
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__2, &i__3, &z__1, &a[*k + i + i * a_dim1], &c__1, &work[1],
+ &c__1, &a[*k + i + (i + 1) * a_dim1], lda);
+
+/* apply reflection to A(k+i:n,k+i:n) from the left and the rig
+ht
+
+ compute y := tau * A * u */
+
+ i__2 = *n - *k - i + 1;
+ zhemv_("Lower", &i__2, &tau, &a[*k + i + (*k + i) * a_dim1], lda, &a[*
+ k + i + i * a_dim1], &c__1, &c_b1, &work[1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( y, u ) * u */
+
+ z__3.r = -.5, z__3.i = 0.;
+ z__2.r = z__3.r * tau.r - z__3.i * tau.i, z__2.i = z__3.r * tau.i +
+ z__3.i * tau.r;
+ i__2 = *n - *k - i + 1;
+ zdotc_(&z__4, &i__2, &work[1], &c__1, &a[*k + i + i * a_dim1], &c__1);
+ z__1.r = z__2.r * z__4.r - z__2.i * z__4.i, z__1.i = z__2.r * z__4.i
+ + z__2.i * z__4.r;
+ alpha.r = z__1.r, alpha.i = z__1.i;
+ i__2 = *n - *k - i + 1;
+ zaxpy_(&i__2, &alpha, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1)
+ ;
+
+/* apply hermitian rank-2 update to A(k+i:n,k+i:n) */
+
+ i__2 = *n - *k - i + 1;
+ z__1.r = -1., z__1.i = 0.;
+ zher2_("Lower", &i__2, &z__1, &a[*k + i + i * a_dim1], &c__1, &work[1]
+ , &c__1, &a[*k + i + (*k + i) * a_dim1], lda);
+
+ i__2 = *k + i + i * a_dim1;
+ z__1.r = -wa.r, z__1.i = -wa.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ i__2 = *n;
+ for (j = *k + i + 1; j <= i__2; ++j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L50: */
+ }
+/* L60: */
+ }
+
+/* Store full hermitian matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = j + i * a_dim1;
+ d_cnjg(&z__1, &a[i + j * a_dim1]);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L70: */
+ }
+/* L80: */
+ }
+ return 0;
+
+/* End of ZLAGHE */
+
+} /* zlaghe_ */
+
diff --git a/TESTING/MATGEN/zlagsy.c b/TESTING/MATGEN/zlagsy.c
new file mode 100644
index 0000000..fb6da0d
--- /dev/null
+++ b/TESTING/MATGEN/zlagsy.c
@@ -0,0 +1,365 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static doublecomplex c_b2 = {1.,0.};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int zlagsy_(integer *n, integer *k, doublereal *d,
+ doublecomplex *a, integer *lda, integer *iseed, doublecomplex *work,
+ integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6, i__7, i__8,
+ i__9;
+ doublereal d__1;
+ doublecomplex z__1, z__2, z__3, z__4;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer i, j;
+ static doublecomplex alpha;
+ extern /* Subroutine */ int zgerc_(integer *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *), zscal_(integer *, doublecomplex *,
+ doublecomplex *, integer *);
+ extern /* Double Complex */ VOID zdotc_(doublecomplex *, integer *,
+ doublecomplex *, integer *, doublecomplex *, integer *);
+ extern /* Subroutine */ int zgemv_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *),
+ zaxpy_(integer *, doublecomplex *, doublecomplex *, integer *,
+ doublecomplex *, integer *), zsymv_(char *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *);
+ extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
+ static integer ii, jj;
+ static doublecomplex wa, wb;
+ static doublereal wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), zlacgv_(
+ integer *, doublecomplex *, integer *), zlarnv_(integer *,
+ integer *, integer *, doublecomplex *);
+ static doublecomplex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLAGSY generates a complex symmetric matrix A, by pre- and post-
+ multiplying a real diagonal matrix D with a random unitary matrix:
+ A = U*D*U**T. The semi-bandwidth may then be reduced to k by
+ additional unitary transformations.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ K (input) INTEGER
+ The number of nonzero subdiagonals within the band of A.
+ 0 <= K <= N-1.
+
+ D (input) DOUBLE PRECISION array, dimension (N)
+ The diagonal elements of the diagonal matrix D.
+
+ A (output) COMPLEX*16 array, dimension (LDA,N)
+ The generated n by n symmetric matrix A (the full matrix is
+ stored).
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX*16 array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*k < 0 || *k > *n - 1) {
+ *info = -2;
+ } else if (*lda < max(1,*n)) {
+ *info = -5;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("ZLAGSY", &i__1);
+ return 0;
+ }
+
+/* initialize lower triangle of A to diagonal matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = *n;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i + i * a_dim1;
+ i__3 = i;
+ a[i__2].r = d[i__3], a[i__2].i = 0.;
+/* L30: */
+ }
+
+/* Generate lower triangle of symmetric matrix */
+
+ for (i = *n - 1; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ zlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dznrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / z_abs(&work[1]);
+ z__1.r = d__1 * work[1].r, z__1.i = d__1 * work[1].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ z__1.r = work[1].r + wa.r, z__1.i = work[1].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__1 = *n - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__1, &z__1, &work[2], &c__1);
+ work[1].r = 1., work[1].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply random reflection to A(i:n,i:n) from the left
+ and the right
+
+ compute y := tau * A * conjg(u) */
+
+ i__1 = *n - i + 1;
+ zlacgv_(&i__1, &work[1], &c__1);
+ i__1 = *n - i + 1;
+ zsymv_("Lower", &i__1, &tau, &a[i + i * a_dim1], lda, &work[1], &c__1,
+ &c_b1, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ zlacgv_(&i__1, &work[1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( u, y ) * u */
+
+ z__3.r = -.5, z__3.i = 0.;
+ z__2.r = z__3.r * tau.r - z__3.i * tau.i, z__2.i = z__3.r * tau.i +
+ z__3.i * tau.r;
+ i__1 = *n - i + 1;
+ zdotc_(&z__4, &i__1, &work[1], &c__1, &work[*n + 1], &c__1);
+ z__1.r = z__2.r * z__4.r - z__2.i * z__4.i, z__1.i = z__2.r * z__4.i
+ + z__2.i * z__4.r;
+ alpha.r = z__1.r, alpha.i = z__1.i;
+ i__1 = *n - i + 1;
+ zaxpy_(&i__1, &alpha, &work[1], &c__1, &work[*n + 1], &c__1);
+
+/* apply the transformation as a rank-2 update to A(i:n,i:n)
+
+ CALL ZSYR2( 'Lower', N-I+1, -ONE, WORK, 1, WORK( N+1 ), 1,
+
+ $ A( I, I ), LDA ) */
+
+ i__1 = *n;
+ for (jj = i; jj <= i__1; ++jj) {
+ i__2 = *n;
+ for (ii = jj; ii <= i__2; ++ii) {
+ i__3 = ii + jj * a_dim1;
+ i__4 = ii + jj * a_dim1;
+ i__5 = ii - i + 1;
+ i__6 = *n + jj - i + 1;
+ z__3.r = work[i__5].r * work[i__6].r - work[i__5].i * work[
+ i__6].i, z__3.i = work[i__5].r * work[i__6].i + work[
+ i__5].i * work[i__6].r;
+ z__2.r = a[i__4].r - z__3.r, z__2.i = a[i__4].i - z__3.i;
+ i__7 = *n + ii - i + 1;
+ i__8 = jj - i + 1;
+ z__4.r = work[i__7].r * work[i__8].r - work[i__7].i * work[
+ i__8].i, z__4.i = work[i__7].r * work[i__8].i + work[
+ i__7].i * work[i__8].r;
+ z__1.r = z__2.r - z__4.r, z__1.i = z__2.i - z__4.i;
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L40: */
+ }
+/* L50: */
+ }
+/* L60: */
+ }
+
+/* Reduce number of subdiagonals to K */
+
+ i__1 = *n - 1 - *k;
+ for (i = 1; i <= i__1; ++i) {
+
+/* generate reflection to annihilate A(k+i+1:n,i) */
+
+ i__2 = *n - *k - i + 1;
+ wn = dznrm2_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ d__1 = wn / z_abs(&a[*k + i + i * a_dim1]);
+ i__2 = *k + i + i * a_dim1;
+ z__1.r = d__1 * a[i__2].r, z__1.i = d__1 * a[i__2].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ i__2 = *k + i + i * a_dim1;
+ z__1.r = a[i__2].r + wa.r, z__1.i = a[i__2].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__2 = *n - *k - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__2, &z__1, &a[*k + i + 1 + i * a_dim1], &c__1);
+ i__2 = *k + i + i * a_dim1;
+ a[i__2].r = 1., a[i__2].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* apply reflection to A(k+i:n,i+1:k+i-1) from the left */
+
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ zgemv_("Conjugate transpose", &i__2, &i__3, &c_b2, &a[*k + i + (i + 1)
+ * a_dim1], lda, &a[*k + i + i * a_dim1], &c__1, &c_b1, &work[
+ 1], &c__1);
+ i__2 = *n - *k - i + 1;
+ i__3 = *k - 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__2, &i__3, &z__1, &a[*k + i + i * a_dim1], &c__1, &work[1],
+ &c__1, &a[*k + i + (i + 1) * a_dim1], lda);
+
+/* apply reflection to A(k+i:n,k+i:n) from the left and the rig
+ht
+
+ compute y := tau * A * conjg(u) */
+
+ i__2 = *n - *k - i + 1;
+ zlacgv_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+ i__2 = *n - *k - i + 1;
+ zsymv_("Lower", &i__2, &tau, &a[*k + i + (*k + i) * a_dim1], lda, &a[*
+ k + i + i * a_dim1], &c__1, &c_b1, &work[1], &c__1);
+ i__2 = *n - *k - i + 1;
+ zlacgv_(&i__2, &a[*k + i + i * a_dim1], &c__1);
+
+/* compute v := y - 1/2 * tau * ( u, y ) * u */
+
+ z__3.r = -.5, z__3.i = 0.;
+ z__2.r = z__3.r * tau.r - z__3.i * tau.i, z__2.i = z__3.r * tau.i +
+ z__3.i * tau.r;
+ i__2 = *n - *k - i + 1;
+ zdotc_(&z__4, &i__2, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1);
+ z__1.r = z__2.r * z__4.r - z__2.i * z__4.i, z__1.i = z__2.r * z__4.i
+ + z__2.i * z__4.r;
+ alpha.r = z__1.r, alpha.i = z__1.i;
+ i__2 = *n - *k - i + 1;
+ zaxpy_(&i__2, &alpha, &a[*k + i + i * a_dim1], &c__1, &work[1], &c__1)
+ ;
+
+/* apply symmetric rank-2 update to A(k+i:n,k+i:n)
+
+ CALL ZSYR2( 'Lower', N-K-I+1, -ONE, A( K+I, I ), 1, WORK, 1,
+
+ $ A( K+I, K+I ), LDA ) */
+
+ i__2 = *n;
+ for (jj = *k + i; jj <= i__2; ++jj) {
+ i__3 = *n;
+ for (ii = jj; ii <= i__3; ++ii) {
+ i__4 = ii + jj * a_dim1;
+ i__5 = ii + jj * a_dim1;
+ i__6 = ii + i * a_dim1;
+ i__7 = jj - *k - i + 1;
+ z__3.r = a[i__6].r * work[i__7].r - a[i__6].i * work[i__7].i,
+ z__3.i = a[i__6].r * work[i__7].i + a[i__6].i * work[
+ i__7].r;
+ z__2.r = a[i__5].r - z__3.r, z__2.i = a[i__5].i - z__3.i;
+ i__8 = ii - *k - i + 1;
+ i__9 = jj + i * a_dim1;
+ z__4.r = work[i__8].r * a[i__9].r - work[i__8].i * a[i__9].i,
+ z__4.i = work[i__8].r * a[i__9].i + work[i__8].i * a[
+ i__9].r;
+ z__1.r = z__2.r - z__4.r, z__1.i = z__2.i - z__4.i;
+ a[i__4].r = z__1.r, a[i__4].i = z__1.i;
+/* L70: */
+ }
+/* L80: */
+ }
+
+ i__2 = *k + i + i * a_dim1;
+ z__1.r = -wa.r, z__1.i = -wa.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ i__2 = *n;
+ for (j = *k + i + 1; j <= i__2; ++j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+/* L90: */
+ }
+/* L100: */
+ }
+
+/* Store full symmetric matrix */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *n;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__3 = j + i * a_dim1;
+ i__4 = i + j * a_dim1;
+ a[i__3].r = a[i__4].r, a[i__3].i = a[i__4].i;
+/* L110: */
+ }
+/* L120: */
+ }
+ return 0;
+
+/* End of ZLAGSY */
+
+} /* zlagsy_ */
+
diff --git a/TESTING/MATGEN/zlarge.c b/TESTING/MATGEN/zlarge.c
new file mode 100644
index 0000000..a7d6300
--- /dev/null
+++ b/TESTING/MATGEN/zlarge.c
@@ -0,0 +1,161 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static doublecomplex c_b2 = {1.,0.};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int zlarge_(integer *n, doublecomplex *a, integer *lda,
+ integer *iseed, doublecomplex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1;
+ doublereal d__1;
+ doublecomplex z__1;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer i;
+ extern /* Subroutine */ int zgerc_(integer *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *), zscal_(integer *, doublecomplex *,
+ doublecomplex *, integer *), zgemv_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *);
+ extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
+ static doublecomplex wa, wb;
+ static doublereal wn;
+ extern /* Subroutine */ int xerbla_(char *, integer *), zlarnv_(
+ integer *, integer *, integer *, doublecomplex *);
+ static doublecomplex tau;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLARGE pre- and post-multiplies a complex general n by n matrix A
+ with a random unitary matrix: A = U*D*U'.
+
+ Arguments
+ =========
+
+ N (input) INTEGER
+ The order of the matrix A. N >= 0.
+
+ A (input/output) COMPLEX*16 array, dimension (LDA,N)
+ On entry, the original n by n matrix A.
+ On exit, A is overwritten by U*A*U' for some random
+ unitary matrix U.
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= N.
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ WORK (workspace) COMPLEX*16 array, dimension (2*N)
+
+ INFO (output) INTEGER
+ = 0: successful exit
+ < 0: if INFO = -i, the i-th argument had an illegal value
+
+ =====================================================================
+
+
+
+ Test the input arguments
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+ if (*n < 0) {
+ *info = -1;
+ } else if (*lda < max(1,*n)) {
+ *info = -3;
+ }
+ if (*info < 0) {
+ i__1 = -(*info);
+ xerbla_("ZLARGE", &i__1);
+ return 0;
+ }
+
+/* pre- and post-multiply A by random unitary matrix */
+
+ for (i = *n; i >= 1; --i) {
+
+/* generate random reflection */
+
+ i__1 = *n - i + 1;
+ zlarnv_(&c__3, &iseed[1], &i__1, &work[1]);
+ i__1 = *n - i + 1;
+ wn = dznrm2_(&i__1, &work[1], &c__1);
+ d__1 = wn / z_abs(&work[1]);
+ z__1.r = d__1 * work[1].r, z__1.i = d__1 * work[1].i;
+ wa.r = z__1.r, wa.i = z__1.i;
+ if (wn == 0.) {
+ tau.r = 0., tau.i = 0.;
+ } else {
+ z__1.r = work[1].r + wa.r, z__1.i = work[1].i + wa.i;
+ wb.r = z__1.r, wb.i = z__1.i;
+ i__1 = *n - i;
+ z_div(&z__1, &c_b2, &wb);
+ zscal_(&i__1, &z__1, &work[2], &c__1);
+ work[1].r = 1., work[1].i = 0.;
+ z_div(&z__1, &wb, &wa);
+ d__1 = z__1.r;
+ tau.r = d__1, tau.i = 0.;
+ }
+
+/* multiply A(i:n,1:n) by random reflection from the left */
+
+ i__1 = *n - i + 1;
+ zgemv_("Conjugate transpose", &i__1, n, &c_b2, &a[i + a_dim1], lda, &
+ work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&i__1, n, &z__1, &work[1], &c__1, &work[*n + 1], &c__1, &a[i +
+ a_dim1], lda);
+
+/* multiply A(1:n,i:n) by random reflection from the right */
+
+ i__1 = *n - i + 1;
+ zgemv_("No transpose", n, &i__1, &c_b2, &a[i * a_dim1 + 1], lda, &
+ work[1], &c__1, &c_b1, &work[*n + 1], &c__1);
+ i__1 = *n - i + 1;
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(n, &i__1, &z__1, &work[*n + 1], &c__1, &work[1], &c__1, &a[i *
+ a_dim1 + 1], lda);
+/* L10: */
+ }
+ return 0;
+
+/* End of ZLARGE */
+
+} /* zlarge_ */
+
diff --git a/TESTING/MATGEN/zlarnd.c b/TESTING/MATGEN/zlarnd.c
new file mode 100644
index 0000000..20a782d
--- /dev/null
+++ b/TESTING/MATGEN/zlarnd.c
@@ -0,0 +1,126 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Double Complex */ VOID zlarnd_(doublecomplex * ret_val, integer *idist,
+ integer *iseed)
+{
+ /* System generated locals */
+ doublereal d__1, d__2;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal);
+ void z_exp(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static doublereal t1, t2;
+ extern doublereal dlaran_(integer *);
+
+
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLARND returns a random complex number from a uniform or normal
+ distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: real and imaginary parts each uniform (0,1)
+ = 2: real and imaginary parts each uniform (-1,1)
+ = 3: real and imaginary parts each normal (0,1)
+ = 4: uniformly distributed on the disc abs(z) <= 1
+ = 5: uniformly distributed on the circle abs(z) = 1
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine DLARAN to generate a random
+
+ real number from a uniform (0,1) distribution. The Box-Muller method
+
+ is used to transform numbers from a uniform to a normal distribution.
+
+
+ =====================================================================
+
+
+
+ Generate a pair of real random numbers from a uniform (0,1)
+ distribution
+
+ Parameter adjustments */
+ --iseed;
+
+ /* Function Body */
+ t1 = dlaran_(&iseed[1]);
+ t2 = dlaran_(&iseed[1]);
+
+ if (*idist == 1) {
+
+/* real and imaginary parts each uniform (0,1) */
+
+ z__1.r = t1, z__1.i = t2;
+ ret_val->r = z__1.r, ret_val->i = z__1.i;
+ } else if (*idist == 2) {
+
+/* real and imaginary parts each uniform (-1,1) */
+
+ d__1 = t1 * 2. - 1.;
+ d__2 = t2 * 2. - 1.;
+ z__1.r = d__1, z__1.i = d__2;
+ ret_val->r = z__1.r, ret_val->i = z__1.i;
+ } else if (*idist == 3) {
+
+/* real and imaginary parts each normal (0,1) */
+
+ d__1 = sqrt(log(t1) * -2.);
+ d__2 = t2 * 6.2831853071795864769252867663;
+ z__3.r = 0., z__3.i = d__2;
+ z_exp(&z__2, &z__3);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ ret_val->r = z__1.r, ret_val->i = z__1.i;
+ } else if (*idist == 4) {
+
+/* uniform distribution on the unit disc abs(z) <= 1 */
+
+ d__1 = sqrt(t1);
+ d__2 = t2 * 6.2831853071795864769252867663;
+ z__3.r = 0., z__3.i = d__2;
+ z_exp(&z__2, &z__3);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ ret_val->r = z__1.r, ret_val->i = z__1.i;
+ } else if (*idist == 5) {
+
+/* uniform distribution on the unit circle abs(z) = 1 */
+
+ d__1 = t2 * 6.2831853071795864769252867663;
+ z__2.r = 0., z__2.i = d__1;
+ z_exp(&z__1, &z__2);
+ ret_val->r = z__1.r, ret_val->i = z__1.i;
+ }
+ return ;
+
+/* End of ZLARND */
+
+} /* zlarnd_ */
+
diff --git a/TESTING/MATGEN/zlarnv.c b/TESTING/MATGEN/zlarnv.c
new file mode 100644
index 0000000..cd2798f
--- /dev/null
+++ b/TESTING/MATGEN/zlarnv.c
@@ -0,0 +1,173 @@
+#include "f2c.h"
+
+/* Subroutine */ int zlarnv_(integer *idist, integer *iseed, integer *n,
+ doublecomplex *x)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLARNV returns a vector of n random complex numbers from a uniform or
+
+ normal distribution.
+
+ Arguments
+ =========
+
+ IDIST (input) INTEGER
+ Specifies the distribution of the random numbers:
+ = 1: real and imaginary parts each uniform (0,1)
+ = 2: real and imaginary parts each uniform (-1,1)
+ = 3: real and imaginary parts each normal (0,1)
+ = 4: uniformly distributed on the disc abs(z) < 1
+ = 5: uniformly distributed on the circle abs(z) = 1
+
+ ISEED (input/output) INTEGER array, dimension (4)
+ On entry, the seed of the random number generator; the array
+
+ elements must be between 0 and 4095, and ISEED(4) must be
+ odd.
+ On exit, the seed is updated.
+
+ N (input) INTEGER
+ The number of random numbers to be generated.
+
+ X (output) COMPLEX*16 array, dimension (N)
+ The generated random numbers.
+
+ Further Details
+ ===============
+
+ This routine calls the auxiliary routine DLARUV to generate random
+ real numbers from a uniform (0,1) distribution, in batches of up to
+ 128 using vectorisable code. The Box-Muller method is used to
+ transform numbers from a uniform to a normal distribution.
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4, i__5;
+ doublereal d__1, d__2;
+ doublecomplex z__1, z__2, z__3;
+ /* Builtin functions */
+ double log(doublereal), sqrt(doublereal);
+ void z_exp(doublecomplex *, doublecomplex *);
+ /* Local variables */
+ static integer i;
+ static doublereal u[128];
+ static integer il, iv;
+ extern /* Subroutine */ int dlaruv_(integer *, integer *, doublereal *);
+
+
+#define U(I) u[(I)]
+#define X(I) x[(I)-1]
+#define ISEED(I) iseed[(I)-1]
+
+
+ i__1 = *n;
+ for (iv = 1; iv <= *n; iv += 64) {
+/* Computing MIN */
+ i__2 = 64, i__3 = *n - iv + 1;
+ il = min(i__2,i__3);
+
+/* Call DLARUV to generate 2*IL real numbers from a uniform (0,
+1)
+ distribution (2*IL <= LV) */
+
+ i__2 = il << 1;
+ dlaruv_(&ISEED(1), &i__2, u);
+
+ if (*idist == 1) {
+
+/* Copy generated numbers */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ i__4 = (i << 1) - 2;
+ i__5 = (i << 1) - 1;
+ z__1.r = U((i<<1)-2), z__1.i = U((i<<1)-1);
+ X(iv+i-1).r = z__1.r, X(iv+i-1).i = z__1.i;
+/* L10: */
+ }
+ } else if (*idist == 2) {
+
+/* Convert generated numbers to uniform (-1,1) distribut
+ion */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = U((i << 1) - 2) * 2. - 1.;
+ d__2 = U((i << 1) - 1) * 2. - 1.;
+ z__1.r = d__1, z__1.i = d__2;
+ X(iv+i-1).r = z__1.r, X(iv+i-1).i = z__1.i;
+/* L20: */
+ }
+ } else if (*idist == 3) {
+
+/* Convert generated numbers to normal (0,1) distributio
+n */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = sqrt(log(U((i << 1) - 2)) * -2.);
+ d__2 = U((i << 1) - 1) * 6.2831853071795864769252867663;
+ z__3.r = 0., z__3.i = d__2;
+ z_exp(&z__2, &z__3);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ X(iv+i-1).r = z__1.r, X(iv+i-1).i = z__1.i;
+/* L30: */
+ }
+ } else if (*idist == 4) {
+
+/* Convert generated numbers to complex numbers uniforml
+y
+ distributed on the unit disk */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = sqrt(U((i << 1) - 2));
+ d__2 = U((i << 1) - 1) * 6.2831853071795864769252867663;
+ z__3.r = 0., z__3.i = d__2;
+ z_exp(&z__2, &z__3);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ X(iv+i-1).r = z__1.r, X(iv+i-1).i = z__1.i;
+/* L40: */
+ }
+ } else if (*idist == 5) {
+
+/* Convert generated numbers to complex numbers uniforml
+y
+ distributed on the unit circle */
+
+ i__2 = il;
+ for (i = 1; i <= il; ++i) {
+ i__3 = iv + i - 1;
+ d__1 = U((i << 1) - 1) * 6.2831853071795864769252867663;
+ z__2.r = 0., z__2.i = d__1;
+ z_exp(&z__1, &z__2);
+ X(iv+i-1).r = z__1.r, X(iv+i-1).i = z__1.i;
+/* L50: */
+ }
+ }
+/* L60: */
+ }
+ return 0;
+
+/* End of ZLARNV */
+
+} /* zlarnv_ */
+
diff --git a/TESTING/MATGEN/zlaror.c b/TESTING/MATGEN/zlaror.c
new file mode 100644
index 0000000..26658a1
--- /dev/null
+++ b/TESTING/MATGEN/zlaror.c
@@ -0,0 +1,356 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static doublecomplex c_b2 = {1.,0.};
+static integer c__3 = 3;
+static integer c__1 = 1;
+
+/* Subroutine */ int zlaror_(char *side, char *init, integer *m, integer *n,
+ doublecomplex *a, integer *lda, integer *iseed, doublecomplex *x,
+ integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ doublecomplex z__1, z__2;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer kbeg, jcol;
+ static doublereal xabs;
+ static integer irow, j;
+ extern logical lsame_(char *, char *);
+ static doublecomplex csign;
+ extern /* Subroutine */ int zgerc_(integer *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *), zscal_(integer *, doublecomplex *,
+ doublecomplex *, integer *);
+ static integer ixfrm;
+ extern /* Subroutine */ int zgemv_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *);
+ static integer itype, nxfrm;
+ static doublereal xnorm;
+ extern doublereal dznrm2_(integer *, doublecomplex *, integer *);
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static doublereal factor;
+ extern /* Subroutine */ int zlacgv_(integer *, doublecomplex *, integer *)
+ ;
+ extern /* Double Complex */ VOID zlarnd_(doublecomplex *, integer *,
+ integer *);
+ extern /* Subroutine */ int zlaset_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, doublecomplex *, integer *);
+ static doublecomplex xnorms;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLAROR pre- or post-multiplies an M by N matrix A by a random
+ unitary matrix U, overwriting A. A may optionally be
+ initialized to the identity matrix before multiplying by U.
+ U is generated using the method of G.W. Stewart
+ ( SIAM J. Numer. Anal. 17, 1980, pp. 403-409 ).
+ (BLAS-2 version)
+
+ Arguments
+ =========
+
+ SIDE - CHARACTER*1
+ SIDE specifies whether A is multiplied on the left or right
+
+ by U.
+ SIDE = 'L' Multiply A on the left (premultiply) by U
+ SIDE = 'R' Multiply A on the right (postmultiply) by U*
+ SIDE = 'C' Multiply A on the left by U and the right by U*
+ SIDE = 'T' Multiply A on the left by U and the right by U'
+ Not modified.
+
+ INIT - CHARACTER*1
+ INIT specifies whether or not A should be initialized to
+ the identity matrix.
+ INIT = 'I' Initialize A to (a section of) the
+ identity matrix before applying U.
+ INIT = 'N' No initialization. Apply U to the
+ input matrix A.
+
+ INIT = 'I' may be used to generate square (i.e., unitary)
+ or rectangular orthogonal matrices (orthogonality being
+ in the sense of ZDOTC):
+
+ For square matrices, M=N, and SIDE many be either 'L' or
+ 'R'; the rows will be orthogonal to each other, as will the
+
+ columns.
+ For rectangular matrices where M < N, SIDE = 'R' will
+ produce a dense matrix whose rows will be orthogonal and
+ whose columns will not, while SIDE = 'L' will produce a
+ matrix whose rows will be orthogonal, and whose first M
+ columns will be orthogonal, the remaining columns being
+ zero.
+ For matrices where M > N, just use the previous
+ explaination, interchanging 'L' and 'R' and "rows" and
+ "columns".
+
+ Not modified.
+
+ M - INTEGER
+ Number of rows of A. Not modified.
+
+ N - INTEGER
+ Number of columns of A. Not modified.
+
+ A - COMPLEX*16 array, dimension ( LDA, N )
+ Input and output array. Overwritten by U A ( if SIDE = 'L' )
+
+ or by A U ( if SIDE = 'R' )
+ or by U A U* ( if SIDE = 'C')
+ or by U A U' ( if SIDE = 'T') on exit.
+
+ LDA - INTEGER
+ Leading dimension of A. Must be at least MAX ( 1, M ).
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. The array elements should be between 0 and 4095;
+
+ if not they will be reduced mod 4096. Also, ISEED(4) must
+ be odd. The random number generator uses a linear
+ congruential sequence limited to small integers, and so
+ should produce machine independent random numbers. The
+ values of ISEED are changed on exit, and can be used in the
+
+ next call to ZLAROR to continue the same random number
+ sequence.
+ Modified.
+
+ X - COMPLEX*16 array, dimension ( 3*MAX( M, N ) )
+ Workspace. Of length:
+ 2*M + N if SIDE = 'L',
+ 2*N + M if SIDE = 'R',
+ 3*N if SIDE = 'C' or 'T'.
+ Modified.
+
+ INFO - INTEGER
+ An error flag. It is set to:
+ 0 if no error.
+ 1 if ZLARND returned a bad random number (installation
+ problem)
+ -1 if SIDE is not L, R, C, or T.
+ -3 if M is negative.
+ -4 if N is negative or if SIDE is C or T and N is not equal
+
+ to M.
+ -6 if LDA is less than M.
+
+ =====================================================================
+
+
+
+ Parameter adjustments */
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iseed;
+ --x;
+
+ /* Function Body */
+ if (*n == 0 || *m == 0) {
+ return 0;
+ }
+
+ itype = 0;
+ if (lsame_(side, "L")) {
+ itype = 1;
+ } else if (lsame_(side, "R")) {
+ itype = 2;
+ } else if (lsame_(side, "C")) {
+ itype = 3;
+ } else if (lsame_(side, "T")) {
+ itype = 4;
+ }
+
+/* Check for argument errors. */
+
+ *info = 0;
+ if (itype == 0) {
+ *info = -1;
+ } else if (*m < 0) {
+ *info = -3;
+ } else if (*n < 0 || itype == 3 && *n != *m) {
+ *info = -4;
+ } else if (*lda < *m) {
+ *info = -6;
+ }
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("ZLAROR", &i__1);
+ return 0;
+ }
+
+ if (itype == 1) {
+ nxfrm = *m;
+ } else {
+ nxfrm = *n;
+ }
+
+/* Initialize A to the identity matrix if desired */
+
+ if (lsame_(init, "I")) {
+ zlaset_("Full", m, n, &c_b1, &c_b2, &a[a_offset], lda);
+ }
+
+/* If no rotation possible, still multiply by
+ a random complex number from the circle |x| = 1
+
+ 2) Compute Rotation by computing Householder
+ Transformations H(2), H(3), ..., H(n). Note that the
+ order in which they are computed is irrelevant. */
+
+ i__1 = nxfrm;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ x[i__2].r = 0., x[i__2].i = 0.;
+/* L10: */
+ }
+
+ i__1 = nxfrm;
+ for (ixfrm = 2; ixfrm <= i__1; ++ixfrm) {
+ kbeg = nxfrm - ixfrm + 1;
+
+/* Generate independent normal( 0, 1 ) random numbers */
+
+ i__2 = nxfrm;
+ for (j = kbeg; j <= i__2; ++j) {
+ i__3 = j;
+ zlarnd_(&z__1, &c__3, &iseed[1]);
+ x[i__3].r = z__1.r, x[i__3].i = z__1.i;
+/* L20: */
+ }
+
+/* Generate a Householder transformation from the random vector
+ X */
+
+ xnorm = dznrm2_(&ixfrm, &x[kbeg], &c__1);
+ xabs = z_abs(&x[kbeg]);
+ if (xabs != 0.) {
+ i__2 = kbeg;
+ z__1.r = x[i__2].r / xabs, z__1.i = x[i__2].i / xabs;
+ csign.r = z__1.r, csign.i = z__1.i;
+ } else {
+ csign.r = 1., csign.i = 0.;
+ }
+ z__1.r = xnorm * csign.r, z__1.i = xnorm * csign.i;
+ xnorms.r = z__1.r, xnorms.i = z__1.i;
+ i__2 = nxfrm + kbeg;
+ z__1.r = -csign.r, z__1.i = -csign.i;
+ x[i__2].r = z__1.r, x[i__2].i = z__1.i;
+ factor = xnorm * (xnorm + xabs);
+ if (abs(factor) < 1e-20) {
+ *info = 1;
+ i__2 = -(*info);
+ xerbla_("ZLAROR", &i__2);
+ return 0;
+ } else {
+ factor = 1. / factor;
+ }
+ i__2 = kbeg;
+ i__3 = kbeg;
+ z__1.r = x[i__3].r + xnorms.r, z__1.i = x[i__3].i + xnorms.i;
+ x[i__2].r = z__1.r, x[i__2].i = z__1.i;
+
+/* Apply Householder transformation to A */
+
+ if (itype == 1 || itype == 3 || itype == 4) {
+
+/* Apply H(k) on the left of A */
+
+ zgemv_("C", &ixfrm, n, &c_b2, &a[kbeg + a_dim1], lda, &x[kbeg], &
+ c__1, &c_b1, &x[(nxfrm << 1) + 1], &c__1);
+ z__2.r = factor, z__2.i = 0.;
+ z__1.r = -z__2.r, z__1.i = -z__2.i;
+ zgerc_(&ixfrm, n, &z__1, &x[kbeg], &c__1, &x[(nxfrm << 1) + 1], &
+ c__1, &a[kbeg + a_dim1], lda);
+
+ }
+
+ if (itype >= 2 && itype <= 4) {
+
+/* Apply H(k)* (or H(k)') on the right of A */
+
+ if (itype == 4) {
+ zlacgv_(&ixfrm, &x[kbeg], &c__1);
+ }
+
+ zgemv_("N", m, &ixfrm, &c_b2, &a[kbeg * a_dim1 + 1], lda, &x[kbeg]
+ , &c__1, &c_b1, &x[(nxfrm << 1) + 1], &c__1);
+ z__2.r = factor, z__2.i = 0.;
+ z__1.r = -z__2.r, z__1.i = -z__2.i;
+ zgerc_(m, &ixfrm, &z__1, &x[(nxfrm << 1) + 1], &c__1, &x[kbeg], &
+ c__1, &a[kbeg * a_dim1 + 1], lda);
+
+ }
+/* L30: */
+ }
+
+ zlarnd_(&z__1, &c__3, &iseed[1]);
+ x[1].r = z__1.r, x[1].i = z__1.i;
+ xabs = z_abs(&x[1]);
+ if (xabs != 0.) {
+ z__1.r = x[1].r / xabs, z__1.i = x[1].i / xabs;
+ csign.r = z__1.r, csign.i = z__1.i;
+ } else {
+ csign.r = 1., csign.i = 0.;
+ }
+ i__1 = nxfrm << 1;
+ x[i__1].r = csign.r, x[i__1].i = csign.i;
+
+/* Scale the matrix A by D. */
+
+ if (itype == 1 || itype == 3 || itype == 4) {
+ i__1 = *m;
+ for (irow = 1; irow <= i__1; ++irow) {
+ d_cnjg(&z__1, &x[nxfrm + irow]);
+ zscal_(n, &z__1, &a[irow + a_dim1], lda);
+/* L40: */
+ }
+ }
+
+ if (itype == 2 || itype == 3) {
+ i__1 = *n;
+ for (jcol = 1; jcol <= i__1; ++jcol) {
+ zscal_(m, &x[nxfrm + jcol], &a[jcol * a_dim1 + 1], &c__1);
+/* L50: */
+ }
+ }
+
+ if (itype == 4) {
+ i__1 = *n;
+ for (jcol = 1; jcol <= i__1; ++jcol) {
+ d_cnjg(&z__1, &x[nxfrm + jcol]);
+ zscal_(m, &z__1, &a[jcol * a_dim1 + 1], &c__1);
+/* L60: */
+ }
+ }
+ return 0;
+
+/* End of ZLAROR */
+
+} /* zlaror_ */
+
diff --git a/TESTING/MATGEN/zlarot.c b/TESTING/MATGEN/zlarot.c
new file mode 100644
index 0000000..26a5b97
--- /dev/null
+++ b/TESTING/MATGEN/zlarot.c
@@ -0,0 +1,365 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__4 = 4;
+static integer c__8 = 8;
+
+/* Subroutine */ int zlarot_(logical *lrows, logical *lleft, logical *lright,
+ integer *nl, doublecomplex *c, doublecomplex *s, doublecomplex *a,
+ integer *lda, doublecomplex *xleft, doublecomplex *xright)
+{
+ /* System generated locals */
+ integer i__1, i__2, i__3, i__4;
+ doublecomplex z__1, z__2, z__3, z__4, z__5, z__6;
+
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer iinc, j, inext;
+ static doublecomplex tempx;
+ static integer ix, iy, nt;
+ static doublecomplex xt[2], yt[2];
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static integer iyt;
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ ZLAROT applies a (Givens) rotation to two adjacent rows or
+ columns, where one element of the first and/or last column/row
+ may be a separate variable. This is specifically indended
+ for use on matrices stored in some format other than GE, so
+ that elements of the matrix may be used or modified for which
+ no array element is provided.
+
+ One example is a symmetric matrix in SB format (bandwidth=4), for
+
+ which UPLO='L': Two adjacent rows will have the format:
+
+ row j: * * * * * . . . .
+ row j+1: * * * * * . . . .
+
+ '*' indicates elements for which storage is provided,
+ '.' indicates elements for which no storage is provided, but
+ are not necessarily zero; their values are determined by
+ symmetry. ' ' indicates elements which are necessarily zero,
+ and have no storage provided.
+
+ Those columns which have two '*'s can be handled by DROT.
+ Those columns which have no '*'s can be ignored, since as long
+ as the Givens rotations are carefully applied to preserve
+ symmetry, their values are determined.
+ Those columns which have one '*' have to be handled separately,
+ by using separate variables "p" and "q":
+
+ row j: * * * * * p . . .
+ row j+1: q * * * * * . . . .
+
+ The element p would have to be set correctly, then that column
+ is rotated, setting p to its new value. The next call to
+ ZLAROT would rotate columns j and j+1, using p, and restore
+ symmetry. The element q would start out being zero, and be
+ made non-zero by the rotation. Later, rotations would presumably
+
+ be chosen to zero q out.
+
+ Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+ ------- ------- ---------
+
+ General dense matrix:
+
+ CALL ZLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+ A(i,1),LDA, DUMMY, DUMMY)
+
+ General banded matrix in GB format:
+
+ j = MAX(1, i-KL )
+ NL = MIN( N, i+KU+1 ) + 1-j
+ CALL ZLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+ A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,KL+1) ]
+
+ Symmetric banded matrix in SY format, bandwidth K,
+ lower triangle only:
+
+ j = MAX(1, i-K )
+ NL = MIN( K+1, i ) + 1
+ CALL ZLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+ A(i,j), LDA, XLEFT, XRIGHT )
+
+ Same, but upper triangle only:
+
+ NL = MIN( K+1, N-i ) + 1
+ CALL ZLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+ A(i,i), LDA, XLEFT, XRIGHT )
+
+ Symmetric banded matrix in SB format, bandwidth K,
+ lower triangle only:
+
+ [ same as for SY, except:]
+ . . . .
+ A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+
+ [ note that i+1-j is just MIN(i,K+1) ]
+
+ Same, but upper triangle only:
+ . . .
+ A(K+1,i), LDA-1, XLEFT, XRIGHT )
+
+ Rotating columns is just the transpose of rotating rows, except
+
+ for GB and SB: (rotating columns i and i+1)
+
+ GB:
+ j = MAX(1, i-KU )
+ NL = MIN( N, i+KL+1 ) + 1-j
+ CALL ZLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+ A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ [note that KU+j+1-i is just MAX(1,KU+2-i)]
+
+ SB: (upper triangle)
+
+ . . . . . .
+ A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+
+ SB: (lower triangle)
+
+ . . . . . .
+ A(1,i),LDA-1, XTOP, XBOTTM )
+
+ Arguments
+ =========
+
+ LROWS - LOGICAL
+ If .TRUE., then ZLAROT will rotate two rows. If .FALSE.,
+ then it will rotate two columns.
+ Not modified.
+
+ LLEFT - LOGICAL
+ If .TRUE., then XLEFT will be used instead of the
+ corresponding element of A for the first element in the
+ second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+ If .FALSE., then the corresponding element of A will be
+ used.
+ Not modified.
+
+ LRIGHT - LOGICAL
+ If .TRUE., then XRIGHT will be used instead of the
+ corresponding element of A for the last element in the
+ first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+
+ .FALSE., then the corresponding element of A will be used.
+ Not modified.
+
+ NL - INTEGER
+ The length of the rows (if LROWS=.TRUE.) or columns (if
+ LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+ used, the columns/rows they are in should be included in
+ NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+ least 2. The number of rows/columns to be rotated
+ exclusive of those involving XLEFT and/or XRIGHT may
+ not be negative, i.e., NL minus how many of LLEFT and
+ LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+ will be called.
+ Not modified.
+
+ C, S - COMPLEX*16
+ Specify the Givens rotation to be applied. If LROWS is
+ true, then the matrix ( c s )
+ ( _ _ )
+ (-s c ) is applied from the left;
+ if false, then the transpose (not conjugated) thereof is
+ applied from the right. Note that in contrast to the
+ output of ZROTG or to most versions of ZROT, both C and S
+ are complex. For a Givens rotation, |C|**2 + |S|**2 should
+
+ be 1, but this is not checked.
+ Not modified.
+
+ A - COMPLEX*16 array.
+ The array containing the rows/columns to be rotated. The
+ first element of A should be the upper left element to
+ be rotated.
+ Read and modified.
+
+ LDA - INTEGER
+ The "effective" leading dimension of A. If A contains
+ a matrix stored in GE, HE, or SY format, then this is just
+ the leading dimension of A as dimensioned in the calling
+ routine. If A contains a matrix stored in band (GB, HB, or
+
+ SB) format, then this should be *one less* than the leading
+
+ dimension used in the calling routine. Thus, if A were
+ dimensioned A(LDA,*) in ZLAROT, then A(1,j) would be the
+ j-th element in the first of the two rows to be rotated,
+ and A(2,j) would be the j-th in the second, regardless of
+ how the array may be stored in the calling routine. [A
+ cannot, however, actually be dimensioned thus, since for
+ band format, the row number may exceed LDA, which is not
+ legal FORTRAN.]
+ If LROWS=.TRUE., then LDA must be at least 1, otherwise
+ it must be at least NL minus the number of .TRUE. values
+ in XLEFT and XRIGHT.
+ Not modified.
+
+ XLEFT - COMPLEX*16
+ If LLEFT is .TRUE., then XLEFT will be used and modified
+ instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ XRIGHT - COMPLEX*16
+ If LRIGHT is .TRUE., then XRIGHT will be used and modified
+ instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+ (if LROWS=.FALSE.).
+ Read and modified.
+
+ =====================================================================
+
+
+
+ Set up indices, arrays for ends
+
+ Parameter adjustments */
+ --a;
+
+ /* Function Body */
+ if (*lrows) {
+ iinc = *lda;
+ inext = 1;
+ } else {
+ iinc = 1;
+ inext = *lda;
+ }
+
+ if (*lleft) {
+ nt = 1;
+ ix = iinc + 1;
+ iy = *lda + 2;
+ xt[0].r = a[1].r, xt[0].i = a[1].i;
+ yt[0].r = xleft->r, yt[0].i = xleft->i;
+ } else {
+ nt = 0;
+ ix = 1;
+ iy = inext + 1;
+ }
+
+ if (*lright) {
+ iyt = inext + 1 + (*nl - 1) * iinc;
+ ++nt;
+ i__1 = nt - 1;
+ xt[i__1].r = xright->r, xt[i__1].i = xright->i;
+ i__1 = nt - 1;
+ i__2 = iyt;
+ yt[i__1].r = a[i__2].r, yt[i__1].i = a[i__2].i;
+ }
+
+/* Check for errors */
+
+ if (*nl < nt) {
+ xerbla_("ZLAROT", &c__4);
+ return 0;
+ }
+ if (*lda <= 0 || ! (*lrows) && *lda < *nl - nt) {
+ xerbla_("ZLAROT", &c__8);
+ return 0;
+ }
+
+/* Rotate
+
+ ZROT( NL-NT, A(IX),IINC, A(IY),IINC, C, S ) with complex C, S */
+
+ i__1 = *nl - nt - 1;
+ for (j = 0; j <= i__1; ++j) {
+ i__2 = ix + j * iinc;
+ z__2.r = c->r * a[i__2].r - c->i * a[i__2].i, z__2.i = c->r * a[i__2]
+ .i + c->i * a[i__2].r;
+ i__3 = iy + j * iinc;
+ z__3.r = s->r * a[i__3].r - s->i * a[i__3].i, z__3.i = s->r * a[i__3]
+ .i + s->i * a[i__3].r;
+ z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
+ tempx.r = z__1.r, tempx.i = z__1.i;
+ i__2 = iy + j * iinc;
+ d_cnjg(&z__4, s);
+ z__3.r = -z__4.r, z__3.i = -z__4.i;
+ i__3 = ix + j * iinc;
+ z__2.r = z__3.r * a[i__3].r - z__3.i * a[i__3].i, z__2.i = z__3.r * a[
+ i__3].i + z__3.i * a[i__3].r;
+ d_cnjg(&z__6, c);
+ i__4 = iy + j * iinc;
+ z__5.r = z__6.r * a[i__4].r - z__6.i * a[i__4].i, z__5.i = z__6.r * a[
+ i__4].i + z__6.i * a[i__4].r;
+ z__1.r = z__2.r + z__5.r, z__1.i = z__2.i + z__5.i;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+ i__2 = ix + j * iinc;
+ a[i__2].r = tempx.r, a[i__2].i = tempx.i;
+/* L10: */
+ }
+
+/* ZROT( NT, XT,1, YT,1, C, S ) with complex C, S */
+
+ i__1 = nt;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j - 1;
+ z__2.r = c->r * xt[i__2].r - c->i * xt[i__2].i, z__2.i = c->r * xt[
+ i__2].i + c->i * xt[i__2].r;
+ i__3 = j - 1;
+ z__3.r = s->r * yt[i__3].r - s->i * yt[i__3].i, z__3.i = s->r * yt[
+ i__3].i + s->i * yt[i__3].r;
+ z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
+ tempx.r = z__1.r, tempx.i = z__1.i;
+ i__2 = j - 1;
+ d_cnjg(&z__4, s);
+ z__3.r = -z__4.r, z__3.i = -z__4.i;
+ i__3 = j - 1;
+ z__2.r = z__3.r * xt[i__3].r - z__3.i * xt[i__3].i, z__2.i = z__3.r *
+ xt[i__3].i + z__3.i * xt[i__3].r;
+ d_cnjg(&z__6, c);
+ i__4 = j - 1;
+ z__5.r = z__6.r * yt[i__4].r - z__6.i * yt[i__4].i, z__5.i = z__6.r *
+ yt[i__4].i + z__6.i * yt[i__4].r;
+ z__1.r = z__2.r + z__5.r, z__1.i = z__2.i + z__5.i;
+ yt[i__2].r = z__1.r, yt[i__2].i = z__1.i;
+ i__2 = j - 1;
+ xt[i__2].r = tempx.r, xt[i__2].i = tempx.i;
+/* L20: */
+ }
+
+/* Stuff values back into XLEFT, XRIGHT, etc. */
+
+ if (*lleft) {
+ a[1].r = xt[0].r, a[1].i = xt[0].i;
+ xleft->r = yt[0].r, xleft->i = yt[0].i;
+ }
+
+ if (*lright) {
+ i__1 = nt - 1;
+ xright->r = xt[i__1].r, xright->i = xt[i__1].i;
+ i__1 = iyt;
+ i__2 = nt - 1;
+ a[i__1].r = yt[i__2].r, a[i__1].i = yt[i__2].i;
+ }
+
+ return 0;
+
+/* End of ZLAROT */
+
+} /* zlarot_ */
+
diff --git a/TESTING/MATGEN/zlartg.c b/TESTING/MATGEN/zlartg.c
new file mode 100644
index 0000000..5107870
--- /dev/null
+++ b/TESTING/MATGEN/zlartg.c
@@ -0,0 +1,146 @@
+#include "f2c.h"
+
+/* Subroutine */ int zlartg_(doublecomplex *f, doublecomplex *g, doublereal *
+ cs, doublecomplex *sn, doublecomplex *r)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLARTG generates a plane rotation so that
+
+ [ CS SN ] [ F ] [ R ]
+ [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1.
+ [ -SN CS ] [ G ] [ 0 ]
+
+ This is a faster version of the BLAS1 routine ZROTG, except for
+ the following differences:
+ F and G are unchanged on return.
+ If G=0, then CS=1 and SN=0.
+ If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
+ floating point operations.
+
+ Arguments
+ =========
+
+ F (input) COMPLEX*16
+ The first component of vector to be rotated.
+
+ G (input) COMPLEX*16
+ The second component of vector to be rotated.
+
+ CS (output) DOUBLE PRECISION
+ The cosine of the rotation.
+
+ SN (output) COMPLEX*16
+ The sine of the rotation.
+
+ R (output) COMPLEX*16
+ The nonzero component of the rotated vector.
+
+ =====================================================================
+
+
+
+ [ 25 or 38 ops for main paths ] */
+ /* System generated locals */
+ doublereal d__1, d__2;
+ doublecomplex z__1, z__2, z__3;
+ /* Builtin functions */
+ void d_cnjg(doublecomplex *, doublecomplex *);
+ double z_abs(doublecomplex *), d_imag(doublecomplex *), sqrt(doublereal);
+ /* Local variables */
+ static doublereal d, f1, f2, g1, g2, fa, ga, di;
+ static doublecomplex fs, gs, ss;
+
+
+ if (g->r == 0. && g->i == 0.) {
+ *cs = 1.;
+ sn->r = 0., sn->i = 0.;
+ r->r = f->r, r->i = f->i;
+ } else if (f->r == 0. && f->i == 0.) {
+ *cs = 0.;
+
+ d_cnjg(&z__2, g);
+ d__1 = z_abs(g);
+ z__1.r = z__2.r / d__1, z__1.i = z__2.i / d__1;
+ sn->r = z__1.r, sn->i = z__1.i;
+ d__1 = z_abs(g);
+ r->r = d__1, r->i = 0.;
+
+/* SN = ONE
+ R = G */
+
+ } else {
+ f1 = (d__1 = f->r, abs(d__1)) + (d__2 = d_imag(f), abs(d__2));
+ g1 = (d__1 = g->r, abs(d__1)) + (d__2 = d_imag(g), abs(d__2));
+ if (f1 >= g1) {
+ z__1.r = g->r / f1, z__1.i = g->i / f1;
+ gs.r = z__1.r, gs.i = z__1.i;
+/* Computing 2nd power */
+ d__1 = gs.r;
+/* Computing 2nd power */
+ d__2 = d_imag(&gs);
+ g2 = d__1 * d__1 + d__2 * d__2;
+ z__1.r = f->r / f1, z__1.i = f->i / f1;
+ fs.r = z__1.r, fs.i = z__1.i;
+/* Computing 2nd power */
+ d__1 = fs.r;
+/* Computing 2nd power */
+ d__2 = d_imag(&fs);
+ f2 = d__1 * d__1 + d__2 * d__2;
+ d = sqrt(g2 / f2 + 1.);
+ *cs = 1. / d;
+ d_cnjg(&z__3, &gs);
+ z__2.r = z__3.r * fs.r - z__3.i * fs.i, z__2.i = z__3.r * fs.i +
+ z__3.i * fs.r;
+ d__1 = *cs / f2;
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ sn->r = z__1.r, sn->i = z__1.i;
+ z__1.r = d * f->r, z__1.i = d * f->i;
+ r->r = z__1.r, r->i = z__1.i;
+ } else {
+ z__1.r = f->r / g1, z__1.i = f->i / g1;
+ fs.r = z__1.r, fs.i = z__1.i;
+/* Computing 2nd power */
+ d__1 = fs.r;
+/* Computing 2nd power */
+ d__2 = d_imag(&fs);
+ f2 = d__1 * d__1 + d__2 * d__2;
+ fa = sqrt(f2);
+ z__1.r = g->r / g1, z__1.i = g->i / g1;
+ gs.r = z__1.r, gs.i = z__1.i;
+/* Computing 2nd power */
+ d__1 = gs.r;
+/* Computing 2nd power */
+ d__2 = d_imag(&gs);
+ g2 = d__1 * d__1 + d__2 * d__2;
+ ga = sqrt(g2);
+ d = sqrt(f2 / g2 + 1.);
+ di = 1. / d;
+ *cs = fa / ga * di;
+ d_cnjg(&z__3, &gs);
+ z__2.r = z__3.r * fs.r - z__3.i * fs.i, z__2.i = z__3.r * fs.i +
+ z__3.i * fs.r;
+ d__1 = fa * ga;
+ z__1.r = z__2.r / d__1, z__1.i = z__2.i / d__1;
+ ss.r = z__1.r, ss.i = z__1.i;
+ z__1.r = di * ss.r, z__1.i = di * ss.i;
+ sn->r = z__1.r, sn->i = z__1.i;
+ z__2.r = g->r * ss.r - g->i * ss.i, z__2.i = g->r * ss.i + g->i *
+ ss.r;
+ z__1.r = d * z__2.r, z__1.i = d * z__2.i;
+ r->r = z__1.r, r->i = z__1.i;
+ }
+ }
+ return 0;
+
+/* End of ZLARTG */
+
+} /* zlartg_ */
+
diff --git a/TESTING/MATGEN/zlaset.c b/TESTING/MATGEN/zlaset.c
new file mode 100644
index 0000000..6ddfc9c
--- /dev/null
+++ b/TESTING/MATGEN/zlaset.c
@@ -0,0 +1,145 @@
+#include "f2c.h"
+
+/* Subroutine */ int zlaset_(char *uplo, integer *m, integer *n,
+ doublecomplex *alpha, doublecomplex *beta, doublecomplex *a, integer *
+ lda)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ ZLASET initializes a 2-D array A to BETA on the diagonal and
+ ALPHA on the offdiagonals.
+
+ Arguments
+ =========
+
+ UPLO (input) CHARACTER*1
+ Specifies the part of the matrix A to be set.
+ = 'U': Upper triangular part is set. The lower triangle
+
+ is unchanged.
+ = 'L': Lower triangular part is set. The upper triangle
+
+ is unchanged.
+ Otherwise: All of the matrix A is set.
+
+ M (input) INTEGER
+ On entry, M specifies the number of rows of A.
+
+ N (input) INTEGER
+ On entry, N specifies the number of columns of A.
+
+ ALPHA (input) COMPLEX*16
+ All the offdiagonal array elements are set to ALPHA.
+
+ BETA (input) COMPLEX*16
+ All the diagonal array elements are set to BETA.
+
+ A (input/output) COMPLEX*16 array, dimension (LDA,N)
+ On entry, the m by n matrix A.
+ On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
+ A(i,i) = BETA , 1 <= i <= min(m,n)
+
+ LDA (input) INTEGER
+ The leading dimension of the array A. LDA >= max(1,M).
+
+ =====================================================================
+
+
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3;
+ /* Local variables */
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+
+
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ if (lsame_(uplo, "U")) {
+
+/* Set the diagonal to BETA and the strictly upper triangular
+
+ part of the array to ALPHA. */
+
+ i__1 = *n;
+ for (j = 2; j <= *n; ++j) {
+/* Computing MIN */
+ i__3 = j - 1;
+ i__2 = min(i__3,*m);
+ for (i = 1; i <= min(j-1,*m); ++i) {
+ i__3 = i + j * a_dim1;
+ A(i,j).r = alpha->r, A(i,j).i = alpha->i;
+/* L10: */
+ }
+/* L20: */
+ }
+ i__1 = min(*n,*m);
+ for (i = 1; i <= min(*n,*m); ++i) {
+ i__2 = i + i * a_dim1;
+ A(i,i).r = beta->r, A(i,i).i = beta->i;
+/* L30: */
+ }
+
+ } else if (lsame_(uplo, "L")) {
+
+/* Set the diagonal to BETA and the strictly lower triangular
+
+ part of the array to ALPHA. */
+
+ i__1 = min(*m,*n);
+ for (j = 1; j <= min(*m,*n); ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ A(i,j).r = alpha->r, A(i,j).i = alpha->i;
+/* L40: */
+ }
+/* L50: */
+ }
+ i__1 = min(*n,*m);
+ for (i = 1; i <= min(*n,*m); ++i) {
+ i__2 = i + i * a_dim1;
+ A(i,i).r = beta->r, A(i,i).i = beta->i;
+/* L60: */
+ }
+
+ } else {
+
+/* Set the array to BETA on the diagonal and ALPHA on the
+ offdiagonal. */
+
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= *m; ++i) {
+ i__3 = i + j * a_dim1;
+ A(i,j).r = alpha->r, A(i,j).i = alpha->i;
+/* L70: */
+ }
+/* L80: */
+ }
+ i__1 = min(*m,*n);
+ for (i = 1; i <= min(*m,*n); ++i) {
+ i__2 = i + i * a_dim1;
+ A(i,i).r = beta->r, A(i,i).i = beta->i;
+/* L90: */
+ }
+ }
+
+ return 0;
+
+/* End of ZLASET */
+
+} /* zlaset_ */
+
diff --git a/TESTING/MATGEN/zlatb4.c b/TESTING/MATGEN/zlatb4.c
new file mode 100644
index 0000000..a16117d
--- /dev/null
+++ b/TESTING/MATGEN/zlatb4.c
@@ -0,0 +1,467 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__2 = 2;
+
+/* Subroutine */ int zlatb4_(char *path, integer *imat, integer *m, integer *
+ n, char *type, integer *kl, integer *ku, doublereal *anorm, integer *
+ mode, doublereal *cndnum, char *dist)
+{
+ /* Initialized data */
+
+ static logical first = TRUE_;
+
+ /* System generated locals */
+ integer i__1;
+
+ /* Builtin functions */
+ double sqrt(doublereal);
+
+
+ /* Local variables */
+ static doublereal badc1, badc2, large, small;
+ static char c2[2];
+ extern /* Subroutine */ int dlabad_(doublereal *, doublereal *);
+ extern doublereal dlamch_(char *);
+ extern logical lsamen_(integer *, char *, char *);
+ static integer mat;
+ static doublereal eps;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ ZLATB4 sets parameters for the matrix generator based on the type of
+
+ matrix to be generated.
+
+ Arguments
+ =========
+
+ PATH (input) CHARACTER*3
+ The LAPACK path name.
+
+ IMAT (input) INTEGER
+ An integer key describing which matrix to generate for this
+ path.
+
+ M (input) INTEGER
+ The number of rows in the matrix to be generated.
+
+ N (input) INTEGER
+ The number of columns in the matrix to be generated.
+
+ TYPE (output) CHARACTER*1
+ The type of the matrix to be generated:
+ = 'S': symmetric matrix
+ = 'P': symmetric positive (semi)definite matrix
+ = 'N': nonsymmetric matrix
+
+ KL (output) INTEGER
+ The lower band width of the matrix to be generated.
+
+ KU (output) INTEGER
+ The upper band width of the matrix to be generated.
+
+ ANORM (output) DOUBLE PRECISION
+ The desired norm of the matrix to be generated. The diagonal
+
+ matrix of singular values or eigenvalues is scaled by this
+ value.
+
+ MODE (output) INTEGER
+ A key indicating how to choose the vector of eigenvalues.
+
+ CNDNUM (output) DOUBLE PRECISION
+ The desired condition number.
+
+ DIST (output) CHARACTER*1
+ The type of distribution to be used by the random number
+ generator.
+
+ =====================================================================
+
+
+
+ Set some constants for use in the subroutine. */
+
+ if (first) {
+ first = FALSE_;
+ eps = dlamch_("Precision");
+ badc2 = .1 / eps;
+ badc1 = sqrt(badc2);
+ small = dlamch_("Safe minimum");
+ large = 1. / small;
+
+/* If it looks like we're on a Cray, take the square root of
+ SMALL and LARGE to avoid overflow and underflow problems. */
+
+ dlabad_(&small, &large);
+ small = small / eps * .25;
+ large = 1. / small;
+ }
+
+/* s_copy(c2, path + 1, 2L, 2L);*/
+ strncpy(c2, path + 1, 2);
+
+/* Set some parameters we don't plan to change. */
+
+ *(unsigned char *)dist = 'S';
+ *mode = 3;
+
+/* xQR, xLQ, xQL, xRQ: Set parameters to generate a general
+ M x N matrix. */
+
+ if (lsamen_(&c__2, c2, "QR") || lsamen_(&c__2, c2, "LQ")
+ || lsamen_(&c__2, c2, "QL") || lsamen_(&c__2, c2, "RQ")) {
+
+/* Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GE")) {
+
+/* xGE: Set parameters to generate a general M x N matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat == 2) {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ } else if (*imat == 3) {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *m - 1;
+ *kl = max(i__1,0);
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (*imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 10) {
+ *anorm = small;
+ } else if (*imat == 11) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GB")) {
+
+/* xGB: Set parameters to generate a general banded matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the condition number and norm. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2 * .1;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "GT")) {
+
+/* xGT: Set parameters to generate a general tridiagonal matri
+x.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PO") || lsamen_(&c__2, c2, "PP") || lsamen_(&c__2, c2, "HE") || lsamen_(&c__2, c2,
+ "HP") || lsamen_(&c__2, c2, "SY") || lsamen_(&
+ c__2, c2, "SP")) {
+
+/* xPO, xPP, xHE, xHP, xSY, xSP: Set parameters to generate a
+
+ symmetric or Hermitian matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = *(unsigned char *)c2;
+
+/* Set the lower and upper bandwidths. */
+
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 6) {
+ *cndnum = badc1;
+ } else if (*imat == 7) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 8) {
+ *anorm = small;
+ } else if (*imat == 9) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PB")) {
+
+/* xPB: Set parameters to generate a symmetric band matrix.
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'P';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 5) {
+ *cndnum = badc1;
+ } else if (*imat == 6) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 7) {
+ *anorm = small;
+ } else if (*imat == 8) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "PT")) {
+
+/* xPT: Set parameters to generate a symmetric positive defini
+te
+ tridiagonal matrix. */
+
+ *(unsigned char *)type = 'P';
+ if (*imat == 1) {
+ *kl = 0;
+ } else {
+ *kl = 1;
+ }
+ *ku = *kl;
+
+/* Set the condition number and norm. */
+
+ if (*imat == 3) {
+ *cndnum = badc1;
+ } else if (*imat == 4) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 5 || *imat == 11) {
+ *anorm = small;
+ } else if (*imat == 6 || *imat == 12) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TR") || lsamen_(&c__2, c2, "TP")) {
+
+/* xTR, xTP: Set parameters to generate a triangular matrix
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the lower and upper bandwidths. */
+
+ mat = abs(*imat);
+ if (mat == 1 || mat == 7) {
+ *kl = 0;
+ *ku = 0;
+ } else if (*imat < 0) {
+/* Computing MAX */
+ i__1 = *n - 1;
+ *kl = max(i__1,0);
+ *ku = 0;
+ } else {
+ *kl = 0;
+/* Computing MAX */
+ i__1 = *n - 1;
+ *ku = max(i__1,0);
+ }
+
+/* Set the condition number and norm. */
+
+ if (mat == 3 || mat == 9) {
+ *cndnum = badc1;
+ } else if (mat == 4 || mat == 10) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (mat == 5) {
+ *anorm = small;
+ } else if (mat == 6) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+
+ } else if (lsamen_(&c__2, c2, "TB")) {
+
+/* xTB: Set parameters to generate a triangular band matrix.
+
+
+ Set TYPE, the type of matrix to be generated. */
+
+ *(unsigned char *)type = 'N';
+
+/* Set the norm and condition number. */
+
+ if (*imat == 2 || *imat == 8) {
+ *cndnum = badc1;
+ } else if (*imat == 3 || *imat == 9) {
+ *cndnum = badc2;
+ } else {
+ *cndnum = 2.;
+ }
+
+ if (*imat == 4) {
+ *anorm = small;
+ } else if (*imat == 5) {
+ *anorm = large;
+ } else {
+ *anorm = 1.;
+ }
+ }
+ if (*n <= 1) {
+ *cndnum = 1.;
+ }
+
+ return 0;
+
+/* End of ZLATB4 */
+
+} /* zlatb4_ */
+
diff --git a/TESTING/MATGEN/zlatm2.c b/TESTING/MATGEN/zlatm2.c
new file mode 100644
index 0000000..e4d2d42
--- /dev/null
+++ b/TESTING/MATGEN/zlatm2.c
@@ -0,0 +1,286 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Double Complex */ VOID zlatm2_(doublecomplex * ret_val, integer *m,
+ integer *n, integer *i, integer *j, integer *kl, integer *ku, integer
+ *idist, integer *iseed, doublecomplex *d, integer *igrade,
+ doublecomplex *dl, doublecomplex *dr, integer *ipvtng, integer *iwork,
+ doublereal *sparse)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *), d_cnjg(
+ doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer isub, jsub;
+ static doublecomplex ctemp;
+ extern doublereal dlaran_(integer *);
+ extern /* Double Complex */ VOID zlarnd_(doublecomplex *, integer *,
+ integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ ZLATM2 returns the (I,J) entry of a random matrix of dimension
+ (M, N) described by the other paramters. It is called by the
+ ZLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by ZLATMR which has already checked the parameters.
+
+ Use of ZLATM2 differs from CLATM3 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With ZLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With ZLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, ZLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. ZLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+
+ The matrix whose (I,J) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If I is outside (1..M) or J is outside (1..N), return zero
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of entry to be returned. Not modified.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => real and imaginary parts each UNIFORM( 0, 1 )
+ 2 => real and imaginary parts each UNIFORM( -1, 1 )
+ 3 => real and imaginary parts each NORMAL( 0, 1 )
+ 4 => complex number uniform in DISK( 0 , 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - COMPLEX*16 array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( CONJG(DL) )
+ 6 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - COMPLEX*16 array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - COMPLEX*16 array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) in position K was originally in
+ position IWORK( K ).
+ This differs from IWORK for ZLATM3. Not modified.
+
+ SPARSE - DOUBLE PRECISION between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ ret_val->r = 0., ret_val->i = 0.;
+ return ;
+ }
+
+/* Check for banding */
+
+ if (*j > *i + *ku || *j < *i - *kl) {
+ ret_val->r = 0., ret_val->i = 0.;
+ return ;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.) {
+ if (dlaran_(&iseed[1]) < *sparse) {
+ ret_val->r = 0., ret_val->i = 0.;
+ return ;
+ }
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ isub = *i;
+ jsub = *j;
+ } else if (*ipvtng == 1) {
+ isub = iwork[*i];
+ jsub = *j;
+ } else if (*ipvtng == 2) {
+ isub = *i;
+ jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ isub = iwork[*i];
+ jsub = iwork[*j];
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (isub == jsub) {
+ i__1 = isub;
+ ctemp.r = d[i__1].r, ctemp.i = d[i__1].i;
+ } else {
+ zlarnd_(&z__1, idist, &iseed[1]);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ }
+ if (*igrade == 1) {
+ i__1 = isub;
+ z__1.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__1.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 2) {
+ i__1 = jsub;
+ z__1.r = ctemp.r * dr[i__1].r - ctemp.i * dr[i__1].i, z__1.i =
+ ctemp.r * dr[i__1].i + ctemp.i * dr[i__1].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 3) {
+ i__1 = isub;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = jsub;
+ z__1.r = z__2.r * dr[i__2].r - z__2.i * dr[i__2].i, z__1.i = z__2.r *
+ dr[i__2].i + z__2.i * dr[i__2].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 4 && isub != jsub) {
+ i__1 = isub;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ z_div(&z__1, &z__2, &dl[jsub]);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 5) {
+ i__1 = isub;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ d_cnjg(&z__3, &dl[jsub]);
+ z__1.r = z__2.r * z__3.r - z__2.i * z__3.i, z__1.i = z__2.r * z__3.i
+ + z__2.i * z__3.r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 6) {
+ i__1 = isub;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = jsub;
+ z__1.r = z__2.r * dl[i__2].r - z__2.i * dl[i__2].i, z__1.i = z__2.r *
+ dl[i__2].i + z__2.i * dl[i__2].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+
+/* End of ZLATM2 */
+
+} /* zlatm2_ */
+
diff --git a/TESTING/MATGEN/zlatm3.c b/TESTING/MATGEN/zlatm3.c
new file mode 100644
index 0000000..5ed30b7
--- /dev/null
+++ b/TESTING/MATGEN/zlatm3.c
@@ -0,0 +1,297 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Double Complex */ VOID zlatm3_(doublecomplex * ret_val, integer *m,
+ integer *n, integer *i, integer *j, integer *isub, integer *jsub,
+ integer *kl, integer *ku, integer *idist, integer *iseed,
+ doublecomplex *d, integer *igrade, doublecomplex *dl, doublecomplex *
+ dr, integer *ipvtng, integer *iwork, doublereal *sparse)
+{
+ /* System generated locals */
+ integer i__1, i__2;
+ doublecomplex z__1, z__2, z__3;
+
+ /* Builtin functions */
+ void z_div(doublecomplex *, doublecomplex *, doublecomplex *), d_cnjg(
+ doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static doublecomplex ctemp;
+ extern doublereal dlaran_(integer *);
+ extern /* Double Complex */ VOID zlarnd_(doublecomplex *, integer *,
+ integer *);
+
+
+/* -- LAPACK auxiliary test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+
+
+
+ Purpose
+ =======
+
+ ZLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+ dimension (M, N) described by the other paramters. (ISUB,JSUB)
+ is the final position of the (I,J) entry after pivoting
+ according to IPVTNG and IWORK. ZLATM3 is called by the
+ ZLATMR routine in order to build random test matrices. No error
+ checking on parameters is done, because this routine is called in
+
+ a tight loop by ZLATMR which has already checked the parameters.
+
+ Use of ZLATM3 differs from CLATM2 in the order in which the random
+
+ number generator is called to fill in random matrix entries.
+ With ZLATM2, the generator is called to fill in the pivoted matrix
+
+ columnwise. With ZLATM3, the generator is called to fill in the
+ matrix columnwise, after which it is pivoted. Thus, ZLATM3 can
+ be used to construct random matrices which differ only in their
+ order of rows and/or columns. ZLATM2 is used to construct band
+ matrices while avoiding calling the random number generator for
+ entries outside the band (and therefore generating random numbers
+
+ in different orders for different pivot orders).
+
+ The matrix whose (ISUB,JSUB) entry is returned is constructed as
+ follows (this routine only computes one entry):
+
+ If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+
+ (this is convenient for generating matrices in band format).
+
+
+ Generate a matrix A with random entries of distribution IDIST.
+
+ Set the diagonal to D.
+
+ Grade the matrix, if desired, from the left (by DL) and/or
+ from the right (by DR or DL) as specified by IGRADE.
+
+ Permute, if desired, the rows and/or columns as specified by
+ IPVTNG and IWORK.
+
+ Band the matrix to have lower bandwidth KL and upper
+ bandwidth KU.
+
+ Set random entries to zero as specified by SPARSE.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of matrix. Not modified.
+
+ N - INTEGER
+ Number of columns of matrix. Not modified.
+
+ I - INTEGER
+ Row of unpivoted entry to be returned. Not modified.
+
+ J - INTEGER
+ Column of unpivoted entry to be returned. Not modified.
+
+ ISUB - INTEGER
+ Row of pivoted entry to be returned. Changed on exit.
+
+ JSUB - INTEGER
+ Column of pivoted entry to be returned. Changed on exit.
+
+ KL - INTEGER
+ Lower bandwidth. Not modified.
+
+ KU - INTEGER
+ Upper bandwidth. Not modified.
+
+ IDIST - INTEGER
+ On entry, IDIST specifies the type of distribution to be
+ used to generate a random matrix .
+ 1 => real and imaginary parts each UNIFORM( 0, 1 )
+ 2 => real and imaginary parts each UNIFORM( -1, 1 )
+ 3 => real and imaginary parts each NORMAL( 0, 1 )
+ 4 => complex number uniform in DISK( 0 , 1 )
+ Not modified.
+
+ ISEED - INTEGER array of dimension ( 4 )
+ Seed for random number generator.
+ Changed on exit.
+
+ D - COMPLEX*16 array of dimension ( MIN( I , J ) )
+ Diagonal entries of matrix. Not modified.
+
+ IGRADE - INTEGER
+ Specifies grading of matrix as follows:
+ 0 => no grading
+ 1 => matrix premultiplied by diag( DL )
+ 2 => matrix postmultiplied by diag( DR )
+ 3 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ 4 => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ 5 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( CONJG(DL) )
+ 6 => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ Not modified.
+
+ DL - COMPLEX*16 array ( I or J, as appropriate )
+ Left scale factors for grading matrix. Not modified.
+
+ DR - COMPLEX*16 array ( I or J, as appropriate )
+ Right scale factors for grading matrix. Not modified.
+
+ IPVTNG - INTEGER
+ On entry specifies pivoting permutations as follows:
+ 0 => none.
+ 1 => row pivoting.
+ 2 => column pivoting.
+ 3 => full pivoting, i.e., on both sides.
+ Not modified.
+
+ IWORK - INTEGER array ( I or J, as appropriate )
+ This array specifies the permutation used. The
+ row (or column) originally in position K is in
+ position IWORK( K ) after pivoting.
+ This differs from IWORK for ZLATM2. Not modified.
+
+ SPARSE - DOUBLE PRECISION between 0. and 1.
+ On entry specifies the sparsity of the matrix
+ if sparse matix is to be generated.
+ SPARSE should lie between 0 and 1.
+ A uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ =====================================================================
+
+
+
+
+
+
+
+
+
+
+ -----------------------------------------------------------------------
+
+
+
+
+ Check for I and J in range
+
+ Parameter adjustments */
+ --iwork;
+ --dr;
+ --dl;
+ --d;
+ --iseed;
+
+ /* Function Body */
+ if (*i < 1 || *i > *m || *j < 1 || *j > *n) {
+ *isub = *i;
+ *jsub = *j;
+ ret_val->r = 0., ret_val->i = 0.;
+ return ;
+ }
+
+/* Compute subscripts depending on IPVTNG */
+
+ if (*ipvtng == 0) {
+ *isub = *i;
+ *jsub = *j;
+ } else if (*ipvtng == 1) {
+ *isub = iwork[*i];
+ *jsub = *j;
+ } else if (*ipvtng == 2) {
+ *isub = *i;
+ *jsub = iwork[*j];
+ } else if (*ipvtng == 3) {
+ *isub = iwork[*i];
+ *jsub = iwork[*j];
+ }
+
+/* Check for banding */
+
+ if (*jsub > *isub + *ku || *jsub < *isub - *kl) {
+ ret_val->r = 0., ret_val->i = 0.;
+ return ;
+ }
+
+/* Check for sparsity */
+
+ if (*sparse > 0.) {
+ if (dlaran_(&iseed[1]) < *sparse) {
+ ret_val->r = 0., ret_val->i = 0.;
+ return ;
+ }
+ }
+
+/* Compute entry and grade it according to IGRADE */
+
+ if (*i == *j) {
+ i__1 = *i;
+ ctemp.r = d[i__1].r, ctemp.i = d[i__1].i;
+ } else {
+ zlarnd_(&z__1, idist, &iseed[1]);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ }
+ if (*igrade == 1) {
+ i__1 = *i;
+ z__1.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__1.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 2) {
+ i__1 = *j;
+ z__1.r = ctemp.r * dr[i__1].r - ctemp.i * dr[i__1].i, z__1.i =
+ ctemp.r * dr[i__1].i + ctemp.i * dr[i__1].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 3) {
+ i__1 = *i;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = *j;
+ z__1.r = z__2.r * dr[i__2].r - z__2.i * dr[i__2].i, z__1.i = z__2.r *
+ dr[i__2].i + z__2.i * dr[i__2].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 4 && *i != *j) {
+ i__1 = *i;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ z_div(&z__1, &z__2, &dl[*j]);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 5) {
+ i__1 = *i;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ d_cnjg(&z__3, &dl[*j]);
+ z__1.r = z__2.r * z__3.r - z__2.i * z__3.i, z__1.i = z__2.r * z__3.i
+ + z__2.i * z__3.r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ } else if (*igrade == 6) {
+ i__1 = *i;
+ z__2.r = ctemp.r * dl[i__1].r - ctemp.i * dl[i__1].i, z__2.i =
+ ctemp.r * dl[i__1].i + ctemp.i * dl[i__1].r;
+ i__2 = *j;
+ z__1.r = z__2.r * dl[i__2].r - z__2.i * dl[i__2].i, z__1.i = z__2.r *
+ dl[i__2].i + z__2.i * dl[i__2].r;
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ }
+ ret_val->r = ctemp.r, ret_val->i = ctemp.i;
+ return ;
+
+/* End of ZLATM3 */
+
+} /* zlatm3_ */
+
diff --git a/TESTING/MATGEN/zlatme.c b/TESTING/MATGEN/zlatme.c
new file mode 100644
index 0000000..5cab7ce
--- /dev/null
+++ b/TESTING/MATGEN/zlatme.c
@@ -0,0 +1,627 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static doublecomplex c_b2 = {1.,0.};
+static integer c__1 = 1;
+static integer c__0 = 0;
+static integer c__5 = 5;
+
+/* Subroutine */ int zlatme_(integer *n, char *dist, integer *iseed,
+ doublecomplex *d, integer *mode, doublereal *cond, doublecomplex *
+ dmax__, char *ei, char *rsign, char *upper, char *sim, doublereal *ds,
+ integer *modes, doublereal *conds, integer *kl, integer *ku,
+ doublereal *anorm, doublecomplex *a, integer *lda, doublecomplex *
+ work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2;
+ doublereal d__1, d__2;
+ doublecomplex z__1, z__2;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static logical bads;
+ static integer isim;
+ static doublereal temp;
+ static integer i, j;
+ static doublecomplex alpha;
+ extern logical lsame_(char *, char *);
+ static integer iinfo;
+ static doublereal tempa[1];
+ static integer icols;
+ extern /* Subroutine */ int zgerc_(integer *, integer *, doublecomplex *,
+ doublecomplex *, integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *);
+ static integer idist;
+ extern /* Subroutine */ int zscal_(integer *, doublecomplex *,
+ doublecomplex *, integer *), zgemv_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, integer *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *, integer *);
+ static integer irows;
+ extern /* Subroutine */ int zcopy_(integer *, doublecomplex *, integer *,
+ doublecomplex *, integer *), dlatm1_(integer *, doublereal *,
+ integer *, integer *, integer *, doublereal *, integer *, integer
+ *), zlatm1_(integer *, doublereal *, integer *, integer *,
+ integer *, doublecomplex *, integer *, integer *);
+ static integer ic, jc, ir;
+ static doublereal ralpha;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ extern doublereal zlange_(char *, integer *, integer *, doublecomplex *,
+ integer *, doublereal *);
+ extern /* Subroutine */ int zdscal_(integer *, doublereal *,
+ doublecomplex *, integer *), zlarge_(integer *, doublecomplex *,
+ integer *, integer *, doublecomplex *, integer *), zlarfg_(
+ integer *, doublecomplex *, doublecomplex *, integer *,
+ doublecomplex *), zlacgv_(integer *, doublecomplex *, integer *);
+ extern /* Double Complex */ void zlarnd_(doublecomplex *, integer *,
+ integer *);
+ static integer irsign;
+ extern /* Subroutine */ int zlaset_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, doublecomplex *, integer *);
+ static integer iupper;
+ extern /* Subroutine */ int zlarnv_(integer *, integer *, integer *,
+ doublecomplex *);
+ static doublecomplex xnorms;
+ static integer jcr;
+ static doublecomplex tau;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLATME generates random non-symmetric square matrices with
+ specified eigenvalues for testing LAPACK programs.
+
+ ZLATME operates by applying the following sequence of
+ operations:
+
+ 1. Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and RSIGN
+ as described below.
+
+ 2. If UPPER='T', the upper triangle of A is set to random values
+ out of distribution DIST.
+
+ 3. If SIM='T', A is multiplied on the left by a random matrix
+ X, whose singular values are specified by DS, MODES, and
+ CONDS, and on the right by X inverse.
+
+ 4. If KL < N-1, the lower bandwidth is reduced to KL using
+ Householder transformations. If KU < N-1, the upper
+ bandwidth is reduced to KU.
+
+ 5. If ANORM is not negative, the matrix is scaled to have
+ maximum-element-norm ANORM.
+
+ (Note: since the matrix cannot be reduced beyond Hessenberg form,
+
+ no packing options are available.)
+
+ Arguments
+ =========
+
+ N - INTEGER
+ The number of columns (or rows) of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values, and on the
+ upper triangle (see UPPER).
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ 'D' => uniform on the complex disc |z| < 1.
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to ZLATME
+ to continue the same random number sequence.
+ Changed on exit.
+
+ D - COMPLEX*16 array, dimension ( N )
+ This array is used to specify the eigenvalues of A. If
+ MODE=0, then D is assumed to contain the eigenvalues
+ otherwise they will be computed according to MODE, COND,
+ DMAX, and RSIGN and placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the eigenvalues are to
+ be specified:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is between 1 and 4, D has entries ranging
+ from 1 to 1/COND, if between -1 and -4, D has entries
+ ranging from 1/COND to 1,
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - COMPLEX*16
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))). Note that DMAX need not be
+ positive or real: if DMAX is negative or complex (or zero),
+
+ D will be scaled by a negative or complex number (or zero).
+
+ If RSIGN='F' then the largest (absolute) eigenvalue will be
+
+ equal to DMAX.
+ Not modified.
+
+ EI - CHARACTER*1 (ignored)
+ Not modified.
+
+ RSIGN - CHARACTER*1
+ If MODE is not 0, 6, or -6, and RSIGN='T', then the
+ elements of D, as computed according to MODE and COND, will
+
+ be multiplied by a random complex number from the unit
+ circle |z| = 1. If RSIGN='F', they will not be. RSIGN may
+
+ only have the values 'T' or 'F'.
+ Not modified.
+
+ UPPER - CHARACTER*1
+ If UPPER='T', then the elements of A above the diagonal
+ will be set to random numbers out of DIST. If UPPER='F',
+ they will not. UPPER may only have the values 'T' or 'F'.
+ Not modified.
+
+ SIM - CHARACTER*1
+ If SIM='T', then A will be operated on by a "similarity
+ transform", i.e., multiplied on the left by a matrix X and
+ on the right by X inverse. X = U S V, where U and V are
+ random unitary matrices and S is a (diagonal) matrix of
+ singular values specified by DS, MODES, and CONDS. If
+ SIM='F', then A will not be transformed.
+ Not modified.
+
+ DS - DOUBLE PRECISION array, dimension ( N )
+ This array is used to specify the singular values of X,
+ in the same way that D specifies the eigenvalues of A.
+ If MODE=0, the DS contains the singular values, which
+ may not be zero.
+ Modified if MODE is nonzero.
+
+ MODES - INTEGER
+ CONDS - DOUBLE PRECISION
+ Similar to MODE and COND, but for specifying the diagonal
+ of S. MODES=-6 and +6 are not allowed (since they would
+ result in randomly ill-conditioned eigenvalues.)
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. KL=1
+ specifies upper Hessenberg form. If KL is at least N-1,
+ then A will have full lower bandwidth.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. KU=1
+ specifies lower Hessenberg form. If KU is at least N-1,
+ then A will have full upper bandwidth; if KU and KL
+ are both at least N-1, then A will be dense. Only one of
+ KU and KL may be less than N-1.
+ Not modified.
+
+ ANORM - DOUBLE PRECISION
+ If ANORM is not negative, then A will be scaled by a non-
+ negative real number to make the maximum-element-norm of A
+ to be ANORM.
+ Not modified.
+
+ A - COMPLEX*16 array, dimension ( LDA, N )
+ On exit A is the desired test matrix.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. LDA must be at least M.
+ Not modified.
+
+ WORK - COMPLEX*16 array, dimension ( 3*N )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => N negative
+ -2 => DIST illegal string
+ -5 => MODE not in range -6 to 6
+ -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -9 => RSIGN is not 'T' or 'F'
+ -10 => UPPER is not 'T' or 'F'
+ -11 => SIM is not 'T' or 'F'
+ -12 => MODES=0 and DS has a zero singular value.
+ -13 => MODES is not in the range -5 to 5.
+ -14 => MODES is nonzero and CONDS is less than 1.
+ -15 => KL is less than 1.
+ -16 => KU is less than 1, or KL and KU are both less than
+ N-1.
+ -19 => LDA is less than M.
+ 1 => Error return from ZLATM1 (computing D)
+ 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+ 3 => Error return from DLATM1 (computing DS)
+ 4 => Error return from ZLARGE
+ 5 => Zero singular value from DLATM1.
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --ds;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else if (lsame_(dist, "D")) {
+ idist = 4;
+ } else {
+ idist = -1;
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode UPPER */
+
+ if (lsame_(upper, "T")) {
+ iupper = 1;
+ } else if (lsame_(upper, "F")) {
+ iupper = 0;
+ } else {
+ iupper = -1;
+ }
+
+/* Decode SIM */
+
+ if (lsame_(sim, "T")) {
+ isim = 1;
+ } else if (lsame_(sim, "F")) {
+ isim = 0;
+ } else {
+ isim = -1;
+ }
+
+/* Check DS, if MODES=0 and ISIM=1 */
+
+ bads = FALSE_;
+ if (*modes == 0 && isim == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ if (ds[j] == 0.) {
+ bads = TRUE_;
+ }
+/* L10: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*n < 0) {
+ *info = -1;
+ } else if (idist == -1) {
+ *info = -2;
+ } else if (abs(*mode) > 6) {
+ *info = -5;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.) {
+ *info = -6;
+ } else if (irsign == -1) {
+ *info = -9;
+ } else if (iupper == -1) {
+ *info = -10;
+ } else if (isim == -1) {
+ *info = -11;
+ } else if (bads) {
+ *info = -12;
+ } else if (isim == 1 && abs(*modes) > 5) {
+ *info = -13;
+ } else if (isim == 1 && *modes != 0 && *conds < 1.) {
+ *info = -14;
+ } else if (*kl < 1) {
+ *info = -15;
+ } else if (*ku < 1 || *ku < *n - 1 && *kl < *n - 1) {
+ *info = -16;
+ } else if (*lda < max(1,*n)) {
+ *info = -19;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("ZLATME", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L20: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up diagonal of A
+
+ Compute D according to COND and MODE */
+
+ zlatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = z_abs(&d[1]);
+ i__1 = *n;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ d__1 = temp, d__2 = z_abs(&d[i]);
+ temp = max(d__1,d__2);
+/* L30: */
+ }
+
+ if (temp > 0.) {
+ z__1.r = dmax__->r / temp, z__1.i = dmax__->i / temp;
+ alpha.r = z__1.r, alpha.i = z__1.i;
+ } else {
+ *info = 2;
+ return 0;
+ }
+
+ zscal_(n, &alpha, &d[1], &c__1);
+
+ }
+
+ zlaset_("Full", n, n, &c_b1, &c_b1, &a[a_offset], lda);
+ i__1 = *lda + 1;
+ zcopy_(n, &d[1], &c__1, &a[a_offset], &i__1);
+
+/* 3) If UPPER='T', set upper triangle of A to random numbers. */
+
+ if (iupper != 0) {
+ i__1 = *n;
+ for (jc = 2; jc <= i__1; ++jc) {
+ i__2 = jc - 1;
+ zlarnv_(&idist, &iseed[1], &i__2, &a[jc * a_dim1 + 1]);
+/* L40: */
+ }
+ }
+
+/* 4) If SIM='T', apply similarity transformation.
+
+ -1
+ Transform is X A X , where X = U S V, thus
+
+ it is U S V A V' (1/S) U' */
+
+ if (isim != 0) {
+
+/* Compute S (singular values of the eigenvector matrix)
+ according to CONDS and MODES */
+
+ dlatm1_(modes, conds, &c__0, &c__0, &iseed[1], &ds[1], n, &iinfo);
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+
+/* Multiply by V and V' */
+
+ zlarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+
+/* Multiply by S and (1/S) */
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ zdscal_(n, &ds[j], &a[j + a_dim1], lda);
+ if (ds[j] != 0.) {
+ d__1 = 1. / ds[j];
+ zdscal_(n, &d__1, &a[j * a_dim1 + 1], &c__1);
+ } else {
+ *info = 5;
+ return 0;
+ }
+/* L50: */
+ }
+
+/* Multiply by U and U' */
+
+ zlarge_(n, &a[a_offset], lda, &iseed[1], &work[1], &iinfo);
+ if (iinfo != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 5) Reduce the bandwidth. */
+
+ if (*kl < *n - 1) {
+
+/* Reduce bandwidth -- kill column */
+
+ i__1 = *n - 1;
+ for (jcr = *kl + 1; jcr <= i__1; ++jcr) {
+ ic = jcr - *kl;
+ irows = *n + 1 - jcr;
+ icols = *n + *kl - jcr;
+
+ zcopy_(&irows, &a[jcr + ic * a_dim1], &c__1, &work[1], &c__1);
+ xnorms.r = work[1].r, xnorms.i = work[1].i;
+ zlarfg_(&irows, &xnorms, &work[2], &c__1, &tau);
+ d_cnjg(&z__1, &tau);
+ tau.r = z__1.r, tau.i = z__1.i;
+ work[1].r = 1., work[1].i = 0.;
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ alpha.r = z__1.r, alpha.i = z__1.i;
+
+ zgemv_("C", &irows, &icols, &c_b2, &a[jcr + (ic + 1) * a_dim1],
+ lda, &work[1], &c__1, &c_b1, &work[irows + 1], &c__1);
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&irows, &icols, &z__1, &work[1], &c__1, &work[irows + 1], &
+ c__1, &a[jcr + (ic + 1) * a_dim1], lda);
+
+ zgemv_("N", n, &irows, &c_b2, &a[jcr * a_dim1 + 1], lda, &work[1],
+ &c__1, &c_b1, &work[irows + 1], &c__1);
+ d_cnjg(&z__2, &tau);
+ z__1.r = -z__2.r, z__1.i = -z__2.i;
+ zgerc_(n, &irows, &z__1, &work[irows + 1], &c__1, &work[1], &c__1,
+ &a[jcr * a_dim1 + 1], lda);
+
+ i__2 = jcr + ic * a_dim1;
+ a[i__2].r = xnorms.r, a[i__2].i = xnorms.i;
+ i__2 = irows - 1;
+ zlaset_("Full", &i__2, &c__1, &c_b1, &c_b1, &a[jcr + 1 + ic *
+ a_dim1], lda);
+
+ i__2 = icols + 1;
+ zscal_(&i__2, &alpha, &a[jcr + ic * a_dim1], lda);
+ d_cnjg(&z__1, &alpha);
+ zscal_(n, &z__1, &a[jcr * a_dim1 + 1], &c__1);
+/* L60: */
+ }
+ } else if (*ku < *n - 1) {
+
+/* Reduce upper bandwidth -- kill a row at a time. */
+
+ i__1 = *n - 1;
+ for (jcr = *ku + 1; jcr <= i__1; ++jcr) {
+ ir = jcr - *ku;
+ irows = *n + *ku - jcr;
+ icols = *n + 1 - jcr;
+
+ zcopy_(&icols, &a[ir + jcr * a_dim1], lda, &work[1], &c__1);
+ xnorms.r = work[1].r, xnorms.i = work[1].i;
+ zlarfg_(&icols, &xnorms, &work[2], &c__1, &tau);
+ d_cnjg(&z__1, &tau);
+ tau.r = z__1.r, tau.i = z__1.i;
+ work[1].r = 1., work[1].i = 0.;
+ i__2 = icols - 1;
+ zlacgv_(&i__2, &work[2], &c__1);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ alpha.r = z__1.r, alpha.i = z__1.i;
+
+ zgemv_("N", &irows, &icols, &c_b2, &a[ir + 1 + jcr * a_dim1], lda,
+ &work[1], &c__1, &c_b1, &work[icols + 1], &c__1);
+ z__1.r = -tau.r, z__1.i = -tau.i;
+ zgerc_(&irows, &icols, &z__1, &work[icols + 1], &c__1, &work[1], &
+ c__1, &a[ir + 1 + jcr * a_dim1], lda);
+
+ zgemv_("C", &icols, n, &c_b2, &a[jcr + a_dim1], lda, &work[1], &
+ c__1, &c_b1, &work[icols + 1], &c__1);
+ d_cnjg(&z__2, &tau);
+ z__1.r = -z__2.r, z__1.i = -z__2.i;
+ zgerc_(&icols, n, &z__1, &work[1], &c__1, &work[icols + 1], &c__1,
+ &a[jcr + a_dim1], lda);
+
+ i__2 = ir + jcr * a_dim1;
+ a[i__2].r = xnorms.r, a[i__2].i = xnorms.i;
+ i__2 = icols - 1;
+ zlaset_("Full", &c__1, &i__2, &c_b1, &c_b1, &a[ir + (jcr + 1) *
+ a_dim1], lda);
+
+ i__2 = irows + 1;
+ zscal_(&i__2, &alpha, &a[ir + jcr * a_dim1], &c__1);
+ d_cnjg(&z__1, &alpha);
+ zscal_(n, &z__1, &a[jcr + a_dim1], lda);
+/* L70: */
+ }
+ }
+
+/* Scale the matrix to have norm ANORM */
+
+ if (*anorm >= 0.) {
+ temp = zlange_("M", n, n, &a[a_offset], lda, tempa);
+ if (temp > 0.) {
+ ralpha = *anorm / temp;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ zdscal_(n, &ralpha, &a[j * a_dim1 + 1], &c__1);
+/* L80: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZLATME */
+
+} /* zlatme_ */
+
diff --git a/TESTING/MATGEN/zlatmr.c b/TESTING/MATGEN/zlatmr.c
new file mode 100644
index 0000000..88a0be1
--- /dev/null
+++ b/TESTING/MATGEN/zlatmr.c
@@ -0,0 +1,1510 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static integer c__0 = 0;
+static integer c__1 = 1;
+
+/* Subroutine */ int zlatmr_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, doublecomplex *d, integer *mode, doublereal *cond,
+ doublecomplex *dmax__, char *rsign, char *grade, doublecomplex *dl,
+ integer *model, doublereal *condl, doublecomplex *dr, integer *moder,
+ doublereal *condr, char *pivtng, integer *ipivot, integer *kl,
+ integer *ku, doublereal *sparse, doublereal *anorm, char *pack,
+ doublecomplex *a, integer *lda, integer *iwork, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+ doublereal d__1, d__2;
+ doublecomplex z__1, z__2;
+
+ /* Builtin functions */
+ double z_abs(doublecomplex *);
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer isub, jsub;
+ static doublereal temp;
+ static integer isym, i, j, k, ipack;
+ extern logical lsame_(char *, char *);
+ static doublereal tempa[1];
+ static doublecomplex ctemp;
+ static integer iisub, idist, jjsub, mnmin;
+ static logical dzero;
+ static integer mnsub;
+ static doublereal onorm;
+ static integer mxsub, npvts;
+ extern /* Subroutine */ int zlatm1_(integer *, doublereal *, integer *,
+ integer *, integer *, doublecomplex *, integer *, integer *);
+ extern /* Double Complex */ VOID zlatm2_(doublecomplex *, integer *,
+ integer *, integer *, integer *, integer *, integer *, integer *,
+ integer *, doublecomplex *, integer *, doublecomplex *,
+ doublecomplex *, integer *, integer *, doublereal *), zlatm3_(
+ doublecomplex *, integer *, integer *, integer *, integer *,
+ integer *, integer *, integer *, integer *, integer *, integer *,
+ doublecomplex *, integer *, doublecomplex *, doublecomplex *,
+ integer *, integer *, doublereal *);
+ static doublecomplex calpha;
+ static integer igrade;
+ static logical fulbnd;
+ extern doublereal zlangb_(char *, integer *, integer *, integer *,
+ doublecomplex *, integer *, doublereal *);
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+ static logical badpvt;
+ extern doublereal zlange_(char *, integer *, integer *, doublecomplex *,
+ integer *, doublereal *);
+ extern /* Subroutine */ int zdscal_(integer *, doublereal *,
+ doublecomplex *, integer *);
+ extern doublereal zlansb_(char *, char *, integer *, integer *,
+ doublecomplex *, integer *, doublereal *);
+ static integer irsign, ipvtng;
+ extern doublereal zlansp_(char *, char *, integer *, doublecomplex *,
+ doublereal *), zlansy_(char *, char *, integer *,
+ doublecomplex *, integer *, doublereal *);
+ static integer kll, kuu;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ February 29, 1992
+
+
+ Purpose
+ =======
+
+ ZLATMR generates random matrices of various types for testing
+ LAPACK programs.
+
+ ZLATMR operates by applying the following sequence of
+ operations:
+
+ Generate a matrix A with random entries of distribution DIST
+ which is symmetric if SYM='S', Hermitian if SYM='H', and
+ nonsymmetric if SYM='N'.
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX and RSIGN
+ as described below.
+
+ Grade the matrix, if desired, from the left and/or right
+ as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+ MODER and CONDR also determine the grading as described
+ below.
+
+ Permute, if desired, the rows and/or columns as specified by
+ PIVTNG and IPIVOT.
+
+ Set random entries to zero, if desired, to get a random sparse
+ matrix as specified by SPARSE.
+
+ Make A a band matrix, if desired, by zeroing out the matrix
+ outside a band of lower bandwidth KL and upper bandwidth KU.
+
+
+ Scale A, if desired, to have maximum entry ANORM.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if symmetric or Hermitian)
+ zero out lower half (if symmetric or Hermitian)
+ store the upper half columnwise (if symmetric or Hermitian
+ or square upper triangular)
+ store the lower half columnwise (if symmetric or Hermitian
+ or square lower triangular)
+ same as upper half rowwise if symmetric
+ same as conjugate upper half rowwise if Hermitian
+ store the lower triangle in banded format
+ (if symmetric or Hermitian)
+ store the upper triangle in banded format
+ (if symmetric or Hermitian)
+ store the entire matrix in banded format
+
+ Note: If two calls to ZLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+
+ If two calls to ZLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be and
+ is not maintained with less than full bandwidth.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ Number of rows of A. Not modified.
+
+ N - INTEGER
+ Number of columns of A. Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate a random matrix .
+ 'U' => real and imaginary parts are independent
+ UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => real and imaginary parts are independent
+ UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => real and imaginary parts are independent
+ NORMAL( 0, 1 ) ( 'N' for normal )
+ 'D' => uniform on interior of unit disk ( 'D' for disk )
+ Not modified.
+
+ ISEED - INTEGER array, dimension (4)
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to ZLATMR
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='S', generated matrix is symmetric.
+ If SYM='H', generated matrix is Hermitian.
+ If SYM='N', generated matrix is nonsymmetric.
+ Not modified.
+
+ D - COMPLEX*16 array, dimension (min(M,N))
+ On entry this array specifies the diagonal entries
+ of the diagonal of A. D may either be specified
+ on entry, or set according to MODE and COND as described
+ below. If the matrix is Hermitian, the real part of D
+ will be taken. May be changed on exit if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry describes how D is to be used:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - COMPLEX*16
+ If MODE neither -6, 0 nor 6, the diagonal is scaled by
+ DMAX / max(abs(D(i))), so that maximum absolute entry
+ of diagonal is abs(DMAX). If DMAX is complex (or zero),
+ diagonal will be scaled by a complex number (or zero).
+
+ RSIGN - CHARACTER*1
+ If MODE neither -6, 0 nor 6, specifies sign of diagonal
+ as follows:
+ 'T' => diagonal entries are multiplied by a random complex
+ number uniformly distributed with absolute value 1
+ 'F' => diagonal unchanged
+ Not modified.
+
+ GRADE - CHARACTER*1
+ Specifies grading of matrix as follows:
+ 'N' => no grading
+ 'L' => matrix premultiplied by diag( DL )
+ (only if matrix nonsymmetric)
+ 'R' => matrix postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'B' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DR )
+ (only if matrix nonsymmetric)
+ 'H' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( CONJG(DL) )
+ (only if matrix Hermitian or nonsymmetric)
+ 'S' => matrix premultiplied by diag( DL ) and
+ postmultiplied by diag( DL )
+ (only if matrix symmetric or nonsymmetric)
+ 'E' => matrix premultiplied by diag( DL ) and
+ postmultiplied by inv( diag( DL ) )
+ ( 'S' for similarity )
+ (only if matrix nonsymmetric)
+ Note: if GRADE='S', then M must equal N.
+ Not modified.
+
+ DL - COMPLEX*16 array, dimension (M)
+ If MODEL=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODEL is not zero, then DL will be set according
+ to MODEL and CONDL, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DL).
+
+ If GRADE='E', then DL cannot have zero entries.
+ Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+
+ MODEL - INTEGER
+ This specifies how the diagonal array DL is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDL - DOUBLE PRECISION
+ When MODEL is not zero, this specifies the condition number
+
+ of the computed DL. Not modified.
+
+ DR - COMPLEX*16 array, dimension (N)
+ If MODER=0, then on entry this array specifies the diagonal
+
+ entries of a diagonal matrix used as described under GRADE
+ above. If MODER is not zero, then DR will be set according
+ to MODER and CONDR, analogous to the way D is set according
+
+ to MODE and COND (except there is no DMAX parameter for DR).
+
+ Not referenced if GRADE = 'N', 'L', 'H' or 'S'.
+ Changed on exit.
+
+ MODER - INTEGER
+ This specifies how the diagonal array DR is to be computed,
+
+ just as MODE specifies how D is to be computed.
+ Not modified.
+
+ CONDR - DOUBLE PRECISION
+ When MODER is not zero, this specifies the condition number
+
+ of the computed DR. Not modified.
+
+ PIVTNG - CHARACTER*1
+ On entry specifies pivoting permutations as follows:
+ 'N' or ' ' => none.
+ 'L' => left or row pivoting (matrix must be nonsymmetric).
+ 'R' => right or column pivoting (matrix must be
+ nonsymmetric).
+ 'B' or 'F' => both or full pivoting, i.e., on both sides.
+ In this case, M must equal N
+
+ If two calls to ZLATMR both have full bandwidth (KL = M-1
+ and KU = N-1), and differ only in the PIVTNG and PACK
+ parameters, then the matrices generated will differ only
+ in the order of the rows and/or columns, and otherwise
+ contain the same data. This consistency cannot be
+ maintained with less than full bandwidth.
+
+ IPIVOT - INTEGER array, dimension (N or M)
+ This array specifies the permutation used. After the
+ basic matrix is generated, the rows, columns, or both
+ are permuted. If, say, row pivoting is selected, ZLATMR
+ starts with the *last* row and interchanges the M-th and
+ IPIVOT(M)-th rows, then moves to the next-to-last row,
+ interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+ and so on. In terms of "2-cycles", the permutation is
+ (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+ where the rightmost cycle is applied first. This is the
+ *inverse* of the effect of pivoting in LINPACK. The idea
+ is that factoring (with pivoting) an identity matrix
+ which has been inverse-pivoted in this way should
+ result in a pivot vector identical to IPIVOT.
+ Not referenced if PIVTNG = 'N'. Not modified.
+
+ SPARSE - DOUBLE PRECISION
+ On entry specifies the sparsity of the matrix if a sparse
+ matrix is to be generated. SPARSE should lie between
+ 0 and 1. To generate a sparse matrix, for each matrix entry
+
+ a uniform ( 0, 1 ) random number x is generated and
+ compared to SPARSE; if x is larger the matrix entry
+ is unchanged and if x is smaller the entry is set
+ to zero. Thus on the average a fraction SPARSE of the
+ entries will be set to zero.
+ Not modified.
+
+ KL - INTEGER
+ On entry specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL at least M-1 implies the matrix is not
+ banded. Must equal KU if matrix is symmetric or Hermitian.
+ Not modified.
+
+ KU - INTEGER
+ On entry specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU at least N-1 implies the matrix is not
+ banded. Must equal KL if matrix is symmetric or Hermitian.
+ Not modified.
+
+ ANORM - DOUBLE PRECISION
+ On entry specifies maximum entry of output matrix
+ (output matrix will by multiplied by a constant so that
+ its largest absolute entry equal ANORM)
+ if ANORM is nonnegative. If ANORM is negative no scaling
+ is done. Not modified.
+
+ PACK - CHARACTER*1
+ On entry specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries
+ (if symmetric or Hermitian)
+ 'L' => zero out all superdiagonal entries
+ (if symmetric or Hermitian)
+ 'C' => store the upper triangle columnwise
+ (only if matrix symmetric or Hermitian or
+ square upper triangular)
+ 'R' => store the lower triangle columnwise
+ (only if matrix symmetric or Hermitian or
+ square lower triangular)
+ (same as upper half rowwise if symmetric)
+ (same as conjugate upper half rowwise if Hermitian)
+ 'B' => store the lower triangle in band storage scheme
+ (only if matrix symmetric or Hermitian)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if matrix symmetric or Hermitian)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, HB or TB - use 'B' or 'Q'
+ PP, HP or TP - use 'C' or 'R'
+
+ If two calls to ZLATMR differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - COMPLEX*16 array, dimension (LDA,N)
+ On exit A is the desired test matrix. Only those
+ entries of A which are significant on output
+ will be referenced (even if A is in packed or band
+ storage format). The 'unoccupied corners' of A in
+ band format will be zeroed out.
+
+ LDA - INTEGER
+ on entry LDA specifies the first dimension of A as
+ declared in the calling program.
+ If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+
+ If PACK='C' or 'R', LDA must be at least 1.
+ If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+ If PACK='Z', LDA must be at least KUU+KLL+1, where
+ KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+ Not modified.
+
+ IWORK - INTEGER array, dimension (N or M)
+ Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+
+
+ INFO - INTEGER
+ Error parameter on exit:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S' or 'H'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+ -11 => GRADE illegal string, or GRADE='E' and
+ M not equal to N, or GRADE='L', 'R', 'B', 'S' or 'E'
+
+ and SYM = 'H', or GRADE='L', 'R', 'B', 'H' or 'E'
+ and SYM = 'S'
+ -12 => GRADE = 'E' and DL contains zero
+ -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+
+ 'S' or 'E'
+ -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+
+ and MODEL neither -6, 0 nor 6
+ -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+ -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+ MODER neither -6, 0 nor 6
+ -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+ M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+ or 'H'
+ -19 => IPIVOT contains out of range number and
+ PIVTNG not equal to 'N'
+ -20 => KL negative
+ -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+
+ -22 => SPARSE not in range 0. to 1.
+ -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+ and SYM='N', or PACK='C' and SYM='N' and either KL
+ not equal to 0 or N not equal to M, or PACK='R' and
+ SYM='N', and either KU not equal to 0 or N not equal
+
+ to M
+ -26 => LDA too small
+ 1 => Error return from ZLATM1 (computing D)
+ 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+ 3 => Error return from ZLATM1 (computing DL)
+ 4 => Error return from ZLATM1 (computing DR)
+ 5 => ANORM is positive, but matrix constructed prior to
+ attempting to scale it to have norm ANORM, is zero
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ --dl;
+ --dr;
+ --ipivot;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --iwork;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else if (lsame_(dist, "D")) {
+ idist = 4;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "H")) {
+ isym = 0;
+ } else if (lsame_(sym, "N")) {
+ isym = 1;
+ } else if (lsame_(sym, "S")) {
+ isym = 2;
+ } else {
+ isym = -1;
+ }
+
+/* Decode RSIGN */
+
+ if (lsame_(rsign, "F")) {
+ irsign = 0;
+ } else if (lsame_(rsign, "T")) {
+ irsign = 1;
+ } else {
+ irsign = -1;
+ }
+
+/* Decode PIVTNG */
+
+ if (lsame_(pivtng, "N")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, " ")) {
+ ipvtng = 0;
+ } else if (lsame_(pivtng, "L")) {
+ ipvtng = 1;
+ npvts = *m;
+ } else if (lsame_(pivtng, "R")) {
+ ipvtng = 2;
+ npvts = *n;
+ } else if (lsame_(pivtng, "B")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else if (lsame_(pivtng, "F")) {
+ ipvtng = 3;
+ npvts = min(*n,*m);
+ } else {
+ ipvtng = -1;
+ }
+
+/* Decode GRADE */
+
+ if (lsame_(grade, "N")) {
+ igrade = 0;
+ } else if (lsame_(grade, "L")) {
+ igrade = 1;
+ } else if (lsame_(grade, "R")) {
+ igrade = 2;
+ } else if (lsame_(grade, "B")) {
+ igrade = 3;
+ } else if (lsame_(grade, "E")) {
+ igrade = 4;
+ } else if (lsame_(grade, "H")) {
+ igrade = 5;
+ } else if (lsame_(grade, "S")) {
+ igrade = 6;
+ } else {
+ igrade = -1;
+ }
+
+/* Decode PACK */
+
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ kll = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ kuu = min(i__1,i__2);
+
+/* If inv(DL) is used, check to see if DL has a zero entry. */
+
+ dzero = FALSE_;
+ if (igrade == 4 && *model == 0) {
+ i__1 = *m;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i;
+ if (dl[i__2].r == 0. && dl[i__2].i == 0.) {
+ dzero = TRUE_;
+ }
+/* L10: */
+ }
+ }
+
+/* Check values in IPIVOT */
+
+ badpvt = FALSE_;
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (j = 1; j <= i__1; ++j) {
+ if (ipivot[j] <= 0 || ipivot[j] > npvts) {
+ badpvt = TRUE_;
+ }
+/* L20: */
+ }
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && (isym == 0 || isym == 2)) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (*mode < -6 || *mode > 6) {
+ *info = -7;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && *cond < 1.) {
+ *info = -8;
+ } else if (*mode != -6 && *mode != 0 && *mode != 6 && irsign == -1) {
+ *info = -10;
+ } else if (igrade == -1 || igrade == 4 && *m != *n || (igrade == 1 ||
+ igrade == 2 || igrade == 3 || igrade == 4 || igrade == 6) && isym
+ == 0 || (igrade == 1 || igrade == 2 || igrade == 3 || igrade == 4
+ || igrade == 5) && isym == 2) {
+ *info = -11;
+ } else if (igrade == 4 && dzero) {
+ *info = -12;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5 ||
+ igrade == 6) && (*model < -6 || *model > 6)) {
+ *info = -13;
+ } else if ((igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5 ||
+ igrade == 6) && (*model != -6 && *model != 0 && *model != 6) && *
+ condl < 1.) {
+ *info = -14;
+ } else if ((igrade == 2 || igrade == 3) && (*moder < -6 || *moder > 6)) {
+ *info = -16;
+ } else if ((igrade == 2 || igrade == 3) && (*moder != -6 && *moder != 0 &&
+ *moder != 6) && *condr < 1.) {
+ *info = -17;
+ } else if (ipvtng == -1 || ipvtng == 3 && *m != *n || (ipvtng == 1 ||
+ ipvtng == 2) && (isym == 0 || isym == 2)) {
+ *info = -18;
+ } else if (ipvtng != 0 && badpvt) {
+ *info = -19;
+ } else if (*kl < 0) {
+ *info = -20;
+ } else if (*ku < 0 || (isym == 0 || isym == 2) && *kl != *ku) {
+ *info = -21;
+ } else if (*sparse < 0. || *sparse > 1.) {
+ *info = -22;
+ } else if (ipack == -1 || (ipack == 1 || ipack == 2 || ipack == 5 ||
+ ipack == 6) && isym == 1 || ipack == 3 && isym == 1 && (*kl != 0
+ || *m != *n) || ipack == 4 && isym == 1 && (*ku != 0 || *m != *n))
+ {
+ *info = -24;
+ } else if ((ipack == 0 || ipack == 1 || ipack == 2) && *lda < max(1,*m) ||
+ (ipack == 3 || ipack == 4) && *lda < 1 || (ipack == 5 || ipack ==
+ 6) && *lda < kuu + 1 || ipack == 7 && *lda < kll + kuu + 1) {
+ *info = -26;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("ZLATMR", &i__1);
+ return 0;
+ }
+
+/* Decide if we can pivot consistently */
+
+ fulbnd = FALSE_;
+ if (kuu == *n - 1 && kll == *m - 1) {
+ fulbnd = TRUE_;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L30: */
+ }
+
+ iseed[4] = (iseed[4] / 2 << 1) + 1;
+
+/* 2) Set up D, DL, and DR, if indicated.
+
+ Compute D according to COND and MODE */
+
+ zlatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, info);
+ if (*info != 0) {
+ *info = 1;
+ return 0;
+ }
+ if (*mode != 0 && *mode != -6 && *mode != 6) {
+
+/* Scale by DMAX */
+
+ temp = z_abs(&d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ d__1 = temp, d__2 = z_abs(&d[i]);
+ temp = max(d__1,d__2);
+/* L40: */
+ }
+ if (temp == 0. && (dmax__->r != 0. || dmax__->i != 0.)) {
+ *info = 2;
+ return 0;
+ }
+ if (temp != 0.) {
+ z__1.r = dmax__->r / temp, z__1.i = dmax__->i / temp;
+ calpha.r = z__1.r, calpha.i = z__1.i;
+ } else {
+ calpha.r = 1., calpha.i = 0.;
+ }
+ i__1 = mnmin;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i;
+ i__3 = i;
+ z__1.r = calpha.r * d[i__3].r - calpha.i * d[i__3].i, z__1.i =
+ calpha.r * d[i__3].i + calpha.i * d[i__3].r;
+ d[i__2].r = z__1.r, d[i__2].i = z__1.i;
+/* L50: */
+ }
+
+ }
+
+/* If matrix Hermitian, make D real */
+
+ if (isym == 0) {
+ i__1 = mnmin;
+ for (i = 1; i <= i__1; ++i) {
+ i__2 = i;
+ i__3 = i;
+ d__1 = d[i__3].r;
+ d[i__2].r = d__1, d[i__2].i = 0.;
+/* L60: */
+ }
+ }
+
+/* Compute DL if grading set */
+
+ if (igrade == 1 || igrade == 3 || igrade == 4 || igrade == 5 || igrade ==
+ 6) {
+ zlatm1_(model, condl, &c__0, &idist, &iseed[1], &dl[1], m, info);
+ if (*info != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* Compute DR if grading set */
+
+ if (igrade == 2 || igrade == 3) {
+ zlatm1_(moder, condr, &c__0, &idist, &iseed[1], &dr[1], n, info);
+ if (*info != 0) {
+ *info = 4;
+ return 0;
+ }
+ }
+
+/* 3) Generate IWORK if pivoting */
+
+ if (ipvtng > 0) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ iwork[i] = i;
+/* L70: */
+ }
+ if (fulbnd) {
+ i__1 = npvts;
+ for (i = 1; i <= i__1; ++i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L80: */
+ }
+ } else {
+ for (i = npvts; i >= 1; --i) {
+ k = ipivot[i];
+ j = iwork[i];
+ iwork[i] = iwork[k];
+ iwork[k] = j;
+/* L90: */
+ }
+ }
+ }
+
+/* 4) Generate matrices for each kind of PACKing
+ Always sweep matrix columnwise (if symmetric, upper
+ half only) so that matrix generated does not depend
+ on PACK */
+
+ if (fulbnd) {
+
+/* Use ZLATM3 so matrices generated with differing PIVOTing onl
+y
+ differ only in the order of their rows and/or columns. */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ i__3 = isub + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ i__3 = jsub + isub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L100: */
+ }
+/* L110: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ i__3 = isub + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+/* L120: */
+ }
+/* L130: */
+ }
+ } else if (isym == 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ i__3 = isub + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ i__3 = jsub + isub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+/* L140: */
+ }
+/* L150: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == isub && isym == 0) {
+ i__3 = mnsub + mxsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = mnsub + mxsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ if (mnsub != mxsub) {
+ i__3 = mxsub + mnsub * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ }
+/* L160: */
+ }
+/* L170: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == jsub && isym == 0) {
+ i__3 = mxsub + mnsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = mxsub + mnsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ if (mnsub != mxsub) {
+ i__3 = mnsub + mxsub * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ }
+/* L180: */
+ }
+/* L190: */
+ }
+
+ } else if (ipack == 3) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+
+/* Compute K = location of (ISUB,JSUB) ent
+ry in packed
+ array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ k = mxsub * (mxsub - 1) / 2 + mnsub;
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ if (mxsub == isub && isym == 0) {
+ i__3 = iisub + jjsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = iisub + jjsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+/* L200: */
+ }
+/* L210: */
+ }
+
+ } else if (ipack == 4) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+
+/* Compute K = location of (I,J) entry in
+packed array */
+
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mnsub == 1) {
+ k = mxsub;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - mnsub + 1) * (*n -
+ mnsub + 2) / 2 + mxsub - mnsub + 1;
+ }
+
+/* Convert K to (IISUB,JJSUB) location */
+
+ jjsub = (k - 1) / *lda + 1;
+ iisub = k - *lda * (jjsub - 1);
+
+ if (mxsub == jsub && isym == 0) {
+ i__3 = iisub + jjsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = iisub + jjsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+/* L220: */
+ }
+/* L230: */
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ i__3 = j - i + 1 + (i + *n) * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ } else {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == jsub && isym == 0) {
+ i__3 = mxsub - mnsub + 1 + mnsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = mxsub - mnsub + 1 + mnsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ }
+/* L240: */
+ }
+/* L250: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &idist,
+ &iseed[1], &d[1], &igrade, &dl[1], &dr[1], &
+ ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (mxsub == isub && isym == 0) {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+/* L260: */
+ }
+/* L270: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym != 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ mnsub = min(isub,jsub);
+ mxsub = max(isub,jsub);
+ if (i < 1) {
+ i__3 = j - i + 1 + kuu + (i + *n) * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ }
+ if (mxsub == isub && isym == 0) {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = mnsub - mxsub + kuu + 1 + mxsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ if (i >= 1 && mnsub != mxsub) {
+ if (mnsub == isub && isym == 0) {
+ i__3 = mxsub - mnsub + 1 + kuu + mnsub *
+ a_dim1;
+ d_cnjg(&z__1, &ctemp);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = mxsub - mnsub + 1 + kuu + mnsub *
+ a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+ }
+ }
+/* L280: */
+ }
+/* L290: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ zlatm3_(&z__1, m, n, &i, &j, &isub, &jsub, kl, ku, &
+ idist, &iseed[1], &d[1], &igrade, &dl[1], &dr[
+ 1], &ipvtng, &iwork[1], sparse);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ i__3 = isub - jsub + kuu + 1 + jsub * a_dim1;
+ a[i__3].r = ctemp.r, a[i__3].i = ctemp.i;
+/* L300: */
+ }
+/* L310: */
+ }
+ }
+
+ }
+
+ } else {
+
+/* Use ZLATM2 */
+
+ if (ipack == 0) {
+ if (isym == 0) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ i__3 = j + i * a_dim1;
+ d_cnjg(&z__1, &a[i + j * a_dim1]);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L320: */
+ }
+/* L330: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L340: */
+ }
+/* L350: */
+ }
+ } else if (isym == 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ i__3 = j + i * a_dim1;
+ i__4 = i + j * a_dim1;
+ a[i__3].r = a[i__4].r, a[i__3].i = a[i__4].i;
+/* L360: */
+ }
+/* L370: */
+ }
+ }
+
+ } else if (ipack == 1) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ i__3 = i + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1], &
+ d[1], &igrade, &dl[1], &dr[1], &ipvtng, &iwork[1],
+ sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ if (i != j) {
+ i__3 = j + i * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ }
+/* L380: */
+ }
+/* L390: */
+ }
+
+ } else if (ipack == 2) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ if (isym == 0) {
+ i__3 = j + i * a_dim1;
+ zlatm2_(&z__2, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ d_cnjg(&z__1, &z__2);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = j + i * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ }
+ if (i != j) {
+ i__3 = i + j * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ }
+/* L400: */
+ }
+/* L410: */
+ }
+
+ } else if (ipack == 3) {
+
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ i__3 = isub + jsub * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1], &
+ d[1], &igrade, &dl[1], &dr[1], &ipvtng, &iwork[1],
+ sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L420: */
+ }
+/* L430: */
+ }
+
+ } else if (ipack == 4) {
+
+ if (isym == 0 || isym == 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+
+/* Compute K = location of (I,J) en
+try in packed array */
+
+ if (i == 1) {
+ k = j;
+ } else {
+ k = *n * (*n + 1) / 2 - (*n - i + 1) * (*n - i +
+ 2) / 2 + j - i + 1;
+ }
+
+/* Convert K to (ISUB,JSUB) locatio
+n */
+
+ jsub = (k - 1) / *lda + 1;
+ isub = k - *lda * (jsub - 1);
+
+ i__3 = isub + jsub * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ if (isym == 0) {
+ i__3 = isub + jsub * a_dim1;
+ d_cnjg(&z__1, &a[isub + jsub * a_dim1]);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ }
+/* L440: */
+ }
+/* L450: */
+ }
+ } else {
+ isub = 0;
+ jsub = 1;
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++isub;
+ if (isub > *lda) {
+ isub = 1;
+ ++jsub;
+ }
+ i__3 = isub + jsub * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L460: */
+ }
+/* L470: */
+ }
+ }
+
+ } else if (ipack == 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ if (i < 1) {
+ i__3 = j - i + 1 + (i + *n) * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ } else {
+ if (isym == 0) {
+ i__3 = j - i + 1 + i * a_dim1;
+ zlatm2_(&z__2, m, n, &i, &j, kl, ku, &idist, &
+ iseed[1], &d[1], &igrade, &dl[1], &dr[1],
+ &ipvtng, &iwork[1], sparse);
+ d_cnjg(&z__1, &z__2);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = j - i + 1 + i * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &
+ iseed[1], &d[1], &igrade, &dl[1], &dr[1],
+ &ipvtng, &iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ }
+ }
+/* L480: */
+ }
+/* L490: */
+ }
+
+ } else if (ipack == 6) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ i__3 = i - j + kuu + 1 + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1], &
+ d[1], &igrade, &dl[1], &dr[1], &ipvtng, &iwork[1],
+ sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L500: */
+ }
+/* L510: */
+ }
+
+ } else if (ipack == 7) {
+
+ if (isym != 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = j - kuu; i <= i__2; ++i) {
+ i__3 = i - j + kuu + 1 + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ if (i < 1) {
+ i__3 = j - i + 1 + kuu + (i + *n) * a_dim1;
+ a[i__3].r = 0., a[i__3].i = 0.;
+ }
+ if (i >= 1 && i != j) {
+ if (isym == 0) {
+ i__3 = j - i + 1 + kuu + i * a_dim1;
+ d_cnjg(&z__1, &a[i - j + kuu + 1 + j * a_dim1]
+ );
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+ } else {
+ i__3 = j - i + 1 + kuu + i * a_dim1;
+ i__4 = i - j + kuu + 1 + j * a_dim1;
+ a[i__3].r = a[i__4].r, a[i__3].i = a[i__4].i;
+ }
+ }
+/* L520: */
+ }
+/* L530: */
+ }
+ } else if (isym == 1) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j + kll;
+ for (i = j - kuu; i <= i__2; ++i) {
+ i__3 = i - j + kuu + 1 + j * a_dim1;
+ zlatm2_(&z__1, m, n, &i, &j, kl, ku, &idist, &iseed[1]
+ , &d[1], &igrade, &dl[1], &dr[1], &ipvtng, &
+ iwork[1], sparse);
+ a[i__3].r = z__1.r, a[i__3].i = z__1.i;
+/* L540: */
+ }
+/* L550: */
+ }
+ }
+
+ }
+
+ }
+
+/* 5) Scaling the norm */
+
+ if (ipack == 0) {
+ onorm = zlange_("M", m, n, &a[a_offset], lda, tempa);
+ } else if (ipack == 1) {
+ onorm = zlansy_("M", "U", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 2) {
+ onorm = zlansy_("M", "L", n, &a[a_offset], lda, tempa);
+ } else if (ipack == 3) {
+ onorm = zlansp_("M", "U", n, &a[a_offset], tempa);
+ } else if (ipack == 4) {
+ onorm = zlansp_("M", "L", n, &a[a_offset], tempa);
+ } else if (ipack == 5) {
+ onorm = zlansb_("M", "L", n, &kll, &a[a_offset], lda, tempa);
+ } else if (ipack == 6) {
+ onorm = zlansb_("M", "U", n, &kuu, &a[a_offset], lda, tempa);
+ } else if (ipack == 7) {
+ onorm = zlangb_("M", n, &kll, &kuu, &a[a_offset], lda, tempa);
+ }
+
+ if (*anorm >= 0.) {
+
+ if (*anorm > 0. && onorm == 0.) {
+
+/* Desired scaling impossible */
+
+ *info = 5;
+ return 0;
+
+ } else if (*anorm > 1. && onorm < 1. || *anorm < 1. && onorm > 1.) {
+
+/* Scale carefully to avoid over / underflow */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ d__1 = 1. / onorm;
+ zdscal_(m, &d__1, &a[j * a_dim1 + 1], &c__1);
+ zdscal_(m, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L560: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ d__1 = 1. / onorm;
+ zdscal_(&i__1, &d__1, &a[a_offset], &c__1);
+ i__1 = *n * (*n + 1) / 2;
+ zdscal_(&i__1, anorm, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ d__1 = 1. / onorm;
+ zdscal_(&i__2, &d__1, &a[j * a_dim1 + 1], &c__1);
+ i__2 = kll + kuu + 1;
+ zdscal_(&i__2, anorm, &a[j * a_dim1 + 1], &c__1);
+/* L570: */
+ }
+
+ }
+
+ } else {
+
+/* Scale straightforwardly */
+
+ if (ipack <= 2) {
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ d__1 = *anorm / onorm;
+ zdscal_(m, &d__1, &a[j * a_dim1 + 1], &c__1);
+/* L580: */
+ }
+
+ } else if (ipack == 3 || ipack == 4) {
+
+ i__1 = *n * (*n + 1) / 2;
+ d__1 = *anorm / onorm;
+ zdscal_(&i__1, &d__1, &a[a_offset], &c__1);
+
+ } else if (ipack >= 5) {
+
+ i__1 = *n;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = kll + kuu + 1;
+ d__1 = *anorm / onorm;
+ zdscal_(&i__2, &d__1, &a[j * a_dim1 + 1], &c__1);
+/* L590: */
+ }
+ }
+
+ }
+
+ }
+
+/* End of ZLATMR */
+
+ return 0;
+} /* zlatmr_ */
+
diff --git a/TESTING/MATGEN/zlatms.c b/TESTING/MATGEN/zlatms.c
new file mode 100644
index 0000000..9d5cfa9
--- /dev/null
+++ b/TESTING/MATGEN/zlatms.c
@@ -0,0 +1,1648 @@
+/* -- translated by f2c (version 19940927).
+ You must link the resulting object file with the libraries:
+ -lf2c -lm (in that order)
+*/
+
+#include "f2c.h"
+
+/* Table of constant values */
+
+static doublecomplex c_b1 = {0.,0.};
+static integer c__1 = 1;
+static integer c__5 = 5;
+static logical c_true = TRUE_;
+static logical c_false = FALSE_;
+
+/* Subroutine */ int zlatms_(integer *m, integer *n, char *dist, integer *
+ iseed, char *sym, doublereal *d, integer *mode, doublereal *cond,
+ doublereal *dmax__, integer *kl, integer *ku, char *pack,
+ doublecomplex *a, integer *lda, doublecomplex *work, integer *info)
+{
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+ doublereal d__1, d__2, d__3;
+ doublecomplex z__1, z__2, z__3;
+ logical L__1;
+
+ /* Builtin functions */
+ double cos(doublereal), sin(doublereal);
+ void d_cnjg(doublecomplex *, doublecomplex *);
+
+ /* Local variables */
+ static integer ilda, icol;
+ static doublereal temp;
+ static integer irow, isym;
+ static logical zsym;
+ static doublecomplex c;
+ static integer i, j, k;
+ static doublecomplex s;
+ static doublereal alpha, angle;
+ static integer ipack;
+ static doublereal realc;
+ static integer ioffg;
+ extern /* Subroutine */ int dscal_(integer *, doublereal *, doublereal *,
+ integer *);
+ extern logical lsame_(char *, char *);
+ static integer iinfo;
+ static doublecomplex ctemp;
+ static integer idist, mnmin, iskew;
+ static doublecomplex extra, dummy;
+ extern /* Subroutine */ int dlatm1_(integer *, doublereal *, integer *,
+ integer *, integer *, doublereal *, integer *, integer *);
+ static integer ic, jc, nc, il;
+ static doublecomplex ct;
+ static integer iendch, ir, jr, ipackg, mr, minlda;
+ extern doublereal dlarnd_(integer *, integer *);
+ static doublecomplex st;
+ extern /* Subroutine */ int zlagge_(integer *, integer *, integer *,
+ integer *, doublereal *, doublecomplex *, integer *, integer *,
+ doublecomplex *, integer *), zlaghe_(integer *, integer *,
+ doublereal *, doublecomplex *, integer *, integer *,
+ doublecomplex *, integer *), xerbla_(char *, integer *);
+ static logical iltemp, givens;
+ static integer ioffst, irsign;
+ extern /* Double Complex */ void zlarnd_(doublecomplex *, integer *,
+ integer *);
+ extern /* Subroutine */ int zlaset_(char *, integer *, integer *,
+ doublecomplex *, doublecomplex *, doublecomplex *, integer *), zlartg_(doublecomplex *, doublecomplex *, doublereal *,
+ doublecomplex *, doublecomplex *);
+ static logical ilextr;
+ extern /* Subroutine */ int zlagsy_(integer *, integer *, doublereal *,
+ doublecomplex *, integer *, integer *, doublecomplex *, integer *)
+ ;
+ static logical topdwn;
+ static integer ir1, ir2, isympk;
+ extern /* Subroutine */ int zlarot_(logical *, logical *, logical *,
+ integer *, doublecomplex *, doublecomplex *, doublecomplex *,
+ integer *, doublecomplex *, doublecomplex *);
+ static integer jch, llb, jkl, jku, uub;
+
+
+/* -- LAPACK test routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ September 30, 1994
+
+
+ Purpose
+ =======
+
+ ZLATMS generates random matrices with specified singular values
+ (or hermitian with specified eigenvalues)
+ for testing LAPACK programs.
+
+ ZLATMS operates by applying the following sequence of
+ operations:
+
+ Set the diagonal to D, where D may be input or
+ computed according to MODE, COND, DMAX, and SYM
+ as described below.
+
+ Generate a matrix with the appropriate band structure, by one
+ of two methods:
+
+ Method A:
+ Generate a dense M x N matrix by multiplying D on the left
+ and the right by random unitary matrices, then:
+
+ Reduce the bandwidth according to KL and KU, using
+ Householder transformations.
+
+ Method B:
+ Convert the bandwidth-0 (i.e., diagonal) matrix to a
+ bandwidth-1 matrix using Givens rotations, "chasing"
+ out-of-band elements back, much as in QR; then convert
+ the bandwidth-1 to a bandwidth-2 matrix, etc. Note
+ that for reasonably small bandwidths (relative to M and
+
+ N) this requires less storage, as a dense matrix is not
+
+ generated. Also, for hermitian or symmetric matrices,
+ only one triangle is generated.
+
+ Method A is chosen if the bandwidth is a large fraction of the
+ order of the matrix, and LDA is at least M (so a dense
+ matrix can be stored.) Method B is chosen if the bandwidth
+
+ is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
+ non-symmetric), or LDA is less than M and not less than the
+
+ bandwidth.
+
+ Pack the matrix if desired. Options specified by PACK are:
+ no packing
+ zero out upper half (if hermitian)
+ zero out lower half (if hermitian)
+ store the upper half columnwise (if hermitian or upper
+ triangular)
+ store the lower half columnwise (if hermitian or lower
+ triangular)
+ store the lower triangle in banded format (if hermitian or
+ lower triangular)
+ store the upper triangle in banded format (if hermitian or
+ upper triangular)
+ store the entire matrix in banded format
+ If Method B is chosen, and band format is specified, then the
+ matrix will be generated in the band format, so no repacking
+
+ will be necessary.
+
+ Arguments
+ =========
+
+ M - INTEGER
+ The number of rows of A. Not modified.
+
+ N - INTEGER
+ The number of columns of A. N must equal M if the matrix
+ is symmetric or hermitian (i.e., if SYM is not 'N')
+ Not modified.
+
+ DIST - CHARACTER*1
+ On entry, DIST specifies the type of distribution to be used
+
+ to generate the random eigen-/singular values.
+ 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+ 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+ 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+ Not modified.
+
+ ISEED - INTEGER array, dimension ( 4 )
+ On entry ISEED specifies the seed of the random number
+ generator. They should lie between 0 and 4095 inclusive,
+ and ISEED(4) should be odd. The random number generator
+ uses a linear congruential sequence limited to small
+ integers, and so should produce machine independent
+ random numbers. The values of ISEED are changed on
+ exit, and can be used in the next call to ZLATMS
+ to continue the same random number sequence.
+ Changed on exit.
+
+ SYM - CHARACTER*1
+ If SYM='H', the generated matrix is hermitian, with
+ eigenvalues specified by D, COND, MODE, and DMAX; they
+ may be positive, negative, or zero.
+ If SYM='P', the generated matrix is hermitian, with
+ eigenvalues (= singular values) specified by D, COND,
+ MODE, and DMAX; they will not be negative.
+ If SYM='N', the generated matrix is nonsymmetric, with
+ singular values specified by D, COND, MODE, and DMAX;
+ they will not be negative.
+ If SYM='S', the generated matrix is (complex) symmetric,
+ with singular values specified by D, COND, MODE, and
+ DMAX; they will not be negative.
+ Not modified.
+
+ D - DOUBLE PRECISION array, dimension ( MIN( M, N ) )
+ This array is used to specify the singular values or
+ eigenvalues of A (see SYM, above.) If MODE=0, then D is
+ assumed to contain the singular/eigenvalues, otherwise
+ they will be computed according to MODE, COND, and DMAX,
+ and placed in D.
+ Modified if MODE is nonzero.
+
+ MODE - INTEGER
+ On entry this describes how the singular/eigenvalues are to
+
+ be specified:
+ MODE = 0 means use D as input
+ MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+ MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+ MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+ MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+ MODE = 5 sets D to random numbers in the range
+ ( 1/COND , 1 ) such that their logarithms
+ are uniformly distributed.
+ MODE = 6 set D to random numbers from same distribution
+ as the rest of the matrix.
+ MODE < 0 has the same meaning as ABS(MODE), except that
+ the order of the elements of D is reversed.
+ Thus if MODE is positive, D has entries ranging from
+ 1 to 1/COND, if negative, from 1/COND to 1,
+ If SYM='H', and MODE is neither 0, 6, nor -6, then
+ the elements of D will also be multiplied by a random
+ sign (i.e., +1 or -1.)
+ Not modified.
+
+ COND - DOUBLE PRECISION
+ On entry, this is used as described under MODE above.
+ If used, it must be >= 1. Not modified.
+
+ DMAX - DOUBLE PRECISION
+ If MODE is neither -6, 0 nor 6, the contents of D, as
+ computed according to MODE and COND, will be scaled by
+ DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+
+ singular value (which is to say the norm) will be abs(DMAX).
+
+ Note that DMAX need not be positive: if DMAX is negative
+ (or zero), D will be scaled by a negative number (or zero).
+
+ Not modified.
+
+ KL - INTEGER
+ This specifies the lower bandwidth of the matrix. For
+ example, KL=0 implies upper triangular, KL=1 implies upper
+ Hessenberg, and KL being at least M-1 means that the matrix
+
+ has full lower bandwidth. KL must equal KU if the matrix
+ is symmetric or hermitian.
+ Not modified.
+
+ KU - INTEGER
+ This specifies the upper bandwidth of the matrix. For
+ example, KU=0 implies lower triangular, KU=1 implies lower
+ Hessenberg, and KU being at least N-1 means that the matrix
+
+ has full upper bandwidth. KL must equal KU if the matrix
+ is symmetric or hermitian.
+ Not modified.
+
+ PACK - CHARACTER*1
+ This specifies packing of matrix as follows:
+ 'N' => no packing
+ 'U' => zero out all subdiagonal entries (if symmetric
+ or hermitian)
+ 'L' => zero out all superdiagonal entries (if symmetric
+ or hermitian)
+ 'C' => store the upper triangle columnwise (only if the
+ matrix is symmetric, hermitian, or upper triangular)
+
+ 'R' => store the lower triangle columnwise (only if the
+ matrix is symmetric, hermitian, or lower triangular)
+
+ 'B' => store the lower triangle in band storage scheme
+ (only if the matrix is symmetric, hermitian, or
+ lower triangular)
+ 'Q' => store the upper triangle in band storage scheme
+ (only if the matrix is symmetric, hermitian, or
+ upper triangular)
+ 'Z' => store the entire matrix in band storage scheme
+ (pivoting can be provided for by using this
+ option to store A in the trailing rows of
+ the allocated storage)
+
+ Using these options, the various LAPACK packed and banded
+ storage schemes can be obtained:
+ GB - use 'Z'
+ PB, SB, HB, or TB - use 'B' or 'Q'
+ PP, SP, HB, or TP - use 'C' or 'R'
+
+ If two calls to ZLATMS differ only in the PACK parameter,
+ they will generate mathematically equivalent matrices.
+ Not modified.
+
+ A - COMPLEX*16 array, dimension ( LDA, N )
+ On exit A is the desired test matrix. A is first generated
+
+ in full (unpacked) form, and then packed, if so specified
+ by PACK. Thus, the first M elements of the first N
+ columns will always be modified. If PACK specifies a
+ packed or banded storage scheme, all LDA elements of the
+ first N columns will be modified; the elements of the
+ array which do not correspond to elements of the generated
+ matrix are set to zero.
+ Modified.
+
+ LDA - INTEGER
+ LDA specifies the first dimension of A as declared in the
+ calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+ LDA must be at least M. If PACK='B' or 'Q', then LDA must
+ be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+ If PACK='Z', LDA must be large enough to hold the packed
+ array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+ Not modified.
+
+ WORK - COMPLEX*16 array, dimension ( 3*MAX( N, M ) )
+ Workspace.
+ Modified.
+
+ INFO - INTEGER
+ Error code. On exit, INFO will be set to one of the
+ following values:
+ 0 => normal return
+ -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+ -2 => N negative
+ -3 => DIST illegal string
+ -5 => SYM illegal string
+ -7 => MODE not in range -6 to 6
+ -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+ -10 => KL negative
+ -11 => KU negative, or SYM is not 'N' and KU is not equal to
+
+ KL
+ -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+
+ or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+ or PACK='R' or 'B' and SYM='N' and KU is not zero;
+ or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+
+ N.
+ -14 => LDA is less than M, or PACK='Z' and LDA is less than
+
+ MIN(KU,N-1) + MIN(KL,M-1) + 1.
+ 1 => Error return from DLATM1
+ 2 => Cannot scale to DMAX (max. sing. value is 0)
+ 3 => Error return from ZLAGGE, CLAGHE or CLAGSY
+
+ =====================================================================
+
+
+
+ 1) Decode and Test the input parameters.
+ Initialize flags & seed.
+
+ Parameter adjustments */
+ --iseed;
+ --d;
+ a_dim1 = *lda;
+ a_offset = a_dim1 + 1;
+ a -= a_offset;
+ --work;
+
+ /* Function Body */
+ *info = 0;
+
+/* Quick return if possible */
+
+ if (*m == 0 || *n == 0) {
+ return 0;
+ }
+
+/* Decode DIST */
+
+ if (lsame_(dist, "U")) {
+ idist = 1;
+ } else if (lsame_(dist, "S")) {
+ idist = 2;
+ } else if (lsame_(dist, "N")) {
+ idist = 3;
+ } else {
+ idist = -1;
+ }
+
+/* Decode SYM */
+
+ if (lsame_(sym, "N")) {
+ isym = 1;
+ irsign = 0;
+ zsym = FALSE_;
+ } else if (lsame_(sym, "P")) {
+ isym = 2;
+ irsign = 0;
+ zsym = FALSE_;
+ } else if (lsame_(sym, "S")) {
+ isym = 2;
+ irsign = 0;
+ zsym = TRUE_;
+ } else if (lsame_(sym, "H")) {
+ isym = 2;
+ irsign = 1;
+ zsym = FALSE_;
+ } else {
+ isym = -1;
+ }
+
+/* Decode PACK */
+
+ isympk = 0;
+ if (lsame_(pack, "N")) {
+ ipack = 0;
+ } else if (lsame_(pack, "U")) {
+ ipack = 1;
+ isympk = 1;
+ } else if (lsame_(pack, "L")) {
+ ipack = 2;
+ isympk = 1;
+ } else if (lsame_(pack, "C")) {
+ ipack = 3;
+ isympk = 2;
+ } else if (lsame_(pack, "R")) {
+ ipack = 4;
+ isympk = 3;
+ } else if (lsame_(pack, "B")) {
+ ipack = 5;
+ isympk = 3;
+ } else if (lsame_(pack, "Q")) {
+ ipack = 6;
+ isympk = 2;
+ } else if (lsame_(pack, "Z")) {
+ ipack = 7;
+ } else {
+ ipack = -1;
+ }
+
+/* Set certain internal parameters */
+
+ mnmin = min(*m,*n);
+/* Computing MIN */
+ i__1 = *kl, i__2 = *m - 1;
+ llb = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *ku, i__2 = *n - 1;
+ uub = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *m, i__2 = *n + llb;
+ mr = min(i__1,i__2);
+/* Computing MIN */
+ i__1 = *n, i__2 = *m + uub;
+ nc = min(i__1,i__2);
+
+ if (ipack == 5 || ipack == 6) {
+ minlda = uub + 1;
+ } else if (ipack == 7) {
+ minlda = llb + uub + 1;
+ } else {
+ minlda = *m;
+ }
+
+/* Use Givens rotation method if bandwidth small enough,
+ or if LDA is too small to store the matrix unpacked. */
+
+ givens = FALSE_;
+ if (isym == 1) {
+/* Computing MAX */
+ i__1 = 1, i__2 = mr + nc;
+ if ((doublereal) (llb + uub) < (doublereal) max(i__1,i__2) * .3) {
+ givens = TRUE_;
+ }
+ } else {
+ if (llb << 1 < *m) {
+ givens = TRUE_;
+ }
+ }
+ if (*lda < *m && *lda >= minlda) {
+ givens = TRUE_;
+ }
+
+/* Set INFO if an error */
+
+ if (*m < 0) {
+ *info = -1;
+ } else if (*m != *n && isym != 1) {
+ *info = -1;
+ } else if (*n < 0) {
+ *info = -2;
+ } else if (idist == -1) {
+ *info = -3;
+ } else if (isym == -1) {
+ *info = -5;
+ } else if (abs(*mode) > 6) {
+ *info = -7;
+ } else if (*mode != 0 && abs(*mode) != 6 && *cond < 1.) {
+ *info = -8;
+ } else if (*kl < 0) {
+ *info = -10;
+ } else if (*ku < 0 || isym != 1 && *kl != *ku) {
+ *info = -11;
+ } else if (ipack == -1 || isympk == 1 && isym == 1 || isympk == 2 && isym
+ == 1 && *kl > 0 || isympk == 3 && isym == 1 && *ku > 0 || isympk
+ != 0 && *m != *n) {
+ *info = -12;
+ } else if (*lda < max(1,minlda)) {
+ *info = -14;
+ }
+
+ if (*info != 0) {
+ i__1 = -(*info);
+ xerbla_("ZLATMS", &i__1);
+ return 0;
+ }
+
+/* Initialize random number generator */
+
+ for (i = 1; i <= 4; ++i) {
+ iseed[i] = (i__1 = iseed[i], abs(i__1)) % 4096;
+/* L10: */
+ }
+
+ if (iseed[4] % 2 != 1) {
+ ++iseed[4];
+ }
+
+/* 2) Set up D if indicated.
+
+ Compute D according to COND and MODE */
+
+ dlatm1_(mode, cond, &irsign, &idist, &iseed[1], &d[1], &mnmin, &iinfo);
+ if (iinfo != 0) {
+ *info = 1;
+ return 0;
+ }
+
+/* Choose Top-Down if D is (apparently) increasing,
+ Bottom-Up if D is (apparently) decreasing. */
+
+ if (abs(d[1]) <= (d__1 = d[mnmin], abs(d__1))) {
+ topdwn = TRUE_;
+ } else {
+ topdwn = FALSE_;
+ }
+
+ if (*mode != 0 && abs(*mode) != 6) {
+
+/* Scale by DMAX */
+
+ temp = abs(d[1]);
+ i__1 = mnmin;
+ for (i = 2; i <= i__1; ++i) {
+/* Computing MAX */
+ d__2 = temp, d__3 = (d__1 = d[i], abs(d__1));
+ temp = max(d__2,d__3);
+/* L20: */
+ }
+
+ if (temp > 0.) {
+ alpha = *dmax__ / temp;
+ } else {
+ *info = 2;
+ return 0;
+ }
+
+ dscal_(&mnmin, &alpha, &d[1], &c__1);
+
+ }
+
+ zlaset_("Full", lda, n, &c_b1, &c_b1, &a[a_offset], lda);
+
+/* 3) Generate Banded Matrix using Givens rotations.
+ Also the special case of UUB=LLB=0
+
+ Compute Addressing constants to cover all
+ storage formats. Whether GE, HE, SY, GB, HB, or SB,
+ upper or lower triangle or both,
+ the (i,j)-th element is in
+ A( i - ISKEW*j + IOFFST, j ) */
+
+ if (ipack > 4) {
+ ilda = *lda - 1;
+ iskew = 1;
+ if (ipack > 5) {
+ ioffst = uub + 1;
+ } else {
+ ioffst = 1;
+ }
+ } else {
+ ilda = *lda;
+ iskew = 0;
+ ioffst = 0;
+ }
+
+/* IPACKG is the format that the matrix is generated in. If this is
+ different from IPACK, then the matrix must be repacked at the
+ end. It also signals how to compute the norm, for scaling. */
+
+ ipackg = 0;
+
+/* Diagonal Matrix -- We are done, unless it
+ is to be stored HP/SP/PP/TP (PACK='R' or 'C') */
+
+ if (llb == 0 && uub == 0) {
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = (1 - iskew) * j + ioffst + j * a_dim1;
+ i__3 = j;
+ z__1.r = d[i__3], z__1.i = 0.;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+/* L30: */
+ }
+
+ if (ipack <= 2 || ipack >= 5) {
+ ipackg = ipack;
+ }
+
+ } else if (givens) {
+
+/* Check whether to use Givens rotations,
+ Householder transformations, or nothing. */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ if (ipack > 4) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = (1 - iskew) * j + ioffst + j * a_dim1;
+ i__3 = j;
+ z__1.r = d[i__3], z__1.i = 0.;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+/* L40: */
+ }
+
+ if (topdwn) {
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ Last row actually rotated is M
+ Last column actually rotated is MIN( M+
+JKU, N )
+
+ Computing MIN */
+ i__3 = *m + jku;
+ i__2 = min(i__3,*n) + jkl - 1;
+ for (jr = 1; jr <= i__2; ++jr) {
+ extra.r = 0., extra.i = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ d__1 = cos(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ c.r = z__1.r, c.i = z__1.i;
+ d__1 = sin(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MAX */
+ i__3 = 1, i__4 = jr - jkl;
+ icol = max(i__3,i__4);
+ if (jr < *m) {
+/* Computing MIN */
+ i__3 = *n, i__4 = jr + jku;
+ il = min(i__3,i__4) + 1 - icol;
+ L__1 = jr > jkl;
+ zlarot_(&c_true, &L__1, &c_false, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ir = jr;
+ ic = icol;
+ i__3 = -jkl - jku;
+ for (jch = jr - jkl; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ir < *m) {
+ zlartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &realc,
+ &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__2.r = realc * dummy.r, z__2.i = realc *
+ dummy.i;
+ d_cnjg(&z__1, &z__2);
+ c.r = z__1.r, c.i = z__1.i;
+ z__3.r = -s.r, z__3.i = -s.i;
+ z__2.r = z__3.r * dummy.r - z__3.i * dummy.i,
+ z__2.i = z__3.r * dummy.i + z__3.i *
+ dummy.r;
+ d_cnjg(&z__1, &z__2);
+ s.r = z__1.r, s.i = z__1.i;
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ ctemp.r = 0., ctemp.i = 0.;
+ iltemp = jch > jku;
+ zlarot_(&c_false, &iltemp, &c_true, &il, &c, &s, &
+ a[irow - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &ctemp, &extra);
+ if (iltemp) {
+ zlartg_(&a[irow + 1 - iskew * (ic + 1) +
+ ioffst + (ic + 1) * a_dim1], &ctemp, &
+ realc, &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__2.r = realc * dummy.r, z__2.i = realc *
+ dummy.i;
+ d_cnjg(&z__1, &z__2);
+ c.r = z__1.r, c.i = z__1.i;
+ z__3.r = -s.r, z__3.i = -s.i;
+ z__2.r = z__3.r * dummy.r - z__3.i * dummy.i,
+ z__2.i = z__3.r * dummy.i + z__3.i *
+ dummy.r;
+ d_cnjg(&z__1, &z__2);
+ s.r = z__1.r, s.i = z__1.i;
+
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jku - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ extra.r = 0., extra.i = 0.;
+ L__1 = jch > jku + jkl;
+ zlarot_(&c_true, &L__1, &c_true, &il, &c, &s,
+ &a[irow - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &extra, &ctemp)
+ ;
+ ic = icol;
+ ir = irow;
+ }
+/* L50: */
+ }
+/* L60: */
+ }
+/* L70: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ Computing MIN */
+ i__3 = *n + jkl;
+ i__2 = min(i__3,*m) + jku - 1;
+ for (jc = 1; jc <= i__2; ++jc) {
+ extra.r = 0., extra.i = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ d__1 = cos(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ c.r = z__1.r, c.i = z__1.i;
+ d__1 = sin(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MAX */
+ i__3 = 1, i__4 = jc - jku;
+ irow = max(i__3,i__4);
+ if (jc < *n) {
+/* Computing MIN */
+ i__3 = *m, i__4 = jc + jkl;
+ il = min(i__3,i__4) + 1 - irow;
+ L__1 = jc > jku;
+ zlarot_(&c_false, &L__1, &c_false, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &extra, &dummy);
+ }
+
+/* Chase "EXTRA" back up */
+
+ ic = jc;
+ ir = irow;
+ i__3 = -jkl - jku;
+ for (jch = jc - jku; i__3 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__3) {
+ if (ic < *n) {
+ zlartg_(&a[ir + 1 - iskew * (ic + 1) + ioffst
+ + (ic + 1) * a_dim1], &extra, &realc,
+ &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__2.r = realc * dummy.r, z__2.i = realc *
+ dummy.i;
+ d_cnjg(&z__1, &z__2);
+ c.r = z__1.r, c.i = z__1.i;
+ z__3.r = -s.r, z__3.i = -s.i;
+ z__2.r = z__3.r * dummy.r - z__3.i * dummy.i,
+ z__2.i = z__3.r * dummy.i + z__3.i *
+ dummy.r;
+ d_cnjg(&z__1, &z__2);
+ s.r = z__1.r, s.i = z__1.i;
+ }
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl;
+ icol = max(i__4,i__5);
+ il = ic + 2 - icol;
+ ctemp.r = 0., ctemp.i = 0.;
+ iltemp = jch > jkl;
+ zlarot_(&c_true, &iltemp, &c_true, &il, &c, &s, &
+ a[ir - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &ctemp, &extra);
+ if (iltemp) {
+ zlartg_(&a[ir + 1 - iskew * (icol + 1) +
+ ioffst + (icol + 1) * a_dim1], &ctemp,
+ &realc, &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__2.r = realc * dummy.r, z__2.i = realc *
+ dummy.i;
+ d_cnjg(&z__1, &z__2);
+ c.r = z__1.r, c.i = z__1.i;
+ z__3.r = -s.r, z__3.i = -s.i;
+ z__2.r = z__3.r * dummy.r - z__3.i * dummy.i,
+ z__2.i = z__3.r * dummy.i + z__3.i *
+ dummy.r;
+ d_cnjg(&z__1, &z__2);
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MAX */
+ i__4 = 1, i__5 = jch - jkl - jku;
+ irow = max(i__4,i__5);
+ il = ir + 2 - irow;
+ extra.r = 0., extra.i = 0.;
+ L__1 = jch > jkl + jku;
+ zlarot_(&c_false, &L__1, &c_true, &il, &c, &s,
+ &a[irow - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &extra, &ctemp)
+ ;
+ ic = icol;
+ ir = irow;
+ }
+/* L80: */
+ }
+/* L90: */
+ }
+/* L100: */
+ }
+
+ } else {
+
+/* Bottom-Up -- Start at the bottom right. */
+
+ jkl = 0;
+ i__1 = uub;
+ for (jku = 1; jku <= i__1; ++jku) {
+
+/* Transform from bandwidth JKL, JKU-1 to
+JKL, JKU
+
+ First row actually rotated is M
+ First column actually rotated is MIN( M
++JKU, N )
+
+ Computing MIN */
+ i__2 = *m, i__3 = *n + jkl;
+ iendch = min(i__2,i__3) - 1;
+/* Computing MIN */
+ i__2 = *m + jku;
+ i__3 = 1 - jkl;
+ for (jc = min(i__2,*n) - 1; jc >= i__3; --jc) {
+ extra.r = 0., extra.i = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ d__1 = cos(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ c.r = z__1.r, c.i = z__1.i;
+ d__1 = sin(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - jku + 1;
+ irow = max(i__2,i__4);
+ if (jc > 0) {
+/* Computing MIN */
+ i__2 = *m, i__4 = jc + jkl + 1;
+ il = min(i__2,i__4) + 1 - irow;
+ L__1 = jc + jkl < *m;
+ zlarot_(&c_false, &c_false, &L__1, &il, &c, &s, &
+ a[irow - iskew * jc + ioffst + jc *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ic = jc;
+ i__2 = iendch;
+ i__4 = jkl + jku;
+ for (jch = jc + jkl; i__4 < 0 ? jch >= i__2 : jch <=
+ i__2; jch += i__4) {
+ ilextr = ic > 0;
+ if (ilextr) {
+ zlartg_(&a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &extra, &realc, &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__1.r = realc * dummy.r, z__1.i = realc *
+ dummy.i;
+ c.r = z__1.r, c.i = z__1.i;
+ z__1.r = s.r * dummy.r - s.i * dummy.i,
+ z__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = z__1.r, s.i = z__1.i;
+ }
+ ic = max(1,ic);
+/* Computing MIN */
+ i__5 = *n - 1, i__6 = jch + jku;
+ icol = min(i__5,i__6);
+ iltemp = jch + jku < *n;
+ ctemp.r = 0., ctemp.i = 0.;
+ i__5 = icol + 2 - ic;
+ zlarot_(&c_true, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[jch - iskew * ic + ioffst + ic *
+ a_dim1], &ilda, &extra, &ctemp);
+ if (iltemp) {
+ zlartg_(&a[jch - iskew * icol + ioffst + icol
+ * a_dim1], &ctemp, &realc, &s, &dummy)
+ ;
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__1.r = realc * dummy.r, z__1.i = realc *
+ dummy.i;
+ c.r = z__1.r, c.i = z__1.i;
+ z__1.r = s.r * dummy.r - s.i * dummy.i,
+ z__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra.r = 0., extra.i = 0.;
+ L__1 = jch + jkl + jku <= iendch;
+ zlarot_(&c_false, &c_true, &L__1, &il, &c, &s,
+ &a[jch - iskew * icol + ioffst +
+ icol * a_dim1], &ilda, &ctemp, &extra)
+ ;
+ ic = icol;
+ }
+/* L110: */
+ }
+/* L120: */
+ }
+/* L130: */
+ }
+
+ jku = uub;
+ i__1 = llb;
+ for (jkl = 1; jkl <= i__1; ++jkl) {
+
+/* Transform from bandwidth JKL-1, JKU to
+JKL, JKU
+
+ First row actually rotated is MIN( N+JK
+L, M )
+ First column actually rotated is N
+
+ Computing MIN */
+ i__3 = *n, i__4 = *m + jku;
+ iendch = min(i__3,i__4) - 1;
+/* Computing MIN */
+ i__3 = *n + jkl;
+ i__4 = 1 - jku;
+ for (jr = min(i__3,*m) - 1; jr >= i__4; --jr) {
+ extra.r = 0., extra.i = 0.;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ d__1 = cos(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ c.r = z__1.r, c.i = z__1.i;
+ d__1 = sin(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MAX */
+ i__3 = 1, i__2 = jr - jkl + 1;
+ icol = max(i__3,i__2);
+ if (jr > 0) {
+/* Computing MIN */
+ i__3 = *n, i__2 = jr + jku + 1;
+ il = min(i__3,i__2) + 1 - icol;
+ L__1 = jr + jku < *n;
+ zlarot_(&c_true, &c_false, &L__1, &il, &c, &s, &a[
+ jr - iskew * icol + ioffst + icol *
+ a_dim1], &ilda, &dummy, &extra);
+ }
+
+/* Chase "EXTRA" back down */
+
+ ir = jr;
+ i__3 = iendch;
+ i__2 = jkl + jku;
+ for (jch = jr + jku; i__2 < 0 ? jch >= i__3 : jch <=
+ i__3; jch += i__2) {
+ ilextr = ir > 0;
+ if (ilextr) {
+ zlartg_(&a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &extra, &realc, &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__1.r = realc * dummy.r, z__1.i = realc *
+ dummy.i;
+ c.r = z__1.r, c.i = z__1.i;
+ z__1.r = s.r * dummy.r - s.i * dummy.i,
+ z__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = z__1.r, s.i = z__1.i;
+ }
+ ir = max(1,ir);
+/* Computing MIN */
+ i__5 = *m - 1, i__6 = jch + jkl;
+ irow = min(i__5,i__6);
+ iltemp = jch + jkl < *m;
+ ctemp.r = 0., ctemp.i = 0.;
+ i__5 = irow + 2 - ir;
+ zlarot_(&c_false, &ilextr, &iltemp, &i__5, &c, &s,
+ &a[ir - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &extra, &ctemp);
+ if (iltemp) {
+ zlartg_(&a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &ctemp, &realc, &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__1.r = realc * dummy.r, z__1.i = realc *
+ dummy.i;
+ c.r = z__1.r, c.i = z__1.i;
+ z__1.r = s.r * dummy.r - s.i * dummy.i,
+ z__1.i = s.r * dummy.i + s.i *
+ dummy.r;
+ s.r = z__1.r, s.i = z__1.i;
+/* Computing MIN */
+ i__5 = iendch, i__6 = jch + jkl + jku;
+ il = min(i__5,i__6) + 2 - jch;
+ extra.r = 0., extra.i = 0.;
+ L__1 = jch + jkl + jku <= iendch;
+ zlarot_(&c_true, &c_true, &L__1, &il, &c, &s,
+ &a[irow - iskew * jch + ioffst + jch *
+ a_dim1], &ilda, &ctemp, &extra);
+ ir = irow;
+ }
+/* L140: */
+ }
+/* L150: */
+ }
+/* L160: */
+ }
+
+ }
+
+ } else {
+
+/* Symmetric -- A = U D U'
+ Hermitian -- A = U D U* */
+
+ ipackg = ipack;
+ ioffg = ioffst;
+
+ if (topdwn) {
+
+/* Top-Down -- Generate Upper triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 6;
+ ioffg = uub + 1;
+ } else {
+ ipackg = 1;
+ }
+
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__4 = (1 - iskew) * j + ioffg + j * a_dim1;
+ i__2 = j;
+ z__1.r = d[i__2], z__1.i = 0.;
+ a[i__4].r = z__1.r, a[i__4].i = z__1.i;
+/* L170: */
+ }
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ i__4 = *n - 1;
+ for (jc = 1; jc <= i__4; ++jc) {
+/* Computing MAX */
+ i__2 = 1, i__3 = jc - k;
+ irow = max(i__2,i__3);
+/* Computing MIN */
+ i__2 = jc + 1, i__3 = k + 2;
+ il = min(i__2,i__3);
+ extra.r = 0., extra.i = 0.;
+ i__2 = jc - iskew * (jc + 1) + ioffg + (jc + 1) *
+ a_dim1;
+ ctemp.r = a[i__2].r, ctemp.i = a[i__2].i;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ d__1 = cos(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ c.r = z__1.r, c.i = z__1.i;
+ d__1 = sin(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ s.r = z__1.r, s.i = z__1.i;
+ if (zsym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ d_cnjg(&z__1, &ctemp);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ d_cnjg(&z__1, &c);
+ ct.r = z__1.r, ct.i = z__1.i;
+ d_cnjg(&z__1, &s);
+ st.r = z__1.r, st.i = z__1.i;
+ }
+ L__1 = jc > k;
+ zlarot_(&c_false, &L__1, &c_true, &il, &c, &s, &a[
+ irow - iskew * jc + ioffg + jc * a_dim1], &
+ ilda, &extra, &ctemp);
+/* Computing MIN */
+ i__3 = k, i__5 = *n - jc;
+ i__2 = min(i__3,i__5) + 1;
+ zlarot_(&c_true, &c_true, &c_false, &i__2, &ct, &st, &
+ a[(1 - iskew) * jc + ioffg + jc * a_dim1], &
+ ilda, &ctemp, &dummy);
+
+/* Chase EXTRA back up the matrix
+*/
+
+ icol = jc;
+ i__2 = -k;
+ for (jch = jc - k; i__2 < 0 ? jch >= 1 : jch <= 1;
+ jch += i__2) {
+ zlartg_(&a[jch + 1 - iskew * (icol + 1) + ioffg +
+ (icol + 1) * a_dim1], &extra, &realc, &s,
+ &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__2.r = realc * dummy.r, z__2.i = realc *
+ dummy.i;
+ d_cnjg(&z__1, &z__2);
+ c.r = z__1.r, c.i = z__1.i;
+ z__3.r = -s.r, z__3.i = -s.i;
+ z__2.r = z__3.r * dummy.r - z__3.i * dummy.i,
+ z__2.i = z__3.r * dummy.i + z__3.i *
+ dummy.r;
+ d_cnjg(&z__1, &z__2);
+ s.r = z__1.r, s.i = z__1.i;
+ i__3 = jch - iskew * (jch + 1) + ioffg + (jch + 1)
+ * a_dim1;
+ ctemp.r = a[i__3].r, ctemp.i = a[i__3].i;
+ if (zsym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ d_cnjg(&z__1, &ctemp);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ d_cnjg(&z__1, &c);
+ ct.r = z__1.r, ct.i = z__1.i;
+ d_cnjg(&z__1, &s);
+ st.r = z__1.r, st.i = z__1.i;
+ }
+ i__3 = k + 2;
+ zlarot_(&c_true, &c_true, &c_true, &i__3, &c, &s,
+ &a[(1 - iskew) * jch + ioffg + jch *
+ a_dim1], &ilda, &ctemp, &extra);
+/* Computing MAX */
+ i__3 = 1, i__5 = jch - k;
+ irow = max(i__3,i__5);
+/* Computing MIN */
+ i__3 = jch + 1, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra.r = 0., extra.i = 0.;
+ L__1 = jch > k;
+ zlarot_(&c_false, &L__1, &c_true, &il, &ct, &st, &
+ a[irow - iskew * jch + ioffg + jch *
+ a_dim1], &ilda, &extra, &ctemp);
+ icol = jch;
+/* L180: */
+ }
+/* L190: */
+ }
+/* L200: */
+ }
+
+/* If we need lower triangle, copy from upper. No
+te that
+ the order of copying is chosen to work for 'q'
+ -> 'b' */
+
+ if (ipack != ipackg && ipack != 3) {
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ irow = ioffst - iskew * jc;
+ if (zsym) {
+/* Computing MIN */
+ i__2 = *n, i__3 = jc + uub;
+ i__4 = min(i__2,i__3);
+ for (jr = jc; jr <= i__4; ++jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ i__3 = jc - iskew * jr + ioffg + jr * a_dim1;
+ a[i__2].r = a[i__3].r, a[i__2].i = a[i__3].i;
+/* L210: */
+ }
+ } else {
+/* Computing MIN */
+ i__2 = *n, i__3 = jc + uub;
+ i__4 = min(i__2,i__3);
+ for (jr = jc; jr <= i__4; ++jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ d_cnjg(&z__1, &a[jc - iskew * jr + ioffg + jr
+ * a_dim1]);
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+/* L220: */
+ }
+ }
+/* L230: */
+ }
+ if (ipack == 5) {
+ i__1 = *n;
+ for (jc = *n - uub + 1; jc <= i__1; ++jc) {
+ i__4 = uub + 1;
+ for (jr = *n + 2 - jc; jr <= i__4; ++jr) {
+ i__2 = jr + jc * a_dim1;
+ a[i__2].r = 0., a[i__2].i = 0.;
+/* L240: */
+ }
+/* L250: */
+ }
+ }
+ if (ipackg == 6) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ } else {
+
+/* Bottom-Up -- Generate Lower triangle only */
+
+ if (ipack >= 5) {
+ ipackg = 5;
+ if (ipack == 6) {
+ ioffg = 1;
+ }
+ } else {
+ ipackg = 2;
+ }
+
+ i__1 = mnmin;
+ for (j = 1; j <= i__1; ++j) {
+ i__4 = (1 - iskew) * j + ioffg + j * a_dim1;
+ i__2 = j;
+ z__1.r = d[i__2], z__1.i = 0.;
+ a[i__4].r = z__1.r, a[i__4].i = z__1.i;
+/* L260: */
+ }
+
+ i__1 = uub;
+ for (k = 1; k <= i__1; ++k) {
+ for (jc = *n - 1; jc >= 1; --jc) {
+/* Computing MIN */
+ i__4 = *n + 1 - jc, i__2 = k + 2;
+ il = min(i__4,i__2);
+ extra.r = 0., extra.i = 0.;
+ i__4 = (1 - iskew) * jc + 1 + ioffg + jc * a_dim1;
+ ctemp.r = a[i__4].r, ctemp.i = a[i__4].i;
+ angle = dlarnd_(&c__1, &iseed[1]) *
+ 6.2831853071795864769252867663;
+ d__1 = cos(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ c.r = z__1.r, c.i = z__1.i;
+ d__1 = sin(angle);
+ zlarnd_(&z__2, &c__5, &iseed[1]);
+ z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
+ s.r = z__1.r, s.i = z__1.i;
+ if (zsym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ d_cnjg(&z__1, &ctemp);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ d_cnjg(&z__1, &c);
+ ct.r = z__1.r, ct.i = z__1.i;
+ d_cnjg(&z__1, &s);
+ st.r = z__1.r, st.i = z__1.i;
+ }
+ L__1 = *n - jc > k;
+ zlarot_(&c_false, &c_true, &L__1, &il, &c, &s, &a[(1
+ - iskew) * jc + ioffg + jc * a_dim1], &ilda, &
+ ctemp, &extra);
+/* Computing MAX */
+ i__4 = 1, i__2 = jc - k + 1;
+ icol = max(i__4,i__2);
+ i__4 = jc + 2 - icol;
+ zlarot_(&c_true, &c_false, &c_true, &i__4, &ct, &st, &
+ a[jc - iskew * icol + ioffg + icol * a_dim1],
+ &ilda, &dummy, &ctemp);
+
+/* Chase EXTRA back down the matrix
+ */
+
+ icol = jc;
+ i__4 = *n - 1;
+ i__2 = k;
+ for (jch = jc + k; i__2 < 0 ? jch >= i__4 : jch <=
+ i__4; jch += i__2) {
+ zlartg_(&a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &extra, &realc, &s, &dummy);
+ zlarnd_(&z__1, &c__5, &iseed[1]);
+ dummy.r = z__1.r, dummy.i = z__1.i;
+ z__1.r = realc * dummy.r, z__1.i = realc *
+ dummy.i;
+ c.r = z__1.r, c.i = z__1.i;
+ z__1.r = s.r * dummy.r - s.i * dummy.i, z__1.i =
+ s.r * dummy.i + s.i * dummy.r;
+ s.r = z__1.r, s.i = z__1.i;
+ i__3 = (1 - iskew) * jch + 1 + ioffg + jch *
+ a_dim1;
+ ctemp.r = a[i__3].r, ctemp.i = a[i__3].i;
+ if (zsym) {
+ ct.r = c.r, ct.i = c.i;
+ st.r = s.r, st.i = s.i;
+ } else {
+ d_cnjg(&z__1, &ctemp);
+ ctemp.r = z__1.r, ctemp.i = z__1.i;
+ d_cnjg(&z__1, &c);
+ ct.r = z__1.r, ct.i = z__1.i;
+ d_cnjg(&z__1, &s);
+ st.r = z__1.r, st.i = z__1.i;
+ }
+ i__3 = k + 2;
+ zlarot_(&c_true, &c_true, &c_true, &i__3, &c, &s,
+ &a[jch - iskew * icol + ioffg + icol *
+ a_dim1], &ilda, &extra, &ctemp);
+/* Computing MIN */
+ i__3 = *n + 1 - jch, i__5 = k + 2;
+ il = min(i__3,i__5);
+ extra.r = 0., extra.i = 0.;
+ L__1 = *n - jch > k;
+ zlarot_(&c_false, &c_true, &L__1, &il, &ct, &st, &
+ a[(1 - iskew) * jch + ioffg + jch *
+ a_dim1], &ilda, &ctemp, &extra);
+ icol = jch;
+/* L270: */
+ }
+/* L280: */
+ }
+/* L290: */
+ }
+
+/* If we need upper triangle, copy from lower. No
+te that
+ the order of copying is chosen to work for 'b'
+ -> 'q' */
+
+ if (ipack != ipackg && ipack != 4) {
+ for (jc = *n; jc >= 1; --jc) {
+ irow = ioffst - iskew * jc;
+ if (zsym) {
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - uub;
+ i__1 = max(i__2,i__4);
+ for (jr = jc; jr >= i__1; --jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ i__4 = jc - iskew * jr + ioffg + jr * a_dim1;
+ a[i__2].r = a[i__4].r, a[i__2].i = a[i__4].i;
+/* L300: */
+ }
+ } else {
+/* Computing MAX */
+ i__2 = 1, i__4 = jc - uub;
+ i__1 = max(i__2,i__4);
+ for (jr = jc; jr >= i__1; --jr) {
+ i__2 = jr + irow + jc * a_dim1;
+ d_cnjg(&z__1, &a[jc - iskew * jr + ioffg + jr
+ * a_dim1]);
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+/* L310: */
+ }
+ }
+/* L320: */
+ }
+ if (ipack == 6) {
+ i__1 = uub;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ i__4 = jr + jc * a_dim1;
+ a[i__4].r = 0., a[i__4].i = 0.;
+/* L330: */
+ }
+/* L340: */
+ }
+ }
+ if (ipackg == 5) {
+ ipackg = ipack;
+ } else {
+ ipackg = 0;
+ }
+ }
+ }
+
+/* Ensure that the diagonal is real if Hermitian */
+
+ if (! zsym) {
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ irow = ioffst + (1 - iskew) * jc;
+ i__2 = irow + jc * a_dim1;
+ i__4 = irow + jc * a_dim1;
+ d__1 = a[i__4].r;
+ z__1.r = d__1, z__1.i = 0.;
+ a[i__2].r = z__1.r, a[i__2].i = z__1.i;
+/* L350: */
+ }
+ }
+
+ }
+
+ } else {
+
+/* 4) Generate Banded Matrix by first
+ Rotating by random Unitary matrices,
+ then reducing the bandwidth using Householder
+ transformations.
+
+ Note: we should get here only if LDA .ge. N */
+
+ if (isym == 1) {
+
+/* Non-symmetric -- A = U D V */
+
+ zlagge_(&mr, &nc, &llb, &uub, &d[1], &a[a_offset], lda, &iseed[1],
+ &work[1], &iinfo);
+ } else {
+
+/* Symmetric -- A = U D U' or
+ Hermitian -- A = U D U* */
+
+ if (zsym) {
+ zlagsy_(m, &llb, &d[1], &a[a_offset], lda, &iseed[1], &work[1]
+ , &iinfo);
+ } else {
+ zlaghe_(m, &llb, &d[1], &a[a_offset], lda, &iseed[1], &work[1]
+ , &iinfo);
+ }
+ }
+
+ if (iinfo != 0) {
+ *info = 3;
+ return 0;
+ }
+ }
+
+/* 5) Pack the matrix */
+
+ if (ipack != ipackg) {
+ if (ipack == 1) {
+
+/* 'U' -- Upper triangular, not packed */
+
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j + 1; i <= i__2; ++i) {
+ i__4 = i + j * a_dim1;
+ a[i__4].r = 0., a[i__4].i = 0.;
+/* L360: */
+ }
+/* L370: */
+ }
+
+ } else if (ipack == 2) {
+
+/* 'L' -- Lower triangular, not packed */
+
+ i__1 = *m;
+ for (j = 2; j <= i__1; ++j) {
+ i__2 = j - 1;
+ for (i = 1; i <= i__2; ++i) {
+ i__4 = i + j * a_dim1;
+ a[i__4].r = 0., a[i__4].i = 0.;
+/* L380: */
+ }
+/* L390: */
+ }
+
+ } else if (ipack == 3) {
+
+/* 'C' -- Upper triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = j;
+ for (i = 1; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ i__4 = irow + icol * a_dim1;
+ i__3 = i + j * a_dim1;
+ a[i__4].r = a[i__3].r, a[i__4].i = a[i__3].i;
+/* L400: */
+ }
+/* L410: */
+ }
+
+ } else if (ipack == 4) {
+
+/* 'R' -- Lower triangle packed Columnwise. */
+
+ icol = 1;
+ irow = 0;
+ i__1 = *m;
+ for (j = 1; j <= i__1; ++j) {
+ i__2 = *m;
+ for (i = j; i <= i__2; ++i) {
+ ++irow;
+ if (irow > *lda) {
+ irow = 1;
+ ++icol;
+ }
+ i__4 = irow + icol * a_dim1;
+ i__3 = i + j * a_dim1;
+ a[i__4].r = a[i__3].r, a[i__4].i = a[i__3].i;
+/* L420: */
+ }
+/* L430: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* 'B' -- The lower triangle is packed as a band matrix.
+
+ 'Q' -- The upper triangle is packed as a band matrix.
+
+ 'Z' -- The whole matrix is packed as a band matrix.
+*/
+
+ if (ipack == 5) {
+ uub = 0;
+ }
+ if (ipack == 6) {
+ llb = 0;
+ }
+
+ i__1 = uub;
+ for (j = 1; j <= i__1; ++j) {
+/* Computing MIN */
+ i__2 = j + llb;
+ for (i = min(i__2,*m); i >= 1; --i) {
+ i__2 = i - j + uub + 1 + j * a_dim1;
+ i__4 = i + j * a_dim1;
+ a[i__2].r = a[i__4].r, a[i__2].i = a[i__4].i;
+/* L440: */
+ }
+/* L450: */
+ }
+
+ i__1 = *n;
+ for (j = uub + 2; j <= i__1; ++j) {
+/* Computing MIN */
+ i__4 = j + llb;
+ i__2 = min(i__4,*m);
+ for (i = j - uub; i <= i__2; ++i) {
+ i__4 = i - j + uub + 1 + j * a_dim1;
+ i__3 = i + j * a_dim1;
+ a[i__4].r = a[i__3].r, a[i__4].i = a[i__3].i;
+/* L460: */
+ }
+/* L470: */
+ }
+ }
+
+/* If packed, zero out extraneous elements.
+
+ Symmetric/Triangular Packed --
+ zero out everything after A(IROW,ICOL) */
+
+ if (ipack == 3 || ipack == 4) {
+ i__1 = *m;
+ for (jc = icol; jc <= i__1; ++jc) {
+ i__2 = *lda;
+ for (jr = irow + 1; jr <= i__2; ++jr) {
+ i__4 = jr + jc * a_dim1;
+ a[i__4].r = 0., a[i__4].i = 0.;
+/* L480: */
+ }
+ irow = 0;
+/* L490: */
+ }
+
+ } else if (ipack >= 5) {
+
+/* Packed Band --
+ 1st row is now in A( UUB+2-j, j), zero above it
+ m-th row is now in A( M+UUB-j,j), zero below it
+ last non-zero diagonal is now in A( UUB+LLB+1,j ),
+
+ zero below it, too. */
+
+ ir1 = uub + llb + 2;
+ ir2 = uub + *m + 2;
+ i__1 = *n;
+ for (jc = 1; jc <= i__1; ++jc) {
+ i__2 = uub + 1 - jc;
+ for (jr = 1; jr <= i__2; ++jr) {
+ i__4 = jr + jc * a_dim1;
+ a[i__4].r = 0., a[i__4].i = 0.;
+/* L500: */
+ }
+/* Computing MAX
+ Computing MIN */
+ i__3 = ir1, i__5 = ir2 - jc;
+ i__2 = 1, i__4 = min(i__3,i__5);
+ i__6 = *lda;
+ for (jr = max(i__2,i__4); jr <= i__6; ++jr) {
+ i__2 = jr + jc * a_dim1;
+ a[i__2].r = 0., a[i__2].i = 0.;
+/* L510: */
+ }
+/* L520: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZLATMS */
+
+} /* zlatms_ */
+
diff --git a/TESTING/MATGEN/zsymv.c b/TESTING/MATGEN/zsymv.c
new file mode 100644
index 0000000..49c1b34
--- /dev/null
+++ b/TESTING/MATGEN/zsymv.c
@@ -0,0 +1,408 @@
+#include "f2c.h"
+
+/* Subroutine */ int zsymv_(char *uplo, integer *n, doublecomplex *alpha,
+ doublecomplex *a, integer *lda, doublecomplex *x, integer *incx,
+ doublecomplex *beta, doublecomplex *y, integer *incy)
+{
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ ZSYMV performs the matrix-vector operation
+
+ y := alpha*A*x + beta*y,
+
+ where alpha and beta are scalars, x and y are n element vectors and
+ A is an n by n symmetric matrix.
+
+ Arguments
+ ==========
+
+ UPLO - CHARACTER*1
+ On entry, UPLO specifies whether the upper or lower
+ triangular part of the array A is to be referenced as
+ follows:
+
+ UPLO = 'U' or 'u' Only the upper triangular part of A
+ is to be referenced.
+
+ UPLO = 'L' or 'l' Only the lower triangular part of A
+ is to be referenced.
+
+ Unchanged on exit.
+
+ N - INTEGER
+ On entry, N specifies the order of the matrix A.
+ N must be at least zero.
+ Unchanged on exit.
+
+ ALPHA - COMPLEX*16
+ On entry, ALPHA specifies the scalar alpha.
+ Unchanged on exit.
+
+ A - COMPLEX*16 array, dimension ( LDA, N )
+ Before entry, with UPLO = 'U' or 'u', the leading n by n
+ upper triangular part of the array A must contain the upper
+
+ triangular part of the symmetric matrix and the strictly
+ lower triangular part of A is not referenced.
+ Before entry, with UPLO = 'L' or 'l', the leading n by n
+ lower triangular part of the array A must contain the lower
+
+ triangular part of the symmetric matrix and the strictly
+ upper triangular part of A is not referenced.
+ Unchanged on exit.
+
+ LDA - INTEGER
+ On entry, LDA specifies the first dimension of A as declared
+
+ in the calling (sub) program. LDA must be at least
+ max( 1, N ).
+ Unchanged on exit.
+
+ X - COMPLEX*16 array, dimension at least
+ ( 1 + ( N - 1 )*abs( INCX ) ).
+ Before entry, the incremented array X must contain the N-
+ element vector x.
+ Unchanged on exit.
+
+ INCX - INTEGER
+ On entry, INCX specifies the increment for the elements of
+ X. INCX must not be zero.
+ Unchanged on exit.
+
+ BETA - COMPLEX*16
+ On entry, BETA specifies the scalar beta. When BETA is
+ supplied as zero then Y need not be set on input.
+ Unchanged on exit.
+
+ Y - COMPLEX*16 array, dimension at least
+ ( 1 + ( N - 1 )*abs( INCY ) ).
+ Before entry, the incremented array Y must contain the n
+ element vector y. On exit, Y is overwritten by the updated
+ vector y.
+
+ INCY - INTEGER
+ On entry, INCY specifies the increment for the elements of
+ Y. INCY must not be zero.
+ Unchanged on exit.
+
+ =====================================================================
+
+
+
+ Test the input parameters.
+
+
+ Parameter adjustments
+ Function Body */
+ /* System generated locals */
+ integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+ doublecomplex z__1, z__2, z__3, z__4;
+ /* Local variables */
+ static integer info;
+ static doublecomplex temp1, temp2;
+ static integer i, j;
+ extern logical lsame_(char *, char *);
+ static integer ix, iy, jx, jy, kx, ky;
+ extern /* Subroutine */ int xerbla_(char *, integer *);
+
+
+#define X(I) x[(I)-1]
+#define Y(I) y[(I)-1]
+
+#define A(I,J) a[(I)-1 + ((J)-1)* ( *lda)]
+
+ info = 0;
+ if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
+ info = 1;
+ } else if (*n < 0) {
+ info = 2;
+ } else if (*lda < max(1,*n)) {
+ info = 5;
+ } else if (*incx == 0) {
+ info = 7;
+ } else if (*incy == 0) {
+ info = 10;
+ }
+ if (info != 0) {
+ xerbla_("ZSYMV ", &info);
+ return 0;
+ }
+
+/* Quick return if possible. */
+
+ if (*n == 0 || alpha->r == 0. && alpha->i == 0. && (beta->r == 1. &&
+ beta->i == 0.)) {
+ return 0;
+ }
+
+/* Set up the start points in X and Y. */
+
+ if (*incx > 0) {
+ kx = 1;
+ } else {
+ kx = 1 - (*n - 1) * *incx;
+ }
+ if (*incy > 0) {
+ ky = 1;
+ } else {
+ ky = 1 - (*n - 1) * *incy;
+ }
+
+/* Start the operations. In this version the elements of A are
+ accessed sequentially with one pass through the triangular part
+ of A.
+
+ First form y := beta*y. */
+
+ if (beta->r != 1. || beta->i != 0.) {
+ if (*incy == 1) {
+ if (beta->r == 0. && beta->i == 0.) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ Y(i).r = 0., Y(i).i = 0.;
+/* L10: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = i;
+ i__3 = i;
+ z__1.r = beta->r * Y(i).r - beta->i * Y(i).i,
+ z__1.i = beta->r * Y(i).i + beta->i * Y(i)
+ .r;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+/* L20: */
+ }
+ }
+ } else {
+ iy = ky;
+ if (beta->r == 0. && beta->i == 0.) {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ Y(iy).r = 0., Y(iy).i = 0.;
+ iy += *incy;
+/* L30: */
+ }
+ } else {
+ i__1 = *n;
+ for (i = 1; i <= *n; ++i) {
+ i__2 = iy;
+ i__3 = iy;
+ z__1.r = beta->r * Y(iy).r - beta->i * Y(iy).i,
+ z__1.i = beta->r * Y(iy).i + beta->i * Y(iy)
+ .r;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ iy += *incy;
+/* L40: */
+ }
+ }
+ }
+ }
+ if (alpha->r == 0. && alpha->i == 0.) {
+ return 0;
+ }
+ if (lsame_(uplo, "U")) {
+
+/* Form y when A is stored in upper triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ z__1.r = alpha->r * X(j).r - alpha->i * X(j).i, z__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(i).r + z__2.r, z__1.i = Y(i).i + z__2.i;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ z__2.r = A(i,j).r * X(i).r - A(i,j).i * X(i).i,
+ z__2.i = A(i,j).r * X(i).i + A(i,j).i * X(
+ i).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+/* L50: */
+ }
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ z__3.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, z__3.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ z__2.r = Y(j).r + z__3.r, z__2.i = Y(j).i + z__3.i;
+ z__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ Y(j).r = z__1.r, Y(j).i = z__1.i;
+/* L60: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ z__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, z__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ ix = kx;
+ iy = ky;
+ i__2 = j - 1;
+ for (i = 1; i <= j-1; ++i) {
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(iy).r + z__2.r, z__1.i = Y(iy).i + z__2.i;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ z__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(ix).i,
+ z__2.i = A(i,j).r * X(ix).i + A(i,j).i * X(
+ ix).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+ ix += *incx;
+ iy += *incy;
+/* L70: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ z__3.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, z__3.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ z__2.r = Y(jy).r + z__3.r, z__2.i = Y(jy).i + z__3.i;
+ z__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L80: */
+ }
+ }
+ } else {
+
+/* Form y when A is stored in lower triangle. */
+
+ if (*incx == 1 && *incy == 1) {
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = j;
+ z__1.r = alpha->r * X(j).r - alpha->i * X(j).i, z__1.i =
+ alpha->r * X(j).i + alpha->i * X(j).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ i__2 = j;
+ i__3 = j;
+ i__4 = j + j * a_dim1;
+ z__2.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, z__2.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ z__1.r = Y(j).r + z__2.r, z__1.i = Y(j).i + z__2.i;
+ Y(j).r = z__1.r, Y(j).i = z__1.i;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ i__3 = i;
+ i__4 = i;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(i).r + z__2.r, z__1.i = Y(i).i + z__2.i;
+ Y(i).r = z__1.r, Y(i).i = z__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = i;
+ z__2.r = A(i,j).r * X(i).r - A(i,j).i * X(i).i,
+ z__2.i = A(i,j).r * X(i).i + A(i,j).i * X(
+ i).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+/* L90: */
+ }
+ i__2 = j;
+ i__3 = j;
+ z__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = Y(j).r + z__2.r, z__1.i = Y(j).i + z__2.i;
+ Y(j).r = z__1.r, Y(j).i = z__1.i;
+/* L100: */
+ }
+ } else {
+ jx = kx;
+ jy = ky;
+ i__1 = *n;
+ for (j = 1; j <= *n; ++j) {
+ i__2 = jx;
+ z__1.r = alpha->r * X(jx).r - alpha->i * X(jx).i, z__1.i =
+ alpha->r * X(jx).i + alpha->i * X(jx).r;
+ temp1.r = z__1.r, temp1.i = z__1.i;
+ temp2.r = 0., temp2.i = 0.;
+ i__2 = jy;
+ i__3 = jy;
+ i__4 = j + j * a_dim1;
+ z__2.r = temp1.r * A(j,j).r - temp1.i * A(j,j).i, z__2.i =
+ temp1.r * A(j,j).i + temp1.i * A(j,j).r;
+ z__1.r = Y(jy).r + z__2.r, z__1.i = Y(jy).i + z__2.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ ix = jx;
+ iy = jy;
+ i__2 = *n;
+ for (i = j + 1; i <= *n; ++i) {
+ ix += *incx;
+ iy += *incy;
+ i__3 = iy;
+ i__4 = iy;
+ i__5 = i + j * a_dim1;
+ z__2.r = temp1.r * A(i,j).r - temp1.i * A(i,j).i,
+ z__2.i = temp1.r * A(i,j).i + temp1.i * A(i,j)
+ .r;
+ z__1.r = Y(iy).r + z__2.r, z__1.i = Y(iy).i + z__2.i;
+ Y(iy).r = z__1.r, Y(iy).i = z__1.i;
+ i__3 = i + j * a_dim1;
+ i__4 = ix;
+ z__2.r = A(i,j).r * X(ix).r - A(i,j).i * X(ix).i,
+ z__2.i = A(i,j).r * X(ix).i + A(i,j).i * X(
+ ix).r;
+ z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;
+ temp2.r = z__1.r, temp2.i = z__1.i;
+/* L110: */
+ }
+ i__2 = jy;
+ i__3 = jy;
+ z__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i =
+ alpha->r * temp2.i + alpha->i * temp2.r;
+ z__1.r = Y(jy).r + z__2.r, z__1.i = Y(jy).i + z__2.i;
+ Y(jy).r = z__1.r, Y(jy).i = z__1.i;
+ jx += *incx;
+ jy += *incy;
+/* L120: */
+ }
+ }
+ }
+
+ return 0;
+
+/* End of ZSYMV */
+
+} /* zsymv_ */
+
diff --git a/TESTING/Makefile b/TESTING/Makefile
new file mode 100644
index 0000000..e8967e4
--- /dev/null
+++ b/TESTING/Makefile
@@ -0,0 +1,106 @@
+include ../make.inc
+
+#######################################################################
+# This makefile creates the test programs for the linear equation
+# routines in SuperLU. The test files are grouped as follows:
+#
+# ALINTST -- Auxiliary test routines
+# SLINTST -- Single precision real test routines
+# DLINTST -- Double precision real test routines
+# CLINTST -- Double precision complex test routines
+# ZLINTST -- Double precision complex test routines
+#
+# Test programs can be generated for all or some of the four different
+# precisions. Enter make followed by one or more of the data types
+# desired. Some examples:
+# make single
+# make single double
+# Alternatively, the command
+# make
+# without any arguments creates all four test programs.
+# The executable files are called
+# stest
+# dtest
+# ctest
+# ztest
+#
+# To remove the object files after the executable files have been
+# created, enter
+# make clean
+# On some systems, you can force the source files to be recompiled by
+# entering (for example)
+# make single FRC=FRC
+#
+#######################################################################
+
+HEADER = ../SRC
+
+ALINTST = sp_ienv.o
+
+SLINTST = sdrive.o sp_sconvert.o \
+ sp_sget01.o sp_sget02.o sp_sget04.o sp_sget07.o
+
+DLINTST = ddrive.o sp_dconvert.o \
+ sp_dget01.o sp_dget02.o sp_dget04.o sp_dget07.o
+
+CLINTST = cdrive.o sp_cconvert.o \
+ sp_cget01.o sp_cget02.o sp_cget04.o sp_cget07.o
+
+ZLINTST = zdrive.o sp_zconvert.o \
+ sp_zget01.o sp_zget02.o sp_zget04.o sp_zget07.o
+
+all: single double complex complex16
+
+single: ./stest stest.out
+
+./stest: $(SLINTST) $(ALINTST) ../$(SUPERLULIB) $(TMGLIB)
+ $(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
+ $(TMGLIB) ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+stest.out: stest stest.csh
+ @echo Testing SINGLE PRECISION linear equation routines
+ csh stest.csh
+
+double: ./dtest dtest.out
+
+./dtest: $(DLINTST) $(ALINTST) ../$(SUPERLULIB) $(TMGLIB)
+ $(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
+ $(TMGLIB) ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+dtest.out: dtest dtest.csh
+ @echo Testing DOUBLE PRECISION linear equation routines
+ csh dtest.csh
+
+complex: ./ctest ctest.out
+
+./ctest: $(CLINTST) $(ALINTST) ../$(SUPERLULIB) $(TMGLIB)
+ $(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
+ $(TMGLIB) ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+ctest.out: ctest ctest.csh
+ @echo Testing SINGLE COMPLEX linear equation routines
+ csh ctest.csh
+
+complex16: ./ztest ztest.out
+
+./ztest: $(ZLINTST) $(ALINTST) ../$(SUPERLULIB) $(TMGLIB)
+ $(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
+ $(TMGLIB) ../$(SUPERLULIB) $(BLASLIB) -lm -o $@
+
+ztest.out: ztest ztest.csh
+ @echo Testing DOUBLE COMPLEX linear equation routines
+ csh ztest.csh
+
+##################################
+# Do not optimize this routine #
+##################################
+dlamch.o: dlamch.c ; $(CC) -c $<
+
+timer.o: timer.c ; $(CC) -O -c $<
+
+.c.o:
+ $(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -c $< $(VERBOSE)
+
+clean:
+ rm -f *.o *test *.out
+
diff --git a/TESTING/cdrive.c b/TESTING/cdrive.c
new file mode 100644
index 0000000..2d9502f
--- /dev/null
+++ b/TESTING/cdrive.c
@@ -0,0 +1,538 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: cdrive.c
+ * Purpose: MAIN test program
+ */
+#include <string.h>
+#include "csp_defs.h"
+
+#define NTESTS 5 /* Number of test types */
+#define NTYPES 11 /* Number of matrix types */
+#define NTRAN 2
+#define THRESH 20.0
+#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
+#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
+#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
+
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * CDRIVE is the main test program for the COMPLEX linear
+ * equation driver routines CGSSV and CGSSVX.
+ *
+ * The program is invoked by a shell script file -- ctest.csh.
+ * The output from the tests are written into a file -- ctest.out.
+ *
+ * =====================================================================
+ */
+ complex *a, *a_save;
+ int *asub, *asub_save;
+ int *xa, *xa_save;
+ SuperMatrix A, B, X, L, U;
+ SuperMatrix ASAV, AC;
+ mem_usage_t mem_usage;
+ int *perm_r; /* row permutation from partial pivoting */
+ int *perm_c, *pc_save; /* column permutation */
+ int *etree;
+ complex zero = {0.0, 0.0};
+ float *R, *C;
+ float *ferr, *berr;
+ float *rwork;
+ complex *wwork;
+ void *work;
+ int info, lwork, nrhs, panel_size, relax;
+ int m, n, nnz;
+ complex *xact;
+ complex *rhsb, *solx, *bsav;
+ int ldb, ldx;
+ float rpg, rcond;
+ int i, j, k1;
+ float rowcnd, colcnd, amax;
+ int maxsuper, rowblk, colblk;
+ int prefact, nofact, equil, iequed;
+ int nt, nrun, nfail, nerrs, imat, fimat, nimat;
+ int nfact, ifact, itran;
+ int kl, ku, mode, lda;
+ int zerot, izero, ioff;
+ float anorm, cndnum, u, drop_tol = 0.;
+ complex *Afull;
+ float result[NTESTS];
+ superlu_options_t options;
+ fact_t fact;
+ trans_t trans;
+ SuperLUStat_t stat;
+ static char matrix_type[8];
+ static char equed[1], path[3], sym[1], dist[1];
+
+ /* Fixed set of parameters */
+ int iseed[] = {1988, 1989, 1990, 1991};
+ static char equeds[] = {'N', 'R', 'C', 'B'};
+ static fact_t facts[] = {FACTORED, DOFACT, SamePattern,
+ SamePattern_SameRowPerm};
+ static trans_t transs[] = {NOTRANS, TRANS, CONJ};
+
+ /* Some function prototypes */
+ static void parse_command_line();
+ extern int sp_cget01(int, int, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, float *);
+ extern int sp_cget02(trans_t, int, int, int, SuperMatrix *, complex *,
+ int, complex *, int, float *resid);
+ extern int sp_cget04(int, int, complex *, int,
+ complex *, int, float rcond, float *resid);
+ extern int sp_cget07(trans_t, int, int, SuperMatrix *, complex *, int,
+ complex *, int, complex *, int,
+ float *, float *, float *);
+ extern int clatb4_(char *, int *, int *, int *, char *, int *, int *,
+ float *, int *, float *, char *);
+ extern int clatms_(int *, int *, char *, int *, char *, float *d,
+ int *, float *, float *, int *, int *,
+ char *, complex *, int *, complex *, int *);
+ extern int sp_cconvert(int, int, complex *, int, int, int,
+ complex *a, int *, int *, int *);
+
+
+ /* Executable statements */
+
+ strcpy(path, "CGE");
+ nrun = 0;
+ nfail = 0;
+ nerrs = 0;
+
+ /* Defaults */
+ lwork = 0;
+ n = 1;
+ nrhs = 1;
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ u = 1.0;
+ strcpy(matrix_type, "LA");
+ parse_command_line(argc, argv, matrix_type, &n,
+ &panel_size, &relax, &nrhs, &maxsuper,
+ &rowblk, &colblk, &lwork, &u);
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ fprintf(stderr, "expert: cannot allocate %d bytes\n", lwork);
+ exit (-1);
+ }
+ }
+
+ /* Set the default input options. */
+ set_default_options(&options);
+ options.DiagPivotThresh = u;
+ options.PrintStat = NO;
+ options.PivotGrowth = YES;
+ options.ConditionNumber = YES;
+ options.IterRefine = SINGLE;
+
+ if ( strcmp(matrix_type, "LA") == 0 ) {
+ /* Test LAPACK matrix suite. */
+ m = n;
+ lda = SUPERLU_MAX(n, 1);
+ nnz = n * n; /* upper bound */
+ fimat = 1;
+ nimat = NTYPES;
+ Afull = complexCalloc(lda * n);
+ callocateA(n, nnz, &a, &asub, &xa);
+ } else {
+ /* Read a sparse matrix */
+ fimat = nimat = 0;
+ creadhb(&m, &n, &nnz, &a, &asub, &xa);
+ }
+
+ callocateA(n, nnz, &a_save, &asub_save, &xa_save);
+ rhsb = complexMalloc(m * nrhs);
+ bsav = complexMalloc(m * nrhs);
+ solx = complexMalloc(n * nrhs);
+ ldb = m;
+ ldx = n;
+ cCreate_Dense_Matrix(&B, m, nrhs, rhsb, ldb, SLU_DN, SLU_C, SLU_GE);
+ cCreate_Dense_Matrix(&X, n, nrhs, solx, ldx, SLU_DN, SLU_C, SLU_GE);
+ xact = complexMalloc(n * nrhs);
+ etree = intMalloc(n);
+ perm_r = intMalloc(n);
+ perm_c = intMalloc(n);
+ pc_save = intMalloc(n);
+ R = (float *) SUPERLU_MALLOC(m*sizeof(float));
+ C = (float *) SUPERLU_MALLOC(n*sizeof(float));
+ ferr = (float *) SUPERLU_MALLOC(nrhs*sizeof(float));
+ berr = (float *) SUPERLU_MALLOC(nrhs*sizeof(float));
+ j = SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs);
+ rwork = (float *) SUPERLU_MALLOC(j*sizeof(float));
+ for (i = 0; i < j; ++i) rwork[i] = 0.;
+ if ( !R ) ABORT("SUPERLU_MALLOC fails for R");
+ if ( !C ) ABORT("SUPERLU_MALLOC fails for C");
+ if ( !ferr ) ABORT("SUPERLU_MALLOC fails for ferr");
+ if ( !berr ) ABORT("SUPERLU_MALLOC fails for berr");
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ wwork = complexCalloc( SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs) );
+
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i] = i;
+ options.ColPerm = MY_PERMC;
+
+ for (imat = fimat; imat <= nimat; ++imat) { /* All matrix types */
+
+ if ( imat ) {
+
+ /* Skip types 5, 6, or 7 if the matrix size is too small. */
+ zerot = (imat >= 5 && imat <= 7);
+ if ( zerot && n < imat-4 )
+ continue;
+
+ /* Set up parameters with CLATB4 and generate a test matrix
+ with CLATMS. */
+ clatb4_(path, &imat, &n, &n, sym, &kl, &ku, &anorm, &mode,
+ &cndnum, dist);
+
+ clatms_(&n, &n, dist, iseed, sym, &rwork[0], &mode, &cndnum,
+ &anorm, &kl, &ku, "No packing", Afull, &lda,
+ &wwork[0], &info);
+
+ if ( info ) {
+ printf(FMT3, "CLATMS", info, izero, n, nrhs, imat, nfail);
+ continue;
+ }
+
+ /* For types 5-7, zero one or more columns of the matrix
+ to test that INFO is returned correctly. */
+ if ( zerot ) {
+ if ( imat == 5 ) izero = 1;
+ else if ( imat == 6 ) izero = n;
+ else izero = n / 2 + 1;
+ ioff = (izero - 1) * lda;
+ if ( imat < 7 ) {
+ for (i = 0; i < n; ++i) Afull[ioff + i] = zero;
+ } else {
+ for (j = 0; j < n - izero + 1; ++j)
+ for (i = 0; i < n; ++i)
+ Afull[ioff + i + j*lda] = zero;
+ }
+ } else {
+ izero = 0;
+ }
+
+ /* Convert to sparse representation. */
+ sp_cconvert(n, n, Afull, lda, kl, ku, a, asub, xa, &nnz);
+
+ } else {
+ izero = 0;
+ zerot = 0;
+ }
+
+ cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE);
+
+ /* Save a copy of matrix A in ASAV */
+ cCreate_CompCol_Matrix(&ASAV, m, n, nnz, a_save, asub_save, xa_save,
+ SLU_NC, SLU_C, SLU_GE);
+ cCopy_CompCol_Matrix(&A, &ASAV);
+
+ /* Form exact solution. */
+ cGenXtrue(n, nrhs, xact, ldx);
+
+ StatInit(&stat);
+
+ for (iequed = 0; iequed < 4; ++iequed) {
+ *equed = equeds[iequed];
+ if (iequed == 0) nfact = 4;
+ else nfact = 1; /* Only test factored, pre-equilibrated matrix */
+
+ for (ifact = 0; ifact < nfact; ++ifact) {
+ fact = facts[ifact];
+ options.Fact = fact;
+
+ for (equil = 0; equil < 2; ++equil) {
+ options.Equil = equil;
+ prefact = ( options.Fact == FACTORED ||
+ options.Fact == SamePattern_SameRowPerm );
+ /* Need a first factor */
+ nofact = (options.Fact != FACTORED); /* Not factored */
+
+ /* Restore the matrix A. */
+ cCopy_CompCol_Matrix(&ASAV, &A);
+
+ if ( zerot ) {
+ if ( prefact ) continue;
+ } else if ( options.Fact == FACTORED ) {
+ if ( equil || iequed ) {
+ /* Compute row and column scale factors to
+ equilibrate matrix A. */
+ cgsequ(&A, R, C, &rowcnd, &colcnd, &amax, &info);
+
+ /* Force equilibration. */
+ if ( !info && n > 0 ) {
+ if ( lsame_(equed, "R") ) {
+ rowcnd = 0.;
+ colcnd = 1.;
+ } else if ( lsame_(equed, "C") ) {
+ rowcnd = 1.;
+ colcnd = 0.;
+ } else if ( lsame_(equed, "B") ) {
+ rowcnd = 0.;
+ colcnd = 0.;
+ }
+ }
+
+ /* Equilibrate the matrix. */
+ claqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+ }
+
+ if ( prefact ) { /* Need a factor for the first time */
+
+ /* Save Fact option. */
+ fact = options.Fact;
+ options.Fact = DOFACT;
+
+ /* Preorder the matrix, obtain the column etree. */
+ sp_preorder(&options, &A, perm_c, etree, &AC);
+
+ /* Factor the matrix AC. */
+ cgstrf(&options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, &L, &U,
+ &stat, &info);
+
+ if ( info ) {
+ printf("** First factor: info %d, equed %c\n",
+ info, *equed);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n",
+ info - n);
+ exit(0);
+ }
+ }
+
+ Destroy_CompCol_Permuted(&AC);
+
+ /* Restore Fact option. */
+ options.Fact = fact;
+ } /* if .. first time factor */
+
+ for (itran = 0; itran < NTRAN; ++itran) {
+ trans = transs[itran];
+ options.Trans = trans;
+
+ /* Restore the matrix A. */
+ cCopy_CompCol_Matrix(&ASAV, &A);
+
+ /* Set the right hand side. */
+ cFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ cCopy_Dense_Matrix(m, nrhs, rhsb, ldb, bsav, ldb);
+
+ /*----------------
+ * Test cgssv
+ *----------------*/
+ if ( options.Fact == DOFACT && itran == 0) {
+ /* Not yet factored, and untransposed */
+
+ cCopy_Dense_Matrix(m, nrhs, rhsb, ldb, solx, ldx);
+ cgssv(&options, &A, perm_c, perm_r, &L, &U, &X,
+ &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "cgssv",
+ info, izero, n, nrhs, imat, nfail);
+ } else {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_cget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ nt = 1;
+ if ( izero == 0 ) {
+ /* Compute residual of the computed
+ solution. */
+ cCopy_Dense_Matrix(m, nrhs, rhsb, ldb,
+ wwork, ldb);
+ sp_cget02(trans, m, n, nrhs, &A, solx,
+ ldx, wwork,ldb, &result[1]);
+ nt = 2;
+ }
+
+ /* Print information about the tests that
+ did not pass the threshold. */
+ for (i = 0; i < nt; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT1, "cgssv", n, i,
+ result[i]);
+ ++nfail;
+ }
+ }
+ nrun += nt;
+ } /* else .. info == 0 */
+
+ /* Restore perm_c. */
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i];
+
+ if (lwork == 0) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+ } /* if .. end of testing cgssv */
+
+ /*----------------
+ * Test cgssvx
+ *----------------*/
+
+ /* Equilibrate the matrix if fact = FACTORED and
+ equed = 'R', 'C', or 'B'. */
+ if ( options.Fact == FACTORED &&
+ (equil || iequed) && n > 0 ) {
+ claqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+
+ /* Solve the system and compute the condition number
+ and error bounds using cgssvx. */
+ cgssvx(&options, &A, perm_c, perm_r, etree,
+ equed, R, C, &L, &U, work, lwork, &B, &X, &rpg,
+ &rcond, ferr, berr, &mem_usage, &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "cgssvx",
+ info, izero, n, nrhs, imat, nfail);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %.0f bytes\n",
+ mem_usage.total_needed);
+ exit(0);
+ }
+ } else {
+ if ( !prefact ) {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_cget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ k1 = 0;
+ } else {
+ k1 = 1;
+ }
+
+ if ( !info ) {
+ /* Compute residual of the computed solution.*/
+ cCopy_Dense_Matrix(m, nrhs, bsav, ldb,
+ wwork, ldb);
+ sp_cget02(trans, m, n, nrhs, &ASAV, solx, ldx,
+ wwork, ldb, &result[1]);
+
+ /* Check solution from generated exact
+ solution. */
+ sp_cget04(n, nrhs, solx, ldx, xact, ldx, rcond,
+ &result[2]);
+
+ /* Check the error bounds from iterative
+ refinement. */
+ sp_cget07(trans, n, nrhs, &ASAV, bsav, ldb,
+ solx, ldx, xact, ldx, ferr, berr,
+ &result[3]);
+
+ /* Print information about the tests that did
+ not pass the threshold. */
+ for (i = k1; i < NTESTS; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT2, "cgssvx",
+ options.Fact, trans, *equed,
+ n, imat, i, result[i]);
+ ++nfail;
+ }
+ }
+ nrun += NTESTS;
+ } /* if .. info == 0 */
+ } /* else .. end of testing cgssvx */
+
+ } /* for itran ... */
+
+ if ( lwork == 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ } /* for equil ... */
+ } /* for ifact ... */
+ } /* for iequed ... */
+#if 0
+ if ( !info ) {
+ PrintPerf(&L, &U, &mem_usage, rpg, rcond, ferr, berr, equed);
+ }
+#endif
+
+ } /* for imat ... */
+
+ /* Print a summary of the results. */
+ PrintSumm("CGE", nfail, nrun, nerrs);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (bsav);
+ SUPERLU_FREE (solx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (pc_save);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ SUPERLU_FREE (rwork);
+ SUPERLU_FREE (wwork);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_CompCol_Matrix(&ASAV);
+ if ( lwork > 0 ) {
+ SUPERLU_FREE (work);
+ Destroy_SuperMatrix_Store(&L);
+ Destroy_SuperMatrix_Store(&U);
+ }
+ StatFree(&stat);
+
+ return 0;
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], char *matrix_type,
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
+ int *rowblk, int *colblk, int *lwork, double *u)
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "ht:n:w:r:s:m:b:c:l:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-w <int> - panel size\n");
+ printf("\t-r <int> - granularity of relaxed supernodes\n");
+ exit(1);
+ break;
+ case 't': strcpy(matrix_type, optarg);
+ break;
+ case 'n': *n = atoi(optarg);
+ break;
+ case 'w': *w = atoi(optarg);
+ break;
+ case 'r': *relax = atoi(optarg);
+ break;
+ case 's': *nrhs = atoi(optarg);
+ break;
+ case 'm': *maxsuper = atoi(optarg);
+ break;
+ case 'b': *rowblk = atoi(optarg);
+ break;
+ case 'c': *colblk = atoi(optarg);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ }
+ }
+}
diff --git a/TESTING/ctest.csh b/TESTING/ctest.csh
new file mode 100644
index 0000000..107c066
--- /dev/null
+++ b/TESTING/ctest.csh
@@ -0,0 +1,50 @@
+#!/bin/csh
+
+set ofile = ctest.out # output file
+if ( -e $ofile ) then
+ rm -f $ofile
+endif
+echo "Single-precision complex testing output" > $ofile
+
+set MATRICES = (LAPACK)
+set NVAL = (9 19)
+set NRHS = (5)
+set LWORK = (0 10000000)
+
+#
+# Loop through all matrices ...
+#
+foreach m ($MATRICES)
+
+ #--------------------------------------------
+ # Test matrix types generated in LAPACK-style
+ #--------------------------------------------
+ if ($m == 'LAPACK') then
+ echo '== LAPACK test matrices' >> $ofile
+ foreach n ($NVAL)
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'n='$n 'nrhs='$s 'lwork='$l >> $ofile
+ ./ctest -t "LA" -l $l -n $n -s $s >> $ofile
+ end
+ end
+ end
+ #--------------------------------------------
+ # Test a specified sparse matrix
+ #--------------------------------------------
+ else
+ echo '' >> $ofile
+ echo '== sparse matrix:' $m >> $ofile
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'nrhs='$s 'lwork='$l >> $ofile
+ ./ctest -t "SP" -s $s -l $l < ../EXAMPLE/$m >> $ofile
+ end
+ end
+ endif
+
+end
+
+
diff --git a/TESTING/ddrive.c b/TESTING/ddrive.c
new file mode 100644
index 0000000..ef24d43
--- /dev/null
+++ b/TESTING/ddrive.c
@@ -0,0 +1,538 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: ddrive.c
+ * Purpose: MAIN test program
+ */
+#include <string.h>
+#include "dsp_defs.h"
+
+#define NTESTS 5 /* Number of test types */
+#define NTYPES 11 /* Number of matrix types */
+#define NTRAN 2
+#define THRESH 20.0
+#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
+#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
+#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
+
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * DDRIVE is the main test program for the DOUBLE linear
+ * equation driver routines DGSSV and DGSSVX.
+ *
+ * The program is invoked by a shell script file -- dtest.csh.
+ * The output from the tests are written into a file -- dtest.out.
+ *
+ * =====================================================================
+ */
+ double *a, *a_save;
+ int *asub, *asub_save;
+ int *xa, *xa_save;
+ SuperMatrix A, B, X, L, U;
+ SuperMatrix ASAV, AC;
+ mem_usage_t mem_usage;
+ int *perm_r; /* row permutation from partial pivoting */
+ int *perm_c, *pc_save; /* column permutation */
+ int *etree;
+ double zero = 0.0;
+ double *R, *C;
+ double *ferr, *berr;
+ double *rwork;
+ double *wwork;
+ void *work;
+ int info, lwork, nrhs, panel_size, relax;
+ int m, n, nnz;
+ double *xact;
+ double *rhsb, *solx, *bsav;
+ int ldb, ldx;
+ double rpg, rcond;
+ int i, j, k1;
+ double rowcnd, colcnd, amax;
+ int maxsuper, rowblk, colblk;
+ int prefact, nofact, equil, iequed;
+ int nt, nrun, nfail, nerrs, imat, fimat, nimat;
+ int nfact, ifact, itran;
+ int kl, ku, mode, lda;
+ int zerot, izero, ioff;
+ double anorm, cndnum, u, drop_tol = 0.;
+ double *Afull;
+ double result[NTESTS];
+ superlu_options_t options;
+ fact_t fact;
+ trans_t trans;
+ SuperLUStat_t stat;
+ static char matrix_type[8];
+ static char equed[1], path[3], sym[1], dist[1];
+
+ /* Fixed set of parameters */
+ int iseed[] = {1988, 1989, 1990, 1991};
+ static char equeds[] = {'N', 'R', 'C', 'B'};
+ static fact_t facts[] = {FACTORED, DOFACT, SamePattern,
+ SamePattern_SameRowPerm};
+ static trans_t transs[] = {NOTRANS, TRANS, CONJ};
+
+ /* Some function prototypes */
+ static void parse_command_line();
+ extern int sp_dget01(int, int, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, double *);
+ extern int sp_dget02(trans_t, int, int, int, SuperMatrix *, double *,
+ int, double *, int, double *resid);
+ extern int sp_dget04(int, int, double *, int,
+ double *, int, double rcond, double *resid);
+ extern int sp_dget07(trans_t, int, int, SuperMatrix *, double *, int,
+ double *, int, double *, int,
+ double *, double *, double *);
+ extern int dlatb4_(char *, int *, int *, int *, char *, int *, int *,
+ double *, int *, double *, char *);
+ extern int dlatms_(int *, int *, char *, int *, char *, double *d,
+ int *, double *, double *, int *, int *,
+ char *, double *, int *, double *, int *);
+ extern int sp_dconvert(int, int, double *, int, int, int,
+ double *a, int *, int *, int *);
+
+
+ /* Executable statements */
+
+ strcpy(path, "DGE");
+ nrun = 0;
+ nfail = 0;
+ nerrs = 0;
+
+ /* Defaults */
+ lwork = 0;
+ n = 1;
+ nrhs = 1;
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ u = 1.0;
+ strcpy(matrix_type, "LA");
+ parse_command_line(argc, argv, matrix_type, &n,
+ &panel_size, &relax, &nrhs, &maxsuper,
+ &rowblk, &colblk, &lwork, &u);
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ fprintf(stderr, "expert: cannot allocate %d bytes\n", lwork);
+ exit (-1);
+ }
+ }
+
+ /* Set the default input options. */
+ set_default_options(&options);
+ options.DiagPivotThresh = u;
+ options.PrintStat = NO;
+ options.PivotGrowth = YES;
+ options.ConditionNumber = YES;
+ options.IterRefine = DOUBLE;
+
+ if ( strcmp(matrix_type, "LA") == 0 ) {
+ /* Test LAPACK matrix suite. */
+ m = n;
+ lda = SUPERLU_MAX(n, 1);
+ nnz = n * n; /* upper bound */
+ fimat = 1;
+ nimat = NTYPES;
+ Afull = doubleCalloc(lda * n);
+ dallocateA(n, nnz, &a, &asub, &xa);
+ } else {
+ /* Read a sparse matrix */
+ fimat = nimat = 0;
+ dreadhb(&m, &n, &nnz, &a, &asub, &xa);
+ }
+
+ dallocateA(n, nnz, &a_save, &asub_save, &xa_save);
+ rhsb = doubleMalloc(m * nrhs);
+ bsav = doubleMalloc(m * nrhs);
+ solx = doubleMalloc(n * nrhs);
+ ldb = m;
+ ldx = n;
+ dCreate_Dense_Matrix(&B, m, nrhs, rhsb, ldb, SLU_DN, SLU_D, SLU_GE);
+ dCreate_Dense_Matrix(&X, n, nrhs, solx, ldx, SLU_DN, SLU_D, SLU_GE);
+ xact = doubleMalloc(n * nrhs);
+ etree = intMalloc(n);
+ perm_r = intMalloc(n);
+ perm_c = intMalloc(n);
+ pc_save = intMalloc(n);
+ R = (double *) SUPERLU_MALLOC(m*sizeof(double));
+ C = (double *) SUPERLU_MALLOC(n*sizeof(double));
+ ferr = (double *) SUPERLU_MALLOC(nrhs*sizeof(double));
+ berr = (double *) SUPERLU_MALLOC(nrhs*sizeof(double));
+ j = SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs);
+ rwork = (double *) SUPERLU_MALLOC(j*sizeof(double));
+ for (i = 0; i < j; ++i) rwork[i] = 0.;
+ if ( !R ) ABORT("SUPERLU_MALLOC fails for R");
+ if ( !C ) ABORT("SUPERLU_MALLOC fails for C");
+ if ( !ferr ) ABORT("SUPERLU_MALLOC fails for ferr");
+ if ( !berr ) ABORT("SUPERLU_MALLOC fails for berr");
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ wwork = doubleCalloc( SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs) );
+
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i] = i;
+ options.ColPerm = MY_PERMC;
+
+ for (imat = fimat; imat <= nimat; ++imat) { /* All matrix types */
+
+ if ( imat ) {
+
+ /* Skip types 5, 6, or 7 if the matrix size is too small. */
+ zerot = (imat >= 5 && imat <= 7);
+ if ( zerot && n < imat-4 )
+ continue;
+
+ /* Set up parameters with DLATB4 and generate a test matrix
+ with DLATMS. */
+ dlatb4_(path, &imat, &n, &n, sym, &kl, &ku, &anorm, &mode,
+ &cndnum, dist);
+
+ dlatms_(&n, &n, dist, iseed, sym, &rwork[0], &mode, &cndnum,
+ &anorm, &kl, &ku, "No packing", Afull, &lda,
+ &wwork[0], &info);
+
+ if ( info ) {
+ printf(FMT3, "DLATMS", info, izero, n, nrhs, imat, nfail);
+ continue;
+ }
+
+ /* For types 5-7, zero one or more columns of the matrix
+ to test that INFO is returned correctly. */
+ if ( zerot ) {
+ if ( imat == 5 ) izero = 1;
+ else if ( imat == 6 ) izero = n;
+ else izero = n / 2 + 1;
+ ioff = (izero - 1) * lda;
+ if ( imat < 7 ) {
+ for (i = 0; i < n; ++i) Afull[ioff + i] = zero;
+ } else {
+ for (j = 0; j < n - izero + 1; ++j)
+ for (i = 0; i < n; ++i)
+ Afull[ioff + i + j*lda] = zero;
+ }
+ } else {
+ izero = 0;
+ }
+
+ /* Convert to sparse representation. */
+ sp_dconvert(n, n, Afull, lda, kl, ku, a, asub, xa, &nnz);
+
+ } else {
+ izero = 0;
+ zerot = 0;
+ }
+
+ dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE);
+
+ /* Save a copy of matrix A in ASAV */
+ dCreate_CompCol_Matrix(&ASAV, m, n, nnz, a_save, asub_save, xa_save,
+ SLU_NC, SLU_D, SLU_GE);
+ dCopy_CompCol_Matrix(&A, &ASAV);
+
+ /* Form exact solution. */
+ dGenXtrue(n, nrhs, xact, ldx);
+
+ StatInit(&stat);
+
+ for (iequed = 0; iequed < 4; ++iequed) {
+ *equed = equeds[iequed];
+ if (iequed == 0) nfact = 4;
+ else nfact = 1; /* Only test factored, pre-equilibrated matrix */
+
+ for (ifact = 0; ifact < nfact; ++ifact) {
+ fact = facts[ifact];
+ options.Fact = fact;
+
+ for (equil = 0; equil < 2; ++equil) {
+ options.Equil = equil;
+ prefact = ( options.Fact == FACTORED ||
+ options.Fact == SamePattern_SameRowPerm );
+ /* Need a first factor */
+ nofact = (options.Fact != FACTORED); /* Not factored */
+
+ /* Restore the matrix A. */
+ dCopy_CompCol_Matrix(&ASAV, &A);
+
+ if ( zerot ) {
+ if ( prefact ) continue;
+ } else if ( options.Fact == FACTORED ) {
+ if ( equil || iequed ) {
+ /* Compute row and column scale factors to
+ equilibrate matrix A. */
+ dgsequ(&A, R, C, &rowcnd, &colcnd, &amax, &info);
+
+ /* Force equilibration. */
+ if ( !info && n > 0 ) {
+ if ( lsame_(equed, "R") ) {
+ rowcnd = 0.;
+ colcnd = 1.;
+ } else if ( lsame_(equed, "C") ) {
+ rowcnd = 1.;
+ colcnd = 0.;
+ } else if ( lsame_(equed, "B") ) {
+ rowcnd = 0.;
+ colcnd = 0.;
+ }
+ }
+
+ /* Equilibrate the matrix. */
+ dlaqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+ }
+
+ if ( prefact ) { /* Need a factor for the first time */
+
+ /* Save Fact option. */
+ fact = options.Fact;
+ options.Fact = DOFACT;
+
+ /* Preorder the matrix, obtain the column etree. */
+ sp_preorder(&options, &A, perm_c, etree, &AC);
+
+ /* Factor the matrix AC. */
+ dgstrf(&options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, &L, &U,
+ &stat, &info);
+
+ if ( info ) {
+ printf("** First factor: info %d, equed %c\n",
+ info, *equed);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n",
+ info - n);
+ exit(0);
+ }
+ }
+
+ Destroy_CompCol_Permuted(&AC);
+
+ /* Restore Fact option. */
+ options.Fact = fact;
+ } /* if .. first time factor */
+
+ for (itran = 0; itran < NTRAN; ++itran) {
+ trans = transs[itran];
+ options.Trans = trans;
+
+ /* Restore the matrix A. */
+ dCopy_CompCol_Matrix(&ASAV, &A);
+
+ /* Set the right hand side. */
+ dFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ dCopy_Dense_Matrix(m, nrhs, rhsb, ldb, bsav, ldb);
+
+ /*----------------
+ * Test dgssv
+ *----------------*/
+ if ( options.Fact == DOFACT && itran == 0) {
+ /* Not yet factored, and untransposed */
+
+ dCopy_Dense_Matrix(m, nrhs, rhsb, ldb, solx, ldx);
+ dgssv(&options, &A, perm_c, perm_r, &L, &U, &X,
+ &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "dgssv",
+ info, izero, n, nrhs, imat, nfail);
+ } else {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_dget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ nt = 1;
+ if ( izero == 0 ) {
+ /* Compute residual of the computed
+ solution. */
+ dCopy_Dense_Matrix(m, nrhs, rhsb, ldb,
+ wwork, ldb);
+ sp_dget02(trans, m, n, nrhs, &A, solx,
+ ldx, wwork,ldb, &result[1]);
+ nt = 2;
+ }
+
+ /* Print information about the tests that
+ did not pass the threshold. */
+ for (i = 0; i < nt; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT1, "dgssv", n, i,
+ result[i]);
+ ++nfail;
+ }
+ }
+ nrun += nt;
+ } /* else .. info == 0 */
+
+ /* Restore perm_c. */
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i];
+
+ if (lwork == 0) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+ } /* if .. end of testing dgssv */
+
+ /*----------------
+ * Test dgssvx
+ *----------------*/
+
+ /* Equilibrate the matrix if fact = FACTORED and
+ equed = 'R', 'C', or 'B'. */
+ if ( options.Fact == FACTORED &&
+ (equil || iequed) && n > 0 ) {
+ dlaqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+
+ /* Solve the system and compute the condition number
+ and error bounds using dgssvx. */
+ dgssvx(&options, &A, perm_c, perm_r, etree,
+ equed, R, C, &L, &U, work, lwork, &B, &X, &rpg,
+ &rcond, ferr, berr, &mem_usage, &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "dgssvx",
+ info, izero, n, nrhs, imat, nfail);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %.0f bytes\n",
+ mem_usage.total_needed);
+ exit(0);
+ }
+ } else {
+ if ( !prefact ) {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_dget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ k1 = 0;
+ } else {
+ k1 = 1;
+ }
+
+ if ( !info ) {
+ /* Compute residual of the computed solution.*/
+ dCopy_Dense_Matrix(m, nrhs, bsav, ldb,
+ wwork, ldb);
+ sp_dget02(trans, m, n, nrhs, &ASAV, solx, ldx,
+ wwork, ldb, &result[1]);
+
+ /* Check solution from generated exact
+ solution. */
+ sp_dget04(n, nrhs, solx, ldx, xact, ldx, rcond,
+ &result[2]);
+
+ /* Check the error bounds from iterative
+ refinement. */
+ sp_dget07(trans, n, nrhs, &ASAV, bsav, ldb,
+ solx, ldx, xact, ldx, ferr, berr,
+ &result[3]);
+
+ /* Print information about the tests that did
+ not pass the threshold. */
+ for (i = k1; i < NTESTS; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT2, "dgssvx",
+ options.Fact, trans, *equed,
+ n, imat, i, result[i]);
+ ++nfail;
+ }
+ }
+ nrun += NTESTS;
+ } /* if .. info == 0 */
+ } /* else .. end of testing dgssvx */
+
+ } /* for itran ... */
+
+ if ( lwork == 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ } /* for equil ... */
+ } /* for ifact ... */
+ } /* for iequed ... */
+#if 0
+ if ( !info ) {
+ PrintPerf(&L, &U, &mem_usage, rpg, rcond, ferr, berr, equed);
+ }
+#endif
+
+ } /* for imat ... */
+
+ /* Print a summary of the results. */
+ PrintSumm("DGE", nfail, nrun, nerrs);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (bsav);
+ SUPERLU_FREE (solx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (pc_save);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ SUPERLU_FREE (rwork);
+ SUPERLU_FREE (wwork);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_CompCol_Matrix(&ASAV);
+ if ( lwork > 0 ) {
+ SUPERLU_FREE (work);
+ Destroy_SuperMatrix_Store(&L);
+ Destroy_SuperMatrix_Store(&U);
+ }
+ StatFree(&stat);
+
+ return 0;
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], char *matrix_type,
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
+ int *rowblk, int *colblk, int *lwork, double *u)
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "ht:n:w:r:s:m:b:c:l:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-w <int> - panel size\n");
+ printf("\t-r <int> - granularity of relaxed supernodes\n");
+ exit(1);
+ break;
+ case 't': strcpy(matrix_type, optarg);
+ break;
+ case 'n': *n = atoi(optarg);
+ break;
+ case 'w': *w = atoi(optarg);
+ break;
+ case 'r': *relax = atoi(optarg);
+ break;
+ case 's': *nrhs = atoi(optarg);
+ break;
+ case 'm': *maxsuper = atoi(optarg);
+ break;
+ case 'b': *rowblk = atoi(optarg);
+ break;
+ case 'c': *colblk = atoi(optarg);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ }
+ }
+}
diff --git a/TESTING/dtest.csh b/TESTING/dtest.csh
new file mode 100644
index 0000000..085ca43
--- /dev/null
+++ b/TESTING/dtest.csh
@@ -0,0 +1,49 @@
+#!/bin/csh
+
+set ofile = dtest.out # output file
+if ( -e $ofile ) then
+ rm -f $ofile
+endif
+echo "Double-precision testing output" > $ofile
+
+set MATRICES = (LAPACK g10)
+set NVAL = (9 19)
+set NRHS = (5)
+set LWORK = (0 10000000)
+
+#
+# Loop through all matrices ...
+#
+foreach m ($MATRICES)
+
+ #--------------------------------------------
+ # Test matrix types generated in LAPACK-style
+ #--------------------------------------------
+ if ($m == 'LAPACK') then
+ echo '== LAPACK test matrices' >> $ofile
+ foreach n ($NVAL)
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'n='$n 'nrhs='$s 'lwork='$l >> $ofile
+ ./dtest -t "LA" -l $l -n $n -s $s >> $ofile
+ end
+ end
+ end
+ #--------------------------------------------
+ # Test a specified sparse matrix
+ #--------------------------------------------
+ else
+ echo '' >> $ofile
+ echo '== sparse matrix:' $m >> $ofile
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'nrhs='$s 'lwork='$l >> $ofile
+ ./dtest -t "SP" -s $s -l $l < ../EXAMPLE/$m >> $ofile
+ end
+ end
+ endif
+
+end
+
diff --git a/TESTING/sdrive.c b/TESTING/sdrive.c
new file mode 100644
index 0000000..74d9fd0
--- /dev/null
+++ b/TESTING/sdrive.c
@@ -0,0 +1,538 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: sdrive.c
+ * Purpose: MAIN test program
+ */
+#include <string.h>
+#include "ssp_defs.h"
+
+#define NTESTS 5 /* Number of test types */
+#define NTYPES 11 /* Number of matrix types */
+#define NTRAN 2
+#define THRESH 20.0
+#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
+#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
+#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
+
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * SDRIVE is the main test program for the FLOAT linear
+ * equation driver routines SGSSV and SGSSVX.
+ *
+ * The program is invoked by a shell script file -- stest.csh.
+ * The output from the tests are written into a file -- stest.out.
+ *
+ * =====================================================================
+ */
+ float *a, *a_save;
+ int *asub, *asub_save;
+ int *xa, *xa_save;
+ SuperMatrix A, B, X, L, U;
+ SuperMatrix ASAV, AC;
+ mem_usage_t mem_usage;
+ int *perm_r; /* row permutation from partial pivoting */
+ int *perm_c, *pc_save; /* column permutation */
+ int *etree;
+ float zero = 0.0;
+ float *R, *C;
+ float *ferr, *berr;
+ float *rwork;
+ float *wwork;
+ void *work;
+ int info, lwork, nrhs, panel_size, relax;
+ int m, n, nnz;
+ float *xact;
+ float *rhsb, *solx, *bsav;
+ int ldb, ldx;
+ float rpg, rcond;
+ int i, j, k1;
+ float rowcnd, colcnd, amax;
+ int maxsuper, rowblk, colblk;
+ int prefact, nofact, equil, iequed;
+ int nt, nrun, nfail, nerrs, imat, fimat, nimat;
+ int nfact, ifact, itran;
+ int kl, ku, mode, lda;
+ int zerot, izero, ioff;
+ float anorm, cndnum, u, drop_tol = 0.;
+ float *Afull;
+ float result[NTESTS];
+ superlu_options_t options;
+ fact_t fact;
+ trans_t trans;
+ SuperLUStat_t stat;
+ static char matrix_type[8];
+ static char equed[1], path[3], sym[1], dist[1];
+
+ /* Fixed set of parameters */
+ int iseed[] = {1988, 1989, 1990, 1991};
+ static char equeds[] = {'N', 'R', 'C', 'B'};
+ static fact_t facts[] = {FACTORED, DOFACT, SamePattern,
+ SamePattern_SameRowPerm};
+ static trans_t transs[] = {NOTRANS, TRANS, CONJ};
+
+ /* Some function prototypes */
+ static void parse_command_line();
+ extern int sp_sget01(int, int, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, float *);
+ extern int sp_sget02(trans_t, int, int, int, SuperMatrix *, float *,
+ int, float *, int, float *resid);
+ extern int sp_sget04(int, int, float *, int,
+ float *, int, float rcond, float *resid);
+ extern int sp_sget07(trans_t, int, int, SuperMatrix *, float *, int,
+ float *, int, float *, int,
+ float *, float *, float *);
+ extern int slatb4_(char *, int *, int *, int *, char *, int *, int *,
+ float *, int *, float *, char *);
+ extern int slatms_(int *, int *, char *, int *, char *, float *d,
+ int *, float *, float *, int *, int *,
+ char *, float *, int *, float *, int *);
+ extern int sp_sconvert(int, int, float *, int, int, int,
+ float *a, int *, int *, int *);
+
+
+ /* Executable statements */
+
+ strcpy(path, "SGE");
+ nrun = 0;
+ nfail = 0;
+ nerrs = 0;
+
+ /* Defaults */
+ lwork = 0;
+ n = 1;
+ nrhs = 1;
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ u = 1.0;
+ strcpy(matrix_type, "LA");
+ parse_command_line(argc, argv, matrix_type, &n,
+ &panel_size, &relax, &nrhs, &maxsuper,
+ &rowblk, &colblk, &lwork, &u);
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ fprintf(stderr, "expert: cannot allocate %d bytes\n", lwork);
+ exit (-1);
+ }
+ }
+
+ /* Set the default input options. */
+ set_default_options(&options);
+ options.DiagPivotThresh = u;
+ options.PrintStat = NO;
+ options.PivotGrowth = YES;
+ options.ConditionNumber = YES;
+ options.IterRefine = SINGLE;
+
+ if ( strcmp(matrix_type, "LA") == 0 ) {
+ /* Test LAPACK matrix suite. */
+ m = n;
+ lda = SUPERLU_MAX(n, 1);
+ nnz = n * n; /* upper bound */
+ fimat = 1;
+ nimat = NTYPES;
+ Afull = floatCalloc(lda * n);
+ sallocateA(n, nnz, &a, &asub, &xa);
+ } else {
+ /* Read a sparse matrix */
+ fimat = nimat = 0;
+ sreadhb(&m, &n, &nnz, &a, &asub, &xa);
+ }
+
+ sallocateA(n, nnz, &a_save, &asub_save, &xa_save);
+ rhsb = floatMalloc(m * nrhs);
+ bsav = floatMalloc(m * nrhs);
+ solx = floatMalloc(n * nrhs);
+ ldb = m;
+ ldx = n;
+ sCreate_Dense_Matrix(&B, m, nrhs, rhsb, ldb, SLU_DN, SLU_S, SLU_GE);
+ sCreate_Dense_Matrix(&X, n, nrhs, solx, ldx, SLU_DN, SLU_S, SLU_GE);
+ xact = floatMalloc(n * nrhs);
+ etree = intMalloc(n);
+ perm_r = intMalloc(n);
+ perm_c = intMalloc(n);
+ pc_save = intMalloc(n);
+ R = (float *) SUPERLU_MALLOC(m*sizeof(float));
+ C = (float *) SUPERLU_MALLOC(n*sizeof(float));
+ ferr = (float *) SUPERLU_MALLOC(nrhs*sizeof(float));
+ berr = (float *) SUPERLU_MALLOC(nrhs*sizeof(float));
+ j = SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs);
+ rwork = (float *) SUPERLU_MALLOC(j*sizeof(float));
+ for (i = 0; i < j; ++i) rwork[i] = 0.;
+ if ( !R ) ABORT("SUPERLU_MALLOC fails for R");
+ if ( !C ) ABORT("SUPERLU_MALLOC fails for C");
+ if ( !ferr ) ABORT("SUPERLU_MALLOC fails for ferr");
+ if ( !berr ) ABORT("SUPERLU_MALLOC fails for berr");
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ wwork = floatCalloc( SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs) );
+
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i] = i;
+ options.ColPerm = MY_PERMC;
+
+ for (imat = fimat; imat <= nimat; ++imat) { /* All matrix types */
+
+ if ( imat ) {
+
+ /* Skip types 5, 6, or 7 if the matrix size is too small. */
+ zerot = (imat >= 5 && imat <= 7);
+ if ( zerot && n < imat-4 )
+ continue;
+
+ /* Set up parameters with SLATB4 and generate a test matrix
+ with SLATMS. */
+ slatb4_(path, &imat, &n, &n, sym, &kl, &ku, &anorm, &mode,
+ &cndnum, dist);
+
+ slatms_(&n, &n, dist, iseed, sym, &rwork[0], &mode, &cndnum,
+ &anorm, &kl, &ku, "No packing", Afull, &lda,
+ &wwork[0], &info);
+
+ if ( info ) {
+ printf(FMT3, "SLATMS", info, izero, n, nrhs, imat, nfail);
+ continue;
+ }
+
+ /* For types 5-7, zero one or more columns of the matrix
+ to test that INFO is returned correctly. */
+ if ( zerot ) {
+ if ( imat == 5 ) izero = 1;
+ else if ( imat == 6 ) izero = n;
+ else izero = n / 2 + 1;
+ ioff = (izero - 1) * lda;
+ if ( imat < 7 ) {
+ for (i = 0; i < n; ++i) Afull[ioff + i] = zero;
+ } else {
+ for (j = 0; j < n - izero + 1; ++j)
+ for (i = 0; i < n; ++i)
+ Afull[ioff + i + j*lda] = zero;
+ }
+ } else {
+ izero = 0;
+ }
+
+ /* Convert to sparse representation. */
+ sp_sconvert(n, n, Afull, lda, kl, ku, a, asub, xa, &nnz);
+
+ } else {
+ izero = 0;
+ zerot = 0;
+ }
+
+ sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE);
+
+ /* Save a copy of matrix A in ASAV */
+ sCreate_CompCol_Matrix(&ASAV, m, n, nnz, a_save, asub_save, xa_save,
+ SLU_NC, SLU_S, SLU_GE);
+ sCopy_CompCol_Matrix(&A, &ASAV);
+
+ /* Form exact solution. */
+ sGenXtrue(n, nrhs, xact, ldx);
+
+ StatInit(&stat);
+
+ for (iequed = 0; iequed < 4; ++iequed) {
+ *equed = equeds[iequed];
+ if (iequed == 0) nfact = 4;
+ else nfact = 1; /* Only test factored, pre-equilibrated matrix */
+
+ for (ifact = 0; ifact < nfact; ++ifact) {
+ fact = facts[ifact];
+ options.Fact = fact;
+
+ for (equil = 0; equil < 2; ++equil) {
+ options.Equil = equil;
+ prefact = ( options.Fact == FACTORED ||
+ options.Fact == SamePattern_SameRowPerm );
+ /* Need a first factor */
+ nofact = (options.Fact != FACTORED); /* Not factored */
+
+ /* Restore the matrix A. */
+ sCopy_CompCol_Matrix(&ASAV, &A);
+
+ if ( zerot ) {
+ if ( prefact ) continue;
+ } else if ( options.Fact == FACTORED ) {
+ if ( equil || iequed ) {
+ /* Compute row and column scale factors to
+ equilibrate matrix A. */
+ sgsequ(&A, R, C, &rowcnd, &colcnd, &amax, &info);
+
+ /* Force equilibration. */
+ if ( !info && n > 0 ) {
+ if ( lsame_(equed, "R") ) {
+ rowcnd = 0.;
+ colcnd = 1.;
+ } else if ( lsame_(equed, "C") ) {
+ rowcnd = 1.;
+ colcnd = 0.;
+ } else if ( lsame_(equed, "B") ) {
+ rowcnd = 0.;
+ colcnd = 0.;
+ }
+ }
+
+ /* Equilibrate the matrix. */
+ slaqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+ }
+
+ if ( prefact ) { /* Need a factor for the first time */
+
+ /* Save Fact option. */
+ fact = options.Fact;
+ options.Fact = DOFACT;
+
+ /* Preorder the matrix, obtain the column etree. */
+ sp_preorder(&options, &A, perm_c, etree, &AC);
+
+ /* Factor the matrix AC. */
+ sgstrf(&options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, &L, &U,
+ &stat, &info);
+
+ if ( info ) {
+ printf("** First factor: info %d, equed %c\n",
+ info, *equed);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n",
+ info - n);
+ exit(0);
+ }
+ }
+
+ Destroy_CompCol_Permuted(&AC);
+
+ /* Restore Fact option. */
+ options.Fact = fact;
+ } /* if .. first time factor */
+
+ for (itran = 0; itran < NTRAN; ++itran) {
+ trans = transs[itran];
+ options.Trans = trans;
+
+ /* Restore the matrix A. */
+ sCopy_CompCol_Matrix(&ASAV, &A);
+
+ /* Set the right hand side. */
+ sFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ sCopy_Dense_Matrix(m, nrhs, rhsb, ldb, bsav, ldb);
+
+ /*----------------
+ * Test sgssv
+ *----------------*/
+ if ( options.Fact == DOFACT && itran == 0) {
+ /* Not yet factored, and untransposed */
+
+ sCopy_Dense_Matrix(m, nrhs, rhsb, ldb, solx, ldx);
+ sgssv(&options, &A, perm_c, perm_r, &L, &U, &X,
+ &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "sgssv",
+ info, izero, n, nrhs, imat, nfail);
+ } else {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_sget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ nt = 1;
+ if ( izero == 0 ) {
+ /* Compute residual of the computed
+ solution. */
+ sCopy_Dense_Matrix(m, nrhs, rhsb, ldb,
+ wwork, ldb);
+ sp_sget02(trans, m, n, nrhs, &A, solx,
+ ldx, wwork,ldb, &result[1]);
+ nt = 2;
+ }
+
+ /* Print information about the tests that
+ did not pass the threshold. */
+ for (i = 0; i < nt; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT1, "sgssv", n, i,
+ result[i]);
+ ++nfail;
+ }
+ }
+ nrun += nt;
+ } /* else .. info == 0 */
+
+ /* Restore perm_c. */
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i];
+
+ if (lwork == 0) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+ } /* if .. end of testing sgssv */
+
+ /*----------------
+ * Test sgssvx
+ *----------------*/
+
+ /* Equilibrate the matrix if fact = FACTORED and
+ equed = 'R', 'C', or 'B'. */
+ if ( options.Fact == FACTORED &&
+ (equil || iequed) && n > 0 ) {
+ slaqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+
+ /* Solve the system and compute the condition number
+ and error bounds using sgssvx. */
+ sgssvx(&options, &A, perm_c, perm_r, etree,
+ equed, R, C, &L, &U, work, lwork, &B, &X, &rpg,
+ &rcond, ferr, berr, &mem_usage, &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "sgssvx",
+ info, izero, n, nrhs, imat, nfail);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %.0f bytes\n",
+ mem_usage.total_needed);
+ exit(0);
+ }
+ } else {
+ if ( !prefact ) {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_sget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ k1 = 0;
+ } else {
+ k1 = 1;
+ }
+
+ if ( !info ) {
+ /* Compute residual of the computed solution.*/
+ sCopy_Dense_Matrix(m, nrhs, bsav, ldb,
+ wwork, ldb);
+ sp_sget02(trans, m, n, nrhs, &ASAV, solx, ldx,
+ wwork, ldb, &result[1]);
+
+ /* Check solution from generated exact
+ solution. */
+ sp_sget04(n, nrhs, solx, ldx, xact, ldx, rcond,
+ &result[2]);
+
+ /* Check the error bounds from iterative
+ refinement. */
+ sp_sget07(trans, n, nrhs, &ASAV, bsav, ldb,
+ solx, ldx, xact, ldx, ferr, berr,
+ &result[3]);
+
+ /* Print information about the tests that did
+ not pass the threshold. */
+ for (i = k1; i < NTESTS; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT2, "sgssvx",
+ options.Fact, trans, *equed,
+ n, imat, i, result[i]);
+ ++nfail;
+ }
+ }
+ nrun += NTESTS;
+ } /* if .. info == 0 */
+ } /* else .. end of testing sgssvx */
+
+ } /* for itran ... */
+
+ if ( lwork == 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ } /* for equil ... */
+ } /* for ifact ... */
+ } /* for iequed ... */
+#if 0
+ if ( !info ) {
+ PrintPerf(&L, &U, &mem_usage, rpg, rcond, ferr, berr, equed);
+ }
+#endif
+
+ } /* for imat ... */
+
+ /* Print a summary of the results. */
+ PrintSumm("SGE", nfail, nrun, nerrs);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (bsav);
+ SUPERLU_FREE (solx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (pc_save);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ SUPERLU_FREE (rwork);
+ SUPERLU_FREE (wwork);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_CompCol_Matrix(&ASAV);
+ if ( lwork > 0 ) {
+ SUPERLU_FREE (work);
+ Destroy_SuperMatrix_Store(&L);
+ Destroy_SuperMatrix_Store(&U);
+ }
+ StatFree(&stat);
+
+ return 0;
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], char *matrix_type,
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
+ int *rowblk, int *colblk, int *lwork, double *u)
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "ht:n:w:r:s:m:b:c:l:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-w <int> - panel size\n");
+ printf("\t-r <int> - granularity of relaxed supernodes\n");
+ exit(1);
+ break;
+ case 't': strcpy(matrix_type, optarg);
+ break;
+ case 'n': *n = atoi(optarg);
+ break;
+ case 'w': *w = atoi(optarg);
+ break;
+ case 'r': *relax = atoi(optarg);
+ break;
+ case 's': *nrhs = atoi(optarg);
+ break;
+ case 'm': *maxsuper = atoi(optarg);
+ break;
+ case 'b': *rowblk = atoi(optarg);
+ break;
+ case 'c': *colblk = atoi(optarg);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ }
+ }
+}
diff --git a/TESTING/sp_cconvert.c b/TESTING/sp_cconvert.c
new file mode 100644
index 0000000..e4aab06
--- /dev/null
+++ b/TESTING/sp_cconvert.c
@@ -0,0 +1,44 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+
+#include "csp_defs.h"
+#include "util.h"
+
+/*
+ * Convert a full matrix into a sparse matrix format.
+ */
+int
+sp_cconvert(int m, int n, complex *A, int lda, int kl, int ku,
+ complex *a, int *asub, int *xa, int *nnz)
+{
+ int lasta = 0;
+ int i, j, ilow, ihigh;
+ int *row;
+ complex *val;
+
+ for (j = 0; j < n; ++j) {
+ xa[j] = lasta;
+ val = &a[xa[j]];
+ row = &asub[xa[j]];
+
+ ilow = SUPERLU_MAX(0, j - ku);
+ ihigh = SUPERLU_MIN(n-1, j + kl);
+ for (i = ilow; i <= ihigh; ++i) {
+ val[i-ilow] = A[i + j*lda];
+ row[i-ilow] = i;
+ }
+ lasta += ihigh - ilow + 1;
+ }
+
+ xa[n] = *nnz = lasta;
+ return 0;
+}
+
+
diff --git a/TESTING/sp_cget01.c b/TESTING/sp_cget01.c
new file mode 100644
index 0000000..c1bf55a
--- /dev/null
+++ b/TESTING/sp_cget01.c
@@ -0,0 +1,161 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "csp_defs.h"
+#include "util.h"
+
+int sp_cget01(int m, int n, SuperMatrix *A, SuperMatrix *L,
+ SuperMatrix *U, int *perm_r, float *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_CGET01 reconstructs a matrix A from its L*U factorization and
+ computes the residual
+ norm(L*U - A) / ( N * norm(A) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ ==========
+
+ M (input) INT
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INT
+ The number of columns of the matrix A. N >= 0.
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original M x N matrix A.
+
+ L (input) SuperMatrix *, dimension (L->nrow, L->ncol)
+ The factor matrix L.
+
+ U (input) SuperMatrix *, dimension (U->nrow, U->ncol)
+ The factor matrix U.
+
+ perm_r (input) INT array, dimension (M)
+ The pivot indices from CGSTRF.
+
+ RESID (output) FLOAT*
+ norm(L*U - A) / ( N * norm(A) * EPS )
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ complex zero = {0.0, 0.0};
+ int i, j, k, arow, lptr,isub, urow, superno, fsupc, u_part;
+ complex utemp, comp_temp;
+ float anorm, tnorm, cnorm;
+ float eps;
+ complex *work;
+ SCformat *Lstore;
+ NCformat *Astore, *Ustore;
+ complex *Aval, *Lval, *Uval;
+
+ /* Function prototypes */
+ extern float clangs(char *, SuperMatrix *);
+ extern double slamch_(char *);
+
+
+ /* Quick exit if M = 0 or N = 0. */
+
+ if (m <= 0 || n <= 0) {
+ *resid = 0.f;
+ return 0;
+ }
+
+ work = (complex *)complexCalloc(m);
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+
+ /* Determine EPS and the norm of A. */
+ eps = slamch_("Epsilon");
+ anorm = clangs("1", A);
+ cnorm = 0.;
+
+ /* Compute the product L*U, one column at a time */
+ for (k = 0; k < n; ++k) {
+
+ /* The U part outside the rectangular supernode */
+ for (i = U_NZ_START(k); i < U_NZ_START(k+1); ++i) {
+ urow = U_SUB(i);
+ utemp = Uval[i];
+ superno = Lstore->col_to_sup[urow];
+ fsupc = L_FST_SUPC(superno);
+ u_part = urow - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)].r -= utemp.r;
+ work[L_SUB(lptr-1)].i -= utemp.i;
+ for (j = L_NZ_START(urow) + u_part; j < L_NZ_START(urow+1); ++j) {
+ isub = L_SUB(lptr);
+ cc_mult(&comp_temp, &utemp, &Lval[j]);
+ c_sub(&work[isub], &work[isub], &comp_temp);
+ ++lptr;
+ }
+ }
+
+ /* The U part inside the rectangular supernode */
+ superno = Lstore->col_to_sup[k];
+ fsupc = L_FST_SUPC(superno);
+ urow = L_NZ_START(k);
+ for (i = fsupc; i <= k; ++i) {
+ utemp = Lval[urow++];
+ u_part = i - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)].r -= utemp.r;
+ work[L_SUB(lptr-1)].i -= utemp.i;
+ for (j = L_NZ_START(i)+u_part; j < L_NZ_START(i+1); ++j) {
+ isub = L_SUB(lptr);
+ cc_mult(&comp_temp, &utemp, &Lval[j]);
+ c_sub(&work[isub], &work[isub], &comp_temp);
+ ++lptr;
+ }
+ }
+
+ /* Now compute A[k] - (L*U)[k] */
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ arow = Astore->rowind[i];
+ work[perm_r[arow]].r += Aval[i].r;
+ work[perm_r[arow]].i += Aval[i].i;
+ }
+
+ /* Now compute the 1-norm of the column vector work */
+ tnorm = 0.;
+ for (i = 0; i < m; ++i) {
+ tnorm += fabs(work[i].r) + fabs(work[i].i);
+ work[i] = zero;
+ }
+ cnorm = SUPERLU_MAX(tnorm, cnorm);
+ }
+
+ *resid = cnorm;
+
+ if (anorm <= 0.f) {
+ if (*resid != 0.f) {
+ *resid = 1.f / eps;
+ }
+ } else {
+ *resid = *resid / (float) n / anorm / eps;
+ }
+
+ SUPERLU_FREE(work);
+ return 0;
+
+/* End of SP_SGET01 */
+
+} /* sp_sget01_ */
+
diff --git a/TESTING/sp_cget02.c b/TESTING/sp_cget02.c
new file mode 100644
index 0000000..a3416f5
--- /dev/null
+++ b/TESTING/sp_cget02.c
@@ -0,0 +1,139 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "csp_defs.h"
+
+int sp_cget02(trans_t trans, int m, int n, int nrhs, SuperMatrix *A,
+ complex *x, int ldx, complex *b, int ldb, float *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_CGET02 computes the residual for a solution of a system of linear
+ equations A*x = b or A'*x = b:
+ RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations:
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ NRHS (input) INTEGER
+ The number of columns of B, the matrix of right hand sides.
+ NRHS >= 0.
+
+ A (input) SuperMatrix*, dimension (LDA,N)
+ The original M x N sparse matrix A.
+
+ X (input) COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors for the system of linear
+ equations.
+
+ LDX (input) INTEGER
+ The leading dimension of the array X. If TRANS = NOTRANS,
+ LDX >= max(1,N); if TRANS = TRANS or CONJ, LDX >= max(1,M).
+
+ B (input/output) COMPLEX PRECISION array, dimension (LDB,NRHS)
+ On entry, the right hand side vectors for the system of
+ linear equations.
+ On exit, B is overwritten with the difference B - A*X.
+
+ LDB (input) INTEGER
+ The leading dimension of the array B. IF TRANS = NOTRANS,
+ LDB >= max(1,M); if TRANS = TRANS or CONJ, LDB >= max(1,N).
+
+ RESID (output) FLOAT PRECISION
+ The maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ complex alpha = {-1., 0.0};
+ complex beta = {1., 0.0};
+ int c__1 = 1;
+
+ /* System generated locals */
+ float d__1, d__2;
+
+ /* Local variables */
+ int j;
+ int n1, n2;
+ float anorm, bnorm;
+ float xnorm;
+ float eps;
+ char transc[1];
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern float clangs(char *, SuperMatrix *);
+ extern float scasum_(int *, complex *, int *);
+ extern double slamch_(char *);
+
+ /* Function Body */
+ if ( m <= 0 || n <= 0 || nrhs == 0) {
+ *resid = 0.;
+ return 0;
+ }
+
+ if ( (trans == TRANS) || (trans == CONJ) ) {
+ n1 = n;
+ n2 = m;
+ *transc = 'T';
+ } else {
+ n1 = m;
+ n2 = n;
+ *transc = 'N';
+ }
+
+ /* Exit with RESID = 1/EPS if ANORM = 0. */
+
+ eps = slamch_("Epsilon");
+ anorm = clangs("1", A);
+ if (anorm <= 0.) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute B - A*X (or B - A'*X ) and store in B. */
+
+ sp_cgemm(transc, "N", n1, nrhs, n2, alpha, A, x, ldx, beta, b, ldb);
+
+ /* Compute the maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ) . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ bnorm = scasum_(&n1, &b[j*ldb], &c__1);
+ xnorm = scasum_(&n2, &x[j*ldx], &c__1);
+ if (xnorm <= 0.) {
+ *resid = 1. / eps;
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = bnorm / anorm / xnorm / eps;
+ *resid = SUPERLU_MAX(d__1, d__2);
+ }
+ }
+
+ return 0;
+
+} /* sp_cget02 */
+
diff --git a/TESTING/sp_cget04.c b/TESTING/sp_cget04.c
new file mode 100644
index 0000000..655d247
--- /dev/null
+++ b/TESTING/sp_cget04.c
@@ -0,0 +1,125 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "csp_defs.h"
+#include "util.h"
+
+int sp_cget04(int n, int nrhs, complex *x, int ldx, complex *xact,
+ int ldxact, float rcond, float *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_CGET04 computes the difference between a computed solution and the
+ true solution to a system of linear equations.
+ RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+ where RCOND is the reciprocal of the condition number and EPS is the
+ machine epsilon.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+ X (input) COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) COMPLEX PRECISION array, dimension( LDX, NRHS )
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+ RCOND (input) COMPLEX PRECISION
+ The reciprocal of the condition number of the coefficient
+ matrix in the system of equations.
+
+ RESID (output) FLOAT PRECISION
+ The maximum over the NRHS solution vectors of
+ ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ float d__1, d__2, d__3, d__4;
+
+ /* Local variables */
+ int i, j, n__1;
+ int ix;
+ float xnorm;
+ float eps;
+ float diffnm;
+
+ /* Function prototypes */
+ extern int icamax_(int *, complex *, int *);
+ extern double slamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ *resid = 0.;
+ return 0;
+ }
+
+ /* Exit with RESID = 1/EPS if RCOND is invalid. */
+
+ eps = slamch_("Epsilon");
+ if ( rcond < 0. ) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute the maximum of norm(X - XACT) / ( norm(XACT) * EPS )
+ over all the vectors X and XACT . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ ix = icamax_(&n__1, &xact[j*ldxact], &c__1);
+ xnorm = (d__1 = xact[ix-1 + j*ldxact].r, fabs(d__1)) +
+ (d__2 = xact[ix-1 + j*ldxact].i, fabs(d__2));
+
+ diffnm = 0.;
+ for (i = 0; i < n; ++i) {
+ /* Computing MAX */
+ d__3 = diffnm;
+ d__4 = (d__1 = x[i+j*ldx].r-xact[i+j*ldxact].r, fabs(d__1)) +
+ (d__2 = x[i+j*ldx].i-xact[i+j*ldxact].i, fabs(d__2));
+ diffnm = SUPERLU_MAX(d__3,d__4);
+ }
+ if (xnorm <= 0.) {
+ if (diffnm > 0.) {
+ *resid = 1. / eps;
+ }
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = diffnm / xnorm * rcond;
+ *resid = SUPERLU_MAX(d__1,d__2);
+ }
+ }
+ if (*resid * eps < 1.) {
+ *resid /= eps;
+ }
+
+ return 0;
+
+} /* sp_cget04_ */
diff --git a/TESTING/sp_cget07.c b/TESTING/sp_cget07.c
new file mode 100644
index 0000000..9d23660
--- /dev/null
+++ b/TESTING/sp_cget07.c
@@ -0,0 +1,228 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include <math.h>
+#include "csp_defs.h"
+
+int sp_cget07(trans_t trans, int n, int nrhs, SuperMatrix *A, complex *b,
+ int ldb, complex *x, int ldx, complex *xact,
+ int ldxact, float *ferr, float *berr, float *reslts)
+{
+/*
+ Purpose
+ =======
+
+ SP_CGET07 tests the error bounds from iterative refinement for the
+ computed solution to a system of equations op(A)*X = B, where A is a
+ general n by n matrix and op(A) = A or A**T, depending on TRANS.
+
+ RESLTS(1) = test of the error bound
+ = norm(X - XACT) / ( norm(X) * FERR )
+ A large value is returned if this ratio is not less than one.
+
+ RESLTS(2) = residual from the iterative refinement routine
+ = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations.
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original n by n matrix A.
+
+ B (input) COMPLEX PRECISION array, dimension (LDB,NRHS)
+ The right hand side vectors for the system of linear
+ equations.
+
+ LDB (input) INT
+ The leading dimension of the array B. LDB >= max(1,N).
+
+ X (input) COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+
+ FERR (input) COMPLEX PRECISION array, dimension (NRHS)
+ The estimated forward error bounds for each solution vector
+ X. If XTRUE is the true solution, FERR bounds the magnitude
+ of the largest entry in (X - XTRUE) divided by the magnitude
+ of the largest entry in X.
+
+ BERR (input) COMPLEX PRECISION array, dimension (NRHS)
+ The componentwise relative backward error of each solution
+ vector (i.e., the smallest relative change in any entry of A
+
+ or B that makes X an exact solution).
+
+ RESLTS (output) FLOAT PRECISION array, dimension (2)
+ The maximum over the NRHS solution vectors of the ratios:
+ RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+ RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ float d__1, d__2;
+ float d__3, d__4;
+
+ /* Local variables */
+ float diff, axbi;
+ int imax, irow, n__1;
+ int i, j, k;
+ float unfl, ovfl;
+ float xnorm;
+ float errbnd;
+ int notran;
+ float eps, tmp;
+ float *rwork;
+ complex *Aval;
+ NCformat *Astore;
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern int icamax_(int *, complex *, int *);
+ extern double slamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ reslts[0] = 0.;
+ reslts[1] = 0.;
+ return 0;
+ }
+
+ eps = slamch_("Epsilon");
+ unfl = slamch_("Safe minimum");
+ ovfl = 1. / unfl;
+ notran = (trans == NOTRANS);
+
+ rwork = (float *) SUPERLU_MALLOC(n*sizeof(float));
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ Astore = A->Store;
+ Aval = (complex *) Astore->nzval;
+
+ /* Test 1: Compute the maximum of
+ norm(X - XACT) / ( norm(X) * FERR )
+ over all the vectors X and XACT using the infinity-norm. */
+
+ errbnd = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ imax = icamax_(&n__1, &x[j*ldx], &c__1);
+ d__1 = (d__2 = x[imax-1 + j*ldx].r, fabs(d__2)) +
+ (d__3 = x[imax-1 + j*ldx].i, fabs(d__3));
+ xnorm = SUPERLU_MAX(d__1,unfl);
+ diff = 0.;
+ for (i = 0; i < n; ++i) {
+ d__1 = (d__2 = x[i+j*ldx].r - xact[i+j*ldxact].r, fabs(d__2)) +
+ (d__3 = x[i+j*ldx].i - xact[i+j*ldxact].i, fabs(d__3));
+ diff = SUPERLU_MAX(diff, d__1);
+ }
+
+ if (xnorm > 1.) {
+ goto L20;
+ } else if (diff <= ovfl * xnorm) {
+ goto L20;
+ } else {
+ errbnd = 1. / eps;
+ goto L30;
+ }
+
+L20:
+#if 0
+ if (diff / xnorm <= ferr[j]) {
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ } else {
+ errbnd = 1. / eps;
+ }
+#endif
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ /*printf("Ferr: %f\n", errbnd);*/
+L30:
+ ;
+ }
+ reslts[0] = errbnd;
+
+ /* Test 2: Compute the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) + abs(b))_i ) */
+
+ for (k = 0; k < nrhs; ++k) {
+ for (i = 0; i < n; ++i)
+ rwork[i] = (d__1 = b[i + k*ldb].r, fabs(d__1)) +
+ (d__2 = b[i + k*ldb].i, fabs(d__2));
+ if ( notran ) {
+ for (j = 0; j < n; ++j) {
+ tmp = (d__1 = x[j + k*ldx].r, fabs(d__1)) +
+ (d__2 = x[j + k*ldx].i, fabs(d__2));
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ d__1 = (d__2 = Aval[i].r, fabs(d__2)) +
+ (d__3 = Aval[i].i, fabs(d__3));
+ rwork[Astore->rowind[i]] += d__1 * tmp;
+ }
+ }
+ } else {
+ for (j = 0; j < n; ++j) {
+ tmp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ d__1 = (d__2 = x[irow + k*ldx].r, fabs(d__2)) +
+ (d__3 = x[irow + k*ldx].i, fabs(d__3));
+ d__2 = (d__3 = Aval[i].r, fabs(d__3)) +
+ (d__4 = Aval[i].i, fabs(d__4));
+ tmp += d__2 * d__1;
+ }
+ rwork[j] += tmp;
+ }
+ }
+
+ axbi = rwork[0];
+ for (i = 1; i < n; ++i) axbi = SUPERLU_MIN(axbi, rwork[i]);
+
+ /* Computing MAX */
+ d__1 = axbi, d__2 = (n + 1) * unfl;
+ tmp = berr[k] / ((n + 1) * eps + (n + 1) * unfl / SUPERLU_MAX(d__1,d__2));
+
+ if (k == 0) {
+ reslts[1] = tmp;
+ } else {
+ reslts[1] = SUPERLU_MAX(reslts[1],tmp);
+ }
+ }
+
+ SUPERLU_FREE(rwork);
+ return 0;
+
+} /* sp_cget07 */
diff --git a/TESTING/sp_dconvert.c b/TESTING/sp_dconvert.c
new file mode 100644
index 0000000..7391e69
--- /dev/null
+++ b/TESTING/sp_dconvert.c
@@ -0,0 +1,44 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+
+#include "dsp_defs.h"
+#include "util.h"
+
+/*
+ * Convert a full matrix into a sparse matrix format.
+ */
+int
+sp_dconvert(int m, int n, double *A, int lda, int kl, int ku,
+ double *a, int *asub, int *xa, int *nnz)
+{
+ int lasta = 0;
+ int i, j, ilow, ihigh;
+ int *row;
+ double *val;
+
+ for (j = 0; j < n; ++j) {
+ xa[j] = lasta;
+ val = &a[xa[j]];
+ row = &asub[xa[j]];
+
+ ilow = SUPERLU_MAX(0, j - ku);
+ ihigh = SUPERLU_MIN(n-1, j + kl);
+ for (i = ilow; i <= ihigh; ++i) {
+ val[i-ilow] = A[i + j*lda];
+ row[i-ilow] = i;
+ }
+ lasta += ihigh - ilow + 1;
+ }
+
+ xa[n] = *nnz = lasta;
+ return 0;
+}
+
+
diff --git a/TESTING/sp_dget01.c b/TESTING/sp_dget01.c
new file mode 100644
index 0000000..54a31ed
--- /dev/null
+++ b/TESTING/sp_dget01.c
@@ -0,0 +1,156 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "dsp_defs.h"
+#include "util.h"
+
+int sp_dget01(int m, int n, SuperMatrix *A, SuperMatrix *L,
+ SuperMatrix *U, int *perm_r, double *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_DGET01 reconstructs a matrix A from its L*U factorization and
+ computes the residual
+ norm(L*U - A) / ( N * norm(A) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ ==========
+
+ M (input) INT
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INT
+ The number of columns of the matrix A. N >= 0.
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original M x N matrix A.
+
+ L (input) SuperMatrix *, dimension (L->nrow, L->ncol)
+ The factor matrix L.
+
+ U (input) SuperMatrix *, dimension (U->nrow, U->ncol)
+ The factor matrix U.
+
+ perm_r (input) INT array, dimension (M)
+ The pivot indices from DGSTRF.
+
+ RESID (output) DOUBLE*
+ norm(L*U - A) / ( N * norm(A) * EPS )
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ double zero = 0.0;
+ int i, j, k, arow, lptr,isub, urow, superno, fsupc, u_part;
+ double utemp, comp_temp;
+ double anorm, tnorm, cnorm;
+ double eps;
+ double *work;
+ SCformat *Lstore;
+ NCformat *Astore, *Ustore;
+ double *Aval, *Lval, *Uval;
+
+ /* Function prototypes */
+ extern double dlangs(char *, SuperMatrix *);
+ extern double dlamch_(char *);
+
+
+ /* Quick exit if M = 0 or N = 0. */
+
+ if (m <= 0 || n <= 0) {
+ *resid = 0.f;
+ return 0;
+ }
+
+ work = (double *)doubleCalloc(m);
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+
+ /* Determine EPS and the norm of A. */
+ eps = dlamch_("Epsilon");
+ anorm = dlangs("1", A);
+ cnorm = 0.;
+
+ /* Compute the product L*U, one column at a time */
+ for (k = 0; k < n; ++k) {
+
+ /* The U part outside the rectangular supernode */
+ for (i = U_NZ_START(k); i < U_NZ_START(k+1); ++i) {
+ urow = U_SUB(i);
+ utemp = Uval[i];
+ superno = Lstore->col_to_sup[urow];
+ fsupc = L_FST_SUPC(superno);
+ u_part = urow - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)] -= utemp; /* L_ii = 1 */
+ for (j = L_NZ_START(urow) + u_part; j < L_NZ_START(urow+1); ++j) {
+ isub = L_SUB(lptr);
+ work[isub] -= Lval[j] * utemp;
+ ++lptr;
+ }
+ }
+
+ /* The U part inside the rectangular supernode */
+ superno = Lstore->col_to_sup[k];
+ fsupc = L_FST_SUPC(superno);
+ urow = L_NZ_START(k);
+ for (i = fsupc; i <= k; ++i) {
+ utemp = Lval[urow++];
+ u_part = i - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)] -= utemp; /* L_ii = 1 */
+ for (j = L_NZ_START(i)+u_part; j < L_NZ_START(i+1); ++j) {
+ isub = L_SUB(lptr);
+ work[isub] -= Lval[j] * utemp;
+ ++lptr;
+ }
+ }
+
+ /* Now compute A[k] - (L*U)[k] */
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ arow = Astore->rowind[i];
+ work[perm_r[arow]] += Aval[i];
+ }
+
+ /* Now compute the 1-norm of the column vector work */
+ tnorm = 0.;
+ for (i = 0; i < m; ++i) {
+ tnorm += fabs(work[i]);
+ work[i] = zero;
+ }
+ cnorm = SUPERLU_MAX(tnorm, cnorm);
+ }
+
+ *resid = cnorm;
+
+ if (anorm <= 0.f) {
+ if (*resid != 0.f) {
+ *resid = 1.f / eps;
+ }
+ } else {
+ *resid = *resid / (float) n / anorm / eps;
+ }
+
+ SUPERLU_FREE(work);
+ return 0;
+
+/* End of SP_SGET01 */
+
+} /* sp_sget01_ */
+
diff --git a/TESTING/sp_dget02.c b/TESTING/sp_dget02.c
new file mode 100644
index 0000000..eab3ec4
--- /dev/null
+++ b/TESTING/sp_dget02.c
@@ -0,0 +1,139 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "dsp_defs.h"
+
+int sp_dget02(trans_t trans, int m, int n, int nrhs, SuperMatrix *A,
+ double *x, int ldx, double *b, int ldb, double *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_DGET02 computes the residual for a solution of a system of linear
+ equations A*x = b or A'*x = b:
+ RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations:
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ NRHS (input) INTEGER
+ The number of columns of B, the matrix of right hand sides.
+ NRHS >= 0.
+
+ A (input) SuperMatrix*, dimension (LDA,N)
+ The original M x N sparse matrix A.
+
+ X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors for the system of linear
+ equations.
+
+ LDX (input) INTEGER
+ The leading dimension of the array X. If TRANS = NOTRANS,
+ LDX >= max(1,N); if TRANS = TRANS or CONJ, LDX >= max(1,M).
+
+ B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
+ On entry, the right hand side vectors for the system of
+ linear equations.
+ On exit, B is overwritten with the difference B - A*X.
+
+ LDB (input) INTEGER
+ The leading dimension of the array B. IF TRANS = NOTRANS,
+ LDB >= max(1,M); if TRANS = TRANS or CONJ, LDB >= max(1,N).
+
+ RESID (output) DOUBLE PRECISION
+ The maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ double alpha = -1.;
+ double beta = 1.;
+ int c__1 = 1;
+
+ /* System generated locals */
+ double d__1, d__2;
+
+ /* Local variables */
+ int j;
+ int n1, n2;
+ double anorm, bnorm;
+ double xnorm;
+ double eps;
+ char transc[1];
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern double dlangs(char *, SuperMatrix *);
+ extern double dasum_(int *, double *, int *);
+ extern double dlamch_(char *);
+
+ /* Function Body */
+ if ( m <= 0 || n <= 0 || nrhs == 0) {
+ *resid = 0.;
+ return 0;
+ }
+
+ if ( (trans == TRANS) || (trans == CONJ) ) {
+ n1 = n;
+ n2 = m;
+ *transc = 'T';
+ } else {
+ n1 = m;
+ n2 = n;
+ *transc = 'N';
+ }
+
+ /* Exit with RESID = 1/EPS if ANORM = 0. */
+
+ eps = dlamch_("Epsilon");
+ anorm = dlangs("1", A);
+ if (anorm <= 0.) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute B - A*X (or B - A'*X ) and store in B. */
+
+ sp_dgemm(transc, "N", n1, nrhs, n2, alpha, A, x, ldx, beta, b, ldb);
+
+ /* Compute the maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ) . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ bnorm = dasum_(&n1, &b[j*ldb], &c__1);
+ xnorm = dasum_(&n2, &x[j*ldx], &c__1);
+ if (xnorm <= 0.) {
+ *resid = 1. / eps;
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = bnorm / anorm / xnorm / eps;
+ *resid = SUPERLU_MAX(d__1, d__2);
+ }
+ }
+
+ return 0;
+
+} /* sp_dget02 */
+
diff --git a/TESTING/sp_dget04.c b/TESTING/sp_dget04.c
new file mode 100644
index 0000000..dd3d1f4
--- /dev/null
+++ b/TESTING/sp_dget04.c
@@ -0,0 +1,123 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "dsp_defs.h"
+#include "util.h"
+
+int sp_dget04(int n, int nrhs, double *x, int ldx, double *xact,
+ int ldxact, double rcond, double *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_DGET04 computes the difference between a computed solution and the
+ true solution to a system of linear equations.
+ RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+ where RCOND is the reciprocal of the condition number and EPS is the
+ machine epsilon.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+ X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) DOUBLE PRECISION array, dimension( LDX, NRHS )
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+ RCOND (input) DOUBLE PRECISION
+ The reciprocal of the condition number of the coefficient
+ matrix in the system of equations.
+
+ RESID (output) DOUBLE PRECISION
+ The maximum over the NRHS solution vectors of
+ ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ double d__1, d__2, d__3, d__4;
+
+ /* Local variables */
+ int i, j, n__1;
+ int ix;
+ double xnorm;
+ double eps;
+ double diffnm;
+
+ /* Function prototypes */
+ extern int idamax_(int *, double *, int *);
+ extern double dlamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ *resid = 0.;
+ return 0;
+ }
+
+ /* Exit with RESID = 1/EPS if RCOND is invalid. */
+
+ eps = dlamch_("Epsilon");
+ if ( rcond < 0. ) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute the maximum of norm(X - XACT) / ( norm(XACT) * EPS )
+ over all the vectors X and XACT . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ ix = idamax_(&n__1, &xact[j*ldxact], &c__1);
+ xnorm = (d__1 = xact[ix-1 + j*ldxact], fabs(d__1));
+
+ diffnm = 0.;
+ for (i = 0; i < n; ++i) {
+ /* Computing MAX */
+ d__3 = diffnm;
+ d__4 = (d__1 = x[i+j*ldx]-xact[i+j*ldxact], fabs(d__1));
+ diffnm = SUPERLU_MAX(d__3,d__4);
+ }
+ if (xnorm <= 0.) {
+ if (diffnm > 0.) {
+ *resid = 1. / eps;
+ }
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = diffnm / xnorm * rcond;
+ *resid = SUPERLU_MAX(d__1,d__2);
+ }
+ }
+ if (*resid * eps < 1.) {
+ *resid /= eps;
+ }
+
+ return 0;
+
+} /* sp_dget04_ */
diff --git a/TESTING/sp_dget07.c b/TESTING/sp_dget07.c
new file mode 100644
index 0000000..ca78c22
--- /dev/null
+++ b/TESTING/sp_dget07.c
@@ -0,0 +1,218 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include <math.h>
+#include "dsp_defs.h"
+
+int sp_dget07(trans_t trans, int n, int nrhs, SuperMatrix *A, double *b,
+ int ldb, double *x, int ldx, double *xact,
+ int ldxact, double *ferr, double *berr, double *reslts)
+{
+/*
+ Purpose
+ =======
+
+ SP_DGET07 tests the error bounds from iterative refinement for the
+ computed solution to a system of equations op(A)*X = B, where A is a
+ general n by n matrix and op(A) = A or A**T, depending on TRANS.
+
+ RESLTS(1) = test of the error bound
+ = norm(X - XACT) / ( norm(X) * FERR )
+ A large value is returned if this ratio is not less than one.
+
+ RESLTS(2) = residual from the iterative refinement routine
+ = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations.
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original n by n matrix A.
+
+ B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
+ The right hand side vectors for the system of linear
+ equations.
+
+ LDB (input) INT
+ The leading dimension of the array B. LDB >= max(1,N).
+
+ X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+
+ FERR (input) DOUBLE PRECISION array, dimension (NRHS)
+ The estimated forward error bounds for each solution vector
+ X. If XTRUE is the true solution, FERR bounds the magnitude
+ of the largest entry in (X - XTRUE) divided by the magnitude
+ of the largest entry in X.
+
+ BERR (input) DOUBLE PRECISION array, dimension (NRHS)
+ The componentwise relative backward error of each solution
+ vector (i.e., the smallest relative change in any entry of A
+
+ or B that makes X an exact solution).
+
+ RESLTS (output) DOUBLE PRECISION array, dimension (2)
+ The maximum over the NRHS solution vectors of the ratios:
+ RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+ RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ double d__1, d__2;
+
+ /* Local variables */
+ double diff, axbi;
+ int imax, irow, n__1;
+ int i, j, k;
+ double unfl, ovfl;
+ double xnorm;
+ double errbnd;
+ int notran;
+ double eps, tmp;
+ double *rwork;
+ double *Aval;
+ NCformat *Astore;
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern int idamax_(int *, double *, int *);
+ extern double dlamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ reslts[0] = 0.;
+ reslts[1] = 0.;
+ return 0;
+ }
+
+ eps = dlamch_("Epsilon");
+ unfl = dlamch_("Safe minimum");
+ ovfl = 1. / unfl;
+ notran = (trans == NOTRANS);
+
+ rwork = (double *) SUPERLU_MALLOC(n*sizeof(double));
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ Astore = A->Store;
+ Aval = (double *) Astore->nzval;
+
+ /* Test 1: Compute the maximum of
+ norm(X - XACT) / ( norm(X) * FERR )
+ over all the vectors X and XACT using the infinity-norm. */
+
+ errbnd = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ imax = idamax_(&n__1, &x[j*ldx], &c__1);
+ d__1 = fabs(x[imax-1 + j*ldx]);
+ xnorm = SUPERLU_MAX(d__1,unfl);
+ diff = 0.;
+ for (i = 0; i < n; ++i) {
+ d__1 = fabs(x[i+j*ldx] - xact[i+j*ldxact]);
+ diff = SUPERLU_MAX(diff, d__1);
+ }
+
+ if (xnorm > 1.) {
+ goto L20;
+ } else if (diff <= ovfl * xnorm) {
+ goto L20;
+ } else {
+ errbnd = 1. / eps;
+ goto L30;
+ }
+
+L20:
+#if 0
+ if (diff / xnorm <= ferr[j]) {
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ } else {
+ errbnd = 1. / eps;
+ }
+#endif
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ /*printf("Ferr: %f\n", errbnd);*/
+L30:
+ ;
+ }
+ reslts[0] = errbnd;
+
+ /* Test 2: Compute the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) + abs(b))_i ) */
+
+ for (k = 0; k < nrhs; ++k) {
+ for (i = 0; i < n; ++i)
+ rwork[i] = fabs( b[i + k*ldb] );
+ if ( notran ) {
+ for (j = 0; j < n; ++j) {
+ tmp = fabs( x[j + k*ldx] );
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ rwork[Astore->rowind[i]] += fabs(Aval[i]) * tmp;
+ }
+ }
+ } else {
+ for (j = 0; j < n; ++j) {
+ tmp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ d__1 = fabs( x[irow + k*ldx] );
+ tmp += fabs(Aval[i]) * d__1;
+ }
+ rwork[j] += tmp;
+ }
+ }
+
+ axbi = rwork[0];
+ for (i = 1; i < n; ++i) axbi = SUPERLU_MIN(axbi, rwork[i]);
+
+ /* Computing MAX */
+ d__1 = axbi, d__2 = (n + 1) * unfl;
+ tmp = berr[k] / ((n + 1) * eps + (n + 1) * unfl / SUPERLU_MAX(d__1,d__2));
+
+ if (k == 0) {
+ reslts[1] = tmp;
+ } else {
+ reslts[1] = SUPERLU_MAX(reslts[1],tmp);
+ }
+ }
+
+ SUPERLU_FREE(rwork);
+ return 0;
+
+} /* sp_dget07 */
diff --git a/TESTING/sp_ienv.c b/TESTING/sp_ienv.c
new file mode 100644
index 0000000..a0a8509
--- /dev/null
+++ b/TESTING/sp_ienv.c
@@ -0,0 +1,57 @@
+/*
+ * File name: sp_ienv.c
+ * History: Modified from lapack routine ILAENV
+ */
+int
+sp_ienv(int ispec)
+{
+/*
+ Purpose
+ =======
+
+ sp_ienv() is inquired to choose machine-dependent parameters for the
+ local environment. See ISPEC for a description of the parameters.
+
+ This version provides a set of parameters which should give good,
+ but not optimal, performance on many of the currently available
+ computers. Users are encouraged to modify this subroutine to set
+ the tuning parameters for their particular machine using the option
+ and problem size information in the arguments.
+
+ Arguments
+ =========
+
+ ISPEC (input) int
+ Specifies the parameter to be returned as the value of SP_IENV.
+ = 1: the panel size w; a panel consists of w consecutive
+ columns of matrix A in the process of Gaussian elimination.
+ The best value depends on machine's cache characters.
+ = 2: the relaxation parameter relax; if the number of
+ nodes (columns) in a subtree of the elimination tree is less
+ than relax, this subtree is considered as one supernode,
+ regardless of the their row structures.
+ = 3: the maximum size for a supernode;
+ = 4: the minimum row dimension for 2-D blocking to be used;
+ = 5: the minimum column dimension for 2-D blocking to be used;
+ = 6: the estimated fills factor for L and U, compared with A;
+
+ (SP_IENV) (output) int
+ >= 0: the value of the parameter specified by ISPEC
+ < 0: if SP_IENV = -k, the k-th argument had an illegal value.
+
+ =====================================================================
+*/
+
+ switch (ispec) {
+ case 1: return (3);
+ case 2: return (2);
+ case 3: return (10);
+ case 4: return (20);
+ case 5: return (10);
+ case 6: return (1);
+ }
+
+ /* Invalid value for ISPEC */
+ return (-1);
+
+} /* sp_ienv_ */
diff --git a/TESTING/sp_sconvert.c b/TESTING/sp_sconvert.c
new file mode 100644
index 0000000..4c51a07
--- /dev/null
+++ b/TESTING/sp_sconvert.c
@@ -0,0 +1,44 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+
+#include "ssp_defs.h"
+#include "util.h"
+
+/*
+ * Convert a full matrix into a sparse matrix format.
+ */
+int
+sp_sconvert(int m, int n, float *A, int lda, int kl, int ku,
+ float *a, int *asub, int *xa, int *nnz)
+{
+ int lasta = 0;
+ int i, j, ilow, ihigh;
+ int *row;
+ float *val;
+
+ for (j = 0; j < n; ++j) {
+ xa[j] = lasta;
+ val = &a[xa[j]];
+ row = &asub[xa[j]];
+
+ ilow = SUPERLU_MAX(0, j - ku);
+ ihigh = SUPERLU_MIN(n-1, j + kl);
+ for (i = ilow; i <= ihigh; ++i) {
+ val[i-ilow] = A[i + j*lda];
+ row[i-ilow] = i;
+ }
+ lasta += ihigh - ilow + 1;
+ }
+
+ xa[n] = *nnz = lasta;
+ return 0;
+}
+
+
diff --git a/TESTING/sp_sget01.c b/TESTING/sp_sget01.c
new file mode 100644
index 0000000..07c8d2e
--- /dev/null
+++ b/TESTING/sp_sget01.c
@@ -0,0 +1,156 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "ssp_defs.h"
+#include "util.h"
+
+int sp_sget01(int m, int n, SuperMatrix *A, SuperMatrix *L,
+ SuperMatrix *U, int *perm_r, float *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_SGET01 reconstructs a matrix A from its L*U factorization and
+ computes the residual
+ norm(L*U - A) / ( N * norm(A) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ ==========
+
+ M (input) INT
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INT
+ The number of columns of the matrix A. N >= 0.
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original M x N matrix A.
+
+ L (input) SuperMatrix *, dimension (L->nrow, L->ncol)
+ The factor matrix L.
+
+ U (input) SuperMatrix *, dimension (U->nrow, U->ncol)
+ The factor matrix U.
+
+ perm_r (input) INT array, dimension (M)
+ The pivot indices from SGSTRF.
+
+ RESID (output) FLOAT*
+ norm(L*U - A) / ( N * norm(A) * EPS )
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ float zero = 0.0;
+ int i, j, k, arow, lptr,isub, urow, superno, fsupc, u_part;
+ float utemp, comp_temp;
+ float anorm, tnorm, cnorm;
+ float eps;
+ float *work;
+ SCformat *Lstore;
+ NCformat *Astore, *Ustore;
+ float *Aval, *Lval, *Uval;
+
+ /* Function prototypes */
+ extern float slangs(char *, SuperMatrix *);
+ extern double slamch_(char *);
+
+
+ /* Quick exit if M = 0 or N = 0. */
+
+ if (m <= 0 || n <= 0) {
+ *resid = 0.f;
+ return 0;
+ }
+
+ work = (float *)floatCalloc(m);
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+
+ /* Determine EPS and the norm of A. */
+ eps = slamch_("Epsilon");
+ anorm = slangs("1", A);
+ cnorm = 0.;
+
+ /* Compute the product L*U, one column at a time */
+ for (k = 0; k < n; ++k) {
+
+ /* The U part outside the rectangular supernode */
+ for (i = U_NZ_START(k); i < U_NZ_START(k+1); ++i) {
+ urow = U_SUB(i);
+ utemp = Uval[i];
+ superno = Lstore->col_to_sup[urow];
+ fsupc = L_FST_SUPC(superno);
+ u_part = urow - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)] -= utemp; /* L_ii = 1 */
+ for (j = L_NZ_START(urow) + u_part; j < L_NZ_START(urow+1); ++j) {
+ isub = L_SUB(lptr);
+ work[isub] -= Lval[j] * utemp;
+ ++lptr;
+ }
+ }
+
+ /* The U part inside the rectangular supernode */
+ superno = Lstore->col_to_sup[k];
+ fsupc = L_FST_SUPC(superno);
+ urow = L_NZ_START(k);
+ for (i = fsupc; i <= k; ++i) {
+ utemp = Lval[urow++];
+ u_part = i - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)] -= utemp; /* L_ii = 1 */
+ for (j = L_NZ_START(i)+u_part; j < L_NZ_START(i+1); ++j) {
+ isub = L_SUB(lptr);
+ work[isub] -= Lval[j] * utemp;
+ ++lptr;
+ }
+ }
+
+ /* Now compute A[k] - (L*U)[k] */
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ arow = Astore->rowind[i];
+ work[perm_r[arow]] += Aval[i];
+ }
+
+ /* Now compute the 1-norm of the column vector work */
+ tnorm = 0.;
+ for (i = 0; i < m; ++i) {
+ tnorm += fabs(work[i]);
+ work[i] = zero;
+ }
+ cnorm = SUPERLU_MAX(tnorm, cnorm);
+ }
+
+ *resid = cnorm;
+
+ if (anorm <= 0.f) {
+ if (*resid != 0.f) {
+ *resid = 1.f / eps;
+ }
+ } else {
+ *resid = *resid / (float) n / anorm / eps;
+ }
+
+ SUPERLU_FREE(work);
+ return 0;
+
+/* End of SP_SGET01 */
+
+} /* sp_sget01_ */
+
diff --git a/TESTING/sp_sget02.c b/TESTING/sp_sget02.c
new file mode 100644
index 0000000..892f068
--- /dev/null
+++ b/TESTING/sp_sget02.c
@@ -0,0 +1,139 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "ssp_defs.h"
+
+int sp_sget02(trans_t trans, int m, int n, int nrhs, SuperMatrix *A,
+ float *x, int ldx, float *b, int ldb, float *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_SGET02 computes the residual for a solution of a system of linear
+ equations A*x = b or A'*x = b:
+ RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations:
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ NRHS (input) INTEGER
+ The number of columns of B, the matrix of right hand sides.
+ NRHS >= 0.
+
+ A (input) SuperMatrix*, dimension (LDA,N)
+ The original M x N sparse matrix A.
+
+ X (input) FLOAT PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors for the system of linear
+ equations.
+
+ LDX (input) INTEGER
+ The leading dimension of the array X. If TRANS = NOTRANS,
+ LDX >= max(1,N); if TRANS = TRANS or CONJ, LDX >= max(1,M).
+
+ B (input/output) FLOAT PRECISION array, dimension (LDB,NRHS)
+ On entry, the right hand side vectors for the system of
+ linear equations.
+ On exit, B is overwritten with the difference B - A*X.
+
+ LDB (input) INTEGER
+ The leading dimension of the array B. IF TRANS = NOTRANS,
+ LDB >= max(1,M); if TRANS = TRANS or CONJ, LDB >= max(1,N).
+
+ RESID (output) FLOAT PRECISION
+ The maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ float alpha = -1.;
+ float beta = 1.;
+ int c__1 = 1;
+
+ /* System generated locals */
+ float d__1, d__2;
+
+ /* Local variables */
+ int j;
+ int n1, n2;
+ float anorm, bnorm;
+ float xnorm;
+ float eps;
+ char transc[1];
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern float slangs(char *, SuperMatrix *);
+ extern float sasum_(int *, float *, int *);
+ extern double slamch_(char *);
+
+ /* Function Body */
+ if ( m <= 0 || n <= 0 || nrhs == 0) {
+ *resid = 0.;
+ return 0;
+ }
+
+ if ( (trans == TRANS) || (trans == CONJ) ) {
+ n1 = n;
+ n2 = m;
+ *transc = 'T';
+ } else {
+ n1 = m;
+ n2 = n;
+ *transc = 'N';
+ }
+
+ /* Exit with RESID = 1/EPS if ANORM = 0. */
+
+ eps = slamch_("Epsilon");
+ anorm = slangs("1", A);
+ if (anorm <= 0.) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute B - A*X (or B - A'*X ) and store in B. */
+
+ sp_sgemm(transc, "N", n1, nrhs, n2, alpha, A, x, ldx, beta, b, ldb);
+
+ /* Compute the maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ) . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ bnorm = sasum_(&n1, &b[j*ldb], &c__1);
+ xnorm = sasum_(&n2, &x[j*ldx], &c__1);
+ if (xnorm <= 0.) {
+ *resid = 1. / eps;
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = bnorm / anorm / xnorm / eps;
+ *resid = SUPERLU_MAX(d__1, d__2);
+ }
+ }
+
+ return 0;
+
+} /* sp_sget02 */
+
diff --git a/TESTING/sp_sget04.c b/TESTING/sp_sget04.c
new file mode 100644
index 0000000..d8c3c7a
--- /dev/null
+++ b/TESTING/sp_sget04.c
@@ -0,0 +1,123 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "ssp_defs.h"
+#include "util.h"
+
+int sp_sget04(int n, int nrhs, float *x, int ldx, float *xact,
+ int ldxact, float rcond, float *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_SGET04 computes the difference between a computed solution and the
+ true solution to a system of linear equations.
+ RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+ where RCOND is the reciprocal of the condition number and EPS is the
+ machine epsilon.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+ X (input) FLOAT PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) FLOAT PRECISION array, dimension( LDX, NRHS )
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+ RCOND (input) FLOAT PRECISION
+ The reciprocal of the condition number of the coefficient
+ matrix in the system of equations.
+
+ RESID (output) FLOAT PRECISION
+ The maximum over the NRHS solution vectors of
+ ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ float d__1, d__2, d__3, d__4;
+
+ /* Local variables */
+ int i, j, n__1;
+ int ix;
+ float xnorm;
+ float eps;
+ float diffnm;
+
+ /* Function prototypes */
+ extern int isamax_(int *, float *, int *);
+ extern double slamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ *resid = 0.;
+ return 0;
+ }
+
+ /* Exit with RESID = 1/EPS if RCOND is invalid. */
+
+ eps = slamch_("Epsilon");
+ if ( rcond < 0. ) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute the maximum of norm(X - XACT) / ( norm(XACT) * EPS )
+ over all the vectors X and XACT . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ ix = isamax_(&n__1, &xact[j*ldxact], &c__1);
+ xnorm = (d__1 = xact[ix-1 + j*ldxact], fabs(d__1));
+
+ diffnm = 0.;
+ for (i = 0; i < n; ++i) {
+ /* Computing MAX */
+ d__3 = diffnm;
+ d__4 = (d__1 = x[i+j*ldx]-xact[i+j*ldxact], fabs(d__1));
+ diffnm = SUPERLU_MAX(d__3,d__4);
+ }
+ if (xnorm <= 0.) {
+ if (diffnm > 0.) {
+ *resid = 1. / eps;
+ }
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = diffnm / xnorm * rcond;
+ *resid = SUPERLU_MAX(d__1,d__2);
+ }
+ }
+ if (*resid * eps < 1.) {
+ *resid /= eps;
+ }
+
+ return 0;
+
+} /* sp_sget04_ */
diff --git a/TESTING/sp_sget07.c b/TESTING/sp_sget07.c
new file mode 100644
index 0000000..aaf9776
--- /dev/null
+++ b/TESTING/sp_sget07.c
@@ -0,0 +1,218 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include <math.h>
+#include "ssp_defs.h"
+
+int sp_sget07(trans_t trans, int n, int nrhs, SuperMatrix *A, float *b,
+ int ldb, float *x, int ldx, float *xact,
+ int ldxact, float *ferr, float *berr, float *reslts)
+{
+/*
+ Purpose
+ =======
+
+ SP_SGET07 tests the error bounds from iterative refinement for the
+ computed solution to a system of equations op(A)*X = B, where A is a
+ general n by n matrix and op(A) = A or A**T, depending on TRANS.
+
+ RESLTS(1) = test of the error bound
+ = norm(X - XACT) / ( norm(X) * FERR )
+ A large value is returned if this ratio is not less than one.
+
+ RESLTS(2) = residual from the iterative refinement routine
+ = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations.
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original n by n matrix A.
+
+ B (input) FLOAT PRECISION array, dimension (LDB,NRHS)
+ The right hand side vectors for the system of linear
+ equations.
+
+ LDB (input) INT
+ The leading dimension of the array B. LDB >= max(1,N).
+
+ X (input) FLOAT PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) FLOAT PRECISION array, dimension (LDX,NRHS)
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+
+ FERR (input) FLOAT PRECISION array, dimension (NRHS)
+ The estimated forward error bounds for each solution vector
+ X. If XTRUE is the true solution, FERR bounds the magnitude
+ of the largest entry in (X - XTRUE) divided by the magnitude
+ of the largest entry in X.
+
+ BERR (input) FLOAT PRECISION array, dimension (NRHS)
+ The componentwise relative backward error of each solution
+ vector (i.e., the smallest relative change in any entry of A
+
+ or B that makes X an exact solution).
+
+ RESLTS (output) FLOAT PRECISION array, dimension (2)
+ The maximum over the NRHS solution vectors of the ratios:
+ RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+ RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ float d__1, d__2;
+
+ /* Local variables */
+ float diff, axbi;
+ int imax, irow, n__1;
+ int i, j, k;
+ float unfl, ovfl;
+ float xnorm;
+ float errbnd;
+ int notran;
+ float eps, tmp;
+ float *rwork;
+ float *Aval;
+ NCformat *Astore;
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern int isamax_(int *, float *, int *);
+ extern double slamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ reslts[0] = 0.;
+ reslts[1] = 0.;
+ return 0;
+ }
+
+ eps = slamch_("Epsilon");
+ unfl = slamch_("Safe minimum");
+ ovfl = 1. / unfl;
+ notran = (trans == NOTRANS);
+
+ rwork = (float *) SUPERLU_MALLOC(n*sizeof(float));
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ Astore = A->Store;
+ Aval = (float *) Astore->nzval;
+
+ /* Test 1: Compute the maximum of
+ norm(X - XACT) / ( norm(X) * FERR )
+ over all the vectors X and XACT using the infinity-norm. */
+
+ errbnd = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ imax = isamax_(&n__1, &x[j*ldx], &c__1);
+ d__1 = fabs(x[imax-1 + j*ldx]);
+ xnorm = SUPERLU_MAX(d__1,unfl);
+ diff = 0.;
+ for (i = 0; i < n; ++i) {
+ d__1 = fabs(x[i+j*ldx] - xact[i+j*ldxact]);
+ diff = SUPERLU_MAX(diff, d__1);
+ }
+
+ if (xnorm > 1.) {
+ goto L20;
+ } else if (diff <= ovfl * xnorm) {
+ goto L20;
+ } else {
+ errbnd = 1. / eps;
+ goto L30;
+ }
+
+L20:
+#if 0
+ if (diff / xnorm <= ferr[j]) {
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ } else {
+ errbnd = 1. / eps;
+ }
+#endif
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ /*printf("Ferr: %f\n", errbnd);*/
+L30:
+ ;
+ }
+ reslts[0] = errbnd;
+
+ /* Test 2: Compute the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) + abs(b))_i ) */
+
+ for (k = 0; k < nrhs; ++k) {
+ for (i = 0; i < n; ++i)
+ rwork[i] = fabs( b[i + k*ldb] );
+ if ( notran ) {
+ for (j = 0; j < n; ++j) {
+ tmp = fabs( x[j + k*ldx] );
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ rwork[Astore->rowind[i]] += fabs(Aval[i]) * tmp;
+ }
+ }
+ } else {
+ for (j = 0; j < n; ++j) {
+ tmp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ d__1 = fabs( x[irow + k*ldx] );
+ tmp += fabs(Aval[i]) * d__1;
+ }
+ rwork[j] += tmp;
+ }
+ }
+
+ axbi = rwork[0];
+ for (i = 1; i < n; ++i) axbi = SUPERLU_MIN(axbi, rwork[i]);
+
+ /* Computing MAX */
+ d__1 = axbi, d__2 = (n + 1) * unfl;
+ tmp = berr[k] / ((n + 1) * eps + (n + 1) * unfl / SUPERLU_MAX(d__1,d__2));
+
+ if (k == 0) {
+ reslts[1] = tmp;
+ } else {
+ reslts[1] = SUPERLU_MAX(reslts[1],tmp);
+ }
+ }
+
+ SUPERLU_FREE(rwork);
+ return 0;
+
+} /* sp_sget07 */
diff --git a/TESTING/sp_zconvert.c b/TESTING/sp_zconvert.c
new file mode 100644
index 0000000..8f4e866
--- /dev/null
+++ b/TESTING/sp_zconvert.c
@@ -0,0 +1,44 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+
+#include "zsp_defs.h"
+#include "util.h"
+
+/*
+ * Convert a full matrix into a sparse matrix format.
+ */
+int
+sp_zconvert(int m, int n, doublecomplex *A, int lda, int kl, int ku,
+ doublecomplex *a, int *asub, int *xa, int *nnz)
+{
+ int lasta = 0;
+ int i, j, ilow, ihigh;
+ int *row;
+ doublecomplex *val;
+
+ for (j = 0; j < n; ++j) {
+ xa[j] = lasta;
+ val = &a[xa[j]];
+ row = &asub[xa[j]];
+
+ ilow = SUPERLU_MAX(0, j - ku);
+ ihigh = SUPERLU_MIN(n-1, j + kl);
+ for (i = ilow; i <= ihigh; ++i) {
+ val[i-ilow] = A[i + j*lda];
+ row[i-ilow] = i;
+ }
+ lasta += ihigh - ilow + 1;
+ }
+
+ xa[n] = *nnz = lasta;
+ return 0;
+}
+
+
diff --git a/TESTING/sp_zget01.c b/TESTING/sp_zget01.c
new file mode 100644
index 0000000..97c46d4
--- /dev/null
+++ b/TESTING/sp_zget01.c
@@ -0,0 +1,161 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "zsp_defs.h"
+#include "util.h"
+
+int sp_zget01(int m, int n, SuperMatrix *A, SuperMatrix *L,
+ SuperMatrix *U, int *perm_r, double *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_ZGET01 reconstructs a matrix A from its L*U factorization and
+ computes the residual
+ norm(L*U - A) / ( N * norm(A) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ ==========
+
+ M (input) INT
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INT
+ The number of columns of the matrix A. N >= 0.
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original M x N matrix A.
+
+ L (input) SuperMatrix *, dimension (L->nrow, L->ncol)
+ The factor matrix L.
+
+ U (input) SuperMatrix *, dimension (U->nrow, U->ncol)
+ The factor matrix U.
+
+ perm_r (input) INT array, dimension (M)
+ The pivot indices from ZGSTRF.
+
+ RESID (output) DOUBLE*
+ norm(L*U - A) / ( N * norm(A) * EPS )
+
+ =====================================================================
+*/
+
+ /* Local variables */
+ doublecomplex zero = {0.0, 0.0};
+ int i, j, k, arow, lptr,isub, urow, superno, fsupc, u_part;
+ doublecomplex utemp, comp_temp;
+ double anorm, tnorm, cnorm;
+ double eps;
+ doublecomplex *work;
+ SCformat *Lstore;
+ NCformat *Astore, *Ustore;
+ doublecomplex *Aval, *Lval, *Uval;
+
+ /* Function prototypes */
+ extern double zlangs(char *, SuperMatrix *);
+ extern double dlamch_(char *);
+
+
+ /* Quick exit if M = 0 or N = 0. */
+
+ if (m <= 0 || n <= 0) {
+ *resid = 0.f;
+ return 0;
+ }
+
+ work = (doublecomplex *)doublecomplexCalloc(m);
+
+ Astore = A->Store;
+ Aval = Astore->nzval;
+ Lstore = L->Store;
+ Lval = Lstore->nzval;
+ Ustore = U->Store;
+ Uval = Ustore->nzval;
+
+ /* Determine EPS and the norm of A. */
+ eps = dlamch_("Epsilon");
+ anorm = zlangs("1", A);
+ cnorm = 0.;
+
+ /* Compute the product L*U, one column at a time */
+ for (k = 0; k < n; ++k) {
+
+ /* The U part outside the rectangular supernode */
+ for (i = U_NZ_START(k); i < U_NZ_START(k+1); ++i) {
+ urow = U_SUB(i);
+ utemp = Uval[i];
+ superno = Lstore->col_to_sup[urow];
+ fsupc = L_FST_SUPC(superno);
+ u_part = urow - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)].r -= utemp.r;
+ work[L_SUB(lptr-1)].i -= utemp.i;
+ for (j = L_NZ_START(urow) + u_part; j < L_NZ_START(urow+1); ++j) {
+ isub = L_SUB(lptr);
+ zz_mult(&comp_temp, &utemp, &Lval[j]);
+ z_sub(&work[isub], &work[isub], &comp_temp);
+ ++lptr;
+ }
+ }
+
+ /* The U part inside the rectangular supernode */
+ superno = Lstore->col_to_sup[k];
+ fsupc = L_FST_SUPC(superno);
+ urow = L_NZ_START(k);
+ for (i = fsupc; i <= k; ++i) {
+ utemp = Lval[urow++];
+ u_part = i - fsupc + 1;
+ lptr = L_SUB_START(fsupc) + u_part;
+ work[L_SUB(lptr-1)].r -= utemp.r;
+ work[L_SUB(lptr-1)].i -= utemp.i;
+ for (j = L_NZ_START(i)+u_part; j < L_NZ_START(i+1); ++j) {
+ isub = L_SUB(lptr);
+ zz_mult(&comp_temp, &utemp, &Lval[j]);
+ z_sub(&work[isub], &work[isub], &comp_temp);
+ ++lptr;
+ }
+ }
+
+ /* Now compute A[k] - (L*U)[k] */
+ for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) {
+ arow = Astore->rowind[i];
+ work[perm_r[arow]].r += Aval[i].r;
+ work[perm_r[arow]].i += Aval[i].i;
+ }
+
+ /* Now compute the 1-norm of the column vector work */
+ tnorm = 0.;
+ for (i = 0; i < m; ++i) {
+ tnorm += fabs(work[i].r) + fabs(work[i].i);
+ work[i] = zero;
+ }
+ cnorm = SUPERLU_MAX(tnorm, cnorm);
+ }
+
+ *resid = cnorm;
+
+ if (anorm <= 0.f) {
+ if (*resid != 0.f) {
+ *resid = 1.f / eps;
+ }
+ } else {
+ *resid = *resid / (float) n / anorm / eps;
+ }
+
+ SUPERLU_FREE(work);
+ return 0;
+
+/* End of SP_SGET01 */
+
+} /* sp_sget01_ */
+
diff --git a/TESTING/sp_zget02.c b/TESTING/sp_zget02.c
new file mode 100644
index 0000000..4bc9756
--- /dev/null
+++ b/TESTING/sp_zget02.c
@@ -0,0 +1,139 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include "zsp_defs.h"
+
+int sp_zget02(trans_t trans, int m, int n, int nrhs, SuperMatrix *A,
+ doublecomplex *x, int ldx, doublecomplex *b, int ldb, double *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_ZGET02 computes the residual for a solution of a system of linear
+ equations A*x = b or A'*x = b:
+ RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+ where EPS is the machine epsilon.
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations:
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ M (input) INTEGER
+ The number of rows of the matrix A. M >= 0.
+
+ N (input) INTEGER
+ The number of columns of the matrix A. N >= 0.
+
+ NRHS (input) INTEGER
+ The number of columns of B, the matrix of right hand sides.
+ NRHS >= 0.
+
+ A (input) SuperMatrix*, dimension (LDA,N)
+ The original M x N sparse matrix A.
+
+ X (input) DOUBLE COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors for the system of linear
+ equations.
+
+ LDX (input) INTEGER
+ The leading dimension of the array X. If TRANS = NOTRANS,
+ LDX >= max(1,N); if TRANS = TRANS or CONJ, LDX >= max(1,M).
+
+ B (input/output) DOUBLE COMPLEX PRECISION array, dimension (LDB,NRHS)
+ On entry, the right hand side vectors for the system of
+ linear equations.
+ On exit, B is overwritten with the difference B - A*X.
+
+ LDB (input) INTEGER
+ The leading dimension of the array B. IF TRANS = NOTRANS,
+ LDB >= max(1,M); if TRANS = TRANS or CONJ, LDB >= max(1,N).
+
+ RESID (output) DOUBLE PRECISION
+ The maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ doublecomplex alpha = {-1., 0.0};
+ doublecomplex beta = {1., 0.0};
+ int c__1 = 1;
+
+ /* System generated locals */
+ double d__1, d__2;
+
+ /* Local variables */
+ int j;
+ int n1, n2;
+ double anorm, bnorm;
+ double xnorm;
+ double eps;
+ char transc[1];
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern double zlangs(char *, SuperMatrix *);
+ extern double dzasum_(int *, doublecomplex *, int *);
+ extern double dlamch_(char *);
+
+ /* Function Body */
+ if ( m <= 0 || n <= 0 || nrhs == 0) {
+ *resid = 0.;
+ return 0;
+ }
+
+ if ( (trans == TRANS) || (trans == CONJ) ) {
+ n1 = n;
+ n2 = m;
+ *transc = 'T';
+ } else {
+ n1 = m;
+ n2 = n;
+ *transc = 'N';
+ }
+
+ /* Exit with RESID = 1/EPS if ANORM = 0. */
+
+ eps = dlamch_("Epsilon");
+ anorm = zlangs("1", A);
+ if (anorm <= 0.) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute B - A*X (or B - A'*X ) and store in B. */
+
+ sp_zgemm(transc, "N", n1, nrhs, n2, alpha, A, x, ldx, beta, b, ldb);
+
+ /* Compute the maximum over the number of right hand sides of
+ norm(B - A*X) / ( norm(A) * norm(X) * EPS ) . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ bnorm = dzasum_(&n1, &b[j*ldb], &c__1);
+ xnorm = dzasum_(&n2, &x[j*ldx], &c__1);
+ if (xnorm <= 0.) {
+ *resid = 1. / eps;
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = bnorm / anorm / xnorm / eps;
+ *resid = SUPERLU_MAX(d__1, d__2);
+ }
+ }
+
+ return 0;
+
+} /* sp_zget02 */
+
diff --git a/TESTING/sp_zget04.c b/TESTING/sp_zget04.c
new file mode 100644
index 0000000..fc5a820
--- /dev/null
+++ b/TESTING/sp_zget04.c
@@ -0,0 +1,125 @@
+
+
+/*
+ * -- SuperLU routine (version 2.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * November 15, 1997
+ *
+ */
+#include <math.h>
+#include "zsp_defs.h"
+#include "util.h"
+
+int sp_zget04(int n, int nrhs, doublecomplex *x, int ldx, doublecomplex *xact,
+ int ldxact, double rcond, double *resid)
+{
+/*
+ Purpose
+ =======
+
+ SP_ZGET04 computes the difference between a computed solution and the
+ true solution to a system of linear equations.
+ RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+ where RCOND is the reciprocal of the condition number and EPS is the
+ machine epsilon.
+
+ Arguments
+ =========
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+ X (input) DOUBLE COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) DOUBLE COMPLEX PRECISION array, dimension( LDX, NRHS )
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+ RCOND (input) DOUBLE COMPLEX PRECISION
+ The reciprocal of the condition number of the coefficient
+ matrix in the system of equations.
+
+ RESID (output) DOUBLE PRECISION
+ The maximum over the NRHS solution vectors of
+ ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+
+ =====================================================================
+*/
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ double d__1, d__2, d__3, d__4;
+
+ /* Local variables */
+ int i, j, n__1;
+ int ix;
+ double xnorm;
+ double eps;
+ double diffnm;
+
+ /* Function prototypes */
+ extern int izamax_(int *, doublecomplex *, int *);
+ extern double dlamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ *resid = 0.;
+ return 0;
+ }
+
+ /* Exit with RESID = 1/EPS if RCOND is invalid. */
+
+ eps = dlamch_("Epsilon");
+ if ( rcond < 0. ) {
+ *resid = 1. / eps;
+ return 0;
+ }
+
+ /* Compute the maximum of norm(X - XACT) / ( norm(XACT) * EPS )
+ over all the vectors X and XACT . */
+
+ *resid = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ ix = izamax_(&n__1, &xact[j*ldxact], &c__1);
+ xnorm = (d__1 = xact[ix-1 + j*ldxact].r, fabs(d__1)) +
+ (d__2 = xact[ix-1 + j*ldxact].i, fabs(d__2));
+
+ diffnm = 0.;
+ for (i = 0; i < n; ++i) {
+ /* Computing MAX */
+ d__3 = diffnm;
+ d__4 = (d__1 = x[i+j*ldx].r-xact[i+j*ldxact].r, fabs(d__1)) +
+ (d__2 = x[i+j*ldx].i-xact[i+j*ldxact].i, fabs(d__2));
+ diffnm = SUPERLU_MAX(d__3,d__4);
+ }
+ if (xnorm <= 0.) {
+ if (diffnm > 0.) {
+ *resid = 1. / eps;
+ }
+ } else {
+ /* Computing MAX */
+ d__1 = *resid, d__2 = diffnm / xnorm * rcond;
+ *resid = SUPERLU_MAX(d__1,d__2);
+ }
+ }
+ if (*resid * eps < 1.) {
+ *resid /= eps;
+ }
+
+ return 0;
+
+} /* sp_zget04_ */
diff --git a/TESTING/sp_zget07.c b/TESTING/sp_zget07.c
new file mode 100644
index 0000000..c41fdcb
--- /dev/null
+++ b/TESTING/sp_zget07.c
@@ -0,0 +1,228 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+#include <math.h>
+#include "zsp_defs.h"
+
+int sp_zget07(trans_t trans, int n, int nrhs, SuperMatrix *A, doublecomplex *b,
+ int ldb, doublecomplex *x, int ldx, doublecomplex *xact,
+ int ldxact, double *ferr, double *berr, double *reslts)
+{
+/*
+ Purpose
+ =======
+
+ SP_ZGET07 tests the error bounds from iterative refinement for the
+ computed solution to a system of equations op(A)*X = B, where A is a
+ general n by n matrix and op(A) = A or A**T, depending on TRANS.
+
+ RESLTS(1) = test of the error bound
+ = norm(X - XACT) / ( norm(X) * FERR )
+ A large value is returned if this ratio is not less than one.
+
+ RESLTS(2) = residual from the iterative refinement routine
+ = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+
+ Arguments
+ =========
+
+ TRANS (input) trans_t
+ Specifies the form of the system of equations.
+ = NOTRANS: A *x = b
+ = TRANS : A'*x = b, where A' is the transpose of A
+ = CONJ : A'*x = b, where A' is the transpose of A
+
+ N (input) INT
+ The number of rows of the matrices X and XACT. N >= 0.
+
+ NRHS (input) INT
+ The number of columns of the matrices X and XACT. NRHS >= 0.
+
+
+ A (input) SuperMatrix *, dimension (A->nrow, A->ncol)
+ The original n by n matrix A.
+
+ B (input) DOUBLE COMPLEX PRECISION array, dimension (LDB,NRHS)
+ The right hand side vectors for the system of linear
+ equations.
+
+ LDB (input) INT
+ The leading dimension of the array B. LDB >= max(1,N).
+
+ X (input) DOUBLE COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The computed solution vectors. Each vector is stored as a
+ column of the matrix X.
+
+ LDX (input) INT
+ The leading dimension of the array X. LDX >= max(1,N).
+
+ XACT (input) DOUBLE COMPLEX PRECISION array, dimension (LDX,NRHS)
+ The exact solution vectors. Each vector is stored as a
+ column of the matrix XACT.
+
+ LDXACT (input) INT
+ The leading dimension of the array XACT. LDXACT >= max(1,N).
+
+
+ FERR (input) DOUBLE COMPLEX PRECISION array, dimension (NRHS)
+ The estimated forward error bounds for each solution vector
+ X. If XTRUE is the true solution, FERR bounds the magnitude
+ of the largest entry in (X - XTRUE) divided by the magnitude
+ of the largest entry in X.
+
+ BERR (input) DOUBLE COMPLEX PRECISION array, dimension (NRHS)
+ The componentwise relative backward error of each solution
+ vector (i.e., the smallest relative change in any entry of A
+
+ or B that makes X an exact solution).
+
+ RESLTS (output) DOUBLE PRECISION array, dimension (2)
+ The maximum over the NRHS solution vectors of the ratios:
+ RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+ RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+
+ =====================================================================
+*/
+
+ /* Table of constant values */
+ int c__1 = 1;
+
+ /* System generated locals */
+ double d__1, d__2;
+ double d__3, d__4;
+
+ /* Local variables */
+ double diff, axbi;
+ int imax, irow, n__1;
+ int i, j, k;
+ double unfl, ovfl;
+ double xnorm;
+ double errbnd;
+ int notran;
+ double eps, tmp;
+ double *rwork;
+ doublecomplex *Aval;
+ NCformat *Astore;
+
+ /* Function prototypes */
+ extern int lsame_(char *, char *);
+ extern int izamax_(int *, doublecomplex *, int *);
+ extern double dlamch_(char *);
+
+ /* Quick exit if N = 0 or NRHS = 0. */
+ if ( n <= 0 || nrhs <= 0 ) {
+ reslts[0] = 0.;
+ reslts[1] = 0.;
+ return 0;
+ }
+
+ eps = dlamch_("Epsilon");
+ unfl = dlamch_("Safe minimum");
+ ovfl = 1. / unfl;
+ notran = (trans == NOTRANS);
+
+ rwork = (double *) SUPERLU_MALLOC(n*sizeof(double));
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ Astore = A->Store;
+ Aval = (doublecomplex *) Astore->nzval;
+
+ /* Test 1: Compute the maximum of
+ norm(X - XACT) / ( norm(X) * FERR )
+ over all the vectors X and XACT using the infinity-norm. */
+
+ errbnd = 0.;
+ for (j = 0; j < nrhs; ++j) {
+ n__1 = n;
+ imax = izamax_(&n__1, &x[j*ldx], &c__1);
+ d__1 = (d__2 = x[imax-1 + j*ldx].r, fabs(d__2)) +
+ (d__3 = x[imax-1 + j*ldx].i, fabs(d__3));
+ xnorm = SUPERLU_MAX(d__1,unfl);
+ diff = 0.;
+ for (i = 0; i < n; ++i) {
+ d__1 = (d__2 = x[i+j*ldx].r - xact[i+j*ldxact].r, fabs(d__2)) +
+ (d__3 = x[i+j*ldx].i - xact[i+j*ldxact].i, fabs(d__3));
+ diff = SUPERLU_MAX(diff, d__1);
+ }
+
+ if (xnorm > 1.) {
+ goto L20;
+ } else if (diff <= ovfl * xnorm) {
+ goto L20;
+ } else {
+ errbnd = 1. / eps;
+ goto L30;
+ }
+
+L20:
+#if 0
+ if (diff / xnorm <= ferr[j]) {
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ } else {
+ errbnd = 1. / eps;
+ }
+#endif
+ d__1 = diff / xnorm / ferr[j];
+ errbnd = SUPERLU_MAX(errbnd,d__1);
+ /*printf("Ferr: %f\n", errbnd);*/
+L30:
+ ;
+ }
+ reslts[0] = errbnd;
+
+ /* Test 2: Compute the maximum of BERR / ( (n+1)*EPS + (*) ), where
+ (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) + abs(b))_i ) */
+
+ for (k = 0; k < nrhs; ++k) {
+ for (i = 0; i < n; ++i)
+ rwork[i] = (d__1 = b[i + k*ldb].r, fabs(d__1)) +
+ (d__2 = b[i + k*ldb].i, fabs(d__2));
+ if ( notran ) {
+ for (j = 0; j < n; ++j) {
+ tmp = (d__1 = x[j + k*ldx].r, fabs(d__1)) +
+ (d__2 = x[j + k*ldx].i, fabs(d__2));
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ d__1 = (d__2 = Aval[i].r, fabs(d__2)) +
+ (d__3 = Aval[i].i, fabs(d__3));
+ rwork[Astore->rowind[i]] += d__1 * tmp;
+ }
+ }
+ } else {
+ for (j = 0; j < n; ++j) {
+ tmp = 0.;
+ for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) {
+ irow = Astore->rowind[i];
+ d__1 = (d__2 = x[irow + k*ldx].r, fabs(d__2)) +
+ (d__3 = x[irow + k*ldx].i, fabs(d__3));
+ d__2 = (d__3 = Aval[i].r, fabs(d__3)) +
+ (d__4 = Aval[i].i, fabs(d__4));
+ tmp += d__2 * d__1;
+ }
+ rwork[j] += tmp;
+ }
+ }
+
+ axbi = rwork[0];
+ for (i = 1; i < n; ++i) axbi = SUPERLU_MIN(axbi, rwork[i]);
+
+ /* Computing MAX */
+ d__1 = axbi, d__2 = (n + 1) * unfl;
+ tmp = berr[k] / ((n + 1) * eps + (n + 1) * unfl / SUPERLU_MAX(d__1,d__2));
+
+ if (k == 0) {
+ reslts[1] = tmp;
+ } else {
+ reslts[1] = SUPERLU_MAX(reslts[1],tmp);
+ }
+ }
+
+ SUPERLU_FREE(rwork);
+ return 0;
+
+} /* sp_zget07 */
diff --git a/TESTING/stest.csh b/TESTING/stest.csh
new file mode 100644
index 0000000..c8577a0
--- /dev/null
+++ b/TESTING/stest.csh
@@ -0,0 +1,50 @@
+#!/bin/csh
+
+set ofile = stest.out # output file
+if ( -e $ofile ) then
+ rm -f $ofile
+endif
+echo "Single-precision testing output" > $ofile
+
+set MATRICES = (LAPACK g10)
+set NVAL = (9 19)
+set NRHS = (5)
+set LWORK = (0 10000000)
+
+#
+# Loop through all matrices ...
+#
+foreach m ($MATRICES)
+
+ #--------------------------------------------
+ # Test matrix types generated in LAPACK-style
+ #--------------------------------------------
+ if ($m == 'LAPACK') then
+ echo '== LAPACK test matrices' >> $ofile
+ foreach n ($NVAL)
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'n='$n 'nrhs='$s 'lwork='$l >> $ofile
+ ./stest -t "LA" -l $l -n $n -s $s >> $ofile
+ end
+ end
+ end
+ #--------------------------------------------
+ # Test a specified sparse matrix
+ #--------------------------------------------
+ else
+ echo '' >> $ofile
+ echo '== sparse matrix:' $m >> $ofile
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'nrhs='$s 'lwork='$l >> $ofile
+ ./stest -t "SP" -s $s -l $l < ../EXAMPLE/$m >> $ofile
+ end
+ end
+ endif
+
+end
+
+
diff --git a/TESTING/zdrive.c b/TESTING/zdrive.c
new file mode 100644
index 0000000..166f310
--- /dev/null
+++ b/TESTING/zdrive.c
@@ -0,0 +1,538 @@
+
+/*
+ * -- SuperLU routine (version 3.0) --
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
+ * and Lawrence Berkeley National Lab.
+ * October 15, 2003
+ *
+ */
+/*
+ * File name: zdrive.c
+ * Purpose: MAIN test program
+ */
+#include <string.h>
+#include "zsp_defs.h"
+
+#define NTESTS 5 /* Number of test types */
+#define NTYPES 11 /* Number of matrix types */
+#define NTRAN 2
+#define THRESH 20.0
+#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
+#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
+#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
+
+
+main(int argc, char *argv[])
+{
+/*
+ * Purpose
+ * =======
+ *
+ * ZDRIVE is the main test program for the DOUBLE COMPLEX linear
+ * equation driver routines ZGSSV and ZGSSVX.
+ *
+ * The program is invoked by a shell script file -- ztest.csh.
+ * The output from the tests are written into a file -- ztest.out.
+ *
+ * =====================================================================
+ */
+ doublecomplex *a, *a_save;
+ int *asub, *asub_save;
+ int *xa, *xa_save;
+ SuperMatrix A, B, X, L, U;
+ SuperMatrix ASAV, AC;
+ mem_usage_t mem_usage;
+ int *perm_r; /* row permutation from partial pivoting */
+ int *perm_c, *pc_save; /* column permutation */
+ int *etree;
+ doublecomplex zero = {0.0, 0.0};
+ double *R, *C;
+ double *ferr, *berr;
+ double *rwork;
+ doublecomplex *wwork;
+ void *work;
+ int info, lwork, nrhs, panel_size, relax;
+ int m, n, nnz;
+ doublecomplex *xact;
+ doublecomplex *rhsb, *solx, *bsav;
+ int ldb, ldx;
+ double rpg, rcond;
+ int i, j, k1;
+ double rowcnd, colcnd, amax;
+ int maxsuper, rowblk, colblk;
+ int prefact, nofact, equil, iequed;
+ int nt, nrun, nfail, nerrs, imat, fimat, nimat;
+ int nfact, ifact, itran;
+ int kl, ku, mode, lda;
+ int zerot, izero, ioff;
+ double anorm, cndnum, u, drop_tol = 0.;
+ doublecomplex *Afull;
+ double result[NTESTS];
+ superlu_options_t options;
+ fact_t fact;
+ trans_t trans;
+ SuperLUStat_t stat;
+ static char matrix_type[8];
+ static char equed[1], path[3], sym[1], dist[1];
+
+ /* Fixed set of parameters */
+ int iseed[] = {1988, 1989, 1990, 1991};
+ static char equeds[] = {'N', 'R', 'C', 'B'};
+ static fact_t facts[] = {FACTORED, DOFACT, SamePattern,
+ SamePattern_SameRowPerm};
+ static trans_t transs[] = {NOTRANS, TRANS, CONJ};
+
+ /* Some function prototypes */
+ static void parse_command_line();
+ extern int sp_zget01(int, int, SuperMatrix *, SuperMatrix *,
+ SuperMatrix *, int *, double *);
+ extern int sp_zget02(trans_t, int, int, int, SuperMatrix *, doublecomplex *,
+ int, doublecomplex *, int, double *resid);
+ extern int sp_zget04(int, int, doublecomplex *, int,
+ doublecomplex *, int, double rcond, double *resid);
+ extern int sp_zget07(trans_t, int, int, SuperMatrix *, doublecomplex *, int,
+ doublecomplex *, int, doublecomplex *, int,
+ double *, double *, double *);
+ extern int zlatb4_(char *, int *, int *, int *, char *, int *, int *,
+ double *, int *, double *, char *);
+ extern int zlatms_(int *, int *, char *, int *, char *, double *d,
+ int *, double *, double *, int *, int *,
+ char *, doublecomplex *, int *, doublecomplex *, int *);
+ extern int sp_zconvert(int, int, doublecomplex *, int, int, int,
+ doublecomplex *a, int *, int *, int *);
+
+
+ /* Executable statements */
+
+ strcpy(path, "ZGE");
+ nrun = 0;
+ nfail = 0;
+ nerrs = 0;
+
+ /* Defaults */
+ lwork = 0;
+ n = 1;
+ nrhs = 1;
+ panel_size = sp_ienv(1);
+ relax = sp_ienv(2);
+ u = 1.0;
+ strcpy(matrix_type, "LA");
+ parse_command_line(argc, argv, matrix_type, &n,
+ &panel_size, &relax, &nrhs, &maxsuper,
+ &rowblk, &colblk, &lwork, &u);
+ if ( lwork > 0 ) {
+ work = SUPERLU_MALLOC(lwork);
+ if ( !work ) {
+ fprintf(stderr, "expert: cannot allocate %d bytes\n", lwork);
+ exit (-1);
+ }
+ }
+
+ /* Set the default input options. */
+ set_default_options(&options);
+ options.DiagPivotThresh = u;
+ options.PrintStat = NO;
+ options.PivotGrowth = YES;
+ options.ConditionNumber = YES;
+ options.IterRefine = DOUBLE;
+
+ if ( strcmp(matrix_type, "LA") == 0 ) {
+ /* Test LAPACK matrix suite. */
+ m = n;
+ lda = SUPERLU_MAX(n, 1);
+ nnz = n * n; /* upper bound */
+ fimat = 1;
+ nimat = NTYPES;
+ Afull = doublecomplexCalloc(lda * n);
+ zallocateA(n, nnz, &a, &asub, &xa);
+ } else {
+ /* Read a sparse matrix */
+ fimat = nimat = 0;
+ zreadhb(&m, &n, &nnz, &a, &asub, &xa);
+ }
+
+ zallocateA(n, nnz, &a_save, &asub_save, &xa_save);
+ rhsb = doublecomplexMalloc(m * nrhs);
+ bsav = doublecomplexMalloc(m * nrhs);
+ solx = doublecomplexMalloc(n * nrhs);
+ ldb = m;
+ ldx = n;
+ zCreate_Dense_Matrix(&B, m, nrhs, rhsb, ldb, SLU_DN, SLU_Z, SLU_GE);
+ zCreate_Dense_Matrix(&X, n, nrhs, solx, ldx, SLU_DN, SLU_Z, SLU_GE);
+ xact = doublecomplexMalloc(n * nrhs);
+ etree = intMalloc(n);
+ perm_r = intMalloc(n);
+ perm_c = intMalloc(n);
+ pc_save = intMalloc(n);
+ R = (double *) SUPERLU_MALLOC(m*sizeof(double));
+ C = (double *) SUPERLU_MALLOC(n*sizeof(double));
+ ferr = (double *) SUPERLU_MALLOC(nrhs*sizeof(double));
+ berr = (double *) SUPERLU_MALLOC(nrhs*sizeof(double));
+ j = SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs);
+ rwork = (double *) SUPERLU_MALLOC(j*sizeof(double));
+ for (i = 0; i < j; ++i) rwork[i] = 0.;
+ if ( !R ) ABORT("SUPERLU_MALLOC fails for R");
+ if ( !C ) ABORT("SUPERLU_MALLOC fails for C");
+ if ( !ferr ) ABORT("SUPERLU_MALLOC fails for ferr");
+ if ( !berr ) ABORT("SUPERLU_MALLOC fails for berr");
+ if ( !rwork ) ABORT("SUPERLU_MALLOC fails for rwork");
+ wwork = doublecomplexCalloc( SUPERLU_MAX(m,n) * SUPERLU_MAX(4,nrhs) );
+
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i] = i;
+ options.ColPerm = MY_PERMC;
+
+ for (imat = fimat; imat <= nimat; ++imat) { /* All matrix types */
+
+ if ( imat ) {
+
+ /* Skip types 5, 6, or 7 if the matrix size is too small. */
+ zerot = (imat >= 5 && imat <= 7);
+ if ( zerot && n < imat-4 )
+ continue;
+
+ /* Set up parameters with ZLATB4 and generate a test matrix
+ with ZLATMS. */
+ zlatb4_(path, &imat, &n, &n, sym, &kl, &ku, &anorm, &mode,
+ &cndnum, dist);
+
+ zlatms_(&n, &n, dist, iseed, sym, &rwork[0], &mode, &cndnum,
+ &anorm, &kl, &ku, "No packing", Afull, &lda,
+ &wwork[0], &info);
+
+ if ( info ) {
+ printf(FMT3, "ZLATMS", info, izero, n, nrhs, imat, nfail);
+ continue;
+ }
+
+ /* For types 5-7, zero one or more columns of the matrix
+ to test that INFO is returned correctly. */
+ if ( zerot ) {
+ if ( imat == 5 ) izero = 1;
+ else if ( imat == 6 ) izero = n;
+ else izero = n / 2 + 1;
+ ioff = (izero - 1) * lda;
+ if ( imat < 7 ) {
+ for (i = 0; i < n; ++i) Afull[ioff + i] = zero;
+ } else {
+ for (j = 0; j < n - izero + 1; ++j)
+ for (i = 0; i < n; ++i)
+ Afull[ioff + i + j*lda] = zero;
+ }
+ } else {
+ izero = 0;
+ }
+
+ /* Convert to sparse representation. */
+ sp_zconvert(n, n, Afull, lda, kl, ku, a, asub, xa, &nnz);
+
+ } else {
+ izero = 0;
+ zerot = 0;
+ }
+
+ zCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_Z, SLU_GE);
+
+ /* Save a copy of matrix A in ASAV */
+ zCreate_CompCol_Matrix(&ASAV, m, n, nnz, a_save, asub_save, xa_save,
+ SLU_NC, SLU_Z, SLU_GE);
+ zCopy_CompCol_Matrix(&A, &ASAV);
+
+ /* Form exact solution. */
+ zGenXtrue(n, nrhs, xact, ldx);
+
+ StatInit(&stat);
+
+ for (iequed = 0; iequed < 4; ++iequed) {
+ *equed = equeds[iequed];
+ if (iequed == 0) nfact = 4;
+ else nfact = 1; /* Only test factored, pre-equilibrated matrix */
+
+ for (ifact = 0; ifact < nfact; ++ifact) {
+ fact = facts[ifact];
+ options.Fact = fact;
+
+ for (equil = 0; equil < 2; ++equil) {
+ options.Equil = equil;
+ prefact = ( options.Fact == FACTORED ||
+ options.Fact == SamePattern_SameRowPerm );
+ /* Need a first factor */
+ nofact = (options.Fact != FACTORED); /* Not factored */
+
+ /* Restore the matrix A. */
+ zCopy_CompCol_Matrix(&ASAV, &A);
+
+ if ( zerot ) {
+ if ( prefact ) continue;
+ } else if ( options.Fact == FACTORED ) {
+ if ( equil || iequed ) {
+ /* Compute row and column scale factors to
+ equilibrate matrix A. */
+ zgsequ(&A, R, C, &rowcnd, &colcnd, &amax, &info);
+
+ /* Force equilibration. */
+ if ( !info && n > 0 ) {
+ if ( lsame_(equed, "R") ) {
+ rowcnd = 0.;
+ colcnd = 1.;
+ } else if ( lsame_(equed, "C") ) {
+ rowcnd = 1.;
+ colcnd = 0.;
+ } else if ( lsame_(equed, "B") ) {
+ rowcnd = 0.;
+ colcnd = 0.;
+ }
+ }
+
+ /* Equilibrate the matrix. */
+ zlaqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+ }
+
+ if ( prefact ) { /* Need a factor for the first time */
+
+ /* Save Fact option. */
+ fact = options.Fact;
+ options.Fact = DOFACT;
+
+ /* Preorder the matrix, obtain the column etree. */
+ sp_preorder(&options, &A, perm_c, etree, &AC);
+
+ /* Factor the matrix AC. */
+ zgstrf(&options, &AC, drop_tol, relax, panel_size,
+ etree, work, lwork, perm_c, perm_r, &L, &U,
+ &stat, &info);
+
+ if ( info ) {
+ printf("** First factor: info %d, equed %c\n",
+ info, *equed);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n",
+ info - n);
+ exit(0);
+ }
+ }
+
+ Destroy_CompCol_Permuted(&AC);
+
+ /* Restore Fact option. */
+ options.Fact = fact;
+ } /* if .. first time factor */
+
+ for (itran = 0; itran < NTRAN; ++itran) {
+ trans = transs[itran];
+ options.Trans = trans;
+
+ /* Restore the matrix A. */
+ zCopy_CompCol_Matrix(&ASAV, &A);
+
+ /* Set the right hand side. */
+ zFillRHS(trans, nrhs, xact, ldx, &A, &B);
+ zCopy_Dense_Matrix(m, nrhs, rhsb, ldb, bsav, ldb);
+
+ /*----------------
+ * Test zgssv
+ *----------------*/
+ if ( options.Fact == DOFACT && itran == 0) {
+ /* Not yet factored, and untransposed */
+
+ zCopy_Dense_Matrix(m, nrhs, rhsb, ldb, solx, ldx);
+ zgssv(&options, &A, perm_c, perm_r, &L, &U, &X,
+ &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "zgssv",
+ info, izero, n, nrhs, imat, nfail);
+ } else {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_zget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ nt = 1;
+ if ( izero == 0 ) {
+ /* Compute residual of the computed
+ solution. */
+ zCopy_Dense_Matrix(m, nrhs, rhsb, ldb,
+ wwork, ldb);
+ sp_zget02(trans, m, n, nrhs, &A, solx,
+ ldx, wwork,ldb, &result[1]);
+ nt = 2;
+ }
+
+ /* Print information about the tests that
+ did not pass the threshold. */
+ for (i = 0; i < nt; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT1, "zgssv", n, i,
+ result[i]);
+ ++nfail;
+ }
+ }
+ nrun += nt;
+ } /* else .. info == 0 */
+
+ /* Restore perm_c. */
+ for (i = 0; i < n; ++i) perm_c[i] = pc_save[i];
+
+ if (lwork == 0) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+ } /* if .. end of testing zgssv */
+
+ /*----------------
+ * Test zgssvx
+ *----------------*/
+
+ /* Equilibrate the matrix if fact = FACTORED and
+ equed = 'R', 'C', or 'B'. */
+ if ( options.Fact == FACTORED &&
+ (equil || iequed) && n > 0 ) {
+ zlaqgs(&A, R, C, rowcnd, colcnd, amax, equed);
+ }
+
+ /* Solve the system and compute the condition number
+ and error bounds using zgssvx. */
+ zgssvx(&options, &A, perm_c, perm_r, etree,
+ equed, R, C, &L, &U, work, lwork, &B, &X, &rpg,
+ &rcond, ferr, berr, &mem_usage, &stat, &info);
+
+ if ( info && info != izero ) {
+ printf(FMT3, "zgssvx",
+ info, izero, n, nrhs, imat, nfail);
+ if ( lwork == -1 ) {
+ printf("** Estimated memory: %.0f bytes\n",
+ mem_usage.total_needed);
+ exit(0);
+ }
+ } else {
+ if ( !prefact ) {
+ /* Reconstruct matrix from factors and
+ compute residual. */
+ sp_zget01(m, n, &A, &L, &U, perm_r, &result[0]);
+ k1 = 0;
+ } else {
+ k1 = 1;
+ }
+
+ if ( !info ) {
+ /* Compute residual of the computed solution.*/
+ zCopy_Dense_Matrix(m, nrhs, bsav, ldb,
+ wwork, ldb);
+ sp_zget02(trans, m, n, nrhs, &ASAV, solx, ldx,
+ wwork, ldb, &result[1]);
+
+ /* Check solution from generated exact
+ solution. */
+ sp_zget04(n, nrhs, solx, ldx, xact, ldx, rcond,
+ &result[2]);
+
+ /* Check the error bounds from iterative
+ refinement. */
+ sp_zget07(trans, n, nrhs, &ASAV, bsav, ldb,
+ solx, ldx, xact, ldx, ferr, berr,
+ &result[3]);
+
+ /* Print information about the tests that did
+ not pass the threshold. */
+ for (i = k1; i < NTESTS; ++i) {
+ if ( result[i] >= THRESH ) {
+ printf(FMT2, "zgssvx",
+ options.Fact, trans, *equed,
+ n, imat, i, result[i]);
+ ++nfail;
+ }
+ }
+ nrun += NTESTS;
+ } /* if .. info == 0 */
+ } /* else .. end of testing zgssvx */
+
+ } /* for itran ... */
+
+ if ( lwork == 0 ) {
+ Destroy_SuperNode_Matrix(&L);
+ Destroy_CompCol_Matrix(&U);
+ }
+
+ } /* for equil ... */
+ } /* for ifact ... */
+ } /* for iequed ... */
+#if 0
+ if ( !info ) {
+ PrintPerf(&L, &U, &mem_usage, rpg, rcond, ferr, berr, equed);
+ }
+#endif
+
+ } /* for imat ... */
+
+ /* Print a summary of the results. */
+ PrintSumm("ZGE", nfail, nrun, nerrs);
+
+ SUPERLU_FREE (rhsb);
+ SUPERLU_FREE (bsav);
+ SUPERLU_FREE (solx);
+ SUPERLU_FREE (xact);
+ SUPERLU_FREE (etree);
+ SUPERLU_FREE (perm_r);
+ SUPERLU_FREE (perm_c);
+ SUPERLU_FREE (pc_save);
+ SUPERLU_FREE (R);
+ SUPERLU_FREE (C);
+ SUPERLU_FREE (ferr);
+ SUPERLU_FREE (berr);
+ SUPERLU_FREE (rwork);
+ SUPERLU_FREE (wwork);
+ Destroy_SuperMatrix_Store(&B);
+ Destroy_SuperMatrix_Store(&X);
+ Destroy_CompCol_Matrix(&A);
+ Destroy_CompCol_Matrix(&ASAV);
+ if ( lwork > 0 ) {
+ SUPERLU_FREE (work);
+ Destroy_SuperMatrix_Store(&L);
+ Destroy_SuperMatrix_Store(&U);
+ }
+ StatFree(&stat);
+
+ return 0;
+}
+
+/*
+ * Parse command line options to get relaxed snode size, panel size, etc.
+ */
+static void
+parse_command_line(int argc, char *argv[], char *matrix_type,
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
+ int *rowblk, int *colblk, int *lwork, double *u)
+{
+ int c;
+ extern char *optarg;
+
+ while ( (c = getopt(argc, argv, "ht:n:w:r:s:m:b:c:l:")) != EOF ) {
+ switch (c) {
+ case 'h':
+ printf("Options:\n");
+ printf("\t-w <int> - panel size\n");
+ printf("\t-r <int> - granularity of relaxed supernodes\n");
+ exit(1);
+ break;
+ case 't': strcpy(matrix_type, optarg);
+ break;
+ case 'n': *n = atoi(optarg);
+ break;
+ case 'w': *w = atoi(optarg);
+ break;
+ case 'r': *relax = atoi(optarg);
+ break;
+ case 's': *nrhs = atoi(optarg);
+ break;
+ case 'm': *maxsuper = atoi(optarg);
+ break;
+ case 'b': *rowblk = atoi(optarg);
+ break;
+ case 'c': *colblk = atoi(optarg);
+ break;
+ case 'l': *lwork = atoi(optarg);
+ break;
+ case 'u': *u = atof(optarg);
+ break;
+ }
+ }
+}
diff --git a/TESTING/ztest.csh b/TESTING/ztest.csh
new file mode 100644
index 0000000..948c94f
--- /dev/null
+++ b/TESTING/ztest.csh
@@ -0,0 +1,49 @@
+#!/bin/csh
+
+set ofile = ztest.out # output file
+if ( -e $ofile ) then
+ rm -f $ofile
+endif
+echo "Double-precision complex testing output" > $ofile
+
+set MATRICES = (LAPACK)
+set NVAL = (9 19)
+set NRHS = (5)
+set LWORK = (0 10000000)
+
+#
+# Loop through all matrices ...
+#
+foreach m ($MATRICES)
+
+ #--------------------------------------------
+ # Test matrix types generated in LAPACK-style
+ #--------------------------------------------
+ if ($m == 'LAPACK') then
+ echo '== LAPACK test matrices' >> $ofile
+ foreach n ($NVAL)
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'n='$n 'nrhs='$s 'lwork='$l >> $ofile
+ ./ztest -t "LA" -l $l -n $n -s $s >> $ofile
+ end
+ end
+ end
+ #--------------------------------------------
+ # Test a specified sparse matrix
+ #--------------------------------------------
+ else
+ echo '' >> $ofile
+ echo '== sparse matrix:' $m >> $ofile
+ foreach s ($NRHS)
+ foreach l ($LWORK)
+ echo '' >> $ofile
+ echo 'nrhs='$s 'lwork='$l >> $ofile
+ ./ztest -t "SP" -s $s -l $l < ../EXAMPLE/$m >> $ofile
+ end
+ end
+ endif
+
+end
+
diff --git a/make.inc b/make.inc
new file mode 100644
index 0000000..51fda64
--- /dev/null
+++ b/make.inc
@@ -0,0 +1,50 @@
+############################################################################
+#
+# Program: SuperLU
+#
+# Module: make.inc
+#
+# Purpose: Top-level Definitions
+#
+# Creation date: October 2, 1995
+#
+# Modified: February 4, 1997 Version 1.0
+# November 15, 1997 Version 1.1
+# September 1, 1999 Version 2.0
+#
+############################################################################
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT = _solaris
+
+#
+# The name of the libraries to be created/linked to
+#
+TMGLIB = tmglib$(PLAT).a
+SUPERLULIB = superlu$(PLAT).a
+BLASLIB = ../blas$(PLAT).a
+
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If your system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+
+CC = cc
+CFLAGS = -xO3 -xcg92
+FORTRAN = f77
+FFLAGS = -O
+LOADER = cc
+LOADOPTS = -xO3
+
+#
+# C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase)
+#
+CDEFS = -DAdd_
+#
+# The directory in which Matlab is installed
+#
+MATLAB = /usr/sww/matlab
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/superlu.git
More information about the debian-science-commits
mailing list