Giter Site home page Giter Site logo

parallelbitonicsort's Introduction

Parallel Bitonic Sort

A task in my parallel processing course which implements the Bitonic Sort algorithm on a multiprocessing machine with MPI (Message Passing Interface) support.

Bitonic sort is a sorting algorithm particularly well-suited for multicomputers. The project was designed to be run and tested on IU's Big Red 2 supercomputing cluster with multiple machines/nodes. MPI provides the concurrent, message-passing paralle computing support which enables the bitonic sort algorithm to work in parallel.

Dependencies, Installation, and Use

parallelBitonicSort requires MPICH to run. On Ubuntu or Debian, this can be accomplished by:

apt-get install mpich

which installs a metapackage with all the required MPICH components. The mpich-doc package is also useful for MPICH documentation.

Ensure this properly installs. The commands needed are mpicc, which is the MPI compiler, and mpiexec. Either of these can be run with the --version flag to verify the installation.

Running as-is

To build and run the software, simply execute the commands

make
make run [size]

with the optional size argument being a power of 2. If the size argument is not provided, the default size of 1024 will be used.

Changing the Number of Tasks

To change the number of tasks, 2 steps are involved.

NOTE: the number of tasks and size of the array to be sorted must both be a power of 2. Changing these to non-powers of 2 results in undefined behavior.

  1. Change the number of nodes in the mpiexec command in the makefile as follows:
mpiexec -n [num_nodes] ./bitonic
  1. Change the TASKS constant in bitonic.c to the number of tasks, and the STEPS constant to log2(TASKS). E.g., if TASKS is 8, then STEPS is 3, etc.

parallelbitonicsort's People

Contributors

natador avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.