Circuitscape/Circuitscape — pull request #29 by tanmaykm (2013-11-21 08:40:12+00:00)
Title: Parallelize pairwise module on posix compliant systems

This PR adds `fork` based parallelization to speed up pairwise calculations. Refer #3

Python multithreading was not of much help in cpu bound scenarios as this (because of python GIL). The `fork` based model was essential (instead of `multiprocessing` model) to not duplicate large amounts of memory used for data structures. Though it is possible to map arrays and matrices to shared memory, it was not possible to memory map data structures used by the `pyamg` module. The `multiprocessing` model can still be developed on top of this if required.

New configuration parameters:
- `parallelize`: False by default. May be overridden internally to False based on os support and suitability of the problem.
- `max_parallel`: 0 by default. Maximum number of processes to use in parallel (limited internally to number of processors). All processors would be used if set to 0.

A spinner control in the GUI manipulates the above two parameters. It ranges from 1 to number of processors, with 1 indicating no parallelization.