
Someone has tried to parallelize Lennart's Haskell from my ray tracer language comparison and they are claiming awesome performance results for Haskell, even beating HLVM: http://poorlytyped.blogspot.com/2010/01/haskell-ray-tracing-parallel.html Frankly, I don't believe their claims for a second. So I'd like to test their code for myself. However, apparently their code needs some third-party library that can be installed with: cabal install AC-Vector but, on my machine, that only seems to make the library accessible to GHC 6.10 and not to GHC 6.12 (which is needed to compile this benchmark). What is the easiest way for me to get this library working under GHC 6.12? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e

You should be able to get it just by running cabal update & cabal install
AC-Vector.
With 6.12 it may be that you don't have the cabal-install package installed
already, so cabal install won't work.
If that's the case, you'll need to download cabal-install and it's deps and
install it using runhaskell Setup.hs configure, runhaskell Setup.hs build ad
runhaskell Setup.hs install.
That, or wait until 6.12 is considered stable enough to become part of the
Haskell platform.
For reference – I can quite believe that Haskell came out incredibly fast
here – it's trivially easy to parallelise haskell programs, and GHC deals
with parallelisation well (except for garbage collection unfortunately).
Bob
On Fri, Jan 15, 2010 at 4:25 PM, Jon Harrop
Someone has tried to parallelize Lennart's Haskell from my ray tracer language comparison and they are claiming awesome performance results for Haskell, even beating HLVM:
http://poorlytyped.blogspot.com/2010/01/haskell-ray-tracing-parallel.html
Frankly, I don't believe their claims for a second. So I'd like to test their code for myself. However, apparently their code needs some third-party library that can be installed with:
cabal install AC-Vector
but, on my machine, that only seems to make the library accessible to GHC 6.10 and not to GHC 6.12 (which is needed to compile this benchmark).
What is the easiest way for me to get this library working under GHC 6.12?
-- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Friday 15 January 2010 15:17:38 Tom Davie wrote:
You should be able to get it just by running cabal update & cabal install AC-Vector.
When I run "cabal install" it says: $ cabal update Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install If I run "cabal install cabal-install" as it suggests then it appears to do a lot of work, ending with this: ... [33 of 34] Compiling Distribution.Client.List ( Distribution/Client/List.hs, dist/build/cabal/cabal-tmp/Distribution/Client/List.o ) [34 of 34] Compiling Main ( Main.hs, dist/build/cabal/cabal-tmp/Main.o ) Linking dist/build/cabal/cabal ... Installing executable(s) in /home/jdh30/.cabal/bin But when I run "cabal install" again it fails to detect the updated cabal-install correctly: $ cabal update Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install
With 6.12 it may be that you don't have the cabal-install package installed already, so cabal install won't work.
If that's the case, you'll need to download cabal-install and it's deps and install it using runhaskell Setup.hs configure, runhaskell Setup.hs build ad runhaskell Setup.hs install.
Those "runhaskell" commands don't do anything here. If I use bootstrap.sh then I get: $ ./bootstrap.sh Error during cabal-install bootstrap: Version mismatch between ghc and ghc-pkg If you set the GHC variable then set GHC_PKG too So I do: $ export GHC=ghc-6.12.1 $ export GHC_PKG=ghc-pkg-6.12.1 Then "bootstrap.sh" gets a bit further: $ ./bootstrap.sh Checking installed packages for ghc-6.12.1... The Haskell package 'parsec' is required but it is not installed. If you are using a ghc package provided by your operating system then install the corresponding packages for 'parsec' and 'network'. If you built ghc from source with only the core libraries then you should install these extra packages. You can get them from hackage. Error during cabal-install bootstrap: The Haskell package 'parsec' is required but it is not installed. I cannot install the appropriate libghc6-parsec-dev package from any Debian because they all require GHC =6.8.
That, or wait until 6.12 is considered stable enough to become part of the Haskell platform.
How long will that take?
For reference – I can quite believe that Haskell came out incredibly fast here – it's trivially easy to parallelise haskell programs, and GHC deals with parallelisation well (except for garbage collection unfortunately).
Yeah, I don't believe his Haskell is correct let alone fast. :-) -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e

On Fri, Jan 15, 2010 at 11:24 AM, Jon Harrop
On Friday 15 January 2010 15:17:38 Tom Davie wrote:
You should be able to get it just by running cabal update & cabal install AC-Vector.
When I run "cabal install" it says:
$ cabal update Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install
If I run "cabal install cabal-install" as it suggests then it appears to do a lot of work, ending with this:
... [33 of 34] Compiling Distribution.Client.List ( Distribution/Client/List.hs, dist/build/cabal/cabal-tmp/Distribution/Client/List.o ) [34 of 34] Compiling Main ( Main.hs, dist/build/cabal/cabal-tmp/Main.o ) Linking dist/build/cabal/cabal ... Installing executable(s) in /home/jdh30/.cabal/bin
But when I run "cabal install" again it fails to detect the updated cabal-install correctly:
Is /home/jdh30/.cabal/bin in your $PATH? That's the default install location of executables by cabal-install. What I usually do is a manual soft-link from ${HOME}/.cabal/bin/foo to ${HOME}/bin/foo for the programs which cabal installs that I would like in my path. But I may be a bit quirky. Antoine

Jon Harrop schrieb:
On Friday 15 January 2010 15:17:38 Tom Davie wrote:
You should be able to get it just by running cabal update & cabal install AC-Vector.
http://hackage.haskell.org/package/AC-Vector http://hackage.haskell.org/packages/archive/AC-Vector/1.1.1/AC-Vector-1.1.1.... AC-Vector is a simple (single source) package only requiring the base package, so even without "cabal-install" (that installs the "cabal" binary) you should be able to download and unpack it: cd AC-Vector-1.1.1 ghc --make Setup.hs ./Setup install --user ./Setup build ./Setup install
When I run "cabal install" it says:
$ cabal update Downloading the latest package list from hackage.haskell.org Note: there is a new version of cabal-install available. To upgrade, run: cabal install cabal-install
I wonder which "cabal" binary was used? (from an old installation?)
If I run "cabal install cabal-install" as it suggests then it appears to do a lot of work, ending with this:
... [33 of 34] Compiling Distribution.Client.List ( Distribution/Client/List.hs, dist/build/cabal/cabal-tmp/Distribution/Client/List.o ) [34 of 34] Compiling Main ( Main.hs, dist/build/cabal/cabal-tmp/Main.o ) Linking dist/build/cabal/cabal ... Installing executable(s) in /home/jdh30/.cabal/bin
So a new binary was installed in /home/jdh30/.cabal/bin. Check if /home/jdh30/.cabal/bin/cabal --version shows cabal-install version 0.8.0 using version 1.8.0.2 of the Cabal library and replace your older cabal version (in your PATH). If you still see an older version (of the Cabal library) you may need to bootstrap cabal-install-0.8.0 and manually install parsec-2.1.0.1 and network (i.e. version 2.2.1.5) before (as described above for AC-Vector). Cheers Christian P.S. If you add "--global" to "cabal install" binaries will be installed under /usr/local/bin (and libraries in the global package.conf file)

On Friday 15 January 2010 18:13:17 Christian Maeder wrote:
If you still see an older version (of the Cabal library) you may need to bootstrap cabal-install-0.8.0 and manually install parsec-2.1.0.1 and network (i.e. version 2.2.1.5) before (as described above for AC-Vector).
Ok, I finally managed to get everything working this way. Turns out the cabal update wasn't even attempting to use the latest version. Once I'd bootstrapped the latest cabal-install I had to tell it to install for a specific version of GHC using the -w flag. Now I've got GHC 6.12.1 up and running! Thanks! -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
participants (4)
-
Antoine Latter
-
Christian Maeder
-
Jon Harrop
-
Tom Davie