Skip to content
Snippets Groups Projects
Commit f3904c26 authored by Millian Poquet's avatar Millian Poquet
Browse files

Merge tag 'v1.2.0' into releases

Version 1.2.0 (for Batsim v2.0.0)

Added
- New algorithms:
  - ``easy_bf_fast``, which is an efficient (usual) implementation of EASY
    backfilling. In contrast with the robust and general ``easy_bf``
    implementation, this one does floating-point computation, only handles
    jobs will walltimes, use ad-hoc structures for its simple backfilling
    mechanism (rather than a general-purpose 2D partition), only handles
    the FCFS queue order (rather than sorting the queue at each event),
    uses the first reservation of the priority job (rather than compressing
    the reservation as soon as possible at each event), and tries to only
    call the needed code depending on which event occured.
  - ``fcfs_fast``, which is essentially ``easy_bf_fast`` without backfilling.
parents c0c9ce29 60e71723
Branches
Tags
No related merge requests found
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
image: oarteam/robin_ci
variables:
GIT_SUBMODULE_STRATEGY: none
###############################################################################
# Build stage
###############################################################################
build:
stage: build
script:
- mkdir -p ${CI_PROJECT_DIR}/build
- cd ${CI_PROJECT_DIR}/build
- |
nix-shell /datamovepkgs -A batsched \
--command 'cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-Denable_warnings=ON \
-Dtreat_warnings_as_errors=ON'
- nix-shell /datamovepkgs -A batsched --command 'make'
artifacts:
paths:
- ${CI_PROJECT_DIR}/build/batsched
###############################################################################
# Test stage
###############################################################################
# batsim_tests:
# stage: test
# script:
# # Remove nix-installed batsched
# - nix-env -e batsched-v1.1.0
# # Install ci-built batsched
# - export PATH="${PATH}:${CI_PROJECT_DIR}/build"
# # Install and run the redis server
# - nix-env -i redis
# - |
# redis-server>/dev/null &
# while ! nc -z localhost 6379; do
# sleep 1
# done
# # Prepare Batsim directory to generate the tests
# - mkdir -p /batsim/build
# - cd /batsim/build
# - nix-shell /datamovepkgs -A batsim --command 'cmake ..'
# # Finally run the tests
# - cd /batsim
# - echo "Batsim tests are not run yet."
# - batsched --version
# dependencies:
# - build
......@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning][semver].
[//]: =========================================================================
## [Unreleased]
[//]: =========================================================================
## [1.2.0] - 2018-04-09 - For [Batsim v2.0.0][Batsim v2.0.0]
### Added
- New algorithms:
- ``easy_bf_fast``, which is an efficient (usual) implementation of EASY
backfilling. In contrast with the robust and general ``easy_bf``
implementation, this one does floating-point computation, only handles
jobs will walltimes, use ad-hoc structures for its simple backfilling
mechanism (rather than a general-purpose 2D partition), only handles
the FCFS queue order (rather than sorting the queue at each event),
uses the first reservation of the priority job (rather than compressing
the reservation as soon as possible at each event), and tries to only
call the needed code depending on which event occured.
- ``fcfs_fast``, which is essentially ``easy_bf_fast`` without backfilling.
[//]: =========================================================================
## [1.1.0] - 2018-03-03 - For [Batsim v2.0.0][Batsim v2.0.0]
### Added
......@@ -46,5 +61,6 @@ Initial release.
[Batsim v2.0.0]: https://github.com/oar-team/batsim/blob/master/doc/changelog.md#200---2018-02-20
[Unreleased]: https://gitlab.inria.fr/batsim/batsched/compare/v1.1.0...master
[Unreleased]: https://gitlab.inria.fr/batsim/batsched/compare/v1.2.0...master
[1.2.0]: https://gitlab.inria.fr/batsim/batsched/compare/v1.1.0...v1.2.0
[1.1.0]: https://gitlab.inria.fr/batsim/batsched/compare/v1.0.0...v1.1.0
......@@ -96,7 +96,7 @@ endif()
####################
# Batsched version #
####################
set(default_batsched_version "v1.1.0")
set(default_batsched_version "v1.2.0")
include(GetGitRevisionDescription)
git_describe(batsched_version)
message(STATUS "Batsched version from git: ${batsched_version}")
......
......@@ -6,6 +6,8 @@
#include <stdlib.h>
#include <signal.h>
#include <stdexcept>
Crasher::CrashType Crasher::crash_type_from_string(const std::string &str)
{
if (str == "segmentation_fault") return CrashType::SEGMENTATION_FAULT;
......@@ -32,6 +34,8 @@ std::string Crasher::crash_type_to_string(Crasher::CrashType type)
case CrashType::ABORT: return "abort";
case CrashType::SUSPEND_PROCESS: return "suspend_process";
}
throw std::invalid_argument("Unknown crash type");
}
Crasher::Crasher(Workload *workload,
......
#include "easy_bf_fast.hpp"
#include "../pempek_assert.hpp"
EasyBackfillingFast::EasyBackfillingFast(Workload *workload,
SchedulingDecision *decision, Queue *queue, ResourceSelector *selector,
double rjms_delay, rapidjson::Document *variant_options) :
ISchedulingAlgorithm(workload, decision, queue, selector, rjms_delay,
variant_options)
{}
EasyBackfillingFast::~EasyBackfillingFast()
{}
void EasyBackfillingFast::on_simulation_start(double date,
const rapidjson::Value &batsim_config)
{
(void) date;
(void) batsim_config;
_available_machines.insert(MachineRange::ClosedInterval(0, _nb_machines - 1));
_nb_available_machines = _nb_machines;
PPK_ASSERT_ERROR(_available_machines.size() == (unsigned int) _nb_machines);
}
void EasyBackfillingFast::on_simulation_end(double date)
{
(void) date;
}
void EasyBackfillingFast::make_decisions(double date,
SortableJobOrder::UpdateInformation *update_info,
SortableJobOrder::CompareInformation *compare_info)
{
(void) update_info;
(void) compare_info;
// This algorithm is a fast version of EASY backfilling.
// It is meant to be fast in the usual case, not to handle corner cases
// (use the other easy backfilling available in batsched for this purpose).
// It is not meant to be easily readable or hackable ;).
// This fast EASY backfilling variant in a few words:
// - only handles the FCFS queue order
// - only handles the basic resource selection policy
// - only handles finite jobs (no switchoff), with walltimes
// - only handles one priority job (the first of the queue)
// - only handles time as floating-point (-> precision errors).
// Hacks:
// - uses priority job's completion time to store its expected starting time
bool job_ended = false;
// Handle newly finished jobs
for (const std::string & ended_job_id : _jobs_ended_recently)
{
job_ended = true;
Job * finished_job = (*_workload)[ended_job_id];
const Allocation & alloc = _current_allocations[ended_job_id];
// Update data structures
_available_machines.insert(alloc.machines);
_nb_available_machines += finished_job->nb_requested_resources;
_horizons.erase(alloc.horizon_it);
_current_allocations.erase(ended_job_id);
}
// If jobs have finished, let's execute jobs as long as they are priority
if (job_ended)
{
if (_priority_job != nullptr)
{
if (_priority_job->nb_requested_resources <= _nb_available_machines)
{
Allocation alloc;
alloc.machines = _available_machines.left(
_priority_job->nb_requested_resources);
_decision->add_execute_job(_priority_job->id, alloc.machines,
date);
FinishedHorizonPoint point;
point.nb_released_machines = _priority_job->nb_requested_resources;
point.date = date + (double)_priority_job->walltime;
alloc.horizon_it = insert_horizon_point(point);
// Update data structures
_available_machines -= alloc.machines;
_nb_available_machines -= _priority_job->nb_requested_resources;
_current_allocations[_priority_job->id] = alloc;
_priority_job = nullptr;
// Execute the whole queue until a priority job cannot fit
for (auto job_it = _pending_jobs.begin();
job_it != _pending_jobs.end(); )
{
Job * pending_job = *job_it;
if (pending_job->nb_requested_resources <= _nb_available_machines)
{
alloc.machines = _available_machines.left(
pending_job->nb_requested_resources);
_decision->add_execute_job(pending_job->id,
alloc.machines, date);
point.nb_released_machines = pending_job->nb_requested_resources;
point.date = date + (double)pending_job->walltime;
alloc.horizon_it = insert_horizon_point(point);
// Update data structures
_available_machines -= alloc.machines;
_nb_available_machines -= pending_job->nb_requested_resources;
_current_allocations[pending_job->id] = alloc;
job_it = _pending_jobs.erase(job_it);
}
else
{
// The job becomes priority!
_priority_job = pending_job;
_priority_job->completion_time = compute_priority_job_expected_earliest_starting_time();
_pending_jobs.erase(job_it);
// Stop first queue traversal.
break;
}
}
// Continue traversal, backfilling jobs that does not hinder
// priority job.
for (auto job_it = _pending_jobs.begin();
job_it != _pending_jobs.end(); )
{
const Job * pending_job = *job_it;
// Does the job can be executed now ?
if (pending_job->nb_requested_resources <= _nb_available_machines &&
date + pending_job->walltime <= _priority_job->completion_time)
{
// Yes, it can be backfilled!
alloc.machines = _available_machines.left(
pending_job->nb_requested_resources);
_decision->add_execute_job(pending_job->id,
alloc.machines, date);
point.nb_released_machines = pending_job->nb_requested_resources;
point.date = date + (double)pending_job->walltime;
alloc.horizon_it = insert_horizon_point(point);
// Update data structures
_available_machines -= alloc.machines;
_nb_available_machines -= pending_job->nb_requested_resources;
_current_allocations[pending_job->id] = alloc;
job_it = _pending_jobs.erase(job_it);
}
else
{
++job_it;
}
}
}
}
}
// Handle newly released jobs
for (const std::string & new_job_id : _jobs_released_recently)
{
Job * new_job = (*_workload)[new_job_id];
// Can the job be executed right now?
if (new_job->nb_requested_resources <= _nb_available_machines)
{
// Can it be executed now (without hindering priority job?)
if (_priority_job == nullptr ||
date + new_job->walltime <= _priority_job->completion_time)
{
// Yes, the job can be executed right away!
Allocation alloc;
alloc.machines = _available_machines.left(
new_job->nb_requested_resources);
_decision->add_execute_job(new_job_id, alloc.machines, date);
FinishedHorizonPoint point;
point.nb_released_machines = new_job->nb_requested_resources;
point.date = date + (double)new_job->walltime;
alloc.horizon_it = insert_horizon_point(point);
// Update data structures
_available_machines -= alloc.machines;
_nb_available_machines -= new_job->nb_requested_resources;
_current_allocations[new_job_id] = alloc;
}
else
{
// No, the job cannot be executed (hinders priority job.)
_pending_jobs.push_back(new_job);
}
}
else
{
// The job is too big to fit now.
// Is the job valid on this platform?
if (new_job->nb_requested_resources >= _nb_machines)
{
_decision->add_reject_job(new_job_id, date);
}
else
{
if (_priority_job == nullptr)
{
// The job becomes priority.
_priority_job = new_job;
_priority_job->completion_time = compute_priority_job_expected_earliest_starting_time();
}
else
{
// The job is queued up.
_pending_jobs.push_back(new_job);
}
}
}
}
}
double EasyBackfillingFast::compute_priority_job_expected_earliest_starting_time()
{
int nb_available = _nb_available_machines;
int required = _priority_job->nb_requested_resources;
for (auto it = _horizons.begin(); it != _horizons.end(); ++it)
{
nb_available += it->nb_released_machines;
if (nb_available >= required)
{
return it->date;
}
}
PPK_ASSERT_ERROR(false, "The job will never be executable.");
return 0;
}
std::list<EasyBackfillingFast::FinishedHorizonPoint>::iterator EasyBackfillingFast::insert_horizon_point(const EasyBackfillingFast::FinishedHorizonPoint &point)
{
// The data structure is sorted, we can therefore traverse it in order
// until finding an insertion point.
for (auto it = _horizons.begin(); it != _horizons.end(); ++it)
{
if (point.date < it->date)
{
// Insertion point is before the current iterator.
return _horizons.insert(it, point);
}
}
// Insertion point not found. Insertion at end.
return _horizons.insert(_horizons.end(), point);
}
#pragma once
#include <unordered_map>
#include <list>
#include "../isalgorithm.hpp"
#include "../json_workload.hpp"
#include "../locality.hpp"
class EasyBackfillingFast : public ISchedulingAlgorithm
{
public:
EasyBackfillingFast(Workload * workload, SchedulingDecision * decision,
Queue * queue, ResourceSelector * selector,
double rjms_delay,
rapidjson::Document * variant_options);
virtual ~EasyBackfillingFast();
virtual void on_simulation_start(double date,
const rapidjson::Value & batsim_config);
virtual void on_simulation_end(double date);
virtual void make_decisions(double date,
SortableJobOrder::UpdateInformation * update_info,
SortableJobOrder::CompareInformation * compare_info);
private:
struct FinishedHorizonPoint
{
double date;
int nb_released_machines;
};
struct Allocation
{
MachineRange machines;
std::list<FinishedHorizonPoint>::iterator horizon_it;
};
private:
double compute_priority_job_expected_earliest_starting_time();
std::list<FinishedHorizonPoint>::iterator insert_horizon_point(const FinishedHorizonPoint & point);
private:
// Machines currently available
MachineRange _available_machines;
int _nb_available_machines = -1;
// Pending jobs (queue; without the priority job)
std::list<Job *> _pending_jobs;
// Allocations of running jobs
std::unordered_map<std::string, Allocation> _current_allocations;
// When running jobs are expected to finish.
// Always sorted by increasing date.
std::list<FinishedHorizonPoint> _horizons;
// At any time, null if there is no priority job (no waiting job)
Job * _priority_job = nullptr;
};
#include "fcfs_fast.hpp"
#include "../pempek_assert.hpp"
FCFSFast::FCFSFast(Workload *workload,
SchedulingDecision *decision, Queue *queue, ResourceSelector *selector,
double rjms_delay, rapidjson::Document *variant_options) :
ISchedulingAlgorithm(workload, decision, queue, selector, rjms_delay,
variant_options)
{}
FCFSFast::~FCFSFast()
{}
void FCFSFast::on_simulation_start(double date,
const rapidjson::Value &batsim_config)
{
(void) date;
(void) batsim_config;
_available_machines.insert(MachineRange::ClosedInterval(0, _nb_machines - 1));
_nb_available_machines = _nb_machines;
PPK_ASSERT_ERROR(_available_machines.size() == (unsigned int) _nb_machines);
}
void FCFSFast::on_simulation_end(double date)
{
(void) date;
}
void FCFSFast::make_decisions(double date,
SortableJobOrder::UpdateInformation *update_info,
SortableJobOrder::CompareInformation *compare_info)
{
(void) update_info;
(void) compare_info;
// This algorithm is a fast version of FCFS without backfilling.
// It is meant to be fast in the usual case, not to handle corner cases.
// It is not meant to be easily readable or hackable ;).
// This fast FCFS variant in a few words:
// - only handles the FCFS queue order
// - only handles the basic resource selection policy
// - only handles finite jobs (no switchoff)
// - only handles time as floating-point (-> precision errors).
bool job_ended = false;
// Handle newly finished jobs
for (const std::string & ended_job_id : _jobs_ended_recently)
{
job_ended = true;
Job * finished_job = (*_workload)[ended_job_id];
// Update data structures
_available_machines.insert(_current_allocations[ended_job_id]);
_nb_available_machines += finished_job->nb_requested_resources;
_current_allocations.erase(ended_job_id);
}
// If jobs have finished, execute jobs as long as they fit
if (job_ended)
{
for (auto job_it = _pending_jobs.begin();
job_it != _pending_jobs.end(); )
{
Job * pending_job = *job_it;
if (pending_job->nb_requested_resources <= _nb_available_machines)
{
MachineRange machines = _available_machines.left(
pending_job->nb_requested_resources);
_decision->add_execute_job(pending_job->id,
machines, date);
// Update data structures
_available_machines -= machines;
_nb_available_machines -= pending_job->nb_requested_resources;
_current_allocations[pending_job->id] = machines;
job_it = _pending_jobs.erase(job_it);
}
else
{
// The job becomes priority!
// As there is no backfilling, we can simply leave this loop.
break;
}
}
}
// Handle newly released jobs
for (const std::string & new_job_id : _jobs_released_recently)
{
Job * new_job = (*_workload)[new_job_id];
// Is this job valid?
if (new_job->nb_requested_resources > _nb_machines)
{
// Invalid!
_decision->add_reject_job(new_job_id, date);
continue;
}
// Is there a waiting job?
if (!_pending_jobs.empty())
{
// Yes. The new job is queued up.
_pending_jobs.push_back(new_job);
}
else
{
// No, the queue is empty.
// Can the new job be executed now?
if (new_job->nb_requested_resources <= _nb_available_machines)
{
// Yes, the job can be executed right away!
MachineRange machines = _available_machines.left(
new_job->nb_requested_resources);
_decision->add_execute_job(new_job_id, machines, date);
// Update data structures
_available_machines -= machines;
_nb_available_machines -= new_job->nb_requested_resources;
_current_allocations[new_job_id] = machines;
}
else
{
// No. The job is queued up.
_pending_jobs.push_back(new_job);
}
}
}
}
#pragma once
#include <unordered_map>
#include <list>
#include "../isalgorithm.hpp"
#include "../json_workload.hpp"
#include "../locality.hpp"
class FCFSFast : public ISchedulingAlgorithm
{
public:
FCFSFast(Workload * workload, SchedulingDecision * decision,
Queue * queue, ResourceSelector * selector,
double rjms_delay,
rapidjson::Document * variant_options);
virtual ~FCFSFast();
virtual void on_simulation_start(double date,
const rapidjson::Value & batsim_config);
virtual void on_simulation_end(double date);
virtual void make_decisions(double date,
SortableJobOrder::UpdateInformation * update_info,
SortableJobOrder::CompareInformation * compare_info);
private:
// Machines currently available
MachineRange _available_machines;
int _nb_available_machines = -1;
// Pending jobs (queue)
std::list<Job *> _pending_jobs;
// Allocations of running jobs
std::unordered_map<std::string, MachineRange> _current_allocations;
};
......@@ -6,6 +6,9 @@
#include "exact_numbers.hpp"
#include "data_storage.hpp"
#include "machine_range.hpp"
struct JobAlloc;
struct Job
{
......@@ -16,8 +19,20 @@ struct Job
bool has_walltime = true;
double submission_time = 0;
double completion_time = -1;
mutable std::map<Rational, JobAlloc*> allocations;
};
struct JobAlloc
{
Rational begin;
Rational end;
bool started_in_first_slice;
bool has_been_inserted = true;
const Job * job;
MachineRange used_machines;
};
struct JobComparator
{
bool operator()(const Job * j1, const Job * j2) const
......
......@@ -22,6 +22,7 @@
#include "algo/conservative_bf.hpp"
#include "algo/crasher.hpp"
#include "algo/easy_bf.hpp"
#include "algo/easy_bf_fast.hpp"
#include "algo/easy_bf_plot_liquid_load_horizon.hpp"
#include "algo/energy_bf.hpp"
#include "algo/energy_bf_dicho.hpp"
......@@ -31,6 +32,7 @@
#include "algo/energy_bf_machine_subpart_sleeper.hpp"
#include "algo/energy_watcher.hpp"
#include "algo/filler.hpp"
#include "algo/fcfs_fast.hpp"
#include "algo/killer.hpp"
#include "algo/killer2.hpp"
#include "algo/random.hpp"
......@@ -70,11 +72,12 @@ void run(Network & n, ISchedulingAlgorithm * algo, SchedulingDecision &d,
int main(int argc, char ** argv)
{
const set<string> variants_set = {"conservative_bf", "crasher", "easy_bf", "easy_bf_plot_liquid_load_horizon",
const set<string> variants_set = {"conservative_bf", "crasher", "easy_bf", "easy_bf_fast",
"easy_bf_plot_liquid_load_horizon",
"energy_bf", "energy_bf_dicho", "energy_bf_idle_sleeper",
"energy_bf_monitoring",
"energy_bf_monitoring_inertial", "energy_bf_subpart_sleeper",
"energy_watcher",
"energy_watcher", "fcfs_fast",
"filler", "killer", "killer2", "random", "rejecter",
"sequencer", "sleeper", "submitter", "waiting_time_estimator"};
const set<string> policies_set = {"basic", "contiguous"};
......@@ -242,6 +245,8 @@ int main(int argc, char ** argv)
algo = new Crasher(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "easy_bf")
algo = new EasyBackfilling(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "easy_bf_fast")
algo = new EasyBackfillingFast(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "easy_bf_plot_liquid_load_horizon")
algo = new EasyBackfillingPlotLiquidLoadHorizon(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "energy_bf")
......@@ -258,6 +263,8 @@ int main(int argc, char ** argv)
algo = new EnergyBackfillingMachineSubpartSleeper(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "energy_watcher")
algo = new EnergyWatcher(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "fcfs_fast")
algo = new FCFSFast(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "killer")
algo = new Killer(&w, &decision, queue, selector, rjms_delay, &json_doc_variant_options);
else if (scheduling_variant == "killer2")
......
This diff is collapsed.
......@@ -33,15 +33,7 @@ public:
typedef std::list<TimeSlice>::iterator TimeSliceIterator;
typedef std::list<TimeSlice>::const_iterator TimeSliceConstIterator;
struct JobAlloc
{
Rational begin;
Rational end;
bool started_in_first_slice;
bool has_been_inserted = true;
const Job * job;
MachineRange used_machines;
};
typedef struct JobAlloc JobAlloc;
public:
Schedule(int nb_machines = 1, Rational initial_time = 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment