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
a29c1b19
Commit
a29c1b19
authored
22 years ago
by
tewk
Browse files
Options
Downloads
Patches
Plain Diff
Fixed rel_shmem bug in pthread implementation, but with forks this is needed
parent
2e16efef
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/slurmd/task_mgr.c
+8
-2
8 additions, 2 deletions
src/slurmd/task_mgr.c
src/slurmd/threaded_io.c
+2
-1
2 additions, 1 deletion
src/slurmd/threaded_io.c
with
10 additions
and
3 deletions
src/slurmd/task_mgr.c
+
8
−
2
View file @
a29c1b19
...
@@ -92,6 +92,7 @@ int fan_out_task_launch ( launch_tasks_request_msg_t * launch_msg )
...
@@ -92,6 +92,7 @@ int fan_out_task_launch ( launch_tasks_request_msg_t * launch_msg )
for
(
i
=
0
;
i
<
launch_msg
->
tasks_to_launch
;
i
++
)
for
(
i
=
0
;
i
<
launch_msg
->
tasks_to_launch
;
i
++
)
{
{
rc
=
pthread_join
(
task_start
[
i
]
->
pthread_id
,
NULL
)
;
rc
=
pthread_join
(
task_start
[
i
]
->
pthread_id
,
NULL
)
;
debug3
(
"thread %i pthread_id %i joined "
,
i
,
task_start
[
i
]
->
pthread_id
)
;
}
}
goto
return_label
;
goto
return_label
;
...
@@ -104,7 +105,9 @@ int fan_out_task_launch ( launch_tasks_request_msg_t * launch_msg )
...
@@ -104,7 +105,9 @@ int fan_out_task_launch ( launch_tasks_request_msg_t * launch_msg )
}
}
*/
*/
return_label:
return_label:
rel_shmem
(
shmem_ptr
)
;
/* can't release if this is the same process as the main daemon ie threads
* this is needed if we use forks
* rel_shmem ( shmem_ptr ) ; */
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
...
@@ -193,8 +196,8 @@ void * task_exec_thread ( void * arg )
...
@@ -193,8 +196,8 @@ void * task_exec_thread ( void * arg )
task_start
->
exec_pid
=
cpid
;
task_start
->
exec_pid
=
cpid
;
setup_parent_pipes
(
task_start
->
pipes
)
;
setup_parent_pipes
(
task_start
->
pipes
)
;
waitpid
(
cpid
,
&
task_return_code
,
0
)
;
waitpid
(
cpid
,
&
task_return_code
,
0
)
;
wait_on_io_threads
(
task_start
)
;
cleanup_parent_pipes
(
task_start
->
pipes
)
;
cleanup_parent_pipes
(
task_start
->
pipes
)
;
wait_on_io_threads
(
task_start
)
;
send_task_exit_msg
(
task_return_code
,
task_start
)
;
send_task_exit_msg
(
task_return_code
,
task_start
)
;
break
;
break
;
}
}
...
@@ -230,6 +233,7 @@ int kill_tasks ( kill_tasks_msg_t * kill_task_msg )
...
@@ -230,6 +233,7 @@ int kill_tasks ( kill_tasks_msg_t * kill_task_msg )
task_t
*
task_ptr
;
task_t
*
task_ptr
;
/* find job step */
/* find job step */
job_step_t
*
job_step_ptr
=
find_job_step
(
shmem_ptr
,
kill_task_msg
->
job_id
,
kill_task_msg
->
job_step_id
)
;
job_step_t
*
job_step_ptr
=
find_job_step
(
shmem_ptr
,
kill_task_msg
->
job_id
,
kill_task_msg
->
job_step_id
)
;
debug3
(
"entering kill_tasks"
)
;
if
(
job_step_ptr
==
(
void
*
)
SLURM_ERROR
)
if
(
job_step_ptr
==
(
void
*
)
SLURM_ERROR
)
{
{
debug3
(
"we have problems huston, find_job_step faild "
)
;
debug3
(
"we have problems huston, find_job_step faild "
)
;
...
@@ -245,7 +249,9 @@ int kill_tasks ( kill_tasks_msg_t * kill_task_msg )
...
@@ -245,7 +249,9 @@ int kill_tasks ( kill_tasks_msg_t * kill_task_msg )
kill_task
(
task_ptr
,
kill_task_msg
->
signal
)
;
kill_task
(
task_ptr
,
kill_task_msg
->
signal
)
;
task_ptr
=
task_ptr
->
next
;
task_ptr
=
task_ptr
->
next
;
i
++
;
i
++
;
debug3
(
"next task_ptr %i "
,
task_ptr
)
;
}
}
debug3
(
"leaving kill_tasks"
)
;
return
error_code
;
return
error_code
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/slurmd/threaded_io.c
+
2
−
1
View file @
a29c1b19
...
@@ -75,7 +75,8 @@ int wait_on_io_threads ( task_start_t * task_start )
...
@@ -75,7 +75,8 @@ int wait_on_io_threads ( task_start_t * task_start )
pthread_join
(
task_start
->
io_pthread_id
[
STDOUT_FILENO
]
,
NULL
)
;
pthread_join
(
task_start
->
io_pthread_id
[
STDOUT_FILENO
]
,
NULL
)
;
info
(
"outexit"
)
;
info
(
"outexit"
)
;
/*pthread_join ( task_start->io_pthread_id[STDIN_FILENO] , NULL ) ;*/
/*pthread_join ( task_start->io_pthread_id[STDIN_FILENO] , NULL ) ;*/
pthread_cancel
(
task_start
->
io_pthread_id
[
STDIN_FILENO
]
);
pthread_cancel
(
task_start
->
io_pthread_id
[
STDIN_FILENO
]
);
pthread_join
(
task_start
->
io_pthread_id
[
STDIN_FILENO
]
,
NULL
)
;
info
(
"inexit"
)
;
info
(
"inexit"
)
;
/* thread join on stderr or stdout signifies task termination we should kill the stdin thread */
/* thread join on stderr or stdout signifies task termination we should kill the stdin thread */
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
...
...
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