A python library of commonly used, parallel algorithms
Medusa is a Python library of common, parallelized algorithms is proposed in order to meet the perceived need of professionals in data-heavy fields for parallel solutions without explicit parallel knowledge and understanding.The collection of algorithms is implemented in Python 3 and requires the multiprocessing package, as well as NumPy and networkx for certain modules. The multiprocessing package allows for parallel implementation over both shared and distributed memory, though Medusa is designed to be run on a distributed memory system.
Medusa is intended for use by scientists and programmers in technical and computational fields, but who may not have a programming background. Medusa is developed in Python using the multiprocessing module in order to parallelize code, which results in slower runtimes compared to other languages, such as C++. Naturally, we come to emphasize ease of use and abstraction over raw speed. Runtime efficiency is, of course, an important trait in parallel code, but is not a priority over simplicity.
The recommended method of setting up the required Python environment and dependencies is to use the conda dependency manager:
$ conda create -n py36 python=3.6.1 # Create a python3.6 virtual environment
$ source activate py36 # Activate the virtual environment
$ conda install --file requirements.txt # Install dependencies
$ git clone https://github.com/Akards/Medusa.git # Clone the repo
$ cd Medusa # Switch to the MICA root directory
$ python setup.py install # Install MICA from source
Below, you can find the current classes of algorithms in Medusa. Within each subsection, all currently implemented algorithms are listed. Any further documentation can be found on the README files found inside each module.
Any sorting algorithms are included in the module Medusa/sort/
.
- Merge Sort
- Bitonic Sort
- Paradis
Any matrix operations, or linear algebra related algorithms are included in /Medusa/matrix/
. Matrix operations are implemented using NumPy arrays in order to improve runtime efficiency.
- Multiplication
- Addition
Any algorithms related to graphs are included in /Medusa/graphs/
. These are implemented taking into account the use of networkx.
- Breadth-first search
- Boruvka's Algorithm
Unit testing for Medusa is implemented using the pytest package. In order to run all of the tests from the project's root, simply call:
python -m pytest