Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Runtime exception with Data Parallel Haskell / GHC 7.4.2

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.

like image 922
GregD Avatar asked Feb 22 '13 15:02

GregD


1 Answers

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).

like image 113
Inaimathi Avatar answered Nov 12 '22 23:11

Inaimathi