sinhaparth5/zig-mpi-alogrithms
MPI processing algorithms in Zig
This project implements parallel algorithms using MPI (Message Passing Interface) in Zig. Currently, it includes a parallel merge sort implementation.
For Ubuntu/Debian:
sudo apt update
sudo apt install zig openmpi-bin libopenmpi-dev build-essential
For macOS:
brew install zig open-mpi
mpi-algorithms/
├── build.zig # Build configuration
├── src/
│ ├── main.zig # Main entry point
│ ├── sort.zig # Sorting implementations
│ ├── utils.zig # Utility functions
│ └── types.zig # Type definitions
└── README.md # This file
git clone https://github.com/sinhaparth5/mpi-algorithms
cd mpi-algorithms
zig build
To run the parallel merge sort with 4 processes:
mpirun -np 4 zig-out/bin/mpi-algorithms
You can adjust the number of processes by changing the -np
parameter.
To run the test suite:
zig build test
The parallel merge sort implementation:
This project is licensed under the MIT License - see the LICENSE file for details.