| 324 | |
| 325 | |
| 326 | bool NFilesIter::ReadyToRead() { |
| 327 | |
| 328 | if(finishedReading) { |
| 329 | return false; |
| 330 | } |
| 331 | |
| 332 | if(myReadIndex != 0) { // ---- wait for rank myReadIndex - 1 |
| 333 | int iBuff(-1), waitForPID(readRanks[myReadIndex - 1]); |
| 334 | ParallelDescriptor::Recv(&iBuff, 1, waitForPID, stReadTag); |
| 335 | } |
| 336 | |
| 337 | fileStream.open(fullFileName.c_str(), |
| 338 | std::ios::in | std::ios::binary); |
| 339 | if( ! fileStream.good()) { |
| 340 | amrex::FileOpenFailed(fullFileName); |
| 341 | } |
| 342 | return true; |
| 343 | } |
| 344 | |
| 345 | |
| 346 | NFilesIter &NFilesIter::operator++() { |