MATLAB: Knitro crash with "libgomp: could not create thread pool destructor"

203 views
Skip to first unread message

Herbert Meier

unread,
Jan 12, 2018, 11:09:55 AM1/12/18
to Artelys Knitro forum
Hello,

I'm facing a "libgomp: could not create thread pool destructor" error when using Knitro 10.3.0 from within MATLAB several times.
It just pops up at the end of the Knitro call without further information and crashes MATLAB (R2017b).

In MATLAB I'm using Knitro (abstractly speaking as follows)

for each configuration
     solve optimization problem
with Knitro


the problem seems to be reproducible but occurs only after approx. 350 configurations being tested successfully.


The libgomp version used (at least what is said by when running 'ldd' on the knitro mex file) is the one provided by GCC 7.2.
What can I do to further debug this problem?

The crash dump provided by MATLAB does not contain any useful information:


Stack Trace (from fault):
[  0] 0x00007f61cab249f0                                   <unknown-module>+00000000




P.S.: Here some information regarding the optimization problem being solved:

Provided is a analytic gradient/Jacobian of the objective.

Knitro presolve eliminated 0 variables and 0 constraints.

algorithm
:               1
derivcheck_type
:         2
hessopt
:                 3
honorbnds
:               1
maxfevals
:               100000
maxit
:                   100000
maxtime_real
:            240
outlev
:                  4
par_concurrent_evals
:    0
The problem is identified as bound constrained only.
Knitro changing bar_initpt from AUTO to 3.
Knitro changing bar_murule from AUTO to 4.
Knitro changing bar_penaltycons from AUTO to 1.
Knitro changing bar_penaltyrule from AUTO to 2.
Knitro changing bar_switchrule from AUTO to 1.
Knitro changing linesearch from AUTO to 1.
Knitro changing linsolver from AUTO to 2.

Problem Characteristics                    ( Presolved)
-----------------------
Objective goal:  Minimize
Number of variables:                        1200 (      1200)
    bounded below only
:                      240 (       240)
    bounded above only
:                        0 (         0)
    bounded below
and above:                   0 (         0)
   
fixed:                                     0 (         0)
    free
:                                    960 (       960)
Number of constraints:                         0 (         0)
    linear equalities
:                         0 (         0)
    nonlinear equalities
:                      0 (         0)
    linear one
-sided inequalities:             0 (         0)
    nonlinear one
-sided inequalities:          0 (         0)
    linear two
-sided inequalities:             0 (         0)
    nonlinear two
-sided inequalities:          0 (         0)
Number of nonzeros in Jacobian:                0 (         0)
Number of nonzeros in Hessian:            720600 (    720600)

Richard Waltz

unread,
Jan 12, 2018, 11:50:10 AM1/12/18
to kni...@googlegroups.com
Hi Herbert,

We have never seen this type of error message before.  Can you say what Linux platform/version you are running on?  Also can you say more about how you are running Knitro.  It appears you are using a parallel pool so I'm guessing you set UseParallel to true?  If you set UseParallel to false, I assume there is no such error.  Is the "for each configuration" loop running sequentially?  Can you send us your model <support...@artelys.com> with instructions on how to run it in the exact same way so that we can try to reproduce and investigate the issue?

Best,
-Richard


Richard WALTZ
Senior Scientist
 
Artelys USA
 


From: 'Herbert Meier' via Artelys Knitro forum [kni...@googlegroups.com]
Sent: Friday, January 12, 2018 2:03 AM
To: Artelys Knitro forum
Subject: [Knitro] MATLAB: Knitro crash with "libgomp: could not create thread pool destructor"

--
You received this message because you are subscribed to the Artelys "Knitro Nonlinear Optimization Solver" google group.
To post to this group, send email to kni...@googlegroups.com
To unsubscribe from this group, send email to knitro-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/knitro?hl=en
Thank You,
Artelys
http://www.artelys.com/en/optimization-tools/knitro
---
You received this message because you are subscribed to the Google Groups "Artelys Knitro forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knitro+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Herbert Meier

unread,
Apr 11, 2018, 11:14:04 AM4/11/18
to Artelys Knitro forum
Thanks a lot for your reply and sorry for my disappearance.
  • UseParallel is set to 'false'
  • I'm using CentOS 7.4
  • Yes, the 'for each' is running sequentially (there is no parallelism used in any part of the code/model)
Unfortunately, I am not allowed to share the code/model. Is there any way we can dig deeper into this without sharing the model?
I also stumbled upon this MathWorks help entry which suggest the use of Intel's OpenMP rather than GNU OpenMP. Would that be an option for Knitro's MEX file?

Thanks so much for your help!
Regards,
Herbert

Herbert Meier

unread,
Apr 11, 2018, 11:14:04 AM4/11/18
to Artelys Knitro forum
A small addendum to the previous post and regarding parallelism: I'm actually using MATLAB's "-singleCompThread" flag, but I'm not sure whether Knitro is aware of that and disabling parallelism for good..

Am Freitag, 12. Januar 2018 17:09:55 UTC+1 schrieb Herbert Meier:

Support Knitro

unread,
Apr 11, 2018, 12:05:47 PM4/11/18
to kni...@googlegroups.com
Hi Herbert,

We are about to release Knitro 11.0 any day now (certainly before the end of the month) and this new version uses Intel OpenMP on Linux so hopefully this would fix the issue.  I don't know your license status, but if you are under support contract and entitled to free upgrades, I can see if we can get you a pre-release version of Knitro 11.0 to test to see if it fixes the issue.  Please contact us offline at <support...@artelys.com> and we will follow-up.


Best,
-Richard


Richard WALTZ
Senior Scientist
 
Artelys USA
 

From: 'Herbert Meier' via Artelys Knitro forum [kni...@googlegroups.com]
Sent: Wednesday, April 11, 2018 2:42 AM
To: Artelys Knitro forum
Subject: [Knitro] Re: MATLAB: Knitro crash with "libgomp: could not create thread pool destructor"

Herbert Meier

unread,
May 13, 2018, 9:05:16 PM5/13/18
to Artelys Knitro forum
Dear Richard,

I have now access to the Knitro 11 MEX files, but it seems that it still uses GNU OpenMP is that correct? At least `readelf` says:
 0x0000000000000001 (NEEDED)             Shared library: [libmx.so]
 0x0000000000000001 (NEEDED)             Shared library: [libmex.so]
 0x0000000000000001 (NEEDED)             Shared library: [libut.so]
 0x0000000000000001 (NEEDED)             Shared library: [libgomp.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgfortran.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libquadmath.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]


Or am I doing something wrong here?

P.S.: The error persists for me with Knitro 11 and MATLAB 2018a

Thanks for your help!
To unsubscribe from this group and stop receiving emails from it, send an email to knitro+u...@googlegroups.com.

m.gabay

unread,
May 14, 2018, 6:43:53 AM5/14/18
to Artelys Knitro forum
Hi Herbert,

Yes Knitro 11.0 still uses GNU OpenMP, including for Matlab interface.

We'll try to make an knitromatlab build using Intel OpenMP. However, there are numerous issues related to compiling a package as complex as Knitro with Intel libraries and using Matlab MEX compiler.
We are currently looking into these issues but it could take us some time until we are able to provide a version compiled with Intel OpenMP.

We'll keep you updated.

Best regards,

Michaël Gabay

Herbert Meier

unread,
May 14, 2018, 11:04:04 AM5/14/18
to Artelys Knitro forum
Dear Michaël,

thanks so much for your reply!

In the meantime, is there any way for me to provide you with more details regarding that issue? E.g., would it be possible to get a build with debug symbols that I can run in GDB or valgrind?

Regards,
Herbert

Michaël Gabay

unread,
May 14, 2018, 11:36:33 AM5/14/18
to kni...@googlegroups.com

Thank you Herbert for your proposition.

 

For now, it’s fine, we’ll try to make you a build with Intel OpenMP and we’ll see if it solves your problem or some additional investigations are necessary.

 

Michaël

 

De : 'Herbert Meier' via Artelys Knitro forum [mailto:kni...@googlegroups.com]
Envoyé : lundi 14 mai 2018 17:03
À : Artelys Knitro forum <kni...@googlegroups.com>
Objet : Re: [Knitro] Re: MATLAB: Knitro crash with "libgomp: could not create thread pool destructor"

--

You received this message because you are subscribed to the Artelys "Knitro Nonlinear Optimization Solver" google group.
To post to this group, send email to kni...@googlegroups.com
To unsubscribe from this group, send email to knitro-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/knitro?hl=en
Thank You,
Artelys
http://www.artelys.com/en/optimization-tools/knitro
---
You received this message because you are subscribed to the Google Groups "Artelys Knitro forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to knitro+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages