bugGNU Octave - Bugs: bug #37247, error:...

 
 

bug #37247: error: octave_base_value::array_value(): wrong type argument `complex matrix'

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Sat 01 Sep 2012 01:35:04 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Michael GodfreyOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 06 Sep 2012 02:08:27 PM UTC, comment #4:

Thanks for the prompt fix! I had forgotten that
the length test was that high, but of course that
makes sense.

Which reminds me: the documentation including things
like this will be needed soon!

And, thatnks again for this important contribution.

Michael

Michael Godfrey <godfrey>
Project Member
Thu 06 Sep 2012 08:21:16 AM UTC, comment #3:

Failing for long vectors would make sense, as JIT is only enabled when the number of iterations in a loop exceeds 1000. (this helps hide compiler overhead)

The issue was the type check has erroneously returned a real matrix type when given a complex matrix.

Fixed as of de9bfcf637df
http://hg.savannah.gnu.org/hgweb/octave/rev/de9bfcf637df

Max Brister <fisheater>
Project Member
Sat 01 Sep 2012 03:23:50 PM UTC, comment #2:

One addition:

The statement that sets DCK is:
DCK = exp(complex(0, pi*AF));
The error occurs if AF=0,
and therefore DCK is real, DCK=1. If AF != 0 the loop
executes without error.

APC = DCK;
for K = 1:NT6;
DC(K,1) = DT(K)*APC;
APC = APC*DCK;
endfor;

Michael Godfrey <godfrey>
Project Member
Sat 01 Sep 2012 01:39:19 PM UTC, comment #1:

I forgot to mention explicitly that the same devel system
compiled with JIT disabled works correctly.

Michael Godfrey <godfrey>
Project Member
Sat 01 Sep 2012 01:35:04 PM UTC, original submission:

This error:
error: octave_base_value::array_value(): wrong type argument `complex matrix'
happens if I use "large" vectors in some signal processing code that I am developing. For short vectors, the code runs correctly. The back trace points to line 40:

for K = 1:NT6; <= line 40
DC(K,1) = DT(K)*APC;
APC = APC*DCK;
endfor;

(NT6 = 1020)

This is with the devel system as on 31 August.
[pbdsl3:octave] hg tip
changeset: 15270:6615a46d90ec
tag: tip
user: Rik <rik@octave.org>
date: Thu Aug 30 20:29:37 2012 -0700
summary: Fix which() reporting incorrect directory for functions in libinterp.

By large vectors, I mean length of about 1000. Many of the vectors are complex. But, the above are all real.
If I use vectors of length around 100 there is no error
and results are correct.

By the way, as you can see, this code is very non-optimized.
It was "translated" from Fortran. I am just starting on
optimizing it.

Michael Godfrey <godfrey>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by fisheater (Posted a comment)
  • -unavailable- added by godfrey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 06 Sep 2012 08:21:59 AM UTCfisheaterOpen/ClosedOpen=>Closed
    Thu 06 Sep 2012 08:21:16 AM UTCfisheaterStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1