On 20111112@18:43, Carlo de Falco wrote: > 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". > >> ... > > > .. > > 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. Hi Carlo,
thank you for the "complete" report. > 1) Once you release the package the configure script must be included with it > as "pkg.m" > will not run autogen.sh by itself I'm not yet used to pkg.m, for now. You mean that 'configure' shall be distributed in the package .tgz archive ? > 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 */ Ok this will be fixed in the next librsb tarball. > ... [I'll have to inform first; then I'll respond separately to 3-5] > ... > 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. Ok, done. > 6) You need to fill-in your INDEX file if you want Octave to properly build > html docs, attached is an example "INDEX" fle Ok, done (used the attached "INDEX" file). However, I'm not sure about the reason for having the "istri" in sparsersb.cc; I think it's in sparsersb.cc as a leftover from the "uppertri" example which I've used originally to write sparsersb.cc. It's not referenced/used directly in sparsersb.cc, but I don't know if there is some other semantics behind it: do you think I should remove it ? > 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? In order to work "properly", librsb wants to know some reasonable value for L2 (or, say, "per core") cache size. To fine tune its operation, this is essential (see papers/thesis). However, the absolute priority is to have some reasonable value at all for it. I preferred not to stick to any hardcoded value, unless configured. I've never programmed for OSX 10.6, so I ignore the best, yet simple way to learn the cache memory hierarchy information on that platform. I wanted the library user to have flexibility, so there are plenty of ways for discovering/supplying this information to the library (configure time, rsb_init() time, environment variable). If you ./configure'd the library without setting it explicitly, it may be the case that it's OSX-related. Could you please attach the output of `rsbench -I' ? ('rsbench' is the librsb default benchmark executable). See attachment for example output on my workstation.
detected max available cores/threads : 2 detected max OpenMP procs : 2 detected max OpenMP procs : 2 detected 2 levels of cache L1 size: 32768 L2 size: 6291456 sysconf() : 4096 bytes per pagesize sysconf() : 829778 physical pages sysconf() : -896196608 bytes (3241 MB) of physical memory sysconf() : 334985 available (free) physical pages sysconf() : 1372098560 available (free) physical memory sysconf() , processors : 2 sysconf() , processors online : 2 sysconf() : level 1 cache size 32768 sysconf() : level 1 cache associativity 8 sysconf() : level 1 cache line size 64 sysconf() : level 2 cache size 6291456 sysconf() : level 2 cache associativity 24 sysconf() : level 2 cache line size 64 sysconf() : no level 3 cache sysconf() : no level 4 cache 8 bits per byte. Good. cache block size : 3145728 SHRT_MAX : 32767 SHRT_MIN : -32768 USHRT_MAX : 65535 INT_MIN : -2147483648 INT_MAX : 2147483647 UINT_MAX : 4294967295 LONG_MAX : 2147483647 LONG_MIN : -2147483648 ULONG_MAX : 4294967295 LLONG_MAX : 9223372036854775807 tatement -Wpointer-arith -Wstrict-prototypes memhinfo : L2:24/64/6M,L1:8/64/32K detected free memory : 1369939968 for array sized 6291456 elems, took 0.011699 s for linear search and 0 s for binary search for element 4194303, in 10 tries, f or a total of 0.118291 s (ignore this:83886060) for array sized 6291456 elems, took 0.00583196 s for linear search and 0 s for binary search for element 2097151, in 17 tries, for a total of 0.100134 s (ignore this:155189194) for array sized 6291456 elems, took 0.00282907 s for linear search and 0 s for binary search for element 1048575, in 36 tries, for a total of 0.102809 s (ignore this:230686594) for array sized 6291456 elems, took 0.00141096 s for linear search and 0 s for binary search for element 524287, in 71 tries, for a total of 0.100784 s (ignore this:305135348) for array sized 6291456 elems, took 0.000705957 s for linear search and 0 s for binary search for element 262143, in 141 tries , for a total of 0.100636 s (ignore this:379059674) for array sized 6291456 elems, took 0.000353813 s for linear search and 0 s for binary search for element 131071, in 280 tries , for a total of 0.100209 s (ignore this:452459434) for array sized 6291456 elems, took 0.000176907 s for linear search and 0 s for binary search for element 65535, in 558 tries, for a total of 0.100102 s (ignore this:525596494) for array sized 6291456 elems, took 8.89301e-05 s for linear search and 0 s for binary search for element 32767, in 1111 tries , for a total of 0.100079 s (ignore this:598404768) for array sized 6291456 elems, took 4.3869e-05 s for linear search and 0 s for binary search for element 16383, in 2199 tries, for a total of 0.100046 s (ignore this:670457202) for array sized 6291456 elems, took 2.19345e-05 s for linear search and 0 s for binary search for element 8191, in 4339 tries, for a total of 0.100003 s (ignore this:741538700) for array sized 6291456 elems, took 1.09673e-05 s for linear search and 0 s for binary search for element 4095, in 8408 tries, for a total of 0.100003 s (ignore this:810400220) for array sized 6291456 elems, took 4.76837e-06 s for linear search and 0 s for binary search for element 2047, in 15784 tries , for a total of 0.100005 s (ignore this:875019916) for array sized 6291456 elems, took 2.86102e-06 s for linear search and 0 s for binary search for element 1023, in 28418 tries , for a total of 0.100000 s (ignore this:933163144) for array sized 6291456 elems, took 9.53674e-07 s for linear search and 0 s for binary search for element 511, in 47348 tries, for a total of 0.100001 s (ignore this:981552800) for array sized 6291456 elems, took 0 s for linear search and 0 s for binary search for element 255, in 74301 tries, for a tot al of 0.100000 s (ignore this:1019446310) for array sized 6291456 elems, took 0 s for linear search and 0 s for binary search for element 127, in 89045 tries, for a tot al of 0.100000 s (ignore this:1042063740) for array sized 6291456 elems, took 0 s for linear search and 0 s for binary search for element 63, in 111163 tries, for a tot al of 0.100000 s (ignore this:1056070278) for array sized 6291456 elems, took 0 s for linear search and 0 s for binary search for element 31, in 120052 tries, for a tot al of 0.100000 s (ignore this:1063513502) for array sized 6291456 elems, took 0 s for linear search and 0 s for binary search for element 15, in 130178 tries, for a tot al of 0.100000 s (ignore this:1067418842) for array sized 6291456 elems, took 0 s for linear search and 0 s for binary search for element 7, in 129266 tries, for a tota l of 0.100000 s (ignore this:1069228566)
pgpx8lhvQMD1m.pgp
Description: PGP signature
------------------------------------------------------------------------------ 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