changed buffer size in send/recv cmd (for sending entire python files)

This commit is contained in:
Lukas Kogler 2016-11-07 17:48:23 +01:00
parent 3d1bd29d3e
commit 49aa2861d6

View File

@ -16,17 +16,18 @@ namespace netgen
void MyMPI_SendCmd (const char * cmd) void MyMPI_SendCmd (const char * cmd)
{ {
char buf[100]; char buf[10000];
strcpy (buf, cmd); strcpy (buf, cmd);
// MPI_Bcast (&buf, 100, MPI_CHAR, 0, MPI_COMM_WORLD); // MPI_Bcast (&buf, 100, MPI_CHAR, 0, MPI_COMM_WORLD);
for (int dest = 1; dest < ntasks; dest++) for (int dest = 1; dest < ntasks; dest++)
MPI_Bsend( &buf, 100, MPI_CHAR, dest, MPI_TAG_CMD, MPI_COMM_WORLD); MPI_Send( &buf, 10000, MPI_CHAR, dest, MPI_TAG_CMD, MPI_COMM_WORLD);
} }
string MyMPI_RecvCmd () string MyMPI_RecvCmd ()
{ {
char buf[100]; char buf[10000];
// MPI_Bcast (&buf, 100, MPI_CHAR, 0, MPI_COMM_WORLD); // MPI_Bcast (&buf, 100, MPI_CHAR, 0, MPI_COMM_WORLD);
// VT_OFF(); // VT_OFF();
@ -44,7 +45,7 @@ namespace netgen
while (!flag); while (!flag);
// VT_ON(); // VT_ON();
MPI_Recv( &buf, 100, MPI_CHAR, 0, MPI_TAG_CMD, MPI_COMM_WORLD, &status); MPI_Recv( &buf, 10000, MPI_CHAR, 0, MPI_TAG_CMD, MPI_COMM_WORLD, &status);
return string(buf); return string(buf);
} }