diff --git a/CHANGELOG.md b/CHANGELOG.md index 6da8c95236cf87e52d2977a3c83db8fb3fac59fc..52a5215dcdec430b8002daa1cfebfcf72c3ba642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning][semver]. [//]: ========================================================================= ## [Unreleased] +[//]: ========================================================================= +## [1.2.1] - 2018-07-03 - For [Batsim v2.0.0][Batsim v2.0.0] +### Fixed +- The `sleeper` algorithm continued to send requests when the simulation was + finished, which should now be fixed. +- The `easy_bf_fast` algorithm rejected jobs that requested all the machines + if they could not be executed directly after being submitted + ([issue 6](https://gitlab.inria.fr/batsim/batsched/issues/6)). + +### Changed +- The `submitter` algorithm now also sets metadata for usual jobs. + [//]: ========================================================================= ## [1.2.0] - 2018-04-09 - For [Batsim v2.0.0][Batsim v2.0.0] ### Added @@ -61,6 +73,7 @@ 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.2.0...master +[Unreleased]: https://gitlab.inria.fr/batsim/batsched/compare/v1.2.1...master +[1.2.1]: https://gitlab.inria.fr/batsim/batsched/compare/v1.2.0...v1.2.1 [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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 72792816b2d3feae5a633c75042fb1b58257c5c9..2560a5f9388251d3e8ec1b2b9efbb36ba6147dab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,7 +96,7 @@ endif() #################### # Batsched version # #################### -set(default_batsched_version "v1.2.0") +set(default_batsched_version "v1.2.1") include(GetGitRevisionDescription) git_describe(batsched_version) message(STATUS "Batsched version from git: ${batsched_version}") diff --git a/src/algo/easy_bf_fast.cpp b/src/algo/easy_bf_fast.cpp index 727d53839180a93075382394a3d6bab890eb9850..fd3adb34cabfffee043f8c884836e52758929468 100644 --- a/src/algo/easy_bf_fast.cpp +++ b/src/algo/easy_bf_fast.cpp @@ -200,7 +200,7 @@ void EasyBackfillingFast::make_decisions(double date, // The job is too big to fit now. // Is the job valid on this platform? - if (new_job->nb_requested_resources >= _nb_machines) + if (new_job->nb_requested_resources > _nb_machines) { _decision->add_reject_job(new_job_id, date); } diff --git a/src/algo/energy_watcher.cpp b/src/algo/energy_watcher.cpp index 86c472a01538cccc3f96171e65cb84a1d6be8865..cfbfb14d861ee2f30521c8cba4a23292bfe7cc8b 100644 --- a/src/algo/energy_watcher.cpp +++ b/src/algo/energy_watcher.cpp @@ -49,7 +49,7 @@ void EnergyWatcher::make_decisions(double date, if (_consumed_joules_updated_recently) { - PPK_ASSERT_ERROR(_consumed_joules >= _previous_energy, + PPK_ASSERT_ERROR(_consumed_joules - _previous_energy >= -1e-6, "Energy consumption inconsistency: it should be non-decreasing. " "Received %g but previous value is %g.", _consumed_joules, _previous_energy); diff --git a/src/algo/sleeper.cpp b/src/algo/sleeper.cpp index fba2b1301e34317b7e35e9143d9c4557e5c561b4..59243182741dc71d558a64cc7dbdeabf4c1a8b58 100644 --- a/src/algo/sleeper.cpp +++ b/src/algo/sleeper.cpp @@ -40,6 +40,8 @@ void Sleeper::on_simulation_start(double date, const rapidjson::Value &batsim_co void Sleeper::on_simulation_end(double date) { (void) date; + + simulation_finished = true; } void Sleeper::make_decisions(double date, SortableJobOrder::UpdateInformation *update_info, SortableJobOrder::CompareInformation *compare_info) @@ -175,7 +177,7 @@ void Sleeper::make_decisions(double date, SortableJobOrder::UpdateInformation *u } } } - else + else if (!simulation_finished) { // There are no jobs to compute at the moment. diff --git a/src/algo/sleeper.hpp b/src/algo/sleeper.hpp index c78f0940eb4cb6d7e428d1843af6bddd6c44c184..bc7979b82cd2887faf3cd4ed7b3bc41b5ae5a4c7 100644 --- a/src/algo/sleeper.hpp +++ b/src/algo/sleeper.hpp @@ -36,4 +36,5 @@ private: int compute_pstate; int sleep_pstate; + bool simulation_finished = false; }; diff --git a/src/algo/submitter.cpp b/src/algo/submitter.cpp index fd6a1f0658f12d71f5daebe9c7d2e485513cf8ff..fae99f353158645ba7b3190f791c00e2a60daa53 100644 --- a/src/algo/submitter.cpp +++ b/src/algo/submitter.cpp @@ -98,6 +98,13 @@ void Submitter::make_decisions(double date, { const Job * new_job = (*_workload)[new_job_id]; + if (set_job_metadata) + { + _decision->add_set_job_metadata(new_job_id, + "just some metadata for job " + new_job_id, + date); + } + if (new_job->nb_requested_resources > _nb_machines) _decision->add_reject_job(new_job_id, date); else