Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add insufficient memory checks #2224

Merged
merged 3 commits into from Sep 5, 2023
Merged

Conversation

Ericgig
Copy link
Member

@Ericgig Ericgig commented Sep 1, 2023

Description
When allocating memory in cython, we did not check if the memory was allocated or not due to lacking RAM.
kron_dia was particularly inefficient for bra & ket combination., which caused a segfault in the steadystate benchmarks.

Copy link
Contributor

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good. Do we have unit tests for both code paths?

@Ericgig
Copy link
Member Author

Ericgig commented Sep 5, 2023

Yes, in test mathematics we test kron for both dense and sparse non-square.

@Ericgig Ericgig merged commit 8895575 into qutip:master Sep 5, 2023
12 checks passed
@Ericgig Ericgig deleted the bug.memory_overflow branch September 5, 2023 13:58
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.

None yet

2 participants