← 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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> Here's the key part of the source:
> Any suggestions?

please provide more information:
- a complete code reproducing your problem (trying to keep it minimal) [1]
(The code provided is not really "key" - engines are mostly irrelevant, computations inside swing are not relevant either).
- how you start yade (e.g. -j option)

> Or anybody can point me a to working example of setPermF?

a MWE [1]:
###
O.bodies.append([sphere((0,0,z),.1) for z in range(100)])
O.forces.setPermF(0,(1,0,0))
O.run(10,True)
print(O.bodies[0].state.pos)
###

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].

@Bruno? [4]

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/core/ForceContainerSerial.cpp#L45
[3] https://gitlab.com/yade-dev/trunk/-/blob/master/core/ForceContainerParallel.cpp#L104
[4] https://gitlab.com/yade-dev/trunk/-/commit/da054fee5fe98ff2ebe46d45dfdf839d5b2bb9eb

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