<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic One side effect of accessing in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185672#M149975</link>
    <description>&lt;P&gt;One side effect of accessing a zero length file, is that you may run into contention with your anti-malware scanner.&lt;/P&gt;&lt;P&gt;We were using&amp;nbsp;a model that would open an error log file prior to starting a lengthy calculation, and close it at the end of the calculation.&lt;/P&gt;&lt;P&gt;If there were no errors to log, this results in a file with 0 length.&amp;nbsp; The calculations were being performed inside a loop, so the model would&lt;/P&gt;&lt;P&gt;repeatedly open and close this file.&lt;/P&gt;&lt;P&gt;The malware scanner saw these zero length files as suspicious, because a zero length file still reserves a cluster of disk space, which is a good place to&amp;nbsp;&lt;/P&gt;&lt;P&gt;hide malware.&amp;nbsp; Eventually, the model would crash because the malware scanner was scanning the file at just the wrong time.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 10:51:35 GMT</pubDate>
    <dc:creator>cryptogram</dc:creator>
    <dc:date>2020-06-03T10:51:35Z</dc:date>
    <item>
      <title>Reading file of length zero</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185659#M149962</link>
      <description>&lt;P&gt;I have a general reading routine that crashes for empty files (ASCII).&lt;/P&gt;&lt;P&gt;The following minimal example shows this behavior (compile; touch empty.txt; ./out) when compiled with ifort version 19.0.2.187. Is that the expected behavior, i.e. would I need to check for fileLength/=0 or is ifort suppost to figure this out.&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;program test

 character(len=:), allocatable :: a
 a = IO_read('empty.txt')

 print*, len(a)
 print*, '#'//a//'#'

contains

function IO_read(fileName) result(fileContent)

  character(len=*),  intent(in) :: fileName
  character(len=:), allocatable :: fileContent
  integer ::  &amp;amp;
    fileLength, &amp;amp;
    fileUnit, &amp;amp;
    myStat

  inquire(file = fileName, size=fileLength)
  open(newunit=fileUnit, file=fileName, access='stream',&amp;amp;
       status='old', position='rewind', action='read',iostat=myStat)
  if(myStat /= 0) stop 1
  allocate(character(len=fileLength)::fileContent)
  read(fileUnit) fileContent
  close(fileUnit)

end function IO_read

end program test
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:30:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185659#M149962</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-02T07:30:04Z</dc:date>
    </item>
    <item>
      <title>I tried your program with</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185660#M149963</link>
      <description>&lt;P&gt;I tried your program with gfortran and that worked fine. I am not sure what should be expected acorrding to the standard. The simplest way around this problem is of course to always check for an error. It may be one of those corner cases that are not covered.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:42:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185660#M149963</guid>
      <dc:creator>Arjen_Markus</dc:creator>
      <dc:date>2020-06-02T07:42:22Z</dc:date>
    </item>
    <item>
      <title>The problem is the read, it</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185661#M149964</link>
      <description>&lt;P&gt;The problem is the read, it should have an iostat and you should then manage the eof status and other errors, that covers the bases. Opening an empty file is not and error. Reading one is.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:43:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185661#M149964</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2020-06-02T07:43:08Z</dc:date>
    </item>
    <item>
      <title>Quote:andrew_4619 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185662#M149965</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;andrew_4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is the read, it should have an iostat and you should then manage the eof status and other errors, that covers the bases. Opening an empty file is not and error. Reading one is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the quick reply. Adding iostat indeed works. Its value is -1, but I don't need to `manage` anything.&lt;/P&gt;&lt;P&gt;Might be a corner case, but to me this behavior is unexpected. Why should the use of an optional, intent(out) variable change the behavior of read()?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:56:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185662#M149965</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-02T07:56:08Z</dc:date>
    </item>
    <item>
      <title>One more thing I have noticed</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185663#M149966</link>
      <description>&lt;P&gt;One more thing I have noticed:&lt;/P&gt;&lt;P&gt;iostat is 0 if I read a file of length&amp;gt;0 into a string of matching len&lt;/P&gt;&lt;P&gt;iostat is -1 if I read file of length 0 into a string of len 0&lt;/P&gt;&lt;P&gt;gfortran's iostat is 0 in both cases, I find this more consistent&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 08:08:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185663#M149966</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-02T08:08:35Z</dc:date>
    </item>
    <item>
      <title>I believe implicit allocation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185664#M149967</link>
      <description>&lt;P&gt;I believe implicit allocation of a string by a read is not standard Fortran.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 08:24:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185664#M149967</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2020-06-02T08:24:10Z</dc:date>
    </item>
    <item>
      <title>Quote:andrew_4619 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185665#M149968</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;andrew_4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe implicit allocation of a string by a read is not standard Fortran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not doing that, fileContent is allocated to size 0:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;  allocate(character(len=fileLength)::fileContent)
  read(fileUnit) fileContent&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 08:26:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185665#M149968</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-02T08:26:46Z</dc:date>
    </item>
    <item>
      <title>There is some ambiguity here:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185666#M149969</link>
      <description>&lt;P&gt;There is some ambiguity here:&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;allocate( character(len=0) :: string )

do 
     read(10, iostat =ierr)  string
     if ( ierr /= 0 ) then
          exit
     endif
enddo

&lt;/PRE&gt;

&lt;P&gt;This program would never stop with gfortran, because it never encounters an end-of-file, whereas with Intel Fortran it does.&lt;/P&gt;
&lt;P&gt;Of course, this is a trifle contrived, but it does illustrate that there are more sides to the problem!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 08:37:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185666#M149969</guid>
      <dc:creator>Arjen_Markus</dc:creator>
      <dc:date>2020-06-02T08:37:24Z</dc:date>
    </item>
    <item>
      <title>Conceptually:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185667#M149970</link>
      <description>&lt;P&gt;Conceptually:&lt;/P&gt;&lt;P&gt;1) Is a null file by default at EOF?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Is a "null" read a read?&lt;/P&gt;&lt;P&gt;3) does a read check for "eof status" before or after a&amp;nbsp;null read?&lt;/P&gt;&lt;P&gt;I haven't read the standard but I expect some of these are probably undefined and/or OS dependant. A null read is conceptually pointless and I would suggest it is the coders responsibility to avoid/manage such events.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 09:54:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185667#M149970</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2020-06-02T09:54:42Z</dc:date>
    </item>
    <item>
      <title>@andrew_4619: Interesting</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185668#M149971</link>
      <description>&lt;P&gt;@andrew_4619: Interesting questions.&lt;/P&gt;&lt;P&gt;I just want to emphasize that I am using the "stream" access mode which might be reason for the strange behavior&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;1) Is a null file by default at EOF?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;When reading a file of length N into a string of length N, EOF is not reached. Therefore, it would be consistent if opening a zero length file would not default to EOF. However, the most consistent situation would be immediate EOF for zero-length files and EOF after reading N characters (or bytes) from an file of length N (in bytes or characters).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;2) Is a "null" read a read?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does not matter, as long as a null read does not change the status&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;3) does a read check for "eof status" before or after a&amp;nbsp;null read?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The general question would be whether EOF status is reached when the last bit of information is read or when one tries to go beyond this limit.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;A null read is conceptually pointless and I would suggest it is the coders responsibility to avoid/manage such events.&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The actual read is pointless, but taking care of it is annoying. Reading a file containing N characters results in a string of length N, I dont' see a reason why N &amp;gt; 0 is required since strings of size 0 are totally valid.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 12:14:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185668#M149971</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-02T12:14:55Z</dc:date>
    </item>
    <item>
      <title>Here's my analysis of the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185669#M149972</link>
      <description>&lt;P&gt;Here's my analysis of the situation...&lt;/P&gt;&lt;P&gt;The READ is attempting to read zero bytes from an empty file connected for unformatted stream access. The standard says that an end-of-file condition occurs when "an attempt is made to read beyond the end of a stream file." Since the READ is not trying to read &lt;STRONG&gt;beyond&lt;/STRONG&gt; the end of the file, the file position should remain unchanged and the READ should succeed.&lt;/P&gt;&lt;P&gt;Therefore, I believe this is an error on the part of ifort and should be reported to Intel using the Online Service Center.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 14:35:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185669#M149972</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-06-02T14:35:15Z</dc:date>
    </item>
    <item>
      <title>"an attempt is made to read</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185670#M149973</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;"an attempt is made to read beyond the end of a stream file."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Maybe one could also say that an attempt to read nothing is in fact not attempt at all.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 17:04:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185670#M149973</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2020-06-02T17:04:11Z</dc:date>
    </item>
    <item>
      <title>Quote:andrew_4619 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185671#M149974</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;andrew_4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe one could also say that an attempt to read nothing is in fact not attempt at all.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't say that. There are side-effects of a READ that have nothing to do with the actual reading, such as connecting to a file if not already connected.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 17:41:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185671#M149974</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-06-02T17:41:38Z</dc:date>
    </item>
    <item>
      <title>One side effect of accessing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185672#M149975</link>
      <description>&lt;P&gt;One side effect of accessing a zero length file, is that you may run into contention with your anti-malware scanner.&lt;/P&gt;&lt;P&gt;We were using&amp;nbsp;a model that would open an error log file prior to starting a lengthy calculation, and close it at the end of the calculation.&lt;/P&gt;&lt;P&gt;If there were no errors to log, this results in a file with 0 length.&amp;nbsp; The calculations were being performed inside a loop, so the model would&lt;/P&gt;&lt;P&gt;repeatedly open and close this file.&lt;/P&gt;&lt;P&gt;The malware scanner saw these zero length files as suspicious, because a zero length file still reserves a cluster of disk space, which is a good place to&amp;nbsp;&lt;/P&gt;&lt;P&gt;hide malware.&amp;nbsp; Eventually, the model would crash because the malware scanner was scanning the file at just the wrong time.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 10:51:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185672#M149975</guid>
      <dc:creator>cryptogram</dc:creator>
      <dc:date>2020-06-03T10:51:35Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;The malware scanner saw</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185673#M149976</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;The malware scanner saw these zero length files as suspicious&lt;/P&gt;&lt;P&gt;That is a crappy way to implement a malware scanner. It is not unusual for a program to pre-open an output file, thus reducing filesystem latency, for use later. Or, open a log file (as you did), only to not log errors. Or, to use the existence or or absence of a file for use in inter-process signaling. All of these uses are completely reasonable. Flagging as potential malware is not correct.&lt;/P&gt;&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 13:36:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185673#M149976</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2020-06-03T13:36:17Z</dc:date>
    </item>
    <item>
      <title>Martin, will you please</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185675#M149978</link>
      <description>&lt;P&gt;Martin, will you please submit a bug report to Intel via&amp;nbsp;https://supporttickets.intel.com/?lang=en-US ? They may not pick up on it from here.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 20:02:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185675#M149978</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-06-03T20:02:01Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Ret.)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185676#M149979</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Ret.) (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin, will you please submit a bug report to Intel via&amp;nbsp;&lt;A href="https://supporttickets.intel.com/?lang=en-US"&gt;https://supporttickets.intel.com/?lang=en-US&lt;/A&gt; ? They may not pick up on it from here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did that, but the request was closed because I could not provide any license information. I have an educational license and don't know exactly how to figure out who is the officially responsible:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Nikky from Intel Support responded Yesterday 06:29 PM&lt;/P&gt;&lt;P&gt;Martin, our records indicate that you do not have a supported product associated with your account.&lt;/P&gt;&lt;P&gt;You need a supported product in order to qualify for Priority Support. As such, this ticket is being closed.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 03 Jun 2020 20:35:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185676#M149979</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-03T20:35:24Z</dc:date>
    </item>
    <item>
      <title>Sigh. Ok, I will file it for</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185677#M149980</link>
      <description>&lt;P&gt;Sigh. Ok, I will file it for you.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 00:51:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185677#M149980</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-06-04T00:51:32Z</dc:date>
    </item>
    <item>
      <title>Filed as request number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185678#M149981</link>
      <description>&lt;P&gt;Filed as request number&amp;nbsp;04669455. As a workaround, skip the READ if the length is zero.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 01:00:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185678#M149981</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-06-04T01:00:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Ret.)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185679#M149982</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Ret.) (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filed as request number&amp;nbsp;04669455. As a workaround, skip the READ if the length is zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. Actually, adding iostat already resolves the issue of a segmentation fault. The only small inconsistency is that&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;iostat /= 0&lt;/PRE&gt;

&lt;P&gt;does not work for zero length files, but&lt;/P&gt;

&lt;PRE class="brush:fortran; class-name:dark;"&gt;iostat &amp;gt; 0&lt;/PRE&gt;

&lt;P&gt;is also fine for the code I'm using&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 09:03:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-file-of-length-zero/m-p/1185679#M149982</guid>
      <dc:creator>Diehl__Martin</dc:creator>
      <dc:date>2020-06-04T09:03:00Z</dc:date>
    </item>
  </channel>
</rss>

