Skip to content

LaurabelleKay/Parallel-kMeans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Implementations of the k-Means Algorithm

Sequential, MPI, and OpenCL implementations of the k-means clustering algorithm.

Prerequisites

  • OpenMPI
  • OpenCL
  • Python 2.7 (or greater)

Input format

A text file for the x coordinates and another for the y, example inputs are in the Data folder

Run instructions

Compile the programs with

make

Note: The default OpenCL compiler is nvcc, edit the makefile for AMD/Intel GPUs

Sequential

./kMeans [n] [k] [x file] [y file]

Example:

./kMeans 1000 8 Data/X1000.txt Data/Y1000.txt

MPI

./kMeanMPI [n] [k] [x file] [y file]

OpenCL

./kMeansCL [n] [k] [x file] [y file]

Visualisation

Sequential

python plot.py [x file] [y file]

MPI

python plotMPI.py [x file] [y file]

OpenCL

python plotOCL.py [x file] [y file]

About

kMeans clustering with MPI and OpenCL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published