updated argc before calling MPI_Init in case argc and argv do not agree.
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 3 Aug 2012 20:24:43 +0000 (15:24 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 3 Aug 2012 20:24:43 +0000 (15:24 -0500)
src/arch/mpi/machine.c

index 0bbda836c48e0735d81cded3eea80ecf08c0ea55..39ba2bacfc6fec58f5aa6f01aee3e3e55cca6761 100644 (file)
@@ -1298,6 +1298,8 @@ static void MachineInitForMPI(int *argc, char ***argv, int *numNodes, int *myNod
 #endif
     }
 
+    *argc = CmiGetArgc(largv);     /* update it in case it is out of sync */
+
     if(!CharmLibInterOperate) {
 #if CMK_MPI_INIT_THREAD
 #if CMK_SMP