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
01f7576a
Commit
01f7576a
authored
11 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
Minor name changing
parent
475de22e
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
+28
-20
28 additions, 20 deletions
src/plugins/priority/multifactor/priority_multifactor.c
with
28 additions
and
20 deletions
src/plugins/priority/multifactor/priority_multifactor.c
+
28
−
20
View file @
01f7576a
...
...
@@ -1665,27 +1665,33 @@ extern void priority_p_set_assoc_usage(slurmdb_association_rec_t *assoc)
parent_assoc
->
usage
->
usage_efctv
);
}
}
else
if
(
flags
&
PRIORITY_FLAGS_DEPTH_OBLIVIOUS
)
{
long
double
r
p
,
r
l
,
k
,
f
,
rs
;
long
double
r
atio_p
,
ratio_
l
,
k
,
f
,
r
atio_
s
;
slurmdb_association_rec_t
*
parent_assoc
=
NULL
;
ListIterator
sib_itr
=
NULL
;
slurmdb_association_rec_t
*
sibling
=
NULL
;
/* We want priority_fs = pow(2.0, -R); where
R = rp * rl^k */
R = ratio_p * ratio_l^k
*/
/* rp is R for our parent */
/* r
atio_
p is R for our parent */
/* rl is our usage ratio r divided by rs, the usage ratio of
* our siblings (including ourselves). In the standard case
* where everything is consumed at the leaf accounts rs=rp */
/* ratio_l is our usage ratio r divided by ratio_s,
* the usage ratio of our siblings (including
* ourselves). In the standard case where everything
* is consumed at the leaf accounts ratio_s=ratio_p
*/
/* k is a factor which tends towards 0 when rp diverges from 1
and rl would bring back R towards 1*/
/* k is a factor which tends towards 0 when ratio_p
diverges from 1 and ratio_l would bring back R
towards 1
*/
/* Effective usage is now computed to be R*shares_norm
so that the general formula of
priority_fs = pow(2.0, -(usage_efctv / shares_norm))
gives what we want: priority_fs = pow(2.0, -R); */
gives what we want: priority_fs = pow(2.0, -R);
*/
f
=
5
.
0
;
/* FIXME: This could be a tunable parameter
(higher f means more impact when parent consumption
...
...
@@ -1696,37 +1702,39 @@ extern void priority_p_set_assoc_usage(slurmdb_association_rec_t *assoc)
parent_assoc
->
usage
->
shares_norm
&&
parent_assoc
->
usage
->
usage_efctv
&&
assoc
->
usage
->
usage_norm
)
{
rp
=
(
parent_assoc
->
usage
->
usage_efctv
/
r
atio_
p
=
(
parent_assoc
->
usage
->
usage_efctv
/
parent_assoc
->
usage
->
shares_norm
);
rs
=
0
;
r
atio_
s
=
0
;
sib_itr
=
list_iterator_create
(
parent_assoc
->
usage
->
children_list
);
while
((
sibling
=
list_next
(
sib_itr
)))
{
if
(
sibling
->
shares_raw
!=
SLURMDB_FS_USE_PARENT
)
rs
+=
sibling
->
usage
->
usage_norm
;
r
atio_
s
+=
sibling
->
usage
->
usage_norm
;
}
list_iterator_destroy
(
sib_itr
);
rs
/=
parent_assoc
->
usage
->
shares_norm
;
r
atio_
s
/=
parent_assoc
->
usage
->
shares_norm
;
rl
=
(
assoc
->
usage
->
usage_norm
/
assoc
->
usage
->
shares_norm
)
/
rs
;
r
atio_
l
=
(
assoc
->
usage
->
usage_norm
/
assoc
->
usage
->
shares_norm
)
/
r
atio_
s
;
if
(
rp
==
0
||
rl
==
0
||
logl
(
rp
)
*
logl
(
rl
)
>=
0
)
{
if
(
!
ratio_p
||
!
ratio_l
||
logl
(
ratio_p
)
*
logl
(
ratio_l
)
>=
0
)
{
k
=
1
;
}
else
{
k
=
1
/
(
1
+
powl
(
f
*
logl
(
rp
),
2
));
k
=
1
/
(
1
+
powl
(
f
*
logl
(
r
atio_
p
),
2
));
}
assoc
->
usage
->
usage_efctv
=
rp
*
powl
(
rl
,
k
)
*
assoc
->
usage
->
shares_norm
;
assoc
->
usage
->
usage_efctv
=
ratio_p
*
powl
(
ratio_l
,
k
)
*
assoc
->
usage
->
shares_norm
;
if
(
priority_debug
)
{
info
(
"Effective usage for %s %s off %s "
"(%Lf * %Lf ^ %Lf) * %f = %Lf"
,
child
,
child_str
,
assoc
->
usage
->
parent_assoc_ptr
->
acct
,
r
p
,
r
l
,
k
,
r
atio_p
,
ratio_
l
,
k
,
assoc
->
usage
->
shares_norm
,
assoc
->
usage
->
usage_efctv
);
}
...
...
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