[mpich-discuss] debugger attach under hydra.

Ashley Pittman ashley at pittman.co.uk
Tue Jan 5 12:43:23 CST 2010


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");
         }
     }

-- 

Ashley Pittman, Bath, UK.

Padb - A parallel job inspection tool for cluster computing
http://padb.pittman.org.uk



More information about the mpich-discuss mailing list