summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2009-06-04 18:53:55 +0000
committerAlberto Ruiz <aruiz@um.es>2009-06-04 18:53:55 +0000
commitbbc54bf2573ea3631ee436507807dae6c4353bcc (patch)
treeb7db6ae5f4aba50a4bb8d4c584d131e424286be8
parent6e0dd472ef8c570ec1924ac641e5872db30ac142 (diff)
improved windows installation instructions
-rw-r--r--INSTALL85
-rw-r--r--hmatrix.cabal10
-rw-r--r--lib/Data/Packed/Development.hs2
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c12
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs8
5 files changed, 53 insertions, 64 deletions
diff --git a/INSTALL b/INSTALL
index e4c7e12..1a92fa5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -13,46 +13,45 @@ Detailed installation instructions:
13 13
14INSTALLATION ON WINDOWS ---------------------------------------- 14INSTALLATION ON WINDOWS ----------------------------------------
15 15
161) Download the developer files gsl-1.8-lib.zip from 161) Install a recent ghc (e.g. ghc-6.10.3)
17 http://gnuwin32.sourceforge.net/packages/gsl.htm 17
18 and copy the gsl headers folder (under include) to: 182) Install cabal-install. A binary for windows can be obtained from:
19 C:\ghc\ghc.6.x.1\include 19
20 These headers are also available from: 20 http://www.haskell.org/cabal/release/cabal-install-0.6.2/cabal.exe
21 http://perception.inf.um.es/~aruiz/darcs/hmatrix/gsl.zip 21
22 22 Put it somewhere in the path, for instance in c:\ghc\ghc-6.10.3\bin
232) Copy libgsl.dll, libcblas.dll (from the binaries package gsl-1.8.bin.zip) 23
24 and liblapack.dll (borrowed from the R system) to the ghc folder, e.g.: 243) Download and uncompress in a temporary location the following file:
25 C:\ghc\ghc-6.x.x. 25
26 Rename libcblas.dll to libblas.dll. 26 http://code.haskell.org/hmatrix/gsl-lapack-windows.zip
27 They are needed to compile programs. 27
28 These three dlls are available from: 28 It contains a folder, gsl, and four DLL's.
29 http://perception.inf.um.es/~aruiz/darcs/hmatrix/dll1.zip 29
30 304) Move the gsl folder to C:\ghc\ghc-6.10.3\include
312.5) Remove the following functions from the export list of 31
32 lib/Numeric/GSL/Special/Ellint.hs: 325) Move the four DLL's to C:\ghc\ghc-6.10.3\bin
33 ellint_Pcomp_e, ellint_Pcomp, ellint_Dcomp_e, ellint_Dcomp 33
34 346) Download and uncompress hmatrix-x.y.z.tar.gz from Hackage:
353) Install the package as usual: 35
36 runhaskell Setup.lhs configure 36 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hmatrix
37 runhaskell Setup.lhs build 37
38 runhaskell Setup.lhs install 387) Edit hmatrix.cabal:
39 39
403.5) If configure cannot find ld please see: 40 line 17: build-type: Custom
41 http://article.gmane.org/gmane.comp.lang.haskell.cafe/32025 41 change to: build-type: Simple
42 42
434) Copy the dlls available from: 43 line 160: extra-libraries:
44 http://perception.inf.um.es/~aruiz/darcs/hmatrix/dll2.zip 44 add: extra-libraries: libgls-0 blas lapack
45 to the working directory or C:\windows\system 45
46 They are required to run the programs and ghci. 46 line 161: extra-lib-dirs:
47 47 add: extra-lib-dirs: c:\ghc\ghc-6.10.3\bin
485) run the tests 48
49 498) Open a terminal, cd to the hmatrix folder, and run
50Unfortunately the lapack dll supplied by the R system does not include 50
51zgels_, zgelss_, and zgees_, so the functions depending on them 51 > cabal install
52(linearSolveLS, linearSolveSVD, and schur for complex data) 52
53will produce a "non supported in this OS" runtime error. 539) If everything is ok we can run the tests:
54 54
55If you find an alternative free and complete lapack.dll which works well 55 > runhaskell examples\tests.hs
56for this system please let me know. 56
57 57NOTE: The examples using graphics do not yet work in windows.
58The examples using graphics do not yet work in windows.
diff --git a/hmatrix.cabal b/hmatrix.cabal
index 70de11e..7645d79 100644
--- a/hmatrix.cabal
+++ b/hmatrix.cabal
@@ -134,7 +134,9 @@ library
134 134
135 ghc-prof-options: -auto-all 135 ghc-prof-options: -auto-all
136 136
137 ghc-options: -Wall -fno-warn-missing-signatures -fno-warn-orphans -fno-warn-unused-binds 137 ghc-options: -Wall -fno-warn-missing-signatures
138 -fno-warn-orphans
139 -fno-warn-unused-binds
138 140
139 if flag(unsafe) 141 if flag(unsafe)
140 cpp-options: -DUNSAFE 142 cpp-options: -DUNSAFE
@@ -152,4 +154,8 @@ library
152 frameworks: Accelerate 154 frameworks: Accelerate
153 extra-libraries: gsl 155 extra-libraries: gsl
154 156
155-- the extra-libraries required for gsl and lapack are automatically detected by configure(.hs) 157-- The extra-libraries required for GSL and LAPACK
158-- should now be automatically detected by configure(.hs)
159
160 extra-libraries:
161 extra-lib-dirs:
diff --git a/lib/Data/Packed/Development.hs b/lib/Data/Packed/Development.hs
index cbb2f81..56e7b8f 100644
--- a/lib/Data/Packed/Development.hs
+++ b/lib/Data/Packed/Development.hs
@@ -24,4 +24,4 @@ module Data.Packed.Development (
24 MatrixOrder(..), orderOf, cmat, fmat, 24 MatrixOrder(..), orderOf, cmat, fmat,
25) where 25) where
26 26
27import Data.Packed.Internal \ No newline at end of file 27import Data.Packed.Internal
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index d7248d1..f18bbed 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -435,9 +435,6 @@ int linearSolveLSR_l(KDMAT(a),KDMAT(b),DMAT(x)) {
435//////////////////// least squares complex linear system //////////// 435//////////////////// least squares complex linear system ////////////
436 436
437int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)) { 437int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)) {
438 #ifdef _WIN32
439 return NOSPRTD;
440 #else
441 integer m = ar; 438 integer m = ar;
442 integer n = ac; 439 integer n = ac;
443 integer nrhs = bc; 440 integer nrhs = bc;
@@ -478,7 +475,6 @@ int linearSolveLSC_l(KCMAT(a),KCMAT(b),CMAT(x)) {
478 free(work); 475 free(work);
479 free(AC); 476 free(AC);
480 OK 477 OK
481 #endif
482} 478}
483 479
484//////////////////// least squares real linear system using SVD //////////// 480//////////////////// least squares real linear system using SVD ////////////
@@ -543,9 +539,6 @@ int zgelss_(integer *m, integer *n, integer *nhrs,
543 integer *info); 539 integer *info);
544 540
545int linearSolveSVDC_l(double rcond, KCMAT(a),KCMAT(b),CMAT(x)) { 541int linearSolveSVDC_l(double rcond, KCMAT(a),KCMAT(b),CMAT(x)) {
546 #ifdef _WIN32
547 return NOSPRTD;
548 #else
549 integer m = ar; 542 integer m = ar;
550 integer n = ac; 543 integer n = ac;
551 integer nrhs = bc; 544 integer nrhs = bc;
@@ -596,7 +589,6 @@ int linearSolveSVDC_l(double rcond, KCMAT(a),KCMAT(b),CMAT(x)) {
596 free(S); 589 free(S);
597 free(AC); 590 free(AC);
598 OK 591 OK
599 #endif
600} 592}
601 593
602//////////////////// Cholesky factorization ///////////////////////// 594//////////////////// Cholesky factorization /////////////////////////
@@ -749,9 +741,6 @@ int schur_l_R(KDMAT(a), DMAT(u), DMAT(s)) {
749} 741}
750 742
751int schur_l_C(KCMAT(a), CMAT(u), CMAT(s)) { 743int schur_l_C(KCMAT(a), CMAT(u), CMAT(s)) {
752 #ifdef _WIN32
753 return NOSPRTD;
754 #else
755 integer m = ar; 744 integer m = ar;
756 integer n = ac; 745 integer n = ac;
757 REQUIRES(m>=1 && n==m && ur==n && uc==n && sr==n && sc==n, BAD_SIZE); 746 REQUIRES(m>=1 && n==m && ur==n && uc==n && sr==n && sc==n, BAD_SIZE);
@@ -776,7 +765,6 @@ int schur_l_C(KCMAT(a), CMAT(u), CMAT(s)) {
776 free(BWORK); 765 free(BWORK);
777 free(WORK); 766 free(WORK);
778 OK 767 OK
779 #endif
780} 768}
781 769
782//////////////////// LU factorization ///////////////////////// 770//////////////////// LU factorization /////////////////////////
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 4f73e3a..174e418 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -159,9 +159,7 @@ runTests n = do
159 test (linearSolveProp (luSolve.luPacked) . cSqWC) 159 test (linearSolveProp (luSolve.luPacked) . cSqWC)
160 putStrLn "------ pinv (linearSolveSVD)" 160 putStrLn "------ pinv (linearSolveSVD)"
161 test (pinvProp . rM) 161 test (pinvProp . rM)
162 if os == "mingw32" 162 test (pinvProp . cM)
163 then putStrLn "complex pinvTest skipped in this OS"
164 else test (pinvProp . cM)
165 putStrLn "------ det" 163 putStrLn "------ det"
166 test (detProp . rSqWC) 164 test (detProp . rSqWC)
167 test (detProp . cSqWC) 165 test (detProp . cSqWC)
@@ -186,9 +184,7 @@ runTests n = do
186 test (hessProp . cSq) 184 test (hessProp . cSq)
187 putStrLn "------ schur" 185 putStrLn "------ schur"
188 test (schurProp2 . rSq) 186 test (schurProp2 . rSq)
189 if os == "mingw32" 187 test (schurProp1 . cSq)
190 then putStrLn "complex schur skipped in this OS"
191 else test (schurProp1 . cSq)
192 putStrLn "------ chol" 188 putStrLn "------ chol"
193 test (cholProp . rPosDef) 189 test (cholProp . rPosDef)
194 test (cholProp . cPosDef) 190 test (cholProp . cPosDef)