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
311e1b80
Commit
311e1b80
authored
15 years ago
by
Don Lipari
Browse files
Options
Downloads
Patches
Plain Diff
Finished the work to allow scancel to select jobs by wckey
parent
88bb16aa
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
doc/man/man1/scancel.1
+9
-1
9 additions, 1 deletion
doc/man/man1/scancel.1
src/scancel/scancel.c
+20
-1
20 additions, 1 deletion
src/scancel/scancel.c
with
29 additions
and
2 deletions
doc/man/man1/scancel.1
+
9
−
1
View file @
311e1b80
...
@@ -84,7 +84,7 @@ Print additional logging. Multiple v's increase logging detail.
...
@@ -84,7 +84,7 @@ Print additional logging. Multiple v's increase logging detail.
This option is incompatible with the \fB\-\-quiet\fR option.
This option is incompatible with the \fB\-\-quiet\fR option.
.TP
.TP
\fB\-V\fR, \fB\-\-
V
ersion\fR
\fB\-V\fR, \fB\-\-
v
ersion\fR
Print the version number of the scancel command.
Print the version number of the scancel command.
.TP
.TP
...
@@ -94,6 +94,11 @@ a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for
...
@@ -94,6 +94,11 @@ a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for
example), or a filename. The host list will be assumed to be a filename only
example), or a filename. The host list will be assumed to be a filename only
if it contains a "/" character.
if it contains a "/" character.
.TP
\fB\-\-wckey\fR=\fIwckey\fR
Restrict the scancel operation to jobs using this workload
characterization key.
.TP
.TP
ARGUMENTS
ARGUMENTS
...
@@ -153,6 +158,9 @@ environment variables, along with their corresponding options, are listed below.
...
@@ -153,6 +158,9 @@ environment variables, along with their corresponding options, are listed below.
\fBSCANCEL_VERBOSE\fR
\fBSCANCEL_VERBOSE\fR
\fB\-v\fR, \fB\-\-verbose\fR
\fB\-v\fR, \fB\-\-verbose\fR
.TP 20
.TP 20
\fBSCANCEL_WCKEY\fR
\fB\-\-wckey\fR=\fIwckey\fR
.TP 20
\fBSLURM_CONF\fR
\fBSLURM_CONF\fR
The location of the SLURM configuration file.
The location of the SLURM configuration file.
...
...
This diff is collapsed.
Click to expand it.
src/scancel/scancel.c
+
20
−
1
View file @
311e1b80
...
@@ -116,7 +116,8 @@ main (int argc, char *argv[])
...
@@ -116,7 +116,8 @@ main (int argc, char *argv[])
(
opt
.
partition
)
||
(
opt
.
partition
)
||
(
opt
.
qos
)
||
(
opt
.
qos
)
||
(
opt
.
state
!=
JOB_END
)
||
(
opt
.
state
!=
JOB_END
)
||
(
opt
.
user_name
))
{
(
opt
.
user_name
)
||
(
opt
.
wckey
))
{
_filter_job_records
();
_filter_job_records
();
}
}
_cancel_jobs
();
_cancel_jobs
();
...
@@ -248,6 +249,24 @@ _filter_job_records (void)
...
@@ -248,6 +249,24 @@ _filter_job_records (void)
}
}
}
}
if
(
opt
.
wckey
!=
NULL
)
{
char
*
job_key
=
job_ptr
[
i
].
wckey
;
/*
* A wckey that begins with '*' indicates that the wckey
* was applied by default. When the --wckey option does
* not begin with a '*', act on all wckeys with the same
* name, default or not.
*/
if
((
opt
.
wckey
[
0
]
!=
'*'
)
&&
(
job_key
[
0
]
==
'*'
))
job_key
++
;
if
(
strcmp
(
job_key
,
job_ptr
[
i
].
wckey
)
!=
0
)
{
job_ptr
[
i
].
job_id
=
0
;
continue
;
}
}
if
(
opt
.
job_cnt
==
0
)
if
(
opt
.
job_cnt
==
0
)
continue
;
continue
;
for
(
j
=
0
;
j
<
opt
.
job_cnt
;
j
++
)
{
for
(
j
=
0
;
j
<
opt
.
job_cnt
;
j
++
)
{
...
...
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