Polyfit crashes octave 3.0.0

Ben Abbott bpabbott at mac.com
Thu Apr 10 09:10:16 CDT 2008


On Thursday, April 10, 2008, at 08:51AM, "Sergei Steshenko" <sergstesh at yahoo.com> wrote:
>
>--- Ben Abbott <bpabbott at mac.com> wrote:
>
>> 
>> On Apr 10, 2008, at 8:02 AM, Sergei Steshenko wrote:
>> >
>> > --- Ben Abbott <bpabbott at mac.com> wrote:
>> >
>> >>
>> >> On Apr 10, 2008, at 3:19 AM, Jaroslaw Pychowski wrote:
>> >>> --------
>> >>> Bug report for Octave 3.0.0 configured for i486-pc-linux-gnu
>> >>>
>> >>> Description:
>> >>> -----------
>> >>>
>> >>> Function polyfit causes segmentation fault.
>> >>> 51 is minimal affected value of n (see code below)
>> >>> Messages emitted before segmentation fault:
>> >>> octave:5> wn=polyfit(x,y,n);
>> >>> warning: matrix singular to machine precision, rcond = 1.83429e-25
>> >>> warning: attempting to find minimum norm solution
>> >>> panic: Segmentation fault -- stopping myself...
>> >>> attempting to save variables to `octave-core'...
>> >>> save to `octave-core' complete
>> >>> Segmentation fault
>> >>>
>> >>> Repeat-By:
>> >>> ---------
>> >>> n=51
>> >>> step=2/n;
>> >>> x=-1:step:1;
>> >>> y=abs(5*x);
>> >>> wn=polyfit(x,y,n);
>> >>
>> >> I'm replying to report the results on Mac OSX.
>> >>
>> >> On Mac OSX 10.5.2 with gfortran 4.3 and Apple's vecLib the results  
>> >> for
>> >> each of the mercurial branches are below.
>> >>
>> >> branch: release-3-0-x
>> >>
>> >> octave:6> n=51;
>> >> octave:7> step=2/n;
>> >> octave:8> x=-1:step:1;
>> >> octave:9> y=abs(5*x);
>> >> octave:10> wn=polyfit(x,y,n);
>> >> warning: matrix singular to machine precision, rcond = 1.83428e-25
>> >> warning: attempting to find minimum norm solution
>> >> warning: dgelsd: rank deficient 52x52 matrix, rank = 42
>> >>
>> >> branch: default
>> >>
>> >> octave:5> n=51;
>> >> octave:6> step=2/n;
>> >> octave:7> x=-1:step:1;
>> >> octave:8> y=abs(5*x);
>> >> octave:9> wn=polyfit(x,y,n);
>> >> octave:10>
>> >>
>> >> The default branch uses QR decomposition. The 3-0-x release uses left
>> >> divide, but neither gives a seg-fault for me.
>> >>
>> >> Ben
>> >>
>> >> _______________________________________________
>> >> Bug-octave mailing list
>> >> Bug-octave at octave.org
>> >> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>> >>
>> >
>> > Segfaults in my case:
>> >
>> > "
>> > GNU Octave, version 3.0.0
>> > Copyright (C) 2007 John W. Eaton and others.
>> > This is free software; see the source code for copying conditions.
>> > There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
>> > FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.
>> >
>> > Octave was configured for "i686-pc-linux-gnu".
>> >
>> > Additional information about Octave is available at http://www.octave.org 
>> > .
>> >
>> > Please contribute if you find this software useful.
>> > For more information, visit http://www.octave.org/help-wanted.html
>> >
>> > Report bugs to <bug at octave.org> (but first, please read
>> > http://www.octave.org/bugs.html to learn how to write a helpful  
>> > report).
>> >
>> > For information about changes from previous versions, type `news'.
>> >
>> > octave:1> n=51
>> > n =  51
>> > octave:2> step=2/n;
>> > octave:3> x=-1:step:1;
>> > octave:4> y=abs(5*x);
>> > octave:5> wn=polyfit(x,y,n);
>> > warning: matrix singular to machine precision, rcond = 1.83429e-25
>> > warning: attempting to find minimum norm solution
>> > panic: Segmentation fault -- stopping myself...
>> > attempting to save variables to `octave-core'...
>> > save to `octave-core' complete
>> > ".
>> >
>> > Built by myself 'octave', built built by myself gcc-4.2.3, but other  
>> > than that SUSE 10.2
>> >
>> > Regards,
>> >  Sergei.
>> 
>> Sergei,
>> 
>> Did you build from the original 3.0.0 release, or from the mercurial  
>> sources. ... and did you build using gfortran, if so what version?
>> 
>> I ask because, jwe had made some recent modifications that resolved  
>> similar problem on Mac OSX when Octave was built with gfortran 4.3 and  
>> used Apples lapack/blas ... actually I shouldn't say "problem" because  
>> as one was resolved, yet another was revealed.
>> 
>> In any event, my problem(s) were resolved by John in Mar 19. See the  
>> thread below.
>> 
>> 	http://www.nabble.com/failed-build-with-current-mercurial-sources-tt15896284.html#a15944481
>> 
>> It may be that this particular problem is related.
>> 
>> Ben
>> 
>> 
>> 
>
>Ben, I built from the officially released 3.0.0 - not from HG sources; gfortran is the one coming
>with gcc-4.2.3.
>
>What else - I'm using atlas-3.8.1.
>
>Regards,
>  Sergei.

John will soon be releasing an update to 3.0. 

A prerelease version of 3.0.1 is linked to below.  Please try building 3.0.1b and let us know if the problem persists.

  http://jbrwww.che.wisc.edu/home/jwe/octave-3.0.1b.tar.bz2

Ben





More information about the Bug-octave mailing list