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

Very Slow Processing #190

Closed
simon-tarr opened this issue Jun 18, 2019 · 5 comments
Closed

Very Slow Processing #190

simon-tarr opened this issue Jun 18, 2019 · 5 comments

Comments

@simon-tarr
Copy link

simon-tarr commented Jun 18, 2019

More than likely that I'm doing something wrong but I feel that the processing time for my Circuitscape run is very slow. I'm running Win10, 16 core Xeon and 32GB RAM. It's a reasonably large raster but not excessively so (and definitely smaller than the test runs documented in the recent pre-print).

Here's a snippet out of the Julia console's output:

julia> using(Circuitscape)

julia> compute(".../input.ini")
[ Info: 2019-06-18 11:46:56 : Precision used: Double
[ Info: 2019-06-18 11:46:59 : Reading maps
[ Info: 2019-06-18 11:47:02 : Resistance/Conductance map has 4868756 nodes
[ Info: 2019-06-18 11:47:05 : Total number of pair solves = 224115
[ Info: 2019-06-18 11:47:05 : Solving pair 1 of 224115
[ Info: 2019-06-18 11:47:13 : Solver used: AMG accelerated by CG
[ Info: 2019-06-18 11:47:13 : Graph has 4868681 nodes, 2 focal points and 904 connected components
[ Info: 2019-06-18 11:47:33 : Time taken to construct preconditioner = 5.196665899 seconds
[ Info: 2019-06-18 11:47:36 : Time taken to construct local nodemap = 2.406266899 seconds
[ Info: 2019-06-18 11:47:48 : Time taken to solve linear system = 11.7900565 seconds
[ Info: 2019-06-18 11:47:49 : Solving pair 2 of 224115

The time printed to console says that it takes about 15 seconds to compute the first point. However, it takes many times this amount before proceeding to the next point. More like 45 seconds. Whether 15 seconds or 45 seconds, I have to solve 224,115 pairs....which is about 38 days of processing at the current rate of 1 point per 15 seconds or so!

I have uploaded my .ini file, resistance map and habitat raster here as I'm wondering if I have mis-configured my .ini file, or if there is some other issue with my input files? I've noticed that only one core of my machine is utilised. Is there a way to force it to use all 16 cores simultaneously?

Thanks in advance.

@ViralBShah
Copy link
Member

How much time for the python version?

@simon-tarr
Copy link
Author

Good question - I haven't timed it using the old Python version. I can try doing that now.
I'd be curious if others can replicate the "slow" processing with the files attached above, however.

@ranjanan
Copy link
Member

Any update on how much time the Python version takes?

@vlandau
Copy link
Member

vlandau commented Jul 10, 2019

I've noticed that only one core of my machine is utilised. Is there a way to force it to use all 16 cores simultaneously?

@simon-tarr Add the below code to your .ini file to utilize parallel processing. There has been an issue with SharedArrays (which Circuitscape's parallel processing relies on) in Windows, so be wary of that.

parallelize = True
max_parallel = 15

Note that parallelization requires more memory usage, but I think it should be fine given your 32GB of RAM and the relatively small size of your resistance grid. If memory does become a problem, trying using single precision (add precision = single to your .ini file).

@ViralBShah
Copy link
Member

I am tempted to close this one and reopen if slower than the earlier python code.

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

No branches or pull requests

4 participants