For your information. It is a very strange bug.
-------- Original Message --------
Subject: Re: cvxopt on MacOSX 10.7 Date: Tue, 6 Mar 2012 02:12:13 +1300 From: Dima Pasechnik <dim...@gmail.com> To: Lieven Vandenberghe <lieven.va...@gmail.com>
Dear Lieven, here is a bizarre bug we get on OSX 10.7 (compiled with native lapack/blas) from cvxopt import matrix b=matrix([ 1.00e+00, 1.63e-01, 2.83e-01, 9.47e-01, 2.32e-01, 4.85e-01, 9.57e-01, 7.44e-01]) c=1.-b print "b :\n", b print "1-b:\n", c b : [ 1.00e+00] [ 1.63e-01] [ 2.83e-01] [ 9.47e-01] [ 2.32e-01] [ 4.85e-01] [ 9.57e-01] [ 7.44e-01] 1-b: [-1.00e+00] [-1.63e-01] [-2.83e-01] [-9.47e-01] [-2.32e-01] [-4.85e-01] [-9.57e-01] [-7.44e-01] Interestingly, shorter vector b works OK... Do you have any idea what goes wrong here? (this is actually the bug responsible for failure of "acent" test in here: http://sage.math.washington.edu/home/palmieri/misc/cvxopt-1.1.3.log) Best, Dima On 28 February 2012 07:25, Lieven Vandenberghe <lieven.va...@gmail.com> wrote: > > Dear Dima, > > I am not sure what the problem is. I will check with Martin Andersen who > provided the MacOSX binaries and has looked into this. > > Best regards, > > Lieven > > > > > On 02/26/2012 04:17 AM, Dima Pasechnik wrote: >> >> Dear Lieven, >> I wonder if were able to determine what caused problems with running >> CVXOPT on MacOSX 10.7. We're going to release Sage on this platform >> soon, so it's become >> an issue... >> >> I see you're distributing pre-compiled CVXOPTs for this platform, >> using the "non-native" BLAS/LAPACKs. >> Do you have convincing evidence that Apple's BLAS/LAPACK is broken on OSX >> 10.7? >> Somehow, Apple's BLAS/LAPACK is used in other parts of Sage, and there >> we do not seem to see problems (although perhaps we do not try hard >> enough). >> >> Many thanks in advance, >> Dima
Wow. Just wow. So should we not trust matlab or mathematica on Lion
either? I feel a "Burma Sage" coming on... [1]
For completeness, what are your test_blas/cblas programs? What
operations are the three y vectors supposed to represent?
Thanks,
Jason
you can't trust Apple's lapack/blas on OSX 10.6 either.
Here is a short Fortran code calling blas, which crashes on 10.6 and
10.7
http://trac.sagemath.org/sage_trac/ticket/12011#comment:31
And this has been known by Apple for years, apparently...
Have they all but abandoned anything to do with high-performance
computing?
>
> For completeness, what are your test_blas/cblas programs? What
> operations are the three y vectors supposed to represent?
http://boxen.math.washington.edu/home/dima/patches/OSX7blas_bug.tgz
that's vector arithmetic, with one operand having all the same entries.
Dima
It turns out that here Apple is not doing anything wrong.(after having a discussion here: https://discussions.apple.com/message/17795537)It's improper use of BLAS by CVXOPT people that triggers errors.The C code in question violates BLAS convention that incx=0 in these kinds of BLAS functions is illegal.Please see p.30, 1st paragraph of Sect. 2.5.3.There is also a description of xAXPBY function (which is a slight extension of xAXBY which you presume to be buggy) on p.47 which says that if incx (or incy) is set to 0 then an error flag must be raised.So this is a CVXOPT bug, as far as I can see, Apple BLAS is not guilty here.So it seems that we can proceed without Atlas on OSX 10.7, after all...Oh well.
Francois
Francois
Francois
Francois