<?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 I need simple fortran code for read data from file in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751974#M8117</link>
    <description>&lt;PRE&gt;[bash]program read_data
   implicit none
   integer stepno, arrsiz
   real steptime, datum
   real, allocatable :: array(:)
   integer iunit

   open(newunit=iunit,file='STATIS',status='old')
   read(iunit,'()')
   read(iunit,'()')
   do
      read(iunit,'(i10,f14.0,i10)',end=10) &amp;amp;
         stepno,steptime,arrsiz
      allocate(array(arrsiz))
      read(iunit,'(5f14.0)') array
      datum = array(36)
      write(*,'(2(a,es14.6e2))') 'Step time =', &amp;amp;
         steptime,', datum =',datum
      deallocate(array)
   end do
10 continue
end program read_data
[/bash]&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Jan 2011 20:08:13 GMT</pubDate>
    <dc:creator>JVanB</dc:creator>
    <dc:date>2011-01-10T20:08:13Z</dc:date>
    <item>
      <title>I need simple fortran code for read data from file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751973#M8116</link>
      <description>I have output file and need simple code for read data that highlited and list in new file as xy (two colume for excel)&lt;BR /&gt;&lt;BR /&gt;MOSADDEGHI CASE 1: 2019 Water density=0.9986 &lt;BR /&gt;ENERGY UNITS=kjoule/mol &lt;BR /&gt; 200 &lt;B&gt;2.000000E-01&lt;/B&gt; 38&lt;BR /&gt;-7.905859E+04 3.010087E+02 -9.421393E+04 1.741921E+04 -1.116331E+05&lt;BR /&gt; 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -8.037317E+04&lt;BR /&gt; 0.000000E+00 3.425443E+04 -3.975877E+05 1.116268E+05 0.000000E+00&lt;BR /&gt; 0.000000E+00 3.202153E+05 0.000000E+00 6.048000E+04 0.000000E+00&lt;BR /&gt; 0.000000E+00 0.000000E+00 9.000000E+01 9.000000E+01 9.000000E+01&lt;BR /&gt; 0.000000E+00 -3.562117E-01 0.000000E+00 0.000000E+00 -4.113168E-01&lt;BR /&gt;&lt;B&gt;-8.834648E-02&lt;/B&gt; -3.593858E-02 -8.834648E-02 1.376611E-01 -2.073464E-01&lt;BR /&gt;-3.593858E-02 -2.073464E-01 -7.949794E-01&lt;BR /&gt; 400 &lt;B&gt;4.000000E-01&lt;/B&gt; 38&lt;BR /&gt;-7.897667E+04 2.990632E+02 -9.403406E+04 1.768077E+04 -1.117148E+05&lt;BR /&gt; 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -7.918380E+04&lt;BR /&gt; 0.000000E+00 3.073616E+04 -4.011339E+05 1.117082E+05  0.000000E+00&lt;BR /&gt; 0.000000E+00 3.201619E+05 0.000000E+00 6.048000E+04  0.000000E+00&lt;BR /&gt; 0.000000E+00 0.000000E+00 9.000000E+01 9.000000E+01  9.000000E+01&lt;BR /&gt; 0.000000E+00 -5.612462E-02 0.000000E+00 0.000000E+00 8.705193E-01&lt;BR /&gt; &lt;B&gt;1.079355E-01&lt;/B&gt; 1.559906E-01  1.079355E-01 -3.729550E-01  -5.621051E-02&lt;BR /&gt; 1.559906E-01 -5.621051E-02 -6.659382E-01&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;original file attached.&lt;BR /&gt;&lt;BR /&gt;thanks for attention.</description>
      <pubDate>Mon, 10 Jan 2011 18:56:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751973#M8116</guid>
      <dc:creator>hamid_mosaddeghi</dc:creator>
      <dc:date>2011-01-10T18:56:45Z</dc:date>
    </item>
    <item>
      <title>I need simple fortran code for read data from file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751974#M8117</link>
      <description>&lt;PRE&gt;[bash]program read_data
   implicit none
   integer stepno, arrsiz
   real steptime, datum
   real, allocatable :: array(:)
   integer iunit

   open(newunit=iunit,file='STATIS',status='old')
   read(iunit,'()')
   read(iunit,'()')
   do
      read(iunit,'(i10,f14.0,i10)',end=10) &amp;amp;
         stepno,steptime,arrsiz
      allocate(array(arrsiz))
      read(iunit,'(5f14.0)') array
      datum = array(36)
      write(*,'(2(a,es14.6e2))') 'Step time =', &amp;amp;
         steptime,', datum =',datum
      deallocate(array)
   end do
10 continue
end program read_data
[/bash]&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jan 2011 20:08:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751974#M8117</guid>
      <dc:creator>JVanB</dc:creator>
      <dc:date>2011-01-10T20:08:13Z</dc:date>
    </item>
    <item>
      <title>I need simple fortran code for read data from file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751975#M8118</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I renamed it to tensor.f and comilpe it with STATIS but I get this error:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------------------------------------&lt;BR /&gt;: error #5149: Illegal character in statement label field [.]&lt;BR /&gt;&lt;BR /&gt;: error #5149: Illegal character in statement label field &lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;: error #5149: Illegal character in statement label field &lt;R&gt;&lt;BR /&gt;&lt;BR /&gt;: error #5149: Illegal character in statement label field &lt;O&gt;&lt;BR /&gt;&lt;BR /&gt;: error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;&lt;BR /&gt;tensor.f(2): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;2. implicit none &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(2): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;2. implicit none &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % : . = =&amp;gt;&lt;BR /&gt;1.program read_data &lt;BR /&gt;----------------------^&lt;BR /&gt;tensor.f(3): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;3. integer stepno, arrsiz &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(3): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;3. integer stepno, arrsiz &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(2): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % : . = =&amp;gt;&lt;BR /&gt;2. implicit none &lt;BR /&gt;---------------------^&lt;BR /&gt;tensor.f(4): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;4. real steptime, datum &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(4): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;4. real steptime, datum &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(3): error #5082: Syntax error, found ',' when expecting one of: ( % : . = =&amp;gt;&lt;BR /&gt;3. integer stepno, arrsiz &lt;BR /&gt;-------------------^&lt;BR /&gt;tensor.f(5): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;5. real, allocatable :: array(:) &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(5): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;5. real, allocatable :: array(:) &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(4): error #5082: Syntax error, found ',' when expecting one of: ( % : . = =&amp;gt;&lt;BR /&gt;4. real steptime, datum &lt;BR /&gt;------------------^&lt;BR /&gt;tensor.f(6): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;6. integer iunit &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(6): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;6. integer iunit &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(5): error #5082: Syntax error, found ',' when expecting one of: ( % : . = =&amp;gt;&lt;BR /&gt;5. real, allocatable :: array(:) &lt;BR /&gt;---------^&lt;BR /&gt;tensor.f(5): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ) ,&lt;BR /&gt;5. real, allocatable :: array(:) &lt;BR /&gt;-------------------------------------^&lt;BR /&gt;tensor.f(7): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;7. &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(8): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;8. open(newunit=iunit,file='STATIS',status='old') &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(8): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;8. open(newunit=iunit,file='STATIS',status='old') &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(7): error #5156: Labelled statement is empty&lt;BR /&gt;7. &lt;BR /&gt;----^&lt;BR /&gt;tensor.f(6): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % : . = =&amp;gt;&lt;BR /&gt;6. integer iunit &lt;BR /&gt;---------------------^&lt;BR /&gt;tensor.f(7): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE CHARACTER CLASS DOUBLE ...&lt;BR /&gt;7. &lt;BR /&gt;----^&lt;BR /&gt;tensor.f(9): error #5149: Illegal character in statement label field [.]&lt;BR /&gt;9. read(iunit,'()') &lt;BR /&gt;-^&lt;BR /&gt;tensor.f(9): error #5148: A continuation character is illegal on a line with a statement label&lt;BR /&gt;9. read(iunit,'()') &lt;BR /&gt;-----^&lt;BR /&gt;tensor.f(8): error #5082: Syntax error, found '=' when expecting one of: ( * ) :: , &lt;END-OF-STATEMENT&gt; ; + . - % (/ [ : ] /) . ** / // ...&lt;BR /&gt;8. open(newunit=iunit,file='STATIS',status='old') &lt;BR /&gt;-----------------^&lt;BR /&gt;(10): catastrophic error: Too many errors, exiting&lt;BR /&gt;compilation aborted for tensor.f (code 1)&lt;BR /&gt;--------------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;what's you idea?&lt;BR /&gt;&lt;/END-OF-STATEMENT&gt;&lt;/O&gt;&lt;/R&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2011 20:32:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751975#M8118</guid>
      <dc:creator>hamid_mosaddeghi</dc:creator>
      <dc:date>2011-01-10T20:32:04Z</dc:date>
    </item>
    <item>
      <title>I need simple fortran code for read data from file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751976#M8119</link>
      <description>Beacause you gave the file a .f extension, the compiler assumed it would be fixed-form, whereas the code above is free-form.&lt;BR /&gt;&lt;BR /&gt;Try renaming the file with a .f90 extension instead.</description>
      <pubDate>Tue, 11 Jan 2011 14:34:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751976#M8119</guid>
      <dc:creator>Alexis_R_</dc:creator>
      <dc:date>2011-01-11T14:34:25Z</dc:date>
    </item>
    <item>
      <title>I need simple fortran code for read data from file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751977#M8120</link>
      <description>Hi Dear Rohou&lt;BR /&gt;&lt;BR /&gt;I do thing that you said (ifort tensor.f90) ,but I get this error:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;tensor.f90(8): error #6640: This input/output keyword is invalid. [NEWUNIT]&lt;BR /&gt; open(newunit=iunit,file='STATIS',status='old') &lt;BR /&gt;--------^&lt;BR /&gt;tensor.f90(8): error #6332: A UNIT= specifier is required for this I/O operation.&lt;BR /&gt; open(newunit=iunit,file='STATIS',status='old') &lt;BR /&gt;---^&lt;BR /&gt;tensor.f90(12): error #6323: This label is not defined in this scoping unit. [10]&lt;BR /&gt; read(iunit,'(i10,f14.0,i10)',end=10) &amp;amp; &lt;BR /&gt;----------------------------------------^&lt;BR /&gt;compilation aborted for tensor.f90 (code 1)</description>
      <pubDate>Tue, 11 Jan 2011 15:34:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751977#M8120</guid>
      <dc:creator>hamid_mosaddeghi</dc:creator>
      <dc:date>2011-01-11T15:34:58Z</dc:date>
    </item>
    <item>
      <title>I need simple fortran code for read data from file</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751978#M8121</link>
      <description>As for the first two, I think that NEWUNIT is a Fortran 2003 (or 2008?) keyword, and you can only use it with newer versions of the compiler. Change the lines to a fixed unit number like 23 in the following:&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;open(unit=23,file='STATIS',status='old')&lt;/DIV&gt;&lt;DIV&gt;and also change the iunit variable in the reads to 23 (or whatever unit number you use)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The other error, I am not sure. The line says that when if finds the end of the file, it should go to the line labelled 10 below. Make sure you wrote a 10 there (one zero)?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I compiled the code ok with ifort 12.0 and with 11.1.084, no changes were necessary.&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jan 2011 21:50:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/I-need-simple-fortran-code-for-read-data-from-file/m-p/751978#M8121</guid>
      <dc:creator>fercook</dc:creator>
      <dc:date>2011-01-14T21:50:54Z</dc:date>
    </item>
  </channel>
</rss>

