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
6e37f6f1
Commit
6e37f6f1
authored
14 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
remove extra/unneeded unlocks
parent
9708c07d
No related branches found
Branches containing commit
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/plugin/bg_job_run.c
+26
-20
26 additions, 20 deletions
src/plugins/select/bluegene/plugin/bg_job_run.c
with
26 additions
and
20 deletions
src/plugins/select/bluegene/plugin/bg_job_run.c
+
26
−
20
View file @
6e37f6f1
...
@@ -602,12 +602,11 @@ static void _start_agent(bg_action_t *bg_action_ptr)
...
@@ -602,12 +602,11 @@ static void _start_agent(bg_action_t *bg_action_ptr)
bg_action_ptr
->
reboot
=
0
;
bg_action_ptr
->
reboot
=
0
;
/* Since bg_free_block will unlock block_state_mutex
/* Since bg_free_block will unlock block_state_mutex
we need to make sure the block we want is still
we need to make sure the block we want is still
around.
around. Failure will unlock this so no need to
unlock before return.
*/
*/
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
{
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
slurm_mutex_unlock
(
&
block_state_mutex
);
return
;
return
;
}
}
}
delete_list
=
list_create
(
NULL
);
delete_list
=
list_create
(
NULL
);
...
@@ -668,10 +667,10 @@ static void _start_agent(bg_action_t *bg_action_ptr)
...
@@ -668,10 +667,10 @@ static void _start_agent(bg_action_t *bg_action_ptr)
}
}
slurm_mutex_lock
(
&
block_state_mutex
);
slurm_mutex_lock
(
&
block_state_mutex
);
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
{
/* Failure will unlock block_state_mutex so no need to unlock before
slurm_mutex_unlock
(
&
block_state_mutex
);
return. */
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
return
;
return
;
}
if
(
bg_record
->
job_running
<=
NO_JOB_RUNNING
)
{
if
(
bg_record
->
job_running
<=
NO_JOB_RUNNING
)
{
// _reset_block(bg_record); should already happened
// _reset_block(bg_record); should already happened
...
@@ -748,10 +747,13 @@ static void _start_agent(bg_action_t *bg_action_ptr)
...
@@ -748,10 +747,13 @@ static void _start_agent(bg_action_t *bg_action_ptr)
bg_free_block
(
bg_record
,
1
,
1
);
bg_free_block
(
bg_record
,
1
,
1
);
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
{
/* Since bg_free_block will unlock block_state_mutex
slurm_mutex_unlock
(
&
block_state_mutex
);
we need to make sure the block we want is still
around. Failure will unlock block_state_mutex so
no need to unlock before return.
*/
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
return
;
return
;
}
#ifdef HAVE_BG_FILES
#ifdef HAVE_BG_FILES
#ifdef HAVE_BGL
#ifdef HAVE_BGL
if
((
rc
=
bridge_modify_block
(
bg_record
->
bg_block_id
,
if
((
rc
=
bridge_modify_block
(
bg_record
->
bg_block_id
,
...
@@ -832,29 +834,33 @@ static void _start_agent(bg_action_t *bg_action_ptr)
...
@@ -832,29 +834,33 @@ static void _start_agent(bg_action_t *bg_action_ptr)
bg_free_block
(
bg_record
,
1
,
1
);
bg_free_block
(
bg_record
,
1
,
1
);
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
{
/* Since bg_free_block will unlock block_state_mutex
slurm_mutex_unlock
(
&
block_state_mutex
);
we need to make sure the block we want is still
around. Failure will unlock block_state_mutex so
no need to unlock before return.
*/
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
return
;
return
;
}
bg_record
->
modifying
=
0
;
bg_record
->
modifying
=
0
;
}
}
if
(
bg_record
->
state
==
RM_PARTITION_FREE
)
{
if
(
bg_record
->
state
==
RM_PARTITION_FREE
)
{
if
((
rc
=
boot_block
(
bg_record
))
!=
SLURM_SUCCESS
)
{
if
((
rc
=
boot_block
(
bg_record
))
!=
SLURM_SUCCESS
)
{
/* Since boot_block could unlock block_state_mutex
on error we need to make sure the block we
want is still around. Failure will unlock
block_state_mutex so no need to unlock
before return.
*/
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
{
bg_record
))
slurm_mutex_unlock
(
&
block_state_mutex
);
return
;
return
;
}
_reset_block
(
bg_record
);
_reset_block
(
bg_record
);
slurm_mutex_unlock
(
&
block_state_mutex
);
slurm_mutex_unlock
(
&
block_state_mutex
);
bg_requeue_job
(
bg_action_ptr
->
job_ptr
->
job_id
,
1
);
bg_requeue_job
(
bg_action_ptr
->
job_ptr
->
job_id
,
1
);
return
;
return
;
}
}
if
(
!
_make_sure_block_still_exists
(
bg_action_ptr
,
bg_record
))
{
slurm_mutex_unlock
(
&
block_state_mutex
);
return
;
}
}
else
if
(
bg_record
->
state
==
RM_PARTITION_CONFIGURING
)
}
else
if
(
bg_record
->
state
==
RM_PARTITION_CONFIGURING
)
bg_record
->
boot_state
=
1
;
bg_record
->
boot_state
=
1
;
...
...
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