I have made a funny MPI mistake recently. I was trying to write some data from my application, but in the end I was getting an empty file all the time. In the end I realized, that despite I was writing the data only with the master process, I was opening the file with all of the processes and they were overwriting the data written by master process.