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
22f2accc
Commit
22f2accc
authored
15 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
backfill was attempting to run while jobs were in completing state if
CompleteWait configured to 0 (default). Change to wait.
parent
466be21a
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/sched/backfill/backfill.c
+34
-2
34 additions, 2 deletions
src/plugins/sched/backfill/backfill.c
with
34 additions
and
2 deletions
src/plugins/sched/backfill/backfill.c
+
34
−
2
View file @
22f2accc
...
@@ -119,6 +119,7 @@ static void _add_reservation(uint32_t start_time, uint32_t end_reserve,
...
@@ -119,6 +119,7 @@ static void _add_reservation(uint32_t start_time, uint32_t end_reserve,
static
void
_attempt_backfill
(
void
);
static
void
_attempt_backfill
(
void
);
static
void
_diff_tv_str
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
,
static
void
_diff_tv_str
(
struct
timeval
*
tv1
,
struct
timeval
*
tv2
,
char
*
tv_str
,
int
len_tv_str
);
char
*
tv_str
,
int
len_tv_str
);
static
bool
_job_is_completing
(
void
);
static
bool
_more_work
(
void
);
static
bool
_more_work
(
void
);
static
int
_num_feature_count
(
struct
job_record
*
job_ptr
);
static
int
_num_feature_count
(
struct
job_record
*
job_ptr
);
static
int
_start_job
(
struct
job_record
*
job_ptr
,
bitstr_t
*
avail_bitmap
);
static
int
_start_job
(
struct
job_record
*
job_ptr
,
bitstr_t
*
avail_bitmap
);
...
@@ -166,6 +167,37 @@ static void _diff_tv_str(struct timeval *tv1,struct timeval *tv2,
...
@@ -166,6 +167,37 @@ static void _diff_tv_str(struct timeval *tv1,struct timeval *tv2,
snprintf
(
tv_str
,
len_tv_str
,
"usec=%ld"
,
delta_t
);
snprintf
(
tv_str
,
len_tv_str
,
"usec=%ld"
,
delta_t
);
}
}
/*
* _job_is_completing - Determine if jobs are in the process of completing.
* This is a variant of job_is_completing in slurmctld/job_scheduler.c.
* It always gives completing jobs at least 5 secs to complete.
* RET - True of any job is in the process of completing
*/
static
bool
_job_is_completing
(
void
)
{
bool
completing
=
false
;
ListIterator
job_iterator
;
struct
job_record
*
job_ptr
=
NULL
;
uint16_t
complete_wait
=
slurm_get_complete_wait
();
time_t
recent
;
if
(
job_list
==
NULL
)
return
completing
;
recent
=
time
(
NULL
)
-
MIN
(
complete_wait
,
5
);
job_iterator
=
list_iterator_create
(
job_list
);
while
((
job_ptr
=
(
struct
job_record
*
)
list_next
(
job_iterator
)))
{
if
(
IS_JOB_COMPLETING
(
job_ptr
)
&&
(
job_ptr
->
end_time
>=
recent
))
{
completing
=
true
;
break
;
}
}
list_iterator_destroy
(
job_iterator
);
return
completing
;
}
/* test if job has feature count specification */
/* test if job has feature count specification */
static
int
_num_feature_count
(
struct
job_record
*
job_ptr
)
static
int
_num_feature_count
(
struct
job_record
*
job_ptr
)
{
{
...
@@ -498,7 +530,7 @@ static void _attempt_backfill(void)
...
@@ -498,7 +530,7 @@ static void _attempt_backfill(void)
else
if
(
rc
!=
SLURM_SUCCESS
)
else
if
(
rc
!=
SLURM_SUCCESS
)
/* Planned to start job, but something bad
/* Planned to start job, but something bad
* happended. */
* happended. */
continue
;
break
;
}
}
if
(
job_ptr
->
start_time
>
(
now
+
BACKFILL_WINDOW
))
{
if
(
job_ptr
->
start_time
>
(
now
+
BACKFILL_WINDOW
))
{
/* Starts too far in the future to worry about */
/* Starts too far in the future to worry about */
...
@@ -573,7 +605,7 @@ static int _start_job(struct job_record *job_ptr, bitstr_t *resv_bitmap)
...
@@ -573,7 +605,7 @@ static int _start_job(struct job_record *job_ptr, bitstr_t *resv_bitmap)
/* This happens when a job has sharing disabled and
/* This happens when a job has sharing disabled and
* a selected node is still completing some job,
* a selected node is still completing some job,
* which should be a temporary situation. */
* which should be a temporary situation. */
verbose
(
"backfill: Failed to start JobId=%u
i
n %s: %s"
,
verbose
(
"backfill: Failed to start JobId=%u
o
n %s: %s"
,
job_ptr
->
job_id
,
node_list
,
slurm_strerror
(
rc
));
job_ptr
->
job_id
,
node_list
,
slurm_strerror
(
rc
));
xfree
(
node_list
);
xfree
(
node_list
);
fail_jobid
=
job_ptr
->
job_id
;
fail_jobid
=
job_ptr
->
job_id
;
...
...
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