Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Matlab R2008b crashes on Mac 10.5.5 (regardless of Java)

19 views
Skip to first unread message

Geico Caveman

unread,
Dec 25, 2008, 4:25:29 AM12/25/08
to
Hello

I am currently evaluating a Mac for a possible future notebook system
using a copy of Mac OS installed in a VM. One of the apps I am used to
(on my Linux systems) is Matlab.

I have successfully set it up and matlab does start up properly.
However, it crashes as soon as I try to do a matrix multiplication
(something as simple as [1 2]'*[1 2]). The offending application appears
to be Java initially :

(from java.log.xxx)

Invalid memory access of location ... eip=...

Java version : 1.5.0_16

However, funnily enough, this happens even when I start without Java
(matlab -nojvm -nodesktop from an xterm) :


------------------------------------------------------------------------
Bus error detected at Thu Dec 25 02:17:58 2008
------------------------------------------------------------------------

Configuration:
MATLAB Version: 7.7.0.471 (R2008b)
Virtual Machine: Java is not enabled

Fault Count: 1

Register State:
eax = 00000000 ebx = b0c27958
ecx = 17e8b390 edx = b0c27958
esi = 19798080 edi = b0c2794c
ebp = b0c27988 esp = b0c277ac
eip = 00000000 flg = 00210293

Stack Trace:
[0] 0x00000000(0x17bb6ab8, 0x17bb6af0, 0x17bb6f88, 0)
[1] libmwmathlinalg.dylib:mfGenMatrixMult(mxArray_tag*, mxArray_tag*,
mxArray_tag*, MM_Transpose, MM_Transpose)(0x17bb6ab8, 0x17bb6af0,
0x17bb6f88, 0) + 135 bytes
[2] libmwmathlinalg.dylib:mfTimesTransposeFcn2DFloatPt(int,
mxArray_tag**, int, mxArray_tag**)(0, 0xb0c27bb4, 3, 0xb0c27c44) + 906 bytes
[3] libmwm_dispatcher.dylib:Mlm_file::load_mf()(0x17e38e40 "�wQ", 0,
0xb0c27bb4, 3) + 30084 bytes
[4] libmwm_dispatcher.dylib:Mfh_MATLAB_fn::dispatch_fh(int,
mxArray_tag**, int, mxArray_tag**)(0x17e38e40 "�wQ", 0, 0xb0c27bb4, 3) +
200 bytes
[5]
libmwm_interpreter.dylib:inJitCallMatlabFunctionPtrNoDestroy(Mfh_MATLAB_fn*,
int, int, mxArray_tag**, int, mxArray_tag**)(0x17e38e40 "�wQ", 442, 0,
0xb0c27bb4)$
[6] libmwm_interpreter.dylib:accelImpl::MatfcnMxArray()(0xb0c323d4
"H%ðD%ð", 0x03941600, 0xb0c28238, 0x004f8ed0) + 304 bytes

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

How does one fix this ?

I have found numerous links on the net with other users reporting
problems with Apple's implementation of Java (interestingly, Sun does
not offer or support Java on Mac OSX). Some of these reports are as old
as one year or more. One of the (very) few successful reports (of a fix)
I could find was :

http://lists.apple.com/archives/Java-dev/2008/Aug/msg00283.html

Mine is a 32 bit system. I followed the advice. No joy. Not entirely
unexpected as Matlab appears to be triggering some sort of a problem.

Any suggestions would be welcome. If this does not work, then I guess
Mac is not the platform I should be considering.
** Posted from http://www.teranews.com **

Michael Hosea

unread,
Dec 25, 2008, 9:44:26 AM12/25/08
to
This looks like a BLAS issue. I don't know any details about BLAS setup
issues on the Mac, but you could search web and documentation for that.
Worst case, you could tell MATLAB to use the reference BLAS.
--
Mike

"Geico Caveman" <sp...@spammers.begone.invalid> wrote in message
news:18ca5$4953518e$11...@news.teranews.com...

> [3] libmwm_dispatcher.dylib:Mlm_file::load_mf()(0x17e38e40 "?wQ", 0,

> 0xb0c27bb4, 3) + 30084 bytes
> [4] libmwm_dispatcher.dylib:Mfh_MATLAB_fn::dispatch_fh(int,

> mxArray_tag**, int, mxArray_tag**)(0x17e38e40 "?wQ", 0, 0xb0c27bb4, 3) +

> 200 bytes
> [5]
> libmwm_interpreter.dylib:inJitCallMatlabFunctionPtrNoDestroy(Mfh_MATLAB_fn*,

> int, int, mxArray_tag**, int, mxArray_tag**)(0x17e38e40 "?wQ", 442, 0,

> 0xb0c27bb4)$
> [6] libmwm_interpreter.dylib:accelImpl::MatfcnMxArray()(0xb0c323d4

> "H%ğD%ğ", 0x03941600, 0xb0c28238, 0x004f8ed0) + 304 bytes

Geico Caveman

unread,
Dec 25, 2008, 4:50:30 PM12/25/08
to
Thanks for the suggestion. I looked it up and found a possible solution,
of all places, at an osx86 site :

http://forum.insanelymac.com/index.php?showtopic=59754

I opened up bin/maci/blas.spec and replaced the line in there :

#GenuineIntel Family * Model * mkl.dylib mklcompat.dylib #Intel Mac
GenuineIntel Family * Model * libBLAS.dylib #Intel Mac

(libBLAS.dylib being what I found using Spotlight).

Matlab does not crash any more, but an attempt to perform the simple
multiplication [1 2]*[1 2]' fails with a strange error initially :

>> [1 2]*[1 2]'
libmwblas: load error: dlsym(0x8fe39b98, lsame_): symbol not found
Caught std::exception Exception message is:
dlsym(0x8fe39b98, lsame_): symbol not found

However, when I try it again, it gives me the right answer. Odd, but I
am not complaining. One of the demos (Klein bottle) crashes now though.

Thanks - you made my day, and for Apple, perhaps a sale :)

Steven Lord

unread,
Dec 31, 2008, 1:34:39 AM12/31/08
to

"Geico Caveman" <sp...@spammers.begone.invalid> wrote in message
news:18ca5$4953518e$11...@news.teranews.com...
> Hello
>
> I am currently evaluating a Mac for a possible future notebook system
> using a copy of Mac OS installed in a VM. One of the apps I am used to (on
> my Linux systems) is Matlab.

I don't think that configuration is supported by MATLAB; I'm not certain if
it's supported by Mac OS X.

> I have successfully set it up and matlab does start up properly.
> However, it crashes as soon as I try to do a matrix multiplication
> (something as simple as [1 2]'*[1 2]). The offending application appears
> to be Java initially :
>
> (from java.log.xxx)
>
> Invalid memory access of location ... eip=...
>
> Java version : 1.5.0_16
>
> However, funnily enough, this happens even when I start without Java
> (matlab -nojvm -nodesktop from an xterm) :
>
>
> ------------------------------------------------------------------------
> Bus error detected at Thu Dec 25 02:17:58 2008
> ------------------------------------------------------------------------
>
> Configuration:
> MATLAB Version: 7.7.0.471 (R2008b)
> Virtual Machine: Java is not enabled

There should be more information about the configuration in the log file; in
particular, what type of processor does the virtual machine think it has?
If it's not an Intel processor then that could be the source of the problem.
[For instance, if the VM thinks it has an AMD processor, that could be a
problem.]

*snip*

From the error log, MATLAB is trying to call into LAPACK to perform the
matrix multiplication, but the LAPACK function it expects to be available
isn't. That means that either LAPACK is misconfigured or it's using the
wrong LAPACK.

--
Steve Lord
sl...@mathworks.com


0 new messages