Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
9403500e
Commit
9403500e
authored
11 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
Accounting - Minor fix to avoid reuse of variable erroneously.
parent
2ed8a4d6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS
+1
-0
1 addition, 0 deletions
NEWS
src/plugins/accounting_storage/mysql/as_mysql_rollup.c
+8
-6
8 additions, 6 deletions
src/plugins/accounting_storage/mysql/as_mysql_rollup.c
with
9 additions
and
6 deletions
NEWS
+
1
−
0
View file @
9403500e
...
@@ -29,6 +29,7 @@ documents those changes that are of interest to users and admins.
...
@@ -29,6 +29,7 @@ documents those changes that are of interest to users and admins.
a reservation when it has the "Ignore_Jobs" flag set. Since jobs could run
a reservation when it has the "Ignore_Jobs" flag set. Since jobs could run
outside of the reservation in it's nodes without this you could have
outside of the reservation in it's nodes without this you could have
double time.
double time.
-- Accounting - Minor fix to avoid reuse of variable erroneously.
* Changes in Slurm 2.5.4
* Changes in Slurm 2.5.4
========================
========================
...
...
This diff is collapsed.
Click to expand it.
src/plugins/accounting_storage/mysql/as_mysql_rollup.c
+
8
−
6
View file @
9403500e
...
@@ -708,6 +708,7 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
...
@@ -708,6 +708,7 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
time_t
row_end
=
slurm_atoul
(
row
[
JOB_REQ_END
]);
time_t
row_end
=
slurm_atoul
(
row
[
JOB_REQ_END
]);
uint32_t
row_acpu
=
slurm_atoul
(
row
[
JOB_REQ_ACPU
]);
uint32_t
row_acpu
=
slurm_atoul
(
row
[
JOB_REQ_ACPU
]);
uint32_t
row_rcpu
=
slurm_atoul
(
row
[
JOB_REQ_RCPU
]);
uint32_t
row_rcpu
=
slurm_atoul
(
row
[
JOB_REQ_RCPU
]);
int
loc_seconds
=
0
;
seconds
=
0
;
seconds
=
0
;
if
(
row_start
&&
(
row_start
<
curr_start
))
if
(
row_start
&&
(
row_start
<
curr_start
))
...
@@ -820,8 +821,8 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
...
@@ -820,8 +821,8 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
temp_start
=
loc_c_usage
->
start
;
temp_start
=
loc_c_usage
->
start
;
if
(
loc_c_usage
->
end
<
temp_end
)
if
(
loc_c_usage
->
end
<
temp_end
)
temp_end
=
loc_c_usage
->
end
;
temp_end
=
loc_c_usage
->
end
;
seconds
=
(
temp_end
-
temp_start
);
loc_
seconds
=
(
temp_end
-
temp_start
);
if
(
seconds
>
0
)
{
if
(
loc_
seconds
>
0
)
{
/* info(" Job %u was running for " */
/* info(" Job %u was running for " */
/* "%"PRIu64" seconds while " */
/* "%"PRIu64" seconds while " */
/* "cluster %s's slurmctld " */
/* "cluster %s's slurmctld " */
...
@@ -831,7 +832,7 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
...
@@ -831,7 +832,7 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
/* (seconds * row_acpu), */
/* (seconds * row_acpu), */
/* cluster_name); */
/* cluster_name); */
loc_c_usage
->
total_time
-=
loc_c_usage
->
total_time
-=
seconds
*
row_acpu
;
loc_
seconds
*
row_acpu
;
}
}
}
}
...
@@ -913,8 +914,8 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
...
@@ -913,8 +914,8 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
temp_start
=
c_usage
->
start
;
temp_start
=
c_usage
->
start
;
if
(
c_usage
->
end
<
temp_end
)
if
(
c_usage
->
end
<
temp_end
)
temp_end
=
c_usage
->
end
;
temp_end
=
c_usage
->
end
;
seconds
=
(
temp_end
-
temp_start
);
loc_
seconds
=
(
temp_end
-
temp_start
);
if
(
seconds
>
0
)
{
if
(
loc_
seconds
>
0
)
{
/* info("%d assoc %d reserved " */
/* info("%d assoc %d reserved " */
/* "(%d)(%d-%d) * %d = %d " */
/* "(%d)(%d-%d) * %d = %d " */
/* "to %d", */
/* "to %d", */
...
@@ -925,7 +926,8 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
...
@@ -925,7 +926,8 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
/* row_rcpu, */
/* row_rcpu, */
/* seconds * row_rcpu, */
/* seconds * row_rcpu, */
/* row_rcpu); */
/* row_rcpu); */
c_usage
->
r_cpu
+=
seconds
*
row_rcpu
;
c_usage
->
r_cpu
+=
loc_seconds
*
row_rcpu
;
}
}
}
}
}
}
...
...
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