← Back to team overview

yade-users team mailing list archive

Re: [Question #690691]: setPermF broken?

 

Question #690691 on Yade changed:
https://answers.launchpad.net/yade/+question/690691

Robert Caulk posted a new comment:
> a MWE 
>works nicely with "yade", gives zero motion with "yade -j 3".
>So it seems there is a bug in setPermF for parallel run, compare [2] and [3].

Hey Jan,

I tried to reproduce your bug and I was unable to. In both cases the
body moves (running yadedaily latest), but in single core the body moves
much more than in parallel. Something is certainly wrong with one or the
other. I modified your MWE a bit to track some stats:

########################################
O.bodies.append([sphere((0,0,z),.1) for z in range(10)])
O.forces.setPermF(0,(1,0,0))

def printStats():
	print('pos',O.bodies[0].state.pos)
	print('permF',O.forces.permF(0))
	print('force',O.forces.f(0))
	print('vel',O.bodies[0].state.vel)

O.engines=O.engines+[PyRunner(dead=0,iterPeriod=1000,command='printStats()',label='stats')]

newton.damping=0

O.run(200000,True)
########################################

Observations:

* The single core run accelerates the body much more quickly than the multi core run, perhaps the permanent force is being added over and over for single core runs, while remaining constant in multi core runs. I believe this was the issue that Bruno's patch [1] intended to fix for multi core runs. I am unsure why he did not apply the patch to the single core force container. 
* O.forces.f(0) reports 0 (unexpected) in multicore runs and 1 (expected value) in single core runs. 


[1] https://gitlab.com/yade-dev/trunk/-/commit/da054fee5fe98ff2ebe46d45dfdf839d5b2bb9eb

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.