X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/18e10c8748bc9c49dadbb9f59d188614f5ac196f..5edec65e26d76490b9753d8db950a8a2ddf3cb2c:/examples/c/dht-pastry/generate.py diff --git a/examples/c/dht-pastry/generate.py b/examples/c/dht-pastry/generate.py index ea834bd79c..e0d9ca7224 100755 --- a/examples/c/dht-pastry/generate.py +++ b/examples/c/dht-pastry/generate.py @@ -1,15 +1,17 @@ #!/usr/bin/env python -# Copyright (c) 2011-2020. The SimGrid Team. +# Copyright (c) 2011-2023. The SimGrid Team. # All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the terms of the license (GNU LGPL) which comes with this package. -# This script generates a specific deployment file for the Chord example. -# It assumes that the platform will be a cluster. -# Usage: python generate.py nb_nodes nb_bits end_date -# Example: python generate.py 100000 32 1000 +""" +This script generates a specific deployment file for the Chord example. +It assumes that the platform will be a cluster. +Usage: python generate.py nb_nodes nb_bits end_date +Example: python generate.py 100000 32 1000 +""" import sys import random @@ -29,8 +31,8 @@ all_ids = [42] sys.stdout.write("\n" "\n" "\n" - " " - "\n" % end_date) + " " + "\n" % end_date) for i in range(1, nb_nodes): @@ -41,8 +43,8 @@ for i in range(1, nb_nodes): known_id = all_ids[random.randint(0, len(all_ids) - 1)] start_date = i * 10 - line = " " \ - "\n" % ( + line = " " \ + "\n" % ( i, my_id, known_id, start_date, end_date) sys.stdout.write(line) all_ids.append(my_id)