- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm seeing a bug in Intel 2019u1 (after updating from 2017u4). The following is a very stripped-down example that shows the problem:
program main implicit none integer :: file_id,iostatus logical :: status_flag character(len=:),allocatable :: str file_id = 1003 open(unit=file_id,file='test.txt',status='REPLACE',iostat=iostatus) str = '1' inquire(unit=file_id, opened=status_flag, iostat=iostatus) write(file_id,fmt='(A)',advance='NO',iostat=iostatus) str str = '2' inquire(unit=file_id, opened=status_flag, iostat=iostatus) write(file_id,fmt='(A)',advance='NO',iostat=iostatus) str str = '3' inquire(unit=file_id, opened=status_flag, iostat=iostatus) write(file_id,fmt='(A)',advance='NO',iostat=iostatus) str close(unit=file_id) end program main
The contents of the resulting file should be "123", but I'm getting only "3". If I comment out the INQUIRE calls, it works as expected. It seems like the INQUIREs are interfering with or preventing some of the WRITE statements in some way.
I'm using the 64 bit compiler on Windows 10. Same results for both Debug and Release builds.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jacob, I can confirm that behavior for PSXE2018u3 and PSXE2019u1. PSXE2017u6 works as expected with inquire present. Gfortran 8.2.1 delivers also '123'. It would be good to open a ticket at OSC to get the Intel team informed.
BR, Johannes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Done (Support request number 03934032)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page