fix for VC++
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 1 Nov 2011 14:32:51 +0000 (09:32 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 1 Nov 2011 14:32:51 +0000 (09:32 -0500)
src/arch/mpi/machine.c

index 5bbfb1907d3b9c62f4821f2cc64887cfafd6a3a4..e6ac2911a55a11b593e6661f059cf84466debcca 100644 (file)
@@ -307,6 +307,7 @@ static CmiCommHandle MPISendOneMsg(SMSG_LIST *smsg) {
     int size = smsg->size;
     char *msg = smsg->msg;
     int mode = smsg->mode;
+    int dstrank;
 
     MACHSTATE2(3,"MPI_send to node %d rank: %d{", node, CMI_DEST_RANK(msg));
 #if CMK_ERROR_CHECKING
@@ -329,9 +330,9 @@ static CmiCommHandle MPISendOneMsg(SMSG_LIST *smsg) {
 #else
     START_EVENT();
 #if CMK_MEM_CHECKPOINT
-    int dstrank = petorank[node];
+    dstrank = petorank[node];
 #else
-    int dstrank = node;
+    dstrank = node;
 #endif
     if (MPI_SUCCESS != MPI_Isend((void *)msg,size,MPI_BYTE,dstrank,TAG,MPI_COMM_WORLD,&(smsg->req)))
         CmiAbort("MPISendOneMsg: MPI_Isend failed!\n");