yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #22279
Re: [Question #688906]: unexpected "exit" message when running a yade code on a cluster
Question #688906 on Yade changed:
https://answers.launchpad.net/yade/+question/688906
Status: Answered => Open
Rioual is still having a problem:
Hello,
The problem seems to be related to the use of O.run which controls the
apparition of the message "In[1]:"(which, with the use of the cluster,
is followed by the following statement: "Do you really want to exit
([y]/n)?" and stops the simulation)
See this MWS:
##################################################################################
readParamsFromTable(rMean=1.2,rRelFuzz=.4,maxLoad=1e7,minLoad=1e5)
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *
from yade import pack, plot
## PhysicalParameters
Density=2400
frictionAngle=radians(25)
#tc = 0.001
#en = 0.05
#et = 0.05
tc = 0.01
en = 0.0001
et = 0.0001
sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=et))
###########################################
print 'test0'
sp=pack.SpherePack()
sp.makeCloud((-23,10,-23),(23,310,23),rMean=rMean,rRelFuzz=rRelFuzz)
sp.toSimulation(color=(0,0,1),material=sphereMat)
print 'test1'
O.engines=[
ForceResetter(),
# sphere, facet, wall
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(
# the loading plate is a wall, we need to handle sphere+sphere, sphere+facet, sphere+wall
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,-9.81,0),damping=0.1),
# the label creates an automatic variable referring to this engine
# we use it below to change its attributes from the functions called
PyRunner(command='Poros()',iterPeriod=1,label='por'),
]
O.dt=.5*PWaveTimeStep()
#*******************************************************************************************************************************
def Poros():
Rcylext=15
Ycylmax = 110
dx = (Rcylext-2)/1.414
por = utils.voxelPorosity(200,(-dx ,4,-dx),(dx,Ycylmax,dx))
print 'test2'
print 'tstep=',O.iter,'Porosite=',por
#**************
print 'test3'
# POSITION OF O.RUN
O.run()
O.pause
#######################################################################################
****************************************************************
1- If I use O.run() in the MWS script, I have in the output the apparition of "In[1]:" then the exit message and the
simulation is blocked:
test0
test1
test3
[[ ^L clears screen, ^U kills line. F8 plot. ]]
In [1]: Do you really want to exit ([y]/n)?
2- If I use O.run(10,True) instead of O.run(), I get:
....
test0
test1
test3
test2
tstep= 1 Porosite= 0.783404375
test2
tstep= 2 Porosite= 0.78340475
test2
tstep= 3 Porosite= 0.783404625
test2
tstep= 4 Porosite= 0.783404625
test2
tstep= 5 Porosite= 0.7834055
test2
tstep= 6 Porosite= 0.783404625
test2
tstep= 7 Porosite= 0.783404
test2
tstep= 8 Porosite= 0.783404
test2
tstep= 9 Porosite= 0.783405375
[[ ^L clears screen, ^U kills line. F8 plot. ]]
In [1]: Do you really want to exit ([y]/n)?
So the run is done indeed after 10 timesteps and the "In[1]:" appears only at the complete end of the run which is expected.
My problem: In my more complete case, I need to use O.run() and not 0.run(X,True) because I don't know the number of timesteps required (there is an aditional conditional statement in a function called by pyrunner in the engines).
So Do you know to avoid the apparition of "In[1]:" with O.run() ??
Thanks very much for your feed-back,
Best wishes,
Vincent
nb: version of yade installed is: yade-2019-01-28.git-20242db
--
You received this question notification because your team yade-users is
an answer contact for Yade.