Changeset 4887
- Timestamp:
- 07/01/09 23:23:06 (4 months ago)
- Location:
- mpich2/trunk/src/pm/hydra
- Files:
-
- 28 modified
-
bootstrap/fork/fork.h (modified) (1 diff)
-
bootstrap/fork/fork_launch.c (modified) (1 diff)
-
bootstrap/include/bsci.h.in (modified) (2 diffs)
-
bootstrap/rsh/rsh.h (modified) (1 diff)
-
bootstrap/rsh/rsh_launch.c (modified) (2 diffs)
-
bootstrap/slurm/slurm.h (modified) (1 diff)
-
bootstrap/slurm/slurm_launch.c (modified) (4 diffs)
-
bootstrap/src/bsci_init.c.in (modified) (1 diff)
-
bootstrap/src/bsci_launch.c (modified) (1 diff)
-
bootstrap/ssh/ssh.h (modified) (1 diff)
-
bootstrap/ssh/ssh_launch.c (modified) (2 diffs)
-
configure.in (modified) (2 diffs)
-
css/src/cssi_init.c.in (modified) (1 diff)
-
demux/demux.c (modified) (2 diffs)
-
include/hydra_utils.h (modified) (3 diffs)
-
pm/pmiserv/pmi_handle.c (modified) (1 diff)
-
pm/pmiserv/pmi_handle.h (modified) (2 diffs)
-
pm/pmiserv/pmi_handle_common.c (modified) (1 diff)
-
pm/pmiserv/pmi_handle_v1.c (modified) (13 diffs)
-
pm/pmiserv/pmi_handle_v2.c (modified) (5 diffs)
-
pm/pmiserv/pmi_serv_cb.c (modified) (2 diffs)
-
pm/pmiserv/pmi_serv_launch.c (modified) (1 diff)
-
rmk/src/rmki_init.c.in (modified) (1 diff)
-
utils/args/args.c (modified) (4 diffs)
-
utils/env/env.c (modified) (1 diff)
-
utils/launch/allocate.c (modified) (2 diffs)
-
utils/sock/sock.c (modified) (3 diffs)
-
utils/timer/timer.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mpich2/trunk/src/pm/hydra/bootstrap/fork/fork.h
r4569 r4887 10 10 #include "hydra_base.h" 11 11 12 HYD_Status HYD_BSCD_fork_launch_procs(char **global_args, c har *partition_id_str,12 HYD_Status HYD_BSCD_fork_launch_procs(char **global_args, const char *partition_id_str, 13 13 struct HYD_Partition *partition_list); 14 14 -
mpich2/trunk/src/pm/hydra/bootstrap/fork/fork_launch.c
r4601 r4887 10 10 #include "fork.h" 11 11 12 HYD_Status HYD_BSCD_fork_launch_procs(char **global_args, c har *partition_id_str,12 HYD_Status HYD_BSCD_fork_launch_procs(char **global_args, const char *partition_id_str, 13 13 struct HYD_Partition *partition_list) 14 14 { -
mpich2/trunk/src/pm/hydra/bootstrap/include/bsci.h.in
r4614 r4887 15 15 16 16 struct HYD_BSCI_fns { 17 HYD_Status(*launch_procs) (char **global_args, c har *partition_id_str,17 HYD_Status(*launch_procs) (char **global_args, const char *partition_id_str, 18 18 struct HYD_Partition *partition_list); 19 19 HYD_Status(*finalize) (void); … … 27 27 28 28 HYD_Status HYD_BSCI_init(char *bootstrap, char *bootstrap_exec, int enablex, int debug); 29 HYD_Status HYD_BSCI_launch_procs(char **global_args, c har *partition_id_str,29 HYD_Status HYD_BSCI_launch_procs(char **global_args, const char *partition_id_str, 30 30 struct HYD_Partition *partition_list); 31 31 HYD_Status HYD_BSCI_finalize(void); -
mpich2/trunk/src/pm/hydra/bootstrap/rsh/rsh.h
r4569 r4887 10 10 #include "hydra_base.h" 11 11 12 HYD_Status HYD_BSCD_rsh_launch_procs(char **global_args, c har *partition_id_str,12 HYD_Status HYD_BSCD_rsh_launch_procs(char **global_args, const char *partition_id_str, 13 13 struct HYD_Partition *partition_list); 14 14 -
mpich2/trunk/src/pm/hydra/bootstrap/rsh/rsh_launch.c
r4601 r4887 16 16 * environment and execvp's this executable. 17 17 */ 18 HYD_Status HYD_BSCD_rsh_launch_procs(char **global_args, c har *partition_id_str,18 HYD_Status HYD_BSCD_rsh_launch_procs(char **global_args, const char *partition_id_str, 19 19 struct HYD_Partition *partition_list) 20 20 { … … 41 41 42 42 if (test_path) { 43 tmp[0] = test_path;44 tmp[1] = "rsh";43 tmp[0] = HYDU_strdup(test_path); 44 tmp[1] = HYDU_strdup("rsh"); 45 45 tmp[2] = NULL; 46 46 47 47 status = HYDU_str_alloc_and_join(tmp, &path); 48 48 HYDU_ERR_POP(status, "error joining strings\n"); 49 50 HYDU_free_strlist(tmp); 49 51 } 50 52 else -
mpich2/trunk/src/pm/hydra/bootstrap/slurm/slurm.h
r4569 r4887 10 10 #include "hydra_base.h" 11 11 12 HYD_Status HYD_BSCD_slurm_launch_procs(char **global_args, c har *partition_id_str,12 HYD_Status HYD_BSCD_slurm_launch_procs(char **global_args, const char *partition_id_str, 13 13 struct HYD_Partition *partition_list); 14 14 HYD_Status HYD_BSCD_slurm_query_partition_id(int *partition_id); -
mpich2/trunk/src/pm/hydra/bootstrap/slurm/slurm_launch.c
r4601 r4887 10 10 #include "slurm.h" 11 11 12 HYD_Status HYD_BSCD_slurm_launch_procs(char **global_args, c har *partition_id_str,12 HYD_Status HYD_BSCD_slurm_launch_procs(char **global_args, const char *partition_id_str, 13 13 struct HYD_Partition *partition_list) 14 14 { … … 35 35 36 36 if (test_path) { 37 tmp[0] = test_path;38 tmp[1] = "srun";37 tmp[0] = HYDU_strdup(test_path); 38 tmp[1] = HYDU_strdup("srun"); 39 39 tmp[2] = NULL; 40 40 41 41 status = HYDU_str_alloc_and_join(tmp, &path); 42 42 HYDU_ERR_POP(status, "error joining strings\n"); 43 44 HYDU_free_strlist(tmp); 43 45 } 44 46 else … … 53 55 num_nodes = 0; 54 56 FORALL_ACTIVE_PARTITIONS(partition, partition_list) { 55 tmp[i++] = partition->base->name;57 tmp[i++] = HYDU_strdup(partition->base->name); 56 58 if (partition->next && partition->next->base->active) 57 tmp[i++] = ",";59 tmp[i++] = HYDU_strdup(","); 58 60 num_nodes++; 59 61 } … … 61 63 status = HYDU_str_alloc_and_join(tmp, &client_arg[arg]); 62 64 HYDU_ERR_POP(status, "error joining strings\n"); 65 66 HYDU_free_strlist(tmp); 63 67 64 68 arg++; -
mpich2/trunk/src/pm/hydra/bootstrap/src/bsci_init.c.in
r4614 r4887 10 10 11 11 struct HYD_BSCI_fns HYD_BSCI_fns = { 0 }; 12 c har *HYD_BSCI_comp_array[] = { @hydra_bss_name_array@ };12 const char *HYD_BSCI_comp_array[] = { @hydra_bss_name_array@ }; 13 13 HYD_Status(*HYD_BSCI_comp_init[])(void) = { @hydra_bss_init_array@ }; 14 14 struct HYD_BSCI_info HYD_BSCI_info = { 0 }; -
mpich2/trunk/src/pm/hydra/bootstrap/src/bsci_launch.c
r4601 r4887 8 8 #include "bsci.h" 9 9 10 HYD_Status HYD_BSCI_launch_procs(char **global_args, c har *partition_id_str,10 HYD_Status HYD_BSCI_launch_procs(char **global_args, const char *partition_id_str, 11 11 struct HYD_Partition *partition_list) 12 12 { -
mpich2/trunk/src/pm/hydra/bootstrap/ssh/ssh.h
r4569 r4887 10 10 #include "hydra_base.h" 11 11 12 HYD_Status HYD_BSCD_ssh_launch_procs(char **global_args, c har *partition_id_str,12 HYD_Status HYD_BSCD_ssh_launch_procs(char **global_args, const char *partition_id_str, 13 13 struct HYD_Partition *partition_list); 14 14 -
mpich2/trunk/src/pm/hydra/bootstrap/ssh/ssh_launch.c
r4601 r4887 16 16 * environment and execvp's this executable. 17 17 */ 18 HYD_Status HYD_BSCD_ssh_launch_procs(char **global_args, c har *partition_id_str,18 HYD_Status HYD_BSCD_ssh_launch_procs(char **global_args, const char *partition_id_str, 19 19 struct HYD_Partition *partition_list) 20 20 { … … 41 41 42 42 if (test_path) { 43 tmp[0] = test_path;44 tmp[1] = "ssh";43 tmp[0] = HYDU_strdup(test_path); 44 tmp[1] = HYDU_strdup("ssh"); 45 45 tmp[2] = NULL; 46 46 47 47 status = HYDU_str_alloc_and_join(tmp, &path); 48 48 HYDU_ERR_POP(status, "error joining strings\n"); 49 50 HYDU_free_strlist(tmp); 49 51 } 50 52 else -
mpich2/trunk/src/pm/hydra/configure.in
r4861 r4887 14 14 AC_CONFIG_HEADER(include/hydra_config.h) 15 15 16 # Check for special types17 AC_TYPE_SIZE_T18 19 16 dnl Bug in autoconf adds -O2 and -g by default. Make sure we only get 20 17 dnl the flags we want. 21 18 save_cflags=$CFLAGS 22 19 AC_PROG_CC 20 AC_TYPE_SIZE_T 23 21 CFLAGS=$save_cflags 24 22 … … 254 252 dnl Debugging support 255 253 AC_ARG_ENABLE(g, [ --enable-g Enable Debugging], 256 [ DEBUG=$enableval ],257 [ DEBUG=no ])254 [ debug=$enableval ], 255 [ debug=no ]) 258 256 AC_MSG_CHECKING(debugging support) 259 AC_MSG_RESULT($ DEBUG)260 if test "$ DEBUG" = "yes"; then261 EXTRA_CFLAGS="$EXTRA_CFLAGS -g"257 AC_MSG_RESULT($debug) 258 if test "$debug" = "yes"; then 259 CFLAGS="$CFLAGS -g" 262 260 AC_DEFINE(ENABLE_DEBUG,1,[Define if debugging support is enabled]) 263 261 fi 264 AC_SUBST(EXTRA_CFLAGS)265 262 266 263 dnl Warning messages -
mpich2/trunk/src/pm/hydra/css/src/cssi_init.c.in
r4601 r4887 10 10 struct HYD_CSSI_fns HYD_CSSI_fns = { 0 }; 11 11 12 c har *HYD_CSSI_comp_array[] = { @hydra_css_name_array@ };12 const char *HYD_CSSI_comp_array[] = { @hydra_css_name_array@ }; 13 13 HYD_Status(*HYD_CSSI_comp_init[])(void) = { @hydra_css_init_array@ }; 14 14 -
mpich2/trunk/src/pm/hydra/demux/demux.c
r4213 r4887 99 99 100 100 101 HYD_Status HYD_DMX_wait_for_event(int time)101 HYD_Status HYD_DMX_wait_for_event(int wtime) 102 102 { 103 103 int total_fds, i, j, events, ret; … … 132 132 133 133 while (1) { 134 ret = poll(pollfds, total_fds, time);134 ret = poll(pollfds, total_fds, wtime); 135 135 if (ret < 0) { 136 136 if (errno == EINTR) { -
mpich2/trunk/src/pm/hydra/include/hydra_utils.h
r4835 r4887 137 137 138 138 /* args */ 139 HYD_Status HYDU_find_in_path(c har *execname, char **path);140 HYD_Status HYDU_get_base_path(c har *execname, char *wdir, char **path);139 HYD_Status HYDU_find_in_path(const char *execname, char **path); 140 HYD_Status HYDU_get_base_path(const char *execname, char *wdir, char **path); 141 141 142 142 … … 154 154 HYD_Status HYDU_list_inherited_env(HYD_Env_t ** env_list); 155 155 HYD_Env_t *HYDU_env_list_dup(HYD_Env_t * env); 156 HYD_Status HYDU_env_create(HYD_Env_t ** env, c har *env_name, char *env_value);156 HYD_Status HYDU_env_create(HYD_Env_t ** env, const char *env_name, char *env_value); 157 157 HYD_Status HYDU_env_free(HYD_Env_t * env); 158 158 HYD_Status HYDU_env_free_list(HYD_Env_t * env); … … 223 223 HYD_Status HYDU_sock_accept(int listen_fd, int *fd); 224 224 HYD_Status HYDU_sock_readline(int fd, char *buf, int maxlen, int *linelen); 225 HYD_Status HYDU_sock_writeline(int fd, c har *buf, int maxsize);225 HYD_Status HYDU_sock_writeline(int fd, const char *buf, int maxsize); 226 226 HYD_Status HYDU_sock_read(int fd, void *buf, int maxlen, int *count, 227 227 enum HYDU_sock_comm_flag flag); 228 HYD_Status HYDU_sock_write(int fd, void *buf, int maxsize);229 HYD_Status HYDU_sock_trywrite(int fd, void *buf, int maxsize);228 HYD_Status HYDU_sock_write(int fd, const void *buf, int maxsize); 229 HYD_Status HYDU_sock_trywrite(int fd, const void *buf, int maxsize); 230 230 HYD_Status HYDU_sock_set_nonblock(int fd); 231 231 HYD_Status HYDU_sock_set_cloexec(int fd); -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_handle.c
r4835 r4887 158 158 159 159 160 HYD_Status HYD_PMCD_pmi_add_kvs(c har *key, char *val, HYD_PMCD_pmi_kvs_t * kvs,160 HYD_Status HYD_PMCD_pmi_add_kvs(const char *key, char *val, HYD_PMCD_pmi_kvs_t * kvs, 161 161 char **key_pair_str, int *ret) 162 162 { -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_handle.h
r4601 r4887 76 76 HYD_Status HYD_PMCD_pmi_id_to_rank(int id, int *rank); 77 77 HYD_PMCD_pmi_process_t *HYD_PMCD_pmi_find_process(int fd); 78 HYD_Status HYD_PMCD_pmi_add_kvs(c har *key, char *val, HYD_PMCD_pmi_kvs_t * kvs,78 HYD_Status HYD_PMCD_pmi_add_kvs(const char *key, char *val, HYD_PMCD_pmi_kvs_t * kvs, 79 79 char **key_pair_str, int *ret); 80 80 HYD_Status HYD_PMCD_pmi_process_mapping(HYD_PMCD_pmi_process_t * process, … … 87 87 88 88 struct HYD_PMCD_pmi_handle_fns { 89 c har *cmd;89 const char *cmd; 90 90 HYD_Status(*handler) (int fd, char *args[]); 91 91 }; -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_handle_common.c
r4835 r4887 14 14 { 15 15 int pmi_version, pmi_subversion; 16 c har *tmp;16 const char *tmp; 17 17 HYD_Status status = HYD_SUCCESS; 18 18 -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_handle_v1.c
r4614 r4887 58 58 status = HYDU_str_alloc_and_join(tmp, &cmd); 59 59 HYDU_ERR_POP(status, "error while joining strings\n"); 60 61 for (i = 0; tmp[i]; i++) 62 HYDU_FREE(tmp[i]); 60 HYDU_free_strlist(tmp); 63 61 64 62 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); … … 104 102 status = HYDU_str_alloc_and_join(tmp, &cmd); 105 103 HYDU_ERR_POP(status, "unable to join strings\n"); 106 107 for (i = 0; tmp[i]; i++) 108 HYDU_FREE(tmp[i]); 104 HYDU_free_strlist(tmp); 109 105 110 106 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); … … 143 139 status = HYDU_str_alloc_and_join(tmp, &cmd); 144 140 HYDU_ERR_POP(status, "unable to join strings\n"); 145 146 for (i = 0; tmp[i]; i++) 147 HYDU_FREE(tmp[i]); 141 HYDU_free_strlist(tmp); 148 142 149 143 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); … … 176 170 177 171 i = 0; 178 tmp[i++] = "cmd=my_kvsname kvsname="; 179 tmp[i++] = process->node->pg->kvs->kvs_name; 180 tmp[i++] = "\n"; 181 tmp[i++] = NULL; 182 183 status = HYDU_str_alloc_and_join(tmp, &cmd); 184 HYDU_ERR_POP(status, "unable to join strings\n"); 172 tmp[i++] = HYDU_strdup("cmd=my_kvsname kvsname="); 173 tmp[i++] = HYDU_strdup(process->node->pg->kvs->kvs_name); 174 tmp[i++] = HYDU_strdup("\n"); 175 tmp[i++] = NULL; 176 177 status = HYDU_str_alloc_and_join(tmp, &cmd); 178 HYDU_ERR_POP(status, "unable to join strings\n"); 179 HYDU_free_strlist(tmp); 185 180 186 181 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); … … 201 196 HYD_PMCD_pmi_process_t *process, *prun; 202 197 HYD_PMCD_pmi_node_t *node; 203 c har *cmd;198 const char *cmd; 204 199 HYD_Status status = HYD_SUCCESS; 205 200 … … 272 267 273 268 i = 0; 274 tmp[i++] = "cmd=put_result rc=";269 tmp[i++] = HYDU_strdup("cmd=put_result rc="); 275 270 if (process->node->pg->kvs->key_pair == NULL) { 276 271 process->node->pg->kvs->key_pair = key_pair; 277 tmp[i++] = "0 msg=success";272 tmp[i++] = HYDU_strdup("0 msg=success"); 278 273 } 279 274 else { … … 281 276 while (run->next) { 282 277 if (!strcmp(run->key, key_pair->key)) { 283 tmp[i++] = "-1 msg=duplicate_key";278 tmp[i++] = HYDU_strdup("-1 msg=duplicate_key"); 284 279 key_pair_str = HYDU_strdup(key_pair->key); 285 tmp[i++] = key_pair_str;280 tmp[i++] = HYDU_strdup(key_pair_str); 286 281 break; 287 282 } … … 289 284 } 290 285 run->next = key_pair; 291 tmp[i++] = "0 msg=success"; 292 } 293 tmp[i++] = "\n"; 294 tmp[i++] = NULL; 295 296 status = HYDU_str_alloc_and_join(tmp, &cmd); 297 HYDU_ERR_POP(status, "unable to join strings\n"); 286 tmp[i++] = HYDU_strdup("0 msg=success"); 287 } 288 tmp[i++] = HYDU_strdup("\n"); 289 tmp[i++] = NULL; 290 291 status = HYDU_str_alloc_and_join(tmp, &cmd); 292 HYDU_ERR_POP(status, "unable to join strings\n"); 293 HYDU_free_strlist(tmp); 298 294 299 295 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); … … 339 335 340 336 i = 0; 341 tmp[i++] = "cmd=get_result rc=";337 tmp[i++] = HYDU_strdup("cmd=get_result rc="); 342 338 if (process->node->pg->kvs->key_pair == NULL) { 343 tmp[i++] = "-1 msg=key_";344 tmp[i++] = key;345 tmp[i++] = "_not_found value=unknown";339 tmp[i++] = HYDU_strdup("-1 msg=key_"); 340 tmp[i++] = HYDU_strdup(key); 341 tmp[i++] = HYDU_strdup("_not_found value=unknown"); 346 342 } 347 343 else { … … 349 345 while (run) { 350 346 if (!strcmp(run->key, key)) { 351 tmp[i++] = "0 msg=success value=";347 tmp[i++] = HYDU_strdup("0 msg=success value="); 352 348 key_val_str = HYDU_strdup(run->val); 353 349 tmp[i++] = key_val_str; … … 357 353 } 358 354 if (run == NULL) { 359 tmp[i++] = "-1 msg=key_";360 tmp[i++] = key;361 tmp[i++] = "_not_found value=unknown";355 tmp[i++] = HYDU_strdup("-1 msg=key_"); 356 tmp[i++] = HYDU_strdup(key); 357 tmp[i++] = HYDU_strdup("_not_found value=unknown"); 362 358 } 363 359 } 364 tmp[i++] = "\n";365 tmp[i++] = NULL; 366 367 status = HYDU_str_alloc_and_join(tmp, &cmd); 368 HYDU_ERR_POP(status, "unable to join strings\n"); 369 370 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); 371 HYDU_ERR_POP(status, "error writing PMI line\n");372 HYDU_ FREE(cmd);373 HYDU_FREE( key_val_str);360 tmp[i++] = HYDU_strdup("\n"); 361 tmp[i++] = NULL; 362 363 status = HYDU_str_alloc_and_join(tmp, &cmd); 364 HYDU_ERR_POP(status, "unable to join strings\n"); 365 HYDU_free_strlist(tmp); 366 367 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); 368 HYDU_ERR_POP(status, "error writing PMI line\n"); 369 HYDU_FREE(cmd); 374 370 375 371 fn_exit: … … 384 380 HYD_Status HYD_PMCD_pmi_handle_v1_finalize(int fd, char *args[]) 385 381 { 386 c har *cmd;382 const char *cmd; 387 383 HYD_Status status = HYD_SUCCESS; 388 384 … … 420 416 421 417 i = 0; 422 tmp[i++] = "cmd=universe_size size=";418 tmp[i++] = HYDU_strdup("cmd=universe_size size="); 423 419 tmp[i++] = HYDU_int_to_str(usize); 424 tmp[i++] = "\n"; 425 tmp[i++] = NULL; 426 427 status = HYDU_str_alloc_and_join(tmp, &cmd); 428 HYDU_ERR_POP(status, "unable to join strings\n"); 429 430 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); 431 HYDU_ERR_POP(status, "error writing PMI line\n"); 432 HYDU_FREE(cmd); 433 434 fn_exit: 435 HYDU_FUNC_EXIT(); 436 return status; 437 438 fn_fail: 439 goto fn_exit; 440 } 420 tmp[i++] = HYDU_strdup("\n"); 421 tmp[i++] = NULL; 422 423 status = HYDU_str_alloc_and_join(tmp, &cmd); 424 HYDU_ERR_POP(status, "unable to join strings\n"); 425 HYDU_free_strlist(tmp); 426 427 status = HYDU_sock_writeline(fd, cmd, strlen(cmd)); 428 HYDU_ERR_POP(status, "error writing PMI line\n"); 429 HYDU_FREE(cmd); 430 431 fn_exit: 432 HYDU_FUNC_EXIT(); 433 return status; 434 435 fn_fail: 436 goto fn_exit; 437 } -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_handle_v2.c
r4719 r4887 56 56 for (i = 0; areq->req[i]; i++) { 57 57 dprintf("%s", areq->req[i]); 58 if (areq->req[i + 1]) 58 if (areq->req[i + 1]) { 59 59 dprintf(","); 60 } 60 61 } 61 62 dprintf(") "); … … 197 198 198 199 199 static char *find_token_keyval(struct token *tokens, int count, c har *key)200 static char *find_token_keyval(struct token *tokens, int count, const char *key) 200 201 { 201 202 int i; … … 395 396 HYD_PMCD_pmi_process_t *process; 396 397 HYD_PMCD_pmi_kvs_pair_t *run; 397 char *key, *wait , *thrid;398 char *key, *waitval, *thrid; 398 399 char *tmp[HYD_NUM_TMP_STRINGS] = { 0 }, *cmd; 399 400 struct token *tokens; … … 409 410 HYDU_ERR_CHKANDJUMP(status, key == NULL, HYD_INTERNAL_ERROR, "unable to find key token\n"); 410 411 411 wait = find_token_keyval(tokens, token_count, "wait");412 waitval = find_token_keyval(tokens, token_count, "wait"); 412 413 thrid = find_token_keyval(tokens, token_count, "thrid"); 413 414 … … 431 432 goto fn_exit; 432 433 433 if (wait && !strcmp(wait, "TRUE")) {434 if (waitval && !strcmp(waitval, "TRUE")) { 434 435 /* queue up */ 435 436 status = queue_outstanding_req(fd, GET_NODE_ATTR, args); -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_serv_cb.c
r4601 r4887 75 75 buflen -= linelen; 76 76 bufptr += linelen; 77 78 77 79 78 /* Unexpected termination of connection */ … … 315 314 316 315 317 void HYD_PMCD_pmi_serv_signal_cb(int sig nal)318 { 319 HYDU_FUNC_ENTER(); 320 321 if (sig nal == SIGINT || signal == SIGQUIT || signal== SIGTERM316 void HYD_PMCD_pmi_serv_signal_cb(int sig) 317 { 318 HYDU_FUNC_ENTER(); 319 320 if (sig == SIGINT || sig == SIGQUIT || sig == SIGTERM 322 321 #if defined SIGSTOP 323 || sig nal== SIGSTOP322 || sig == SIGSTOP 324 323 #endif /* SIGSTOP */ 325 324 #if defined SIGCONT 326 || sig nal== SIGCONT325 || sig == SIGCONT 327 326 #endif /* SIGSTOP */ 328 327 ) { -
mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_serv_launch.c
r4836 r4887 200 200 int inherited_env_count, user_env_count, system_env_count; 201 201 int segment_count, exec_count, total_args; 202 static proxy_count = 0;202 static int proxy_count = 0; 203 203 HYD_Env_t *env; 204 204 struct HYD_Partition *partition; -
mpich2/trunk/src/pm/hydra/rmk/src/rmki_init.c.in
r4601 r4887 13 13 struct HYD_RMKI_fns HYD_RMKI_fns = { 0 }; 14 14 15 c har *HYD_RMKI_comp_array[] = { @hydra_rmk_name_array@ };15 const char *HYD_RMKI_comp_array[] = { @hydra_rmk_name_array@ }; 16 16 HYD_Status(*HYD_RMKI_comp_init[])(void) = { @hydra_rmk_init_array@ }; 17 17 -
mpich2/trunk/src/pm/hydra/utils/args/args.c
r4508 r4887 18 18 } 19 19 20 HYD_Status HYDU_find_in_path(c har *execname, char **path)20 HYD_Status HYDU_find_in_path(const char *execname, char **path) 21 21 { 22 22 char *user_path = NULL, *tmp[HYD_NUM_TMP_STRINGS], *path_loc = NULL, *test_loc; … … 31 31 test_loc = strtok(user_path, ";:"); 32 32 do { 33 tmp[0] = test_loc;34 tmp[1] = "/";35 tmp[2] = execname;33 tmp[0] = HYDU_strdup(test_loc); 34 tmp[1] = HYDU_strdup("/"); 35 tmp[2] = HYDU_strdup(execname); 36 36 tmp[3] = NULL; 37 37 38 38 status = HYDU_str_alloc_and_join(tmp, &path_loc); 39 39 HYDU_ERR_POP(status, "unable to join strings\n"); 40 HYDU_free_strlist(tmp); 40 41 41 42 if (exists(path_loc)) { 42 tmp[0] = test_loc;43 tmp[1] = "/";43 tmp[0] = HYDU_strdup(test_loc); 44 tmp[1] = HYDU_strdup("/"); 44 45 tmp[2] = NULL; 45 46 46 47 status = HYDU_str_alloc_and_join(tmp, path); 47 48 HYDU_ERR_POP(status, "unable to join strings\n"); 49 HYDU_free_strlist(tmp); 48 50 49 51 goto fn_exit; /* We are done */ … … 71 73 } 72 74 73 HYD_Status HYDU_get_base_path(c har *execname, char *wdir, char **path)75 HYD_Status HYDU_get_base_path(const char *execname, char *wdir, char **path) 74 76 { 75 77 char *loc, *post; … … 92 94 /* Check if its absolute or relative */ 93 95 if (post[0] != '/') { /* relative */ 94 tmp[0] = wdir;95 tmp[1] = "/";96 tmp[2] = post;96 tmp[0] = HYDU_strdup(wdir); 97 tmp[1] = HYDU_strdup("/"); 98 tmp[2] = HYDU_strdup(post); 97 99 tmp[3] = NULL; 98 100 status = HYDU_str_alloc_and_join(tmp, path); 99 101 HYDU_ERR_POP(status, "unable to join strings\n"); 102 HYDU_free_strlist(tmp); 100 103 } 101 104 else { /* absolute */ -
mpich2/trunk/src/pm/hydra/utils/env/env.c
r4786 r4887 174 174 175 175 176 HYD_Status HYDU_env_create(HYD_Env_t ** env, c har *env_name, char *env_value)176 HYD_Status HYDU_env_create(HYD_Env_t ** env, const char *env_name, char *env_value) 177 177 { 178 178 HYD_Status status = HYD_SUCCESS; -
mpich2/trunk/src/pm/hydra/utils/launch/allocate.c
r4836 r4887 243 243 244 244 245 static int count_elements(char *str, c har *delim)245 static int count_elements(char *str, const char *delim) 246 246 { 247 247 int count; … … 260 260 261 261 262 static char *pad_string(char *str, c har *pad, int count)262 static char *pad_string(char *str, const char *pad, int count) 263 263 { 264 264 char *tmp[HYD_NUM_TMP_STRINGS], *out; -
mpich2/trunk/src/pm/hydra/utils/sock/sock.c
r4518 r4887 222 222 223 223 224 HYD_Status HYDU_sock_writeline(int fd, c har *buf, int maxsize)224 HYD_Status HYDU_sock_writeline(int fd, const char *buf, int maxsize) 225 225 { 226 226 int n; … … 286 286 287 287 288 HYD_Status HYDU_sock_write(int fd, void *buf, int maxsize)288 HYD_Status HYDU_sock_write(int fd, const void *buf, int maxsize) 289 289 { 290 290 int n; … … 310 310 311 311 312 HYD_Status HYDU_sock_trywrite(int fd, void *buf, int maxsize)312 HYD_Status HYDU_sock_trywrite(int fd, const void *buf, int maxsize) 313 313 { 314 314 int n; -
mpich2/trunk/src/pm/hydra/utils/timer/timer.c
r4140 r4887 9 9 /* FIXME: Here we assume that the timer is gettimeofday. */ 10 10 11 void HYDU_time_set(HYD_Time * time , int *val)11 void HYDU_time_set(HYD_Time * time_p, int *val) 12 12 { 13 13 if (val == NULL) { 14 14 /* Set time to right now */ 15 gettimeofday(time , NULL);15 gettimeofday(time_p, NULL); 16 16 } 17 17 else { 18 time ->tv_sec = *val;19 time ->tv_usec = 0;18 time_p->tv_sec = *val; 19 time_p->tv_usec = 0; 20 20 } 21 21 }
