MATLAB casadiMEX Crashing Issue

181 views
Skip to first unread message

Omkar Mulekar

unread,
Jun 10, 2021, 4:07:36 PM6/10/21
to CasADi
Hello,

I am using the OpenOCL package (found at https://openocl.github.io/), which uses CasADi for automatic differentiation.  I am running into an issue where MATLAB crashes completely when the script gets to a casadiMEX function (located at /Lib/casadi/casadiMEX.mexa64).  The weird thing is my scripts have worked on a dozen different devices, but I just recently started running it on an HPC, and that's where it started crashing.  When MATLAB crashes, it saves a dozen or so crash reports to my home directory.  One example is below.  I would greatly appreciate any help resolving this.  I also reached out to Mathworks, but they pointed me to reach out on here.

Sincerely,
Omkar Mulekar


-------------------------------------------------------------------------------- Segmentation violation detected at Wed Jun 02 10:35:26 2021 -0500 -------------------------------------------------------------------------------- Configuration: Crash Decoding : Disabled - No sandbox or build area path Crash Mode : continue (default) Default Encoding : UTF-8 Deployed : false Desktop Environment : GNOME GNU C Library : 2.17 stable Graphics Driver : Unknown hardware Java Version : Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode MATLAB Architecture : glnxa64 MATLAB Entitlement ID : 1137066 MATLAB Root : /software/x86_64/mathworks/R2018bu8 MATLAB Version : 9.5.0.1586782 (R2018b) Update 8 OpenGL : hardware Operating System : "CentOS Linux release 7.9.2009 (Core)" Process ID : 30811 Processor ID : x86 Family 6 Model 63 Stepping 2, GenuineIntel Session Key : 5d2429c0-c1cd-4ac4-98a0-d655951fe3c6 Static TLS mitigation : Enabled: Full Window System : The X.Org Foundation (11202000), display :1020 Fault Count: 28 Abnormal termination Register State (from fault): RAX = 0000000000000001 RBX = 0000000000000015 RCX = 248589fe49248c80 RDX = 0000023400000001 RSP = 00007f83200f20b8 RBP = 00007f83200f3470 RSI = 0000000009249268 RDI = 00007f83200f20c0 R8 = 002df007a47d3e10 R9 = 0000023400000001 R10 = 002df007a47d3e10 R11 = 00007f855ecc22a8 R12 = 00000000c0000294 R13 = 00007f85474aef80 R14 = 00007f85474b02a4 R15 = 0000000000000030 RIP = 00007f81a0126c16 EFL = 0000000000010206 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): [ 0] 0x00007f81a0126c16 /software/x86_64/mathworks/R2018bu8/bin/glnxa64/mkl.so+23088150 mkl_blas_avx2_xidamax+00000054 [ 1] 0x00007f819f18a4a0 /software/x86_64/mathworks/R2018bu8/bin/glnxa64/mkl.so+06718624 mkl_blas_idamax+00001200 [ 2] 0x00007f854d53cc53 /software/x86_64/mathworks/R2018bu8/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00740435 __kmp_invoke_microtask+00000147 [ 3] 0x00007f854d50c357 /software/x86_64/mathworks/R2018bu8/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00541527 [ 4] 0x00007f854d50b9d5 /software/x86_64/mathworks/R2018bu8/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00539093 [ 5] 0x00007f854d53d133 /software/x86_64/mathworks/R2018bu8/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00741683 [ 6] 0x00007f8575ad7ea5 /lib64/libpthread.so.0+00032421 [ 7] 0x00007f857688a9fd /lib64/libc.so.6+01042941 clone+00000109 [ 8] 0x0000000000000000 <unknown-module>+00000000 Abnormal termination Register State (from fault): RAX = 0000000000000001 RBX = 000000000000000f RCX = 490b13fc92491900 RDX = 0000023400000001 RSP = 00007f82f8936a38 RBP = 00007f82f8937df0 RSI = 0000000009249268 RDI = 00007f82f8936a40 R8 = 24b37a05eda1ca90 R9 = 0000023400000001 R10 = 24b37a05eda1ca90 R11 = 00007f855ecc22a8 R12 = 0000000089249424 R13 = 00007f85474aef80 R14 = 00007f85474b02a4 R15 = 000000000000002a RIP = 00007f81a0126c16 EFL = 0000000000010206 CS = 0033 FS = 0000 GS = 0000 

Joris Gillis

unread,
Jul 22, 2021, 6:19:23 AM7/22/21
to CasADi
Dear Omkar,

Can you make your problem reproduce with a small example?
The error sounds like mismatching openmp versions could be causing havoc,
but our binaries don't ship with openmp enabled, so that leaves me confused..

Best regards,
  Joris
Reply all
Reply to author
Forward
0 new messages