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
663dd99f
Commit
663dd99f
authored
18 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
easier keeping track of bluegene nodes in display, less code.
parent
ea6fd503
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/sview/block_info.c
+2
-90
2 additions, 90 deletions
src/sview/block_info.c
src/sview/grid.c
+5
-9
5 additions, 9 deletions
src/sview/grid.c
src/sview/sview.h
+0
-1
0 additions, 1 deletion
src/sview/sview.h
with
7 additions
and
100 deletions
src/sview/block_info.c
+
2
−
90
View file @
663dd99f
...
@@ -41,7 +41,6 @@ typedef struct {
...
@@ -41,7 +41,6 @@ typedef struct {
enum
connection_type
bg_conn_type
;
enum
connection_type
bg_conn_type
;
enum
node_use_type
bg_node_use
;
enum
node_use_type
bg_node_use
;
rm_partition_state_t
state
;
rm_partition_state_t
state
;
List
nodelist
;
int
size
;
int
size
;
uint16_t
quarter
;
uint16_t
quarter
;
uint16_t
nodecard
;
uint16_t
nodecard
;
...
@@ -111,13 +110,10 @@ static display_data_t *local_display_data = NULL;
...
@@ -111,13 +110,10 @@ static display_data_t *local_display_data = NULL;
static
char
*
_convert_conn_type
(
enum
connection_type
conn_type
);
static
char
*
_convert_conn_type
(
enum
connection_type
conn_type
);
static
char
*
_convert_node_use
(
enum
node_use_type
node_use
);
static
char
*
_convert_node_use
(
enum
node_use_type
node_use
);
static
char
*
_part_state_str
(
rm_partition_state_t
state
);
static
char
*
_part_state_str
(
rm_partition_state_t
state
);
static
void
_block_list_del
(
void
*
object
);
static
void
_nodelist_del
(
void
*
object
);
static
int
_in_slurm_partition
(
int
*
part_inx
,
int
*
block_inx
);
static
int
_in_slurm_partition
(
int
*
part_inx
,
int
*
block_inx
);
static
int
_make_nodelist
(
char
*
nodes
,
List
nodelist
);
static
void
_append_block_record
(
sview_block_info_t
*
block_ptr
,
static
void
_append_block_record
(
sview_block_info_t
*
block_ptr
,
GtkTreeStore
*
treestore
,
GtkTreeIter
*
iter
,
GtkTreeStore
*
treestore
,
GtkTreeIter
*
iter
,
int
line
);
int
line
);
...
@@ -157,21 +153,12 @@ static void _block_list_del(void *object)
...
@@ -157,21 +153,12 @@ static void _block_list_del(void *object)
xfree
(
block_ptr
->
bg_block_name
);
xfree
(
block_ptr
->
bg_block_name
);
xfree
(
block_ptr
->
slurm_part_name
);
xfree
(
block_ptr
->
slurm_part_name
);
xfree
(
block_ptr
->
nodes
);
xfree
(
block_ptr
->
nodes
);
if
(
block_ptr
->
nodelist
)
list_destroy
(
block_ptr
->
nodelist
);
xfree
(
block_ptr
);
xfree
(
block_ptr
);
}
}
}
}
static
void
_nodelist_del
(
void
*
object
)
{
int
*
coord
=
(
int
*
)
object
;
xfree
(
coord
);
return
;
}
static
int
_in_slurm_partition
(
int
*
part_inx
,
int
*
bp_inx
)
static
int
_in_slurm_partition
(
int
*
part_inx
,
int
*
bp_inx
)
{
{
int
found
=
0
;
int
found
=
0
;
...
@@ -196,79 +183,6 @@ static int _in_slurm_partition(int *part_inx, int *bp_inx)
...
@@ -196,79 +183,6 @@ static int _in_slurm_partition(int *part_inx, int *bp_inx)
return
1
;
return
1
;
}
}
static
int
_addto_nodelist
(
List
nodelist
,
int
*
start
,
int
*
end
)
{
int
*
coord
=
NULL
;
int
x
,
y
,
z
;
// assert(end[X] < DIM_SIZE[X]);
assert
(
start
[
X
]
>=
0
);
//assert(end[Y] < DIM_SIZE[Y]);
assert
(
start
[
Y
]
>=
0
);
//assert(end[Z] < DIM_SIZE[Z]);
assert
(
start
[
Z
]
>=
0
);
for
(
x
=
start
[
X
];
x
<=
end
[
X
];
x
++
)
{
for
(
y
=
start
[
Y
];
y
<=
end
[
Y
];
y
++
)
{
for
(
z
=
start
[
Z
];
z
<=
end
[
Z
];
z
++
)
{
coord
=
xmalloc
(
sizeof
(
int
)
*
3
);
coord
[
X
]
=
x
;
coord
[
Y
]
=
y
;
coord
[
Z
]
=
z
;
list_append
(
nodelist
,
coord
);
}
}
}
return
1
;
}
static
int
_make_nodelist
(
char
*
nodes
,
List
nodelist
)
{
int
j
=
0
;
int
number
;
int
start
[
BA_SYSTEM_DIMENSIONS
];
int
end
[
BA_SYSTEM_DIMENSIONS
];
if
(
!
nodelist
)
nodelist
=
list_create
(
_nodelist_del
);
while
(
nodes
[
j
]
!=
'\0'
)
{
if
((
nodes
[
j
]
==
'['
||
nodes
[
j
]
==
','
)
&&
(
nodes
[
j
+
8
]
==
']'
||
nodes
[
j
+
8
]
==
','
)
&&
(
nodes
[
j
+
4
]
==
'x'
||
nodes
[
j
+
4
]
==
'-'
))
{
j
++
;
number
=
atoi
(
nodes
+
j
);
start
[
X
]
=
number
/
100
;
start
[
Y
]
=
(
number
%
100
)
/
10
;
start
[
Z
]
=
(
number
%
10
);
j
+=
4
;
number
=
atoi
(
nodes
+
j
);
end
[
X
]
=
number
/
100
;
end
[
Y
]
=
(
number
%
100
)
/
10
;
end
[
Z
]
=
(
number
%
10
);
j
+=
3
;
_addto_nodelist
(
nodelist
,
start
,
end
);
if
(
nodes
[
j
]
!=
','
)
break
;
j
--
;
}
else
if
((
nodes
[
j
]
<
58
&&
nodes
[
j
]
>
47
))
{
number
=
atoi
(
nodes
+
j
);
start
[
X
]
=
number
/
100
;
start
[
Y
]
=
(
number
%
100
)
/
10
;
start
[
Z
]
=
(
number
%
10
);
j
+=
3
;
_addto_nodelist
(
nodelist
,
start
,
start
);
if
(
nodes
[
j
]
!=
','
)
break
;
}
j
++
;
}
return
1
;
}
static
char
*
_convert_conn_type
(
enum
connection_type
conn_type
)
static
char
*
_convert_conn_type
(
enum
connection_type
conn_type
)
{
{
...
@@ -513,8 +427,6 @@ static List _create_block_list(partition_info_msg_t *part_info_ptr,
...
@@ -513,8 +427,6 @@ static List _create_block_list(partition_info_msg_t *part_info_ptr,
bg_info_array
[
i
].
bg_block_id
);
bg_info_array
[
i
].
bg_block_id
);
block_ptr
->
nodes
block_ptr
->
nodes
=
xstrdup
(
node_select_ptr
->
bg_info_array
[
i
].
nodes
);
=
xstrdup
(
node_select_ptr
->
bg_info_array
[
i
].
nodes
);
block_ptr
->
nodelist
=
list_create
(
_nodelist_del
);
_make_nodelist
(
block_ptr
->
nodes
,
block_ptr
->
nodelist
);
block_ptr
->
bg_user_name
block_ptr
->
bg_user_name
=
xstrdup
(
node_select_ptr
->
=
xstrdup
(
node_select_ptr
->
...
...
This diff is collapsed.
Click to expand it.
src/sview/grid.c
+
5
−
9
View file @
663dd99f
...
@@ -450,7 +450,11 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list)
...
@@ -450,7 +450,11 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list)
return
SLURM_ERROR
;
return
SLURM_ERROR
;
}
}
#ifndef HAVE_BG
#ifdef HAVE_BG
node_count
=
DIM_SIZE
[
X
];
table_x
=
DIM_SIZE
[
X
]
+
DIM_SIZE
[
Z
];
table_y
=
(
DIM_SIZE
[
Z
]
*
DIM_SIZE
[
Y
])
+
DIM_SIZE
[
Y
];
#else
node_count
=
list_count
(
node_list
);
node_count
=
list_count
(
node_list
);
if
(
node_count
<
50
)
{
if
(
node_count
<
50
)
{
table_x
=
1
;
table_x
=
1
;
...
@@ -461,11 +465,6 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list)
...
@@ -461,11 +465,6 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list)
}
}
table_y
=
node_count
/
table_x
;
table_y
=
node_count
/
table_x
;
table_y
++
;
table_y
++
;
#else
node_count
=
DIM_SIZE
[
X
];
table_x
=
DIM_SIZE
[
X
]
+
DIM_SIZE
[
Z
];
table_y
=
(
DIM_SIZE
[
Z
]
*
DIM_SIZE
[
Y
])
+
DIM_SIZE
[
Y
];
#endif
#endif
gtk_table_resize
(
table
,
table_y
,
table_x
);
gtk_table_resize
(
table
,
table_y
,
table_x
);
...
@@ -484,9 +483,6 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list)
...
@@ -484,9 +483,6 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list)
coord_x
=
x
+
x_offset
;
coord_x
=
x
+
x_offset
;
grid_button
=
xmalloc
(
sizeof
(
grid_button_t
));
grid_button
=
xmalloc
(
sizeof
(
grid_button_t
));
grid_button
->
coord
[
X
]
=
x
;
grid_button
->
coord
[
Y
]
=
y
;
grid_button
->
coord
[
Z
]
=
z
;
grid_button
->
inx
=
i
++
;
grid_button
->
inx
=
i
++
;
grid_button
->
table
=
table
;
grid_button
->
table
=
table
;
grid_button
->
table_x
=
coord_x
;
grid_button
->
table_x
=
coord_x
;
...
...
This diff is collapsed.
Click to expand it.
src/sview/sview.h
+
0
−
1
View file @
663dd99f
...
@@ -185,7 +185,6 @@ typedef struct {
...
@@ -185,7 +185,6 @@ typedef struct {
int
state
;
int
state
;
int
table_x
;
int
table_x
;
int
table_y
;
int
table_y
;
int
coord
[
BA_SYSTEM_DIMENSIONS
];
}
grid_button_t
;
}
grid_button_t
;
typedef
struct
{
typedef
struct
{
...
...
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