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
9de3be8f
Commit
9de3be8f
authored
10 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
BGQ - Fix scontrol and sview to print reservations correctly for
reservations less than a midplane.
parent
7391fdf0
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/api/reservation_info.c
+6
-2
6 additions, 2 deletions
src/api/reservation_info.c
src/sview/common.c
+6
-3
6 additions, 3 deletions
src/sview/common.c
src/sview/resv_info.c
+32
-6
32 additions, 6 deletions
src/sview/resv_info.c
with
44 additions
and
11 deletions
src/api/reservation_info.c
+
6
−
2
View file @
9de3be8f
...
...
@@ -109,6 +109,8 @@ char *slurm_sprint_reservation_info ( reserve_info_t * resv_ptr,
char
*
out
=
NULL
;
uint32_t
duration
;
time_t
now
=
time
(
NULL
);
uint32_t
cluster_flags
=
slurmdb_setup_cluster_flags
();
bool
is_bluegene
=
cluster_flags
&
CLUSTER_FLAG_BG
;
/****** Line 1 ******/
slurm_make_time_str
(
&
resv_ptr
->
start_time
,
tmp1
,
sizeof
(
tmp1
));
...
...
@@ -133,9 +135,11 @@ char *slurm_sprint_reservation_info ( reserve_info_t * resv_ptr,
flag_str
=
reservation_flags_string
(
resv_ptr
->
flags
);
snprintf
(
tmp_line
,
sizeof
(
tmp_line
),
"
Node
s=%s
Node
Cnt=%u
Core
Cnt=%u Features=%s "
"
%
s=%s
%s
Cnt=%u
%s
Cnt=%u Features=%s "
"PartitionName=%s Flags=%s"
,
resv_ptr
->
node_list
,
resv_ptr
->
node_cnt
,
resv_ptr
->
core_cnt
,
is_bluegene
?
"Midplanes"
:
"Nodes"
,
resv_ptr
->
node_list
,
is_bluegene
?
"Midplane"
:
"Node"
,
resv_ptr
->
node_cnt
,
is_bluegene
?
"Cnode"
:
"Core"
,
resv_ptr
->
core_cnt
,
resv_ptr
->
features
,
resv_ptr
->
partition
,
flag_str
);
xfree
(
flag_str
);
xstrcat
(
out
,
tmp_line
);
...
...
This diff is collapsed.
Click to expand it.
src/sview/common.c
+
6
−
3
View file @
9de3be8f
...
...
@@ -944,13 +944,16 @@ extern void set_page_opts(int page, display_data_t *display_data,
itr
=
list_iterator_create
(
page_opts
->
col_list
);
while
((
col_name
=
list_next
(
itr
)))
{
replus
(
col_name
);
if
(
strstr
(
col_name
,
"list"
))
{
if
(
strstr
(
col_name
,
"list"
)
||
strstr
(
col_name
,
" count"
)
)
{
char
*
orig_ptr
=
col_name
;
xstrsubstitute
(
col_name
,
"bp "
,
"midplane"
);
if
(
cluster_flags
&
CLUSTER_FLAG_BG
)
if
(
cluster_flags
&
CLUSTER_FLAG_BG
)
{
xstrsubstitute
(
col_name
,
"node"
,
"midplane"
);
else
xstrsubstitute
(
col_name
,
"core"
,
"cnode"
);
}
else
{
xstrsubstitute
(
col_name
,
"midplane"
,
"node"
);
xstrsubstitute
(
col_name
,
"cnode"
,
"core"
);
}
/* Make sure we have the correct pointer here
since xstrsubstitute() could of changed it
...
...
This diff is collapsed.
Click to expand it.
src/sview/resv_info.c
+
32
−
6
View file @
9de3be8f
...
...
@@ -54,6 +54,7 @@ enum {
SORTID_ACTION
,
SORTID_COLOR
,
SORTID_COLOR_INX
,
SORTID_CORE_CNT
,
SORTID_DURATION
,
SORTID_FEATURES
,
SORTID_FLAGS
,
...
...
@@ -78,7 +79,7 @@ enum {
/*these are the settings to apply for the user
* on the first startup after a fresh slurm install.
* s/b a const probably*/
static
char
*
_initial_page_opts
=
"Name,Node_Count,NodeList,"
static
char
*
_initial_page_opts
=
"Name,Node_Count,
Core_Count,
NodeList,"
"Time_Start,Time_End"
;
static
display_data_t
display_data_resv
[]
=
{
...
...
@@ -90,8 +91,20 @@ static display_data_t display_data_resv[] = {
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_ACTION
,
"Action"
,
FALSE
,
EDIT_MODEL
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODE_CNT
,
"Node Count"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODE_CNT
,
#ifdef HAVE_BG
"Midplane Count"
,
#else
"Node Count"
,
#endif
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_CORE_CNT
,
#ifdef HAVE_BG
"Cnode Count"
,
#else
"Core Count"
,
#endif
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODELIST
,
#ifdef HAVE_BG
"MidplaneList"
,
...
...
@@ -131,8 +144,10 @@ static display_data_t create_data_resv[] = {
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NAME
,
"Name"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODE_CNT
,
"Node_Count"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODE_CNT
,
"Node_Count"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODE_CNT
,
"Core_Count"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODELIST
,
#ifdef HAVE_BG
"Midplane_List"
,
...
...
@@ -554,6 +569,12 @@ static void _layout_resv_record(GtkTreeView *treeview,
SORTID_ACCOUNTS
),
resv_ptr
->
accounts
);
convert_num_unit
((
float
)
resv_ptr
->
core_cnt
,
time_buf
,
sizeof
(
time_buf
),
UNIT_NONE
);
add_display_treestore_line
(
update
,
treestore
,
&
iter
,
find_col_name
(
display_data_resv
,
SORTID_CORE_CNT
),
time_buf
);
secs2time_str
((
uint32_t
)
difftime
(
resv_ptr
->
end_time
,
resv_ptr
->
start_time
),
time_buf
,
sizeof
(
time_buf
));
...
...
@@ -619,7 +640,8 @@ static void _layout_resv_record(GtkTreeView *treeview,
static
void
_update_resv_record
(
sview_resv_info_t
*
sview_resv_info_ptr
,
GtkTreeStore
*
treestore
)
{
char
tmp_duration
[
40
],
tmp_end
[
40
],
tmp_nodes
[
40
],
tmp_start
[
40
];
char
tmp_duration
[
40
],
tmp_end
[
40
],
tmp_nodes
[
40
],
tmp_start
[
40
],
tmp_cores
[
40
];
char
*
tmp_flags
;
reserve_info_t
*
resv_ptr
=
sview_resv_info_ptr
->
resv_ptr
;
...
...
@@ -632,6 +654,9 @@ static void _update_resv_record(sview_resv_info_t *sview_resv_info_ptr,
tmp_flags
=
reservation_flags_string
(
resv_ptr
->
flags
);
convert_num_unit
((
float
)
resv_ptr
->
core_cnt
,
tmp_cores
,
sizeof
(
tmp_cores
),
UNIT_NONE
);
convert_num_unit
((
float
)
resv_ptr
->
node_cnt
,
tmp_nodes
,
sizeof
(
tmp_nodes
),
UNIT_NONE
);
...
...
@@ -644,6 +669,7 @@ static void _update_resv_record(sview_resv_info_t *sview_resv_info_ptr,
SORTID_COLOR
,
sview_colors
[
sview_resv_info_ptr
->
color_inx
],
SORTID_COLOR_INX
,
sview_resv_info_ptr
->
color_inx
,
SORTID_CORE_CNT
,
tmp_cores
,
SORTID_DURATION
,
tmp_duration
,
SORTID_FEATURES
,
resv_ptr
->
features
,
SORTID_FLAGS
,
tmp_flags
,
...
...
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