Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Handle memory errors with appropriate message #70

Open
bmcrae opened this issue May 9, 2014 · 2 comments
Open

Handle memory errors with appropriate message #70

bmcrae opened this issue May 9, 2014 · 2 comments

Comments

@bmcrae
Copy link
Contributor

bmcrae commented May 9, 2014

Amy Guthrie's problem posted to the user group caused memory errors in compute_base at the line:
G = -G + sparse.spdiags(G.sum(0), 0, n, n)

However, the code interprets this as a solver failure and does not provide a memory error message. Not sure why this continued execution, it may be wrapped in a try-except statement in a calling function. Best way to handle this would be to give our standard memory error with recommendation to see the user guide (as done in gui.py).

@tanmaykm
Copy link
Member

I was unable to trace the path where a memory error in laplacian would be ignored. The stack trace posted in the user_group pointed to methods _create_current_maps and _get_branch_currents_posneg, don't they?

Plus, I don't think we elegantly handle MemoryErrors in parallel execution yet.

@bmcrae
Copy link
Contributor Author

bmcrae commented May 13, 2014

There were errors happening in two places- one of them was the stack trace when it tried to write current maps (i.e. the code behaved as it should here I think). The other was just being reported as a solver failure. When I tested Amy's problem, the line in laplacian was where errors were occurring, but these were just being reported as solver failures. When I wrapped that line in a try... except memoryError statement it caught it fine.

I hadn't thought about memory errors in parallel. Ouch, that makes my head hurt.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants