]> git.donarmstrong.com Git - mothur.git/blobdiff - distancecommand.cpp
changed how we count sequences in a fastafile to allow for '>' in sequence names
[mothur.git] / distancecommand.cpp
index da5d0f157390cb1a70c666ac86a9ecae1221f095..503f64b21cfd0ae64ec7413c7bfc3dc993e7e2d3 100644 (file)
@@ -300,6 +300,7 @@ int DistanceCommand::execute(){
                                MPI_Send(&size, 1, MPI_LONG, 0, tag, MPI_COMM_WORLD);
                        }
                }
+               MPI_Barrier(MPI_COMM_WORLD); //make everyone wait - just in case
 #else          
                                
        #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
@@ -342,6 +343,14 @@ int DistanceCommand::execute(){
                
                if (output == "square") {  convertMatrix(outputFile); }
                
+               ifstream fileHandle;
+               fileHandle.open(outputFile.c_str());
+               if(fileHandle) {
+                       gobble(fileHandle);
+                       if (fileHandle.eof()) { m->mothurOut(outputFile + " is blank. This can result if there are no distances below your cutoff.");  m->mothurOutEndLine(); }
+               }
+
+               
                #ifdef USE_MPI
                        }
                #endif