[mpich2-commits] r4043 - in mpich2/trunk/src/pm/hydra: . include pm/central utils/sock
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Thu Mar 12 17:13:20 CDT 2009
Author: balaji
Date: 2009-03-12 17:13:20 -0500 (Thu, 12 Mar 2009)
New Revision: 4043
Modified:
mpich2/trunk/src/pm/hydra/configure.in
mpich2/trunk/src/pm/hydra/include/hydra_base.h
mpich2/trunk/src/pm/hydra/pm/central/central_cb.c
mpich2/trunk/src/pm/hydra/utils/sock/sock.c
Log:
Some of the messages that were showing up as errors were really
warnings. This happens when the launcher tries to kill the processes, but
the bootstrap server has already passed the signal to kill the processes
(e.g., ssh has such problems where the signal management is not reliable).
Modified: mpich2/trunk/src/pm/hydra/configure.in
===================================================================
--- mpich2/trunk/src/pm/hydra/configure.in 2009-03-12 21:58:55 UTC (rev 4042)
+++ mpich2/trunk/src/pm/hydra/configure.in 2009-03-12 22:13:20 UTC (rev 4043)
@@ -119,6 +119,16 @@
fi
AC_SUBST(EXTRA_CFLAGS)
+dnl Warning messages
+AC_ARG_ENABLE(g, [ --enable-warnings Enable warnings],
+ [ WARNINGS=$enableval ],
+ [ WARNINGS=no ])
+AC_MSG_CHECKING(warnings)
+AC_MSG_RESULT($WARNINGS)
+if test "$WARNINGS" = "yes"; then
+ AC_DEFINE(ENABLE_WARNINGS,1,[Define if warnings enabled])
+fi
+
dnl Check if __func__ is defined by the compiler
AC_MSG_CHECKING([whether the compiler allows __func__])
rm -f conftest.c
Modified: mpich2/trunk/src/pm/hydra/include/hydra_base.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra_base.h 2009-03-12 21:58:55 UTC (rev 4042)
+++ mpich2/trunk/src/pm/hydra/include/hydra_base.h 2009-03-12 22:13:20 UTC (rev 4043)
@@ -82,6 +82,12 @@
HYD_ENV_PROP_LIST
} HYD_Env_prop_t;
+#if defined ENABLE_WARNINGS
+#define HYDU_Warn_printf HYDU_Error_printf
+#else
+#define HYDU_Warn_printf(...)
+#endif /* ENABLE_WARNINGS */
+
#if !defined COMPILER_ACCEPTS_VA_ARGS
#define HYDU_Error_printf MPIU_Error_printf
#elif defined COMPILER_ACCEPTS_FUNC && defined __LINE__
Modified: mpich2/trunk/src/pm/hydra/pm/central/central_cb.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/central_cb.c 2009-03-12 21:58:55 UTC (rev 4042)
+++ mpich2/trunk/src/pm/hydra/pm/central/central_cb.c 2009-03-12 22:13:20 UTC (rev 4043)
@@ -86,13 +86,15 @@
* might have aborted. Just cleanup all the processes */
status = HYD_PMCD_Central_cleanup();
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("bootstrap server returned error cleaning up processes\n");
+ HYDU_Warn_printf("bootstrap server returned error cleaning up processes\n");
+ status = HYD_SUCCESS;
goto fn_fail;
}
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
- HYDU_Error_printf("unable to deregister fd %d\n", fd);
+ HYDU_Warn_printf("unable to deregister fd %d\n", fd);
+ status = HYD_SUCCESS;
goto fn_fail;
}
@@ -161,7 +163,7 @@
* check the return status since we are anyway returning
* an error */
HYD_PMCD_Central_cleanup();
- status = HYD_INTERNAL_ERROR;
+ status = HYD_SUCCESS;
goto fn_fail;
}
@@ -199,15 +201,15 @@
for (partition = proc_params->partition; partition; partition = partition->next) {
status = HYDU_Sock_connect(partition->name, handle.proxy_port, &fd);
if (status != HYD_SUCCESS) {
+ HYDU_Warn_printf("unable to connect to the proxy on %s\n", partition->name);
overall_status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("unable to connect to the proxy on %s\n", partition->name);
continue; /* Move on to the next proxy */
}
status = HYDU_Sock_write(fd, &cmd, sizeof(cmd));
if (status != HYD_SUCCESS) {
+ HYDU_Warn_printf("unable to send data to the proxy on %s\n", partition->name);
overall_status = HYD_INTERNAL_ERROR;
- HYDU_Error_printf("unable to send data to the proxy on %s\n", partition->name);
continue; /* Move on to the next proxy */
}
Modified: mpich2/trunk/src/pm/hydra/utils/sock/sock.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/sock/sock.c 2009-03-12 21:58:55 UTC (rev 4042)
+++ mpich2/trunk/src/pm/hydra/utils/sock/sock.c 2009-03-12 22:13:20 UTC (rev 4043)
@@ -173,8 +173,11 @@
goto fn_fail;
}
+ /* Not being able to connect is not an error in all cases. So we
+ * return an error, but only print a warning message. The upper
+ * layer can decide what to do with the return status. */
if (connect(*fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
- HYDU_Error_printf("connect error (errno: %d)\n", errno);
+ HYDU_Warn_printf("connect error (errno: %d)\n", errno);
status = HYD_SOCK_ERROR;
goto fn_fail;
}
More information about the mpich2-commits
mailing list