octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #36656] deleting rows from sparse matrices lea


From: anonymous
Subject: [Octave-bug-tracker] [bug #36656] deleting rows from sparse matrices leads to seg fault sometimes
Date: Thu, 14 Jun 2012 13:26:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5

URL:
  <http://savannah.gnu.org/bugs/?36656>

                 Summary: deleting rows from sparse matrices leads to seg
fault sometimes
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 14 Jun 2012 01:26:09 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: Lev
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

I have a code (using octave 3.6.1) by which one can debug it in depth.

call it as

supportThreshold( 3,10, sparse(rand(1000,1000)>0.99) );

it will segfault.
If you have doubt, you may load a constellation by uncommenting the load
function call
and download aa.dat from http://justpaste.it/octaveSegfault
or find it attached.

Here is the function:

function uis = supportThreshold( userMinSupport , itemMinSupport , uis )
% load aa.dat
   for i=1:10
       s=size(uis)

       user_event_count = sum(uis,2);
       inx=find(user_event_count<userMinSupport);
       length(inx)
       uis(inx,:)=[];

       item_event_count = sum(uis);
       inx = find(item_event_count&lt;itemMinSupport);
       length(inx)
       uis(:,inx)=[];

       if all(s==size(uis))
           break;
       endif
   end
end

What I see is that.
Octave is trying to delete all lines from the sparse matrix  at
uis(inx,:)=[]; which works perfectly when executed interactively however
doesn't work in a cycle above.

And idea?
Cheers,
Lev



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 14 Jun 2012 01:26:09 PM UTC  Name: aa.dat  Size: 97kB   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=26028>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36656>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]