[mpich2-commits] r3980 - in mpich2/trunk/src/pm/hydra: bootstrap/ssh bootstrap/utils control/consys control/utils demux include launcher/mpiexec launcher/utils pm/central pm/utils utils/env utils/launch utils/sock
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Mon Mar 9 03:19:30 CDT 2009
Author: balaji
Date: 2009-03-09 03:19:25 -0500 (Mon, 09 Mar 2009)
New Revision: 3980
Modified:
mpich2/trunk/src/pm/hydra/bootstrap/ssh/ssh_launch.c
mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_signal.c
mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_wait.c
mpich2/trunk/src/pm/hydra/control/consys/consys_close.c
mpich2/trunk/src/pm/hydra/control/consys/consys_launch.c
mpich2/trunk/src/pm/hydra/control/consys/consys_wait.c
mpich2/trunk/src/pm/hydra/control/utils/csiu.c
mpich2/trunk/src/pm/hydra/demux/demux.c
mpich2/trunk/src/pm/hydra/demux/demux.h
mpich2/trunk/src/pm/hydra/include/hydra.h
mpich2/trunk/src/pm/hydra/include/hydra_env.h
mpich2/trunk/src/pm/hydra/include/hydra_launch.h
mpich2/trunk/src/pm/hydra/include/hydra_sock.h
mpich2/trunk/src/pm/hydra/launcher/mpiexec/callback.c
mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c
mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c
mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c
mpich2/trunk/src/pm/hydra/pm/central/central_cb.c
mpich2/trunk/src/pm/hydra/pm/central/central_finalize.c
mpich2/trunk/src/pm/hydra/pm/central/central_launch.c
mpich2/trunk/src/pm/hydra/pm/central/proxy.c
mpich2/trunk/src/pm/hydra/pm/central/proxy.h
mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c
mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c
mpich2/trunk/src/pm/hydra/pm/utils/pmi.c
mpich2/trunk/src/pm/hydra/utils/env/env.c
mpich2/trunk/src/pm/hydra/utils/launch/allocate.c
mpich2/trunk/src/pm/hydra/utils/launch/launch.c
mpich2/trunk/src/pm/hydra/utils/sock/sock.c
Log:
White space cleanup based on the code-cleanup script.
Modified: mpich2/trunk/src/pm/hydra/bootstrap/ssh/ssh_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/bootstrap/ssh/ssh_launch.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/bootstrap/ssh/ssh_launch.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -31,7 +31,8 @@
status = HYD_BSCU_Set_common_signals(HYD_BSCU_Signal_handler);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("signal utils returned error when trying to set signal\n");
+ HYDU_Error_printf
+ ("signal utils returned error when trying to set signal\n");
goto fn_fail;
}
@@ -40,9 +41,11 @@
* they want launched. Without this functionality, the proxy
* cannot use this and will have to perfom its own launch. */
process_id = 0;
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
- if (partition->group_rank) /* Only rank 0 is spawned */
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
+ if (partition->group_rank) /* Only rank 0 is spawned */
continue;
/* Setup the executable arguments */
@@ -66,10 +69,14 @@
/* The stdin pointer will be some value for process_id 0;
* for everyone else, it's NULL. */
- status = HYDU_Create_process(client_arg, (process_id == 0 ? &handle.in : NULL),
- &partition->out, &partition->err, &partition->pid);
+ status =
+ HYDU_Create_process(client_arg,
+ (process_id == 0 ? &handle.in : NULL),
+ &partition->out, &partition->err,
+ &partition->pid);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("bootstrap spawn process returned error\n");
+ HYDU_Error_printf
+ ("bootstrap spawn process returned error\n");
goto fn_fail;
}
@@ -103,8 +110,10 @@
HYDU_FUNC_ENTER();
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
/* Setup the executable arguments */
arg = 0;
client_arg[arg++] = MPIU_Strdup("/usr/bin/ssh");
@@ -126,9 +135,11 @@
client_arg[arg++] = MPIU_Strdup(execname);
client_arg[arg++] = NULL;
- status = HYDU_Create_process(client_arg, NULL, NULL, NULL, NULL);
+ status =
+ HYDU_Create_process(client_arg, NULL, NULL, NULL, NULL);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("bootstrap spawn process returned error\n");
+ HYDU_Error_printf
+ ("bootstrap spawn process returned error\n");
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_signal.c
===================================================================
--- mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_signal.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_signal.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -17,26 +17,30 @@
status = HYDU_Set_signal(SIGINT, handler);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("signal utils returned error when trying to set SIGINT signal\n");
+ HYDU_Error_printf
+ ("signal utils returned error when trying to set SIGINT signal\n");
goto fn_fail;
}
status = HYDU_Set_signal(SIGQUIT, handler);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("signal utils returned error when trying to set SIGQUIT signal\n");
+ HYDU_Error_printf
+ ("signal utils returned error when trying to set SIGQUIT signal\n");
goto fn_fail;
}
status = HYDU_Set_signal(SIGTERM, handler);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("signal utils returned error when trying to set SIGTERM signal\n");
+ HYDU_Error_printf
+ ("signal utils returned error when trying to set SIGTERM signal\n");
goto fn_fail;
}
#if defined SIGSTOP
status = HYDU_Set_signal(SIGSTOP, handler);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("signal utils returned error when trying to set SIGSTOP signal\n");
+ HYDU_Error_printf
+ ("signal utils returned error when trying to set SIGSTOP signal\n");
goto fn_fail;
}
#endif /* SIGSTOP */
@@ -44,7 +48,8 @@
#if defined SIGCONT
status = HYDU_Set_signal(SIGCONT, handler);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("signal utils returned error when trying to set SIGCONT signal\n");
+ HYDU_Error_printf
+ ("signal utils returned error when trying to set SIGCONT signal\n");
goto fn_fail;
}
#endif /* SIGCONT */
Modified: mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_wait.c
===================================================================
--- mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_wait.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/bootstrap/utils/bscu_wait.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -27,8 +27,10 @@
HYDU_FUNC_ENTER();
not_completed = 0;
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next)
- for (partition = proc_params->partition; partition; partition = partition->next)
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next)
+ for (partition = proc_params->partition; partition;
+ partition = partition->next)
if (partition->exit_status == -1)
not_completed++;
@@ -41,8 +43,10 @@
pid = waitpid(-1, &ret_status, WNOHANG);
if (pid > 0) {
/* Find the pid and mark it as complete. */
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
if (partition->pid == pid) {
partition->exit_status = WEXITSTATUS(ret_status);
not_completed--;
Modified: mpich2/trunk/src/pm/hydra/control/consys/consys_close.c
===================================================================
--- mpich2/trunk/src/pm/hydra/control/consys/consys_close.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/control/consys/consys_close.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -25,15 +25,19 @@
/* Deregister the FD with the demux engine and close it. */
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when deregistering fd: %d\n", fd);
+ HYDU_Error_printf
+ ("demux engine returned error when deregistering fd: %d\n",
+ fd);
goto fn_fail;
}
close(fd);
/* Find the FD in the handle and remove it. */
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
if (partition->out == fd) {
partition->out = -1;
goto fn_exit;
Modified: mpich2/trunk/src/pm/hydra/control/consys/consys_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/control/consys/consys_launch.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/control/consys/consys_launch.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -23,21 +23,30 @@
status = HYD_PMCI_Launch_procs();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("process manager returned error when launching processes\n");
+ HYDU_Error_printf
+ ("process manager returned error when launching processes\n");
goto fn_fail;
}
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
- status = HYD_DMX_Register_fd(1, &partition->out, HYD_STDOUT, proc_params->stdout_cb);
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
+ status =
+ HYD_DMX_Register_fd(1, &partition->out, HYD_STDOUT,
+ proc_params->stdout_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
- status = HYD_DMX_Register_fd(1, &partition->err, HYD_STDOUT, proc_params->stderr_cb);
+ status =
+ HYD_DMX_Register_fd(1, &partition->err, HYD_STDOUT,
+ proc_params->stderr_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
}
@@ -62,9 +71,11 @@
handle.stdin_buf_count = 0;
handle.stdin_buf_offset = 0;
- status = HYD_DMX_Register_fd(1, &stdin_fd, HYD_STDOUT, handle.stdin_cb);
+ status =
+ HYD_DMX_Register_fd(1, &stdin_fd, HYD_STDOUT, handle.stdin_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
}
Modified: mpich2/trunk/src/pm/hydra/control/consys/consys_wait.c
===================================================================
--- mpich2/trunk/src/pm/hydra/control/consys/consys_wait.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/control/consys/consys_wait.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -25,15 +25,18 @@
/* Wait for some event to occur */
status = HYD_DMX_Wait_for_event();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when waiting for event\n");
+ HYDU_Error_printf
+ ("demux engine returned error when waiting for event\n");
goto fn_fail;
}
/* Check to see if there's any open read socket left; if there
* are, we will just wait for more events. */
sockets_open = 0;
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
if (partition->out != -1 || partition->err != -1) {
sockets_open++;
break;
@@ -50,7 +53,8 @@
* control device will take care of that. */
status = HYD_BSCI_Wait_for_completion();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("bootstrap server returned error when waiting for completion\n");
+ HYDU_Error_printf
+ ("bootstrap server returned error when waiting for completion\n");
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/control/utils/csiu.c
===================================================================
--- mpich2/trunk/src/pm/hydra/control/utils/csiu.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/control/utils/csiu.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -21,7 +21,9 @@
}
else {
gettimeofday(&now, NULL);
- time_left = (1000 * (handle.timeout.tv_sec - now.tv_sec + handle.start.tv_sec));
+ time_left =
+ (1000 *
+ (handle.timeout.tv_sec - now.tv_sec + handle.start.tv_sec));
if (time_left < 0)
time_left = 0;
}
Modified: mpich2/trunk/src/pm/hydra/demux/demux.c
===================================================================
--- mpich2/trunk/src/pm/hydra/demux/demux.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/demux/demux.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -44,7 +44,8 @@
}
HYD_Status HYD_DMX_Register_fd(int num_fds, int *fd, HYD_Event_t events,
- HYD_Status(*callback) (int fd, HYD_Event_t events))
+ HYD_Status(*callback) (int fd,
+ HYD_Event_t events))
{
HYD_DMXI_Callback_t *cb_element, *run;
int i;
@@ -60,7 +61,8 @@
}
}
- HYDU_MALLOC(cb_element, HYD_DMXI_Callback_t *, sizeof(HYD_DMXI_Callback_t), status);
+ HYDU_MALLOC(cb_element, HYD_DMXI_Callback_t *,
+ sizeof(HYD_DMXI_Callback_t), status);
cb_element->num_fds = num_fds;
HYDU_MALLOC(cb_element->fd, int *, num_fds * sizeof(int), status);
memcpy(cb_element->fd, fd, num_fds * sizeof(int));
@@ -132,7 +134,8 @@
HYDU_FUNC_ENTER();
- HYDU_MALLOC(pollfds, struct pollfd *, num_cb_fds * sizeof(struct pollfd), status);
+ HYDU_MALLOC(pollfds, struct pollfd *,
+ num_cb_fds * sizeof(struct pollfd), status);
run = cb_list;
i = 0;
@@ -185,7 +188,8 @@
status = run->callback(pollfds[i].fd, events);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("callback returned error status\n", errno);
+ HYDU_Error_printf("callback returned error status\n",
+ errno);
goto fn_fail;
}
}
Modified: mpich2/trunk/src/pm/hydra/demux/demux.h
===================================================================
--- mpich2/trunk/src/pm/hydra/demux/demux.h 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/demux/demux.h 2009-03-09 08:19:25 UTC (rev 3980)
@@ -10,7 +10,8 @@
#include "hydra.h"
HYD_Status HYD_DMX_Register_fd(int num_fds, int *fd, HYD_Event_t events,
- HYD_Status(*callback) (int fd, HYD_Event_t events));
+ HYD_Status(*callback) (int fd,
+ HYD_Event_t events));
HYD_Status HYD_DMX_Deregister_fd(int fd);
HYD_Status HYD_DMX_Wait_for_event(void);
HYD_Status HYD_DMX_Finalize(void);
Modified: mpich2/trunk/src/pm/hydra/include/hydra.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra.h 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/include/hydra.h 2009-03-09 08:19:25 UTC (rev 3980)
@@ -115,13 +115,13 @@
/* Each structure will contain all hosts/cores that use the same
* executable and environment. */
struct HYD_Proc_params {
- int exec_proc_count;
+ int exec_proc_count;
char *exec[HYD_EXEC_ARGS];
struct HYD_Partition_list {
- char * name;
- int proc_count;
- char ** mapping; /* Can be core IDs or something else */
+ char *name;
+ int proc_count;
+ char **mapping; /* Can be core IDs or something else */
/*
* The boot-strap server is expected to start a single
@@ -145,13 +145,13 @@
* 3. One proxy per physical node means that each
* partition will have a different group ID.
*/
- int group_id; /* Assumed to be in ascending order */
- int group_rank; /* Rank within the group */
- int pid;
- int out;
- int err;
- int exit_status;
- char * args[HYD_EXEC_ARGS];
+ int group_id; /* Assumed to be in ascending order */
+ int group_rank; /* Rank within the group */
+ int pid;
+ int out;
+ int err;
+ int exit_status;
+ char *args[HYD_EXEC_ARGS];
struct HYD_Partition_list *next;
} *partition;
Modified: mpich2/trunk/src/pm/hydra/include/hydra_env.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra_env.h 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/include/hydra_env.h 2009-03-09 08:19:25 UTC (rev 3980)
@@ -15,8 +15,9 @@
HYD_Env_t *HYDU_Env_found_in_list(HYD_Env_t * env_list, HYD_Env_t * env);
HYD_Status HYDU_Env_add_to_list(HYD_Env_t ** env_list, HYD_Env_t env);
HYD_Env_t *HYDU_Env_listdup(HYD_Env_t * env);
-HYD_Status HYDU_Env_create(HYD_Env_t ** env, char *env_name, char *env_value,
- HYD_Env_type_t env_type, int start);
+HYD_Status HYDU_Env_create(HYD_Env_t ** env, char *env_name,
+ char *env_value, HYD_Env_type_t env_type,
+ int start);
HYD_Status HYDU_Env_free(HYD_Env_t * env);
HYD_Status HYDU_Env_free_list(HYD_Env_t * env);
Modified: mpich2/trunk/src/pm/hydra/include/hydra_launch.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra_launch.h 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/include/hydra_launch.h 2009-03-09 08:19:25 UTC (rev 3980)
@@ -9,10 +9,12 @@
#include "hydra.h"
-HYD_Status HYDU_Append_env(HYD_Env_t * env_list, char **client_arg, int id);
+HYD_Status HYDU_Append_env(HYD_Env_t * env_list, char **client_arg,
+ int id);
HYD_Status HYDU_Append_exec(char **exec, char **client_arg);
HYD_Status HYDU_Append_wdir(char **client_arg);
HYD_Status HYDU_Allocate_Partition(struct HYD_Partition_list **partition);
-HYD_Status HYDU_Create_process(char **client_arg, int *in, int *out, int *err, int *pid);
+HYD_Status HYDU_Create_process(char **client_arg, int *in, int *out,
+ int *err, int *pid);
#endif /* HYDRA_LAUNCH_H_INCLUDED */
Modified: mpich2/trunk/src/pm/hydra/include/hydra_sock.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra_sock.h 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/include/hydra_sock.h 2009-03-09 08:19:25 UTC (rev 3980)
@@ -19,7 +19,8 @@
#define size_t unsigned int
#endif /* size_t */
-HYD_Status HYDU_Sock_listen(int *listen_fd, char *port_range, uint16_t * port);
+HYD_Status HYDU_Sock_listen(int *listen_fd, char *port_range,
+ uint16_t * port);
HYD_Status HYDU_Sock_connect(const char *host, uint16_t port, int *fd);
HYD_Status HYDU_Sock_accept(int listen_fd, int *fd);
HYD_Status HYDU_Sock_readline(int fd, char *buf, int maxlen, int *linelen);
Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/callback.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/callback.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/callback.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -20,14 +20,16 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stdout handler got an stdin event: %d\n", events);
+ HYDU_Error_printf("stdout handler got an stdin event: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
count = read(fd, buf, HYD_TMPBUF_SIZE);
if (count < 0) {
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -35,7 +37,8 @@
/* The connection has closed */
status = HYD_CSI_Close_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("socket close error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket close error on fd: %d (errno: %d)\n",
+ fd, errno);
goto fn_fail;
}
goto fn_exit;
@@ -43,7 +46,8 @@
count = write(1, buf, count);
if (count < 0) {
- HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -66,14 +70,16 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stderr handler got an stdin event: %d\n", events);
+ HYDU_Error_printf("stderr handler got an stdin event: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
count = read(fd, buf, HYD_TMPBUF_SIZE);
if (count < 0) {
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -81,7 +87,8 @@
/* The connection has closed */
status = HYD_CSI_Close_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("socket close error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket close error on fd: %d (errno: %d)\n",
+ fd, errno);
goto fn_fail;
}
goto fn_exit;
@@ -89,7 +96,8 @@
count = write(2, buf, count);
if (count < 0) {
- HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -111,7 +119,9 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stdin handler got a writeable event on local stdin: %d\n", events);
+ HYDU_Error_printf
+ ("stdin handler got a writeable event on local stdin: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -119,11 +129,15 @@
while (1) {
/* If we already have buffered data, send it out */
if (handle.stdin_buf_count) {
- count = write(handle.in, handle.stdin_tmp_buf + handle.stdin_buf_offset,
- handle.stdin_buf_count);
+ count =
+ write(handle.in,
+ handle.stdin_tmp_buf + handle.stdin_buf_offset,
+ handle.stdin_buf_count);
if (count < 0) {
/* We can't get an EAGAIN as we just got out of poll */
- HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", handle.in, errno);
+ HYDU_Error_printf
+ ("socket write error on fd: %d (errno: %d)\n",
+ handle.in, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -140,7 +154,8 @@
break;
}
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n",
+ fd, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -148,7 +163,9 @@
/* The connection has closed */
status = HYD_CSI_Close_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("socket close error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf
+ ("socket close error on fd: %d (errno: %d)\n", fd,
+ errno);
goto fn_fail;
}
break;
Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -17,26 +17,38 @@
static void usage(void)
{
printf("\n");
- printf("Usage: ./mpiexec [global opts] [exec1 local opts] : [exec2 local opts] : ...\n\n");
+ printf
+ ("Usage: ./mpiexec [global opts] [exec1 local opts] : [exec2 local opts] : ...\n\n");
printf("Global Options (passed to all executables):\n");
printf("\t-v/-vv/-vvv [Verbose level]\n");
- printf("\t--enable-x/--disable-x [Enable or disable X forwarding]\n");
- printf("\t-genv {name} {value} [Environment variable name and value]\n");
- printf("\t-genvlist {env1,env2,...} [Environment variable list to pass]\n");
- printf("\t-genvnone [Do not pass any environment variables]\n");
- printf("\t-genvall [Pass all environment variables (default)]\n");
+ printf
+ ("\t--enable-x/--disable-x [Enable or disable X forwarding]\n");
+ printf
+ ("\t-genv {name} {value} [Environment variable name and value]\n");
+ printf
+ ("\t-genvlist {env1,env2,...} [Environment variable list to pass]\n");
+ printf
+ ("\t-genvnone [Do not pass any environment variables]\n");
+ printf
+ ("\t-genvall [Pass all environment variables (default)]\n");
printf("\n");
printf("Local Options (passed to individual executables):\n");
printf("\t-n/-np {value} [Number of processes]\n");
- printf("\t-f {name} [File containing the host names]\n");
- printf("\t-env {name} {value} [Environment variable name and value]\n");
- printf("\t-envlist {env1,env2,...} [Environment variable list to pass]\n");
- printf("\t-envnone [Do not pass any environment variables]\n");
- printf("\t-envall [Pass all environment variables (default)]\n");
- printf("\t{exec_name} {args} [Name of the executable to run and its arguments]\n");
+ printf
+ ("\t-f {name} [File containing the host names]\n");
+ printf
+ ("\t-env {name} {value} [Environment variable name and value]\n");
+ printf
+ ("\t-envlist {env1,env2,...} [Environment variable list to pass]\n");
+ printf
+ ("\t-envnone [Do not pass any environment variables]\n");
+ printf
+ ("\t-envall [Pass all environment variables (default)]\n");
+ printf
+ ("\t{exec_name} {args} [Name of the executable to run and its arguments]\n");
printf("\n");
}
@@ -98,21 +110,25 @@
/* Launch the processes */
status = HYD_CSI_Launch_procs();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("control system returned error when launching processes\n");
+ HYDU_Error_printf
+ ("control system returned error when launching processes\n");
goto fn_fail;
}
/* Wait for their completion */
status = HYD_CSI_Wait_for_completion();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("control system returned error when waiting for process' completion\n");
+ HYDU_Error_printf
+ ("control system returned error when waiting for process' completion\n");
goto fn_fail;
}
/* Check for the exit status for all the processes */
exit_status = 0;
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next)
- for (partition = proc_params->partition; partition; partition = partition->next)
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next)
+ for (partition = proc_params->partition; partition;
+ partition = partition->next)
exit_status |= partition->exit_status;
/* Call finalize functions for lower layers to cleanup their resources */
Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -40,7 +40,8 @@
HYDU_FUNC_ENTER();
- HYDU_MALLOC(proc_params, struct HYD_Proc_params *, sizeof(struct HYD_Proc_params), status);
+ HYDU_MALLOC(proc_params, struct HYD_Proc_params *,
+ sizeof(struct HYD_Proc_params), status);
proc_params->exec_proc_count = 0;
proc_params->partition = NULL;
@@ -128,19 +129,23 @@
while (--argc && ++argv) {
/* Help options */
- if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help") || !strcmp(*argv, "-help")) {
+ if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help") ||
+ !strcmp(*argv, "-help")) {
/* Just return from this function; the main code will show the usage */
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
/* Check what debug level is requested */
- if (!strcmp(*argv, "-v") || !strcmp(*argv, "-vv") || !strcmp(*argv, "-vvv")) {
+ if (!strcmp(*argv, "-v") || !strcmp(*argv, "-vv") ||
+ !strcmp(*argv, "-vvv")) {
CHECK_LOCAL_PARAM_START(local_params_started, status);
/* Debug level already set */
if (handle.debug != -1) {
- HYDU_Error_printf("Duplicate debug level setting; previously set to %d\n", handle.debug);
+ HYDU_Error_printf
+ ("Duplicate debug level setting; previously set to %d\n",
+ handle.debug);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -161,7 +166,9 @@
/* X forwarding already enabled or disabled */
if (handle.enablex != -1) {
- HYDU_Error_printf("Duplicate enable-x setting; previously set to %d\n", handle.enablex);
+ HYDU_Error_printf
+ ("Duplicate enable-x setting; previously set to %d\n",
+ handle.enablex);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -171,12 +178,15 @@
}
/* Check what all environment variables need to be propagated */
- if (!strcmp(*argv, "-genvall") || !strcmp(*argv, "-genvnone") || !strcmp(*argv, "-genvlist")) {
+ if (!strcmp(*argv, "-genvall") || !strcmp(*argv, "-genvnone") ||
+ !strcmp(*argv, "-genvlist")) {
CHECK_LOCAL_PARAM_START(local_params_started, status);
/* propagation already set */
if (handle.prop != HYD_ENV_PROP_UNSET) {
- HYDU_Error_printf("Duplicate propagation setting; previously set to %d\n", handle.prop);
+ HYDU_Error_printf
+ ("Duplicate propagation setting; previously set to %d\n",
+ handle.prop);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -195,7 +205,9 @@
if (env_name == NULL)
break;
- status = HYDU_Env_create(&env, env_name, NULL, HYD_ENV_STATIC, 0);
+ status =
+ HYDU_Env_create(&env, env_name, NULL,
+ HYD_ENV_STATIC, 0);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to create env struct\n");
goto fn_fail;
@@ -212,19 +224,22 @@
}
/* Check what all environment variables need to be propagated */
- if (!strcmp(*argv, "-envall") || !strcmp(*argv, "-envnone") || !strcmp(*argv, "-envlist")) {
+ if (!strcmp(*argv, "-envall") || !strcmp(*argv, "-envnone") ||
+ !strcmp(*argv, "-envlist")) {
local_params_started = 1;
status = get_current_proc_params(&proc_params);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("get_current_proc_params returned error\n");
+ HYDU_Error_printf
+ ("get_current_proc_params returned error\n");
goto fn_fail;
}
/* propagation already set */
if (proc_params->prop != HYD_ENV_PROP_UNSET) {
- HYDU_Error_printf("Duplicate propagation setting; previously set to %d\n",
- proc_params->prop);
+ HYDU_Error_printf
+ ("Duplicate propagation setting; previously set to %d\n",
+ proc_params->prop);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -243,13 +258,16 @@
if (env_name == NULL)
break;
- status = HYDU_Env_create(&env, env_name, NULL, HYD_ENV_STATIC, 0);
+ status =
+ HYDU_Env_create(&env, env_name, NULL,
+ HYD_ENV_STATIC, 0);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to create env struct\n");
goto fn_fail;
}
- status = HYDU_Env_add_to_list(&proc_params->prop_env, *env);
+ status =
+ HYDU_Env_add_to_list(&proc_params->prop_env, *env);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to add env to list\n");
goto fn_fail;
@@ -270,7 +288,9 @@
CHECK_NEXT_ARG_VALID(status);
env_value = MPIU_Strdup(*argv);
- status = HYDU_Env_create(&env, env_name, env_value, HYD_ENV_STATIC, 0);
+ status =
+ HYDU_Env_create(&env, env_name, env_value, HYD_ENV_STATIC,
+ 0);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to create env struct\n");
goto fn_fail;
@@ -283,7 +303,8 @@
status = get_current_proc_params(&proc_params);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("get_current_proc_params returned error\n");
+ HYDU_Error_printf
+ ("get_current_proc_params returned error\n");
goto fn_fail;
}
@@ -307,14 +328,16 @@
status = get_current_proc_params(&proc_params);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("get_current_proc_params returned error\n");
+ HYDU_Error_printf
+ ("get_current_proc_params returned error\n");
goto fn_fail;
}
/* Num_procs already set */
if (proc_params->exec_proc_count != 0) {
- HYDU_Error_printf("Duplicate setting for number of processes; previously set to %d\n",
- proc_params->exec_proc_count);
+ HYDU_Error_printf
+ ("Duplicate setting for number of processes; previously set to %d\n",
+ proc_params->exec_proc_count);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -345,7 +368,8 @@
if (!strcmp(*argv, ":")) { /* Next executable */
status = allocate_proc_params(&proc_params->next);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("allocate_proc_params returned error\n");
+ HYDU_Error_printf
+ ("allocate_proc_params returned error\n");
goto fn_fail;
}
break;
@@ -379,7 +403,8 @@
if (handle.wdir == NULL) {
HYDU_MALLOC(handle.wdir, char *, HYDRA_MAX_PATH, status);
if (getcwd(handle.wdir, HYDRA_MAX_PATH) == NULL) {
- HYDU_Error_printf("allocated space is too small for absolute path\n");
+ HYDU_Error_printf
+ ("allocated space is too small for absolute path\n");
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -23,7 +23,8 @@
if (strcmp(handle.host_file, "HYDRA_USE_LOCALHOST")) {
fp = fopen(handle.host_file, "r");
if (fp == NULL) {
- HYDU_Error_printf("unable to open host file %s\n", handle.host_file);
+ HYDU_Error_printf("unable to open host file %s\n",
+ handle.host_file);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -34,14 +35,16 @@
if (!strcmp(handle.host_file, "HYDRA_USE_LOCALHOST")) {
HYDU_Allocate_Partition(&proc_params->partition);
proc_params->partition->name = MPIU_Strdup("localhost");
- proc_params->partition->proc_count = proc_params->exec_proc_count;
+ proc_params->partition->proc_count =
+ proc_params->exec_proc_count;
total_procs = proc_params->exec_proc_count;
}
else {
total_procs = 0;
while (!feof(fp)) {
if ((fscanf(fp, "%s", line) < 0) && errno) {
- HYDU_Error_printf("unable to read input line (errno: %d)\n", errno);
+ HYDU_Error_printf
+ ("unable to read input line (errno: %d)\n", errno);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -52,16 +55,18 @@
procs = strtok(NULL, ":");
num_procs = procs ? atoi(procs) : 1;
- if (num_procs > (proc_params->exec_proc_count - total_procs))
- num_procs = (proc_params->exec_proc_count - total_procs);
+ if (num_procs >
+ (proc_params->exec_proc_count - total_procs))
+ num_procs =
+ (proc_params->exec_proc_count - total_procs);
if (!proc_params->partition) {
HYDU_Allocate_Partition(&proc_params->partition);
partition = proc_params->partition;
}
else {
- for (partition = proc_params->partition; partition->next;
- partition = partition->next);
+ for (partition = proc_params->partition;
+ partition->next; partition = partition->next);
HYDU_Allocate_Partition(&partition->next);
partition = partition->next;
}
@@ -80,7 +85,8 @@
}
if (proc_params) {
- HYDU_Error_printf("Not enough number of hosts in host file: %s\n", handle.host_file);
+ HYDU_Error_printf("Not enough number of hosts in host file: %s\n",
+ handle.host_file);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -105,7 +111,8 @@
HYDU_FUNC_ENTER();
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
for (partition = proc_params->partition; partition;) {
HYDU_FREE(partition->name);
if (partition->mapping) {
@@ -151,7 +158,8 @@
if (proc_params->prop == HYD_ENV_PROP_ALL) {
proc_params->prop_env = HYDU_Env_listdup(handle.global_env);
for (env = proc_params->user_env; env; env = env->next) {
- status = HYDU_Env_add_to_list(&proc_params->prop_env, *env);
+ status =
+ HYDU_Env_add_to_list(&proc_params->prop_env, *env);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to add env to list\n");
goto fn_fail;
@@ -202,8 +210,10 @@
HYDU_FUNC_ENTER();
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
HYDU_FREE(partition->out);
HYDU_FREE(partition->err);
}
Modified: mpich2/trunk/src/pm/hydra/pm/central/central_cb.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/central_cb.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/central_cb.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -55,20 +55,25 @@
if (fd == HYD_PMCD_Central_listenfd) { /* Someone is trying to connect to us */
status = HYDU_Sock_accept(fd, &accept_fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when accepting connection\n");
+ HYDU_Error_printf
+ ("sock utils returned error when accepting connection\n");
goto fn_fail;
}
- status = HYD_DMX_Register_fd(1, &accept_fd, HYD_STDOUT, HYD_PMCD_Central_cb);
+ status =
+ HYD_DMX_Register_fd(1, &accept_fd, HYD_STDOUT,
+ HYD_PMCD_Central_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
}
else {
status = HYDU_Sock_readline(fd, buf, HYD_TMPBUF_SIZE, &linelen);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when reading PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when reading PMI line\n");
goto fn_fail;
}
@@ -137,7 +142,9 @@
}
else {
/* We don't understand the command */
- HYDU_Error_printf("Unrecognized PMI command: %s; cleaning up processes\n", cmd);
+ HYDU_Error_printf
+ ("Unrecognized PMI command: %s; cleaning up processes\n",
+ cmd);
/* Cleanup all the processes and return. We don't need to
* check the return status since we are anyway returning
Modified: mpich2/trunk/src/pm/hydra/pm/central/central_finalize.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/central_finalize.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/central_finalize.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -23,7 +23,8 @@
* it. */
status = HYD_DMX_Deregister_fd(HYD_PMCD_Central_listenfd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when deregistering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when deregistering fd\n");
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/pm/central/central_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/central_launch.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/central_launch.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -59,32 +59,40 @@
port_range = getenv("MPICH_PORT_RANGE");
/* Listen on a port in the port range */
- status = HYDU_Sock_listen(&HYD_PMCD_Central_listenfd, port_range, &port);
+ status =
+ HYDU_Sock_listen(&HYD_PMCD_Central_listenfd, port_range, &port);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("sock utils returned listen error\n");
goto fn_fail;
}
/* Register the listening socket with the demux engine */
- status = HYD_DMX_Register_fd(1, &HYD_PMCD_Central_listenfd, HYD_STDOUT, HYD_PMCD_Central_cb);
+ status =
+ HYD_DMX_Register_fd(1, &HYD_PMCD_Central_listenfd, HYD_STDOUT,
+ HYD_PMCD_Central_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error for registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error for registering fd\n");
goto fn_fail;
}
/* Create a port string for MPI processes to use to connect to */
if (gethostname(hostname, MAX_HOSTNAME_LEN) < 0) {
- HYDU_Error_printf("gethostname error (hostname: %s; errno: %d)\n", hostname, errno);
+ HYDU_Error_printf("gethostname error (hostname: %s; errno: %d)\n",
+ hostname, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
HYDU_Int_to_str(port, sport, status);
- HYDU_MALLOC(port_str, char *, strlen(hostname) + 1 + strlen(sport) + 1, status);
- MPIU_Snprintf(port_str, strlen(hostname) + 1 + strlen(sport) + 1, "%s:%s", hostname, sport);
+ HYDU_MALLOC(port_str, char *, strlen(hostname) + 1 + strlen(sport) + 1,
+ status);
+ MPIU_Snprintf(port_str, strlen(hostname) + 1 + strlen(sport) + 1,
+ "%s:%s", hostname, sport);
HYDU_FREE(sport);
- status = HYDU_Env_create(&env, "PMI_PORT", port_str, HYD_ENV_STATIC, 0);
+ status =
+ HYDU_Env_create(&env, "PMI_PORT", port_str, HYD_ENV_STATIC, 0);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to create env\n");
goto fn_fail;
@@ -113,7 +121,8 @@
* comm_world */
status = HYD_PMCU_Create_pg();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("pm utils returned error creating process group\n");
+ HYDU_Error_printf
+ ("pm utils returned error creating process group\n");
goto fn_fail;
}
@@ -121,16 +130,18 @@
* be used -- we just break the partition list to multiple
* segments, one for each process and call the application
* executable directly. */
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
group_id = 0;
for (partition = proc_params->partition; partition;) {
- next_partition = partition->next; /* Keep track of the next partition */
+ next_partition = partition->next; /* Keep track of the next partition */
partition->group_id = group_id++;
partition->group_rank = 0;
run = partition;
- for (process_id = 1; process_id < partition->proc_count; process_id++) {
+ for (process_id = 1; process_id < partition->proc_count;
+ process_id++) {
HYDU_Allocate_Partition(&run->next);
run = run->next;
@@ -148,8 +159,10 @@
/* Create the arguments list for each proxy */
process_id = 0;
- for (proc_params = handle.proc_params; proc_params; proc_params = proc_params->next) {
- for (partition = proc_params->partition; partition; partition = partition->next) {
+ for (proc_params = handle.proc_params; proc_params;
+ proc_params = proc_params->next) {
+ for (partition = proc_params->partition; partition;
+ partition = partition->next) {
/* Setup the executable arguments */
arg = 0;
partition->args[arg++] = MPIU_Strdup("sh");
@@ -157,8 +170,10 @@
partition->args[arg++] = MPIU_Strdup("\"");
partition->args[arg++] = NULL;
- HYDU_Append_env(handle.system_env, partition->args, process_id);
- HYDU_Append_env(proc_params->prop_env, partition->args, process_id);
+ HYDU_Append_env(handle.system_env, partition->args,
+ process_id);
+ HYDU_Append_env(proc_params->prop_env, partition->args,
+ process_id);
HYDU_Append_wdir(partition->args);
HYDU_Append_exec(proc_params->exec, partition->args);
@@ -174,7 +189,8 @@
* processes. */
status = HYD_BSCI_Launch_procs();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("bootstrap server returned error launching processes\n");
+ HYDU_Error_printf
+ ("bootstrap server returned error launching processes\n");
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/pm/central/proxy.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/proxy.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/proxy.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -42,9 +42,12 @@
}
/* Register the listening socket with the demux engine */
- status = HYD_DMX_Register_fd(1, &HYD_Proxy_listenfd, HYD_STDOUT, HYD_Proxy_listen_cb);
+ status =
+ HYD_DMX_Register_fd(1, &HYD_Proxy_listenfd, HYD_STDOUT,
+ HYD_Proxy_listen_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error for registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error for registering fd\n");
goto fn_fail;
}
@@ -56,19 +59,25 @@
* local processes. That is, we can only have a single-level
* hierarchy of proxies. */
- HYDU_MALLOC(HYD_Proxy_params.out, int *, HYD_Proxy_params.proc_count * sizeof(int), status);
- HYDU_MALLOC(HYD_Proxy_params.err, int *, HYD_Proxy_params.proc_count * sizeof(int), status);
+ HYDU_MALLOC(HYD_Proxy_params.out, int *,
+ HYD_Proxy_params.proc_count * sizeof(int), status);
+ HYDU_MALLOC(HYD_Proxy_params.err, int *,
+ HYD_Proxy_params.proc_count * sizeof(int), status);
/* Spawn the processes */
for (i = 0; i < HYD_Proxy_params.proc_count; i++) {
if ((i & HYD_Proxy_params.pmi_id) == 0) {
- status = HYDU_Create_process(HYD_Proxy_params.args, &HYD_Proxy_params.in,
- &HYD_Proxy_params.out[i], &HYD_Proxy_params.err[i],
- &HYD_Proxy_params.pid[i]);
+ status =
+ HYDU_Create_process(HYD_Proxy_params.args,
+ &HYD_Proxy_params.in,
+ &HYD_Proxy_params.out[i],
+ &HYD_Proxy_params.err[i],
+ &HYD_Proxy_params.pid[i]);
}
else {
status = HYDU_Create_process(HYD_Proxy_params.args, NULL,
- &HYD_Proxy_params.out[i], &HYD_Proxy_params.err[i],
+ &HYD_Proxy_params.out[i],
+ &HYD_Proxy_params.err[i],
&HYD_Proxy_params.pid[i]);
}
if (status != HYD_SUCCESS) {
@@ -78,16 +87,22 @@
}
/* Everything is spawned, now wait for I/O */
- status = HYD_DMX_Register_fd(HYD_Proxy_params.proc_count, HYD_Proxy_params.out,
- HYD_STDOUT, HYD_Proxy_stdout_cb);
+ status =
+ HYD_DMX_Register_fd(HYD_Proxy_params.proc_count,
+ HYD_Proxy_params.out, HYD_STDOUT,
+ HYD_Proxy_stdout_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
- status = HYD_DMX_Register_fd(HYD_Proxy_params.proc_count, HYD_Proxy_params.err,
- HYD_STDOUT, HYD_Proxy_stderr_cb);
+ status =
+ HYD_DMX_Register_fd(HYD_Proxy_params.proc_count,
+ HYD_Proxy_params.err, HYD_STDOUT,
+ HYD_Proxy_stderr_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/pm/central/proxy.h
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/proxy.h 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/proxy.h 2009-03-09 08:19:25 UTC (rev 3980)
@@ -16,9 +16,9 @@
char *args[HYD_EXEC_ARGS];
struct HYD_Partition_list *partition;
- int * pid;
- int * out;
- int * err;
+ int *pid;
+ int *out;
+ int *err;
int in;
int stdin_buf_offset;
@@ -29,7 +29,7 @@
extern struct HYD_Proxy_params HYD_Proxy_params;
extern int HYD_Proxy_listenfd;
-HYD_Status HYD_Proxy_get_params(int t_argc, char ** t_argv);
+HYD_Status HYD_Proxy_get_params(int t_argc, char **t_argv);
HYD_Status HYD_Proxy_listen_cb(int fd, HYD_Event_t events);
HYD_Status HYD_Proxy_stdout_cb(int fd, HYD_Event_t events);
HYD_Status HYD_Proxy_stderr_cb(int fd, HYD_Event_t events);
Modified: mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -24,28 +24,34 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stdout handler got an stdin event: %d\n", events);
+ HYDU_Error_printf("stdout handler got an stdin event: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
- if (fd == HYD_Proxy_listenfd) { /* mpiexec is trying to connect */
+ if (fd == HYD_Proxy_listenfd) { /* mpiexec is trying to connect */
status = HYDU_Sock_accept(fd, &accept_fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when accepting connection\n");
+ HYDU_Error_printf
+ ("sock utils returned error when accepting connection\n");
goto fn_fail;
}
- status = HYD_DMX_Register_fd(1, &accept_fd, HYD_STDOUT, HYD_Proxy_listen_cb);
+ status =
+ HYD_DMX_Register_fd(1, &accept_fd, HYD_STDOUT,
+ HYD_Proxy_listen_cb);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when registering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when registering fd\n");
goto fn_fail;
}
}
- else { /* We got a command from mpiexec */
+ else { /* We got a command from mpiexec */
count = read(fd, &cmd, HYD_TMPBUF_SIZE);
if (count < 0) {
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n",
+ fd, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -53,13 +59,14 @@
/* The connection has closed */
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when deregistering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when deregistering fd\n");
goto fn_fail;
}
goto fn_exit;
}
- if (cmd == KILLALL_PROCS) { /* Got the killall command */
+ if (cmd == KILLALL_PROCS) { /* Got the killall command */
for (i = 0; i < HYD_Proxy_params.proc_count; i++)
kill(HYD_Proxy_params.pid[i], SIGKILL);
}
@@ -88,14 +95,16 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stdout handler got an stdin event: %d\n", events);
+ HYDU_Error_printf("stdout handler got an stdin event: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
count = read(fd, buf, HYD_TMPBUF_SIZE);
if (count < 0) {
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -103,7 +112,8 @@
/* The connection has closed */
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when deregistering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when deregistering fd\n");
goto fn_fail;
}
goto fn_exit;
@@ -111,7 +121,8 @@
count = write(1, buf, count);
if (count < 0) {
- HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -134,14 +145,16 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stderr handler got an stdin event: %d\n", events);
+ HYDU_Error_printf("stderr handler got an stdin event: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
count = read(fd, buf, HYD_TMPBUF_SIZE);
if (count < 0) {
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -149,7 +162,8 @@
/* The connection has closed */
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when deregistering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when deregistering fd\n");
goto fn_fail;
}
goto fn_exit;
@@ -157,7 +171,8 @@
count = write(2, buf, count);
if (count < 0) {
- HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -179,7 +194,9 @@
HYDU_FUNC_ENTER();
if (events & HYD_STDIN) {
- HYDU_Error_printf("stdin handler got a writeable event on local stdin: %d\n", events);
+ HYDU_Error_printf
+ ("stdin handler got a writeable event on local stdin: %d\n",
+ events);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
@@ -187,12 +204,16 @@
while (1) {
/* If we already have buffered data, send it out */
if (HYD_Proxy_params.stdin_buf_count) {
- count = write(HYD_Proxy_params.in, HYD_Proxy_params.stdin_tmp_buf +
- HYD_Proxy_params.stdin_buf_offset, HYD_Proxy_params.stdin_buf_count);
+ count =
+ write(HYD_Proxy_params.in,
+ HYD_Proxy_params.stdin_tmp_buf +
+ HYD_Proxy_params.stdin_buf_offset,
+ HYD_Proxy_params.stdin_buf_count);
if (count < 0) {
/* We can't get an EAGAIN as we just got out of poll */
- HYDU_Error_printf("socket write error on fd: %d (errno: %d)\n",
- HYD_Proxy_params.in, errno);
+ HYDU_Error_printf
+ ("socket write error on fd: %d (errno: %d)\n",
+ HYD_Proxy_params.in, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -209,7 +230,8 @@
break;
}
- HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("socket read error on fd: %d (errno: %d)\n",
+ fd, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -217,7 +239,8 @@
/* The connection has closed */
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("demux engine returned error when deregistering fd\n");
+ HYDU_Error_printf
+ ("demux engine returned error when deregistering fd\n");
goto fn_fail;
}
break;
Modified: mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -59,7 +59,8 @@
if (!HYD_Proxy_params.partition)
HYD_Proxy_params.partition = partition;
else {
- for (run = HYD_Proxy_params.partition; run->next; run = run->next);
+ for (run = HYD_Proxy_params.partition; run->next;
+ run = run->next);
run->next = partition;
}
continue;
Modified: mpich2/trunk/src/pm/hydra/pm/utils/pmi.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/utils/pmi.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/pm/utils/pmi.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -19,8 +19,10 @@
HYDU_FUNC_ENTER();
- HYDU_MALLOC(*kvs, HYD_PMCU_pmi_kvs_t *, sizeof(HYD_PMCU_pmi_kvs_t), status);
- MPIU_Snprintf((*kvs)->kvs_name, MAXNAMELEN, "kvs_%d_%d", (int) getpid(), pgid);
+ HYDU_MALLOC(*kvs, HYD_PMCU_pmi_kvs_t *, sizeof(HYD_PMCU_pmi_kvs_t),
+ status);
+ MPIU_Snprintf((*kvs)->kvs_name, MAXNAMELEN, "kvs_%d_%d",
+ (int) getpid(), pgid);
(*kvs)->key_pair = NULL;
fn_exit:
@@ -38,7 +40,8 @@
HYDU_FUNC_ENTER();
- HYDU_MALLOC(*pg, HYD_PMCU_pmi_pg_t *, sizeof(HYD_PMCU_pmi_pg_t), status);
+ HYDU_MALLOC(*pg, HYD_PMCU_pmi_pg_t *, sizeof(HYD_PMCU_pmi_pg_t),
+ status);
(*pg)->id = pgid;
(*pg)->num_procs = 0;
(*pg)->barrier_count = 0;
@@ -69,7 +72,8 @@
HYDU_FUNC_ENTER();
- HYDU_MALLOC(process, HYD_PMCU_pmi_process_t *, sizeof(HYD_PMCU_pmi_process_t), status);
+ HYDU_MALLOC(process, HYD_PMCU_pmi_process_t *,
+ sizeof(HYD_PMCU_pmi_process_t), status);
process->fd = fd;
process->pg = pg;
process->next = NULL;
@@ -162,7 +166,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(ssize);
@@ -205,17 +210,20 @@
if (pmi_version == 1 && pmi_subversion <= 1) {
/* We support PMI v1.0 and 1.1 */
- tmp[0] = "cmd=response_to_init pmi_version=1 pmi_subversion=1 rc=0\n";
+ tmp[0] =
+ "cmd=response_to_init pmi_version=1 pmi_subversion=1 rc=0\n";
status = HYDU_Sock_writeline(fd, tmp[0], strlen(tmp[0]));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
}
else {
/* PMI version mismatch */
- HYDU_Error_printf("got a pmi version mismatch; pmi_version: %d; pmi_subversion: %d\n",
- pmi_version, pmi_subversion);
+ HYDU_Error_printf
+ ("got a pmi version mismatch; pmi_version: %d; pmi_subversion: %d\n",
+ pmi_version, pmi_subversion);
goto fn_fail;
}
@@ -254,7 +262,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(cmd);
@@ -321,7 +330,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(cmd);
@@ -350,7 +360,8 @@
process = find_process(fd);
if (process == NULL) { /* We didn't find the process */
status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("could not find the process structure for fd %d\n", fd);
+ HYDU_Error_printf
+ ("could not find the process structure for fd %d\n", fd);
goto fn_fail;
}
@@ -363,7 +374,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(cmd);
@@ -390,7 +402,8 @@
process = find_process(fd);
if (process == NULL) { /* We didn't find the process */
status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("could not find the process structure for fd %d\n", fd);
+ HYDU_Error_printf
+ ("could not find the process structure for fd %d\n", fd);
goto fn_fail;
}
@@ -404,7 +417,8 @@
while (run) {
status = HYDU_Sock_writeline(run->fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
run = run->next;
@@ -444,18 +458,21 @@
process = find_process(fd);
if (process == NULL) { /* We didn't find the process */
status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("could not find the process structure for fd %d\n", fd);
+ HYDU_Error_printf
+ ("could not find the process structure for fd %d\n", fd);
goto fn_fail;
}
if (strcmp(process->pg->kvs->kvs_name, kvsname)) {
status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("kvsname (%s) does not match this process' kvs space (%s)\n",
- kvsname, process->pg->kvs->kvs_name);
+ HYDU_Error_printf
+ ("kvsname (%s) does not match this process' kvs space (%s)\n",
+ kvsname, process->pg->kvs->kvs_name);
goto fn_fail;
}
- HYDU_MALLOC(key_pair, HYD_PMCU_pmi_kvs_pair_t *, sizeof(HYD_PMCU_pmi_kvs_pair_t), status);
+ HYDU_MALLOC(key_pair, HYD_PMCU_pmi_kvs_pair_t *,
+ sizeof(HYD_PMCU_pmi_kvs_pair_t), status);
MPIU_Snprintf(key_pair->key, MAXKEYLEN, "%s", key);
MPIU_Snprintf(key_pair->val, MAXVALLEN, "%s", val);
key_pair->next = NULL;
@@ -486,7 +503,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(cmd);
@@ -521,14 +539,16 @@
process = find_process(fd);
if (process == NULL) { /* We didn't find the process */
status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("could not find the process structure for fd %d\n", fd);
+ HYDU_Error_printf
+ ("could not find the process structure for fd %d\n", fd);
goto fn_fail;
}
if (strcmp(process->pg->kvs->kvs_name, kvsname)) {
status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("kvsname (%s) does not match this process' kvs space (%s)\n",
- kvsname, process->pg->kvs->kvs_name);
+ HYDU_Error_printf
+ ("kvsname (%s) does not match this process' kvs space (%s)\n",
+ kvsname, process->pg->kvs->kvs_name);
goto fn_fail;
}
@@ -562,7 +582,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(cmd);
@@ -587,7 +608,8 @@
cmd = "cmd=finalize_ack\n";
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
@@ -610,7 +632,8 @@
status = HYD_BSCI_Get_universe_size(&usize);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("Unable to get universe size from the bootstrap server\n");
+ HYDU_Error_printf
+ ("Unable to get universe size from the bootstrap server\n");
goto fn_fail;
}
@@ -625,7 +648,8 @@
HYDU_STR_ALLOC_AND_JOIN(tmp, cmd, status);
status = HYDU_Sock_writeline(fd, cmd, strlen(cmd));
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("sock utils returned error when writing PMI line\n");
+ HYDU_Error_printf
+ ("sock utils returned error when writing PMI line\n");
goto fn_fail;
}
HYDU_FREE(cmd);
@@ -639,7 +663,8 @@
}
-static HYD_Status free_pmi_process_list(HYD_PMCU_pmi_process_t * process_list)
+static HYD_Status free_pmi_process_list(HYD_PMCU_pmi_process_t *
+ process_list)
{
HYD_PMCU_pmi_process_t *process, *tmp;
HYD_Status status = HYD_SUCCESS;
Modified: mpich2/trunk/src/pm/hydra/utils/env/env.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/env/env.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/utils/env/env.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -32,7 +32,8 @@
status = HYDU_Env_add_to_list(env_list, *env);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("launcher returned error adding env to list\n");
+ HYDU_Error_printf
+ ("launcher returned error adding env to list\n");
goto fn_fail;
}
HYDU_Env_free(env);
@@ -204,8 +205,9 @@
}
-HYD_Status HYDU_Env_create(HYD_Env_t ** env, char *env_name, char *env_value,
- HYD_Env_type_t env_type, int start)
+HYD_Status HYDU_Env_create(HYD_Env_t ** env, char *env_name,
+ char *env_value, HYD_Env_type_t env_type,
+ int start)
{
HYD_Status status = HYD_SUCCESS;
Modified: mpich2/trunk/src/pm/hydra/utils/launch/allocate.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/launch/allocate.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/utils/launch/allocate.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -10,14 +10,14 @@
HYD_Handle handle;
-HYD_Status HYDU_Allocate_Partition(struct HYD_Partition_list ** partition)
+HYD_Status HYDU_Allocate_Partition(struct HYD_Partition_list **partition)
{
HYD_Status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
- HYDU_MALLOC(*partition, struct HYD_Partition_list *, sizeof(struct HYD_Partition_list),
- status);
+ HYDU_MALLOC(*partition, struct HYD_Partition_list *,
+ sizeof(struct HYD_Partition_list), status);
(*partition)->name = NULL;
(*partition)->proc_count = 0;
(*partition)->mapping = NULL;
Modified: mpich2/trunk/src/pm/hydra/utils/launch/launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/launch/launch.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/utils/launch/launch.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -10,7 +10,8 @@
HYD_Handle handle;
-HYD_Status HYDU_Create_process(char **client_arg, int *in, int *out, int *err, int *pid)
+HYD_Status HYDU_Create_process(char **client_arg, int *in, int *out,
+ int *err, int *pid)
{
int inpipe[2], outpipe[2], errpipe[2], arg, tpid;
HYD_Status status = HYD_SUCCESS;
@@ -68,7 +69,9 @@
if (chdir(handle.wdir) < 0) {
if (chdir(getenv("HOME")) < 0) {
- HYDU_Error_printf("unable to set working directory to %s\n", handle.wdir);
+ HYDU_Error_printf
+ ("unable to set working directory to %s\n",
+ handle.wdir);
status = HYD_INTERNAL_ERROR;
goto fn_fail;
}
Modified: mpich2/trunk/src/pm/hydra/utils/sock/sock.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/sock/sock.c 2009-03-09 08:17:32 UTC (rev 3979)
+++ mpich2/trunk/src/pm/hydra/utils/sock/sock.c 2009-03-09 08:19:25 UTC (rev 3980)
@@ -7,7 +7,8 @@
#include "hydra_sock.h"
#include "hydra_dbg.h"
-HYD_Status HYDU_Sock_listen(int *listen_fd, char *port_range, uint16_t * port)
+HYD_Status HYDU_Sock_listen(int *listen_fd, char *port_range,
+ uint16_t * port)
{
struct sockaddr_in sa;
int one = 1;
@@ -46,13 +47,17 @@
*listen_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (*listen_fd < 0) {
- HYDU_Error_printf("unable to create a stream socket (errno: %d)\n", errno);
+ HYDU_Error_printf("unable to create a stream socket (errno: %d)\n",
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
- if (setsockopt(*listen_fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) < 0) {
- HYDU_Error_printf("unable to set the TCP_NODELAY socket option (errno: %d)\n", errno);
+ if (setsockopt(*listen_fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int))
+ < 0) {
+ HYDU_Error_printf
+ ("unable to set the TCP_NODELAY socket option (errno: %d)\n",
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -69,7 +74,9 @@
* port. Otherwise, it's an error. */
if (errno != EADDRINUSE) {
status = HYD_SOCK_ERROR;
- HYDU_Error_printf("unable to bind listen socket %d (errno: %d)\n", *listen_fd, errno);
+ HYDU_Error_printf
+ ("unable to bind listen socket %d (errno: %d)\n",
+ *listen_fd, errno);
goto fn_fail;
}
}
@@ -86,7 +93,8 @@
status = HYDU_Sock_set_cloexec(*listen_fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("unable to set fd %d to close on exec\n", *listen_fd);
+ HYDU_Error_printf("unable to set fd %d to close on exec\n",
+ *listen_fd);
goto fn_fail;
}
@@ -128,7 +136,8 @@
/* Get the remote host's IP address */
ht = gethostbyname(host);
if (ht == NULL) {
- HYDU_Error_printf("unable to get host address: %s (errno: %d)\n", host, errno);
+ HYDU_Error_printf("unable to get host address: %s (errno: %d)\n",
+ host, errno);
status = HYD_INVALID_PARAM;
goto fn_fail;
}
@@ -137,13 +146,16 @@
/* Create a socket and set the required options */
*fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (*fd < 0) {
- HYDU_Error_printf("unable to create a stream socket (errno: %d)\n", errno);
+ HYDU_Error_printf("unable to create a stream socket (errno: %d)\n",
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
if (setsockopt(*fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(int)) < 0) {
- HYDU_Error_printf("unable to set the SO_REUSEADDR socket option (errno: %d)\n", errno);
+ HYDU_Error_printf
+ ("unable to set the SO_REUSEADDR socket option (errno: %d)\n",
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -183,7 +195,8 @@
*fd = accept(listen_fd, 0, 0);
if (*fd < 0) {
- HYDU_Error_printf("accept error on socket %d (errno: %d)\n", listen_fd, errno);
+ HYDU_Error_printf("accept error on socket %d (errno: %d)\n",
+ listen_fd, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -231,7 +244,8 @@
if (errno == EINTR)
continue;
- HYDU_Error_printf("error reading from socket %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("error reading from socket %d (errno: %d)\n",
+ fd, errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -276,7 +290,8 @@
} while (*count < 0 && errno == EINTR);
if (*count < 0) {
- HYDU_Error_printf("error reading from socket %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("error reading from socket %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -308,7 +323,8 @@
} while (n < 0 && errno == EINTR);
if (n < maxsize) {
- HYDU_Error_printf("error writing to socket %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("error writing to socket %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
@@ -334,7 +350,8 @@
} while (n < 0 && errno == EINTR);
if (n < maxsize) {
- HYDU_Error_printf("error writing to socket %d (errno: %d)\n", fd, errno);
+ HYDU_Error_printf("error writing to socket %d (errno: %d)\n", fd,
+ errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
More information about the mpich2-commits
mailing list