Boost logo

Ublas :

Subject: [ublas] [bindings] gbmv error
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2012-10-10 10:56:53


Hello all,

after some further testing of the gbmv blas routine, I have encountered
something that is a bug, but I am a bit puzzled by it. The tests are
doing basic multiplying, see below. Matrix is 10x10 with contents shown,
vector V is a unit vector.

I'm puzzled, because BLAS doesn't return an error, the numbers are
really close to what they should be, and the errors only occur if
column_major banded matrices are used, and all arguments to the backend
seem to make sense. See the ublas/bindings comparison below 'WRONG'.

I've attached the test case, and I've committed the necessary upgrades
to bindings::trans.

Any ideas?

Cheers,

Rutger

THIRD TEST CASE: banded matrices with column major storage

row 0 [10](0,0,0,0,0,0,0,0,0,0)
row 1 [10](1,1,1,0,0,0,0,0,0,0)
row 2 [10](0,1,1,1,0,0,0,0,0,0)
row 3 [10](0,0,1,1,1,0,0,0,0,0)
row 4 [10](0,0,0,1,1,1,0,0,0,0)
row 5 [10](0,0,0,0,1,1,1,0,0,0)
row 6 [10](0,0,0,0,0,1,1,1,0,0)
row 7 [10](0,0,0,0,0,0,1,1,1,0)
row 8 [10](0,0,0,0,0,0,0,1,1,1)
row 9 [10](0,0,0,0,0,0,0,0,1,1)

gemv: CORRECT
ublas: [10](0,3,3,3,3,3,3,3,3,2)
bindings: [10](0,3,3,3,3,3,3,3,3,2)

gbmv: WRONG
ublas: [10](0,3,3,3,3,3,3,3,3,2)
bindings: [10](1,3,3,2,3,3,3,3,3,2)

T R A N S P O S E

gemv with trans: CORRECT
ublas: [10](1,2,3,3,3,3,3,3,3,2)
bindings: [10](1,2,3,3,3,3,3,3,3,2)

gbmv with trans: WRONG
ublas: [10](1,2,3,3,3,3,3,3,3,2)
bindings: [10](1,3,3,2,3,3,3,3,3,2)

FOURTH TEST CASE: banded matrices with row major storage

row 0 [10](0,0,0,0,0,0,0,0,0,0)
row 1 [10](1,1,1,0,0,0,0,0,0,0)
row 2 [10](0,1,1,1,0,0,0,0,0,0)
row 3 [10](0,0,1,1,1,0,0,0,0,0)
row 4 [10](0,0,0,1,1,1,0,0,0,0)
row 5 [10](0,0,0,0,1,1,1,0,0,0)
row 6 [10](0,0,0,0,0,1,1,1,0,0)
row 7 [10](0,0,0,0,0,0,1,1,1,0)
row 8 [10](0,0,0,0,0,0,0,1,1,1)
row 9 [10](0,0,0,0,0,0,0,0,1,1)

gemv: CORRECT
ublas: [10](0,3,3,3,3,3,3,3,3,2)
bindings: [10](0,3,3,3,3,3,3,3,3,2)

gbmv: CORRECT
ublas: [10](0,3,3,3,3,3,3,3,3,2)
bindings: [10](0,3,3,3,3,3,3,3,3,2)

T R A N S P O S E

gemv with trans: CORRECT
ublas: [10](1,2,3,3,3,3,3,3,3,2)
bindings: [10](1,2,3,3,3,3,3,3,3,2)

gbmv with trans: CORRECT
ublas: [10](1,2,3,3,3,3,3,3,3,2)
bindings: [10](1,2,3,3,3,3,3,3,3,2)