# -- For Random, we generate three different results using three
# starting RNG seeds (13000, 14000, 15000). We increment the starting RNG seed
# each time we change the number of tasks.
# -- For Proportional, we generate three different results using
# three different values for k (1, #tasks/#resources, #tasks)
# - We use no lower or upper limits.
# - Every result is verified and logged to a CSV file.
"""

import numpy as np
import code.support as support
import code.schedulers as schedulers
import code.devices as devices

# File containing the results
logger = support.Logger('results_with_mixed_costs.csv')
rng_seed_resources = 400
min_tasks = 1000
max_tasks = 10001
step_tasks = 100
seeds_for_random = [13000, 14000, 15000]


def run_mixed_costs():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Makespan')
    # Runs experiments for 10 resources
    run_for_n_resources(10)
    # Runs experiments for 100 resources
Ejemplo n.º 2
0
# - We schedule 10.000 tasks.
# - We run OLAR, Fed-LBAP, FedAvg, Random, and Proportional.
# - We use no lower or upper limits.
# - Each sample is composed of 100 executions of the schedulers.
# - We get 50 samples for each pair (scheduler, tasks)
# - The order of execution of the different schedulers is
# randomly defined. We set an initial RNG seed = 1000 and increase
# it every time we need a new order.
"""

import timeit
import numpy as np
import code.support as support

# File containing the results
logger = support.Logger('results_of_timing_with_fixed_tasks.csv')
tasks = 10000
min_resources = 100
max_resources = 1001
step_resources = 100
size_of_sample = 100
number_of_samples = 50
shuffle_initial_seed = 1000
scheduler_name = ['Random', 'Proportional', 'FedAvg', 'Fed-LBAP', 'OLAR']


def run_timing():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Time')
Ejemplo n.º 3
0
# -- For Random, we generate three different results using three
# starting RNG seeds (10000, 11000, 12000). We increment the starting RNG seed
# each time we change the number of tasks.
# -- For Proportional, we generate three different results using
# three different values for k (1, #tasks/#resources, #tasks)
# - We use no lower or upper limits.
# - Every result is verified and logged to a CSV file.
"""

import numpy as np
import code.support as support
import code.schedulers as schedulers
import code.devices as devices

# File containing the results
logger = support.Logger('results_with_quadratic_costs.csv')
rng_seed_resources = 300
min_tasks = 1000
max_tasks = 10001
step_tasks = 100
seeds_for_random = [10000, 11000, 12000]


def run_quadratic_costs():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Makespan')
    # Runs experiments for 10 resources
    run_for_n_resources(10)
    # Runs experiments for 100 resources
Ejemplo n.º 4
0
# - We schedule from 1.000 to 10.000 tasks with steps of 1000.
# - We run OLAR, Fed-LBAP, FedAvg, Random, and Proportional.
# - We use no lower or upper limits.
# - Each sample is composed of 100 executions of the schedulers.
# - We get 50 samples for each pair (scheduler, tasks)
# - The order of execution of the different schedulers is
# randomly defined. We set an initial RNG seed = 0 and increase
# it every time we need a new order.
"""

import timeit
import numpy as np
import code.support as support

# File containing the results
logger = support.Logger('results_of_timing_with_fixed_resources.csv')
min_tasks = 1000
max_tasks = 10001
step_tasks = 1000
size_of_sample = 100
number_of_samples = 50
shuffle_initial_seed = 0
scheduler_name = ['Random', 'Proportional', 'FedAvg', 'Fed-LBAP', 'OLAR']

# Setup to generate 100 resources with 10001 costs
setup = """
import numpy as np
import code.schedulers as schedulers
import code.devices as devices
import code.support as support
# highest cost for the number of tasks. That resource gets a minimum of
# (tasks/resources)/4.
# - All resources have an upper limit of 2*(tasks/resources), except the
# resource with the lowest cost for the number of tasks. That resource
# gets an upper limit of (tasks/resources)/2.
# - Every result is verified and logged to a CSV file.
"""

import numpy as np
import code.support as support
import code.schedulers as schedulers
import code.devices as devices


# File containing the results
logger = support.Logger('results_with_quadratic_costs_and_limits_proportional_only.csv')
rng_seed_resources = 700
min_tasks = 1000
max_tasks = 10001
step_tasks = 1000


def run_quadratic_costs():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Makespan')
    # Runs experiments for 10 resources
    run_for_n_resources(10)
    # Runs experiments for 100 resources
    run_for_n_resources(100)
Ejemplo n.º 6
0
# -- For Random, we generate three different results using three
# starting RNG seeds (7000, 8000, 9000). We increment the starting RNG seed
# each time we change the number of tasks.
# -- For Proportional, we generate three different results using
# three different values for k (1, #tasks/#resources, #tasks)
# - We use no lower or upper limits.
# - Every result is verified and logged to a CSV file.
"""

import numpy as np
import code.support as support
import code.schedulers as schedulers
import code.devices as devices

# File containing the results
logger = support.Logger('results_with_nlogn_costs.csv')
rng_seed_resources = 200
min_tasks = 1000
max_tasks = 10001
step_tasks = 100
seeds_for_random = [7000, 8000, 9000]


def run_nlogn_costs():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Makespan')
    # Runs experiments for 10 resources
    run_for_n_resources(10)
    # Runs experiments for 100 resources
Ejemplo n.º 7
0
 def setUp(self):
     self.filename = 'dummy_file.txt'
     self.logger = support.Logger(self.filename)
Ejemplo n.º 8
0
# - All resources have an upper limit of 2*(tasks/resources), except the
# resource with the lowest cost for the number of tasks. That resource
# gets an upper limit of (tasks/resources)/2.
# - Each sample is composed of 100 executions of the schedulers.
# - We get 50 samples for each pair (scheduler, tasks)
# - The order of execution of the different schedulers is
# randomly defined. We set an initial RNG seed = 1000 and increase
# it every time we need a new order.
"""

import timeit
import numpy as np
import code.support as support

# File containing the results
logger = support.Logger('results_of_timing_with_fixed_tasks_for_olar_only.csv')

tasks = 10000
size_of_sample = 100
number_of_samples = 50
shuffle_initial_seed = 20000
setup_name = ['Both', 'None', 'Upper', 'Lower']


def run_timing():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Limits,Tasks,Resources,Time')
    # Runs experiments for 10000 tasks
    run_for_fixed_tasks()
# -- For Random, we generate three different results using three
# starting RNG seeds (4000, 5000, 6000). We increment the starting RNG seed
# each time we change the number of tasks.
# -- For Proportional, we generate three different results using
# three different values for k (1, #tasks/#resources, #tasks)
# - We use no lower or upper limits.
# - Every result is verified and logged to a CSV file.
"""

import numpy as np
import code.support as support
import code.schedulers as schedulers
import code.devices as devices

# File containing the results
logger = support.Logger('results_with_linear_costs.csv')
rng_seed_resources = 100
min_tasks = 1000
max_tasks = 10001
step_tasks = 100
seeds_for_random = [4000, 5000, 6000]


def run_linear_costs():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Makespan')
    # Runs experiments for 10 resources
    run_for_n_resources(10)
    # Runs experiments for 100 resources
# -- For Random, we generate three different results using three
# starting RNG seeds (1000, 2000, 3000). We increment the starting RNG seed
# each time we change the number of tasks.
# -- For Proportional, we generate three different results using
# three different values for k (1, #tasks/#resources, #tasks)
# - We use no lower or upper limits.
# - Every result is verified and logged to a CSV file.
"""

import numpy as np
import code.support as support
import code.schedulers as schedulers
import code.devices as devices

# File containing the results
logger = support.Logger('results_with_recursive_costs.csv')
rng_seed_resources = 0
min_tasks = 1000
max_tasks = 10001
step_tasks = 100
seeds_for_random = [1000, 2000, 3000]


def run_recursive_costs():
    # Stores the description of the experiments
    logger.header(__doc__)
    # Header of the CSV file
    logger.store('Scheduler,Tasks,Resources,Makespan')
    # Runs experiments for 10 resources
    run_for_n_resources(10)
    # Runs experiments for 100 resources