[Ipopt] MATLAB crash

Vyacheslav Kungurtsev vyacheslav.kungurtsev at esat.kuleuven.be
Mon Jul 8 14:15:46 EDT 2013


My mistake! I have attached the correct stack trace below,

I installed the old compilers (could only get to gfortran 4.4). Both
previously and now I just have the coinhsl source in
ThirdParty/HSL/coinhsl, and using the site script.

Still, if I run with matlab without preloading libcoinhsl.
Invalid MEX-file '/usr/local/lib/ipopt.mexa64': libcoinhsl.so.0:
cannot open shared object file: No such file or directory

If I run matlab without preloading libstdc++.so.6, I get:
Invalid MEX-file '/usr/local/lib/ipopt.mexa64':
/usr/local/MATLAB-R2012a/bin/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.15' not found (required by /usr/local/lib/ipopt.mexa64)

With preloading, the crash stack trace is below:


------------------------------------------------------------------------
       Segmentation violation detected at Mon Jul  8 20:13:47 2013
------------------------------------------------------------------------

Configuration:
  Crash Decoding  : Disabled
  Current Visual  : 0x21 (class 4, depth 24)
  Default Encoding: UTF-8
  GNU C Library   : 2.15 stable
  MATLAB Root     : /usr/local/MATLAB-R2012a
  MATLAB Version  : 7.14.0.739 (R2012a)
  Operating System: Linux 3.5.0-34-generic #55-Ubuntu SMP Thu Jun 6
20:18:19 UTC 2013 x86_64
  Processor ID    : x86 Family 6 Model 58 Stepping 9, 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 (11300000), display :0

Fault Count: 4


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 00007fe21f68f0d0  RBX = 6394fcfdffffd948
  RCX = e01a34e11c1e7188  RDX = 00007fe21deffed8
  RSP = 00007fe1b0ee4690  RBP = 0000a6a31ca507d0
  RSI = 0000a6a31ca507d0  RDI = 00000000400004d8

   R8 = a04d1f0000000018   R9 = 400004d8400004d8
  R10 = 0000000800000008  R11 = e019b50000000008
  R12 = 0000001800000018  R13 = 1c0336a000000001
  R14 = 7c8537e31c1e9840  R15 = 00007fe21deffedc

  RIP = 00007fe21f68f656  EFL = 0000000000010206

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007fe23325092e
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00370990
_ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158
[  1] 0x00007fe2332537d0
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00382928
[  2] 0x00007fe233253b3b
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00383803
_ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000171
[  3] 0x00007fe232137203
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01253891
_ZN2fl4diag13terminate_logEPKcPK8ucontext+000067
[  4] 0x00007fe2321340fd
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01241341
[  5] 0x00007fe23213579d
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247133
[  6] 0x00007fe232135925
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247525
[  7] 0x00007fe232135f01
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01249025
[  8] 0x00007fe2321363f5
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01250293
[  9] 0x00007fe230af3cb0
/lib/x86_64-linux-gnu/libpthread.so.0+00064688
[ 10] 0x00007fe21f68f656
/usr/local/MATLAB-R2012a/bin/glnxa64/mkl.so+10384982


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 00007fe21f68f0d0  RBX = 6394fcfdffffd948
  RCX = 5c9eece31c1e9848  RDX = 00007fe21deffed8
  RSP = 00007fe15f2d8690  RBP = 0000cd651ca52e90
  RSI = 0000cd651ca52e90  RDI = 00000000400004d8

   R8 = a04d1f0000000018   R9 = 800009b0800009b0
  R10 = 0000000800000008  R11 = e019b50000000008
  R12 = 0000001800000018  R13 = 1c0336a000000001
  R14 = f909efe51c1ebf00  R15 = 00007fe21deffedc

  RIP = 00007fe21f68f656  EFL = 0000000000010206

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007fe23325092e
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00370990
_ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158
[  1] 0x00007fe2332537d0
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00382928
[  2] 0x00007fe233253b3b
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00383803
_ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000171
[  3] 0x00007fe232137203
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01253891
_ZN2fl4diag13terminate_logEPKcPK8ucontext+000067
[  4] 0x00007fe2321340fd
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01241341
[  5] 0x00007fe23213579d
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247133
[  6] 0x00007fe232135925
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247525
[  7] 0x00007fe232135f01
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01249025
[  8] 0x00007fe2321363f5
/usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01250293
[  9] 0x00007fe230af3cb0
/lib/x86_64-linux-gnu/libpthread.so.0+00064688
[ 10] 0x00007fe21f68f656
/usr/local/MATLAB-R2012a/bin/glnxa64/mkl.so+10384982


On Mon, Jul 8, 2013 at 7:18 PM, Tony Kelman <kelman at berkeley.edu> wrote:

> The stack trace you provided looks like it was coming from algencan (and
> from May?), not ipopt.
>
> Regardless, it's not a good idea to tell Matlab to use the version of
> libstdc++ from your operating system. Depending what release of Ubuntu
> you're running, your default GCC version is likely quite a bit newer, and
> binary incompatible, with the version Mathworks recommends. See
> http://www.mathworks.com/**support/compilers/R2012a/**glnxa64.html<http://www.mathworks.com/support/compilers/R2012a/glnxa64.html>
>
> What's probably easiest is to install the older GCC compilers with (I'm
> hoping you have install rights on this machine, otherwise you can build GCC
> from source but that takes quite some time)
> sudo apt-get install gcc-4.4 g++-4.4 gfortran-4.3
> It looks like gfortran-4.3 might not be available quickly through apt-get
> in the most recent Ubuntu releases, you can try gfortran-4.4 and things
> might still work. Tell ipopt configure to use these compiler versions by
> specifying CC=gcc-4.4 CXX=g++-4.4 F77=gfortran-4.4 (or 4.3).
>
> Are you telling ipopt configure specifically to use a preinstalled coinhsl
> shared library? You're probably better off building the coinhsl source
> along with Ipopt and linking the libraries statically. As long as you have
> the coinhsl source under ThirdParty/HSL/coinhsl, and are using the site
> script which sets --disable-shared, you shouldn't need a shared libcoinhsl.
>
> -Tony
>
>
> -----Original Message----- From: Vyacheslav Kungurtsev <
> vyacheslav.kungurtsev at esat.**kuleuven.be<vyacheslav.kungurtsev at esat.kuleuven.be>
> >
> Date: Mon, 8 Jul 2013 16:54:11 +0200
>
> To: ipopt at list.coin-or.org
> Subject: [Ipopt] MATLAB crash
>
>
> I had recently wanted to test the ipopt mex with ma97. I downloaded ipopt
> 3.11, installed all the third party software, coinhsl, copied the .site
> file, as described in the installation instructions, into build/share. I
> saw that the configuration and make recognizes all the linear solvers I
> have available and goes error-free.
>
> First, in order to be able to even run ipopt in matlab, I need to call
> matlab as such:
> LD_PRELOAD="/usr/lib/x86_64-**linux-gnu/libstdc++.so.6
> /usr/local/lib/libcoinhsl.so.**0" /usr/local/MATLAB-R2012a/bin/**matlab
>
>
> Otherwise matlab, upon attempting to run ipopt, returns an error saying
> that it cannot find these libraries that I now preload.
>
> Once I run it like this and run ipopt, with any linear solver, MATLAB
> crashes, with the details below.
>
>
> I am not sure as to what could be causing this. I am using ubuntu, and
> others with ubuntu have had no trouble installing and using the ipopt mex.
>
> Thank you
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20130708/edab8744/attachment.html>


More information about the Ipopt mailing list