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
d82e59ab
Commit
d82e59ab
authored
13 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
BGQ - Make the status polling recursive instead of a bunch of static
for loops.
parent
190d69ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/select/bluegene/bl_bgq/bridge_status.cc
+23
-14
23 additions, 14 deletions
src/plugins/select/bluegene/bl_bgq/bridge_status.cc
with
23 additions
and
14 deletions
src/plugins/select/bluegene/bl_bgq/bridge_status.cc
+
23
−
14
View file @
d82e59ab
...
@@ -576,22 +576,28 @@ static void _handle_midplane_update(ComputeHardware::ConstPtr bgq,
...
@@ -576,22 +576,28 @@ static void _handle_midplane_update(ComputeHardware::ConstPtr bgq,
}
}
}
}
static
void
_do_hardware_poll
(
void
)
static
void
_do_hardware_poll
(
int
level
,
uint16_t
*
coords
,
ComputeHardware
::
ConstPtr
bgqsys
)
{
{
#if defined HAVE_BG_FILES
ba_mp_t
*
ba_mp
;
if
(
!
ba_main_grid
)
return
;
ComputeHardware
::
ConstPtr
bgq
=
getComputeHardware
();
if
(
!
ba_main_grid
||
(
level
>
SYSTEM_DIMENSIONS
))
return
;
for
(
int
a
=
0
;
a
<
DIM_SIZE
[
A
];
a
++
)
if
(
level
<
SYSTEM_DIMENSIONS
)
{
for
(
int
x
=
0
;
x
<
DIM_SIZE
[
X
];
x
++
)
for
(
coords
[
level
]
=
0
;
for
(
int
y
=
0
;
y
<
DIM_SIZE
[
Y
];
y
++
)
coords
[
level
]
<
DIM_SIZE
[
level
];
for
(
int
z
=
0
;
z
<
DIM_SIZE
[
Z
];
z
++
)
coords
[
level
]
++
)
{
_handle_midplane_update
(
/* handle the outter dims here */
bgq
,
&
ba_main_grid
[
a
][
x
][
y
][
z
]);
_do_hardware_poll
(
level
+
1
,
coords
,
bgqsys
);
#endif
}
return
;
}
ba_mp
=
coord2ba_mp
(
coords
);
if
(
ba_mp
)
_handle_midplane_update
(
bgqsys
,
ba_mp
);
}
}
static
void
*
_poll
(
void
*
no_data
)
static
void
*
_poll
(
void
*
no_data
)
{
{
event_handler_t
event_hand
;
event_handler_t
event_hand
;
...
@@ -609,8 +615,11 @@ static void *_poll(void *no_data)
...
@@ -609,8 +615,11 @@ static void *_poll(void *no_data)
curr_time
=
time
(
NULL
);
curr_time
=
time
(
NULL
);
_do_block_poll
();
_do_block_poll
();
/* only do every 30 seconds */
/* only do every 30 seconds */
if
((
curr_time
-
30
)
>=
last_ran
)
if
((
curr_time
-
30
)
>=
last_ran
)
{
_do_hardware_poll
();
ComputeHardware
::
ConstPtr
bgqsys
=
getComputeHardware
();
uint16_t
coords
[
SYSTEM_DIMENSIONS
];
_do_hardware_poll
(
0
,
coords
,
bgqsys
);
}
slurm_mutex_unlock
(
&
rt_mutex
);
slurm_mutex_unlock
(
&
rt_mutex
);
last_ran
=
time
(
NULL
);
last_ran
=
time
(
NULL
);
...
...
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