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
d3f64132
Commit
d3f64132
authored
11 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
Rename decay_factor to real_decay, no code change
parent
a6d45691
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/priority/multifactor/priority_multifactor.c
+9
-9
9 additions, 9 deletions
src/plugins/priority/multifactor/priority_multifactor.c
with
9 additions
and
9 deletions
src/plugins/priority/multifactor/priority_multifactor.c
+
9
−
9
View file @
d3f64132
...
@@ -159,12 +159,12 @@ extern uint16_t part_max_priority;
...
@@ -159,12 +159,12 @@ extern uint16_t part_max_priority;
/*
/*
* apply decay factor to all associations usage_raw
* apply decay factor to all associations usage_raw
* IN: decay
_factor
- decay to be applied to each associations' used
* IN:
real_
decay - decay to be applied to each associations' used
* shares. This should already be modified with the amount of delta
* shares. This should already be modified with the amount of delta
* time from last application..
* time from last application..
* RET: SLURM_SUCCESS on SUCCESS, SLURM_ERROR else.
* RET: SLURM_SUCCESS on SUCCESS, SLURM_ERROR else.
*/
*/
static
int
_apply_decay
(
double
decay
_factor
)
static
int
_apply_decay
(
double
real_
decay
)
{
{
ListIterator
itr
=
NULL
;
ListIterator
itr
=
NULL
;
slurmdb_association_rec_t
*
assoc
=
NULL
;
slurmdb_association_rec_t
*
assoc
=
NULL
;
...
@@ -172,12 +172,12 @@ static int _apply_decay(double decay_factor)
...
@@ -172,12 +172,12 @@ static int _apply_decay(double decay_factor)
assoc_mgr_lock_t
locks
=
{
WRITE_LOCK
,
NO_LOCK
,
assoc_mgr_lock_t
locks
=
{
WRITE_LOCK
,
NO_LOCK
,
WRITE_LOCK
,
NO_LOCK
,
NO_LOCK
};
WRITE_LOCK
,
NO_LOCK
,
NO_LOCK
};
/* continue if decay
_factor
is 0 or 1 since that doesn't help
/* continue if
real_
decay is 0 or 1 since that doesn't help
us at all. 1 means no decay and 0 will just zero
us at all. 1 means no decay and 0 will just zero
everything out so don't waste time doing it */
everything out so don't waste time doing it */
if
(
!
decay
_factor
)
if
(
!
real_
decay
)
return
SLURM_ERROR
;
return
SLURM_ERROR
;
else
if
(
!
calc_fairshare
||
(
decay
_factor
==
1
))
else
if
(
!
calc_fairshare
||
(
real_
decay
==
1
))
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
assoc_mgr_lock
(
&
locks
);
assoc_mgr_lock
(
&
locks
);
...
@@ -190,15 +190,15 @@ static int _apply_decay(double decay_factor)
...
@@ -190,15 +190,15 @@ static int _apply_decay(double decay_factor)
root. All usage_raws are calculated from the bottom up.
root. All usage_raws are calculated from the bottom up.
*/
*/
while
((
assoc
=
list_next
(
itr
)))
{
while
((
assoc
=
list_next
(
itr
)))
{
assoc
->
usage
->
usage_raw
*=
decay
_factor
;
assoc
->
usage
->
usage_raw
*=
real_
decay
;
assoc
->
usage
->
grp_used_wall
*=
decay
_factor
;
assoc
->
usage
->
grp_used_wall
*=
real_
decay
;
}
}
list_iterator_destroy
(
itr
);
list_iterator_destroy
(
itr
);
itr
=
list_iterator_create
(
assoc_mgr_qos_list
);
itr
=
list_iterator_create
(
assoc_mgr_qos_list
);
while
((
qos
=
list_next
(
itr
)))
{
while
((
qos
=
list_next
(
itr
)))
{
qos
->
usage
->
usage_raw
*=
decay
_factor
;
qos
->
usage
->
usage_raw
*=
real_
decay
;
qos
->
usage
->
grp_used_wall
*=
decay
_factor
;
qos
->
usage
->
grp_used_wall
*=
real_
decay
;
}
}
list_iterator_destroy
(
itr
);
list_iterator_destroy
(
itr
);
assoc_mgr_unlock
(
&
locks
);
assoc_mgr_unlock
(
&
locks
);
...
...
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