MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / ReadyToRead

Method ReadyToRead

Src/Base/AMReX_NFiles.cpp:326–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324
325
326bool 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
346NFilesIter &NFilesIter::operator++() {

Callers 1

ReadMethod · 0.80

Calls 1

RecvFunction · 0.85

Tested by

no test coverage detected