diff --git a/NEWS b/NEWS index d76d6992a0a6d3f99120e84840272d9f44ad7b72..6535355041ca1fd148ffe68bf6487796e3083d96 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ documents those changes that are of interest to users and admins. are not longer set DOWN, they are set to DRAIN instead. -- Modified 'sacctmgr show associations' command to show GrpCPURunMins by default. + -- Replace the hostlist_push() function with a more efficient hostlist_push_host(). * Changes in Slurm 14.03.0pre5 ============================== diff --git a/src/api/allocate.c b/src/api/allocate.c index 2e6a6d52dc1a1d88ce3743724fa3b1257af2562c..9ab81c535bf0cbccb3d3fda14f9b539b9c7b16b7 100644 --- a/src/api/allocate.c +++ b/src/api/allocate.c @@ -628,9 +628,9 @@ char *slurm_read_hostfile(char *filename, int n) (i = atoi(asterisk + 1))) { asterisk[0] = '\0'; for (j = 0; j < i; j++) - hostlist_push(hostlist, host_name); + hostlist_push_host(hostlist, host_name); } else { - hostlist_push(hostlist, host_name); + hostlist_push_host(hostlist, host_name); } host_name = strtok_r(NULL, ",", &save_ptr); } diff --git a/src/api/step_launch.c b/src/api/step_launch.c index 972df013ad8132715cc6e7b7cce26fb9b5bc6f4f..53137aaae99b0540d4838f827e73cd8c49028f0b 100644 --- a/src/api/step_launch.c +++ b/src/api/step_launch.c @@ -748,13 +748,13 @@ void slurm_step_launch_fwd_signal(slurm_step_ctx_t *ctx, int signo) continue; if (ctx->step_resp->step_layout->front_end) { - hostlist_push(hl, + hostlist_push_host(hl, ctx->step_resp->step_layout->front_end); break; } else { name = nodelist_nth_host(sls->layout->node_list, node_id); - hostlist_push(hl, name); + hostlist_push_host(hl, name); free(name); } } @@ -1661,7 +1661,7 @@ static void _print_launch_msg(launch_tasks_request_msg_t *msg, for (i=0; i<msg->tasks_to_launch[nodeid]; i++) { sprintf(tmp_str, "%u", msg->global_task_ids[nodeid][i]); - hostlist_push(hl, tmp_str); + hostlist_push_host(hl, tmp_str); } task_list = hostlist_ranged_string_xmalloc(hl); hostlist_destroy(hl); diff --git a/src/common/forward.c b/src/common/forward.c index 0b225b110f42e99cc1ca669ee194a47b614647a0..1b207d3d9c0692d3b1d6671a65cdf6af6fa0ec14 100644 --- a/src/common/forward.c +++ b/src/common/forward.c @@ -527,7 +527,7 @@ extern int forward_msg(forward_struct_t *forward_struct, name = hostlist_shift(hl); if (!name) break; - hostlist_push(forward_hl, name); + hostlist_push_host(forward_hl, name); free(name); } @@ -617,7 +617,7 @@ extern List start_msg_tree(hostlist_t hl, slurm_msg_t *msg, int timeout) name = hostlist_shift(hl); if (!name) break; - hostlist_push(fwd_tree->tree_hl, name); + hostlist_push_host(fwd_tree->tree_hl, name); free(name); } diff --git a/src/common/node_conf.c b/src/common/node_conf.c index c4df0f8402cb30c0f2488e4f52a0f6528c9d18d4..20d1683a666c5e0028c435a89861c5e77447c7a9 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -506,7 +506,7 @@ char * bitmap2node_name_sortable (bitstr_t *bitmap, bool sort) for (i = first; i <= last; i++) { if (bit_test(bitmap, i) == 0) continue; - hostlist_push(hl, node_record_table_ptr[i].name); + hostlist_push_host(hl, node_record_table_ptr[i].name); } if (sort) hostlist_sort(hl); diff --git a/src/plugins/mpi/mvapich/mvapich.c b/src/plugins/mpi/mvapich/mvapich.c index d580aece6b8b7b74b05349cb6269cddca8c95d8d..44a1a9ba183423971f04715ff20268298df7b03c 100644 --- a/src/plugins/mpi/mvapich/mvapich.c +++ b/src/plugins/mpi/mvapich/mvapich.c @@ -329,8 +329,8 @@ static void report_absent_tasks (mvapich_state_t *st, int check_do_poll) if ((m == NULL) || (m->fd < 0) || (check_do_poll && m->do_poll)) { const char *host = slurm_step_layout_host_name (sl, i); sprintf (buf, "%d", i); - hostlist_push (tasks, buf); - hostlist_push (hosts, host); + hostlist_push_host (tasks, buf); + hostlist_push_host (hosts, host); } } diff --git a/src/plugins/sched/wiki2/get_nodes.c b/src/plugins/sched/wiki2/get_nodes.c index c62d263b9ed7bfc7a1c5f0347fbf4044bfc2aae6..159d45da2fba4bcf63d4fec90990596c6dd852b4 100644 --- a/src/plugins/sched/wiki2/get_nodes.c +++ b/src/plugins/sched/wiki2/get_nodes.c @@ -195,7 +195,7 @@ static char * _dump_all_nodes(int *node_cnt, time_t update_time) if (rc == 0) { uniq_node_ptr = node_ptr; if (hl) { - hostlist_push(hl, node_ptr->name); + hostlist_push_host(hl, node_ptr->name); } else { hl = hostlist_create(node_ptr->name); if (!hl) { diff --git a/src/plugins/select/alps/basil_interface.c b/src/plugins/select/alps/basil_interface.c index 682ac8f2efa4563c7a3bf1558cc4a8b16f096314..a3d227f0c51d5396074c00e65a9433ff037b7473 100644 --- a/src/plugins/select/alps/basil_interface.c +++ b/src/plugins/select/alps/basil_interface.c @@ -193,7 +193,7 @@ extern int basil_node_ranking(struct node_record *node_array, int node_cnt) } sprintf(tmp, "nid%05u", node->node_id); - hostlist_push(hl, tmp); + hostlist_push_host(hl, tmp); } free_inv(inv); if (bad_node) { diff --git a/src/plugins/select/bluegene/ba/block_allocator.c b/src/plugins/select/bluegene/ba/block_allocator.c index 1494323dc2bf052ec2e1dbaa10a9249b549ae897..17e9f4b26ed5aa80a0cf56e2055b30487dcc81eb 100644 --- a/src/plugins/select/bluegene/ba/block_allocator.c +++ b/src/plugins/select/bluegene/ba/block_allocator.c @@ -2515,7 +2515,7 @@ static char *_set_internal_wires(List nodes, int size, int conn_type) while ((ba_node[count] = list_next(itr))) { if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP) info("name = %s", ba_node[count]->coord_str); - hostlist_push(hostlist, ba_node[count]->coord_str); + hostlist_push_host(hostlist, ba_node[count]->coord_str); count++; } list_iterator_destroy(itr); diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index 45f83199ca9da419279adae7592a6a404cb92340..87c1f48768ddeb0816b05dcf21bcaa8becb2060b 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -1777,7 +1777,7 @@ static char *_copy_from_main(List main_mps, List ret_list) "mp %s is used", new_mp->coord_str); new_mp->used = BA_MP_USED_TRUE; if (hostlist) - hostlist_push(hostlist, new_mp->coord_str); + hostlist_push_host(hostlist, new_mp->coord_str); else hostlist = hostlist_create(new_mp->coord_str); } @@ -1843,7 +1843,7 @@ static char *_reset_altered_mps(List main_mps, bool get_name) ba_mp->used); if (get_name) { if (hostlist) - hostlist_push(hostlist, + hostlist_push_host(hostlist, ba_mp->coord_str); else hostlist = hostlist_create( diff --git a/src/plugins/select/bluegene/bl/bridge_linker.c b/src/plugins/select/bluegene/bl/bridge_linker.c index 9818a8c65a479cdfea11287258b210630774d0ac..e274838ba156ee134ae47352a16acf03c82f87ba 100644 --- a/src/plugins/select/bluegene/bl/bridge_linker.c +++ b/src/plugins/select/bluegene/bl/bridge_linker.c @@ -1234,7 +1234,7 @@ static bg_record_t *_translate_object_to_block(rm_partition_t *block_ptr, ba_mp->coord_str); - hostlist_push(hostlist, node_name_tmp); + hostlist_push_host(hostlist, node_name_tmp); } bg_record->mp_str = hostlist_ranged_string_xmalloc(hostlist); hostlist_destroy(hostlist); diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index e9fb33f702e57f33594aa10c863531756c212205..dd2d4f75dcd35bc91dd0c187a9ff9a0b3cca2b7e 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -1894,7 +1894,7 @@ static void _parse_pbs_nodes_opts(char *node_opts) _get_next_pbs_node_part(node_opts, &i); } else if (isalpha(node_opts[i])) { temp = _get_pbs_node_name(node_opts, &i); - hostlist_push(hl, temp); + hostlist_push_host(hl, temp); xfree(temp); } else i++; diff --git a/src/sbcast/agent.c b/src/sbcast/agent.c index fc939c14bef6cddca04cdba40dbfec7f2a7440bd..13d5fbd0d9a18d4416d4a62d4b13017b4885e090 100644 --- a/src/sbcast/agent.c +++ b/src/sbcast/agent.c @@ -159,11 +159,11 @@ extern void send_rpc(file_bcast_msg_t *bcast_msg, name = hostlist_shift(hl); if (!name) break; - hostlist_push(new_hl, name); + hostlist_push_host(new_hl, name); free(name); i++; } - thread_info[threads_used].nodelist = + thread_info[threads_used].nodelist = hostlist_ranged_string_xmalloc(new_hl); hostlist_destroy(new_hl); slurm_msg_t_init(&thread_info[threads_used].msg); diff --git a/src/sinfo/sinfo.c b/src/sinfo/sinfo.c index 3ad059d69e34c77153bc5efe3d7c7f21d47636ae..46af7c3e593749a175526effff71713795e4170b 100644 --- a/src/sinfo/sinfo.c +++ b/src/sinfo/sinfo.c @@ -895,11 +895,11 @@ static void _update_sinfo(sinfo_data_t *sinfo_ptr, node_info_t *node_ptr, sinfo_ptr->max_cpu_load = node_ptr->cpu_load; } - hostlist_push(sinfo_ptr->nodes, node_ptr->name); + hostlist_push_host(sinfo_ptr->nodes, node_ptr->name); if (params.match_flags.node_addr_flag) - hostlist_push(sinfo_ptr->node_addr, node_ptr->node_addr); + hostlist_push_host(sinfo_ptr->node_addr, node_ptr->node_addr); if (params.match_flags.hostnames_flag) - hostlist_push(sinfo_ptr->hostnames, node_ptr->node_hostname); + hostlist_push_host(sinfo_ptr->hostnames, node_ptr->node_hostname); total_cpus = node_ptr->cpus; total_nodes = node_scaling; diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index 1b30e0ca207884877a1dc077e183b7ae5d5c10dc..8d58059e29db5a4bf66c04a89161f22a38816726 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -445,12 +445,12 @@ static agent_info_t *_make_agent_info(agent_arg_t *agent_arg_ptr) name = hostlist_shift(agent_arg_ptr->hostlist); if (!name) break; - hostlist_push(hl, name); + hostlist_push_host(hl, name); free(name); i++; } hostlist_uniq(hl); - thread_ptr[thr_count].nodelist = + thread_ptr[thr_count].nodelist = hostlist_ranged_string_xmalloc(hl); hostlist_destroy(hl); #if 0 @@ -1061,7 +1061,7 @@ static int _setup_requeue(agent_arg_t *agent_arg_ptr, thd_t *thread_ptr, ret_data_info->node_name, count); if (agent_arg_ptr) { - hostlist_push(agent_arg_ptr->hostlist, + hostlist_push_host(agent_arg_ptr->hostlist, ret_data_info->node_name); if ((++(*spot)) == count) { @@ -1106,7 +1106,7 @@ static void _queue_agent_retry(agent_info_t * agent_info_ptr, int count) debug("got the name %s to resend", thread_ptr[i].nodelist); - hostlist_push(agent_arg_ptr->hostlist, + hostlist_push_host(agent_arg_ptr->hostlist, thread_ptr[i].nodelist); if ((++j) == count) diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 5fcb97258a91987832b0cbac1fa6e0e9b3a58ae7..d693262525196d350081044a45d67d35603d81d7 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -1308,7 +1308,7 @@ static void _queue_reboot_msg(void) reboot_agent_args->retry = 0; reboot_agent_args->hostlist = hostlist_create(""); } - hostlist_push(reboot_agent_args->hostlist, node_ptr->name); + hostlist_push_host(reboot_agent_args->hostlist, node_ptr->name); reboot_agent_args->node_count++; node_ptr->node_state = NODE_STATE_FUTURE | (node_ptr->node_state & NODE_STATE_FLAGS); diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index e1e3cda935918225f3f763df6dd4603ad4edaa67..38a628edb24c9c99607fa5d3ae46c3b1bf266dff 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -6192,7 +6192,7 @@ extern int pack_one_job(char **buffer_ptr, int *buffer_size, } else { /* Job ID not found. It could reference a job array. */ job_iterator = list_iterator_create(job_list); - while ((job_ptr = (struct job_record *) + while ((job_ptr = (struct job_record *) list_next(job_iterator))) { if ((job_ptr->job_id != job_id) && ((job_ptr->array_task_id == NO_VAL) || @@ -9048,7 +9048,7 @@ static void _send_job_kill(struct job_record *job_ptr) #ifdef HAVE_FRONT_END if (job_ptr->batch_host && (front_end_ptr = job_ptr->front_end_ptr)) { - hostlist_push(agent_args->hostlist, job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count++; } #else @@ -9058,7 +9058,7 @@ static void _send_job_kill(struct job_record *job_ptr) i < node_record_count; i++, node_ptr++) { if (!bit_test(job_ptr->node_bitmap_cg, i)) continue; - hostlist_push(agent_args->hostlist, node_ptr->name); + hostlist_push_host(agent_args->hostlist, node_ptr->name); agent_args->node_count++; } #endif @@ -9626,13 +9626,13 @@ _xmit_new_end_time(struct job_record *job_ptr) #ifdef HAVE_FRONT_END xassert(job_ptr->batch_host); - hostlist_push(agent_args->hostlist, job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count = 1; #else for (i = 0; i < node_record_count; i++) { if (bit_test(job_ptr->node_bitmap, i) == 0) continue; - hostlist_push(agent_args->hostlist, + hostlist_push_host(agent_args->hostlist, node_record_table_ptr[i].name); agent_args->node_count++; } @@ -10071,13 +10071,13 @@ static void _signal_job(struct job_record *job_ptr, int signal) #ifdef HAVE_FRONT_END xassert(job_ptr->batch_host); - hostlist_push(agent_args->hostlist, job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count = 1; #else for (i = 0; i < node_record_count; i++) { if (bit_test(job_ptr->node_bitmap, i) == 0) continue; - hostlist_push(agent_args->hostlist, + hostlist_push_host(agent_args->hostlist, node_record_table_ptr[i].name); agent_args->node_count++; } @@ -10142,14 +10142,14 @@ static void _suspend_job(struct job_record *job_ptr, uint16_t op, #ifdef HAVE_FRONT_END xassert(job_ptr->batch_host); - hostlist_push(agent_args->hostlist, job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count = 1; #else for (i = 0; i < node_record_count; i++) { if (bit_test(job_ptr->node_bitmap, i) == 0) continue; - hostlist_push(agent_args->hostlist, - node_record_table_ptr[i].name); + hostlist_push_host(agent_args->hostlist, + node_record_table_ptr[i].name); agent_args->node_count++; } #endif diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 86e1bb0b4ec856426f72251b184e006f72403f1c..ce068a571c40a491f1480ba3be93e628bdcf5cd7 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -2739,7 +2739,7 @@ void msg_to_slurmd (slurm_msg_type_t msg_type) #ifdef HAVE_FRONT_END for (i = 0, front_end_ptr = front_end_nodes; i < front_end_node_cnt; i++, front_end_ptr++) { - hostlist_push(kill_agent_args->hostlist, front_end_ptr->name); + hostlist_push_host(kill_agent_args->hostlist, front_end_ptr->name); kill_agent_args->node_count++; } #else @@ -2749,7 +2749,7 @@ void msg_to_slurmd (slurm_msg_type_t msg_type) continue; if (IS_NODE_CLOUD(node_ptr) && IS_NODE_POWER_SAVE(node_ptr)) continue; - hostlist_push(kill_agent_args->hostlist, node_ptr->name); + hostlist_push_host(kill_agent_args->hostlist, node_ptr->name); kill_agent_args->node_count++; } #endif diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 62b5ed593bd381d20bfccc812bc3c21b8fab6505..daebd2fc2ed945eda2fe08fb002d54e68d36a0fb 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -554,7 +554,7 @@ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, } } - hostlist_push(agent_args->hostlist, job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count++; } #else @@ -583,7 +583,7 @@ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, } make_node_comp(node_ptr, job_ptr, suspended); - hostlist_push(agent_args->hostlist, node_ptr->name); + hostlist_push_host(agent_args->hostlist, node_ptr->name); agent_args->node_count++; } #endif @@ -2645,9 +2645,9 @@ extern void re_kill_job(struct job_record *job_ptr) } } } else if (!IS_NODE_NO_RESPOND(front_end_ptr)) { - (void) hostlist_push_host(kill_hostlist, + (void) hostlist_push_host_host(kill_hostlist, job_ptr->batch_host); - hostlist_push(agent_args->hostlist, + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count++; } @@ -2674,7 +2674,7 @@ extern void re_kill_job(struct job_record *job_ptr) } } else if (!IS_NODE_NO_RESPOND(node_ptr)) { (void)hostlist_push_host(kill_hostlist, node_ptr->name); - hostlist_push(agent_args->hostlist, node_ptr->name); + hostlist_push_host(agent_args->hostlist, node_ptr->name); agent_args->node_count++; } } diff --git a/src/slurmctld/ping_nodes.c b/src/slurmctld/ping_nodes.c index 085d3e94ec8aa89993363aa20b62c61a3e760489..063792b2a72e20e783c170a62fe078cea3249c44 100644 --- a/src/slurmctld/ping_nodes.c +++ b/src/slurmctld/ping_nodes.c @@ -218,7 +218,7 @@ void ping_nodes (void) * can generate a flood of incoming RPCs. */ if (IS_NODE_UNKNOWN(front_end_ptr) || restart_flag || ((i >= offset) && (i < (offset + max_reg_threads)))) { - hostlist_push(reg_agent_args->hostlist, + hostlist_push_host(reg_agent_args->hostlist, front_end_ptr->name); reg_agent_args->node_count++; continue; @@ -234,7 +234,7 @@ void ping_nodes (void) IS_NODE_DOWN(front_end_ptr)) continue; - hostlist_push(ping_agent_args->hostlist, front_end_ptr->name); + hostlist_push_host(ping_agent_args->hostlist, front_end_ptr->name); ping_agent_args->node_count++; } #else @@ -283,7 +283,7 @@ void ping_nodes (void) * can generate a flood of incoming RPCs. */ if (IS_NODE_UNKNOWN(node_ptr) || restart_flag || ((i >= offset) && (i < (offset + max_reg_threads)))) { - hostlist_push(reg_agent_args->hostlist, + hostlist_push_host(reg_agent_args->hostlist, node_ptr->name); reg_agent_args->node_count++; continue; @@ -298,7 +298,7 @@ void ping_nodes (void) if (IS_NODE_NO_RESPOND(node_ptr) && IS_NODE_DOWN(node_ptr)) continue; - hostlist_push(ping_agent_args->hostlist, node_ptr->name); + hostlist_push_host(ping_agent_args->hostlist, node_ptr->name); ping_agent_args->node_count++; } #endif @@ -362,7 +362,7 @@ extern void run_health_check(void) i < front_end_node_cnt; i++, front_end_ptr++) { if (IS_NODE_NO_RESPOND(front_end_ptr)) continue; - hostlist_push(check_agent_args->hostlist, front_end_ptr->name); + hostlist_push_host(check_agent_args->hostlist, front_end_ptr->name); check_agent_args->node_count++; } #else @@ -403,7 +403,7 @@ extern void run_health_check(void) } } - hostlist_push(check_agent_args->hostlist, node_ptr->name); + hostlist_push_host(check_agent_args->hostlist, node_ptr->name); check_agent_args->node_count++; } #endif @@ -444,7 +444,7 @@ extern void update_nodes_acct_gather_data(void) i < front_end_node_cnt; i++, front_end_ptr++) { if (IS_NODE_NO_RESPOND(front_end_ptr)) continue; - hostlist_push(agent_args->hostlist, front_end_ptr->name); + hostlist_push_host(agent_args->hostlist, front_end_ptr->name); agent_args->node_count++; } #else @@ -453,7 +453,7 @@ extern void update_nodes_acct_gather_data(void) if (IS_NODE_NO_RESPOND(node_ptr) || IS_NODE_FUTURE(node_ptr) || IS_NODE_POWER_SAVE(node_ptr)) continue; - hostlist_push(agent_args->hostlist, node_ptr->name); + hostlist_push_host(agent_args->hostlist, node_ptr->name); agent_args->node_count++; } #endif diff --git a/src/slurmctld/port_mgr.c b/src/slurmctld/port_mgr.c index ba7aa926783785c256d0e1b683e30fbdab2b99f8..688a4e6876e0c8f7e019072ce9ffdb7636f1dcbf 100644 --- a/src/slurmctld/port_mgr.c +++ b/src/slurmctld/port_mgr.c @@ -263,7 +263,7 @@ extern int resv_port_alloc(struct step_record *step_ptr) step_ptr->step_node_bitmap); port_array[i] += port_resv_min; snprintf(port_str, sizeof(port_str), "[%d]", port_array[i]); - hostlist_push(hl, port_str); + hostlist_push_host(hl, port_str); } hostlist_sort(hl); step_ptr->resv_ports = hostlist_ranged_string_xmalloc(hl); diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 5f4ba852b370f5ccd253a75d0bd7052e29f1f09c..84681cf260d502df855b71ba1e884346da2d636e 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -133,7 +133,7 @@ static int _opt_cpu_cnt(uint32_t step_min_cpus, bitstr_t *node_bitmap, return rem_cpus; } -/* Select the optimal node count for a job step based upon it's min and +/* Select the optimal node count for a job step based upon it's min and * max target, available resources, and nodes already picked */ static int _opt_node_cnt(uint32_t step_min_nodes, uint32_t step_max_nodes, int nodes_avail, int nodes_picked_cnt) @@ -534,13 +534,13 @@ void signal_step_tasks(struct step_record *step_ptr, uint16_t signal, #ifdef HAVE_FRONT_END xassert(step_ptr->job_ptr->batch_host); - hostlist_push(agent_args->hostlist, step_ptr->job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, step_ptr->job_ptr->batch_host); agent_args->node_count = 1; #else for (i = 0; i < node_record_count; i++) { if (bit_test(step_ptr->step_node_bitmap, i) == 0) continue; - hostlist_push(agent_args->hostlist, + hostlist_push_host(agent_args->hostlist, node_record_table_ptr[i].name); agent_args->node_count++; } @@ -1442,7 +1442,7 @@ _pick_step_nodes (struct job_record *job_ptr, } goto cleanup; } - } + } if (step_spec->cpu_count) { /* make sure the selected nodes have enough cpus */ cpus_picked_cnt = _count_cpus(job_ptr, nodes_picked, @@ -3063,7 +3063,7 @@ static hostlist_t _step_range_to_hostlist(struct step_record *step_ptr, node_inx++; if ((node_inx >= range_first) && (node_inx <= range_last)) { - hostlist_push(hl, + hostlist_push_host(hl, node_record_table_ptr[i].name); } } @@ -3672,13 +3672,13 @@ static void _signal_step_timelimit(struct job_record *job_ptr, #ifdef HAVE_FRONT_END xassert(job_ptr->batch_host); - hostlist_push(agent_args->hostlist, job_ptr->batch_host); + hostlist_push_host(agent_args->hostlist, job_ptr->batch_host); agent_args->node_count++; #else for (i = 0; i < node_record_count; i++) { if (bit_test(step_ptr->step_node_bitmap, i) == 0) continue; - hostlist_push(agent_args->hostlist, + hostlist_push_host(agent_args->hostlist, node_record_table_ptr[i].name); agent_args->node_count++; } diff --git a/src/srun/libsrun/srun_job.c b/src/srun/libsrun/srun_job.c index 20b1c036f3ed67f65b7b4e85a245fe00b2a9bfdc..83cebae5c70c8c628750e213b71c4525d055282e 100644 --- a/src/srun/libsrun/srun_job.c +++ b/src/srun/libsrun/srun_job.c @@ -276,7 +276,7 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) xfree(buf); while ((node_name = hostlist_shift(tmp_hl)) && (i < diff)) { - hostlist_push(inc_hl, node_name); + hostlist_push_host(inc_hl, node_name); i++; } hostlist_destroy(tmp_hl); diff --git a/src/sstat/sstat.c b/src/sstat/sstat.c index a5fb3057d8ed1d78312b3936a632f7df0ed11375..e2e38463d50aabd3cb92a1913030f7e0da1fbc5c 100644 --- a/src/sstat/sstat.c +++ b/src/sstat/sstat.c @@ -156,7 +156,7 @@ int _do_stat(uint32_t jobid, uint32_t stepid, char *nodelist, print_fields(&step); xfree(step.pid_str); } else { - hostlist_push(hl, step_stat->step_pids->node_name); + hostlist_push_host(hl, step_stat->step_pids->node_name); ntasks += step_stat->num_tasks; if (step_stat->jobacct) { jobacctinfo_2_stats(&temp_stats, diff --git a/src/sview/part_info.c b/src/sview/part_info.c index 2a71fa9ec2316a626c469e9ec0907cda084ebed5..c27d872c9f97ffe7c7caea98c9e2c779ef8d9715 100644 --- a/src/sview/part_info.c +++ b/src/sview/part_info.c @@ -1594,7 +1594,7 @@ static void _update_sview_part_sub(sview_part_sub_t *sview_part_sub, sview_part_sub->mem_total += node_ptr->real_memory; sview_part_sub->node_cnt += node_scaling; list_append(sview_part_sub->node_ptr_list, node_ptr); - hostlist_push(sview_part_sub->hl, node_ptr->name); + hostlist_push_host(sview_part_sub->hl, node_ptr->name); } /*