https://github.com/sferez/hpc_mpi_traveling_salesman
High Performance Computing MPI for Traveling Salesman Problem
https://github.com/sferez/hpc_mpi_traveling_salesman
cpp high-performance high-performance-computing mpi openmpi travelling-salesman-problem
Last synced: 7 months ago
JSON representation
High Performance Computing MPI for Traveling Salesman Problem
- Host: GitHub
- URL: https://github.com/sferez/hpc_mpi_traveling_salesman
- Owner: sferez
- Created: 2023-03-21T11:51:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T10:57:47.000Z (over 2 years ago)
- Last Synced: 2025-01-13T14:53:47.792Z (9 months ago)
- Topics: cpp, high-performance, high-performance-computing, mpi, openmpi, travelling-salesman-problem
- Language: C++
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# High Performance Technical Computing Project
This project focuses on the implementation of a High-Performance Technical Computing solution on an HPC cluster, utilizing MPI to parallelize the wandering salesman problem.
## Report
The report is available at Medium: [Article](https://medium.com/@simeon.ferez/solving-the-traveling-salesman-problem-with-parallel-computing-305f8324515d)

## Structure
The following code folders are included in this project:
- 'BruteForce' contains the brute force implementation of the Wandering Salesman Problem
- 'Branch_and_Bound' contains the branch and bound implementation of the Wandering Salesman Problem
- 'input' contains the input files for the algorithms from 4 to 18 citiesBoth folders contain a serial and a parallel implementation of the algorithm.
# Usage
- Have MPI installed on your system.
- Compile the code using mpic++.
- Run the code using mpirun.## Example
### Installing MPI
```bash
brew install open-mpi # For MacOS
```### Compiling
```bash
mpic++ Branch_and_Bound/mainMPI.cpp # Compiles the code
# or
mpic++ BruteForce/mainMPI.cpp # Compiles the code
```
Get the executable file 'a.out'.### Running
```bash
# Run the code on 4 processes
# using the input file 'input/dist16'
mpirun -np 4 ./a.out input/dist16
# or
# Run the code on 8 processes
# using the input file 'input/dist17'
mpirun -np 8 ./a.out input/dist17
```## Authors
- [@sferez](https://github.com/sferez)