Skip to content

Reduced memory footprint of spectral discretizations via block-diagonal sparse operators#565

Merged
pancetta merged 1 commit into
Parallel-in-Time:masterfrom
brownbaerchen:diag_operators
Jul 7, 2025
Merged

Reduced memory footprint of spectral discretizations via block-diagonal sparse operators#565
pancetta merged 1 commit into
Parallel-in-Time:masterfrom
brownbaerchen:diag_operators

Conversation

@brownbaerchen
Copy link
Copy Markdown
Contributor

The spectral discretizations require a few block-diagonal matrices among all degrees of freedom. Constructing them as such actually reduces the memory requirements quite a bit compared to constructing general block matrices with only the diagonal blocks.
This is independent of the larger refactor, which is why I did a separate PR.
I added a test that the resulting operators are the same and that indeed memory is reduced.

@pancetta
Copy link
Copy Markdown
Member

pancetta commented Jul 5, 2025

How large are these matrices in general?

@brownbaerchen
Copy link
Copy Markdown
Contributor Author

brownbaerchen commented Jul 6, 2025 via email

@pancetta
Copy link
Copy Markdown
Member

pancetta commented Jul 7, 2025

Allocation of memory in Python is not straightforward (and not efficient if done manually). Relying on libraries like scipy is strongly recommended over lists (or so).

@pancetta pancetta merged commit d56045a into Parallel-in-Time:master Jul 7, 2025
46 of 47 checks passed
brownbaerchen added a commit to brownbaerchen/pySDC that referenced this pull request Jan 20, 2026
#!!!!!! WARNING: RUFF FAILED !!!!!!: 

#F811 Redefinition of unused `RBC2DG4R4ResARa1e5` from line 524
#   --> pySDC/projects/RayleighBenard/RBC3D_configs.py:529:7
#    |
Parallel-in-Time#529 | class RBC2DG4R4ResARa1e5(RBC2DResA):
#    |       ^^^^^^^^^^^^^^^^^^ `RBC2DG4R4ResARa1e5` redefined here
Parallel-in-Time#530 |     Tend = 100
Parallel-in-Time#531 |     res = 64
#    |
#   ::: pySDC/projects/RayleighBenard/RBC3D_configs.py:524:7
#    |
Parallel-in-Time#524 | class RBC2DG4R4ResARa1e5(RBC2DResA):
#    |       ------------------ previous definition of `RBC2DG4R4ResARa1e5` here
Parallel-in-Time#525 |     Tend = 100
Parallel-in-Time#526 |     res = 64
#    |
#help: Remove definition: `RBC2DG4R4ResARa1e5`
#
#F811 Redefinition of unused `RBC2DG4R4SDC23A10Ra1e6` from line 565
#   --> pySDC/projects/RayleighBenard/RBC3D_configs.py:578:7
#    |
Parallel-in-Time#578 | class RBC2DG4R4SDC23A10Ra1e6(RBC2DM2K3A):
#    |       ^^^^^^^^^^^^^^^^^^^^^^ `RBC2DG4R4SDC23A10Ra1e6` redefined here
Parallel-in-Time#579 |     Tend = 50
Parallel-in-Time#580 |     res = 128
#    |
#   ::: pySDC/projects/RayleighBenard/RBC3D_configs.py:565:7
#    |
Parallel-in-Time#565 | class RBC2DG4R4SDC23A10Ra1e6(RBC2DM2K3A):
#    |       ---------------------- previous definition of `RBC2DG4R4SDC23A10Ra1e6` here
Parallel-in-Time#566 |     Tend = 100
Parallel-in-Time#567 |     res = 64
#    |
#help: Remove definition: `RBC2DG4R4SDC23A10Ra1e6`
#
#Found 2 errors.:
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