
2 Mar
2009
2 Mar
'09
9:22 p.m.
seb:
Don Stewart-2 wrote:
Do you get the same problem in compiled code? (GHCi is generally for exploratory work only).
if I create an executable run it non-interactively. It works fine:
$ ghc -O2 --make -threaded main.hs cublas.hs -lcublas -L${CUDA}/lib
No matter whether is it compiled or interpreted it blocks in ghci (interactively), the threading option makes no difference in either case.
GHCi doesn't use the threaded runtime though. So given that: "To allow foreign calls to be made without blocking all the Haskell threads (with GHC), it is only necessary to use the -threaded option when linking your program, and to make sure the foreign import is not marked unsafe. " So I think this is expected? -- Don