Skip to content

Reuse sort code in "Build dual graph" - #1642

Merged
garth-wells merged 20 commits into
mainfrom
igor/reuse-sort
Jul 21, 2021
Merged

Reuse sort code in "Build dual graph"#1642
garth-wells merged 20 commits into
mainfrom
igor/reuse-sort

Conversation

@IgorBaratta

Copy link
Copy Markdown
Member
  • Avoid using intermediate "std::bitset" data structure.
  • For lexicographic sort, sort one column of the array at a time, starting from the rightmost column.
  • Work with std::int32_t in build_local_dual_graph: more efficient in non-comparison sort algorithms.

Example of achieved speedup using Performance Tests:

mpirun -n 6 ./dolfinx-scaling-test --ndofs 300000

This:

Compute local part of mesh dual graph                          |     4  0.684040  2.736162
ZZZ Create Mesh                                                |     1  6.757732  6.757732
ZZZ Create mesh entity permutations                            |     1  3.881517  3.881517

Main branch:

Compute local part of mesh dual graph                          |     4  0.980119  3.920477
ZZZ Create Mesh                                                |     1  8.116145  8.116145
ZZZ Create mesh entity permutations                            |     1  4.784420  4.784420

@IgorBaratta
IgorBaratta marked this pull request as ready for review July 21, 2021 10:59
@garth-wells
garth-wells merged commit d5c6114 into main Jul 21, 2021
@garth-wells
garth-wells deleted the igor/reuse-sort branch July 21, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants