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
f180b962
Commit
f180b962
authored
15 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
correct bad pointer used in select/cons_res scheduling with Moab and topology plugin.
parent
ec648ca5
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/select/cons_res/job_test.c
+17
-8
17 additions, 8 deletions
src/plugins/select/cons_res/job_test.c
with
17 additions
and
8 deletions
src/plugins/select/cons_res/job_test.c
+
17
−
8
View file @
f180b962
...
...
@@ -767,12 +767,19 @@ bitstr_t *_make_core_bitmap(bitstr_t *node_map)
}
/* return the number of cpus that the given
* job can run on the indexed node */
/*
* Determine the number of CPUs that a given job can use on a specific node
* IN: job_ptr - pointer to job we are attempting to start
* IN: node_index - zero origin node being considered for use
* IN: cpu_cnt - array with count of CPU's availble to job on each node
* IN: freq - array with repetition counts for each cpu_cnt entry
* IN: size - length of cpu_cnt and freq arrays
* RET: number of usable CPUs on the identified node
*/
static
int
_get_cpu_cnt
(
struct
job_record
*
job_ptr
,
const
int
node_index
,
uint16_t
*
cpu_cnt
,
uint32_t
*
freq
,
uint32_t
size
)
uint16_t
*
cpu_cnt
,
uint32_t
*
freq
,
uint32_t
size
)
{
int
i
,
pos
,
cpus
;
int
i
,
offset
,
pos
,
cpus
;
uint16_t
*
layout_ptr
=
job_ptr
->
details
->
req_node_layout
;
pos
=
0
;
...
...
@@ -782,16 +789,18 @@ static int _get_cpu_cnt(struct job_record *job_ptr, const int node_index,
pos
+=
freq
[
i
];
}
cpus
=
cpu_cnt
[
i
];
if
(
layout_ptr
&&
bit_test
(
job_ptr
->
details
->
req_node_bitmap
,
i
))
{
pos
=
bit_get_pos_num
(
job_ptr
->
details
->
req_node_bitmap
,
i
);
cpus
=
MIN
(
cpus
,
layout_ptr
[
pos
]);
if
(
layout_ptr
&&
bit_test
(
job_ptr
->
details
->
req_node_bitmap
,
node_index
))
{
offset
=
bit_get_pos_num
(
job_ptr
->
details
->
req_node_bitmap
,
node_index
);
cpus
=
MIN
(
cpus
,
layout_ptr
[
offset
]);
}
else
if
(
layout_ptr
)
{
cpus
=
0
;
/* should not happen? */
}
return
cpus
;
}
#define CR_FREQ_ARRAY_INCREMENT 16
/* Compute resource usage for the given job on all available resources
...
...
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