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

Commit 3fec3b4

Browse files
committed
checks for memory error in a few more places.
included csgui.py in the python package.
1 parent e539f8f commit 3fec3b4

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

circuitscape/compute.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ def single_ground_all_pair_resistances(self, g_habitat, fp, cs, report_status):
566566
else:
567567
try:
568568
result = Compute.single_ground_solver(G, local_src, local_dst, options.solver, self.state.amg_hierarchy)
569+
except MemoryError:
570+
raise MemoryError
569571
except:
570572
result = None
571573
post_solve(result)

circuitscape/state.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def worker_pool_submit(self, function, callback, *args):
4444
else:
4545
try:
4646
result = function(*args)
47+
except MemoryError:
48+
raise MemoryError
4749
except:
4850
result = None
4951
callback(result)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
author = __author__,
99
author_email = __email__,
1010
packages = ['circuitscape', 'circuitscape.verify'],
11-
scripts = ['bin/csrun.py','bin/csverify.py'],
11+
scripts = ['bin/csrun.py','bin/csgui.py','bin/csverify.py'],
1212
url = 'http://www.circuitscape.org/',
1313
license = 'LICENSE.txt',
1414
description = 'Circuitscape borrows algorithms from electronic circuit theory to predict patterns of movement, gene flow, and genetic differentiation among plant and animal populations in heterogeneous landscapes.',

0 commit comments

Comments
 (0)