]> https://gitweb.dealii.org/ - dealii.git/commit
Bulk write vector values in distribute_local_to_global. 3691/head
authorDavid Wells <wellsd2@rpi.edu>
Wed, 21 Dec 2016 17:28:48 +0000 (12:28 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Mon, 9 Jan 2017 14:40:25 +0000 (09:40 -0500)
commit5e8ed4e2c7793324a92f71f432d581a03b6b75aa
treec60f2d5334a79ad5cf75f6876538d8d9f3213afa
parent2b6af4a08cee8dc90b31ebd8bfc586d80726df2b
Bulk write vector values in distribute_local_to_global.

This patch lowers the total number of calls to VecSetValues in
ConstraintMatrix::distribute_local_to_global by writing new vector values to a
temporary array before sending them off to PETSc. There are no notable
performance improvements for the other vector classes (though this certainly
should not hurt).

I used step-40 to check that the performance improved. Here is the (filtered)
output with this patch:

[drwells@archway step-40]$ make run | grep assembly
| assembly                        |         1 |   0.00966s |       8.7% |
| assembly                        |         1 |    0.0122s |       6.4% |
| assembly                        |         1 |    0.0217s |       5.9% |
| assembly                        |         1 |    0.0431s |       5.6% |
| assembly                        |         1 |    0.0848s |       5.6% |
| assembly                        |         1 |     0.173s |       5.6% |
| assembly                        |         1 |     0.351s |       5.5% |
| assembly                        |         1 |     0.729s |       5.5% |

and on master:

[drwells@archway step-40]$ make run | grep assembly
| assembly                        |         1 |   0.00672s |       8.9% |
| assembly                        |         1 |    0.0133s |       7.2% |
| assembly                        |         1 |    0.0258s |       6.9% |
| assembly                        |         1 |    0.0513s |       6.8% |
| assembly                        |         1 |     0.101s |       6.6% |
| assembly                        |         1 |     0.203s |       6.5% |
| assembly                        |         1 |     0.414s |       6.4% |
| assembly                        |         1 |      0.93s |       6.9% |

so it appears that the whole assembly process takes about 10% less time.
doc/news/changes/minor/20161221DavidWells [new file with mode: 0644]
include/deal.II/lac/constraint_matrix.templates.h

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.