Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
batmen
Commits
06141374
Commit
06141374
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
refac: removed unused JobOrders DescendingBoundedSlowdownOrder and DescendingSlowdownOrder
parent
98ae38e3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!13
Some cleanup the repo
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/json_workload.hpp
+1
-1
1 addition, 1 deletion
src/json_workload.hpp
src/queue.cpp
+0
-73
0 additions, 73 deletions
src/queue.cpp
src/queue.hpp
+0
-26
0 additions, 26 deletions
src/queue.hpp
with
1 addition
and
100 deletions
src/json_workload.hpp
+
1
−
1
View file @
06141374
...
@@ -116,7 +116,7 @@ private:
...
@@ -116,7 +116,7 @@ private:
int
_job_number
=
0
;
int
_job_number
=
0
;
};
};
struct
Queue
;
class
Queue
;
/**
/**
* Useful parsers
* Useful parsers
...
...
This diff is collapsed.
Click to expand it.
src/queue.cpp
+
0
−
73
View file @
06141374
...
@@ -24,16 +24,6 @@ SortableJobOrder::~SortableJobOrder()
...
@@ -24,16 +24,6 @@ SortableJobOrder::~SortableJobOrder()
}
}
void
SortableJob
::
update_slowdown
(
Rational
current_date
)
{
slowdown
=
current_date
-
release_date
;
}
void
SortableJob
::
update_bounded_slowdown
(
Rational
current_date
,
Rational
execution_time_lower_bound
)
{
bounded_slowdown
=
(
current_date
-
release_date
)
/
execution_time_lower_bound
;
}
FCFSOrder
::~
FCFSOrder
()
FCFSOrder
::~
FCFSOrder
()
{
{
...
@@ -78,55 +68,6 @@ void LCFSOrder::updateJob(SortableJob *job, const SortableJobOrder::UpdateInform
...
@@ -78,55 +68,6 @@ void LCFSOrder::updateJob(SortableJob *job, const SortableJobOrder::UpdateInform
(
void
)
info
;
(
void
)
info
;
}
}
DescendingBoundedSlowdownOrder
::
DescendingBoundedSlowdownOrder
(
Rational
min_job_length
)
:
_min_job_length
(
min_job_length
)
{
}
DescendingBoundedSlowdownOrder
::~
DescendingBoundedSlowdownOrder
()
{
}
bool
DescendingBoundedSlowdownOrder
::
compare
(
const
SortableJob
*
j1
,
const
SortableJob
*
j2
,
const
SortableJobOrder
::
CompareInformation
*
info
)
const
{
(
void
)
info
;
if
(
j1
->
bounded_slowdown
==
j2
->
bounded_slowdown
)
return
jobcmp
(
j1
->
job
,
j2
->
job
);
else
return
j1
->
bounded_slowdown
>
j2
->
bounded_slowdown
;
}
void
DescendingBoundedSlowdownOrder
::
updateJob
(
SortableJob
*
job
,
const
SortableJobOrder
::
UpdateInformation
*
info
)
const
{
job
->
update_bounded_slowdown
(
info
->
current_date
,
_min_job_length
);
}
DescendingSlowdownOrder
::~
DescendingSlowdownOrder
()
{
}
bool
DescendingSlowdownOrder
::
compare
(
const
SortableJob
*
j1
,
const
SortableJob
*
j2
,
const
SortableJobOrder
::
CompareInformation
*
info
)
const
{
(
void
)
info
;
if
(
j1
->
slowdown
==
j2
->
slowdown
)
return
jobcmp
(
j1
->
job
,
j2
->
job
);
else
return
j1
->
slowdown
>
j2
->
slowdown
;
}
void
DescendingSlowdownOrder
::
updateJob
(
SortableJob
*
job
,
const
SortableJobOrder
::
UpdateInformation
*
info
)
const
{
job
->
update_slowdown
(
info
->
current_date
);
}
AscendingSizeOrder
::~
AscendingSizeOrder
()
AscendingSizeOrder
::~
AscendingSizeOrder
()
{
{
...
@@ -323,20 +264,6 @@ int Queue::nb_jobs() const
...
@@ -323,20 +264,6 @@ int Queue::nb_jobs() const
return
_jobs
.
size
();
return
_jobs
.
size
();
}
}
Rational
Queue
::
compute_load_estimation
()
const
{
Rational
load
=
0
;
for
(
auto
queue_it
=
_jobs
.
begin
();
queue_it
!=
_jobs
.
end
();
++
queue_it
)
{
const
SortableJob
*
sjob
=
*
queue_it
;
const
Job
*
job
=
sjob
->
job
;
load
+=
job
->
nb_requested_resources
*
job
->
walltime
;
}
return
load
;
}
std
::
string
Queue
::
to_string
()
const
std
::
string
Queue
::
to_string
()
const
{
{
...
...
This diff is collapsed.
Click to expand it.
src/queue.hpp
+
0
−
26
View file @
06141374
...
@@ -10,11 +10,6 @@ struct SortableJob
...
@@ -10,11 +10,6 @@ struct SortableJob
{
{
const
Job
*
job
;
const
Job
*
job
;
Rational
release_date
;
Rational
release_date
;
Rational
slowdown
;
Rational
bounded_slowdown
;
void
update_slowdown
(
Rational
current_date
);
void
update_bounded_slowdown
(
Rational
current_date
,
Rational
execution_time_lower_bound
);
};
};
class
SortableJobOrder
class
SortableJobOrder
...
@@ -58,26 +53,6 @@ public:
...
@@ -58,26 +53,6 @@ public:
void
updateJob
(
SortableJob
*
job
,
const
UpdateInformation
*
info
=
nullptr
)
const
;
void
updateJob
(
SortableJob
*
job
,
const
UpdateInformation
*
info
=
nullptr
)
const
;
};
};
class
DescendingBoundedSlowdownOrder
:
public
SortableJobOrder
{
public:
DescendingBoundedSlowdownOrder
(
Rational
min_job_length
);
~
DescendingBoundedSlowdownOrder
();
bool
compare
(
const
SortableJob
*
j1
,
const
SortableJob
*
j2
,
const
CompareInformation
*
info
=
nullptr
)
const
;
void
updateJob
(
SortableJob
*
job
,
const
UpdateInformation
*
info
=
nullptr
)
const
;
private:
Rational
_min_job_length
;
};
class
DescendingSlowdownOrder
:
public
SortableJobOrder
{
public:
~
DescendingSlowdownOrder
();
bool
compare
(
const
SortableJob
*
j1
,
const
SortableJob
*
j2
,
const
CompareInformation
*
info
=
nullptr
)
const
;
void
updateJob
(
SortableJob
*
job
,
const
UpdateInformation
*
info
=
nullptr
)
const
;
};
class
AscendingSizeOrder
:
public
SortableJobOrder
class
AscendingSizeOrder
:
public
SortableJobOrder
{
{
public:
public:
...
@@ -128,7 +103,6 @@ public:
...
@@ -128,7 +103,6 @@ public:
bool
is_empty
()
const
;
bool
is_empty
()
const
;
int
nb_jobs
()
const
;
int
nb_jobs
()
const
;
Rational
compute_load_estimation
()
const
;
std
::
string
to_string
()
const
;
std
::
string
to_string
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment