- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am facing an issue with latest Intel 2019 fortran compiler.
I am attaching the fortran code, which reproduces the issue.
In our numerical application, sometimes the user wants to recompute the calculation from a particular step.
Here, we are essentially rewriting records, from that particular step. This is done by reading the output (result) file, till that step number is reached and then fortran BACKSPACE statement is called, to position the file at the correct record, from which they are overwritten.
In the new Intel 2019, calling WRITE statement, after the BACKSPACE statement, crashes the application, with the following error:
forrtl: An attempt was made to move the file pointer before the beginning of the file.
forrtl: severe (38): error during write, unit 30, file D:\temp\fortran_file_reading\test.dat
The same code however works file in intel 16.0 and before. I will really appreciate any help in understanding this issue
Thanks
Prashanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am confident that the Intel compiler team will fix this bug, since it occurs in the latest OneAPI compilers, as well.
If you have a current license, you can file a bug report at the Intel Service Center . If not, we wait until an Intel representative reads this thread and files a bug report on your behalf.
I am not able to answer your questions, since the answers will depend on the algorithms and conventions used in the compiler and its RTL. You may, if you wish, experiment with some of the options such as /assume:buffered_io , and see if there are facilities (probably non-standard) in the OPEN statement to use a more fine-grain approach to buffering. That is, apply it only a portion of your program other than the one in which you do read-backspace-write operations. Or, if you wish to have your program work as is, you can accept the performance degradation that not specifying buffered I/O may entail.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I found an alternative. I thought BACKSPACE was easy, since it is just offsetting the file position pointer. And record length to offset, is anyway written in file. Anyway thanks for the reply.
Regards
Prashanth

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »