<?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 Explicit Do Loop Write in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757921#M13408</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;Are there any ifort 8.0 compiler options to optimize explicit do loop writes from a large array using direct access? I know it would be more beneficial to use an implicit loop or write out the array directly, but I found some old code that took about 15 times longer to run using ifort when compared with the portland group compiler. I verified this with a simple program using a 3 nested do loops with a write statement.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thank you,&lt;/DIV&gt;
&lt;DIV&gt;Jeremy Ross &lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 12 Dec 2003 16:04:28 GMT</pubDate>
    <dc:creator>jdr147</dc:creator>
    <dc:date>2003-12-12T16:04:28Z</dc:date>
    <item>
      <title>Explicit Do Loop Write</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757921#M13408</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;Are there any ifort 8.0 compiler options to optimize explicit do loop writes from a large array using direct access? I know it would be more beneficial to use an implicit loop or write out the array directly, but I found some old code that took about 15 times longer to run using ifort when compared with the portland group compiler. I verified this with a simple program using a 3 nested do loops with a write statement.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thank you,&lt;/DIV&gt;
&lt;DIV&gt;Jeremy Ross &lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Dec 2003 16:04:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757921#M13408</guid>
      <dc:creator>jdr147</dc:creator>
      <dc:date>2003-12-12T16:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Explicit Do Loop Write</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757922#M13409</link>
      <description>&lt;DIV&gt;Can you give an example? I'm uncertain what is it your code does.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Have you tried opening the file with BUFFERED='YES'?&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Dec 2003 23:05:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757922#M13409</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-12-12T23:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Explicit Do Loop Write</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757923#M13410</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;FONT size="2"&gt;
&lt;P&gt;Belowis an example. I realize this example is not optimal, but the arrays in my real program must be written out in varying orders and may require writig individual elements. Also, I believe the option -assume buffered_io is only for sequential writing.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;PROGRAM test&lt;/P&gt;
&lt;P&gt;integer,parameter :: imax=500,jmax=500,kmax=50&lt;BR /&gt;real,dimension(imax,jmax,kmax) :: var&lt;BR /&gt;integer :: i,j,k,irec&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;open (UNIT=10, file="test.bin", FORM="unformatted", status="replace", access="direct",recl=4)&lt;/P&gt;
&lt;P&gt;irec=1&lt;BR /&gt;do k=1,kmax&lt;BR /&gt;do j=1,jmax&lt;BR /&gt; do i=1,imax&lt;BR /&gt; var(i,j,k)=i+j+k&lt;BR /&gt; write (unit=10,rec=irec) var(i,j,k)&lt;BR /&gt; irec=irec+1&lt;BR /&gt; enddo&lt;BR /&gt;enddo&lt;BR /&gt;enddo&lt;/P&gt;
&lt;P&gt;close(10)&lt;/P&gt;&lt;/FONT&gt;
&lt;DIV&gt;END PROGRAM test&lt;/DIV&gt;</description>
      <pubDate>Sat, 13 Dec 2003 00:31:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757923#M13410</guid>
      <dc:creator>jdr147</dc:creator>
      <dc:date>2003-12-13T00:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Explicit Do Loop Write</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757924#M13411</link>
      <description>&lt;DIV&gt;Intel Fortran makes no attempt to optimize this. But I think you could accomplish the same thing by opening the file FORM='BINARY' and using sequential writes. Do use BUFFERED='YES' - it should help.&lt;/DIV&gt;</description>
      <pubDate>Sat, 13 Dec 2003 00:44:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757924#M13411</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-12-13T00:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Explicit Do Loop Write</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757925#M13412</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Thanks, I will rewrite some of my code to optimize it. I just thought there may be an option that could internally optimize the loops and io like is done with the intrinsic do loop. This may be why the portland compiler is faster for this type of io. Otherwise, for numerical computations I have found ifort to be 20-30% faster than portland group's compiler, nice job intel. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 13 Dec 2003 00:56:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757925#M13412</guid>
      <dc:creator>jdr147</dc:creator>
      <dc:date>2003-12-13T00:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Explicit Do Loop Write</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757926#M13413</link>
      <description>&lt;DIV&gt;Well, it's not clear to me how one can optimize this automatically- you're writing separate records, which has a different meaning than an implied DO loop in a single WRITE. Doing a lot of small WRITEs can be problematic for performance.&lt;/DIV&gt;</description>
      <pubDate>Sat, 13 Dec 2003 01:54:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Explicit-Do-Loop-Write/m-p/757926#M13413</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-12-13T01:54:38Z</dc:date>
    </item>
  </channel>
</rss>

