[mpich-discuss] debugger attach under hydra.

Pavan Balaji balaji at mcs.anl.gov
Wed Jan 6 09:09:07 CST 2010


A variant of the below patch has been committed in r6110. Note that
you'll still need the change on padb's side, since the user can specify
"localhost" in the machinefile, which Hydra does not interpret and will
directly use.

 -- Pavan

On 01/05/2010 12:43 PM, Ashley Pittman wrote:
> I saw in trak #962 that hydra has been extended to support the
> MPIR_procatble interface, I'll reply on-list however as it's off-topic
> for that bug report.
> 
> I can get padb to attach to hydra jobs on my laptop only after I apply
> the following patch, it simply converts localhost to the hostname.  I
> don't have access to anything bigger this week as I'm away.
> 
> It appears that MPIR_PROCTABLE.pid is of type long as well which is also
> a bug, it works on my laptop as it's 32bit but I suspect it's broken on
> 64bit.
> 
> Ashley,
> 
> Index: src/pm/hydra/ui/mpich/mpiexec.c
> ===================================================================
> --- src/pm/hydra/ui/mpich/mpiexec.c     (revision 6082)
> +++ src/pm/hydra/ui/mpich/mpiexec.c     (working copy)
> @@ -145,8 +145,12 @@
>          }
>  
>          if (HYD_handle.node_list == NULL) {
> -            /* The RMK and bootstrap didn't give us anything back; use localhost */
> -            status = HYDU_add_to_node_list((char *) "localhost", 1, &HYD_handle.node_list);
> +           char hostname[MAX_HOSTNAME_LEN];
> +           /* The RMK and bootstrap didn't give us anything back; use localhost */
> +           if (gethostname(hostname, MAX_HOSTNAME_LEN) < 0)
> +               HYDU_ERR_SETANDJUMP2(status, HYD_SOCK_ERROR,
> +                                    "gethostname error (hostname: %s; errno: %d)\n", hostname, errno);
> +            status = HYDU_add_to_node_list((char *) hostname, 1, &HYD_handle.node_list);
>              HYDU_ERR_POP(status, "unable to add to node list\n");
>          }
>      }
> 

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mpich-discuss mailing list