
Simon, I have only tested 32-bit machines, I will try to test also on 64-bit. Michael, I have also observed strange ATLAS behavior. For example, I can make atlas3-sse2 segfault on big matrices (1000x1000) in ubuntu 6.06 and 7.04, so I typically use atlas3-base. In fact, I found a similar problem: http://article.gmane.org/gmane.linux.debian.devel.bugs.general/323065 (However, atlas3-sse2 seems to work well in ubuntu 7.10...) But I have removed ATLAS and the problem persists even with the basic refblas3 and lapack available in my ubuntu 6.06: lapack3-dev 3.0.2000531a-6ubuntu2. And I can even produce errors on GSL functions. In my particular case all errors disappear if I set -O0 or -O -fvia-C. I will try to find a minimal test case exposing the problem with -fasm. Alberto On Friday 16 November 2007 11:30, Michael McNeil Forbes wrote:
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@haskell.org [mailto:haskell-cafe-
bounces@haskell.org] On Behalf Of Alberto Ruiz
| Sent: 15 November 2007 08:44 | To: haskell-cafe@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@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