This is an implementation of the well known clustering algorithm K-Means. The implementation was done in C++ 17
using OpenMP 5.1
. The IDE used for the project was Visual Studio 2019
and the compiler was Intel Compiler 19.1
. The Effective Logical Core Utiliation percentage was 96.1 %.
To test the code in Linux, execute the commands:
- git clone https://github.com/andreasceid/k-means-parallel.git
- cd k-means-parallel
- chmod u+x disp_system_thread_count-ubu20.sh
- ./disp_system_thread_count-ubu20.sh
Write down the number on the output. We will use it later
- cd k-means-parallel
Edit
Common.h
, at line 27, and set variableNUM_THR
equal to the number we noted in step 5
- make
- ./kmeans
The Intel VTune Profiler Performance Snapshot results were:
The program was also tested with different number of available threads, and the scaling is pictured below.
There are 2 scritps that detect system logical core number:
- For Linux (Tested on Ubuntu 20.04 64 bit): Bash Script
disp_system_thread_count-ubu20.sh
- For Windows (Tested on Windows 10 Version 20H2 64 bit): Powershell Script
disp_system_thread_count-win64.ps1
There is a PDF project report in Greek.