[Haskell-cafe] ghc 6.8.1 bug?

Michael McNeil Forbes mforbes at physics.ubc.ca
Fri Nov 16 05:30:47 EST 2007


Just out of curiosity, what LAPACK and BLAS implementation is causing  
problems?  I have no idea if there is anything related, but I have  
been having similar sounding problems with python when using the  
latest ATLAS library on 64 bit core 2 machines.  I am beginning to  
suspect that there may be something wrong in ATLAS, but I don't have  
any definite evidence yet because the bug is also rather elusive here.

Michael.

On 16 Nov 2007, at 2:13 AM, Simon Peyton-Jones wrote:

> Alberto, SevenThunders, Joel,
>
> Glark. This is not good. Thank you for being so polite about it.   
> And thanks for working on a reproducible test case -- without that  
> we are 100% stuck.
>
> We did fix one just-possibly-related bug in 6.8 recently, which  
> concerned the use of {-# UNPACK #-} on strict Double-sized fields  
> in fixed, top-level data structures. I think it was only wrong on a  
> 64-bit machine.
> http://www.haskell.org/pipermail/glasgow-haskell-users/2007- 
> November/013454.html
> What is the word size on your machine?
>
> But that may well be a complete red herring.  We'll stand by.
>
> Simon
>
> | -----Original Message-----
> | From: haskell-cafe-bounces at haskell.org [mailto:haskell-cafe- 
> bounces at haskell.org] On Behalf Of Alberto Ruiz
> | Sent: 15 November 2007 08:44
> | To: haskell-cafe at haskell.org
> | Subject: Re: [Haskell-cafe] ghc 6.8.1 bug?
> |
> | Hello,
> |
> | I have had exactly the same problem with my bindings to GSL, BLAS  
> and LAPACK.
> | The foreign functions (!) randomly (but very frequently) produced  
> NaN with
> | ghc-6.8.1 -O. As usual, I first thought that I had a subtle bug  
> related to
> | the foreign pointers, but after a lot of refactoring,  
> experiments, and
> | tracing everything, I'm reasonably sure that memory is safely  
> used. What I
> | have found is that the same errors can be reproduced on ghc-6.6.1
> | with -O -fasm. So I tried -O -fvia-C on ghc-6.8.1 (which now it  
> is not the
> | default) and apparently everything works well. So it seems that  
> now the ffi
> | requires and additional and explicit -fvia-C. In any case I don't  
> know
> | why -fasm produces those strange NaN in precompiled foreign  
> functions...
> |
> | Alberto
> |
> | On Thursday 15 November 2007 09:05, SevenThunders wrote:
> | > The good news is that my code compiles without error and much  
> faster under
> | > ghc 6.8.1.
> | > The bad news is that there appear to be subtle bugs that did  
> not occur when
> | > I compiled things under
> | > 6.6.1.  One issue is that my code is somewhat complex and links  
> into a  C
> | > library as well.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

----------------------
Mailing address:

Michael McNeil Forbes
UW Dept. of Physics
Box 351560
Seattle, WA, 98195-1560
For couriers:

Physics/Astronomy Building, Room C121
3910 15th Ave NE
Seattle, WA, 98195-1560

If you would like to visit me personally:
Room B482 (Fourth floor)
(206) 543-9754





More information about the Haskell-Cafe mailing list