- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
forrtl: severe (105): there is no data-edit-descriptor to match a data-item in the I/O list, unit -5, file Internal Formatted Write
I compiled with:
mpif90 -g -zero -save*.f
and ran with:
nice mpirun -np 8 a.out
Thinking I had done something stupid like set iunit to a negative number somewhere in this giant loop around thousands of runs (it doesn't happen the first time, it takes days before the error occurs and crashes that part of the run), I wrote the simple test program below to try and duplicate the weird error message. However, it now creates fort.-5 instead of generating the error trap like the other compilers do or writing the file like it does when iunit is positive? I was hoping the other compilers would give me a better error message but they just trigger the error trap as expected.
! test unit=-5 ifort error creates fort.-5
! Portland Group and Gnu Fortran both correctly error off
program test
implicit none
integer iunit
integer ierr
character*256 filename
!
iunit = -5 ! this should be .ge. zero according to spec
filename = 'output.tmp'
print *,'testing: ', trim(filename), ' ', iunit
open (unit=iunit, file=filename, err=200, iostat=ierr)
write (unit=iunit,fmt=123) 22.0 / 7.0
close (unit=iunit, err=200, iostat=ierr)
123 format (G20.9)
print *,'Done'
goto 999
! Error trap
200 print *, 'Error! ',ierr
!
999 continue
end program test
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There was an intentional change in the error issued for the error condition shown in the sample below where there is no data-edit descriptor for the data item.
[plain]program sample
implicit none
integer :: n
n = 1
write(*,'(''n'')') n
end program sample[/plain]
For the sample program above, the 10.1 compiler previously issued an error like:
forrtl: severe (60): infinite format loop, unit -1, file /dev/ttys000
The 11.0 compiler now issues this form of error:
forrtl: severe (105): there is no data-edit-descriptor to match a data-item in the I/O list, unit -1, file /dev/ttys002
The error you received relates to using a negative unit number, -5, as Steve indicated in an internalwrite similar to the sample.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've updated your sample below but it gets error unit -1. Where is unit -5 coming from in the "run-time library for internal I/O"? Thanks for the clue!
c compile: ifort -g -traceback sample.f
program sample
n = 42
print 111, n ! also makes error if use format 113
write(6,111) n
write(*,111) n
write(*,113) n ! unit -1 is from *, error is in format below
111 format ('n = ', i4)
113 format ('missing format for int here')
end program sample
ifort 11.056:
forrtl: severe (105): there is no data-edit-descriptor to match a data-item in the I/O list, unit -1, file /dev/ttys000
Image PC Routine Line Source
a.out 0000000100061D41 Unknown Unknown Unknown
a.out 0000000100060E04 Unknown Unknown Unknown
a.out 000000010003C3C3 Unknown Unknown Unknown
a.out 0000000100019A6F Unknown Unknown Unknown
a.out 000000010001921C Unknown Unknown Unknown
a.out 000000010003B951 Unknown Unknown Unknown
a.out 0000000100038B2F Unknown Unknown Unknown
a.out 0000000100001333 _MAIN__ 13 msg.f
a.out 000000010000119C Unknown Unknown Unknown
a.out 0000000100001134 Unknown Unknown Unknown
gnufortran:
At line 13 of file msg.f
Fortran runtime error: Insufficient data descriptors in format after reversion missing format for int heremissing format for int here
Portland Group:
PGFIO-F-246/formatted write/unit=6/infinite format scan for edit descriptor.
File name = stdout formatted, sequential access record = 6
In source file msg.f, at line number 13
[Back in the day when tech magazines were printed and mailed out via USPS, a 'user interface evagilist' named Tog had a contest on the worst error message of the year. I see he is still alive & preaching at www.asktog.com(The winner was a printer that after you put in paper, printed a sheet with Error: out of paper!) After taking compiler design, I understand the tradeoffs as shown by the three compiler error messages for the same problem above.]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wrong. Based on Steve's reply, the error does not involve using a negative unit number. The error occurs when using an internal writeas follows:
[cpp]program sample
implicit none
integer :: n
character temp
n = 1
write(temp,'(''n'')') n
end program sample[/cpp]
This generates the following error:
forrtl: severe (105): there is no data-edit-descriptor to match a data-item in the I/O list, unit -5, file Internal Formatted Write
Inspect all internal writes in your program and ensure the necessary data edit descriptors have been provided for all the data items being written.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page