Giter Site home page Giter Site logo

vyom1611 / medianized-mpi-quicksort Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 65 KB

A parallelized version of the Quicksort algorithm optimized with a median selection mechanism, using MPI for handling large datasets. This project focuses on improved pivot selection and ensures balanced workload distribution across multiple processes, maximizing the parallel efficiency.

Makefile 0.84% C 99.16%

medianized-mpi-quicksort's Introduction

Medianized-MPI-Quicksort

A performance-optimized, parallel implementation of the Quicksort algorithm using MPI, emphasizing a median-based pivot selection mechanism.


Table of Contents


Introduction

Quicksort, though highly efficient in average-case scenarios, can be bottlenecked with large datasets. This project parallelizes the Quicksort algorithm with MPI and employs an optimal median-based pivot selection to enhance its performance, making it suitable for distributed environments.


Features

  • Median-Based Pivot Selection:

    • Extracts local medians from segments of data.
    • Aggregates to decide an overall median, ensuring efficient partitioning.
  • Optimized Parallel Quicksort:

    • Data Decomposition: Distributes data evenly across processes.
    • Reduced Communication Overhead: Uses MPI functionalities to minimize inter-process communication.
    • Dynamic Process Segregation: Segregates processes based on their relative data values to efficiently tackle data chunks.

Installation and Usage

Requirements: MPI installed

# Clone the repository
git clone https://github.com/vyom1611/Medianized-MPI-Quicksort.git

# Navigate into the directory
cd Medianized-MPI-Quicksort

# Compile the main file
mpicc -o mpi_qs main.c

# Run the program with desired number of processes and parameters
mpirun -np [Number of Processes] ./mpi_qs [Total Number of Integers] [Output File Name]

Performance Insights

The project utilizes the median of medians strategy for pivot selection, resulting in more balanced partitions and efficient sorting. The time metrics showcase the speed-up gained from this parallel approach.

Screenshot 2023-11-01 at 5 15 24 PM

medianized-mpi-quicksort's People

Contributors

vyom1611 avatar

Watchers

 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.