vincent-maillou / qttools

Quantum Transport Algorithms Toolbox
GNU General Public License v3.0
5 stars 1 forks source link

Datastructure Features #29

Closed vetschn closed 2 months ago

vetschn commented 3 months ago

This should close #27 and related issues.

vincent-maillou commented 2 months ago

As we are supporting to_dense() I think we should also support to_sparse() here are my reasons why:

vetschn commented 2 months ago

I managed to mostly handle the higher stack dimensions. However, there is a very weird bug in the distributed transposition somewhere that I haven't been able to pin down yet. Most of the time the .dtranspose() works beautifully, but for some seemingly random combinations of stack_shape and comm.size the data on certain ranks is wrong.

vetschn commented 2 months ago

The GPU aware implementation is working as well now, i.e. all the datastructure test cases pass both with cupy and numpy backend. The data corruption problem mentioned above is not fixed yet and i need to add a couple more tests.

vetschn commented 2 months ago

Everything should work now, last steps are increasing test coverage.

One thing to note: Currently, as we have no GPU-aware MPI, .dtranspose() does not work with the cupy backend. Calling it when using cupy will raise segmentation faults (!)

Edit: I made it so that dsbsparse checks if the MPI backend is GPU-aware.

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 81.21547% with 68 lines in your changes missing coverage. Please review.

Please upload report for BASE (dev@67de316). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/qttools/datastructures/dsbsparse.py 76.61% 29 Missing :warning:
src/qttools/datastructures/dsbcoo.py 83.96% 17 Missing :warning:
src/qttools/utils/gpu_utils.py 60.00% 16 Missing :warning:
src/qttools/datastructures/dsbcsr.py 93.75% 3 Missing :warning:
src/qttools/utils/mpi_utils.py 81.81% 2 Missing :warning:
src/qttools/greens_function_solver/inv.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #29 +/- ## ====================================== Coverage ? 69.53% ====================================== Files ? 17 Lines ? 650 Branches ? 0 ====================================== Hits ? 452 Misses ? 198 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 months ago

Code Coverage

Package Line Rate Health
. 100%
datastructures 81%
greens_function_solver 22%
obc 92%
utils 64%
Summary 70% (452 / 650)