Git Product home page Git Product logo

pysimgrid's Introduction

pysimgrid

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.

Features:

  • Simulate different scheduling distributed platforms
  • Implement your own scheduling algorithms
  • Compare them with well-known approaches (e.g. HEFT). Batteries included )
  • Run your simulations in parallel

Documentation:

https://alexmnazarenko.github.io/pysimgrid/index.html

Acknowledgements:

This work is supported by the Russian Foundation for Basic Research (projects 15-29-07043, 15-29-07068).

Examples

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

Dependencies

C++

  • C++11 capable compiler (tested with GCC/G++ 4.8.4)
  • SimGrid built with graphviz support (build script provided, tested v3.13)
  • CMake (for building SimGrid)

Python

Build instructions

Ubuntu 14.04+

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

Development build

Inplace build

python3 setup.py build_ext --inplace

Test the build:

python3 run_tests.py

FAQ

1. Where to get platform definition files? They look scary.

SimGrid source distribution contains quite a few of platform examples of different complexity and scale.

2. Where to get some ready DAGs?

3. What about multi-core tasks?

They are not supported for now. Two main reasons:

  • Existing SimGrid task parsers do not support them, so you need custom task format to even setup this.
  • There are some discouraging words in SimGrid documentation about validity of such simulation.
  • API seems to be "in progress"

pysimgrid's People

Contributors

alexmnazarenko avatar osukhoroslov avatar rialeksandrov avatar vurmux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.