New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve scalability of insertion in LIGGGHTS #1

merged 1 commit into from Jul 21, 2015


None yet
1 participant
Copy link

rbberger commented Jul 21, 2015

The current insertion algorithm exhibits poor scaling performance with a runtime complexity of O(n²). This is due to the fact that during each time step a utility data structure is build up to hold any particles which might collide with newly inserted particles. If a large number of particles is inserted this linear list of particles will grow accordingly. E.g. if 3 million particles are inserted, the last particle will check 2,999,999 particles for possible overlap.

To improve this situation, this PR introduces a cell list data structure around the insertion volume to replace the linear list of particles. This reduces lookup times during overlap checking.

The PR also includes a simple benchmark test case which can be used to compare the scaling of the old and the new version of the code. This test case simply inserts a specified number of particles into the domain box. The tests ranged from 10,000 - 150,000 particles. As the number of particles increases the achieved speedup of the optimized code continues to grow due to the better
runtime complexity. With a serial run (Intel Core i7-3770) of inserting 150,000 particles into a box a speedup of 76x was observed.

The full scaling change is summarized by the following Figure. While the old code exhibits O(n²) runtime complexity, the optimized variant shows nearly linear scaling. Notice the differences in order of magnitude in the run times of the first two graphs. In the final plot both results are merged into one graph.


Optimization of fix insert classes
This patch reduces the computational overhead of particle insertion from
being O(n²) to O(n). It also includes a benchmark testcase for
insert/pack to illustrate the benefit.

@rbberger rbberger self-assigned this Jul 21, 2015

rbberger added a commit that referenced this pull request Jul 21, 2015

Merge pull request #1 from ParticulateFlow/feature/insertion_optimiza…

Improve scalability of insertion in LIGGGHTS

@rbberger rbberger merged commit 1c86e65 into develop Jul 21, 2015

@rbberger rbberger deleted the feature/insertion_optimization branch Jul 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment