The main goal of the project is to create an easy way to implement and benchmark scheduling algorithms while leveraging the powerful SimGrid simulation framework.
https://alexmnazarenko.github.io/pysimgrid/index.html
This work is supported by the Russian Foundation for Basic Research (projects 15-29-07043, 15-29-07068).
Running a simulation:
from pysimgrid import simdag
import pysimgrid.simdag.algorithms as algorithms
with simdag.Simulation("test/data/pl_4hosts.xml", "test/data/basic_graph.dot") as simulation:
scheduler = algorithms.Lookahead(simulation)
scheduler.run()
print(simulation.clock, scheduler.scheduler_time, scheduler.total_time)
Implementing your very own scheduling algorithm:
from pysimgrid import simdag
import networkx
class RandomSchedule(simdag.StaticScheduler):
def get_schedule(self, simulation):
schedule = {host: [] for host in simulation.hosts}
graph = simulation.get_task_graph()
for task in networkx.topological_sort(graph):
schedule[random.choice(simulation.hosts)].append(task)
return schedule
C++
Python
Install system dependencies (list is not full):
sudo apt-get install libboost-context-dev libboost-program-options-dev libboost-filesystem-dev doxygen graphviz-dev
Use provided scripts to get dependencies:
./get_simgrid.sh
Installation:
python3 setup.py install --user
Inplace build
python3 setup.py build_ext --inplace
Test the build:
python3 run_tests.py
SimGrid source distribution contains quite a few of platform examples of different complexity and scale.
They are not supported for now. Two main reasons: