diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 8d1afe4866caf8eb224830a86d6547abd171a0a8..91aeaf65325c56a8dbe29be603efc328c77475e8 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -950,6 +950,7 @@ int select_nodes(struct job_record *job_ptr, bool test_only) /* assign the nodes and stage_in the job */ job_ptr->nodes = bitmap2node_name(req_bitmap); job_ptr->node_bitmap = req_bitmap; + job_ptr->details->shared = shared; allocate_nodes(job_ptr); build_node_details(job_ptr); req_bitmap = NULL; diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 24b2da12711e6b268379fdc489b50d507f324855..e6712281fb81b7f81f188debd2155103bae9d9d5 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -117,8 +117,6 @@ static int _build_bitmaps(void) (avail_node_bitmap == NULL) || (share_node_bitmap == NULL)) 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 */ config_iterator = list_iterator_create(config_list); @@ -135,6 +133,9 @@ static int _build_bitmaps(void) } 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 */ job_iterator = list_iterator_create(job_list); while ((job_ptr = (struct job_record *) list_next(job_iterator))) { diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 7a6d2de1eeedf70651ecf8521806b022fc6d2ad5..f94d6fe280c39a31fb4f83ad2ed649bff42a503a 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -3,7 +3,7 @@ ***************************************************************************** * Copyright (C) 2002 The Regents of the University of California. * 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. * * 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 */ extern bitstr_t *avail_node_bitmap; /* bitmap of available nodes, * not DOWN, DRAINED or DRAINING */ 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 node_record default_node_record;