Atomic gravity and time-step limiter
Changes:
- Use atomic operations for the gravity tasks that update
gpart
, - Use locks in the gravity tasks that update multipoles,
- Use atomic operations for the limiter task,
- Do no lock the tree for the gravity and limiter tasks,
- Add an atomic max for chars,
- Minor changes to the parameter files,
- Add an option in the configuration script to revert to the old behaviour.
Implements #359 (closed).
Merge request reports
Activity
@pdraper your thoughts on this are also more than welcome!
added 1 commit
- c83f6d0c - Lock the gravity and limiter tasks when SWIFT_TASKS_WITHOUT_ATOMICS is defined
added 1 commit
- 74cb8972 - Add an option to disable the use of atomic operations within the tasks and…
- Resolved by Matthieu Schaller
Yes, I thought one of your main concerns was that future implementers would need to be aware of the use of atomics. Having an explicit set of interfaces that provide commit access to the struct seemed to document the don't write directly to the struct. Of course if all these functions are already at the level of never needing modification then this doesn't matter. I was also concerned that the check test sections are not corrected to not use atomics, of course that probably is just a noop in practice.
Edited by Peter W. DraperI see what you mean. That's a good idea indeed. I'll add a layer there.
And yes, the check functions only exist in the atomic flavour. I already feel that maintaining an atomic and non-atomic flavour of the main code will be a pain in the long run. Having to also maintain two versions of the accuracy tests is too much I think.
added 4 commits
- 5ee57ba2 - Hide the atomics into a layer of functions that can be used to update the…
- 85af978e - Apply the same behaviour to the accumulators used to check the accuracy of the gravity calculation.
- 449346aa - Added an atomic max for int
- ac2448b1 - Apply the same change to the max operation taking place in the timestep limiter task
Toggle commit listadded 1 commit
- 271b1b15 - Do not report the task times when rebuilding after a repartiton. Do so before…
@nnrw56 do you have any feelings about this?