]> git.donarmstrong.com Git - mothur.git/blobdiff - distancecommand.cpp
paralellized phylo.diversity
[mothur.git] / distancecommand.cpp
index 871e07b65510d33214d78c9efee3b3448d10d405..60e90500866673aa8e643e024c3c60b840140dce 100644 (file)
@@ -276,8 +276,8 @@ int DistanceCommand::execute(){
                                for(int i = 1; i < processors; i++) { 
                                        if (m->control_pressed) { MPI_File_close(&outMPI);  delete distCalculator;  return 0; }
                                        
-                                       char buf[4];
-                                       MPI_Recv(buf, 4, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status); 
+                                       char buf[5];
+                                       MPI_Recv(buf, 5, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status); 
                                }
                        }else { //you are a child process
                                //do your part
@@ -285,10 +285,10 @@ int DistanceCommand::execute(){
                                
                                if (m->control_pressed) { MPI_File_close(&outMPI);  delete distCalculator;  return 0; }
                        
-                               char buf[4];
+                               char buf[5];
                                strcpy(buf, "done"); 
                                //tell parent you are done.
-                               MPI_Send(buf, 4, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
+                               MPI_Send(buf, 5, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
                        }
                        
                        MPI_File_close(&outMPI);