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"; }