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
370a9e1e
Commit
370a9e1e
authored
11 years ago
by
Morris Jette
Browse files
Options
Downloads
Plain Diff
Merge branch 'slurm-2.6'
parents
b150eb0d
226b49a3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/slurm_jobacct_gather.c
+1
-0
1 addition, 0 deletions
src/common/slurm_jobacct_gather.c
src/sstat/sstat.c
+5
-2
5 additions, 2 deletions
src/sstat/sstat.c
testsuite/expect/test21.26
+126
-46
126 additions, 46 deletions
testsuite/expect/test21.26
with
132 additions
and
48 deletions
src/common/slurm_jobacct_gather.c
+
1
−
0
View file @
370a9e1e
...
@@ -1122,6 +1122,7 @@ extern int jobacctinfo_unpack(jobacctinfo_t **jobacct,
...
@@ -1122,6 +1122,7 @@ extern int jobacctinfo_unpack(jobacctinfo_t **jobacct,
{
{
uint32_t
uint32_tmp
;
uint32_t
uint32_tmp
;
jobacct_gather_init
();
if
(
!
plugin_polling
&&
(
protocol_type
!=
PROTOCOL_TYPE_DBD
))
if
(
!
plugin_polling
&&
(
protocol_type
!=
PROTOCOL_TYPE_DBD
))
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
...
...
This diff is collapsed.
Click to expand it.
src/sstat/sstat.c
+
5
−
2
View file @
370a9e1e
...
@@ -157,9 +157,12 @@ int _do_stat(uint32_t jobid, uint32_t stepid, char *nodelist,
...
@@ -157,9 +157,12 @@ int _do_stat(uint32_t jobid, uint32_t stepid, char *nodelist,
xfree
(
step
.
pid_str
);
xfree
(
step
.
pid_str
);
}
else
{
}
else
{
hostlist_push
(
hl
,
step_stat
->
step_pids
->
node_name
);
hostlist_push
(
hl
,
step_stat
->
step_pids
->
node_name
);
jobacctinfo_2_stats
(
&
temp_stats
,
step_stat
->
jobacct
);
ntasks
+=
step_stat
->
num_tasks
;
ntasks
+=
step_stat
->
num_tasks
;
aggregate_stats
(
&
step
.
stats
,
&
temp_stats
);
if
(
step_stat
->
jobacct
)
{
jobacctinfo_2_stats
(
&
temp_stats
,
step_stat
->
jobacct
);
aggregate_stats
(
&
step
.
stats
,
&
temp_stats
);
}
}
}
}
}
list_iterator_destroy
(
itr
);
list_iterator_destroy
(
itr
);
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test21.26
+
126
−
46
View file @
370a9e1e
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# Copyright (C) 2009-2010 Lawrence Livermore National Security.
# Copyright (C) 2009-2010 Lawrence Livermore National Security.
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
# Written by Joseph Donaghy <donaghy1@llnl.gov>
# Written by Joseph Donaghy <donaghy1@llnl.gov>
# CODE-OCEC-09-009. All rights reserved.
#
#
# This file is part of SLURM, a resource management program.
# This file is part of SLURM, a resource management program.
# For details, see <http://slurm.schedmd.com/>.
# For details, see <http://slurm.schedmd.com/>.
...
@@ -33,12 +32,12 @@
...
@@ -33,12 +32,12 @@
############################################################################
############################################################################
source ./globals_accounting
source ./globals_accounting
set test_id "
test
21.26"
set test_id "21.26"
set exit_code 0
set exit_code 0
set tc1 [get_cluster_name]
set tc1 [get_cluster_name]
set ta1 slurm_test-account.1
set ta1 slurm_test-account.1
set ta2 slurm_test-account.2
set ta2 slurm_test-account.2
set qos1
qqostest
set qos1 qqostest
set tu1 slurm_test-user.1
set tu1 slurm_test-user.1
set access_err 0
set access_err 0
...
@@ -55,7 +54,7 @@ if { [test_account_storage] == 0 } {
...
@@ -55,7 +54,7 @@ if { [test_account_storage] == 0 } {
}
}
#
#
#
m
ake sure we have permission to do this work
#
M
ake sure we have permission to do this work
#
#
if { [string compare [check_accounting_admin_level] "Administrator"] } {
if { [string compare [check_accounting_admin_level] "Administrator"] } {
send_user "\nWARNING: This test can't be run without being an Accounting administrator.\nUse sacctmgr mod user \$USER_NAME admin=admin.\n"
send_user "\nWARNING: This test can't be run without being an Accounting administrator.\nUse sacctmgr mod user \$USER_NAME admin=admin.\n"
...
@@ -68,7 +67,10 @@ proc end_test { } {
...
@@ -68,7 +67,10 @@ proc end_test { } {
incr exit_code [remove_user "" "" "$tu1"]
incr exit_code [remove_user "" "" "$tu1"]
incr exit_code [remove_acct "" "$ta1,$ta2"]
incr exit_code [remove_acct "" "$ta1,$ta2"]
incr exit_code [remove_qos "$qos1"]
incr exit_code [remove_qos "$qos1"]
incr exit_code [mod_acct "$tc1" "" "root" "" "" "$qos_val" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { [string length $qos_val] } {
incr exit_code [mod_acct "$tc1" "" "root" "" "" "$qos_val" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
}
return $exit_code
}
}
...
@@ -82,6 +84,7 @@ remove_qos "$qos1"
...
@@ -82,6 +84,7 @@ remove_qos "$qos1"
# get the qos of root on the cluster since we are going to set it to
# get the qos of root on the cluster since we are going to set it to
# nothing here. And put it back at the end of the test.
# nothing here. And put it back at the end of the test.
set match 0
set match 0
set qos_val ""
set my_pid [eval spawn $sacctmgr list cluster $tc1 format=cluster,qos -np]
set my_pid [eval spawn $sacctmgr list cluster $tc1 format=cluster,qos -np]
expect {
expect {
-re "There was a problem" {
-re "There was a problem" {
...
@@ -145,7 +148,9 @@ if { $exit_code } {
...
@@ -145,7 +148,9 @@ if { $exit_code } {
}
}
#====Done add user====Done building test associations===Begin test section=======
#====Done add user====Done building test associations===Begin test section=======
#======Verify initial associations=============
# Verify initial associations
# NOTE: We do not use regular expressions below due to it's inability to test
# for a literal "|"
set matches 0
set matches 0
set my_pid [eval spawn $sacctmgr list assoc cluster=$tc1 format=qos,acct,user -p]
set my_pid [eval spawn $sacctmgr list assoc cluster=$tc1 format=qos,acct,user -p]
expect {
expect {
...
@@ -153,15 +158,27 @@ expect {
...
@@ -153,15 +158,27 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re "\n.root.(|root)." {
"\n|root||" {
incr matches
exp_continue
}
"\n|root|root|" {
incr matches
exp_continue
}
"\n|$ta1||" {
incr matches
exp_continue
}
"\n|$ta1|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re
"\n
.
$ta
1.(|$tu1).
" {
"\n
|
$ta
2||
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re
"\n
.
$ta2
.(
|$tu1
).
" {
"\n
|
$ta2|$tu1
|
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -174,14 +191,13 @@ expect {
...
@@ -174,14 +191,13 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: Initial sacctmgr add failed
with
($matches)\n"
send_user "\nFAILURE: Initial sacctmgr add failed ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
#======Begin Modification to Add $qos1 to $
accoun
t1=======
#======Begin Modification to Add $qos1 to $t
a
1=======
#modify test1 account to add test QoS
#modify test1 account to add test QoS
incr exit_code [mod_acct "$tc1" "" "$ta1" "" "" "+$qos1" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [mod_acct "$tc1" "" "$ta1" "" "" "+$qos1" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
if { $exit_code } {
...
@@ -192,21 +208,32 @@ if { $exit_code } {
...
@@ -192,21 +208,32 @@ if { $exit_code } {
#=======Done Modifying Account=======Next is Verify=======
#=======Done Modifying Account=======Next is Verify=======
set matches 0
set matches 0
set my_pid [eval spawn $sacctmgr list assoc cluster=$tc1 format=qos,acct,user -p]
set my_pid [eval spawn $sacctmgr list assoc cluster=$tc1 format=qos,acct,user -p]
expect {
expect {
-re "There was a problem" {
-re "There was a problem" {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re "\n.root.(|root)." {
"\n|root||" {
incr matches
exp_continue
}
"\n|root|root|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "
$qos1
.
$ta1
.(|$tu1).
" {
"\n
$qos1
|
$ta1
||
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "$qos1.$ta2.(|$tu1)." {
"\n$qos1|$ta1|$tu1|" {
incr matches
exp_continue
}
"\n$qos1|$ta2||" {
incr matches
exp_continue
}
"\n$qos1|$ta2|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -219,9 +246,8 @@ expect {
...
@@ -219,9 +246,8 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: failed on verify of +$qos1 to account $
accoun
t1 ($matches)\n"
send_user "\nFAILURE: failed on verify of +$qos1 to account $t
a
1 ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
...
@@ -242,15 +268,27 @@ expect {
...
@@ -242,15 +268,27 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re "\n.root.(|root)." {
"\n|root||" {
incr matches
exp_continue
}
"\n|root|root|" {
incr matches
exp_continue
}
"\n$qos1|$ta1||" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "
$qos1
.
$ta1
.(
|$tu1
).
" {
"\n
$qos1
|
$ta1|$tu1
|
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "\n.$ta2.(|$tu1)." {
"\n|$ta2||" {
incr matches
exp_continue
}
"\n|$ta2|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -263,15 +301,14 @@ expect {
...
@@ -263,15 +301,14 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: verify of -$qos1 from account $ta2 ($matches)\n"
send_user "\nFAILURE: verify of -$qos1 from account $ta2 ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
#======Begin Modification to Subtract $qos1 from $
accoun
t1=======
#======Begin Modification to Subtract $qos1 from $t
a
1=======
#modify test1 account to remove test QoS
#modify test1 account to remove test QoS
incr exit_code [mod_acct "$tc1" "" "$ta1" "" "" "-$qos1" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [mod_acct "$tc1" "" "$ta1" "" "" "-$qos1" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
if { $exit_code } {
...
@@ -287,15 +324,27 @@ expect {
...
@@ -287,15 +324,27 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re
"\n
.
root
.(|root).
" {
"\n
|
root
||
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "\n.$ta1.(|$tu1).
" {
"\n|root|root|
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "\n.$ta2.(|$tu1)." {
"\n|$ta1||" {
incr matches
exp_continue
}
"\n|$ta1|$tu1|" {
incr matches
exp_continue
}
"\n|$ta2||" {
incr matches
exp_continue
}
"\n|$ta2|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -308,14 +357,13 @@ expect {
...
@@ -308,14 +357,13 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: verify of -$qos1 from account $
accoun
t1 ($matches)\n"
send_user "\nFAILURE: verify of -$qos1 from account $t
a
1 ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
#=====Begin Modification to Add $qos1 from $
accoun
t2=======
#=====Begin Modification to Add $qos1 from $t
a
2=======
#modify test2 account to add test QoS
#modify test2 account to add test QoS
incr exit_code [mod_acct "$tc1" "" "$ta2" "" "" "+$qos1" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
incr exit_code [mod_acct "$tc1" "" "$ta2" "" "" "+$qos1" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""]
if { $exit_code } {
if { $exit_code } {
...
@@ -332,15 +380,27 @@ expect {
...
@@ -332,15 +380,27 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re "\n.root.(|root)." {
"\n|root||" {
incr matches
exp_continue
}
"\n|root|root|" {
incr matches
exp_continue
}
"\n|$ta1||" {
incr matches
exp_continue
}
"\n|$ta1|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "\n.$ta1.(|$tu1).
" {
"\n$qos1|$ta2||
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "
$qos1
.
$ta2
.(
|$tu1
).
" {
"\n
$qos1
|
$ta2|$tu1
|
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -353,9 +413,8 @@ expect {
...
@@ -353,9 +413,8 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: failed on verify of +$qos1 to account $
accoun
t2 ($matches)\n"
send_user "\nFAILURE: failed on verify of +$qos1 to account $t
a
2 ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
...
@@ -377,15 +436,27 @@ expect {
...
@@ -377,15 +436,27 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re "$qos1.root.(|root)." {
"\n$qos1|root||" {
incr matches
exp_continue
}
"\n$qos1|root|root|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re
"\n
.
$ta1
.(|$tu1).
" {
"\n
|
$ta1
||
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "$qos1.$ta2.(|$tu1)." {
"\n|$ta1|$tu1|" {
incr matches
exp_continue
}
"\n$qos1|$ta2||" {
incr matches
exp_continue
}
"\n$qos1|$ta2|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -398,9 +469,8 @@ expect {
...
@@ -398,9 +469,8 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: failed on verify of +$qos1 to account root ($matches)\n"
send_user "\nFAILURE: failed on verify of +$qos1 to account root ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
...
@@ -422,15 +492,27 @@ expect {
...
@@ -422,15 +492,27 @@ expect {
send_user "FAILURE: there was a problem with the sacctmgr command\n"
send_user "FAILURE: there was a problem with the sacctmgr command\n"
exit 1
exit 1
}
}
-re "$qos1.root.(|root)." {
"\n$qos1|root||" {
incr matches
exp_continue
}
"\n$qos1|root|root|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re
"\n
.
$ta1
.(|$tu1).
" {
"\n
|
$ta1
||
" {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "\n.$ta2.(|$tu1)." {
"\n|$ta1|$tu1|" {
incr matches
exp_continue
}
"\n|$ta2||" {
incr matches
exp_continue
}
"\n|$ta2|$tu1|" {
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -443,14 +525,12 @@ expect {
...
@@ -443,14 +525,12 @@ expect {
wait
wait
}
}
}
}
if {$matches != 6} {
if {$matches != 6} {
send_user "\nFAILURE: failed on verify of -$qos1 to account $
accoun
t2 ($matches)\n"
send_user "\nFAILURE: failed on verify of -$qos1 to account $t
a
2 ($matches
!= 6
)\n"
end_test
end_test
exit 1
exit 1
}
}
#======Done With List====== Ending=======
#======Done With List====== Ending=======
# This is the end below here
# This is the end below here
#
#
...
...
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