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
0309c2d7
Commit
0309c2d7
authored
14 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
combine last_backfill_start_time and last_backfill_finish_time into last_backfill_time
parent
ae5e4d14
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/backfill/backfill.c
+14
-13
14 additions, 13 deletions
src/plugins/sched/backfill/backfill.c
with
14 additions
and
13 deletions
src/plugins/sched/backfill/backfill.c
+
14
−
13
View file @
0309c2d7
...
...
@@ -121,7 +121,7 @@ static void _diff_tv_str(struct timeval *tv1,struct timeval *tv2,
char
*
tv_str
,
int
len_tv_str
);
static
bool
_job_is_completing
(
void
);
static
void
_load_config
(
void
);
static
bool
_more_work
(
time_t
last_backfill_
finish_
time
);
static
bool
_more_work
(
time_t
last_backfill_time
);
static
void
_my_sleep
(
int
secs
);
static
int
_num_feature_count
(
struct
job_record
*
job_ptr
);
static
void
_reset_job_time_limit
(
struct
job_record
*
job_ptr
,
time_t
now
,
...
...
@@ -372,8 +372,7 @@ extern void *backfill_agent(void *args)
char
tv_str
[
20
];
time_t
now
;
double
delay
;
static
time_t
last_backfill_start_time
=
0
;
static
time_t
last_backfill_finish_time
=
0
;
static
time_t
last_backfill_time
=
0
;
/* Read config, and partitions; Write jobs and nodes */
slurmctld_lock_t
all_locks
=
{
READ_LOCK
,
WRITE_LOCK
,
WRITE_LOCK
,
READ_LOCK
};
...
...
@@ -388,17 +387,16 @@ extern void *backfill_agent(void *args)
_load_config
();
}
now
=
time
(
NULL
);
delay
=
difftime
(
now
,
last_backfill_
start_
time
);
delay
=
difftime
(
now
,
last_backfill_time
);
if
((
delay
<
backfill_interval
)
||
_job_is_completing
()
||
!
_more_work
(
last_backfill_
finish_
time
))
/* _more_work() test must be last */
!
_more_work
(
last_backfill_time
))
/* _more_work() test must be last */
continue
;
last_backfill_start_time
=
now
;
gettimeofday
(
&
tv1
,
NULL
);
lock_slurmctld
(
all_locks
);
_attempt_backfill
();
last_backfill_
finish_
time
=
time
(
NULL
);
last_backfill_time
=
time
(
NULL
);
unlock_slurmctld
(
all_locks
);
gettimeofday
(
&
tv2
,
NULL
);
_diff_tv_str
(
&
tv1
,
&
tv2
,
tv_str
,
20
);
...
...
@@ -425,8 +423,11 @@ static void _attempt_backfill(void)
node_space_map_t
*
node_space
;
static
int
sched_timeout
=
0
;
if
(
!
sched_timeout
)
sched_timeout
=
MIN
(
slurm_get_msg_timeout
(),
10
);
if
(
sched_timeout
==
0
)
{
sched_timeout
=
slurm_get_msg_timeout
()
/
2
;
sched_timeout
=
MAX
(
sched_timeout
,
1
);
sched_timeout
=
MIN
(
sched_timeout
,
10
);
}
if
(
slurm_get_root_filter
())
filter_root
=
true
;
...
...
@@ -743,14 +744,14 @@ extern void run_backfill (void)
}
/* Report if any changes occurred to job, node or partition information */
static
bool
_more_work
(
time_t
last_backfill_
finish_
time
)
static
bool
_more_work
(
time_t
last_backfill_time
)
{
bool
rc
=
false
;
pthread_mutex_lock
(
&
thread_flag_mutex
);
if
(
(
last_job_update
>
last_backfill_
finish_
time
)
||
(
last_node_update
>
last_backfill_
finish_
time
)
||
(
last_part_update
>
last_backfill_
finish_
time
)
||
if
(
(
last_job_update
>
last_backfill_time
)
||
(
last_node_update
>
last_backfill_time
)
||
(
last_part_update
>
last_backfill_time
)
||
new_work
)
{
new_work
=
false
;
rc
=
true
;
...
...
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