diff options
-rw-r--r-- | README | 77 |
1 files changed, 47 insertions, 30 deletions
@@ -1,7 +1,8 @@ | |||
1 | A simple scientific library for Haskell | 1 | ----------------------------------------- |
2 | --------------------------------------- | 2 | A simple scientific library for Haskell |
3 | ----------------------------------------- | ||
3 | 4 | ||
4 | REQUIREMENTS | 5 | REQUIREMENTS ---------------------------- |
5 | 6 | ||
6 | Development packages of: | 7 | Development packages of: |
7 | 8 | ||
@@ -16,10 +17,11 @@ For example, in Ubuntu Linux we need: | |||
16 | - libgsl0-dev | 17 | - libgsl0-dev |
17 | - refblas3-dev | 18 | - refblas3-dev |
18 | - lapack3-dev | 19 | - lapack3-dev |
19 | - atlas3-base-dev | 20 | - atlas3-base-dev (or a version specifically tuned for your machine) |
20 | 21 | ||
21 | You can also install an atlas version specifically tuned | 22 | For ghc-6.8.x you may also need: |
22 | for your machine (but see the TESTS section below). | 23 | |
24 | - libgmp3-dev. | ||
23 | 25 | ||
24 | The following packages are used for simple graphics: | 26 | The following packages are used for simple graphics: |
25 | 27 | ||
@@ -29,18 +31,16 @@ The following packages are used for simple graphics: | |||
29 | GNU-Octave can be used to check if the results | 31 | GNU-Octave can be used to check if the results |
30 | obtained by this library are correct. | 32 | obtained by this library are correct. |
31 | 33 | ||
32 | INSTALLATION | 34 | INSTALLATION -------------------------------------- |
33 | 35 | ||
34 | $ runhaskell Setup.lhs configure --prefix=$HOME | 36 | $ runhaskell Setup.lhs configure --prefix=$HOME --user |
35 | $ runhaskell Setup.lhs build | 37 | $ runhaskell Setup.lhs build |
36 | $ runhaskell Setup.lhs haddock | 38 | $ runhaskell Setup.lhs haddock |
37 | $ runhaskell Setup.lhs install --user | 39 | $ runhaskell Setup.lhs install |
38 | 40 | ||
39 | See below for installation on Windows. | 41 | See below for installation on Windows. |
40 | 42 | ||
41 | For undetermined reasons compilation with -O in Linux requires -fvia-C. | 43 | TESTS --------------------------------------------- |
42 | |||
43 | TESTS | ||
44 | 44 | ||
45 | $ runhaskell examples/tests | 45 | $ runhaskell examples/tests |
46 | 46 | ||
@@ -48,20 +48,7 @@ Additional tests with big matrices (taking a few minutes): | |||
48 | 48 | ||
49 | $ runhaskell examples/tests --big | 49 | $ runhaskell examples/tests --big |
50 | 50 | ||
51 | NOTE: On Ubuntu 6.06 LTS (Dapper) atlas3-sse2-dev (3.6.0-20) | 51 | EXAMPLES ------------------------------------------------------ |
52 | produces segmentation faults when working with big matrices | ||
53 | on compiled programs. To expose the problem: | ||
54 | |||
55 | $ cd examples | ||
56 | $ ghc --make -O -fvia-C tests.hs | ||
57 | $ ./tests --big | ||
58 | |||
59 | If this crashes, just uninstall atlas3-sse2 and use atlas3-base-dev instead. | ||
60 | Fortunately, atlas3-sse2-dev seems to work well on Ubuntu 7.10 Gutsy. | ||
61 | A similar problem was reported at: | ||
62 | http://article.gmane.org/gmane.linux.debian.devel.bugs.general/323065 | ||
63 | |||
64 | EXAMPLES | ||
65 | 52 | ||
66 | $ ghci | 53 | $ ghci |
67 | Prelude> :m + Numeric.GSL | 54 | Prelude> :m + Numeric.GSL |
@@ -85,7 +72,35 @@ Leaving GHCi. | |||
85 | 72 | ||
86 | A number of illustrative programs are included in the examples folder. | 73 | A number of illustrative programs are included in the examples folder. |
87 | 74 | ||
88 | CHANGES | 75 | KNOWN PROBLEMS / BUGS ------------------------------- |
76 | |||
77 | - Compilation with -O -fasm on 32-bit machines produces strange | ||
78 | NaN's results on certain blas/lapack calls. In these machines | ||
79 | the library is automatically compiled -fvia-C, which apparently | ||
80 | solves the problem. | ||
81 | On 64-bit the default and faster -fasm seems to work well. | ||
82 | |||
83 | - On 64-bit machines the example "minimize.hs", when run from ghci, | ||
84 | produces a segmentation fault. It happens in the call to | ||
85 | gsl_multimin_fdfminimizer_alloc, inside the C wrapper. | ||
86 | If the program is called by runhaskell, it just terminates | ||
87 | prematurely, producing no results. Curiously, in compiled mode the | ||
88 | program seems to work perfectly well. | ||
89 | |||
90 | - On Ubuntu 6.06 LTS (Dapper) atlas3-sse2-dev (3.6.0-20) | ||
91 | produces segmentation faults when working with big matrices | ||
92 | on compiled programs. To expose the problem: | ||
93 | |||
94 | $ cd examples | ||
95 | $ ghc --make -O -fvia-C tests.hs | ||
96 | $ ./tests --big | ||
97 | |||
98 | If this crashes, just uninstall atlas3-sse2 and use atlas3-base-dev instead. | ||
99 | Fortunately, atlas3-sse2-dev seems to work well on Ubuntu 7.10 Gutsy. | ||
100 | A similar problem was reported at: | ||
101 | http://article.gmane.org/gmane.linux.debian.devel.bugs.general/323065 | ||
102 | |||
103 | CHANGES --------------------------------------------------------- | ||
89 | 104 | ||
90 | This is a new version of the library previously known as GSLHaskell. | 105 | This is a new version of the library previously known as GSLHaskell. |
91 | It has been renamed to "hmatrix" because only a small part of GSL is actually | 106 | It has been renamed to "hmatrix" because only a small part of GSL is actually |
@@ -108,7 +123,7 @@ There are only minor API changes: | |||
108 | 123 | ||
109 | Old GSLHaskell code will work with small modifications. | 124 | Old GSLHaskell code will work with small modifications. |
110 | 125 | ||
111 | INSTALLATION ON WINDOWS | 126 | INSTALLATION ON WINDOWS ---------------------------------------- |
112 | 127 | ||
113 | 1) Download the developer files gsl-1.8-lib.zip from | 128 | 1) Download the developer files gsl-1.8-lib.zip from |
114 | http://gnuwin32.sourceforge.net/packages/gsl.htm | 129 | http://gnuwin32.sourceforge.net/packages/gsl.htm |
@@ -150,9 +165,10 @@ for this system please let me know. | |||
150 | 165 | ||
151 | The examples using graphics do not yet work in windows. | 166 | The examples using graphics do not yet work in windows. |
152 | 167 | ||
153 | ACKNOWLEDGEMENTS | 168 | ACKNOWLEDGEMENTS ----------------------------------------------------- |
154 | 169 | ||
155 | I thank Henning Thielemann and all the people in the Haskell mailing lists for their help. | 170 | I thank Henning Thielemann and all the people in the Haskell mailing |
171 | lists for their help. | ||
156 | 172 | ||
157 | - Nico Mahlo discovered a bug in the eigendecomposition wrapper. | 173 | - Nico Mahlo discovered a bug in the eigendecomposition wrapper. |
158 | 174 | ||
@@ -168,6 +184,7 @@ I thank Henning Thielemann and all the people in the Haskell mailing lists for t | |||
168 | - Antti Siira discovered a bug in the plotting functions. | 184 | - Antti Siira discovered a bug in the plotting functions. |
169 | 185 | ||
170 | - Paulo Tanimoto helped to fix the configuration of the required libraries. | 186 | - Paulo Tanimoto helped to fix the configuration of the required libraries. |
187 | He also discovered the segfault of minimize.hs in ghci. | ||
171 | 188 | ||
172 | - Xiao-Yong Jin reported a bug on x86_64 caused by the assumptions in f2c.h, | 189 | - Xiao-Yong Jin reported a bug on x86_64 caused by the assumptions in f2c.h, |
173 | which are wrong for this architecture. | 190 | which are wrong for this architecture. |