Deadlock with Repa

Jean-Marie Gaillourdet jmg at gaillourdet.net
Tue Jul 27 09:24:39 EDT 2010


Hi,


I've been trying to use repa and stumbled into rather strange behavior of my program. Sometimes, there seems to be a deadlock at other times it seems there is a livelock. Now, I've managed to prepare a version which consistently generates the following output: 

$ ./MDim
MDim: thread blocked indefinitely in an MVar operation
$

But I don't use any MVar directly.  And the only used library which is not part of ghc are repa and repa-algorithms. To state it clearly I don't use any MVars, par, pseq, forkIO nor any other parallelism or cuncurrency functionality. The only thing my program uses is repa which is supposed to use some kind of parallelism as far as the documentation says. So I am wondering whether this is a problem with my code or with repa or with ghc.

The same behaviour occurs with ghc-6.12.1 and ghc-6.13.20100726. This is on MacOSX 10.6.4.  

In order to reproduce take the attached file and compile it with:

$ ghc --make -package dph-prim-par MDim.hs -main-is MDim -fforce-recomp 
[1 of 1] Compiling MDim             ( MDim.hs, MDim.o )
Linking MDim ...
$ ./MDim 
MDim: thread blocked indefinitely in an MVar operation
$

I haven't been able to make the program smaller without removing the blockage. But, essentially it's just pure number crunching you can ignore.

I'd be really happy if anyone could give me a hint how to debug this, or whether I am able to do anything about it, at all. 


Best regards,
Jean-Marie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MDim.hs
Type: application/octet-stream
Size: 4898 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20100727/5cac3184/MDim.obj
-------------- next part --------------


-- 

Dipl.-Inf. Jean-Marie Gaillourdet

Software Technology Group
University of Kaiserslautern, Department of Computer Science

Geb?ude 32, Raum 406
Gottlieb-Daimler-Str.
D-67653 Kaiserslautern

Tel: 06 31 - 205 - 32 72
Fax: 06 31 - 205 - 34 20





More information about the Glasgow-haskell-users mailing list