0

I am using python and am getting a very odd error I can't seem to find anywhere. It has to do with the libgomp library and threading. The error is:

libgomp: could not create thread pool destructor.

The odd thing is that the error occurs after a certain amount of time/processes. It does not happen in a certain line of my code. The code I am running is an iterative solver and as such, I can control the amount of time the code runs very easily by relaxing the tolerances. Right now if I set the tolerances so that everything "converges" in ~9 iterations (about 15s) then the code completes just fine. If I increase it to >9 then I get the error. It clearly is not a problem with one part of the code as it happens in different parts every time and there is no traceback info.

Any ideas?

Murenrb
  • 367
  • 2
  • 12

1 Answers1

0

Strange. That error is only raised when pthread_key_create fails in [GCC]/libgomp/team.c:initialize_team, which is an __attribute__((constructor)) function, only called (once!) at process/libgomp initialization. So, either your process is doing "strange things" with dlopening libgomp (multiple times?), or you're running into some resource shortage/limitation at the OS level. Or, a libpthread (glibc) bug. Can you find any other reports of pthread_key_create failures for your OS/software distribution?

tschwinge
  • 346
  • 1
  • 5
  • wow! I can't even begin to guess how I would go about doing that. Can you walk me through what I should be looking for? – Murenrb Nov 30 '15 at 22:21
  • First, use a search engine to look for `pthread_key_create error [name of (presumably?) GNU/Linux distribution]`. – tschwinge Dec 02 '15 at 09:25
  • So that was a bust. It does not appear that this is a common issue. Perhaps we could take a different approach. I have run the same code on 2 other macs running the same operating system and the same setups. I setup all 3 the same. The other two have no issue. So, if I was going to just try to re-install something to get rid of the issue where should I start? gcc? gfortran? python? – Murenrb Dec 08 '15 at 18:41
  • It could be possible that the call to the library (REFPROP called through CoolProp) invokes `pthread_key_create` at each time. @tschwinge This could help understand the problem. I would have put this as a comment to your answer, but I don't have enough reputation for this. See also a more detailed explanation of the problem http://stackoverflow.com/questions/38148891/libgomp-could-not-create-thread-pool-destructor and https://github.com/CoolProp/CoolProp/issues/1139 – Togh Aug 13 '16 at 12:12