Skip to content
Snippets Groups Projects
Commit b6d75617 authored by Moe Jette's avatar Moe Jette
Browse files

Correct handling of shared node flags by partition and job. A partition

with "Shared=yes" configuration failed to function as desired. (gnats:459).
parent 518a35d7
No related branches found
No related tags found
No related merge requests found
...@@ -950,6 +950,7 @@ int select_nodes(struct job_record *job_ptr, bool test_only) ...@@ -950,6 +950,7 @@ int select_nodes(struct job_record *job_ptr, bool test_only)
/* assign the nodes and stage_in the job */ /* assign the nodes and stage_in the job */
job_ptr->nodes = bitmap2node_name(req_bitmap); job_ptr->nodes = bitmap2node_name(req_bitmap);
job_ptr->node_bitmap = req_bitmap; job_ptr->node_bitmap = req_bitmap;
job_ptr->details->shared = shared;
allocate_nodes(job_ptr); allocate_nodes(job_ptr);
build_node_details(job_ptr); build_node_details(job_ptr);
req_bitmap = NULL; req_bitmap = NULL;
......
...@@ -117,8 +117,6 @@ static int _build_bitmaps(void) ...@@ -117,8 +117,6 @@ static int _build_bitmaps(void)
(avail_node_bitmap == NULL) || (avail_node_bitmap == NULL) ||
(share_node_bitmap == NULL)) (share_node_bitmap == NULL))
fatal ("bit_alloc malloc failure"); fatal ("bit_alloc malloc failure");
/* Set all bits, all nodes initially available for sharing */
bit_nset(share_node_bitmap, 0, (node_record_count-1));
/* initialize the configuration bitmaps */ /* initialize the configuration bitmaps */
config_iterator = list_iterator_create(config_list); config_iterator = list_iterator_create(config_list);
...@@ -135,6 +133,9 @@ static int _build_bitmaps(void) ...@@ -135,6 +133,9 @@ static int _build_bitmaps(void)
} }
list_iterator_destroy(config_iterator); list_iterator_destroy(config_iterator);
/* Set all bits, all nodes initially available for sharing */
bit_nset(share_node_bitmap, 0, (node_record_count-1));
/* identify all nodes non-sharable due to non-sharing jobs */ /* identify all nodes non-sharable due to non-sharing jobs */
job_iterator = list_iterator_create(job_list); job_iterator = list_iterator_create(job_list);
while ((job_ptr = (struct job_record *) list_next(job_iterator))) { while ((job_ptr = (struct job_record *) list_next(job_iterator))) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 The Regents of the University of California. * Copyright (C) 2002 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Moe Jette <jette@llnl.gov> et. al. * Written by Morris Jette <jette@llnl.gov> et. al.
* UCRL-CODE-2002-040. * UCRL-CODE-2002-040.
* *
* This file is part of SLURM, a resource management program. * This file is part of SLURM, a resource management program.
...@@ -180,7 +180,7 @@ extern int node_record_count; /* count in node_record_table_ptr */ ...@@ -180,7 +180,7 @@ extern int node_record_count; /* count in node_record_table_ptr */
extern bitstr_t *avail_node_bitmap; /* bitmap of available nodes, extern bitstr_t *avail_node_bitmap; /* bitmap of available nodes,
* not DOWN, DRAINED or DRAINING */ * not DOWN, DRAINED or DRAINING */
extern bitstr_t *idle_node_bitmap; /* bitmap of idle nodes */ extern bitstr_t *idle_node_bitmap; /* bitmap of idle nodes */
extern bitstr_t *share_node_bitmap; /* bitmap of non-sharable nodes */ extern bitstr_t *share_node_bitmap; /* bitmap of sharable nodes */
extern struct config_record default_config_record; extern struct config_record default_config_record;
extern struct node_record default_node_record; extern struct node_record default_node_record;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment