summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-11-04 20:09:26 +0000
committerAlberto Ruiz <aruiz@um.es>2007-11-04 20:09:26 +0000
commit130093b52ac22a2932c0d9ac0448349428d3eaac (patch)
tree239702d8b94dffd2207cca99ef6bc7b3687fe9bd
parentbd0949d9aac35b4cf12b0f42e41390bb4a9c21b8 (diff)
installation instructions
-rw-r--r--README57
-rw-r--r--examples/tests.hs7
-rw-r--r--hssl.cabal2
3 files changed, 54 insertions, 12 deletions
diff --git a/README b/README
index 73f5108..83ef943 100644
--- a/README
+++ b/README
@@ -3,10 +3,33 @@ A simple scientific library for Haskell
3 3
4REQUIREMENTS 4REQUIREMENTS
5 5
61) GNU Scientific Library (http://www.gnu.org/software/gsl) development packages 6Development packages of:
7 for your system (typically "gsl" and "gsl-devel").
8 7
92) ATLAS BLAS AND LAPACK (http://www.netlib.org/lapack). Usually included with GNU-Octave. 81) GNU Scientific Library (http://www.gnu.org/software/gsl)
9
102) BLAS and LAPACK (http://www.netlib.org/lapack)
11
123) ATLAS (recommended) (http://math-atlas.sourceforge.net/)
13
14For example, in Ubuntu Linux we need:
15
16- libgsl0-dev
17- refblas3-dev
18- lapack3-dev
19- atlas3-base-dev
20
21You can also install an atlas version specifically tuned
22for your machine (e.g., atlas3-sse2-dev, atlas3-3dnow-dev, etc.).
23However, do not install atlas3-sse2-dev on ubuntu 6.06 Dapper
24(see the TESTS section below).
25
26The following packages are used for simple graphics:
27
28- gnuplot
29- imagemagick
30
31It is also a good idea to install GNU-Octave to check
32that the results obtained by this library are correct...
10 33
11INSTALLATION 34INSTALLATION
12 35
@@ -17,16 +40,28 @@ $ runhaskell Setup.lhs install --user
17 40
18See below for installation on Windows. 41See below for installation on Windows.
19 42
20USING ATLAS 43TESTS
21 44
22$ ln -s /usr/lib/atlas/libblas.so.3.0 $HOME/lib/hssl-0.1/ghc-6.6.1/libcblas.so 45$ runhaskell examples/tests
23$ ln -s /usr/lib/atlas/liblapack.so.3.0 $HOME/lib/hssl-0.1/ghc-6.6.1/liblapack.so
24 46
25(More info in the tutorial, available from the web page of the project.) 47Additional tests with big matrices (taking a few minutes):
26 48
27TESTS 49$ runhaskell examples/tests --big
50
51NOTE: On Ubuntu 6.06 LTS (Dapper) atlas3-sse2-dev (3.6.0-20)
52produces segmentation faults when working with big matrices
53on compiled programs. To expose the problem:
54
55$ cd examples
56$ ghc --make -O tests.hs
57$ ./tests --big
28 58
29$ runhaskell examples/tests.hs 59If this crashes, just uninstall atlas3-sse2 (atlas3-base-dev will be used).
60Fortunately, atlas3-sse2-dev seems to work well on Ubuntu 7.10 Gutsy.
61
62A similar problem was reported at:
63
64http://article.gmane.org/gmane.linux.debian.devel.bugs.general/323065
30 65
31EXAMPLES 66EXAMPLES
32 67
@@ -75,7 +110,7 @@ There are only minor API changes:
75 110
76Old GSLHaskell code will work with small modifications. 111Old GSLHaskell code will work with small modifications.
77 112
78INSTALLATION ON WINDOWS 113INSTALLATION ON WINDOWS (FIXME)
79 114
801) Download the developer files gsl-1.8-lib.zip from 1151) Download the developer files gsl-1.8-lib.zip from
81 http://gnuwin32.sourceforge.net/packages/gsl.htm 116 http://gnuwin32.sourceforge.net/packages/gsl.htm
@@ -124,3 +159,5 @@ I thank Henning Thielemann and all the people in the Haskell mailing lists for t
124- Pedro E. López de Teruel fixed the interface to lapack. 159- Pedro E. López de Teruel fixed the interface to lapack.
125 160
126- Antti Siira discovered a bug in the plotting functions. 161- Antti Siira discovered a bug in the plotting functions.
162
163- Paulo Tanimoto helped to fix the configuration of the required libraries.
diff --git a/examples/tests.hs b/examples/tests.hs
index ad70266..210f8ef 100644
--- a/examples/tests.hs
+++ b/examples/tests.hs
@@ -14,6 +14,7 @@ import Test.HUnit hiding ((~:),test)
14import System.Random(randomRs,mkStdGen) 14import System.Random(randomRs,mkStdGen)
15import System.Info 15import System.Info
16import Data.List(foldl1') 16import Data.List(foldl1')
17import System(getArgs)
17 18
18type RM = Matrix Double 19type RM = Matrix Double
19type CM = Matrix (Complex Double) 20type CM = Matrix (Complex Double)
@@ -452,4 +453,8 @@ bigtests = do
452 , test "eigC" $ eigTest bigmatc 453 , test "eigC" $ eigTest bigmatc
453 ] 454 ]
454 455
455main = tests 456main = do
457 args <- getArgs
458 if "--big" `elem` args
459 then bigtests
460 else tests
diff --git a/hssl.cabal b/hssl.cabal
index acacf4c..ea804ac 100644
--- a/hssl.cabal
+++ b/hssl.cabal
@@ -72,6 +72,6 @@ Exposed-modules: Data.Packed.Internal,
72C-sources: lib/Data/Packed/Internal/auxi.c, 72C-sources: lib/Data/Packed/Internal/auxi.c,
73 lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c, 73 lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c,
74 lib/Numeric/GSL/gsl-aux.c 74 lib/Numeric/GSL/gsl-aux.c
75extra-libraries: gsl cblas lapack 75extra-libraries: gsl blas lapack
76cc-options: -O4 76cc-options: -O4
77ghc-prof-options: -auto-all 77ghc-prof-options: -auto-all