| Hi John,
| I am getting a lot of intermittent file IO errors
| when I do certain file intensive operations.
| There errors are like:
| error: fwrite: invalid stream number = -1
| They are hard to pin down. For example,
| he program MatlabMPI/examples/speedtest.m
| will often produce the message:
| warning: version: ignoring extra arguments
| after the command
| temp_fid = fopen(lock_file,'r');
| These don't seem to happen with 3.0.1.
| Anyway, I know these are vague errors (file IO errors
| always are).
| They could be related to the delete error
| I sent you. I don't know.
When Octave opens a file, it calls fopen, then wraps the FILE pointer
in a C++ iostream object. The number returned by Octave's fopen
function is obtained by calling fileno on the FILE pointer. I don't
see how this could fail unless there is some race condition happening
in the OS or library code. Could you apply the following patch to
Octave and see what messages are printed when the error occurs? Maybe
that will give us a clue.