gonum / blas

A BLAS implementation for Go [DEPRECATED]
172 stars 16 forks source link

Drotmg is crazy #59

Closed kortschak closed 9 years ago

kortschak commented 9 years ago

This seems to continue the saga of Drotmg. This test passes on travis, but fails on my laptop (ubuntu 14.04) using OpenBLAS (deb package).

The two failing cases are blas.Diagonal with a non-zero first column.

$ CGO_LDFLAGS="-lopenblas" go test -run Drotmg
--- FAIL: TestDrotmg (0.00s)
    level1double.go:1622: drotmg H mismatch AbsQ1_LT_AbsQU__D2_Pos: expected [0.4166666666666667 0 0 0.625], found [0 0.4166666666666667 0 0.625]
    level1double.go:1622: drotmg H mismatch D1=D2_X1=X2: expected [1 0 0 1], found [0 1 0 1]
FAIL
exit status 1
FAIL    github.com/gonum/blas/cblas 0.007s
btracey commented 9 years ago

Ugh. I'll see if I can get OpenBLAS installed. The OpenBLAS team was responsive to the last bug I filed.

btracey commented 9 years ago

Works fine for me on OSX

btracey commented 9 years ago

Opened a bug on OpenBLAS https://github.com/xianyi/OpenBLAS/issues/484

kortschak commented 9 years ago

I've just built OpenBLAS from source (xianyi/OpenBLAS@17b9db20f1fccbfcdc54aa69ab75605e738807c1) with the same failure result.

$ uname -pr
3.13.0-43-generic x86_64
$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
<snip>
fhs commented 9 years ago

Also failing when using reference implementation:

$ CGO_LDFLAGS=-lcblas go test -test.run Drotmg
--- FAIL: TestDrotmg (0.00s)
    level1double.go:1662: drotmg H mismatch RD1_Big_RD2_Big_Flag_0: expected [4096 -3584 1792 4096], found [4096 -4096 1 4096]
    level1double.go:1662: drotmg H mismatch RD1_Big_RD2_Big_Flag_1: expected [2340.5714285714284 -4096 4096 4681.142857142857], found [2340.5714285714284 -4096 1 4681.142857142857]
    level1double.go:1662: drotmg H mismatch D1_Big_D2_Small_Flag_1: expected [2.8671999999999997e-26 -0.000244140625 4096 2.44140625e-16], found [2.8671999999999997e-26 -0.000244140625 1 2.44140625e-16]
    level1double.go:1662: drotmg H mismatch D1_Small_D2_Big_Flag_1: expected [2.3731773997569866e+10 -1.6777216e+07 0.000244140625 1.6777216e-07], found [2.3731773997569866e+10 -4096 1 1.6777216e-07]
FAIL

I'm using Arch Linux 64-bit on amd64.

btracey commented 9 years ago

Yea, I think the reference implementation is wrong. It has the same problem that OpenBLAS did before the bug was fixed

https://github.com/xianyi/OpenBLAS/issues/365 https://github.com/xianyi/OpenBLAS/issues/365

On Jan 3, 2015, at 8:18 AM, Fazlul Shahriar notifications@github.com wrote:

Also failing when using reference implementation:

$ CGO_LDFLAGS=-lcblas go test -test.run Drotmg --- FAIL: TestDrotmg (0.00s) level1double.go:1662: drotmg H mismatch RD1_Big_RD2_Big_Flag_0: expected [4096 -3584 1792 4096], found [4096 -4096 1 4096] level1double.go:1662: drotmg H mismatch RD1_Big_RD2_Big_Flag_1: expected [2340.5714285714284 -4096 4096 4681.142857142857], found [2340.5714285714284 -4096 1 4681.142857142857] level1double.go:1662: drotmg H mismatch D1_Big_D2_Small_Flag_1: expected [2.8671999999999997e-26 -0.000244140625 4096 2.44140625e-16], found [2.8671999999999997e-26 -0.000244140625 1 2.44140625e-16] level1double.go:1662: drotmg H mismatch D1_Small_D2_Big_Flag_1: expected [2.3731773997569866e+10 -1.6777216e+07 0.000244140625 1.6777216e-07], found [2.3731773997569866e+10 -4096 1 1.6777216e-07] FAIL I'm using Arch Linux 64-bit on amd64.

— Reply to this email directly or view it on GitHub https://github.com/gonum/blas/issues/59#issuecomment-68594650.

kortschak commented 9 years ago

This appears to be an ubuntu bug. My build was shadowed by the deb so I saw the effect always. Removing the deb install and rebuilding/installing I see the correct behaviour.

jonlawlor commented 9 years ago

This prevents us from using apt-get in the travis builds (which use ubuntu), so we'll have to continue building OpenBLAS from scratch.

kortschak commented 9 years ago

I have filed an upstream bug and commited a test to OpenBLAS to satisfy the packager. I haven't seen any movement on that yet; I will not hold my breath.

jonlawlor commented 9 years ago

Yeah, they move slowly. Debian stable is still on go 1.2.1. I just wanted to document why travis builds can't be sped up easily.