Skip to content

Commit

Permalink
Bluegene: Fix issue with bad reference when creating reservations.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyauble committed Apr 27, 2016
1 parent f55bfbe commit f09ac79
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/slurmctld/reservation.c
Expand Up @@ -1375,6 +1375,7 @@ static int _get_core_resrcs(slurmctld_resv_t *resv_ptr)
int c, core_offset_local, core_offset_global, core_end;

if (!resv_ptr->core_resrcs || resv_ptr->core_bitmap ||
!resv_ptr->core_resrcs->core_bitmap ||
(bit_ffs(resv_ptr->core_resrcs->core_bitmap) == -1))
return SLURM_SUCCESS;

Expand Down Expand Up @@ -1450,6 +1451,7 @@ static void _set_core_resrcs(slurmctld_resv_t *resv_ptr)
}
resv_ptr->core_resrcs->cpus = xmalloc(sizeof(uint16_t) *
resv_ptr->core_resrcs->nhosts);

core_offset_local = -1;
node_inx = -1;
i_last = bit_fls(resv_ptr->node_bitmap);
Expand All @@ -1464,8 +1466,9 @@ static void _set_core_resrcs(slurmctld_resv_t *resv_ptr)
core_offset_local++;
if (!bit_test(resv_ptr->core_bitmap, c))
continue;
bit_set(resv_ptr->core_resrcs->core_bitmap,
core_offset_local);
if (resv_ptr->core_resrcs->core_bitmap)
bit_set(resv_ptr->core_resrcs->core_bitmap,
core_offset_local);
resv_ptr->core_resrcs->cpus[node_inx]++;
}
}
Expand Down

0 comments on commit f09ac79

Please sign in to comment.