--- trunk/gadget/slavecommunication.cc 2014/02/10 17:09:07 1 +++ trunk/gadget/slavecommunication.cc 2015/05/11 07:50:15 7 @@ -300,7 +300,8 @@ for (i = 0; i < numVar; i++) { - MPI_Recv(tempString, MaxStrLength, MPI_BYTE, 0,MPI_ANY_TAG, parentcomm, &status); + strncpy(tempString, "\0", MaxStrLength+1); + MPI_Recv(tempString, MaxStrLength, MPI_CHAR, 0,MPI_ANY_TAG, parentcomm, &status); Parameter pm(tempString); netDataStr.resize(pm); } @@ -351,4 +352,4 @@ int i; for (i = 0; i < numVar; i++) vec[i] = netDataDouble[i]; -} \ No newline at end of file +}