help-octave
[Top][All Lists]
Advanced

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

reliable seg fault


From: Mike Miller
Subject: reliable seg fault
Date: Mon, 24 Oct 2011 02:08:45 -0500 (CDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

This is a crazy problem. At first I thought it was caused by corrcoef(), then I realized that corrcoef() is using cov() and I found that cov() was also seg faulting. Then I looked at cov and saw the inner product and discovered that the inner product was seg faulting. So, basically, matrix multiplication is causing seg faults, but it depends strongly on the size of the matrix.

This has to be caused by some problem with the way Octave was compiled or installed by my sys admin, don't you think? This is what I'm running:

GNU Octave, version 3.2.3
Linux snps.psych.umn.edu 2.6.18-194.11.4.el5 #1 SMP Tue Sep 21 05:04:09 EDT 
2010 x86_64 x86_64 x86_64 GNU/Linux
CentOS release 5.5 (Final)

I'll talk to our sysadmin about recompiling Octave, but I thought I'd ask here in case any of you have an idea about where things might have gone wrong. Examples:

octave:1> n=180; p=39; X=ones(n,p); X'*X;

  [no problem with the one above but the following one seg faults]

octave:2> n=181; p=39; X=ones(n,p); X'*X;
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Segmentation fault

That is, when there are 39 columns, a matrix "X" with fewer than 181 rows is ok, but with 181 or more rows it seg faults when I attempt X'*X.

With 38 columns, I'm still OK with 100,000 rows.
With 39 columns it fails at 181 rows.
With 40 columns it fails at 83 rows.
With 41 columns it fails at 79 rows.
With 42 columns it fails at 76 rows.
With 43 columns it fails at 72 rows.
With 44 columns it fails at 69 rows.
With 70 columns it fails at 40 rows.
With 100 columns it fails at 40 rows.

With 39 *rows* I can do at least 10,000 columns.

With 40 *rows* it fails at 58 columns.

So the seg faults occur only if BOTH rows>39 AND cols>38, and the more rows there are, the fewer columns can be supported.

I'm guessing the problem is with libraries or with LAPACK or ATLAS.

Mike


reply via email to

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