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
680f0d9a
Commit
680f0d9a
authored
16 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
reset start_time of pending jobs to zero after will_run logic completes
parent
f7ded2c1
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/sched/wiki2/job_will_run.c
+18
-3
18 additions, 3 deletions
src/plugins/sched/wiki2/job_will_run.c
with
18 additions
and
3 deletions
src/plugins/sched/wiki2/job_will_run.c
+
18
−
3
View file @
680f0d9a
...
@@ -156,6 +156,7 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -156,6 +156,7 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
int
i
,
rc
;
int
i
,
rc
;
select_will_run_t
*
select_will_run
=
NULL
;
select_will_run_t
*
select_will_run
=
NULL
;
List
select_list
;
List
select_list
;
ListIterator
iter
;
select_list
=
list_create
(
_select_list_del
);
select_list
=
list_create
(
_select_list_del
);
if
(
select_list
==
NULL
)
if
(
select_list
==
NULL
)
...
@@ -178,8 +179,6 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -178,8 +179,6 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
break
;
break
;
}
}
job_ptr
->
start_time
=
start_time
[
i
];
part_ptr
=
job_ptr
->
part_ptr
;
part_ptr
=
job_ptr
->
part_ptr
;
if
(
part_ptr
==
NULL
)
{
if
(
part_ptr
==
NULL
)
{
*
err_code
=
-
700
;
*
err_code
=
-
700
;
...
@@ -260,6 +259,7 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -260,6 +259,7 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
select_will_run
->
avail_nodes
=
avail_bitmap
;
select_will_run
->
avail_nodes
=
avail_bitmap
;
avail_bitmap
=
NULL
;
avail_bitmap
=
NULL
;
select_will_run
->
job_ptr
=
job_ptr
;
select_will_run
->
job_ptr
=
job_ptr
;
job_ptr
->
start_time
=
start_time
[
i
];
select_will_run
->
max_nodes
=
max_nodes
;
select_will_run
->
max_nodes
=
max_nodes
;
select_will_run
->
min_nodes
=
min_nodes
;
select_will_run
->
min_nodes
=
min_nodes
;
select_will_run
->
req_nodes
=
req_nodes
;
select_will_run
->
req_nodes
=
req_nodes
;
...
@@ -267,6 +267,13 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -267,6 +267,13 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
}
}
FREE_NULL_BITMAP
(
avail_bitmap
);
FREE_NULL_BITMAP
(
avail_bitmap
);
if
(
i
<
job_cnt
)
{
/* error logged above */
if
(
i
<
job_cnt
)
{
/* error logged above */
/* Restore pending job start time */
iter
=
list_iterator_create
(
select_list
);
if
(
iter
==
NULL
)
fatal
(
"list_iterator_create: malloc failure"
);
while
((
select_will_run
=
list_next
(
iter
)))
select_will_run
->
job_ptr
->
start_time
=
0
;
list_iterator_destroy
(
iter
);
list_destroy
(
select_list
);
list_destroy
(
select_list
);
return
NULL
;
return
NULL
;
}
}
...
@@ -285,7 +292,6 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -285,7 +292,6 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
if
(
rc
==
SLURM_SUCCESS
)
{
if
(
rc
==
SLURM_SUCCESS
)
{
char
tmp_str
[
128
];
char
tmp_str
[
128
];
ListIterator
iter
;
*
err_code
=
0
;
*
err_code
=
0
;
uint32_t
proc_cnt
=
0
;
uint32_t
proc_cnt
=
0
;
...
@@ -316,6 +322,8 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -316,6 +322,8 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
proc_cnt
,
proc_cnt
,
(
uint32_t
)
select_will_run
->
(
uint32_t
)
select_will_run
->
job_ptr
->
start_time
);
job_ptr
->
start_time
);
/* Restore pending job start time */
select_will_run
->
job_ptr
->
start_time
=
0
;
xstrcat
(
reply_msg
,
tmp_str
);
xstrcat
(
reply_msg
,
tmp_str
);
hostlist
=
bitmap2node_name
(
select_will_run
->
hostlist
=
bitmap2node_name
(
select_will_run
->
avail_nodes
);
avail_nodes
);
...
@@ -324,6 +332,13 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
...
@@ -324,6 +332,13 @@ static char * _will_run_test(uint32_t *jobid, time_t *start_time,
}
}
list_iterator_destroy
(
iter
);
list_iterator_destroy
(
iter
);
}
else
{
}
else
{
/* Restore pending job start times */
iter
=
list_iterator_create
(
select_list
);
if
(
iter
==
NULL
)
fatal
(
"list_iterator_create: malloc failure"
);
while
((
select_will_run
=
list_next
(
iter
)))
select_will_run
->
job_ptr
->
start_time
=
0
;
list_iterator_destroy
(
iter
);
xstrcat
(
reply_msg
,
"Jobs not runable on selected nodes"
);
xstrcat
(
reply_msg
,
"Jobs not runable on selected nodes"
);
error
(
"wiki: jobs not runnable on nodes"
);
error
(
"wiki: jobs not runnable on nodes"
);
}
}
...
...
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