Re[Haskell-cafe] [2]: interaction between ghci and cudaBLAS library

Simon Beaumont seb at
Tue Mar 3 10:48:50 EST 2009

Simon Beaumont wrote:
> Bulat Ziganshin-2 wrote:
>> Hello Don,
>> Tuesday, March 3, 2009, 5:22:46 AM, you wrote:
>>> GHCi doesn't use the threaded runtime though.  So given that:
>> Don, afair ghci compiled using threaded runtime since 6.6:
>> Prelude> :m Control.Concurrent
>> Prelude Control.Concurrent> rtsSupportsBoundThreads
>> True
> That's what I thought - the problem seems to be with the interaction
> between ghci threads (there are four OS threads running on my machine).  I
> read the conc-ffi paper by Simon Marlow, Simon Peyton-Jones and Wolfgang
> Thaller and whilst that explained the situation regarding bound threads
> (and indeed how to ensure running a bunch of actions within the same
> thread context - which gave me some hope), I am still no wiser as to what
> is going on here and how it can be fixed. It at all.

BTW if I wrap a forkOS around this I get control back in the ghci - which
confirms the threadedness of that at least but still the ffi call blocks.
I'm going to take a closer look inside with gdb again, this feels like some
kind of deadlock. Given that in the conc-ffi paper this kind of interaction
was anticipated we are not outside the design envelope of ghc(i) so there
must be a way to solve this. 

View this message in context:
Sent from the Haskell - Haskell-Cafe mailing list archive at

More information about the Haskell-Cafe mailing list