If you can, run gdb, break where it opens rec4cour.dat and step along to find out the point where the two executions differ. That is, why the first does not read data but the second one does.
If you can, run gdb, break where it opens rec4cour.dat and step along to find out the point where the two executions differ. That is, why the first does not read data but the second one does.