Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29391 Discussions

Can read text file OK on one computer but not another

dboggs
New Contributor I
435 Views

I have a program CreateFiles that writes some text files, then a second program ReadFiles that reads them. Everything works fine on computer 1 (Win 7, IVF 2011.11.344). When I run ReadFiles on computer 2 (Win8, IVF 2013 sp 1.3.202) and attempt to read files that were created on computer 1, the OPEN statement fails: error 30, Win syserr 1920 "Can't access file", for which the useful description is "The file cannot be accessed by the system".

A curious factoid is this: if on computer 2 I open one of the offending files with a text editor and then immediately close it, ReadFiles can then read it OK. If I examine one of the offending files with a byte editor before and after opening it with the text editor, the files look exactly the same to me.

Any ideas?

0 Kudos
1 Reply
jimdempseyatthecove
Honored Contributor III
435 Views

I've seen similar issues after copying files with Windows Explorer. Which (I am guessing) performs a background copy and leaving a file handle open or dangling. Opening with other program seems to get around this. This something that needs to be looked at by Intel once they have sufficient information for a reproducer.

I also have been noticing instances that after some number of  Edit, Build, Debug, Edit, Build, Debug, ... Where the Project has an after build event to copy the .exe elsewhere, that the copy fails. I get it back by exiting VS then restarting VS. Not sure what is the culprit. Sometimes the AV system is involved.

Jim Dempsey

0 Kudos
Reply