]> git.donarmstrong.com Git - mothur.git/blobdiff - validparameter.cpp
changed confidence scores calculation in bayesian
[mothur.git] / validparameter.cpp
index 0c32a3e1c7b00e9fa90c8a5e4ca7fb759238c9e2..d693bcb721184c251896c917328f9d9d07b3fc18 100644 (file)
@@ -207,11 +207,25 @@ string ValidParameters::validFile(map<string, string> container, string paramete
                if(it != container.end()){ //no parameter given
 
                        if(isFile == true) {
+                       
+                       #ifdef USE_MPI  
+                               int pid;
+                               MPI_Comm_rank(MPI_COMM_WORLD, &pid); //find out who we are
+                               
+                               if (pid == 0) {
+                       #endif
 
                                ableToOpen = openInputFile(it->second, in);
+                               in.close();
 
+                       #ifdef USE_MPI  
+                                       MPI_Bcast(&ableToOpen, 1, MPI_INT, 0, MPI_COMM_WORLD);  //send ableToOPen
+                               }else {
+                                       MPI_Bcast(&ableToOpen, 1, MPI_INT, 0, MPI_COMM_WORLD); //get ableToOPen
+                               }
+                       #endif
+                       
                                if (ableToOpen == 1) { return "not open"; }
-                               in.close();
                        }
                }else { return "not found"; }