[mpich2-commits] r5538 - mpich2/trunk/src/pmi/pmi2

buntinas at mcs.anl.gov buntinas at mcs.anl.gov
Thu Oct 22 16:10:29 CDT 2009


Author: buntinas
Date: 2009-10-22 16:10:29 -0500 (Thu, 22 Oct 2009)
New Revision: 5538

Modified:
   mpich2/trunk/src/pmi/pmi2/simple2pmi.c
Log:
fixed bug where int was passed in place of str

Modified: mpich2/trunk/src/pmi/pmi2/simple2pmi.c
===================================================================
--- mpich2/trunk/src/pmi/pmi2/simple2pmi.c	2009-10-22 20:23:59 UTC (rev 5537)
+++ mpich2/trunk/src/pmi/pmi2/simple2pmi.c	2009-10-22 21:10:29 UTC (rev 5538)
@@ -674,12 +674,15 @@
     int ret;
     PMI2_Command cmd = {0};
     int rc;
+    char src_pmi_id_str[256];
     const char *errmsg;
 
+    PMI2U_Snprintf(src_pmi_id_str, sizeof(src_pmi_id_str), "%d", src_pmi_id);
+    
     pmi2_errno = PMIi_InitIfSingleton();
     if (pmi2_errno) PMI2U_ERR_POP(pmi2_errno);
     
-    pmi2_errno = PMIi_WriteSimpleCommandStr(PMI2_fd, &cmd, KVSGET_CMD, JOBID_KEY, jobid, SRCID_KEY, src_pmi_id, KEY_KEY, key, NULL);
+    pmi2_errno = PMIi_WriteSimpleCommandStr(PMI2_fd, &cmd, KVSGET_CMD, JOBID_KEY, jobid, SRCID_KEY, src_pmi_id_str, KEY_KEY, key, NULL);
     if (pmi2_errno) PMI2U_ERR_POP(pmi2_errno);
     pmi2_errno = PMIi_ReadCommandExp(PMI2_fd, &cmd, KVSGETRESP_CMD, &rc, &errmsg);
     if (pmi2_errno) PMI2U_ERR_POP(pmi2_errno);



More information about the mpich2-commits mailing list