On 12 Nov 2011, at 14:17, Michele Martone wrote:

> On 20111108@15:41, Michele Martone wrote:
>> On 20111108@15:12, Carlo de Falco wrote:
>>> ... 
>>> There is an example of the correct way to create a new octave matrix class 
>>> in the package "triangular":
>>> http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/extra/triangular/
>> OK I'll check it out to see if there is something I've missed in
>> "sparsersb".
>> ...  
> 
> Hi Carlo,
> 
> I've looked at the "triangular" example.
> So, from the .texi and .cc files by myself, I've learned:
> 
> - the need for using mlock() in the oct-file (commit'ed the change)
> - that the 'triangular' example does not fit completely to sparsersb:
>    class octave_triangular_matrix extends class octave_matrix, while
>    class octave_sparse_rsb_matrix extends class octave_sparse_matrix
>  - subsref, subsasgn, dotref are unfinished in sparsersb
>  - the 'print(std::ostream&...' method is incomplete: is this method
>    the one ensuring the cool output paging capability in Octave ? 
>  - assignments, conversions: these are important but a bit obscure to
>    me now; however there is no hurry with them I would say, as they
>    are not in the "critical" features list one would expect from
>    sparsersb ;
> 
> Since I would prefer to follow a principle of caution, I would not
> implement the mentioned missing features, until I get positive responses
> (so, octave-dev's peple help is critical here) about current sparsersb's
> stability, error reporting, robustness for installation and (shared
> memory parallel, optimized) core operations (e.g.: matrix creation,
> multiplication, triangular solution).
> 
> m.

Hi, 

I'm starting to have a look at your package, first of all I'm trying to have it 
install
properly with "pkg install" I'll report problems and suggestions along the way.

1) Once you release the package the configure script must be included with it 
as "pkg.m"
will not run autogen.sh by itself

2) I get an annoying warning for "restrict" being redefined as it is already in 
some octave header, 
the following change to "rsb.h" avoids it

$ diff -u rsb.h /opt/librsb/include/rsb.h 
--- rsb.h       2011-11-12 17:25:55.000000000 +0100
+++ /opt/librsb/include/rsb.h   2011-11-12 17:23:42.000000000 +0100
@@ -229,7 +229,9 @@
 extern "C" {
 #endif
 #ifdef __cplusplus
+#ifndef restrict
 #define restrict       /* for now, the restrict keyword is not allowed in C++ 
*/
+#endif
 #endif  /* __cplusplus */
 
 #include <stdlib.h>    /* size_t */

3) I see there are lots of testing .m files in the src directory, the standard 
way of including
test for Octave functions is to add them within the source code as explained 
here:

http://www.gnu.org/software/octave/doc/interpreter/Test-Functions.html#Test-Functions
http://www.gnu.org/software/octave/doc/interpreter/Documentation-and-Test-of-Oct_002dFiles.html#Documentation-and-Test-of-Oct_002dFiles

This will also avoid errors with the doc-cache generator complaining for 
missing help strings in the .m scripts

4) The following line won't work:

// PKG_ADD: autoload (RSBOI_FNS, RSBOI_FNS".oct");

This is because the preprocessor will not expand macros in comments (at least 
on my system, OSX 10.6 + gcc-4.2.1 + Octave 3.5.0+), 
so octave will try to execute the command verbatim and report a syntax error.
Actually I'd recommend avoiding autoload alltogether to prevent the problem 
described in this thread:

http://octave.1599824.n4.nabble.com/reverse-of-autoload-tp1635126p1635126.html

5) You should not break lines in the "DESCRIPTION" file, sor they won't get 
parsed correctly,
so I'd recommend removing the newline in the "Description: " or just shortening 
the text to one line only:
"Description: Interface to the librsb package implementing the RSB sparse 
matrix format. " sounds informative enough.

6) You need to fill-in your INDEX file if you want Octave to properly build 
html docs, attached is an example "INDEX" fle

7) with a few changes I can get the sparsersb to install cleanly, but I get a 
bus-error when I try to use it:

a =

  -1.214470   1.014121  -0.565035
   0.372437   0.935208  -0.849173
  -0.260013   0.085202  -0.362010

>> ss = sparsersb (a)
Checking environment RSB_USER_SET_MEM_HIERARCHY_INFO variable.
Checking hardcoded RSB_USER_SET_MEM_HIERARCHY_INFO symbol
Checking hardcoded RSB_DETECTED_MEM_HIERARCHY_INFO symbol
Available memory hierarchy info string: ""
ERROR 0xffffe000 : Memory hierarchy info failed to be detected. You can bypass 
this by setting a meaningful RSB_USER_SET_MEM_HIERARCHY_INFO environment 
variable.
ERROR 0xffffe000 : Memory hierarchy info failed to be detected. You can bypass 
this by setting a meaningful RSB_USER_SET_MEM_HIERARCHY_INFO environment 
variable.
ERROR 0xffffe000 : Memory hierarchy info failed to be detected. You can bypass 
this by setting a meaningful RSB_USER_SET_MEM_HIERARCHY_INFO environment 
variable.
panic: Bus error -- stopping myself...
Bus error 

I guess this is a problem with my librsb installation? any suggestion how to 
fix it?

HTH,
c.

Attachment: INDEX
Description: Binary data



------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to