I am trying to implement a new type similar to std::ifstream which works in an MPI-parallel environment. My approach is to write a dedicated buffer which inherits from std::streambuf; then, I write a dedicated file-stream class which inherits from from std::istream and uses the dedicated buffer.
My implementation works with the gcc compiler, it works with the Intel compiler, but it doesn't work with the Portland compiler (it always reads zeros when reading an input file). I suspect that my implementation is not fully standard compatible, and I wonder if somebody can help me with this issue. Here is a minimal version of my code, which does NOT work with Portland. This minimal version doesn't do any parallelism. It basically encapsulates a std::streambuf object by fowarding all function calls to the original std::streambuf. This is kind of trivial, and I find myself unable to figure out what's wrong here.
Bookmarks