Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
M
MPI_Distributed_Programming
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
saad.aswad
MPI_Distributed_Programming
Commits
13616b3b
Commit
13616b3b
authored
Jan 04, 2026
by
saad.aswad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Final] Add SimGrid and scripts
parent
02281e68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
1 deletion
+64
-1
README.md
README.md
+23
-1
run_tests.sh
run_tests.sh
+9
-0
deployment.xml
simgrid/deployment.xml
+14
-0
platform.xml
simgrid/platform.xml
+18
-0
No files found.
README.md
View file @
13616b3b
...
...
@@ -8,4 +8,26 @@ Implementation of Prefix Sum and Tree-based Reduce using mpi4py.
-
OpenMPI (System installed)
## Usage
Run via
`run_tests.sh`
.
### 1. Parallel Prefix Sum (Problem 1)
```
bash
mpiexec
-n
<NP> python3 src/problem1/prefix_sum.py
```
### 2. Manual Tree Reduce & Benchmark (Problem 2)
```
bash
mpiexec
-n
<NP> python3 src/problem2/benchmark.py
```
### 3. SimGrid Simulation
SimGrid configurations are provided in
`simgrid/`
.
To run with SimGrid (if SMPI/Python bindings are configured):
```
bash
smpirun
-platform
simgrid/platform.xml
-hostfile
... python3 src/problem2/benchmark.py
```
## Running Tests
Execute the helper script:
```
bash
bash run_tests.sh
```
run_tests.sh
0 → 100644
View file @
13616b3b
#!/bin/bash
set
-e
echo
"Running Problem 1: Prefix Sum (NP=3)"
mpiexec
-n
3 python3 src/problem1/prefix_sum.py
echo
"-----------------------------------"
echo
"Running Problem 2: Manual Reduce Benchmark (NP=3)"
mpiexec
-n
3 python3 src/problem2/benchmark.py
simgrid/deployment.xml
0 → 100644
View file @
13616b3b
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform
version=
"4.1"
>
<!-- Actor deployment -->
<process
host=
"node-0"
function=
"python"
>
<argument
value=
"src/problem2/benchmark.py"
/>
</process>
<process
host=
"node-1"
function=
"python"
>
<argument
value=
"src/problem2/benchmark.py"
/>
</process>
<process
host=
"node-2"
function=
"python"
>
<argument
value=
"src/problem2/benchmark.py"
/>
</process>
</platform>
simgrid/platform.xml
0 → 100644
View file @
13616b3b
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform
version=
"4.1"
>
<zone
id=
"AS0"
routing=
"Full"
>
<!-- Cluster of 3 nodes, 4 cores each -->
<host
id=
"node-0"
speed=
"100Mf"
core=
"4"
/>
<host
id=
"node-1"
speed=
"100Mf"
core=
"4"
/>
<host
id=
"node-2"
speed=
"100Mf"
core=
"4"
/>
<link
id=
"link-0"
bandwidth=
"125MBps"
latency=
"100us"
/>
<link
id=
"link-1"
bandwidth=
"125MBps"
latency=
"100us"
/>
<link
id=
"link-2"
bandwidth=
"125MBps"
latency=
"100us"
/>
<route
src=
"node-0"
dst=
"node-1"
><link_ctn
id=
"link-0"
/><link_ctn
id=
"link-1"
/></route>
<route
src=
"node-1"
dst=
"node-2"
><link_ctn
id=
"link-1"
/><link_ctn
id=
"link-2"
/></route>
<route
src=
"node-0"
dst=
"node-2"
><link_ctn
id=
"link-0"
/><link_ctn
id=
"link-2"
/></route>
</zone>
</platform>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment