Commit abe13aec authored by saad.aswad's avatar saad.aswad

[Setup] Init project

parents
name: Build and Test
on:
push:
branches: [ "master", "development" ]
pull_request:
branches: [ "master", "development" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install System MPI
run: |
sudo apt-get update
sudo apt-get install -y openmpi-bin libopenmpi-dev
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mpi4py numpy
- name: Run Tests
# Assuming we will create a run_tests.sh or similar
run: |
if [ -f run_tests.sh ]; then
chmod +x run_tests.sh
./run_tests.sh
else
echo "No tests definition found yet."
fi
__pycache__/
*.pyc
.vscode/
.idea/
*.pdf
# MPI Distributed Programming Assignment
Implementation of Prefix Sum and Tree-based Reduce using mpi4py.
## Requirements
- Python 3
- mpi4py
- OpenMPI (System installed)
## Usage
Run via `run_tests.sh`.
def generate_data(size):
import numpy as np
return np.random.randint(0, 11, size)
def verify_prefix_sum(original_data, prefix_sum_result):
import numpy as np
expected = np.cumsum(original_data)
return np.allclose(expected, prefix_sum_result)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment