Menu ▾ ▴

#11 MBCSR triangular solve is broken.

1.0
open
Kernels (1)
7
2014-08-27
2008-09-05
No

A user has reported a problem with triangular solve. Message from the user (with sample program tarball attached).

====
Hi Richard,

It seems to me, that SpMV kernel works fine with transformations, but transformations for triangular solver kernel is broken. I'm sending you a simple program with testcase (please see attached tar archive).

In the archive there are 3 files: README with cmdline and output of the program:

$ cat README
./test_oski_trisolve2 mat.in

-I- N: 10 Nnz: 23
-I- 1st call of oski_MatTrisolve err_oski: 0
-I- 2nd call of oski_MatTrisolve err_oski: 0

tri_answ1[0] : 0.000000e+00 tri_answ2[0] : 0.000000e+00
tri_answ1[1] : 7.142857e+00 tri_answ2[1] : 7.142857e+00
tri_answ1[2] : 8.695652e+00 tri_answ2[2] : 3.571429e+00
tri_answ1[3] : 1.000000e+02 tri_answ2[3] : 1.000000e+02
tri_answ1[4] : 3.636364e+01 tri_answ2[4] : 4.981320e-01
tri_answ1[5] : 4.807692e+00 tri_answ2[5] : 2.604167e+00
tri_answ1[6] : 1.333333e+01 tri_answ2[6] : 1.694915e+00
tri_answ1[7] : 3.181818e+00 tri_answ2[7] : 3.017241e+00
tri_answ1[8] : 2.580645e+00 tri_answ2[8] : 1.049318e+00
tri_answ1[9] : 6.250000e+00 tri_answ2[9] : 6.250000e+00

mul_answ1[0] : 1.700000e+00 mul_answ2[0] : 1.700000e+00
mul_answ1[1] : 7.800000e-01 mul_answ2[1] : 7.800000e-01
mul_answ1[2] : 2.013333e+00 mul_answ2[2] : 2.013333e+00
mul_answ1[3] : 3.700000e-01 mul_answ2[3] : 3.700000e-01
mul_answ1[4] : 4.035000e+01 mul_answ2[4] : 4.035000e+01
mul_answ1[5] : 1.168667e+01 mul_answ2[5] : 1.168667e+01
mul_answ1[6] : 2.492286e+01 mul_answ2[6] : 2.492286e+01
mul_answ1[7] : 1.868500e+01 mul_answ2[7] : 1.868500e+01
mul_answ1[8] : 6.872711e+01 mul_answ2[8] : 6.872711e+01
mul_answ1[9] : 1.450000e+01 mul_answ2[9] : 1.450000e+01

-I- l_infty1: 3.586550e+01 l_infty2: 1.421085e-14

I tried 2 kernels: oski_MatTrisolve and oski_MatMult. tri_answ1 stands for answer for trisolve before transformation applied. tri_answ2 - after the transformation. the same for mul_answ1, mul_answ2.

l_infty1 is an infinity norm between tri_answ1 and tri_answ2, l_infty2 - for mul_answ. For multiplication kernel l_infty2 is small enough - but for triangular solver it's large.

file mat.in contains 10 x 10 triangular sparse matrix with nnz = 23 given in matlab coordinate form (index offset is 1). This file was read by the program, transformed and digested, offsets fixed to be 0 in function read_sparse_mat in the file test_oski_trisolve2.cc.

Hope this help you in fixing the bug.

Thanks and regards,
Alexander S.

Discussion

  • Richard (Rich) Vuduc

     
  • Richard (Rich) Vuduc

    Logged In: YES
    user_id=1291352
    Originator: YES

    Update: Attached tarball should be patched as follows.

    ==========
    Richard, I've made a typo in the oski_trisolve2.cc:

    74c74
    < pc = (int*) malloc(sizeof(int) * N + 1);
    ---
    > pc = (int*) malloc(sizeof(int) * (N + 1));

    The fixed file is attached to the letter.

    It didn't influence on program output, but potentially this error might lead to core dump.

    Thanks again,
    Alexander

     

Log in to post a comment.