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
01a1be32
Commit
01a1be32
authored
22 years ago
by
tewk
Browse files
Options
Downloads
Patches
Plain Diff
Removed second pthread_create in nbio build
parent
fc8e36a9
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/nb_io.c
+9
-8
9 additions, 8 deletions
src/slurmd/nb_io.c
src/slurmd/task_mgr.c
+1
-1
1 addition, 1 deletion
src/slurmd/task_mgr.c
with
10 additions
and
9 deletions
src/slurmd/nb_io.c
+
9
−
8
View file @
01a1be32
...
@@ -36,21 +36,22 @@
...
@@ -36,21 +36,22 @@
******************************************************************/
******************************************************************/
int
forward_io
(
task_start_t
*
task_start
)
int
forward_io
(
task_start_t
*
task_start
)
{
{
pthread_attr_t
pthread_attr
;
//
pthread_attr_t pthread_attr ;
pthread_attr_init
(
&
pthread_attr
)
;
//
pthread_attr_init( & pthread_attr ) ;
/* set detatch state */
/* set detatch state */
/*pthread_attr_setdetachstate ( & pthread_attr , PTHREAD_CREATE_DETACHED ) ;*/
/*pthread_attr_setdetachstate ( & pthread_attr , PTHREAD_CREATE_DETACHED ) ;*/
if
(
pthread_create
(
&
task_start
->
io_pthread_id
[
STDIN_FILENO
]
,
NULL
,
do_nbio
,
task_start
)
)
//if ( pthread_create ( & task_start->io_pthread_id[STDIN_FILENO] , NULL , do_nbio , task_start ) )
{
//{
return
SLURM_FAILURE
;
// return SLURM_FAILURE ;
}
//}
return
SLURM_SUCCESS
;
//return SLURM_SUCCESS ;
return
do_nbio
(
task_start
)
;
}
}
int
wait_on_io_threads
(
task_start_t
*
task_start
)
int
wait_on_io_threads
(
task_start_t
*
task_start
)
{
{
pthread_join
(
task_start
->
io_pthread_id
[
STDIN_FILENO
]
,
NULL
)
;
//
pthread_join ( task_start->io_pthread_id[STDIN_FILENO] , NULL ) ;
info
(
"%i: nbio exit"
,
task_start
->
local_task_id
)
;
info
(
"%i: nbio exit"
,
task_start
->
local_task_id
)
;
/* 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.
src/slurmd/task_mgr.c
+
1
−
1
View file @
01a1be32
...
@@ -126,7 +126,6 @@ void * task_exec_thread ( void * arg )
...
@@ -126,7 +126,6 @@ void * task_exec_thread ( void * arg )
/* create pipes to read child stdin, stdout, sterr */
/* create pipes to read child stdin, stdout, sterr */
init_parent_pipes
(
task_start
->
pipes
)
;
init_parent_pipes
(
task_start
->
pipes
)
;
forward_io
(
arg
)
;
#define FORK_ERROR -1
#define FORK_ERROR -1
#define CHILD_PROCCESS 0
#define CHILD_PROCCESS 0
...
@@ -205,6 +204,7 @@ void * task_exec_thread ( void * arg )
...
@@ -205,6 +204,7 @@ void * task_exec_thread ( void * arg )
/* ask me how I know :) */
/* ask me how I know :) */
/* think once, twice, 10^100000000 times before changeing the below */
/* think once, twice, 10^100000000 times before changeing the below */
/*1*/
setup_parent_pipes
(
task_start
->
pipes
)
;
/*1*/
setup_parent_pipes
(
task_start
->
pipes
)
;
/*1.5*/
forward_io
(
arg
)
;
/*2*/
waitpid
(
cpid
,
&
task_return_code
,
0
)
;
/*2*/
waitpid
(
cpid
,
&
task_return_code
,
0
)
;
/*3*/
wait_on_io_threads
(
task_start
)
;
/*3*/
wait_on_io_threads
(
task_start
)
;
...
...
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