<?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 Re: READ for REC=1 gives different results in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705561#M176435</link>
    <description>&lt;P&gt;In your sample code, I dont think that the record length as any effect when reading only a real unless the file as a length smaller than 4*2200 bytes. In that case, the read statement will fail. Try to add iostat= to the read statement and check the result.&lt;/P&gt;&lt;P&gt;Are you sure that the default real size is the same for the Lahey compiler and the intel compiler? An hexdump of the first bytes of the file may give a clue.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2025 19:16:10 GMT</pubDate>
    <dc:creator>GVautier</dc:creator>
    <dc:date>2025-07-25T19:16:10Z</dc:date>
    <item>
      <title>READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705341#M176420</link>
      <description>&lt;DIV&gt;I am trying to convert a program from Lahey Fortran to Intel IFORT. One routine is giving me headaches. When I compile the code below in Lahey I get RCNT=13419. which is what is expected. I now put the same code in VS and compile with IFORT and I get RCNT= 0.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I don't understand my defect. Is there a switch that I am missing that in the past I may have taken for granted?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PROGRAM NEWCNT&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IMPLICIT NONE&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CHARACTER * 255&amp;nbsp; BinFile, OutFile&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;REAL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RCNT&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BinFile='C:\docs\CITY.BIN'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; OPEN (UNIT=7, FILE=BinFile, ACCESS='DIRECT', RECL=22000,&lt;BR /&gt;+ STATUS='OLD', FORM='UNFORMATTED')&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;READ (7, REC=1) RCNT&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;WRITE (*, '(A,F6.0)') 'RCNT=',&amp;nbsp;RCNT&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLOSE(7)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END PROGRAM NEWCNT&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jul 2025 22:24:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705341#M176420</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-24T22:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705346#M176421</link>
      <description>&lt;P&gt;Try /assume:byterecl. Intel Fortran defaults unformatted RECL to 4-byte units, Lahey does not. /standard-semantics will enable this and other options, but that's a bigger hammer.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 23:09:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705346#M176421</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2025-07-24T23:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705485#M176425</link>
      <description>&lt;P&gt;Note Steves comment, I will also add that binary files created from one compiler in general can be different with another compiler. It is not a fully portable format.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 11:30:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705485#M176425</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2025-07-25T11:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705507#M176427</link>
      <description>&lt;P&gt;So tried it and no-go.&lt;/P&gt;&lt;P&gt;From the &lt;SPAN&gt;Lahey&amp;nbsp;&lt;/SPAN&gt;manual could I not use blocksize as in:&amp;nbsp;blocksize is a scalar default INTEGER expression. It must evaluate to the size, in bytes, of&lt;BR /&gt;the input/output buffer. And since an INTEGER defaults to 4 bytes then that jives with what you said except that is for Lahey, not Intel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, Intel IFORT says:&amp;nbsp;&lt;/P&gt;&lt;P&gt;The BLOCKSIZE specifier indicates the physical I/O transfer size in bytes for the file. It takes the following form:&lt;/P&gt;&lt;P&gt;BLOCKSIZE =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;bks&lt;/P&gt;&lt;TABLE border="0" width="90%" cellspacing="0" cellpadding="4"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="30%"&gt;&lt;P&gt;&lt;SPAN&gt;bks&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Is a scalar numeric expression. If necessary, the value is converted to integer data type before use.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;If you specify a nonzero number for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;bks, it is rounded up to a multiple of 512 byte blocks. The maximum valid value of BLOCKSIZE is 2147467264.&lt;/P&gt;&lt;P&gt;If you do not specify BLOCKSIZE or you specify zero for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;bks, the default value of 128 KB (131,072 bytes) is assumed. However, if you compile with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;assume buffered_stdout&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option, the default blocksize for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;stdout&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is 8 KB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I can't see how I can possibly use a block size of 4-bytes with IFORT. It defaults to 128 KB and if you provide a number like 4 bytes it will round up to 512 bytes.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 13:49:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705507#M176427</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T13:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705519#M176429</link>
      <description>&lt;P&gt;&lt;SPAN&gt;byterecl is&lt;/SPAN&gt;&amp;nbsp;not block size it is the UNITS so 1 can be 1 byte or 4 bytes (1 32 bit word)&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 14:27:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705519#M176429</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2025-07-25T14:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705542#M176431</link>
      <description>&lt;P&gt;I may be out of my element here. So let me see If I'm on the right path:&lt;/P&gt;&lt;P&gt;In Lahey&amp;nbsp;&lt;SPAN&gt;RECL=22000 this would mean records are 22,000 bytes long because the unit default is 1-byte.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To get the same behavior in Intel IFORT I would have to do RECL=5500 since the default unit is 4-bytes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or with the&amp;nbsp;byterecl&amp;nbsp;switch I could have RECL=22000 since that makes the unit 1-byte?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The var&amp;nbsp;BLOCKSIZE&amp;nbsp;in this case is not of concern?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 17:10:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705542#M176431</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T17:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705545#M176432</link>
      <description>&lt;P&gt;Yours maths is correct.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 17:33:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705545#M176432</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2025-07-25T17:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705558#M176434</link>
      <description>&lt;P&gt;Let me try this approach and I will report back.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 18:22:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705558#M176434</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T18:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705561#M176435</link>
      <description>&lt;P&gt;In your sample code, I dont think that the record length as any effect when reading only a real unless the file as a length smaller than 4*2200 bytes. In that case, the read statement will fail. Try to add iostat= to the read statement and check the result.&lt;/P&gt;&lt;P&gt;Are you sure that the default real size is the same for the Lahey compiler and the intel compiler? An hexdump of the first bytes of the file may give a clue.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 19:16:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705561#M176435</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2025-07-25T19:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705563#M176436</link>
      <description>&lt;P&gt;While it is true that FORM='UNFORMATTED' files are not necessarily portable, use of ACCESS='DIRECT' reduces the typical differences. I do wonder if the file was written using DIRECT using the Lahey compiler.&lt;/P&gt;&lt;P&gt;Given that this program reads only the first record, the RECL units may not matter. At this point I'd want to see the data file, or perhaps a hex dump of the first 100 bytes or so.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 19:28:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705563#M176436</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2025-07-25T19:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705574#M176437</link>
      <description>&lt;P&gt;I was looking for the source file that writes the data but have come up empty. All I have is the file the reads the data.&lt;/P&gt;&lt;P&gt;I only posted the first record read as that is where I am having difficulties. The rest of the algorithm depends on what I read from the first record. Once I have that resolved, reading the other records is straightforward. In fact, if I iterate through REC=2 upwards I can parse out the data. It's just REC=1 that's giving me fits.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 21:15:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705574#M176437</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T21:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705575#M176438</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I only posted the first record read as that is where I am having difficulties. The rest of the algorithm depends on what I read from the first record. Once I have that resolved, reading the other records is straightforward. In fact, if I iterate through REC=2 upwards I can parse out the data. It's just REC=1 that's giving me fits.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 21:18:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705575#M176438</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T21:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705597#M176441</link>
      <description>&lt;P&gt;Ok folks I appreciate all the help. The&amp;nbsp;&lt;SPAN&gt;REAL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RCNT defaults to a 4-byte (32-bit) float in Lahey.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I use pretty standard Lahey switches to compile&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;lf90 c:\src\NEWCNT.for -win -FULLWARN -chk -w &amp;gt; c:\src\out.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In my test code I create a file just as before and then write out a single record. The 13419. is the number that I get when I read the existing BIN file so just used that to pipe into my TST.BIN file.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;    IMPLICIT NONE    
    CHARACTER * 255  TstFile
    REAL  RCNT
    TstFile='C:\docs\TST.BIN'
    OPEN (UNIT=8, FILE=TstFile, ACCESS='DIRECT', RECL=22000,
   +      STATUS='REPLACE', FORM='UNFORMATTED')
    RCNT=13419.
    WRITE(8,REC=1)RCNT
    CLOSE(8)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;The VS hex editor shows this with the existing binary file on the left and my TST.BIN on the right. They look the same. So, if every record is 22000 bytes and we read the first 4 bytes shouldn't that be a 13419. ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sindizzy_0-1753485208592.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/67755i49D6696D1ECA24B6/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="sindizzy_0-1753485208592.png" alt="sindizzy_0-1753485208592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 23:32:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705597#M176441</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T23:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705604#M176442</link>
      <description>&lt;P&gt;In Intel IFORT without&amp;nbsp;&lt;SPAN&gt;byterecl I get the following if I use RECL=20000 or RECL=5500&lt;/SPAN&gt;&lt;BR /&gt;Same if I do use&amp;nbsp;&lt;SPAN&gt;byterecl&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sindizzy_1-1753487680527.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/67759i8CFE6B1B8E1E90CD/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="sindizzy_1-1753487680527.png" alt="sindizzy_1-1753487680527.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 23:57:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705604#M176442</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-25T23:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705624#M176446</link>
      <description>&lt;P&gt;In the original file, the 4 first bytes neither represent an IEEE 4 bytes number nor 13419 in a 4 bytes integer. The tst.bin generated by the Lahey compiler as I understand and the original file are identical. So it could mean that the representation of floating point numbers, at least stored in direct files, are not compatible with IEEE representation. Have you tried to post a question on a Lahey Fortan forum?&lt;/P&gt;&lt;P&gt;&lt;A href="https://baseconvert.com/ieee-754-floating-point" target="_blank" rel="noopener"&gt;https://baseconvert.com/ieee-754-floating-point&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In Intel Fortran, the recl value in direct files doesn't affect the structure of the file. It is just a value allowing to access the file by records of the declared length to read /write in the file by whole record. So you can open this file with any record length and read data in the first record. The correct record length is only mandatory to access other records.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2025 08:05:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705624#M176446</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2025-07-26T08:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705625#M176447</link>
      <description>&lt;P&gt;I just found a clue.&lt;/P&gt;&lt;P&gt;The second and third bytes 55F0 is the decimal representation of the number 22000. So it is the record length and it is stored by Lahey Fortan in each record or in only the first. Can you change you test program with a record of 128 for example and post the hex dump of the first 256 bytes of tst.bin file.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-Unformatted-Files-Compiled-with-Lahey-Fortran/m-p/810374" target="_self"&gt;https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-Unformatted-Files-Compiled-with-Lahey-Fortran/m-p/810374&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2025 08:09:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705625#M176447</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2025-07-26T08:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705666#M176455</link>
      <description>&lt;P&gt;Lahey was sold to Fujitsu and is now defunct. Thus my drive to use a newer compiler.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2025 17:26:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705666#M176455</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-26T17:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705671#M176456</link>
      <description>&lt;P&gt;Very interesting. I think I was lured in by assuming all Fortran code would produce the same output. I think it depends on how the particular software company implemented certain things.&lt;/P&gt;&lt;P&gt;New code:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;    IMPLICIT NONE    
    CHARACTER * 255  TstFile
    REAL  RCNT
    TstFile='C:\docs\TST128.BIN'
    OPEN (UNIT=8, FILE=TstFile, ACCESS='DIRECT', RECL=128,
   +      STATUS='REPLACE', FORM='UNFORMATTED')
    RCNT=13419.
    WRITE(8,REC=1)RCNT
    RCNT=200.
    WRITE(8,REC=2)RCNT
    CLOSE(8)&lt;/LI-CODE&gt;&lt;P&gt;And here is the hex dump. Would F7 be a possible header marker? 80=128&lt;/P&gt;&lt;P&gt;13419.0 = 0x00ac5146 (big endian)&lt;/P&gt;&lt;P&gt;200.0 =&amp;nbsp;0x00004843&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sindizzy_2-1753552977095.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/67769iF92A15AEE3CA6D64/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="sindizzy_2-1753552977095.png" alt="sindizzy_2-1753552977095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2025 18:10:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705671#M176456</guid>
      <dc:creator>sindizzy</dc:creator>
      <dc:date>2025-07-26T18:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705681#M176459</link>
      <description>&lt;P&gt;It becomes clearer. The first record looks like a header with a 1 byte marker and the record length in the 4 to 8 following bytes.&lt;/P&gt;&lt;P&gt;In order to read this file with a program compiled with Intel Fortran, you must shift your record number to skip the header : REC=2 for the first record and so on.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2025 19:22:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705681#M176459</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2025-07-26T19:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: READ for REC=1 gives different results</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705682#M176460</link>
      <description>&lt;P&gt;The only case where you can reasonably assume the files would have the same layout is if you use ACCESS='STREAM'. Most compilers don't add information visible in the data stream to ACCESS='DIRECT' files, but obviously at least one does. I know that direct access was often used as a way to get "raw" data, but here's a case where that doesn't work.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jul 2025 19:22:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/READ-for-REC-1-gives-different-results/m-p/1705682#M176460</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2025-07-26T19:22:47Z</dc:date>
    </item>
  </channel>
</rss>

