Runtime exception with Data Parallel Haskell / GHC 7.4.2

125 views Asked by At

I'm trying to do some simple experiements with Data Parallel Haskell running, but I clearly have some options wrong. even when I try something very simple like

sumP [:1.0,2.0:]

I get an exception

Exception indexParr: out of bounds parallel array index; idx = 0, arr len = 0

Assume I have something set up wrongly - but ...

I get this same error both when trying to use GHCi, and when running a executable generated with GHC.

1

There are 1 answers

0
Inaimathi On

You might be running into some of the limitations specified by the DPH project status. Specifically

Major limitations include the inability to mix vectorised and non-vectorised code in a single Haskell module, the need to use a feature-deprived, special-purpose Prelude for vectorised code, and a lack of optimisations (leading to poor performance in some cases).

If you're just looking to make use of regular data parallelism, you can probably get away with repa (which is also recommended by the DPH page).