Skip to content

Implement optimized clusterization

Julia Hrdinka requested to merge ACTS-468_FasterClusterization into master

Closes ACTS-468.

After using the new clusterization inside FCCSW with 1000PU (53 944 836 number of cells in total on 49019 surfaces) I found, that it was very slow (~15min).

Therefore I was optimizing the cell merging & cluster merging algorithm together with @rlangenb. The problem was that setting the edges of the boost graph was very slow.

Now we find the neighbours, merge the cells and create the clusters at once. We tried two different approaches to find the activated neighbours of a given cell:

  1. Moving our look up window to the right and break the loop, as soon as it can not be a neighbour; do the same for the left side
  2. Using a hashmap with all the neigbours It was found that the second approach took less than half of the time (~47s) for a 1000PU event. Using a std::map instead of std::unordered_map was slower by ~50%. We also found that copying the cells is faster than using pointers to cells, because cells are very small structs.

Since for FCC we have a huge amount of cells, each little change can make a difference. Therefore if you find a possible optimization please write a comment.

Edited by Julia Hrdinka

Merge request reports