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
61cea93e
Commit
61cea93e
authored
16 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add squeue formatted print option %Q to print a job's integer priority.
parent
8115913c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
NEWS
+1
-0
1 addition, 0 deletions
NEWS
doc/man/man1/squeue.1
+7
-2
7 additions, 2 deletions
doc/man/man1/squeue.1
src/squeue/opts.c
+5
-0
5 additions, 0 deletions
src/squeue/opts.c
src/squeue/print.c
+16
-2
16 additions, 2 deletions
src/squeue/print.c
src/squeue/print.h
+4
-0
4 additions, 0 deletions
src/squeue/print.h
with
33 additions
and
4 deletions
NEWS
+
1
−
0
View file @
61cea93e
...
@@ -18,6 +18,7 @@ documents those changes that are of interest to users and admins.
...
@@ -18,6 +18,7 @@ documents those changes that are of interest to users and admins.
-- Copied job stat logic out of sacct into sstat in the future sacct -stat
-- Copied job stat logic out of sacct into sstat in the future sacct -stat
will be deprecated.
will be deprecated.
-- Correct sbatch processing of --nice option with negative values.
-- Correct sbatch processing of --nice option with negative values.
-- Add squeue formatted print option %Q to print a job's integer priority.
* Changes in SLURM 1.3.2
* Changes in SLURM 1.3.2
========================
========================
...
...
This diff is collapsed.
Click to expand it.
doc/man/man1/squeue.1
+
7
−
2
View file @
61cea93e
.TH SQUEUE "1" "
December
200
6
" "squeue 1.
2
" "Slurm components"
.TH SQUEUE "1" "
May
200
8
" "squeue 1.
3
" "Slurm components"
.SH "NAME"
.SH "NAME"
squeue \- view information about jobs located in the SLURM scheduling queue.
squeue \- view information about jobs located in the SLURM scheduling queue.
...
@@ -189,7 +189,8 @@ Minimum number of nodes requested by the job.
...
@@ -189,7 +189,8 @@ Minimum number of nodes requested by the job.
Are contiguous nodes requested by the job
Are contiguous nodes requested by the job
.TP
.TP
\fB%p\fR
\fB%p\fR
Priority of the job (converted to a floating point number between 0.0 and 1.0
Priority of the job (converted to a floating point number between 0.0 and 1.0).
Also see \fB%Q\fR.
.TP
.TP
\fB%P\fR
\fB%P\fR
Partition of the job or job step
Partition of the job or job step
...
@@ -197,6 +198,10 @@ Partition of the job or job step
...
@@ -197,6 +198,10 @@ Partition of the job or job step
\fB%q\fR
\fB%q\fR
Comment associated with the job
Comment associated with the job
.TP
.TP
\fB%Q\fR
Priority of the job (generally a very large unsigned integer).
Also see \fB%p\fR.
.TP
\fB%r\fR
\fB%r\fR
The reason a job is in its current state.
The reason a job is in its current state.
See the \fBJOB REASON CODES\fR section below for more information.
See the \fBJOB REASON CODES\fR section below for more information.
...
...
This diff is collapsed.
Click to expand it.
src/squeue/opts.c
+
5
−
0
View file @
61cea93e
...
@@ -558,6 +558,11 @@ extern int parse_format( char* format )
...
@@ -558,6 +558,11 @@ extern int parse_format( char* format )
field_size
,
field_size
,
right_justify
,
right_justify
,
suffix
);
suffix
);
else
if
(
field
[
0
]
==
'Q'
)
job_format_add_priority_long
(
params
.
format_list
,
field_size
,
right_justify
,
suffix
);
else
if
(
field
[
0
]
==
'r'
)
else
if
(
field
[
0
]
==
'r'
)
job_format_add_reason
(
params
.
format_list
,
job_format_add_reason
(
params
.
format_list
,
field_size
,
field_size
,
...
...
This diff is collapsed.
Click to expand it.
src/squeue/print.c
+
16
−
2
View file @
61cea93e
/*****************************************************************************\
/*****************************************************************************\
* print.c - squeue print job functions
* print.c - squeue print job functions
* $Id$
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 The Regents of the University of California.
* Copyright (C) 2002-2007 The Regents of the University of California.
* Copyright (C) 2008 Lawrence Livermore National Security.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Joey Ekstrom <ekstrom1@llnl.gov>,
* Written by Joey Ekstrom <ekstrom1@llnl.gov>,
* Morris Jette <jette1@llnl.gov>, et. al.
* Morris Jette <jette1@llnl.gov>, et. al.
...
@@ -525,6 +525,20 @@ int _print_job_priority(job_info_t * job, int width, bool right, char* suffix)
...
@@ -525,6 +525,20 @@ int _print_job_priority(job_info_t * job, int width, bool right, char* suffix)
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
int
_print_job_priority_long
(
job_info_t
*
job
,
int
width
,
bool
right
,
char
*
suffix
)
{
char
temp
[
FORMAT_STRING_SIZE
];
if
(
job
==
NULL
)
/* Print the Header instead */
_print_str
(
"PRIORITY"
,
width
,
right
,
true
);
else
{
sprintf
(
temp
,
"%u"
,
job
->
priority
);
_print_str
(
temp
,
width
,
right
,
true
);
}
if
(
suffix
)
printf
(
"%s"
,
suffix
);
return
SLURM_SUCCESS
;
}
int
_print_job_nodes
(
job_info_t
*
job
,
int
width
,
bool
right
,
char
*
suffix
)
int
_print_job_nodes
(
job_info_t
*
job
,
int
width
,
bool
right
,
char
*
suffix
)
{
{
if
(
job
==
NULL
)
{
/* Print the Header instead */
if
(
job
==
NULL
)
{
/* Print the Header instead */
...
...
This diff is collapsed.
Click to expand it.
src/squeue/print.h
+
4
−
0
View file @
61cea93e
...
@@ -115,6 +115,8 @@ int job_format_add_function(List list, int width, bool right_justify,
...
@@ -115,6 +115,8 @@ int job_format_add_function(List list, int width, bool right_justify,
job_format_add_function(list,wid,right,suffix,_print_job_time_end)
job_format_add_function(list,wid,right,suffix,_print_job_time_end)
#define job_format_add_priority(list,wid,right,suffix) \
#define job_format_add_priority(list,wid,right,suffix) \
job_format_add_function(list,wid,right,suffix,_print_job_priority)
job_format_add_function(list,wid,right,suffix,_print_job_priority)
#define job_format_add_priority_long(list,wid,right,suffix) \
job_format_add_function(list,wid,right,suffix,_print_job_priority_long)
#define job_format_add_nodes(list,wid,right,suffix) \
#define job_format_add_nodes(list,wid,right,suffix) \
job_format_add_function(list,wid,right,suffix,_print_job_nodes)
job_format_add_function(list,wid,right,suffix,_print_job_nodes)
#define job_format_add_node_inx(list,wid,right,suffix) \
#define job_format_add_node_inx(list,wid,right,suffix) \
...
@@ -203,6 +205,8 @@ int _print_job_time_end(job_info_t * job, int width, bool right_justify,
...
@@ -203,6 +205,8 @@ int _print_job_time_end(job_info_t * job, int width, bool right_justify,
char
*
suffix
);
char
*
suffix
);
int
_print_job_priority
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
int
_print_job_priority
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
char
*
suffix
);
char
*
suffix
);
int
_print_job_priority_long
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
char
*
suffix
);
int
_print_job_nodes
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
int
_print_job_nodes
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
char
*
suffix
);
char
*
suffix
);
int
_print_job_node_inx
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
int
_print_job_node_inx
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
...
...
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