The new Circuitscape - modern, fast and scalable.
Clone or download
ranjanan Port to 1.0 (#155)
* Get using to work

* Fix some more warnings

* Finish network pairwise and advanced

* Get raster advanced to work

* Fix bug in onetoall

* Fix replace depwarn

* Fix contains depwarn

* Fix float depwarn

* Fix find depwarn [ci skip]

* Fix Array dep warns [ci skip]

* Fix round depwarn [ci skip]

* More depwarn fixes [ci skip]

* More depwarns [ci skip]

* More [ci skip]

* More dep warns

* Fix findnz dep warn [ci skip]

* More depwarns [ci skip]

* Finish dep warns

* Update travis and appveyor

* Update all the REQUIRES

* A few fixes to tests

* Fix some deprecated APIs in cholmod mode
Latest commit bcbf314 Oct 12, 2018

README.md

Circuitscape

Linux and OSX: Build Status Coverage Status codecov.io

Windows: Build status

Circuitscape is an open-source program that uses circuit theory to model connectivity in heterogeneous landscapes. Its most common applications include modeling movement and gene flow of plants and animals, as well as identifying areas important for connectivity conservation.

Circuitscape has now been rewritten in Julia for better performance and scalability. Julia is modern open-source language for scientific computing.

This work is based on the original Circuitscape project by Brad McRae, Viral B. Shah and Tanmay Mohapatra.

The New Circuitscape - Modern, Fast and Flexible

The new Circuitscape is built entirely in the Julia language, a new programming language for technical computing. Julia is built from the ground up to be fast. As such, this offers a number of advantages over the previous version, and these are detailed below.

Faster and More Scalable

We benchmarked Circuitscape.jl (v0.1.0) with the Python version (v4.0.5) to obtain the following results. We started up Circuitscape with 16 parallel processes, and used benchmark problems from the standard Circuitscape benchmark suite.

These benchmarks were run on a Linux (Ubuntu) server machine with the following specs:

  • Name: Intel(R) Xeon(R) Silver 4114 CPU
  • Clock Speed: 2.20GHz
  • Number of cores: 20
  • RAM: 384 GB

From the benchmark, we see that the new version is upto 4x faster on 16 processes. However, the best performing bar in the chart is Julia-CHOLMOD, which is a new feature introduced.

New Solver Mode - CHOLMOD

Julia-CHOLMOD is a new solver mode used in the new Circuitscape. It performs a cholesky decomposition on the graph constructed, and performs a batched back substitution to compute the voltages. It plugs into the CHOLMOD library, which is part of the SuiteSparse collection of high performance sparse matrix algorithms.

To use the this new mode, include a line in your Circuitscape INI file:

solver = cholmod

The cholesky decomposition is a direct solver method, unlike the algebraic multigrid method used by default in both the old and the new version. The advantage with this new direct method is that it can be much faster than the iterative solution, within a particular problem size.

Word of caution: The cholesky decomposition is not practical to use beyond a certain problem size because of phenomenon called fill-in, which results in loss of sparsity and large memory consumption.

Parallel, everywhere

The old Circuitscape had limited support for parallelism, which worked on Mac and Linux, but didn't work on Windows.

Julia as a programming language is built from the ground up to be parallel, and as a result the new Circuitscape natively supports parallelism on all three platforms.

Single Precision (Experimental)

The new Circuitscape introduces the ability to run problems in single precision as opposed to the standard double precision.

Single precision usually takes much less memory, but trades off against solution accuracy.

Use this new feature by including a line in your config file:

precision = single

Installation

  1. You will need to install Julia on your system first.

  2. Once you start Julia, install Circuitscape by:

julia> Pkg.add("Circuitscape")

If you want the latest development version, you can additionally do:

julia> Pkg.checkout("Circuitscape")

Check if all the tests are passing by doing the following:

julia> Pkg.test("Circuitscape")

Usage

The current interface to Circuitscape is through the Julia terminal.

julia> using Circuitscape # loads the package into your environment
julia> compute("path/to/config/file.ini")

Contributing

If you have encounter any issues or would like to ask a question, please file a report here. Contributions in the form of pull requests are also welcome!