User:Andy1978: Difference between revisions

From Octave
Jump to navigation Jump to search
Line 15: Line 15:
   ./scripts/polynomial/private/__splinefit__.m:190:%  constr.yc  y-values (prod(dim) x nx)
   ./scripts/polynomial/private/__splinefit__.m:190:%  constr.yc  y-values (prod(dim) x nx)


* Add swisdom (single) to /libinterp/dldfcn/fftw.cc documentation
  **** chol2inv anstatt spchol2inv ****
  ./liboctave/numeric/SparsedbleCHOL.cc:64:          ("spchol2inv requires triangular matrix");
  ./liboctave/numeric/SparsedbleCHOL.cc:67:    (*current_liboctave_error_handler) ("spchol2inv requires square matrix");
  ./liboctave/numeric/SparseCmplxCHOL.cc:64:          ("spchol2inv requires triangular matrix");
  ./liboctave/numeric/SparseCmplxCHOL.cc:67:    (*current_liboctave_error_handler) ("spchol2inv requires square matrix");
* Add swisdom (single prec.) to /libinterp/dldfcn/fftw.cc documentation


=== Forge ===
=== Forge ===

Revision as of 19:49, 15 September 2013

ToDo

Core

 References to removed funktions
 betai:
 ./scripts/statistics/tests/manova.m:37:## (Currently NOT because the fcdf respectively betai code is too bad.)
 
 values: http://hg.savannah.gnu.org/hgweb/octave/file/937035390ec0/scripts/deprecated/values.m
 ./scripts/polynomial/private/__splinefit__.m:66:%       'yc', y-values (vector or ND array)
 ./scripts/polynomial/private/__splinefit__.m:182:%   y           Noisy data y-values (prod(dim) x mx)
 ./scripts/polynomial/private/__splinefit__.m:190:%   constr.yc   y-values (prod(dim) x nx)
 **** chol2inv anstatt spchol2inv ****
 ./liboctave/numeric/SparsedbleCHOL.cc:64:          ("spchol2inv requires triangular matrix");
 ./liboctave/numeric/SparsedbleCHOL.cc:67:    (*current_liboctave_error_handler) ("spchol2inv requires square matrix");
 ./liboctave/numeric/SparseCmplxCHOL.cc:64:          ("spchol2inv requires triangular matrix");
 ./liboctave/numeric/SparseCmplxCHOL.cc:67:    (*current_liboctave_error_handler) ("spchol2inv requires square matrix");
  • Add swisdom (single prec.) to /libinterp/dldfcn/fftw.cc documentation

Forge

signal

  • findpeaks.m, print error if data is not a column vector (error: vertical dimensions mismatch (1x10000 vs 1x1)

FAQ for windows user

octave-forge packages on windows

You should follow the README for the binary octave bundle, for example http://wiki.octave.org/Octave_for_Windows#Octave-3.6.4-mingw_.2B_octaveforge_pkgs

The additional forge-pkgs (ex. Octave3.6.4_gcc4.6.2_pkgs_20130331.7z) contains the already compiled packages for the specific (Octave-3.6.4) version.

Normally windows users can't just install octave forge packages with

 pkg install package

or

 pkg install -forge package

because their system lacks a build system with autotools, make, c++ compiler etc.

image

  • implement SURF, integralImage is cumsum(cumsum(a,1),2)
corner/cornermetric, harris

First post on mailing list in 12.01.2013 http://octave.1599824.n4.nabble.com/corner-cornermetric-equivalent-in-octave-td4648802.html

brainstorming

Snippets

chain matrix multiplication

a=[1 2; 3 4];
b=[4 2; 8 1];
c=[2 3; 1 -1];
m=cat(3,a,b,c);
s=cell(3,1);
s{1}=a;s{2}=b; s{3}=c;
a*b*c
s{1}*s{2}*s{3}
mtimes(num2cell(m,[1,2]){:})
mtimes(s{:})

Tracking octave bugs with hg bisect

I had a strange problem when loading gzip compressed ascii files in octave. It failed dependent on the integer values. After some stripping I made a minimalistic test script (min_testcase_fails.m) which always fails in a current dev (88616c872933):

fn="file2.txt"
fid = fopen (fn,"w");
fprintf(fid, "%i %i %i %i\n",639, 25, 160, 978160);
fprintf(fid, "%i %i %i %i\n",687, 25, 171, 978160);
fprintf(fid, "%i %i %i %i\n",663, 31, 173, 978161);
fprintf(fid, "%i %i %i %i\n",663, 15, 154, 978161);
fprintf(fid, "%i %i %i %i\n",655, 21, 151, 978161);
fclose(fid);
## gzip it!
fn_gz=strcat(fn, ".gz");
cmd=cstrcat("gzip ",fn," -c > ",fn_gz)
system(cmd);
c=load("file2.txt.gz")  #this fails in newer versions

When run:

$ octave -q min_testcase_fails.m 
fn = file2.txt
cmd = gzip file2.txt -c > file2.txt.gz
error: value on right hand side of assignment is undefined
error: called from:
error:   /home/andy/src/octave-bugs/min_testcase_fails.m at line 17, column 2

If line 4 with "663, 15, 154, 978161" is changed to ""663, 16, 154, 978161", load works as expected. Strange, isn't it? I also had an old build (dev ab1c6e6d1be6 from Sun Oct 28 21:48:02 2012) and "load" worked in this version.

Running bisect

I decided to make a fresh clone in a separate directory:

cd ~/src
hg clone http://www.octave.org/hg/octave octave-src
cd octave-src
hg bisect -b 88616c872933
hg bisect -g ab1c6e6d1be6

After this hg bisect uses a binary search strategy to test revisions:

Teste Änderungssatz 16428:f016a5342e19 (1380 Änderungssätze verbleiben, ~10 Tests)

So after checkout I had to compile the source tree (used ccache in the hope of faster checkout-compile cycles).

./bootstrap
cd .. && mkdir octave-build && cd octave-build
export CXX="ccache g++"
export CC="ccache gcc"
../octave-src/configure
make -j 7

After compilation I tried my test min_testcase_fails.m:

~/src/octave-build$ ./run-octave -q ../min_testcase_fails.m
fn = file2.txt
cmd = gzip file2.txt -c > file2.txt.gz
c =

      639       25      160   978160
      687       25      171   978160
      663       31      173   978161
      663       15      154   978161
      655       21      151   978161

So this is apparently a good one. Tell it hg bisect!

cd ../octave-src && hg bisect -g

After this you try make again, bootstrap && configure if make fails, rerun the testscript, tell hg bisect if it's good or bad and repeat this until the revision which introduced the problem is found. Or you can use "hg bisect --command", see next point.

hg bisect --command

I used Jordis bisect script for bug 32818 and modified it to my needs:

~/src$ cat bisect-loadsave.sh 
#!/bin/bash
SRCDIR=~/src/octave-src
BUILDDIR=~/src/octave-build
cd $SRCDIR
## Try a simple build first
if  ! make -j 7
then
   cd $SRCDIR
   ./bootstrap || exit 127
   #rm -rf $BUILDDIR
   #mkdir $BUILDDIR
   cd $BUILDDIR
   $SRCDIR/configure || exit 127
   make -j 7|| exit 127
fi
$BUILDDIR/run-octave -q ~/src/min_testcase_fails.m || exit 1
exit 0

After making it executable, let hg bisect use it

~/src/octave-src$ hg bisect -c ../bisect-loadsave.sh

Now sit back and relax, this could last some hours... Finally:

Änderungssatz 16554:03a28487fa9d: good
Die erste fehlerhafte Revision ist:
Änderung:        16555:04fb96f4bea1
Nutzer:          John W. Eaton <jwe@octave.org>
Datum:           Tue Apr 23 12:57:16 2013 -0400
Zusammenfassung: allow double-click in file browser to load data files