Commit b977756a authored by Aggelos Giantsios's avatar Aggelos Giantsios

Document script that runs distributed orbit

parent eb061331
...@@ -106,6 +106,35 @@ Python 2.x is needed in order to run the scripts. ...@@ -106,6 +106,35 @@ Python 2.x is needed in order to run the scripts.
``` ```
- Distributed Orbit
```bash
python dist.py
```
Variables that can be tweaked with their default values.
```python
# Path to the file that will hold the results.
fname = 'dist.log'
# Number of repetitions per configuration.
reps = 1
# List of versions.
versions = ["short", "intermediate", "long"]
# Perform parallel image computations.
iwps = [False, True]
# No of cores used by each worker node.
cores = [1]
# Ratio of No of workers to No of cores in each worker node.
workersPerCore = 1
# Master node information
master = {"host": "127.0.0.1", "port": 5050}
# Maximum number of workers nodes
maxSlaves = 60
# No of workers nodes to add after each iteration
step = 2
# Port of the 1st worker node (Assume that the host will be localhost).
workerPort = 5051
```
Memory Profiling Memory Profiling
---------------- ----------------
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
from __future__ import print_function from __future__ import print_function
import sys, subprocess, time, os.path import sys, subprocess, time, os.path
# Path to the file that will hold the results.
fname = 'dist.log' fname = 'dist.log'
fexists = os.path.isfile(fname) fexists = os.path.isfile(fname)
if fexists: if fexists:
...@@ -19,15 +20,30 @@ def print_all(s): ...@@ -19,15 +20,30 @@ def print_all(s):
f.flush() f.flush()
print (s, file=sys.stdout) print (s, file=sys.stdout)
# Number of repetitions per configuration.
reps = 1 reps = 1
# List of versions.
versions = ["short", "intermediate", "long"] versions = ["short", "intermediate", "long"]
# Perform parallel image computations.
iwps = [False, True] iwps = [False, True]
# No of cores used by each worker node.
cores = [1] cores = [1]
# Ratio of No of workers to No of cores in each worker node.
workersPerCore = 1 workersPerCore = 1
# Master node information
master = {"host": "127.0.0.1", "port": 5050} master = {"host": "127.0.0.1", "port": 5050}
# Maximum number of workers nodes
maxSlaves = 60
# No of workers nodes to add after each iteration
step = 2
# Port of the 1st worker node (Assume that the host will be localhost).
workerPort = 5051
allAvailableSlaves = []
for port in range(workerPort, workerPort+maxSlaves):
allAvailableSlaves.append({"host": "127.0.0.1", "port": port})
slaves = [] slaves = []
for port in range(5051, 5051+64): for n in range(2, maxSlaves+1, step):
slaves.append({"host": "127.0.0.1", "port": port}) slaves.append(allAvailableSlaves[0:n])
if len(ls) == 0: if len(ls) == 0:
print_all("Parallel Orbit") print_all("Parallel Orbit")
...@@ -38,17 +54,17 @@ if len(ls) == 0: ...@@ -38,17 +54,17 @@ if len(ls) == 0:
print_all("Using Cores: %s" % cores) print_all("Using Cores: %s" % cores)
print_all("Workers Per Core: %s" % workersPerCore) print_all("Workers Per Core: %s" % workersPerCore)
print_all("Master @ %s" % master) print_all("Master @ %s" % master)
print_all("Slaves @ %s" % slaves) print_all("Slaves @ %s" % [len(xs) for xs in slaves])
print_all("======================================================================") print_all("======================================================================")
for iwp in iwps: for iwp in iwps:
for vsn in versions: for vsn in versions:
for n in range(2, 60+1, 2): for slvs in slaves:
for core in cores: for core in cores:
for rep in range(reps): for rep in range(reps):
workers = workersPerCore * core workers = workersPerCore * core
slvs = slaves[0:n] n = len(slvs)
l = "Slaves: %s, Version: %s, IWP: %s, Cores: %s, Workers: %s, Execution: %s" % (n, vsn, iwp, core, workers, rep) l = "Slaves: %s, Version: %s, IWP: %s, Cores: %s, Workers: %s, Execution: %s" % (n, vsn, iwp, core, workers, rep)
if l in ls: if l in ls:
continue continue
......
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