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
6f8fc6c7
Commit
6f8fc6c7
authored
22 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Report on first <ctrl-c> that second one require to forward signal.
Combine line task states on a single line, not one per task.
parent
83a8e6ef
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/srun/io.c
+18
-3
18 additions, 3 deletions
src/srun/io.c
src/srun/srun.c
+1
-0
1 addition, 0 deletions
src/srun/srun.c
with
19 additions
and
3 deletions
src/srun/io.c
+
18
−
3
View file @
6f8fc6c7
...
...
@@ -293,11 +293,26 @@ static char *_host_state_name(host_state_t state_inx)
void
report_task_status
(
job_t
*
job
)
{
int
i
;
int
i
,
j
;
int
first_task
,
last_task
;
task_state_t
current_state
;
for
(
i
=
0
;
i
<
opt
.
nprocs
;
i
++
)
{
info
(
"task:%d state:%s"
,
i
,
_task_state_name
(
job
->
task_state
[
i
]));
current_state
=
job
->
task_state
[
i
];
first_task
=
last_task
=
i
;
for
(
j
=
(
i
+
1
);
j
<
opt
.
nprocs
;
j
++
)
{
if
(
current_state
==
job
->
task_state
[
i
])
last_task
=
j
;
else
break
;
}
if
(
first_task
==
last_task
)
info
(
"task:%d state:%s"
,
first_task
,
_task_state_name
(
current_state
));
else
info
(
"tasks:%d-%d state:%s"
,
first_task
,
last_task
,
_task_state_name
(
current_state
));
i
=
last_task
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/srun/srun.c
+
1
−
0
View file @
6f8fc6c7
...
...
@@ -517,6 +517,7 @@ _sig_thr(void *arg)
switch
(
signo
)
{
case
SIGINT
:
if
((
time
(
NULL
)
-
last_intr
)
>
1
)
{
info
(
"interrupt (one more within 1 sec to abort)"
);
report_task_status
(
job
);
last_intr
=
time
(
NULL
);
}
else
{
/* second Ctrl-C in half as many seconds */
...
...
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