summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md91
-rw-r--r--README.md2
2 files changed, 22 insertions, 71 deletions
diff --git a/INSTALL.md b/INSTALL.md
index ef51167..00a9838 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,26 +1,19 @@
1# [hmatrix][hmatrix2] installation 1# hmatrix installation
2
3This package requires the [Glasgow Haskell Compiler](http://www.haskell.org/ghc/index.html) ghc >= 6.10, and [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install), conveniently available in the [Haskell Platform](http://hackage.haskell.org/platform), and the development packages for [GSL](http://www.gnu.org/software/gsl) and BLAS/[LAPACK](http://www.netlib.org/lapack). (The graphical functions also require **gnuplot** and **imagemagick**.)
4
5[hmatrix]: http://code.haskell.org/hmatrix
6[hmatrix2]: http://perception.inf.um.es/hmatrix
7 2
3This package requires [GHC 7.8](http://www.haskell.org/ghc), [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install) (available in the [Haskell Platform](http://hackage.haskell.org/platform)), and the development packages for BLAS/[LAPACK](http://www.netlib.org/lapack) and [GSL](http://www.gnu.org/software/gsl).
8 4
9## Linux ################################################## 5## Linux ##################################################
10 6
11
12Ubuntu/Debian: 7Ubuntu/Debian:
13 8
14 $ sudo apt-get install libgsl0-dev liblapack-dev 9 $ sudo apt-get install libgsl0-dev liblapack-dev libatlas-base-dev
15 $ cabal install hmatrix 10 $ cabal update
16 11 $ cabal install hmatrix-tests
17Arch Linux: If the automatic installation from Hackage fails, install atlas-lapack and gsl, unpack the source, change the build-type to Simple in hmatrix.cabal (line 28) and add extra-libraries: gsl lapack (line 194).
18 12
19Other distributions may require additional libraries. They can be given in a **--configure-option**. 13Other distributions may require additional libraries. They can be given in a **--configure-option**.
20 14
21## Mac OS/X ############################################### 15## Mac OS/X ###############################################
22 16
23
24GSL must be installed via Homebrew or MacPorts. 17GSL must be installed via Homebrew or MacPorts.
25 18
26Via Homebrew: 19Via Homebrew:
@@ -37,81 +30,39 @@ Via MacPorts:
37 30
38## Windows ############################################### 31## Windows ###############################################
39 32
40We use this [GSL binary](http://www.miscdebris.net/blog/2009/04/20/mingw-345-binaries-of-gnu-scientific-library-112-for-use-with-mingw-and-visual-c/), and blas/lapack dlls built with g77 (contributed by Gilberto Camara). All required files are in [gsl-lapack-windows.zip][winpack]. 33(Not tested). It should be possible to install the new package hmatrix >= 0.16 using
41 34the dlls contributed by Gilberto Camara available in [gsl-lapack-windows.zip][winpack].
42(Due to [issue 21](https://github.com/albertoruiz/hmatrix/issues/21) we need hmatrix-0.13.1.0.)
43
441) Install the Haskell Platform (tested on 2011.2.0.1)
45 35
46 > cabal update 361) > cabal update
47 37
482) Download and unzip the following file into a stable folder %GSL% 382) Download and unzip [gsl-lapack-windows.zip][winpack] into a stable folder %GSL%
49 39
50 http://perception.inf.um.es/hmatrix/gsl-lapack-windows.zip 403.a) In a msys shell:
51
523.a) In a msys shell the installation should be fully automatic:
53 41
54 $ cabal install hmatrix-0.13.1.0 --extra-lib-dir=${GSL} --extra-include-dir=${GSL} 42 $ cabal install hmatrix-0.13.1.0 --extra-lib-dir=${GSL} --extra-include-dir=${GSL}
55 43
563.b) Alternatively, in a normal windows cmd: 443.b) In a normal windows cmd:
57
58 > cabal unpack hmatrix-0.13.1.0
59
60 Edit hmatrix.cabal, in line 28 change build-type to "Simple", and then
61 45
62 > cabal install --extra-lib-dir=%GSL% --extra-include-dir=%GSL% 46 > cabal install --extra-lib-dir=%GSL% --extra-include-dir=%GSL%
63 47
64 It may be necessary to put the dlls in the search path. 48It may be necessary to put the dlls in the search path.
65
66 49
67NOTE: The examples using graphics do not yet work in windows. 50It is expected that a future version of the new hmatrix-gsl package can also be installed
51using this method.
68 52
69[install]: http://code.haskell.org/hmatrix/INSTALL
70[install2]: http://patch-tag.com/r/aruiz/hmatrix/snapshot/current/content/pretty/INSTALL
71[winpack2]: http://perception.inf.um.es/hmatrix/gsl-lapack-windows.zip
72[winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip 53[winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip
73 54
74## Tests ############################################### 55## Tests ###############################################
75 56
76After installation we must verify that the library works as expected: 57After installation we can verify that the library works as expected:
77 58
78 $ cabal install hmatrix-tests --enable-tests 59 $ cabal install hmatrix-tests
79 $ ghci 60 $ ghci
80 > Numeric.LinearAlgebra.Tests.runTests 20 61 > Numeric.LinearAlgebra.Tests.runTests 20
81 OK, passed 100 tests. 62 +++ OK, passed 100 tests.
82 OK, passed 100 tests. 63 +++ OK, passed 100 tests.
83 ... etc... 64 ... etc...
84 65 +++ OK, passed 100 tests.
85If you get any failure please run lapack's own tests to confirm that your version is not broken. For instance, in ubuntu 9.04, **libatlas-sse2** does not work (see this [bug report](https://bugs.launchpad.net/ubuntu/+source/atlas/+bug/368478)). If your lapack library is ok but hmatrix's tests fail please send a bug report! 66 ------ some unit tests
86 67 Cases: 71 Tried: 71 Errors: 0 Failures: 0
87
88## Optimized BLAS/LAPACK ##########################################
89
90I have successfully tested ATLAS and MKL on Linux.
91
92### [ATLAS](http://math-atlas.sourceforge.net/) ####################
93
94In Ubuntu >= 9.04 we need:
95
96 $ sudo apt-get install libatlas-base-dev
97
98In older Ubuntu/Debian versions we needed:
99
100 $ sudo apt-get install refblas3-dev lapack3-dev atlas3-base-dev
101
102We may use a version (sse2, 3dnow, etc.) optimized for the machine.
103
104### Intel's MKL ###############################################
105
106There is a free noncommercial download available from Intel's website. To use it I have added the following lines in my .bashrc configuration file:
107
108 export LD_LIBRARY_PATH=/path/to/mkl/lib/arch
109 export LIBRARY_PATH=/path/to/mkl/lib/arch
110
111where arch = 32 or em64t.
112
113The library must be installed with the -fmkl flag:
114
115 $ cabal install hmatrix -fmkl
116
117 68
diff --git a/README.md b/README.md
index c284de8..f24b577 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Version 0.16 (june 2014) has [new features](changes).
13 13
14- [Source code and documentation at Hackage][source] 14- [Source code and documentation at Hackage][source]
15 15
16- [Installation help and known problems][installation] 16- [Installation help][installation]
17 17
18Contributions, suggestions, and bug reports are welcome! 18Contributions, suggestions, and bug reports are welcome!
19 19