Rough patch to fix mpiexec for PBSPro 8.0 and above

Matt Ford matt.ford at manchester.ac.uk
Sun Sep 23 06:13:10 EDT 2007


Hi,

Please find attached a very rough patch that fixes mpiexec for PBSPro 8 
and above.

This is necessary as PBS has moved away from "nodes/hosts" to using 
"vnodes".   See PBS 9.0 release notes.

The old exechost list is now execvnodes and the node definitions are 
wrapped in brackets.  The patch changes the queries and very crudely 
scrapes of the front bracket....

--- mpiexec-0.82/get_hosts.c    2006-11-28 20:21:33.000000000 +0000
+++ mpiexec-0.82.new/get_hosts.c        2007-09-23 04:34:01.000000000 +0100
@@ -101,13 +101,13 @@
     /*
      * Make sure we actually have exechost information.
      */
-    bstat = query_server_attr(fd, ATTR_exechost);
+    bstat = query_server_attr(fd, ATTR_execvnode);
     for (jattr = bstat->attribs; jattr; jattr = jattr->next)
-       if (!strcmp(jattr->name, ATTR_exechost))
+       if (!strcmp(jattr->name, ATTR_execvnode))
            break;
     if (!jattr)
        error("%s: pbs_statjob did not return \"%s\" info", __func__,
-         ATTR_exechost);
+         ATTR_execvnode);
     hostlist = jattr->value;
 
     /*
@@ -115,6 +115,7 @@
      */
     host = Malloc(tasklist_len * sizeof(*host));
     n = 0;
+    /* error("hostlist:%s",hostlist); */
     while ((s = strsep(&hostlist, "+"))) {
 
        int numcpus = 1;
@@ -158,7 +159,13 @@
            *cp = '\0';
        }
 
-       host[n].name = s;  /* no copy yet */
+        /* we get rid of initial bracket... */
+        cp = strchr(s, '(');
+        if (cp) {
+          host[n].name = cp+1;  /* no copy yet */
+        }else{
+          host[n].name = s;
+        }
        host[n].parent = -1;
        host[n].children = 0;
        ++n;


Cheers,

Matt.





More information about the mpiexec mailing list