RuntimeError: boost::thread_resource_error: Resource temporarily unavailable
- Keywords:
- RuntimeError
Hello all and happy new year!
I am using Ubuntu 18.04, and Yade 2019-08-
I want to code a 3D-triaxial test problem which applies a rate of strain for the deviatoric part. I run my code which takes a lot of time, I left it to be run for 3 days, and get this error:
Obviously it cannot be converged in the deviatoric section!
********** ERROR ************
axial deformation (%) -2575.3325503377832
~~~~~~~~~~~~~ Phase_02: Converging to Deviatoric Compression, Strain Rate ~~~~~~~~~~~~~
step= 882430 unbalanced force: 2.6340108400409
axial deformation (%) -2575.3325503377832
~~~~~~~~~~~~~ Phase_02: Converging to Deviatoric Compression, Strain Rate ~~~~~~~~~~~~~
step= 882500 unbalanced force: 2.4289637626032
axial deformation (%) -2575.3325503377832
~~~~~~~~~~~~~ Phase_02: Converging to Deviatoric Compression, Strain Rate ~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/
execfile(
File "/usr/lib/
exec_(code, myglobals, mylocals)
File "Q.py", line 154, in <module>
O.run(1000, True)
RuntimeError: boost::
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 3D view for help), F10 both, F9 generator, F8 plot. ]]
^[[55;1R-
RuntimeError Traceback (most recent call last)
~/yade/
402 import yade.qt
403 qapp=QApplicati
--> 404 userSession(
405
406 if __name__ == "__main__":
~/yade/
351 if yade.runtime.
352 ## start interpreter
--> 353 if not opts.mpi_mode: ipshell()
354
355
~/.local/
227 # our call and get the original caller's namespaces.
228 self.mainloop(
--> 229 global_
230
231 self.banner2 = self.old_banner2
~/.local/
322
323 with self.builtin_trap, self.display_trap:
--> 324 self.interact()
325
326 # now, purge out the local namespace of IPython's hidden variables.
~/.local/
479
480 try:
--> 481 code = self.prompt_
482 except EOFError:
483 if (not self.confirm_exit) \
~/.local/
408 default=default,
409 # pre_run=
--> 410 **self.
411 return text
412
~/.local/
736 return ensure_
737 else:
--> 738 return run_sync()
739
740 @property
~/.local/
725 with self._auto_
726 self.default_
--> 727 return self.app.
728
729 def run_async():
~/.local/
707 loop.set_
708 try:
--> 709 return run()
710 finally:
711 loop.set_
~/.local/
680 def run():
681 f = self.run_
--> 682 run_until_
683 return f.result()
684
~/.local/
121 Return the Future's result, or raise its exception.
122 """
--> 123 return get_event_
~/.local/
64
65 while not future.done():
---> 66 self._run_
67
68 # Run one last time, to flush the pending `_calls_
~/.local/
83 " True when there is input ready. The inputhook should return control. "
84 return self._ready_
---> 85 self._inputhook
86
87 # Wait until input is ready.
~/.local/
76 os.write(self._w, b'x')
77
---> 78 threading.
79
80 # Call inputhook.
/usr/lib/
844 _limbo[self] = self
845 try:
--> 846 _start_
847 except Exception:
848 with _active_limbo_lock:
RuntimeError: can't start new thread
Fatal Python error: This thread state must be current when releasing
Thread 0x00007f6c09bd3740 (most recent call first):
Thread 0x00007f6c09bd3740 (most recent call first):
Current thread 0x00007f6ba0d31700 (most recent call first):
File "/usr/lib/
File "/home/
File "Q.py", line 84 in checkUnbalanced
File "<string>", line 1 in <module>
Thread 0x00007f6bdffff700 (most recent call first):
File "/usr/lib/
File "/usr/lib/
File "/home/
Thread 0x00007f6be4f9e700 (most recent call first):
File "/usr/lib/
File "/usr/lib/
File "/home/
Thread 0x00007f6c09bd3740 (most recent call first):
Aborted (core dumped)
ehsan@ehsan:
*******
*******
and my code is as follows:
*******
#######
######### TRIAXIAL PROBLEM, Y IS THE VERTICAL AXIS, X IS THE RIGHT AXIS, Z IS THE FRONT AXIS #########
#######
print ('************** START **************')
import numpy as np
import math
from yade import pack, plot, qt, export, utils
from datetime import datetime
#######
######### DEFINING VARIABLES #########
print ('============ DEFINING VARIABLES ============')
nRead=readParam
num_spheres=20000,
compFricDegree = 30,
key='_
unknownOk=True
)
from yade.params import table
num_spheres=
key=table.key
targetPorosity = 0.43
compFricDegree = table.compFricD
finalFricDegree = 30
rate=-0.02
damp=0.2
stabilityThresh
young=15e6
poisson=0.4
mn,mx=Vector3(
sigmaIso=-50e3
#######
######### DEFINING MATERIALS #########
print ('============ DEFINING MATERIALS ============')
O.materials.
O.materials.
#######
######### DEFINING PACKING #########
print ('============ DEFINING PACKING ============')
walls=aabbWalls
wallIds=
sp=pack.
volume = (mx[0]-
mean_rad = pow(0.09*
clumps=False
if clumps:
volume = (mx[0]-
mean_rad = pow(0.09*
c1=
sp.
sp.
O.bodies.
else:
sp.
O.bodies.
#######
######### DEFINING TRIAXIAL TEST #########
print ('============ DEFINING TRIAXIAL TEST ============')
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
internalCompac
)
#######
######### DEFINING FUNCTIONS #########
print ('============ DEFINING FUNCTIONS ============')
def checkUnbalanced():
if unbalancedForce
O.pause()
plot.
def history():
plot.addData(
ev=-
s11=
s22=
s33=
i=O.
)
#######
######### DEFINING ENGINES #########
print ('============ DEFINING ENGINES ============')
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
TriaxialStateR
newton,
PyRunner(
PyRunner(
]
Gl1_Sphere.
if nRead==0: yade.qt.
print ('Number of elements: ', len(O.bodies))
print ('Box Volume: ', triax.boxVolume)
print ('Box Volume calculated: ', volume)
#######
######### APPLYING CONFINING PRESSURE #########
print ('============ APPLYING CONFINING PRESSURE ============')
triax.internalC
setContactFrict
triax.stressmask=7
triax.goal1=
triax.goal2=
triax.goal3=
while 1:
O.run(1000, True)
unb=
meanS=
print ('unbalanced force:',unb,' mean stress engine: ',triax.
print ('porosity=
print ('void ratio='
print ('~~~~~~~~~~~~~ Phase_01: Converging to Isotropic Compression, 50kPa ~~~~~~~~~~~~~')
if unb<stabilityTh
break
O.save(
print ('#####
e22Check=
#######
######### DEVIATORIC LOADING #########
print ('============ APPLYING DEVIATORIC LOADING ============')
triax.internalC
setContactFrict
triax.stressMask = 5
triax.goal2=rate
triax.goal1=
triax.goal3=
while 1:
O.run(1000, True)
unb=
axialS=
print ('step=', O.iter, 'unbalanced force:',unb,' sigma2: ',axialS, 'q=', axialS-sigmaIso)
print ('axial deformation (%)', (triax.
print ('~~~~~~~~~~~~~ Phase_02: Converging to Deviatoric Compression, Strain Rate ~~~~~~~~~~~~~')
if abs((triax.
if abs((triax.
if abs((triax.
if abs((triax.
if triax.strain[
break
O.save('final.xml')
print ('#####
#######
######### RECORD AND PLOT DATA #########
print ('============ RECORD AND PLOT DATA ============')
O.run(5000,True)
plot.plots=
plot.labels=
plot.plot()
plot.saveDataTx
plot.saveGnuplo
print ('************** END **************')
*******
So I have following questions:
1 - Why it takes so long to be run?
2- Is there any way to run this code in a shorter time?
3- Why it cannot be converged?
4- What is the meaning of this error and what do I do to debug it?
Thank you very much for you kind helps.
Bests,