summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2008-10-27 17:00:07 +0000
committerAlberto Ruiz <aruiz@um.es>2008-10-27 17:00:07 +0000
commit86c7aed1de8efe5988f994867d35addb6b62a655 (patch)
tree01062a04188f8a8e06aa76e0287ea99caf6f2343 /README
parentedf12982f21c56c21bfc21eb2b2fcbc406838130 (diff)
simplified README
Diffstat (limited to 'README')
-rw-r--r--README128
1 files changed, 6 insertions, 122 deletions
diff --git a/README b/README
index c034e2c..77d384e 100644
--- a/README
+++ b/README
@@ -2,63 +2,16 @@
2 A simple scientific library for Haskell 2 A simple scientific library for Haskell
3----------------------------------------- 3-----------------------------------------
4 4
5REQUIREMENTS ---------------------------- 5INSTALLATION
6
71) GNU Scientific Library (http://www.gnu.org/software/gsl).
8 In Ubuntu we need the package "libgsl0-dev".
9
102) BLAS/LAPACK (http://www.netlib.org/lapack).
11 An optimized implementation is recommended. I have tested:
12
13 - ATLAS (http://math-atlas.sourceforge.net).
14 In Ubuntu the required packages are "refblas3-dev", "lapack3-dev",
15 and "atlas3-base-dev" (or a version tuned for your machine).
16
17 - Intel's MKL (http://www.intel.com/cd/software/products).
18 There is a free noncommercial download of MKL for Linux.
19
20For ghc-6.8.x you may also need:
21
22- libgmp3-dev.
23
24The following packages are used for simple graphics:
25
26- gnuplot
27- imagemagick
28
29GNU-Octave can be used to check if the results
30obtained by this library are correct.
31
32INSTALLATION --------------------------------------
33
34Automatic (using cabal-install and HackageDB):
35 6
7Recommended method (ok in Ubuntu/Debian systems):
8 $ sudo apt-get install libgsl0-dev refblas3-dev lapack3-dev atlas3-[your_arch]-dev
36 $ cabal install hmatrix 9 $ cabal install hmatrix
37 10
38Manual: 11Detailed installation instructions:
39 12 http://www.hmatrix.googlepages.com/installation
40 Install storable-complex from HackageDB and then
41
42 $ runhaskell Setup.lhs configure --prefix=$HOME --user
43 $ runhaskell Setup.lhs build
44 $ runhaskell Setup.lhs haddock
45 $ runhaskell Setup.lhs install
46
47Using Intel's MKL:
48 13
49 - add/modify environment variables (e.g. in your .bashrc): 14For installation in Windows see the companion INSTALL file.
50 export LD_LIBRARY_PATH=/path/to/mkl/lib/arch
51 export LIBRARY_PATH=/path/to/mkl/lib/arch
52 where arch = "32" or "em64t"
53
54 - add the "-fmkl" flag in the cabal configuration command:
55 $ runhaskell Setup.lhs configure --prefix=$HOME --user -fmkl
56 $ runhaskell Setup.lhs build
57 $ runhaskell Setup.lhs install
58
59More information: http://www.hmatrix.googlepages.com/installation
60
61See below for installation on Windows.
62 15
63TESTS --------------------------------------------- 16TESTS ---------------------------------------------
64 17
@@ -110,75 +63,6 @@ KNOWN PROBLEMS / BUGS -------------------------------
110- On distributions with old GSL versions you should comment out a couple of functions 63- On distributions with old GSL versions you should comment out a couple of functions
111 in the export lists of Ellint.hs and Debye.hs 64 in the export lists of Ellint.hs and Debye.hs
112 65
113CHANGES ---------------------------------------------------------
114
115This is a new version of the library previously known as GSLHaskell.
116It has been renamed to "hmatrix" because only a small part of GSL is actually
117available, and most linear algebra is based on LAPACK.
118
119The code has been extensively refactored. There is a new internal representation
120which admits both C and Fortran matrices and avoids many transposes.
121
122There are only minor API changes:
123
124- The matrix product operator (<>) is now overloaded only for matrix-matrix,
125 matrix-vector and vector-matrix, with the same base type. Dot product and scaling
126 of vectors or matrices is now denoted by `dot` or (<.>) and `scale` or (.*).
127 Conversions from real to complex objects must now be explicit.
128
129- Most linear algebra functions admit both real and complex objects. Utilities such as
130 ident or constant are now polymorphic.
131
132- Runtime errors produced by GSL or LAPACK can be handled using Control.Exeception.catch.
133
134Old GSLHaskell code will work with small modifications.
135
136INSTALLATION ON WINDOWS ----------------------------------------
137
1381) Download the developer files gsl-1.8-lib.zip from
139 http://gnuwin32.sourceforge.net/packages/gsl.htm
140 and copy the gsl headers folder (under include) to:
141 C:\ghc\ghc.6.x.1\include
142 These headers are also available from:
143 http://perception.inf.um.es/~aruiz/darcs/hmatrix/gsl.zip
144
1452) Copy libgsl.dll, libcblas.dll (from the binaries package gsl-1.8.bin.zip)
146 and liblapack.dll (borrowed from the R system) to the ghc folder, e.g.:
147 C:\ghc\ghc-6.x.x.
148 Rename libcblas.dll to libblas.dll.
149 They are needed to compile programs.
150 These three dlls are available from:
151 http://perception.inf.um.es/~aruiz/darcs/hmatrix/dll1.zip
152
1532.5) Remove the following functions from the export list of
154 lib/Numeric/GSL/Special/Ellint.hs:
155 ellint_Pcomp_e, ellint_Pcomp, ellint_Dcomp_e, ellint_Dcomp
156
1573) Install the package as usual:
158 runhaskell Setup.lhs configure
159 runhaskell Setup.lhs build
160 runhaskell Setup.lhs install
161
1623.5) If configure cannot find ld please see:
163 http://article.gmane.org/gmane.comp.lang.haskell.cafe/32025
164
1654) Copy the dlls available from:
166 http://perception.inf.um.es/~aruiz/darcs/hmatrix/dll2.zip
167 to the working directory or C:\windows\system
168 They are required to run the programs and ghci.
169
1705) run the tests
171
172Unfortunately the lapack dll supplied by the R system does not include
173zgels_, zgelss_, and zgees_, so the functions depending on them
174(linearSolveLS, linearSolveSVD, and schur for complex data)
175will produce a "non supported in this OS" runtime error.
176
177If you find an alternative free and complete lapack.dll which works well
178for this system please let me know.
179
180The examples using graphics do not yet work in windows.
181
182ACKNOWLEDGEMENTS ----------------------------------------------------- 66ACKNOWLEDGEMENTS -----------------------------------------------------
183 67
184I thank Don Stewart, Henning Thielemann, Bulat Ziganshin and all the people 68I thank Don Stewart, Henning Thielemann, Bulat Ziganshin and all the people