<div dir="ltr"><div><div>My mistake! I have attached the correct stack trace below,<br><br>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. <br>
<br>Still, if I run with matlab without preloading libcoinhsl.<br>Invalid MEX-file '/usr/local/lib/ipopt.mexa64': libcoinhsl.so.0:<br>cannot open shared object file: No such file or directory<br><br></div>If I run matlab without preloading libstdc++.so.6, I get:<br>
Invalid MEX-file '/usr/local/lib/ipopt.mexa64': /usr/local/MATLAB-R2012a/bin/glnxa64/libstdc++.so.6: version<br>`GLIBCXX_3.4.15' not found (required by /usr/local/lib/ipopt.mexa64)<br><br></div>With preloading, the crash stack trace is below:<br>
<br><br>------------------------------------------------------------------------<br> Segmentation violation detected at Mon Jul 8 20:13:47 2013<br>------------------------------------------------------------------------<br>
<br>Configuration:<br> Crash Decoding : Disabled<br> Current Visual : 0x21 (class 4, depth 24)<br> Default Encoding: UTF-8<br> GNU C Library : 2.15 stable<br> MATLAB Root : /usr/local/MATLAB-R2012a<br> MATLAB Version : 7.14.0.739 (R2012a)<br>
Operating System: Linux 3.5.0-34-generic #55-Ubuntu SMP Thu Jun 6 20:18:19 UTC 2013 x86_64<br> Processor ID : x86 Family 6 Model 58 Stepping 9, GenuineIntel<br> Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode<br>
Window System : The X.Org Foundation (11300000), display :0<br><br>Fault Count: 4<br><br><br>Abnormal termination:<br>Segmentation violation<br><br>Register State (from fault):<br> RAX = 00007fe21f68f0d0 RBX = 6394fcfdffffd948<br>
RCX = e01a34e11c1e7188 RDX = 00007fe21deffed8<br> RSP = 00007fe1b0ee4690 RBP = 0000a6a31ca507d0<br> RSI = 0000a6a31ca507d0 RDI = 00000000400004d8<br><br> R8 = a04d1f0000000018 R9 = 400004d8400004d8<br> R10 = 0000000800000008 R11 = e019b50000000008<br>
R12 = 0000001800000018 R13 = 1c0336a000000001<br> R14 = 7c8537e31c1e9840 R15 = 00007fe21deffedc<br><br> RIP = 00007fe21f68f656 EFL = 0000000000010206<br><br> CS = 0033 FS = 0000 GS = 0000<br><br>Stack Trace (from fault):<br>
[ 0] 0x00007fe23325092e /usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00370990 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158<br>[ 1] 0x00007fe2332537d0 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00382928<br>
[ 2] 0x00007fe233253b3b /usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00383803 _ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000171<br>[ 3] 0x00007fe232137203 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01253891 _ZN2fl4diag13terminate_logEPKcPK8ucontext+000067<br>
[ 4] 0x00007fe2321340fd /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01241341<br>[ 5] 0x00007fe23213579d /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247133<br>[ 6] 0x00007fe232135925 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247525<br>
[ 7] 0x00007fe232135f01 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01249025<br>[ 8] 0x00007fe2321363f5 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01250293<br>[ 9] 0x00007fe230af3cb0 /lib/x86_64-linux-gnu/libpthread.so.0+00064688<br>
[ 10] 0x00007fe21f68f656 /usr/local/MATLAB-R2012a/bin/glnxa64/mkl.so+10384982<br><br><br>Abnormal termination:<br>Segmentation violation<br><br>Register State (from fault):<br> RAX = 00007fe21f68f0d0 RBX = 6394fcfdffffd948<br>
RCX = 5c9eece31c1e9848 RDX = 00007fe21deffed8<br> RSP = 00007fe15f2d8690 RBP = 0000cd651ca52e90<br> RSI = 0000cd651ca52e90 RDI = 00000000400004d8<br><br> R8 = a04d1f0000000018 R9 = 800009b0800009b0<br> R10 = 0000000800000008 R11 = e019b50000000008<br>
R12 = 0000001800000018 R13 = 1c0336a000000001<br> R14 = f909efe51c1ebf00 R15 = 00007fe21deffedc<br><br> RIP = 00007fe21f68f656 EFL = 0000000000010206<br><br> CS = 0033 FS = 0000 GS = 0000<br><br>Stack Trace (from fault):<br>
[ 0] 0x00007fe23325092e /usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00370990 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158<br>[ 1] 0x00007fe2332537d0 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00382928<br>
[ 2] 0x00007fe233253b3b /usr/local/MATLAB-R2012a/bin/glnxa64/libmwfl.so+00383803 _ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000171<br>[ 3] 0x00007fe232137203 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01253891 _ZN2fl4diag13terminate_logEPKcPK8ucontext+000067<br>
[ 4] 0x00007fe2321340fd /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01241341<br>[ 5] 0x00007fe23213579d /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247133<br>[ 6] 0x00007fe232135925 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01247525<br>
[ 7] 0x00007fe232135f01 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01249025<br>[ 8] 0x00007fe2321363f5 /usr/local/MATLAB-R2012a/bin/glnxa64/libmwmcr.so+01250293<br>[ 9] 0x00007fe230af3cb0 /lib/x86_64-linux-gnu/libpthread.so.0+00064688<br>
[ 10] 0x00007fe21f68f656 /usr/local/MATLAB-R2012a/bin/glnxa64/mkl.so+10384982<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 8, 2013 at 7:18 PM, Tony Kelman <span dir="ltr"><<a href="mailto:kelman@berkeley.edu" target="_blank">kelman@berkeley.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The stack trace you provided looks like it was coming from algencan (and from May?), not ipopt.<br>
<br>
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 <a href="http://www.mathworks.com/support/compilers/R2012a/glnxa64.html" target="_blank">http://www.mathworks.com/<u></u>support/compilers/R2012a/<u></u>glnxa64.html</a><br>
<br>
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)<br>
sudo apt-get install gcc-4.4 g++-4.4 gfortran-4.3<br>
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).<br>
<br>
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.<br>
<br>
-Tony<br>
<br>
<br>
-----Original Message----- From: Vyacheslav Kungurtsev <<a href="mailto:vyacheslav.kungurtsev@esat.kuleuven.be" target="_blank">vyacheslav.kungurtsev@esat.<u></u>kuleuven.be</a>><br>
Date: Mon, 8 Jul 2013 16:54:11 +0200<div class="HOEnZb"><div class="h5"><br>
To: <a href="mailto:ipopt@list.coin-or.org" target="_blank">ipopt@list.coin-or.org</a><br>
Subject: [Ipopt] MATLAB crash<br>
<br>
<br>
I had recently wanted to test the ipopt mex with ma97. I downloaded ipopt<br>
3.11, installed all the third party software, coinhsl, copied the .site<br>
file, as described in the installation instructions, into build/share. I<br>
saw that the configuration and make recognizes all the linear solvers I<br>
have available and goes error-free.<br>
<br>
First, in order to be able to even run ipopt in matlab, I need to call<br>
matlab as such:<br>
LD_PRELOAD="/usr/lib/x86_64-<u></u>linux-gnu/libstdc++.so.6<br>
/usr/local/lib/libcoinhsl.so.<u></u>0" /usr/local/MATLAB-R2012a/bin/<u></u>matlab<br>
<br>
<br>
Otherwise matlab, upon attempting to run ipopt, returns an error saying<br>
that it cannot find these libraries that I now preload.<br>
<br>
Once I run it like this and run ipopt, with any linear solver, MATLAB<br>
crashes, with the details below.<br>
<br>
<br>
I am not sure as to what could be causing this. I am using ubuntu, and<br>
others with ubuntu have had no trouble installing and using the ipopt mex.<br>
<br>
Thank you<br>
<br>
</div></div></blockquote></div><br></div>