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
4e9d3e8a
Commit
4e9d3e8a
authored
14 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
cosmetic mods for better clarity
parent
8554b8d2
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/select/cons_res/job_test.c
+5
-4
5 additions, 4 deletions
src/plugins/select/cons_res/job_test.c
with
5 additions
and
4 deletions
src/plugins/select/cons_res/job_test.c
+
5
−
4
View file @
4e9d3e8a
...
@@ -393,9 +393,10 @@ fini:
...
@@ -393,9 +393,10 @@ fini:
* IN job_ptr - pointer to job requirements
* IN job_ptr - pointer to job requirements
* IN/OUT core_map - bitmap of cores available for use/selected for use
* IN/OUT core_map - bitmap of cores available for use/selected for use
* IN node_i - index of node to be evaluated
* IN node_i - index of node to be evaluated
* IN cpu_type - if true, allocate CPUs rather than cores
*/
*/
uint16_t
_allocate_cores
(
struct
job_record
*
job_ptr
,
bitstr_t
*
core_map
,
uint16_t
_allocate_cores
(
struct
job_record
*
job_ptr
,
bitstr_t
*
core_map
,
const
uint32_t
node_i
,
int
cpu_type
)
const
uint32_t
node_i
,
bool
cpu_type
)
{
{
uint16_t
cpu_count
=
0
,
avail_cpus
=
0
,
num_tasks
=
0
;
uint16_t
cpu_count
=
0
,
avail_cpus
=
0
,
num_tasks
=
0
;
uint32_t
core_begin
=
cr_get_coremap_offset
(
node_i
);
uint32_t
core_begin
=
cr_get_coremap_offset
(
node_i
);
...
@@ -652,11 +653,11 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map,
...
@@ -652,11 +653,11 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map,
}
}
if
(
cr_type
&
CR_CORE
)
if
(
cr_type
&
CR_CORE
)
cpus
=
_allocate_cores
(
job_ptr
,
core_map
,
node_i
,
0
);
cpus
=
_allocate_cores
(
job_ptr
,
core_map
,
node_i
,
false
);
else
if
(
cr_type
&
CR_SOCKET
)
else
if
(
cr_type
&
CR_SOCKET
)
cpus
=
_allocate_sockets
(
job_ptr
,
core_map
,
node_i
);
cpus
=
_allocate_sockets
(
job_ptr
,
core_map
,
node_i
);
else
else
cpus
=
_allocate_cores
(
job_ptr
,
core_map
,
node_i
,
1
);
cpus
=
_allocate_cores
(
job_ptr
,
core_map
,
node_i
,
true
);
core_start_bit
=
cr_get_coremap_offset
(
node_i
);
core_start_bit
=
cr_get_coremap_offset
(
node_i
);
core_end_bit
=
cr_get_coremap_offset
(
node_i
+
1
)
-
1
;
core_end_bit
=
cr_get_coremap_offset
(
node_i
+
1
)
-
1
;
...
@@ -930,7 +931,7 @@ static int _get_cpu_cnt(struct job_record *job_ptr, const int node_index,
...
@@ -930,7 +931,7 @@ static int _get_cpu_cnt(struct job_record *job_ptr, const int node_index,
*
*
* IN: job_ptr - pointer to the job requesting resources
* IN: job_ptr - pointer to the job requesting resources
* IN: node_map - bitmap of available nodes
* IN: node_map - bitmap of available nodes
* IN: core_map - bitmap of available cores
* IN
/OUT
: core_map - bitmap of available cores
* IN: cr_node_cnt - total number of nodes in the cluster
* IN: cr_node_cnt - total number of nodes in the cluster
* IN: cr_type - resource type
* IN: cr_type - resource type
* OUT: cpu_cnt - number of cpus that can be used by this job
* OUT: cpu_cnt - number of cpus that can be used by this job
...
...
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