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
44fd2794
Commit
44fd2794
authored
22 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in handling node range with contiguous option.
parent
d0c82c22
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/slurmctld/node_scheduler.c
+21
-3
21 additions, 3 deletions
src/slurmctld/node_scheduler.c
with
21 additions
and
3 deletions
src/slurmctld/node_scheduler.c
+
21
−
3
View file @
44fd2794
...
@@ -59,6 +59,8 @@ static void _add_node_set_info(struct node_set *node_set_ptr,
...
@@ -59,6 +59,8 @@ static void _add_node_set_info(struct node_set *node_set_ptr,
static
int
_build_node_list
(
struct
job_record
*
job_ptr
,
static
int
_build_node_list
(
struct
job_record
*
job_ptr
,
struct
node_set
**
node_set_pptr
,
struct
node_set
**
node_set_pptr
,
int
*
node_set_size
);
int
*
node_set_size
);
static
bool
_enough_nodes
(
int
avail_nodes
,
int
rem_nodes
,
int
min_nodes
,
int
max_nodes
);
static
void
_filter_nodes_in_set
(
struct
node_set
*
node_set_ptr
,
static
void
_filter_nodes_in_set
(
struct
node_set
*
node_set_ptr
,
struct
job_details
*
detail_ptr
);
struct
job_details
*
detail_ptr
);
static
int
_match_feature
(
char
*
seek
,
char
*
available
);
static
int
_match_feature
(
char
*
seek
,
char
*
available
);
...
@@ -410,8 +412,10 @@ _pick_best_quadrics(bitstr_t * bitmap, bitstr_t * req_bitmap,
...
@@ -410,8 +412,10 @@ _pick_best_quadrics(bitstr_t * bitmap, bitstr_t * req_bitmap,
}
}
if
(
best_fit_nodes
==
0
)
if
(
best_fit_nodes
==
0
)
break
;
break
;
if
(
consecutive
&&
((
best_fit_nodes
<
rem_nodes
)
if
(
consecutive
&&
||
(
best_fit_cpus
<
rem_cpus
)))
((
best_fit_cpus
<
rem_cpus
)
||
(
!
_enough_nodes
(
best_fit_nodes
,
rem_nodes
,
min_nodes
,
max_nodes
))))
break
;
/* no hole large enough */
break
;
/* no hole large enough */
if
(
best_fit_req
!=
-
1
)
{
if
(
best_fit_req
!=
-
1
)
{
/* This collection of nodes includes required ones
/* This collection of nodes includes required ones
...
@@ -449,7 +453,8 @@ _pick_best_quadrics(bitstr_t * bitmap, bitstr_t * req_bitmap,
...
@@ -449,7 +453,8 @@ _pick_best_quadrics(bitstr_t * bitmap, bitstr_t * req_bitmap,
rem_cpus
-=
node_record_table_ptr
[
i
].
cpus
;
rem_cpus
-=
node_record_table_ptr
[
i
].
cpus
;
}
}
}
}
if
((
rem_nodes
<=
0
)
&&
(
rem_cpus
<=
0
))
{
if
(
consecutive
||
((
rem_nodes
<=
0
)
&&
(
rem_cpus
<=
0
)))
{
error_code
=
SLURM_SUCCESS
;
error_code
=
SLURM_SUCCESS
;
break
;
break
;
}
}
...
@@ -468,6 +473,19 @@ _pick_best_quadrics(bitstr_t * bitmap, bitstr_t * req_bitmap,
...
@@ -468,6 +473,19 @@ _pick_best_quadrics(bitstr_t * bitmap, bitstr_t * req_bitmap,
return
error_code
;
return
error_code
;
}
}
static
bool
_enough_nodes
(
int
avail_nodes
,
int
rem_nodes
,
int
min_nodes
,
int
max_nodes
)
{
int
needed_nodes
;
if
(
max_nodes
)
needed_nodes
=
rem_nodes
+
min_nodes
-
max_nodes
;
else
needed_nodes
=
rem_nodes
;
return
(
avail_nodes
>=
needed_nodes
);
}
/*
/*
* _pick_best_nodes - from a weigh order list of all nodes satisfying a
* _pick_best_nodes - from a weigh order list of all nodes satisfying a
...
...
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