[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-128-g08e68ff

mysql vizuser noreply at mpich.org
Thu Jan 2 13:11:29 CST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  08e68ffe300596c3d89ffe37e3b9fe1186a8231d (commit)
      from  fb17d2b05e9c55781ab3b22a8f50440e9878d46b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/08e68ffe300596c3d89ffe37e3b9fe1186a8231d

commit 08e68ffe300596c3d89ffe37e3b9fe1186a8231d
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed Jan 1 11:43:43 2014 -0600

    Create a dummy stdin socket instead of simply closing it.
    
    For non rank-0 processes, store the stdin socket in a dummy variable
    instead of passing NULL.  Passing NULL will cause the create_process
    function to close the STDIN socket, allowing the process to reuse that
    socket.  However, if an application reopens stdin, it causes an
    incorrect socket (which is not STDIN) to be closed.  This is
    technically a user application bug, but this is a safe-guard to
    workaround that.  Fixes #1622.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/pm/hydra/pm/pmiserv/pmip_cb.c b/src/pm/hydra/pm/pmiserv/pmip_cb.c
index 597c800..72f3f5a 100644
--- a/src/pm/hydra/pm/pmiserv/pmip_cb.c
+++ b/src/pm/hydra/pm/pmiserv/pmip_cb.c
@@ -462,7 +462,7 @@ static int local_to_global_id(int local_id)
 
 static HYD_status launch_procs(void)
 {
-    int i, j, process_id;
+    int i, j, process_id, dummy;
     int using_pmi_port = 0;
     char *str, *envstr, *list, *pmi_port;
     struct HYD_string_stash stash;
@@ -688,8 +688,17 @@ static HYD_status launch_procs(void)
             for (j = 0; exec->exec[j]; j++)
                 HYD_STRING_STASH(stash, HYDU_strdup(exec->exec[j]), status);
 
+            /* For non rank-0 processes, store the stdin socket in a
+             * dummy variable instead of passing NULL.  Passing NULL
+             * will cause the create_process function to close the
+             * STDIN socket, allowing the process to reuse that
+             * socket.  However, if an application reopens stdin, it
+             * causes an incorrect socket (which is not STDIN) to be
+             * closed.  This is technically a user application bug,
+             * but this is a safe-guard to workaround that.  See
+             * ticket #1622 for more details. */
             status = HYDU_create_process(stash.strlist, force_env,
-                                         HYD_pmcd_pmip.downstream.pmi_rank[process_id] ? NULL :
+                                         HYD_pmcd_pmip.downstream.pmi_rank[process_id] ? &dummy :
                                          &HYD_pmcd_pmip.downstream.in,
                                          &HYD_pmcd_pmip.downstream.out[process_id],
                                          &HYD_pmcd_pmip.downstream.err[process_id],

-----------------------------------------------------------------------

Summary of changes:
 src/pm/hydra/pm/pmiserv/pmip_cb.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list