Ubuntu 11.10 64bit mex file compilation

1 view (last 30 days)
Volker
Volker on 20 Apr 2012
Hi!
I recently started using MatlabR2011b on Ubuntu, largely for compiling my FORTRAN mex-files for use on linux systems (clusters).
However, I am encountering problems in executing them, after compiling them out of Matlab.
For example, when I compile the supplied example timestwo.F, I get a segmentation violation.
What could be the problem? Could it be, because I am using a newer version of the gcc-compiler? Though the compiling runs without errors.
Here is the error report:
>> timestwo(2.0)
------------------------------------------------------------------------
Segmentation violation detected at Fri Apr 20 15:56:23 2012
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Current Visual : 0x21 (class 4, depth 24)
Default Encoding: UTF-8
GNU C Library : 2.13 stable
MATLAB Root : /usr/local/MATLAB/R2011b
MATLAB Version : 7.13.0.564 (R2011b)
Operating System: Linux 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64
Processor ID : x86 Family 6 Model 10 Stepping 7, GenuineIntel
Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : The X.Org Foundation (11004000), display :0
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 00007f05f56a4418 RBX = 00007f05f56a4c60
RCX = 00007f05f022a270 RDX = 00007f0607285c70
RSP = 00007f05f56a43f8 RBP = 00007f05f56a4440
RSI = f56a4a40030d5b68 RDI = 00007f05f56a4420
R8 = 0000000002c5c9c0 R9 = 00007f0609741480
R10 = 00007f05f56a4170 R11 = 00007f06072b12f0
R12 = 00007f05f56a4ba0 R13 = 00007f05f56a4c60
R14 = 00000000020a5c40 R15 = 00007f05f56a45d0
RIP = 00007f0607285c70 EFL = 0000000000010212
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f0609a1a5de /usr/local/MATLAB/R2011b/bin/glnxa64/libmwfl.so+00210398 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158
[ 1] 0x00007f0609a1c62d /usr/local/MATLAB/R2011b/bin/glnxa64/libmwfl.so+00218669
[ 2] 0x00007f0609a1c8f5 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwfl.so+00219381 _ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextEb+000165
[ 3] 0x00007f0608a224f5 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00447733 _ZN2fl4diag13terminate_logEPKcPK8ucontextb+000085
[ 4] 0x00007f0608a1f5b4 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00435636
[ 5] 0x00007f0608a20333 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00439091
[ 6] 0x00007f0608a204c7 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00439495
[ 7] 0x00007f0608a2185f /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00444511
[ 8] 0x00007f0608a21a15 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00444949
[ 9] 0x00007f06074fc060 /lib/x86_64-linux-gnu/libpthread.so.0+00065632
[ 10] 0x00007f0607285c70 /lib/x86_64-linux-gnu/libc.so.6+01289328
[ 11] 0x00007f05ca40ea6a /home/volker/Dokumente/MATLAB/timestwo.mexa64+00002666 mexfunction_+000220
[ 12] 0x00007f060202c22c /usr/local/MATLAB/R2011b/bin/glnxa64/libmex.so+00049708 mexRunMexFile+000108
[ 13] 0x00007f06020290c9 /usr/local/MATLAB/R2011b/bin/glnxa64/libmex.so+00037065
[ 14] 0x00007f0602029d8e /usr/local/MATLAB/R2011b/bin/glnxa64/libmex.so+00040334
[ 15] 0x00007f060878f027 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_dispatcher.so+00430119 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+000519
[ 16] 0x00007f060806ddf3 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01854963
[ 17] 0x00007f06080044b7 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01422519
[ 18] 0x00007f06080227b6 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01546166
[ 19] 0x00007f0608027c9c /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01567900
[ 20] 0x00007f0608025262 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01557090
[ 21] 0x00007f0608025ea1 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01560225
[ 22] 0x00007f0608088973 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01964403
[ 23] 0x00007f060878f027 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_dispatcher.so+00430119 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+000519
[ 24] 0x00007f060805e192 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01790354
[ 25] 0x00007f060801c13b /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01519931
[ 26] 0x00007f0608019b56 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01510230
[ 27] 0x00007f060801a087 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwm_interpreter.so+01511559
[ 28] 0x00007f0608c6729e /usr/local/MATLAB/R2011b/bin/glnxa64/libmwbridge.so+00119454
[ 29] 0x00007f0608c681de /usr/local/MATLAB/R2011b/bin/glnxa64/libmwbridge.so+00123358 mnParser+000622
[ 30] 0x00007f0608a08d79 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00343417 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+000041
[ 31] 0x00007f06089e823e /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00209470
[ 32] 0x00007f06089e82b9 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00209593
[ 33] 0x00007f05fe7b9026 /usr/local/MATLAB/R2011b/bin/glnxa64/libmwuix.so+00442406
[ 34] 0x00007f05fe7c3ded /usr/local/MATLAB/R2011b/bin/glnxa64/libmwuix.so+00486893
[ 35] 0x00007f05ff226ec2 /usr/local/MATLAB/R2011b/bin/glnxa64/libuij.so+00237250 _ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPN5boost8weak_ptrIN4sysq10ws_ppeHookEEESt6vectorIS6_SaIS6_EEEENS4_8during_FIS6_NS2_10shared_ptrIS5_EEEEET0_T_SH_SG_+000066
[ 36] 0x00007f05ff228619 /usr/local/MATLAB/R2011b/bin/glnxa64/libuij.so+00243225
[ 37] 0x00007f05ff22513e /usr/local/MATLAB/R2011b/bin/glnxa64/libuij.so+00229694 _Z25svWS_ProcessPendingEventsiib+000494
[ 38] 0x00007f06089e76cf /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00206543
[ 39] 0x00007f06089e79ae /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00207278
[ 40] 0x00007f06089e7b1a /usr/local/MATLAB/R2011b/bin/glnxa64/libmwmcr.so+00207642
[ 41] 0x00007f06074f3efc /lib/x86_64-linux-gnu/libpthread.so.0+00032508
[ 42] 0x00007f060722e59d /lib/x86_64-linux-gnu/libc.so.6+00931229 clone+000109
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.** This crash report has been saved to disk as /
Thanks a lot!
  1 Comment
Walter Roberson
Walter Roberson on 20 Apr 2012
Note that pretty much the same question is at http://www.mathworks.com/matlabcentral/answers/28974-linux-64-bit-mex-seg-fault-on-simple-fortran-file

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!