espressomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-devel] [bug #46210] "analyze pressure" affecting simulatio


From: Florian Weik
Subject: Re: [ESPResSo-devel] [bug #46210] "analyze pressure" affecting simulation
Date: Sat, 17 Oct 2015 18:04:20 +0200

Hi,
if I see it correctly the collision system already has a way to handle bond creation later, I think this could easily be extended to the other collision mode.
Also I think there are some low-hanging optimization fruits in this code is performance is an issue, like buffering the collision queue.
This of course also has state, but it is only limited to the method, so the collision code can only break its own stuff with it. I think the affinity could be
handled in the same way, and those are the only two features that actually change particles during the short-range force calculation.

Also modifying the particle state during calculation does not mix well with other parts of the code, for example there could be a copy of the particle configuration
on the GPU which then would be out of sync. The same goes for the system interface which promises that the state does not change during force calculation,
so that the order of the actors does not matter.

It is clear that there is some overhead in doing it like this, but I think the Espresso way clearly is to sacrifice a (probably rather small) bit of performance of a
single feature for for clarity and better code structure. Also you have to factor in the hours lost in development by bad code structure and in bug hunting into your performance
calculation. On a general note, I think the main reason why the Espresso code is in such a bad shape today is because total cost of ownership was never
factored into anything. And we should start to improve that gradually. (I am aware of the fact that there seems to be some dialectic in this paragraph.)

Cheers,
Florian

On Sat, Oct 17, 2015 at 5:22 PM, Rudolf Weeber <address@hidden> wrote:
Hi,
On Sat, Oct 17, 2015 at 04:12:00PM +0200, Florian Weik wrote:
> Of course this dug up other stuff. The affinity interaction from object in
> fluid was also manipulating particles (bond creation). I am in general not
> in favor of the force calculation changing the state.
> Changing forces is one thing, but integrate 0 actually can do all sorts of
> things, like creating and removing bonds. I think it would be much cleaner
> to do a second run through the particle pairs to
> do that if it is needed or just flag particles for modification. What do
> you think?
The collision detection / dynamic bonding feature also relies on creating bonds in the inner force loop.
Although that could maybe be eliminated with some work.

I'd be strongly against a second iteration over all pairs, as this would kill the performance of many dynamic bonding simulations.
If it is sufficiently important to warrant the effort, as I said, one could try to remove the creation of marker bonds in the inner force loop.

Regards, Rudolf





--
Florian Weik

address@hidden
++49 157 85939252


reply via email to

[Prev in Thread] Current Thread [Next in Thread]