Thread Subject: MATLAB segmentation violation on matrix multiplication

Subject: MATLAB segmentation violation on matrix multiplication

From: Aditya Rawal

Date: 7 Nov, 2009 02:16:03

Message: 1 of 3

Here is my code:

clear;
clc;
v_temp1 = zeros(2,2);

A = [4 2 ; 2 4];
M_matrix = [1 1 ; 1 1];
C = A * M_matrix

Interestingly i get segmentation fault whenever i fire this code on a CPU cluster, but it ofcourse runs well on my local machine. I am sure there is some setup issue, but don't know what...
Another thing is that when i replace the multiplication operator with addition/subtraction, it works...

Here is the error that i am getting..
------------------------------------------------------------------------
       Segmentation violation detected at Fri Nov 6 20:13:51 2009
------------------------------------------------------------------------

Configuration:
  MATLAB Version: 7.5.0.338 (R2007b)
  MATLAB License: 168993
  Operating System: Linux 2.6.24.6+desktop10+25.63 #1 SMP Thu Nov 5 15:03:22 CST 2009 i686
  GNU C Library: 2.7 stable
  Window System: No active display
  Current Visual: None
  Processor ID: x86 Family 6 Model 7 Stepping 6, GenuineIntel
  Virtual Machine: Java 1.6.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode, sharing
  Default Charset: US-ASCII

Register State:
  eax = 00000000 ebx = 44598510
  ecx = 00000000 edx = 00000002
  esi = 44eedaac edi = 00000000
  ebp = 4459fd00 esp = 44eeba18
  eip = 43c8f761 flg = 00010246

Stack Trace:
  [0] mkl.so:SearchPath~(0x645f6c6d, 0x732e6665, 111, 0) + 41 bytes

Please follow these steps to report this problem to The MathWorks so we
have the best chance of correcting it:

The next time MATLAB is launched under typical usage, a dialog box will
open to help you send the error log to The MathWorks. Alternatively, you
can send an e-mail to segv@mathworks.com with the following file attached:
    /tmp/matlab_crash_dump.26316

If the problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/ts/help_request_1.html

A technical support engineer might contact you with further information.

Thank you for your help. Save your workspace and restart MATLAB.

Subject: MATLAB segmentation violation on matrix multiplication

From: James Tursa

Date: 7 Nov, 2009 03:08:02

Message: 2 of 3

"Aditya Rawal" <aditya@cs.utexas.edu> wrote in message <hd2l93$f06$1@fred.mathworks.com>...
> Here is my code:
>
> clear;
> clc;
> v_temp1 = zeros(2,2);
>
> A = [4 2 ; 2 4];
> M_matrix = [1 1 ; 1 1];
> C = A * M_matrix
>
> Interestingly i get segmentation fault whenever i fire this code on a CPU cluster, but it ofcourse runs well on my local machine. I am sure there is some setup issue, but don't know what...
> Another thing is that when i replace the multiplication operator with addition/subtraction, it works...

Matrix multiplication calls a BLAS library function, whereas add/subtract do not. I suspect your cluster MATLAB is loading an incompatible version of the BLAS libraries to compute with, but I don't know how to fix your problem. Do you have mixed 64-bit and 32-bit versions installed?

James Tursa

Subject: MATLAB segmentation violation on matrix multiplication

From: Aditya Rawal

Date: 7 Nov, 2009 07:38:03

Message: 3 of 3

Hi James,

How do i find if i have both 32 bit and 64 bit installed?

Thanks
Aditya

"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hd2oai$f1d$1@fred.mathworks.com>...
> "Aditya Rawal" <aditya@cs.utexas.edu> wrote in message <hd2l93$f06$1@fred.mathworks.com>...
> > Here is my code:
> >
> > clear;
> > clc;
> > v_temp1 = zeros(2,2);
> >
> > A = [4 2 ; 2 4];
> > M_matrix = [1 1 ; 1 1];
> > C = A * M_matrix
> >
> > Interestingly i get segmentation fault whenever i fire this code on a CPU cluster, but it ofcourse runs well on my local machine. I am sure there is some setup issue, but don't know what...
> > Another thing is that when i replace the multiplication operator with addition/subtraction, it works...
>
> Matrix multiplication calls a BLAS library function, whereas add/subtract do not. I suspect your cluster MATLAB is loading an incompatible version of the BLAS libraries to compute with, but I don't know how to fix your problem. Do you have mixed 64-bit and 32-bit versions installed?
>
> James Tursa

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
matlab segmenta... Aditya Rawal 6 Nov, 2009 21:19:05
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com