Commit 27bda0f
authored
Trilinos refactoring and updating (SimVascular#424)
* Trilinos updated:
* main packages updates: Epetra->Tpetra; AztecOO->Belos; Ifpack->Ifpack2; ML->MueLu
* refactor linear algebra backend to use Teuchos and Kokkos:
- wrap Tpetra vectors and matrices with Teuchos::RCP for safer memory management and automatic reference counting.
- use Kokkos (via Tpetra::Node/KokkosDeviceWrapperNode) to abstract parallel execution (same code to run efficiently on CPU and GPU theoretically)
* removed all static objects
* change of IC/ICT preconditioners in favor of RILUK(0)/RILUK(1)
* Updating dockerfiles:
* removed ubuntu20 and ubuntu22 folders. Created ubunut/ folder that contains dockerfile based on ubuntu-latest
* modified the solver/dockerfile to use the ubuntu-latest docker container as a base
* Updated dockerfiles and workflow file to use the latest docker container:
* simvascular/libraries:latest is the image containing the latest trilinos built
* Update the input files of trilinos related test cases for fluid and fsi
* increased the maximum iteration number for linear solver
* add the fluid case iliac artery with ml preconditioner
* Modifications and improvements:
* kokkos::finalize has been moved inside the TrilinosImpl class, fixing the compilation errors whenever trilinos is not used
* trilinos linear solver residual test has been properly set, fixing first non-linear iteration problem of maxing out the linear iterations reducing excessively and unnecessarily the residual
* Updating Trilinos packages list in README.md
* Final update on dockerfile
* Fix buffer overflow in genBC_Integ_X (set_bc.cpp):
* string length was computed incorrectly, leading to silent buffer overflow.
* this only surfaced as a critical memory crash when linking with the latest Trilinos libraries.
* Changes to CMake to fix coverage and unit test mismatch
* Modifying cmake file t ofix the coverage error
* Fix coverage target for GCC (lcov/geninfo):
- Added --ignore-errors mismatch to avoid geninfo line mismatch errors
- Added --rc geninfo_unexecuted_blocks=1 to silence GCC warnings
* fix coverage: correct path expansion in 'lcov --remove ' command
* Removing the unit tests from coverage
* Refactor CMake: unify solver build, exclude unit tests from coverage
* Built solver sources into a shared object library (solver_objs)
so they can be reused by both the main executable and unit tests.
This avoids recompiling solver sources twice when ENABLE_UNIT_TEST
is enabled.
* Excluded unit tests from code coverage by removing coverage flags
from the run_all_unit_tests target (-fno-profile-arcs, -fno-test-coverage).
This prevents .gcda files from being generated for test code,
ensuring coverage only reflects solver sources.
* Removing the unit tests folder '*/CMakeFiles/run_all_unit_tests.dir/*'
from the coverage.
* Remove '*/CMakeFiles/run_all_unit_tests.dir/*' from the coverage list
* Adding the following flags in the Cmake file under the enable_coverage section:
* --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1
* --ignore-errors unused
These flags allowed to save a coverage file even in presence of errors of mismatch type.
Fix some parametres setting in the Trilinos GMRES solver: krylov space, max iteration and max restarts.
* Updates in new trilinos implementation:
* add timer for the linear solver in Trilinos
* add the possibility to read the MueLu Options for the ML preconditioner from file mueluOptions.xml
if file is not present built-in parameters are used
* Using fsils for the mesh equation in FSI test cases
* Fixed allocation problem in the graph creation:
* the localt to global map was created in sorted order, while the graph allocated in unsorted order
* the graph is now created using the sorted order like the map1 parent 44fc5ec commit 27bda0f
File tree
23 files changed
+792
-1278
lines changed- .github/workflows
- Code/Source/solver
- Docker
- solver
- ubuntu22
- ubuntu
- tests/cases
- fluid
- iliac_artery_trilinos_gmres_ilut
- pipe_RCR_3d_trilinos_bj
- fsi
- pipe_3d_trilinos_bj
- pipe_3d_trilinos_ml
23 files changed
+792
-1278
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
| 374 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
| 289 | + | |
| 290 | + | |
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
308 | | - | |
| 307 | + | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
0 commit comments