I have downloaded oski-1.0.1b and I am actually trying the get around with its tuning capabilities. I have configured it on an Intel Pentium 4 Xeon, using gcc-4.1 with a rather aggressive opt '-O3 -funroll-all-loops'. I have only enabled the long-double configuration. The normal MatMult kernel runs at a pretty fast average of 350-400MFLOPS (thanks to unrolling, which eliminates all that overhead needed to reach the actual kernel). I have tried to aggressively apply tuning using oski_TuneMat to a diverse set of matrices, but with no result. I tried also to let OSKI implicitly optimize the matrix structure by calling oski_TuneMat in every MatMult operation (i am actually doing about a hundred of them). So I decided to try the ApplyMatTransforms out, using an explicit simple Lua program, just a 'return BCSR(InputMat, 2, 2)' snippet, but again I get an error. Turning on OSKI debugging info an error 'One of the conversion arguments is invalid' appears, but I cannot figure out why. Am I missing something with the BCSR Lua representation? I also get the same error, when I instruct OSKI to use 1x1 blocks. The entire debug output of OSKI follows. I would much appreciate your help, thank you in advance!
Bill
PS: Btw, trying to get long-double configuration properly working, I think I came across a typo bug in <oski/oski_Tld.h>. `DEF_IND_TYPE' should have been defined to `2' (long) and not to `1' (int).
! Initializing BeBOP-OSKI 1.0.1b
! This library was built with the following options:
! * Default link path = /s/matrices/sw/oski-xenon/lib/oski
! * Default OSKI-Lua root = /s/matrices/sw/oski-xenon/lib/oski
! * CC = gcc-4.1
! * CFLAGS = -O3 -funroll-all-loops -g -std=c99
! * LDFLAGS = -lm
! * F77 = f77
! * FFLAGS = -g -O2
! * Support libraries link options =
! * Default OSKI-Lua root directory = /s/matrices/sw/oski-xenon/lib/oski
! * Default benchmark data directory = /s/matrices/sw/oski-xenon/lib/oski/bench
! * Default shared library path = /s/matrices/sw/oski-xenon/lib/oski
! Initializing shared library module loader
! Checking for environment variable 'OSKI_LD_LIBRARY_PATH'
! Setting search path to '/s/matrices/sw/oski-xenon/lib/oski'
! Initializing matrix type manager
! Site module registration
! filebase = 'site-modules-mats.txt'
! mod_type_name = 'mat'
! func = 0x40f8f0
! path = '/s/matrices/sw/oski-xenon/lib/oski'
! Checking for shared library module 'liboski_mat_CSR_Tid'
! (Not found.)
! Checking for shared library module 'liboski_mat_CSC_Tid'
! (Not found.)
! Checking for shared library module 'liboski_mat_CSR_Tld'
! (Found: 0xa865f0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa865f0
! Registered new matrix type: CSR(index=long, value=double) (ID#1)
! Registered: 'CSR' (2, 2)
! Checking for shared library module 'liboski_mat_CSC_Tld'
! (Found: 0xa880a0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa880a0
! Registered new matrix type: CSC(index=long, value=double) (ID#2)
! Registered: 'CSC' (2, 2)
! (Registered 2 modules.)
! Initializing heuristic manager
! Site module registration
! filebase = 'site-modules-heur.txt'
! mod_type_name = 'heur'
! func = 0x40cd30
! path = '/s/matrices/sw/oski-xenon/lib/oski'
! Checking for shared library module 'liboski_heur_regprof_Tid'
! (Not found.)
! Checking for shared library module 'liboski_heur_symmrb_Tid'
! (Not found.)
! Checking for shared library module 'liboski_heur_mregblock_Tid'
! (Not found.)
! Checking for shared library module 'liboski_heur_regprof_Tld'
! (Found: 0xa889d0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa889d0
! Registered new heuristic: regprof(index=long, value=double) (ID#1)
! Registered: 'regprof' (2, 2)
! Checking for shared library module 'liboski_heur_symmrb_Tld'
! (Found: 0xa89270. Initializing...)
! Trying to execute oski_InitModule() in module 0xa89270
! Registered new heuristic: symmrb(index=long, value=double) (ID#2)
! Registered: 'symmrb' (2, 2)
! Checking for shared library module 'liboski_heur_mregblock_Tld'
! (Found: 0xa886f0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa886f0
! Registered new heuristic: mregblock(index=long, value=double) (ID#3)
! Registered: 'mregblock' (2, 2)
! (Registered 3 modules.)
! Calibrating timer based on 'Intel x86-64 cycle counter' using a 1 second interval
! Found 3.55762e-10 seconds per tick (2.81087 Gt/s)
! Creating matrix handle for a 21200 x 21200 CSR matrix
! Asserted input matrix properties:
! Pattern: general
! Diagonal elements stored explicitly
! 0-based indices
! Indices may be unsorted
! Indices may repeat
! Using cached timer calibration result
! Found 3.55762e-10 seconds per tick (2.81087 Gt/s)
! Time to stream input matrix: 0.00764631 seconds
! Applying transformation program: 'return BCSR(InputMat, 2, 2);'
! [OLUA] Starting transformation engine...
! [OLUA] Registering OSKI-Lua type...
! Type: CSR(index=long, value=double)
! Module: liboski_mat_CSR_Tld
! [OLUA] Registering OSKI-Lua type...
! Type: CSC(index=long, value=double)
! Module: liboski_mat_CSC_Tld
! [OLUA] Converting from 'CSR' to 'BCSR' format...
! Checking for shared library module 'liboski_mat_BCSR_Tld'
! (Found: 0xa93690. Initializing...)
! Trying to execute oski_InitModule() in module 0xa93690
! Registered new matrix type: BCSR(index=long, value=double) (ID#3)
***********************************************************
* OSKI Error -10 : One of the conversion arguments is invalid.
* Occurred at/near '/home/users/bkk/sw/oski-1.0.1b/src/xforms.c', line 974.
Additional information:
In call to liboski_Tld_LTX_oski_CreateLuaMatReprFromCSR( dest=BCSR<i=2, v=2>, source=CSR<i=2, v=2>, r=2, c=2 )
**********************************************************
***********************************************************
* OSKI Error -22 : Could not transform data structure
* Occurred at/near '/home/users/bkk/sw/oski-1.0.1b/src/xforms.c', line 834.
Additional information:
oski_ApplyMatTransforms_Tld(): 'Transformation program did not return a valid matrix object.'
**********************************************************
! [OLUA] Closing transformation engine...
! (closed)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the detailed report. I'll file this as a bug report and look into the problem ASAP.
The #define in oski_Tld.h is indeed incorrect, but would only affect you if you directly included 'oski/oski_Tld.h' rather than including 'oski/oski.h'.
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks for the response. Trying to pin the problem down, I cross-checked xforms.c and the debug output and I noticed that the reason of failure is that id_CSR != A_source->mattype_id. I don't know what exactly id_CSR represents internally, but I hope this will help. Anyway, I am now trying an int-double configuration to check if it 'll work for me.
Thanks,
Bill
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks. I've updated the bug tracker with the additional information.
Can you look in your OSKI install tree, and send post a copy of INSTALL/lib/oski/profile_BCSR_MatMult_Tld.dat? This file is performance data collected for various values of r x c, collected during installation. The benchmark that collects this data uses the OSKI-Lua method of specifying the transform, so a bug should show up there as well.
I'm building a long-double implementation to try to reproduce your error now.
Best,
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this profile file does not seem to have any problem. I am listing it at the end. I have also tried the INSTALL/bin/oskibench_Tld tool and this also worked fine. So I guess the problem may be somewhere else, probably in the way I create the CSR matrix, but I cannot see anything wrong with it. I use the following code
if ( (A_tunable = oski_CreateMatCSR(our_csr_mat->row_ptr,
our_csr_mat->col_ind,
our_csr_mat->values,
nrows, ncols, SHARE_INPUTMAT,
1, INDEX_ZERO_BASED)) == INVALID_MAT)
err_quit("%s: oski could not create matrix", argv[0]);
where `row_ptr', `col_ind' are of type (long *) and `values' is a (double *). The actual call to `ApplyMatTransfomrs' is the following:
if (oski_ApplyMatTransforms(A_tunable,
"return BCSR(InputMat, 2, 2)") < 0)
err_quit("%s: oski: failed to apply requested transformation", argv[0]);
The listing of `profile_BCSR_MatMult_Tld.dat' follows:
I think I understand the problem, and can suggest a possible workaround. Basically, the OSKI headers are broken when you use the non-default int-double types, and they are broken through the latest version, 1.0.1g. To verify the issue, can you do the following?
First, compile your source file with all warnings enabled (in gcc/icc, with the '-Wall' flag). You should some type-mismatch warnings when compiling the source file that calls oski_CreateMatCSR.
Secondly, run
nm YOUR-OBJ.o | grep oski_CreateMatCSR
on the object file containing the call to oski_CreateMatCSR. I suspect it will refer to oski_CreateMatCSR_Tid, rather than the desired xxx_Tld.
I'm fixing the issue and will update you. In the meantime, if you are in a hurry, please try the following (possible) workaround: re-run the 'configure' step with the additional flag
--with-index-binding=long
Doing so should modify 'oski.h' so that 'oski_index_t' and all other calls bind to 'long' by default, rather than to 'int'. You'll then have to re-build and re-install (sorry).
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I already use -Wall and I don't get any type mismatch warning. Running `nm', everything is linked to its `_Tld' version; `nm oski-tune-static | grep -e '.Tid'` yields nothing, so no `_Tid' version is it used anywhere. I will try the change in the configuration and I 'll keep you updated.
Thanx,
Bill
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your help and patience on this bug. So far, I have not been able to reproduce your error exactly. I did verify and fix the broken headers you reported, which is what was causing my errors (and which "-Wall" would have caught). I will release these changes in a day or two as version 1.0.1h.
The only other suggestion I can offer at this point is to try 1.0.1g instead of 1.0.1b, or wait a day or two for 1.0.1h. The post-1.0.1b versions include link-related fixes for Mac OS X, and may as an unintended side-effect resolve your problem as well.
But please keep letting me know how things go for you, as I'd like to fix this ASAP!
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just checked the int-double impl and again unfortunately no progress. I checked a dense matrix in csr storage and the raefsky3 from Tim Davis' collection, and I asked for a DENSE and BCSR optimization, respectively. I got exactly the same errors as in the long-double conf.
Bill
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI, I posted 1.0.1h, which at least fixes the header file bug you reported before. Otherwise, I am not able to reproduce the bug you're experiencing, though I will revisit this in a few days.
Thanks,
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks a lot for your info and interest. Trying to come around the problem, I found some code in `$(DNLD_DIR)/tests' that used a set of utility functions to read in a HB matrix. I adapted it to my needs and linked to oski_util_Tld and that worked fine for me. As a last hint that may help you reproduce my error (you may have already tried that), just allocate and fill three arrays, row_ptr, col_ind, and values, that will constitute a valid CSR format and pass it to oski_createMatCSR; then try oski_applyMatTrans onto the oski returned tunable array.
Thanks a lot,
Bill
PS: It would also be nice if you could document the utility functions in oski_util library in a subsequent version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been using the program in the 'examples' subdirectory of OSKI, modified to use 'long' and to include 'oski/oski_Tld.h'. This seems to work OK for me.
One thing I forgot to ask: Are you calling 'oski_Init()' before running any of the other OSKI routines? I assume you are, but it's one other thing to check.
I'm looking to phase out the 'util' stuff, as one of my colleagues is developing an independent C library, the sparse_matrix_converter, with the much of the same functionality but a cleaner implementation. It includes a more robust Harwell-Boeing reader. See bebop.cs.berkeley.edu/smc for details.
Best,
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to apply the VBR transformation on an input matrix using the same example as that found in the OSKI design document, Section 5.2 ("A complex splitting example") and I am getting an error. I am actually running the following:
***********************************************************
* OSKI Error -19 : Could not transform data structure
* Occurred at/near '/home/bkk/sw/oski-1.0.1h/src/xforms.c', line 834.
Additional information:
oski_ApplyMatTransforms_Tld(): '[string "T = VBR(InputMat); A1, A_leftover = T.extra..."]:1: attempt to call field `extract_blocks' (a nil value)'
**********************************************************
It seems to me as if OSKI-Lua cannot find the `extract_blocks' method. I have already verified that my program reads correctly the argument of `-x' option and passes it to `oski_ApplyMatTransforms'.
Nice to hear from you again, though sorry it is in this context. :-)
This particular feature had been disable, because I hadn't generalized the existing VBR code to work with anything other than int-doubles. (It's disabled for int-doubles as well.) How urgently do you need it?
--rich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I have downloaded oski-1.0.1b and I am actually trying the get around with its tuning capabilities. I have configured it on an Intel Pentium 4 Xeon, using gcc-4.1 with a rather aggressive opt '-O3 -funroll-all-loops'. I have only enabled the long-double configuration. The normal MatMult kernel runs at a pretty fast average of 350-400MFLOPS (thanks to unrolling, which eliminates all that overhead needed to reach the actual kernel). I have tried to aggressively apply tuning using oski_TuneMat to a diverse set of matrices, but with no result. I tried also to let OSKI implicitly optimize the matrix structure by calling oski_TuneMat in every MatMult operation (i am actually doing about a hundred of them). So I decided to try the ApplyMatTransforms out, using an explicit simple Lua program, just a 'return BCSR(InputMat, 2, 2)' snippet, but again I get an error. Turning on OSKI debugging info an error 'One of the conversion arguments is invalid' appears, but I cannot figure out why. Am I missing something with the BCSR Lua representation? I also get the same error, when I instruct OSKI to use 1x1 blocks. The entire debug output of OSKI follows. I would much appreciate your help, thank you in advance!
Bill
PS: Btw, trying to get long-double configuration properly working, I think I came across a typo bug in <oski/oski_Tld.h>. `DEF_IND_TYPE' should have been defined to `2' (long) and not to `1' (int).
! Initializing BeBOP-OSKI 1.0.1b
! This library was built with the following options:
! * Default link path = /s/matrices/sw/oski-xenon/lib/oski
! * Default OSKI-Lua root = /s/matrices/sw/oski-xenon/lib/oski
! * CC = gcc-4.1
! * CFLAGS = -O3 -funroll-all-loops -g -std=c99
! * LDFLAGS = -lm
! * F77 = f77
! * FFLAGS = -g -O2
! * Support libraries link options =
! * Default OSKI-Lua root directory = /s/matrices/sw/oski-xenon/lib/oski
! * Default benchmark data directory = /s/matrices/sw/oski-xenon/lib/oski/bench
! * Default shared library path = /s/matrices/sw/oski-xenon/lib/oski
! Initializing shared library module loader
! Checking for environment variable 'OSKI_LD_LIBRARY_PATH'
! Setting search path to '/s/matrices/sw/oski-xenon/lib/oski'
! Initializing matrix type manager
! Site module registration
! filebase = 'site-modules-mats.txt'
! mod_type_name = 'mat'
! func = 0x40f8f0
! path = '/s/matrices/sw/oski-xenon/lib/oski'
! Checking for shared library module 'liboski_mat_CSR_Tid'
! (Not found.)
! Checking for shared library module 'liboski_mat_CSC_Tid'
! (Not found.)
! Checking for shared library module 'liboski_mat_CSR_Tld'
! (Found: 0xa865f0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa865f0
! Registered new matrix type: CSR(index=long, value=double) (ID#1)
! Registered: 'CSR' (2, 2)
! Checking for shared library module 'liboski_mat_CSC_Tld'
! (Found: 0xa880a0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa880a0
! Registered new matrix type: CSC(index=long, value=double) (ID#2)
! Registered: 'CSC' (2, 2)
! (Registered 2 modules.)
! Initializing heuristic manager
! Site module registration
! filebase = 'site-modules-heur.txt'
! mod_type_name = 'heur'
! func = 0x40cd30
! path = '/s/matrices/sw/oski-xenon/lib/oski'
! Checking for shared library module 'liboski_heur_regprof_Tid'
! (Not found.)
! Checking for shared library module 'liboski_heur_symmrb_Tid'
! (Not found.)
! Checking for shared library module 'liboski_heur_mregblock_Tid'
! (Not found.)
! Checking for shared library module 'liboski_heur_regprof_Tld'
! (Found: 0xa889d0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa889d0
! Registered new heuristic: regprof(index=long, value=double) (ID#1)
! Registered: 'regprof' (2, 2)
! Checking for shared library module 'liboski_heur_symmrb_Tld'
! (Found: 0xa89270. Initializing...)
! Trying to execute oski_InitModule() in module 0xa89270
! Registered new heuristic: symmrb(index=long, value=double) (ID#2)
! Registered: 'symmrb' (2, 2)
! Checking for shared library module 'liboski_heur_mregblock_Tld'
! (Found: 0xa886f0. Initializing...)
! Trying to execute oski_InitModule() in module 0xa886f0
! Registered new heuristic: mregblock(index=long, value=double) (ID#3)
! Registered: 'mregblock' (2, 2)
! (Registered 3 modules.)
! Calibrating timer based on 'Intel x86-64 cycle counter' using a 1 second interval
! Found 3.55762e-10 seconds per tick (2.81087 Gt/s)
! Creating matrix handle for a 21200 x 21200 CSR matrix
! Asserted input matrix properties:
! Pattern: general
! Diagonal elements stored explicitly
! 0-based indices
! Indices may be unsorted
! Indices may repeat
! Using cached timer calibration result
! Found 3.55762e-10 seconds per tick (2.81087 Gt/s)
! Time to stream input matrix: 0.00764631 seconds
! Applying transformation program: 'return BCSR(InputMat, 2, 2);'
! [OLUA] Starting transformation engine...
! [OLUA] Registering OSKI-Lua type...
! Type: CSR(index=long, value=double)
! Module: liboski_mat_CSR_Tld
! [OLUA] Registering OSKI-Lua type...
! Type: CSC(index=long, value=double)
! Module: liboski_mat_CSC_Tld
! [OLUA] Converting from 'CSR' to 'BCSR' format...
! Checking for shared library module 'liboski_mat_BCSR_Tld'
! (Found: 0xa93690. Initializing...)
! Trying to execute oski_InitModule() in module 0xa93690
! Registered new matrix type: BCSR(index=long, value=double) (ID#3)
***********************************************************
* OSKI Error -10 : One of the conversion arguments is invalid.
* Occurred at/near '/home/users/bkk/sw/oski-1.0.1b/src/xforms.c', line 974.
Additional information:
In call to liboski_Tld_LTX_oski_CreateLuaMatReprFromCSR( dest=BCSR<i=2, v=2>, source=CSR<i=2, v=2>, r=2, c=2 )
**********************************************************
***********************************************************
* OSKI Error -22 : Could not transform data structure
* Occurred at/near '/home/users/bkk/sw/oski-1.0.1b/src/xforms.c', line 834.
Additional information:
oski_ApplyMatTransforms_Tld(): 'Transformation program did not return a valid matrix object.'
**********************************************************
! [OLUA] Closing transformation engine...
! (closed)
Bill,
Thanks for the detailed report. I'll file this as a bug report and look into the problem ASAP.
The #define in oski_Tld.h is indeed incorrect, but would only affect you if you directly included 'oski/oski_Tld.h' rather than including 'oski/oski.h'.
--rich
And to answer your question explicitly: yes, it sounds like you are doing everything correctly. :-)
--rich
Rich,
thanks for the response. Trying to pin the problem down, I cross-checked xforms.c and the debug output and I noticed that the reason of failure is that id_CSR != A_source->mattype_id. I don't know what exactly id_CSR represents internally, but I hope this will help. Anyway, I am now trying an int-double configuration to check if it 'll work for me.
Thanks,
Bill
Bill,
Thanks. I've updated the bug tracker with the additional information.
Can you look in your OSKI install tree, and send post a copy of INSTALL/lib/oski/profile_BCSR_MatMult_Tld.dat? This file is performance data collected for various values of r x c, collected during installation. The benchmark that collects this data uses the OSKI-Lua method of specifying the transform, so a bug should show up there as well.
I'm building a long-double implementation to try to reproduce your error now.
Best,
--rich
Hi Rich,
this profile file does not seem to have any problem. I am listing it at the end. I have also tried the INSTALL/bin/oskibench_Tld tool and this also worked fine. So I guess the problem may be somewhere else, probably in the way I create the CSR matrix, but I cannot see anything wrong with it. I use the following code
if ( (A_tunable = oski_CreateMatCSR(our_csr_mat->row_ptr,
our_csr_mat->col_ind,
our_csr_mat->values,
nrows, ncols, SHARE_INPUTMAT,
1, INDEX_ZERO_BASED)) == INVALID_MAT)
err_quit("%s: oski could not create matrix", argv[0]);
where `row_ptr', `col_ind' are of type (long *) and `values' is a (double *). The actual call to `ApplyMatTransfomrs' is the following:
if (oski_ApplyMatTransforms(A_tunable,
"return BCSR(InputMat, 2, 2)") < 0)
err_quit("%s: oski: failed to apply requested transformation", argv[0]);
The listing of `profile_BCSR_MatMult_Tld.dat' follows:
1 1 1 436.661 3.01599 % return BCSR(InputMat, 1, 1)
1 2 1 605.674 3.90378 % return BCSR(InputMat, 1, 2)
1 3 1 678.145 4.20664 % return BCSR(InputMat, 1, 3)
1 4 1 670.084 4.41673 % return BCSR(InputMat, 1, 4)
1 5 1 730.678 4.61467 % return BCSR(InputMat, 1, 5)
1 6 1 743.448 4.67882 % return BCSR(InputMat, 1, 6)
1 7 1 724.571 4.72543 % return BCSR(InputMat, 1, 7)
1 8 1 765.086 5.03173 % return BCSR(InputMat, 1, 8)
2 1 1 638.467 3.93535 % return BCSR(InputMat, 2, 1)
2 2 1 766.978 4.41937 % return BCSR(InputMat, 2, 2)
2 3 1 798.367 4.67303 % return BCSR(InputMat, 2, 3)
2 4 1 825.44 5.04131 % return BCSR(InputMat, 2, 4)
2 5 1 863.385 4.87774 % return BCSR(InputMat, 2, 5)
2 6 1 888.521 5.09294 % return BCSR(InputMat, 2, 6)
2 7 1 882.956 4.95042 % return BCSR(InputMat, 2, 7)
2 8 1 910.208 5.11592 % return BCSR(InputMat, 2, 8)
3 1 1 730.016 4.23627 % return BCSR(InputMat, 3, 1)
3 2 1 812.436 4.66402 % return BCSR(InputMat, 3, 2)
3 3 1 879.748 4.84125 % return BCSR(InputMat, 3, 3)
3 4 1 860.362 5.08924 % return BCSR(InputMat, 3, 4)
3 5 1 902.668 4.97219 % return BCSR(InputMat, 3, 5)
3 6 1 908.561 5.01906 % return BCSR(InputMat, 3, 6)
3 7 1 900.235 5.04882 % return BCSR(InputMat, 3, 7)
3 8 1 884.109 5.1394 % return BCSR(InputMat, 3, 8)
4 1 1 773.39 4.39934 % return BCSR(InputMat, 4, 1)
4 2 1 872.191 5.04416 % return BCSR(InputMat, 4, 2)
4 3 1 899.612 5.08046 % return BCSR(InputMat, 4, 3)
4 4 1 920.116 5.11199 % return BCSR(InputMat, 4, 4)
4 5 1 897.798 5.12059 % return BCSR(InputMat, 4, 5)
4 6 1 912.994 5.12521 % return BCSR(InputMat, 4, 6)
4 7 1 886.405 5.14377 % return BCSR(InputMat, 4, 7)
4 8 1 904.503 5.13628 % return BCSR(InputMat, 4, 8)
5 1 1 807.244 4.6031 % return BCSR(InputMat, 5, 1)
5 2 1 884.249 4.87284 % return BCSR(InputMat, 5, 2)
5 3 1 904.588 4.95949 % return BCSR(InputMat, 5, 3)
5 4 1 920.669 5.12618 % return BCSR(InputMat, 5, 4)
5 5 1 894.971 5.07709 % return BCSR(InputMat, 5, 5)
5 6 1 874.475 5.07707 % return BCSR(InputMat, 5, 6)
5 7 1 866.886 5.08637 % return BCSR(InputMat, 5, 7)
5 8 1 827.682 5.14615 % return BCSR(InputMat, 5, 8)
6 1 1 826.386 4.64009 % return BCSR(InputMat, 6, 1)
6 2 1 904.642 5.08055 % return BCSR(InputMat, 6, 2)
6 3 1 917.285 5.0098 % return BCSR(InputMat, 6, 3)
6 4 1 915.172 5.1371 % return BCSR(InputMat, 6, 4)
6 5 1 876.322 5.08727 % return BCSR(InputMat, 6, 5)
6 6 1 857.539 5.14094 % return BCSR(InputMat, 6, 6)
6 7 1 791.687 5.09888 % return BCSR(InputMat, 6, 7)
6 8 1 739.925 5.1402 % return BCSR(InputMat, 6, 8)
7 1 1 848.579 4.70915 % return BCSR(InputMat, 7, 1)
7 2 1 907.052 4.95284 % return BCSR(InputMat, 7, 2)
7 3 1 903.929 5.02816 % return BCSR(InputMat, 7, 3)
7 4 1 884.903 5.13718 % return BCSR(InputMat, 7, 4)
7 5 1 855.242 5.08353 % return BCSR(InputMat, 7, 5)
7 6 1 780.819 5.09437 % return BCSR(InputMat, 7, 6)
7 7 1 751.268 5.10494 % return BCSR(InputMat, 7, 7)
7 8 1 757.866 5.14815 % return BCSR(InputMat, 7, 8)
8 1 1 864.017 5.0099 % return BCSR(InputMat, 8, 1)
8 2 1 912.224 5.10747 % return BCSR(InputMat, 8, 2)
8 3 1 909.113 5.12999 % return BCSR(InputMat, 8, 3)
8 4 1 900.961 5.1159 % return BCSR(InputMat, 8, 4)
8 5 1 751.998 5.13436 % return BCSR(InputMat, 8, 5)
8 6 1 747.763 5.13044 % return BCSR(InputMat, 8, 6)
8 7 1 746.823 5.13181 % return BCSR(InputMat, 8, 7)
8 8 1 701.799 5.14491 % return BCSR(InputMat, 8, 8)
Best,
Bill
Bill,
I think I understand the problem, and can suggest a possible workaround. Basically, the OSKI headers are broken when you use the non-default int-double types, and they are broken through the latest version, 1.0.1g. To verify the issue, can you do the following?
First, compile your source file with all warnings enabled (in gcc/icc, with the '-Wall' flag). You should some type-mismatch warnings when compiling the source file that calls oski_CreateMatCSR.
Secondly, run
nm YOUR-OBJ.o | grep oski_CreateMatCSR
on the object file containing the call to oski_CreateMatCSR. I suspect it will refer to oski_CreateMatCSR_Tid, rather than the desired xxx_Tld.
I'm fixing the issue and will update you. In the meantime, if you are in a hurry, please try the following (possible) workaround: re-run the 'configure' step with the additional flag
--with-index-binding=long
Doing so should modify 'oski.h' so that 'oski_index_t' and all other calls bind to 'long' by default, rather than to 'int'. You'll then have to re-build and re-install (sorry).
--rich
Hi Rich,
I already use -Wall and I don't get any type mismatch warning. Running `nm', everything is linked to its `_Tld' version; `nm oski-tune-static | grep -e '.Tid'` yields nothing, so no `_Tid' version is it used anywhere. I will try the change in the configuration and I 'll keep you updated.
Thanx,
Bill
Bill,
Thanks for your help and patience on this bug. So far, I have not been able to reproduce your error exactly. I did verify and fix the broken headers you reported, which is what was causing my errors (and which "-Wall" would have caught). I will release these changes in a day or two as version 1.0.1h.
The only other suggestion I can offer at this point is to try 1.0.1g instead of 1.0.1b, or wait a day or two for 1.0.1h. The post-1.0.1b versions include link-related fixes for Mac OS X, and may as an unintended side-effect resolve your problem as well.
But please keep letting me know how things go for you, as I'd like to fix this ASAP!
--rich
Rich,
I've just checked the int-double impl and again unfortunately no progress. I checked a dense matrix in csr storage and the raefsky3 from Tim Davis' collection, and I asked for a DENSE and BCSR optimization, respectively. I got exactly the same errors as in the long-double conf.
Bill
Bill,
FYI, I posted 1.0.1h, which at least fixes the header file bug you reported before. Otherwise, I am not able to reproduce the bug you're experiencing, though I will revisit this in a few days.
Thanks,
--rich
Hi Rich,
thanks a lot for your info and interest. Trying to come around the problem, I found some code in `$(DNLD_DIR)/tests' that used a set of utility functions to read in a HB matrix. I adapted it to my needs and linked to oski_util_Tld and that worked fine for me. As a last hint that may help you reproduce my error (you may have already tried that), just allocate and fill three arrays, row_ptr, col_ind, and values, that will constitute a valid CSR format and pass it to oski_createMatCSR; then try oski_applyMatTrans onto the oski returned tunable array.
Thanks a lot,
Bill
PS: It would also be nice if you could document the utility functions in oski_util library in a subsequent version.
Bill,
I've been using the program in the 'examples' subdirectory of OSKI, modified to use 'long' and to include 'oski/oski_Tld.h'. This seems to work OK for me.
One thing I forgot to ask: Are you calling 'oski_Init()' before running any of the other OSKI routines? I assume you are, but it's one other thing to check.
I'm looking to phase out the 'util' stuff, as one of my colleagues is developing an independent C library, the sparse_matrix_converter, with the much of the same functionality but a cleaner implementation. It includes a more robust Harwell-Boeing reader. See bebop.cs.berkeley.edu/smc for details.
Best,
--rich
Hi, again!
I am trying to apply the VBR transformation on an input matrix using the same example as that found in the OSKI design document, Section 5.2 ("A complex splitting example") and I am getting an error. I am actually running the following:
./oski-tune-static -x 'T = VBR(InputMat); A1, A_leftover = T.extract_blocks(4,2); T = VBR(A_leftover); A2, A3 = T.extract_blocks(2,2); return A1 + A2 + A3;' matrix
And I'm getting the following error:
***********************************************************
* OSKI Error -19 : Could not transform data structure
* Occurred at/near '/home/bkk/sw/oski-1.0.1h/src/xforms.c', line 834.
Additional information:
oski_ApplyMatTransforms_Tld(): '[string "T = VBR(InputMat); A1, A_leftover = T.extra..."]:1: attempt to call field `extract_blocks' (a nil value)'
**********************************************************
It seems to me as if OSKI-Lua cannot find the `extract_blocks' method. I have already verified that my program reads correctly the argument of `-x' option and passes it to `oski_ApplyMatTransforms'.
Any help? Thanks.
Some technical info about my build follow.
OSKI version: oski-1.0.1h
environment: CC='gcc-4.1', CFLAGS='-O3 -funroll-all-loops -g'
configuration: --disable-int-double, --enable-long-double, --with-index-binding=long, --with-value-binding=double
Bill,
Nice to hear from you again, though sorry it is in this context. :-)
This particular feature had been disable, because I hadn't generalized the existing VBR code to work with anything other than int-doubles. (It's disabled for int-doubles as well.) How urgently do you need it?
--rich
Hi Rich, that's not urgent, I was just experimenting with some new methods, so I wanted to try VBR as well, but it's ok.
Thanks,
Bill