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
a6d527dc
Commit
a6d527dc
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
clean: remove potentially misleading job->unique_number field
parent
9036003a
No related branches found
No related tags found
No related merge requests found
Pipeline
#5186
passed
2 years ago
Stage: build-and-test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/json_workload.cpp
+0
-2
0 additions, 2 deletions
src/json_workload.cpp
src/json_workload.hpp
+0
-1
0 additions, 1 deletion
src/json_workload.hpp
src/schedule.cpp
+2
-2
2 additions, 2 deletions
src/schedule.cpp
with
2 additions
and
5 deletions
src/json_workload.cpp
+
0
−
2
View file @
a6d527dc
...
@@ -155,7 +155,6 @@ Job *Workload::job_from_json_object(const Value &object)
...
@@ -155,7 +155,6 @@ Job *Workload::job_from_json_object(const Value &object)
j
->
walltime
=
-
1
;
j
->
walltime
=
-
1
;
j
->
has_walltime
=
true
;
j
->
has_walltime
=
true
;
j
->
nb_requested_resources
=
object
[
"res"
].
GetInt
();
j
->
nb_requested_resources
=
object
[
"res"
].
GetInt
();
j
->
unique_number
=
_job_number
++
;
j
->
profile
=
object
[
"profile"
].
GetString
();
j
->
profile
=
object
[
"profile"
].
GetString
();
if
(
object
.
HasMember
(
"walltime"
))
if
(
object
.
HasMember
(
"walltime"
))
...
@@ -405,7 +404,6 @@ Job *Parser::job_from_json_object(string user_name, const Value &object)
...
@@ -405,7 +404,6 @@ Job *Parser::job_from_json_object(string user_name, const Value &object)
j
->
walltime
=
-
1
;
j
->
walltime
=
-
1
;
j
->
has_walltime
=
true
;
j
->
has_walltime
=
true
;
j
->
nb_requested_resources
=
object
[
"res"
].
GetInt
();
j
->
nb_requested_resources
=
object
[
"res"
].
GetInt
();
// j->unique_number = _job_number++;
j
->
profile
=
object
[
"profile"
].
GetString
();
j
->
profile
=
object
[
"profile"
].
GetString
();
if
(
object
.
HasMember
(
"walltime"
))
if
(
object
.
HasMember
(
"walltime"
))
...
...
This diff is collapsed.
Click to expand it.
src/json_workload.hpp
+
0
−
1
View file @
a6d527dc
...
@@ -29,7 +29,6 @@ enum JobStatus
...
@@ -29,7 +29,6 @@ enum JobStatus
struct
Job
struct
Job
{
{
std
::
string
id
;
std
::
string
id
;
int
unique_number
;
int
nb_requested_resources
;
int
nb_requested_resources
;
std
::
string
profile
;
std
::
string
profile
;
Rational
walltime
;
Rational
walltime
;
...
...
This diff is collapsed.
Click to expand it.
src/schedule.cpp
+
2
−
2
View file @
a6d527dc
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include
<boost/algorithm/string/join.hpp>
#include
<boost/algorithm/string/join.hpp>
#include
<fstream>
#include
<fstream>
#include
<stdio.h>
#include
<stdio.h>
#include
<functional>
#include
<loguru.hpp>
#include
<loguru.hpp>
...
@@ -333,7 +334,6 @@ double Schedule::query_wait(int size, Rational time, ResourceSelector *selector)
...
@@ -333,7 +334,6 @@ double Schedule::query_wait(int size, Rational time, ResourceSelector *selector)
Job
fake_job
;
Job
fake_job
;
fake_job
.
id
=
"fake"
;
fake_job
.
id
=
"fake"
;
fake_job
.
unique_number
=
-
1
;
fake_job
.
nb_requested_resources
=
size
;
fake_job
.
nb_requested_resources
=
size
;
fake_job
.
walltime
=
time
;
fake_job
.
walltime
=
time
;
...
@@ -837,7 +837,7 @@ string Schedule::to_svg() const
...
@@ -837,7 +837,7 @@ string Schedule::to_svg() const
Rational
rect_x0
=
jobs_starting_times
[
job
]
*
second_width
-
x0
;
Rational
rect_x0
=
jobs_starting_times
[
job
]
*
second_width
-
x0
;
Rational
rect_x1
=
slice
.
begin
*
second_width
-
x0
;
Rational
rect_x1
=
slice
.
begin
*
second_width
-
x0
;
Rational
rect_width
=
rect_x1
-
rect_x0
;
Rational
rect_width
=
rect_x1
-
rect_x0
;
string
rect_color
=
_colors
[
job
->
unique_number
%
(
int
)
_colors
.
size
()];
string
rect_color
=
_colors
[
stoi
(
job
->
id
)
%
(
int
)
_colors
.
size
()];
// Let's find where the job has been allocated
// Let's find where the job has been allocated
PPK_ASSERT_ERROR
(
slice_it
!=
_profile
.
begin
());
PPK_ASSERT_ERROR
(
slice_it
!=
_profile
.
begin
());
...
...
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