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

file close/write errors

goel
Beginner
1,397 Views
Compilation:
ifort -fpp -r8 -fast mod.o gc.o pre.o inpot.o ad_w.o out.o -o ./abc.exe
IPO: using IR for mod.o
IPO: using IR for gc.o
IPO: using IR for pr.o
IPO: using IR for inpot.o
IPO: using IR for ad_w.o
IPO: using IR for out.o
IPO: performing multi-file optimizations

program main is in gc. In a 'do loop', I am writing data to a file, and for some iterations I get following error:
severe (28): Close Error
There was no such error ar previous iterations, and also the point (iteration) at which I get the 'close' error is different everytime I run my code.

Also I put (iostat=io) clause in 'close' statement. then at a later iteration I get following of two errors:

forrtl: severe (38): error during write, unit 25, file /home/xy/abc
Image PC Routine Line Source
abc.exe 080777BD Unknown Unknown Unknown
abc.exe 08052645 Unknown Unknown Unknown
abc.exe 08052C3C Unknown Unknown Unknown
abc.exe 0806B67E Unknown Unknown Unknown
abc.exe 0804BDAB Unknown Unknown Unknown

forrtl: Input/output error
forrtl: severe (38): error during write, unit -1, file stdout
Image PC Routine Line Source
abc.exe 080769E1 Unknown Unknown Unknown
abc.exe 08051869 Unknown Unknown Unknown
abc.exe 08051E60 Unknown Unknown Unknown
abc.exe 0806DD56 Unknown Unknown Unknown
abc.exe 0806BFC5 Unknown Unknown Unknown
abc.exe 0804BCC0 Unknown Unknown Unknown
abc.exe 77359400 Unknown Unknown Unknown

I would appreciate any help with the above errors.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
1,397 Views
Usually, errors during close or write are due to the OS reporting an error and Fortran is just passing it on. I don't know if calling GETLASTERROR (USE IFPORT) would tell you anything useful, but it might give the Linux errno value.
0 Kudos
Reply