直接法のソルバー
複素値にも対応
cygwinにあらかじめインストールしておくもの(setup.exeから)
gcc
make
tcsh
インストール
superlu_4.2.tar.gzをC:\cygwin\home\userにおく
解凍
$ tar zxvf superlu_4.2.tar.gz
superLUディレクトリに移動
インストール設定(make.inc)を編集(4か所)
############################################################################
#
# 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
#
SuperLUroot = $(HOME)/Codes/SuperLU/SuperLU_4.2 ←$(HOME)/SuperLU_4.2に変更
SUPERLULIB = $(SuperLUroot)/lib/libsuperlu_4.2.a
TMGLIB = libtmglib.a
## BLASLIB = $(SuperLUroot)/lib/libblas.a ←##を外す
BLASDEF = -DUSE_VENDOR_BLAS ←#でコメントアウト
BLASLIB = -L$(HOME)/lib/GotoBLAS -lgoto ←#でコメントアウト
## ATLAS BLAS causes single-precision to fail
#BLASLIB = -L/usr/lib/atlas -lblas
## This BLAS causes single-precision to fail the test in SuperLU
#BLASLIB = -L/usr/lib -lblas
LIBS = $(SUPERLULIB) $(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 = gcc
CFLAGS = -DPRNTlevel=0 -O3
NOOPTS =
FORTRAN = g77
FFLAGS = -O2
LOADER = $(CC)
LOADOPTS =
#
# C preprocessor defs for compilation for the Fortran interface
# (-DNoChange, -DAdd_, -DAdd__, or -DUpCase)
#
CDEFS = -DAdd_
#
# The directory in which Matlab is installed
#
MATLAB = /usr/sww/matlab
付属するblasのインストール(先にやる)
superLUのインストール
インストール確認(その1)
INSTALLディレクトリに移動しmake.
install.outが生成される
---- SINGLE PRECISION
Epsilon = 5.960464e-08
Safe minimum = 1.175494e-38
Base = 2
Precision = 1.192093e-07
Number of digits in mantissa = 24
Rounding mode = 1
Minimum exponent = -125
Underflow threshold = 1.175494e-38
Largest exponent = 128
Overflow threshold = 3.402823e+38
Reciprocal of safe minimum = 8.507059e+37
---- DOUBLE PRECISION
Epsilon = 1.110223e-16
Safe minimum = 2.225074e-308
Base = 2
Precision = 2.220446e-16
Number of digits in mantissa = 53
Rounding mode = 1
Minimum exponent = -1021
Underflow threshold = 2.225074e-308
Largest exponent = 1024
Overflow threshold = 1.797693e+308
Reciprocal of safe minimum = 4.494233e+307
---- TIMER
Time for 100000 DAXPYs = 0.062 seconds
DAXPY performance rate = 3.23 Gflops
y[0]=1
Including DSECND, time = 0.047 seconds
Average time for DSECND = 0.00047 milliseconds
Equivalent floating point ops = 1.06e+18 ops
インストール確認(その2)
TESTINGディレクトリに移動しmake dtest.(blasでは単精度テストは動かない)
dtest.outが生成される
Double-precision testing output
== LAPACK test matrices
n=9 nrhs=5 lwork=0
All tests for DGE driver passed the threshold ( 1158 tests run)
n=9 nrhs=5 lwork=10000000
All tests for DGE driver passed the threshold ( 1158 tests run)
n=19 nrhs=5 lwork=0
All tests for DGE driver passed the threshold ( 1158 tests run)
n=19 nrhs=5 lwork=10000000
All tests for DGE driver passed the threshold ( 1158 tests run)
== sparse matrix: g20.rua
nrhs=5 lwork=0
g20, symm permuted by SYMMMD SYM
All tests for DGE driver passed the threshold ( 144 tests run)
nrhs=5 lwork=10000000
g20, symm permuted by SYMMMD SYM
All tests for DGE driver passed the threshold ( 144 tests run)
同様にmake ctest,make ztestも実行可能.
インストール確認(その3)
EXAMPLEディレクトリに移動しmake.
いろいろな例が実行可能(詳しくはEXAMPLEディレクトリ内のREADME)
うまくいかなかったからmake cleanで最初からやり直せる
最終更新:2012年06月29日 15:14