Skip to content
Snippets Groups Projects
Commit 4acfb5a7 authored by Maël Madon's avatar Maël Madon
Browse files

refac: rename some files and folders

parent 0225959d
No related branches found
No related tags found
No related merge requests found
Pipeline #5189 passed with warnings
Showing
with 61 additions and 61 deletions
......@@ -11,12 +11,12 @@ Batmen is a plugin to the scientific simulator [Batsim]. It allows the simulatio
## What differs from the original version of batsched?
New paradigm: we implemented a "cloud broker" allowing to model the interaction with the users. This cloud broker is able to dynamically register new jobs to sumbit on top of the static workload during the scheduling. This way we can represent different categories of users and model their behavior in response to feedback.
For now this paradigm is supported by all the schedulers inheriting from the class `DynScheduler` i.e. all the custom schedulers located in folder `src/algo_perso`. It uses the modules in the folder in folder `src/broker`:
For now this paradigm is supported by all the schedulers inheriting from the class `DynScheduler` i.e. all the custom schedulers located in folder `src/scheds`. It uses the modules in the folder in folder `src/broker`:
- *dynscheduler*: superclass managing the interaction with the broker from which the scheduling algorithms inherit
- *cloud_broker*: implement the broker itself, submitting the jobs on behalf of the users
- *broker*: implement the broker itself, submitting the jobs on behalf of the users
- *user*: an individual user, submitting her jobs to the broker
New algorithms implemented (in folder `src/algo_perso`):
New algorithms implemented (in folder `src/scheds`):
- *multicore_filler*: one job at a time on only one multicore host. Developped for testing the multicore management in batsim/simgrid
- *bin_packing*: the scheduler packs the jobs on the least number of multicore hosts. Each job runs on only one host but can take several cores
- *bin_packing_energy*: same as *bin_packing* but switches of the hosts as soon as they are idle and power them on again when needed
......
......@@ -19,12 +19,12 @@ let
src = pkgs.lib.sourceByRegex ./. [
"^src"
"^src/.*\.?pp"
"^src/algo"
"^src/algo/.*\.?pp"
"^src/algo_perso"
"^src/algo_perso/.*\.?pp"
"^src/scheds"
"^src/scheds/.*\.?pp"
"^src/scheds"
"^src/scheds/.*\.?pp"
"^src/broker"
"^src/broker/.*\.?pp"
"^src/users/.*\.?pp"
"^src/external"
"^src/external/.*\.?pp"
"^meson\.build"
......
......@@ -26,28 +26,28 @@ batmen_deps = [
# Source files
src = [
'src/algo/easy_bf.cpp',
'src/algo/easy_bf.hpp',
'src/algo/fcfs.cpp',
'src/algo/fcfs.hpp',
'src/algo_perso/multicore_filler.cpp',
'src/algo_perso/multicore_filler.hpp',
'src/algo_perso/bin_packing.cpp',
'src/algo_perso/bin_packing.hpp',
'src/algo_perso/bin_packing_energy.cpp',
'src/algo_perso/bin_packing_energy.hpp',
'src/broker/cloud_broker.cpp',
'src/broker/cloud_broker.hpp',
'src/broker/user.cpp',
'src/broker/user.hpp',
'src/broker/user_model.cpp',
'src/broker/user_model.hpp',
'src/broker/user_replay.cpp',
'src/broker/user_replay.hpp',
'src/broker/user_feedback.cpp',
'src/broker/user_feedback.hpp',
'src/broker/dynscheduler.cpp',
'src/broker/dynscheduler.hpp',
'src/scheds/easy_bf.cpp',
'src/scheds/easy_bf.hpp',
'src/scheds/fcfs.cpp',
'src/scheds/fcfs.hpp',
'src/scheds/multicore_filler.cpp',
'src/scheds/multicore_filler.hpp',
'src/scheds/bin_packing.cpp',
'src/scheds/bin_packing.hpp',
'src/scheds/bin_packing_energy.cpp',
'src/scheds/bin_packing_energy.hpp',
'src/users/broker.cpp',
'src/users/broker.hpp',
'src/users/user.cpp',
'src/users/user.hpp',
'src/users/user_model.cpp',
'src/users/user_model.hpp',
'src/users/user_replay.cpp',
'src/users/user_replay.hpp',
'src/users/user_feedback.cpp',
'src/users/user_feedback.hpp',
'src/users/dynscheduler.cpp',
'src/users/dynscheduler.hpp',
'src/decision.cpp',
'src/decision.hpp',
'src/exact_numbers.hpp',
......
......@@ -11,7 +11,7 @@
#include <loguru.hpp>
#include "algo/fcfs.hpp"
#include "scheds/fcfs.hpp"
#include "external/taywee_args.hpp"
#include "decision.hpp"
......@@ -20,11 +20,11 @@
#include "network.hpp"
#include "pempek_assert.hpp"
#include "algo/easy_bf.hpp"
#include "algo/fcfs.hpp"
#include "algo_perso/bin_packing.hpp"
#include "algo_perso/bin_packing_energy.hpp"
#include "algo_perso/multicore_filler.hpp"
#include "scheds/easy_bf.hpp"
#include "scheds/fcfs.hpp"
#include "scheds/bin_packing.hpp"
#include "scheds/bin_packing_energy.hpp"
#include "scheds/multicore_filler.hpp"
using namespace std;
using namespace boost;
......
......@@ -5,7 +5,7 @@
#include <loguru.hpp>
#include "../pempek_assert.hpp"
#include "algo_perso/HARD_DEFINED_VAR.hpp"
#include "scheds/HARD_DEFINED_VAR.hpp"
#include "json_workload.hpp"
SortableHost::SortableHost(int id_host, int cores)
......
#pragma once
#include "../broker/dynscheduler.hpp"
#include "../users/dynscheduler.hpp"
#include <list>
#include <map>
......
......@@ -5,8 +5,8 @@
#include <loguru.hpp>
#include "../pempek_assert.hpp"
#include "algo_perso/HARD_DEFINED_VAR.hpp"
#include "broker/dynscheduler.hpp"
#include "scheds/HARD_DEFINED_VAR.hpp"
#include "users/dynscheduler.hpp"
#include "intervalset.hpp"
#include "json_workload.hpp"
......
#pragma once
#include "../broker/dynscheduler.hpp"
#include "../users/dynscheduler.hpp"
#include <list>
#include <map>
......
File moved
......@@ -2,7 +2,7 @@
#include <list>
#include "../broker/dynscheduler.hpp"
#include "../users/dynscheduler.hpp"
#include "../locality.hpp"
#include "../schedule.hpp"
......
File moved
......@@ -3,7 +3,7 @@
#include <unordered_map>
#include <list>
#include "../broker/dynscheduler.hpp"
#include "../users/dynscheduler.hpp"
#include "../locality.hpp"
class FCFS : public DynScheduler
......
......@@ -5,7 +5,7 @@
// #include "../decision.hpp"
// #include "../json_workload.hpp"
#include "../pempek_assert.hpp"
#include "broker/dynscheduler.hpp"
#include "users/dynscheduler.hpp"
#include "json_workload.hpp"
#include <list>
#include <map>
......
#pragma once
#include "../broker/dynscheduler.hpp"
#include "../users/dynscheduler.hpp"
#include <map>
#include <vector>
......
#include "cloud_broker.hpp"
#include "broker/user.hpp"
#include "broker.hpp"
#include "users/user.hpp"
#include "json_workload.hpp"
#include <boost/format.hpp>
......@@ -10,7 +10,7 @@
#include <loguru.hpp>
using namespace rapidjson;
CloudBroker::CloudBroker(rapidjson::Document *user_description_file)
Broker::Broker(rapidjson::Document *user_description_file)
{
/* Parse description file and call constructor for each user */
if (!user_description_file->ObjectEmpty())
......@@ -137,7 +137,7 @@ CloudBroker::CloudBroker(rapidjson::Document *user_description_file)
user_queue.sort(CompareUsers());
}
CloudBroker::~CloudBroker()
Broker::~Broker()
{
for (auto it : users)
{
......@@ -149,12 +149,12 @@ CloudBroker::~CloudBroker()
users_to_wake.clear();
}
double CloudBroker::next_submission(double date) const
double Broker::next_submission(double date) const
{
return user_queue.front()->next_submission();
}
void CloudBroker::jobs_to_submit(
void Broker::jobs_to_submit(
double date, list<Job *> &jobs, list<Profile *> &profiles)
{
jobs = list<Job *>();
......@@ -195,7 +195,7 @@ void CloudBroker::jobs_to_submit(
jobs.sort(JobComparator());
}
void CloudBroker::feedback_job_status(double date,
void Broker::feedback_job_status(double date,
vector<string> &jobs_ended, vector<string> &jobs_killed,
vector<string> &jobs_released)
{
......@@ -223,7 +223,7 @@ void CloudBroker::feedback_job_status(double date,
user_queue.sort(CompareUsers());
}
void CloudBroker::update_status_if_dyn_job(
void Broker::update_status_if_dyn_job(
const string &job_id, JobStatus status)
{
auto it = dynamic_jobs.find(job_id);
......@@ -276,7 +276,7 @@ void CloudBroker::update_status_if_dyn_job(
}
}
void CloudBroker::log_user_stats(string log_folder)
void Broker::log_user_stats(string log_folder)
{
static int stat[10] = { 0 };
int *dm_stat;
......
......@@ -11,11 +11,11 @@
using namespace std;
class CloudBroker
class Broker
{
public:
CloudBroker(rapidjson::Document *user_description_file);
~CloudBroker();
Broker(rapidjson::Document *user_description_file);
~Broker();
/**
* @brief Returns the date of the next submission by the cloud broker.
......
......@@ -36,7 +36,7 @@ void DynScheduler::on_simulation_start(
"Dynamic jobs are enabled, please also add the option "
"--enable-profile-reuse.");
broker = new CloudBroker(_variant_options);
broker = new Broker(_variant_options);
/* Check for optional parameters */
if (!_variant_options->ObjectEmpty())
......@@ -171,7 +171,7 @@ void DynScheduler::dyn_submit(std::list<Job *> jobs, double date)
fullID.erase(0, fullID.find('!') + 1);
std::string jobID = fullID;
// REFAC: move to cloud_broker
// REFAC: move to broker
core_per_user[user_name]
= core_per_user[user_name] + current_job->nb_requested_resources;
......
#pragma once
#include "../isalgorithm.hpp"
#include "cloud_broker.hpp"
#include "broker.hpp"
#include "json_workload.hpp"
/**
......@@ -62,7 +62,7 @@ protected:
protected:
bool broker_enabled = false;
CloudBroker *broker = nullptr;
Broker *broker = nullptr;
double date_of_next_submission;
bool next_submission_has_changed = false;
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment