diff --git a/src/api/signal.c b/src/api/signal.c index af4df8187df44f4986901afce0ef583b7314afe6..ab544793d67772cb34e90f80e03470bfd80405f0 100644 --- a/src/api/signal.c +++ b/src/api/signal.c @@ -143,7 +143,7 @@ static int _terminate_batch_script_step(const resource_allocation_response_msg_t int i; char *name = nodelist_nth_host(allocation->node_list, 0); if (!name) { - error("_signal_batch_script_step: " + error("_terminate_batch_script_step: " "can't get the first name out of %s", allocation->node_list); return -1; @@ -158,7 +158,7 @@ static int _terminate_batch_script_step(const resource_allocation_response_msg_t msg.data = &rpc; if (slurm_conf_get_addr(name, &msg.address) == SLURM_ERROR) { - error("_signal_batch_script_step: " + error("_terminate_batch_script_step: " "can't find address for host %s, check slurm.conf", name); free(name); @@ -295,7 +295,7 @@ fail: /* * slurm_terminate_job - terminates all steps of an existing job by sending - * a REQUEST_TERMINATE_JOB rpc to all slurmd in the the job allocation, + * a REQUEST_TERMINATE_JOB rpc to all slurmd in the job allocation, * and then calls slurm_complete_job(). * IN job_id - the job's id * RET 0 on success, otherwise return -1 and set errno to indicate the error diff --git a/src/common/mpi.h b/src/common/mpi.h index b94a94782f110d428475488fe387d6953c326805..2bfd5899c14e6ebecb657bd9091367e54bf3ee8e 100644 --- a/src/common/mpi.h +++ b/src/common/mpi.h @@ -93,8 +93,8 @@ int mpi_hook_slurmstepd_init (char ***env); * task. The process will be running as the user of the job step at that * point. * - * If the plugin want to set environment variables for the task, - * it will add the necessary variables the the env array pointed + * If the plugin wants to set environment variables for the task, + * it will add the necessary variables the env array pointed * to be "env". If "env" is NULL, a new array will be allocated * automaticallly. * @@ -122,7 +122,7 @@ int mpi_hook_client_init (char *mpi_type); * * If the plugin requires that environment variables be set in the * environment of every task, it will add the necessary variables - * the the env array pointed to be "env". If "env" is NULL, a new + * the env array pointed to be "env". If "env" is NULL, a new * array will be allocated automaticallly. * * The returned "env" array may be manipulated (and freed) by using diff --git a/src/common/parse_config.h b/src/common/parse_config.h index fb5fc6a24f7b083700d69b0c4a98ee9eb9818644..bc4da2110a14c0bc3d57c12e171f38b6a5cdd00d 100644 --- a/src/common/parse_config.h +++ b/src/common/parse_config.h @@ -52,7 +52,7 @@ * looking for code specific to slurm.conf, look in * src/common/slurm_conf.[hc]. * - * In the parsed file, any amount of white-space is allowed between the the + * In the parsed file, any amount of white-space is allowed between the * key, equal-sign, and value. The parser handles comments, line * continuations, and escaped characters automatically. Double-quotes can * be used to surround an entire value if white-space is needed within @@ -132,7 +132,7 @@ * a "handler" function and a "destroy" function. The prototypes for each * are available below in the typedef of s_p_options_t. * - * The "handler" function is given the the "key" string, "value" string, and a + * The "handler" function is given the "key" string, "value" string, and a * pointer to the remainder of the "line" on which the key-value pair was found * (this is the line after the parser has removed comments and concatenated * continued lines). The handler can transform the value any way it desires, diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index 5a4bfd06094492f1e50cb1f998bfe3c9ab239908..6ceeab671295e1c0f4b6bd3d02a26736cbb74022 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -2713,10 +2713,15 @@ int slurm_send_node_msg(slurm_fd_t fd, slurm_msg_t * msg) get_buf_offset(buffer), SLURM_PROTOCOL_NO_SEND_RECV_FLAGS ); - if (rc < 0) { + if ((rc < 0) && (errno == ENOTCONN)) { + debug3("slurm_msg_sendto: peer has disappeared for msg_type=%u", + msg->msg_type); + } else if (rc < 0) { + slurm_addr_t peer_addr; char addr_str[32]; - slurm_print_slurm_addr(&msg->address, addr_str, - sizeof(addr_str)); + + slurm_get_peer_addr(fd, &peer_addr); + slurm_print_slurm_addr(&peer_addr, addr_str, sizeof(addr_str)); error("slurm_msg_sendto: address:port=%s msg_type=%u: %m", addr_str, msg->msg_type); } @@ -3419,7 +3424,7 @@ List slurm_send_addr_recv_msgs(slurm_msg_t *msg, char *name, int timeout) /* - * Open a connection to the "address" specified in the the slurm msg "req" + * Open a connection to the "address" specified in the slurm msg "req". * Then read back an "rc" message returning the "return_code" specified * in the response in the "rc" parameter. * IN req - a slurm_msg struct to be sent by the function diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 4d4b1da47069fa84b2aed14d00f3c358f8bce1ab..24a2b8cf2cf2cd4ae2f33ab60f5aacada53b7125 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -600,7 +600,7 @@ static int _unpack_spank_env_responce_msg(spank_env_responce_msg_t ** msg_ptr, Buf buffer, uint16_t protocol_version); /* pack_header - * packs a slurm protocol header that proceeds every slurm message + * packs a slurm protocol header that precedes every slurm message * IN header - the header structure to pack * IN/OUT buffer - destination of the pack, contains pointers that are * automatically updated @@ -627,7 +627,7 @@ pack_header(header_t * header, Buf buffer) } /* unpack_header - * unpacks a slurm protocol header that proceeds every slurm message + * unpacks a slurm protocol header that precedes every slurm message * OUT header - the header structure to unpack * IN/OUT buffer - source of the unpack data, contains pointers that are * automatically updated diff --git a/src/common/slurm_protocol_pack.h b/src/common/slurm_protocol_pack.h index c3f2979be61cfd4ef9e67b2abb859bd862a75000..be56223e7997ca64a71527149fa6c7f59f67bb97 100644 --- a/src/common/slurm_protocol_pack.h +++ b/src/common/slurm_protocol_pack.h @@ -61,7 +61,7 @@ /****************************/ /* pack_header - * packs a slurm protocol header that proceeds every slurm message + * packs a slurm protocol header that precedes every slurm message * IN header - the header structure to pack * IN/OUT buffer - destination of the pack, contains pointers that are * automatically updated @@ -69,7 +69,7 @@ extern void pack_header ( header_t * header , Buf buffer ); /* unpack_header - * unpacks a slurm protocol header that proceeds every slurm message + * unpacks a slurm protocol header that precedes every slurm message * OUT header - the header structure to unpack * IN/OUT buffer - source of the unpack data, contains pointers that are * automatically updated diff --git a/src/common/stepd_api.c b/src/common/stepd_api.c index 7eea47b2595348e2f4ba64112f4397e1ccf9b725..2812fe79be9ee8fa0ea5ee1f8b597c86e3e96225 100644 --- a/src/common/stepd_api.c +++ b/src/common/stepd_api.c @@ -752,7 +752,7 @@ rwfail: /* * Suspend execution of the job step. Only root or SlurmUser is * authorized to use this call. Since this activity includes a 'sleep 1' - * in the slurmstepd, initiate the the "suspend" in parallel + * in the slurmstepd, initiate the "suspend" in parallel. * * Returns SLURM_SUCCESS is successful. On error returns SLURM_ERROR * and sets errno. diff --git a/src/database/mysql_common.c b/src/database/mysql_common.c index 80ed86278d473608d84fedbc98cb12f5d44798d7..995bff1ddb39970540c43b300ff48997cf48b947 100644 --- a/src/database/mysql_common.c +++ b/src/database/mysql_common.c @@ -1,5 +1,5 @@ /*****************************************************************************\ - * mysql_common.c - common functions for the the mysql storage plugin. + * mysql_common.c - common functions for the mysql storage plugin. ***************************************************************************** * * Copyright (C) 2004-2007 The Regents of the University of California. diff --git a/src/database/mysql_common.h b/src/database/mysql_common.h index e1201b7783263f924d12ef648db1e69f9741e1f7..6c7fcc30d2be31b0b774f0fbd57ccd0f21b7790c 100644 --- a/src/database/mysql_common.h +++ b/src/database/mysql_common.h @@ -1,5 +1,5 @@ /*****************************************************************************\ - * mysql_common.h - common functions for the the mysql storage plugin. + * mysql_common.h - common functions for the mysql storage plugin. ***************************************************************************** * * Copyright (C) 2004-2007 The Regents of the University of California. diff --git a/src/database/pgsql_common.c b/src/database/pgsql_common.c index 9223c89d2a32dacc4fd601fa10d1cbb65205a3cb..7bd59966f69e686e6a309e3f10b2579d2c19a1f6 100644 --- a/src/database/pgsql_common.c +++ b/src/database/pgsql_common.c @@ -1,5 +1,5 @@ /*****************************************************************************\ - * pgsql_common.c - common functions for the the pgsql storage plugin. + * pgsql_common.c - common functions for the pgsql storage plugin. ***************************************************************************** * * Copyright (C) 2004-2007 The Regents of the University of California. diff --git a/src/database/pgsql_common.h b/src/database/pgsql_common.h index ff7093e408ebe7352443223a7b87b2b6add39f46..1053f5cf044018fd8b94e0d8d4c14321ea482dae 100644 --- a/src/database/pgsql_common.h +++ b/src/database/pgsql_common.h @@ -1,5 +1,5 @@ /*****************************************************************************\ - * pgsql_common.h - common functions for the the pgsql storage plugin. + * pgsql_common.h - common functions for the pgsql storage plugin. ***************************************************************************** * * Copyright (C) 2004-2007 The Regents of the University of California. diff --git a/src/plugins/proctrack/sgi_job/proctrack_sgi_job.c b/src/plugins/proctrack/sgi_job/proctrack_sgi_job.c index 09353d4d7b200a4ad961356db2de505e2cf19866..9380f0c9d41eeed112dd526c678e7fdd989dfd0a 100644 --- a/src/plugins/proctrack/sgi_job/proctrack_sgi_job.c +++ b/src/plugins/proctrack/sgi_job/proctrack_sgi_job.c @@ -142,7 +142,7 @@ int init (void) if (!job_ops.getpidcnt) error ("Unable to resolve job_getpidcnt in libjob.so"); - info ("successfully loaded libjob.so"); + debug ("successfully loaded libjob.so"); return SLURM_SUCCESS; } diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index dcb9785e796cad260d1fbe83cb363f32e8e8cc09..16c7b0d03c5d2ca164c4c56ca729159c79442cce 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1056,7 +1056,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, slurm_fail_job(bg_record->job_running); } - /* If Running Dynamic mode and the the block is + /* If Running Dynamic mode and the block is smaller than the create size just continue on. */ if ((bg_conf->layout_mode == LAYOUT_DYNAMIC) diff --git a/src/plugins/select/cray/select_cray.c b/src/plugins/select/cray/select_cray.c index 39be6f6fcbf2e3a46db0fbedccf670634be4346e..1a4858cc17d53328bc7328ecb44bbb8147247ad8 100644 --- a/src/plugins/select/cray/select_cray.c +++ b/src/plugins/select/cray/select_cray.c @@ -614,21 +614,26 @@ extern char *select_p_select_jobinfo_sprint(select_jobinfo_t *jobinfo, } switch (mode) { + /* + * SLURM only knows the ALPS reservation ID. The application IDs (APIDs) + * of the reservation need to be queried from the Inventory response. + * The maximum known reservation ID is 4096, it wraps around after that. + */ case SELECT_PRINT_HEAD: - snprintf(buf, size, "RESV_ID"); + snprintf(buf, size, "ALPS"); break; case SELECT_PRINT_DATA: if (jobinfo->reservation_id) - snprintf(buf, size, "%7u", jobinfo->reservation_id); + snprintf(buf, size, "%4u", jobinfo->reservation_id); else - snprintf(buf, size, "%7s", "none"); + snprintf(buf, size, "%4s", "none"); break; case SELECT_PRINT_MIXED: if (jobinfo->reservation_id) - snprintf(buf, size, "Resv_ID=%u", + snprintf(buf, size, "resId=%u", jobinfo->reservation_id); else - snprintf(buf, size, "Resv_ID=none"); + snprintf(buf, size, "resId=none"); break; case SELECT_PRINT_RESV_ID: snprintf(buf, size, "%u", jobinfo->reservation_id); @@ -661,20 +666,21 @@ extern char *select_p_select_jobinfo_xstrdup(select_jobinfo_t *jobinfo, } switch (mode) { + /* See comment in select_p_select_jobinfo_sprint() regarding format. */ case SELECT_PRINT_HEAD: - xstrcat(buf, "RESV_ID"); + xstrcat(buf, "ALPS"); break; case SELECT_PRINT_DATA: if (jobinfo->reservation_id) - xstrfmtcat(buf, "%7u", jobinfo->reservation_id); + xstrfmtcat(buf, "%4u", jobinfo->reservation_id); else - xstrfmtcat(buf, "%7s", "none"); + xstrfmtcat(buf, "%4s", "none"); break; case SELECT_PRINT_MIXED: if (jobinfo->reservation_id) - xstrfmtcat(buf, "Resv_ID=%u", jobinfo->reservation_id); + xstrfmtcat(buf, "resId=%u", jobinfo->reservation_id); else - xstrcat(buf, "Resv_ID=none"); + xstrcat(buf, "resId=none"); break; case SELECT_PRINT_RESV_ID: xstrfmtcat(buf, "%u", jobinfo->reservation_id); diff --git a/src/plugins/task/affinity/dist_tasks.c b/src/plugins/task/affinity/dist_tasks.c index 1f77fe75d9fe2c2202979dde0b81cd7c6d0bfddc..81f0ad87f984303f3b395fd9a2645b8227adbe36 100644 --- a/src/plugins/task/affinity/dist_tasks.c +++ b/src/plugins/task/affinity/dist_tasks.c @@ -799,7 +799,7 @@ static int _task_layout_lllp_multi(launch_tasks_request_msg_t *req, * task_layout_lllp_cyclic creates a cyclic distribution at the * lowest level of logical processor which is either socket, core or * thread depending on the system architecture. The Cyclic algorithm - * is the same as the the Cyclic distribution performed in srun. + * is the same as the Cyclic distribution performed in srun. * * Distribution at the lllp: * -m hostfile|plane|block|cyclic:block|cyclic @@ -898,7 +898,7 @@ static int _task_layout_lllp_cyclic(launch_tasks_request_msg_t *req, * task_layout_lllp_block will create a block distribution at the * lowest level of logical processor which is either socket, core or * thread depending on the system architecture. The Block algorithm - * is the same as the the Block distribution performed in srun. + * is the same as the Block distribution performed in srun. * * Distribution at the lllp: * -m hostfile|plane|block|cyclic:block|cyclic diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 109b9833a4bb8a83d489de3cf18dad27b6877dc6..8c708c0ba99b4f945048a9409074c129cf66968e 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -996,7 +996,10 @@ static void *_service_connection(void *arg) slurm_msg_t *msg = xmalloc(sizeof(slurm_msg_t)); slurm_msg_t_init(msg); - + /* + * slurm_receive_msg sets msg connection fd to accepted fd. This allows + * possibility for slurmctld_req() to close accepted connection. + */ if(slurm_receive_msg(conn->newsockfd, msg, 0) != 0) { error("slurm_receive_msg: %m"); /* close should only be called when the socket implementation @@ -1007,9 +1010,6 @@ static void *_service_connection(void *arg) goto cleanup; } - /* set msg connection fd to accepted fd. This allows - * possibility for slurmd_req () to close accepted connection - */ if(errno != SLURM_SUCCESS) { if (errno == SLURM_PROTOCOL_VERSION_ERROR) { slurm_send_rc_msg(msg, SLURM_PROTOCOL_VERSION_ERROR); diff --git a/src/slurmctld/groups.c b/src/slurmctld/groups.c index 8add89b5895433d3c3fd2cca497ccd4fba898d6e..f280205c020779a5cb87c5a5caf77ea00c005181 100644 --- a/src/slurmctld/groups.c +++ b/src/slurmctld/groups.c @@ -77,7 +77,7 @@ struct group_cache_rec { }; /* - * get_group_members - indentify the users in a given group name + * get_group_members - identify the users in a given group name * IN group_name - a single group name * RET a zero terminated list of its UIDs or NULL on error * NOTE: User root has implicitly access to every group diff --git a/src/slurmctld/groups.h b/src/slurmctld/groups.h index 71677cd8e384784e23744fad72997298293e414a..d0bda786c70e26ff3369d7191870b3a454c2711d 100644 --- a/src/slurmctld/groups.h +++ b/src/slurmctld/groups.h @@ -47,7 +47,7 @@ extern void clear_group_cache(void); /* - * get_group_members - indentify the users in a given group name + * get_group_members - identify the users in a given group name * IN group_name - a single group name * RET a zero terminated list of its UIDs or NULL on error * NOTE: User root has implicitly access to every group diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index 991127ae06919c1353f0967d75c77876b45167f5..a03856f3784b3e3cf9fdd763196eeb9b3dc4f1b9 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -1441,7 +1441,7 @@ void load_part_uid_allow_list(int force) /* - * _get_groups_members - indentify the users in a list of group names + * _get_groups_members - identify the users in a list of group names * IN group_names - a comma delimited list of group names * RET a zero terminated list of its UIDs or NULL on error * NOTE: User root has implicitly access to every group diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 58df6d1d5e5e962973b297438f3410e161d30b55..300c37550ca5a78ede54dd12a02387cc5c034b60 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -1558,7 +1558,7 @@ static void _sync_nodes_to_suspended_job(struct job_record *job_ptr) #ifdef HAVE_ELAN /* Every node in a given partition must have the same processor count - * at present, this function insure it */ + * at present, ensured by this function. */ static void _validate_node_proc_count(void) { ListIterator part_iterator; diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index f398f5c628acf6e73ca5c1d8cd8c13696c96d8b7..4835ecf5bfcd88fa5473c7bac454b2d408129079 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -2057,7 +2057,7 @@ static void _validate_all_reservations(void) } /* - * Validate the the reserved nodes are not DOWN or DRAINED and + * Validate that the reserved nodes are not DOWN or DRAINED and * select different nodes as needed. */ static void _validate_node_choice(slurmctld_resv_t *resv_ptr) diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index d541381aff565025c9e310f669ddd0d534d6bbc0..ed7d05143029a6f90071ca2f51eb64641cbfc71c 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -1211,7 +1211,7 @@ _slurmd_init(void) build_all_frontend_info(); /* - * Read global slurm config file, ovverride necessary values from + * Read global slurm config file, override necessary values from * defaults and command line. */ _read_config(false); diff --git a/src/slurmd/slurmstepd/req.c b/src/slurmd/slurmstepd/req.c index 822005aa8b2f3f422b45ed3fa475cbf3574d5797..8d1f9f1febf6f34e470904ff6751c5616dbf932d 100644 --- a/src/slurmd/slurmstepd/req.c +++ b/src/slurmd/slurmstepd/req.c @@ -170,7 +170,7 @@ _domain_socket_create(const char *dir, const char *nodename, } /* - * Now build the the name of socket, and create the socket. + * Now build the name of socket, and create the socket. */ xstrfmtcat(name, "%s/%s_%u.%u", dir, nodename, jobid, stepid); diff --git a/src/srun/opt.c b/src/srun/opt.c index 31dbf9badd6d3ca079bd1fffc465d5a5db28687f..da24ad197d8f4e49b61a0a70d9f253bf347c0e40 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -2070,7 +2070,7 @@ static bool _opt_verify(void) return verified; } -/* Initialize the the spank_job_env based upon environment variables set +/* Initialize the spank_job_env based upon environment variables set * via salloc or sbatch commands */ extern void init_spank_env(void) { diff --git a/src/srun/opt.h b/src/srun/opt.h index b637d72bbc479bc00aee039d9eb0b7d5d0f8e53e..6dfe48dc613204e9eb9fcf60e8df4aedd8124469 100644 --- a/src/srun/opt.h +++ b/src/srun/opt.h @@ -258,7 +258,7 @@ extern int spank_set_job_env(const char *name, const char *value, int overwrite); extern int spank_unset_job_env(const char *name); -/* Initialize the the spank_job_env based upon environment variables set +/* Initialize the spank_job_env based upon environment variables set * via salloc or sbatch commands */ extern void init_spank_env(void); diff --git a/src/sview/common.c b/src/sview/common.c index ad3391ae2b924ad537967beef09280228891a1e4..20196be4992338dce61353e690223dd873a73869 100644 --- a/src/sview/common.c +++ b/src/sview/common.c @@ -57,7 +57,7 @@ static int _find_node_inx (char *name) int i; if ((name == NULL) || (name[0] == '\0')) { - info("find_node_record passed NULL name"); + info("_find_node_inx passed NULL name"); return -1; } diff --git a/src/sview/grid.c b/src/sview/grid.c index 750e9463b9f55bde0698b1e2efbbc62d53d753fd..fe16159ccd8e5fe65ff1cb599f42d1dd604cce72 100644 --- a/src/sview/grid.c +++ b/src/sview/grid.c @@ -587,7 +587,7 @@ static int _add_button_to_list(node_info_t *node_ptr, return SLURM_ERROR; } - /* Translate a 3D or 4D space into a 2D space the the extent + /* Translate a 3D or 4D space into a 2D space to the extent * possible. */ if (node_exists == NULL) { node_exists_cnt = 1; diff --git a/src/sview/job_info.c b/src/sview/job_info.c index 5134b50a6c9bbe8de202644e65df429152c14447..e8e9839fcfe16640358d4ea2765b9f9e7e1f1d32 100644 --- a/src/sview/job_info.c +++ b/src/sview/job_info.c @@ -4122,7 +4122,7 @@ extern void cluster_change_job(void) if (cluster_flags & CLUSTER_FLAG_CRAYXT) { switch(display_data->id) { case SORTID_ALPS_RESV_ID: - display_data->name = "ALPS Resv ID"; + display_data->name = "ALPS"; break; } } else { diff --git a/src/sview/node_info.c b/src/sview/node_info.c index 3d0a4c474e056970a51040e147865319138208e9..e5caa1a0dd6ec70db90ba29b2696703c8f539e75 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -663,9 +663,7 @@ extern int get_new_info_node(node_info_msg_t **info_ptr, int force) if (*info_ptr != g_node_info_ptr) error_code = SLURM_SUCCESS; *info_ptr = g_node_info_ptr; - if (changed) - error_code = SLURM_SUCCESS; - goto end_it; + return error_code; } last = now; @@ -778,7 +776,7 @@ extern int get_new_info_node(node_info_msg_t **info_ptr, int force) default_sview_config.grid_topological) { get_topo_conf(); /* pull in topology NOW */ } -end_it: + return error_code; }