Skip to content

OpenMP parallelized merge sort optimized with merge sort algorithm (for the record, this seems to be the only version available on github that implemented merge sort algorithm with OpenMP). Traditional parallel merge sort cannot efficiently parallel merge process. With merge path algorithm, we can achieve O(n/d) time complexity (traditional para…

Notifications You must be signed in to change notification settings

GlenGGG/FastParallelMergeSort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Fast Parallel Merge Sort With Merge Path

OpenMP parallelized merge sort optimized with merge sort algorithm (for the record, this seems to be the only version available on github that implemented merge sort algorithm with OpenMP). Traditional parallel merge sort cannot efficiently parallel merge process. With merge path algorithm, we can achieve O(n/d) time complexity (traditional parallel merge sort can only achieve O(n) during the last few merge steps) on merge process. More detail about merge sort algorithm can be found: https://arxiv.org/abs/1406.2628 . This code also implemented plain, binary, segmented merge path and unsegmented merge path versions of parallel merge sort.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have gcc and make in your PATH.

Installing

Clone this repository.

git clone https://github.com/GlenGGG/FastParallelMergeSort.git
cd FastParallelMergeSort

Build the project

make

Usage

Simply run the code.

./omp_mergesort [num_threads] [array_length] [--merge-type-{plain, binary, mergepath, segmented-mergepath}] [--inc-threads]

For example, run this code to get an insight:

./omp_mergesort 16 20000000 --inc-threads

About

OpenMP parallelized merge sort optimized with merge sort algorithm (for the record, this seems to be the only version available on github that implemented merge sort algorithm with OpenMP). Traditional parallel merge sort cannot efficiently parallel merge process. With merge path algorithm, we can achieve O(n/d) time complexity (traditional para…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published