<?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: Slow WRITE in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822508#M48451</link>
    <description>We have noticed slower network access with CVF (6.6 on NT and XP) but have not been able to trace it - we cannot be sure it's CVF that is the problem though.</description>
    <pubDate>Fri, 21 Feb 2003 21:58:30 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2003-02-21T21:58:30Z</dc:date>
    <item>
      <title>Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822502#M48445</link>
      <description>I have a model that outputs a diagnostic file. If I open the diagnostic file like this:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;
	OPEN ( UNIT = OptimDiagnosticLun, 
	1	FILE = TempFileName,
	1	STATUS = 'UNKNOWN',
	1	ACTION = 'WRITE', 
	1	IOSTAT = ios )
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;the model takes 14.04 seconds to run and produce the output file.&lt;BR /&gt;&lt;BR /&gt;If I open the file like this:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;
	OPEN ( UNIT = OptimDiagnosticLun, 
	1	FILE = TempFileName,
	1	STATUS = 'UNKNOWN',
	1	IOSTAT = ios )
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;the model takes only 0.67 seconds to run and produce the output file.&lt;BR /&gt;&lt;BR /&gt;Why?</description>
      <pubDate>Thu, 20 Feb 2003 01:01:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822502#M48445</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2003-02-20T01:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822503#M48446</link>
      <description>Compiler name and version?&lt;BR /&gt;&lt;BR /&gt;Nothing comes to mind offhand...  Is it actually the WRITEs that are slow?  What if you comment out the WRITEs from both versions?&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 20 Feb 2003 02:18:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822503#M48446</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-02-20T02:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822504#M48447</link>
      <description>Sorry Steve - I always forget that, CVF 6.6B on Windows 2000.&lt;BR /&gt;&lt;BR /&gt;I'm actually comparing a new version with an old version. I expected the new one to be quicker, was using diagnostics to check the results and was surprised to find I was wrong. The above difference is the only change that has been made relating to diagnostics, so I don't think commenting out all the WRITEs would show anything. Besides which, there are hundreds of them spread over tens of files! I noticed this because the new version WAS faster when I turned the diagnostics off completely.&lt;BR /&gt;&lt;BR /&gt;I did some more tests this morning with full diagnostics:&lt;BR /&gt;&lt;BR /&gt;Old version: 17 iterations in 5.70s&lt;BR /&gt;New version with ACTION='WRITE': 11 iterations in 106.5s&lt;BR /&gt;New version without ACTION='WRITE': 11 iterations in 2.31s&lt;BR /&gt;(all producing 5.57 MB of diagnostic output)&lt;BR /&gt;&lt;BR /&gt;I did notice that with ACTION='WRITE' hardly any processor time was being used by my process (usually it grabs as much as it can).&lt;BR /&gt;&lt;BR /&gt;The file is being written to a UNC path on our network.&lt;BR /&gt;&lt;BR /&gt;ACTION='WRITE' was added to prevent crashes when trying to write to read only files, and the only explanation I can think of is that it is adding some kind of over head to every WRITE statement (a 'writeability' check?)...&lt;BR /&gt;&lt;BR /&gt;Dan</description>
      <pubDate>Thu, 20 Feb 2003 17:38:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822504#M48447</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2003-02-20T17:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822505#M48448</link>
      <description>Steve, I tested some more and it seems to be a problem with network writing. I used the following test program to demonstrate:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;!****************************************************************************
!
!  PROGRAM: FWriteTest
!
!****************************************************************************

	PROGRAM FWriteTest

	IMPLICIT NONE

	! Variables

	CHARACTER	FileName*260
	INTEGER*4	i, ios
	REAL*8		start, fin, time
!****************************************************************************
	! Body of FWriteTest
	
	!FileName = 'C:TempFWriteTestTestOutput1.txt'
	FileName = 'SRV-OSPREYDEVTestOutput1.txt'

	OPEN ( UNIT = 1, FILE = FileName, STATUS = 'UNKNOWN', ACTION = 'WRITE', IOSTAT = ios, BUFFERED = 'YES' )

	CALL CPU_TIME(start)
	DO i = 1, 100000
		WRITE (1, *) 'All work and no play makes Jack a dull boy.'
	END DO
	CALL CPU_TIME(fin)

	time = fin - start

	WRITE (1, '(A, G10.5)') 'Time:', time
!****************************************************************************
	CLOSE (UNIT=1)

	!FileName = 'C:TempFWriteTestTestOutput2.txt'
	FileName = 'SRV-OSPREYDEVTestOutput2.txt'

	OPEN ( UNIT = 1, FILE = FileName, STATUS = 'UNKNOWN', IOSTAT = ios, BUFFERED = 'YES' )

	CALL CPU_TIME(start)
	DO i = 1, 100000
		WRITE (1, *) 'All work and no play makes Jack a dull boy.'
	END DO
	CALL CPU_TIME(fin)

	time = fin - start

	WRITE (1, '(A, G10.5)') 'Time:', time

	CLOSE (UNIT=1)
!****************************************************************************
	END PROGRAM FWriteTest

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;At first I didn't have the BUFFERED statement, and it took 9.3s to write with ACTION='WRITE' and 0.5s to write without. Buffering helps, bring both times down to about 0.1s, but it is still slightly faster without the ACTION='WRITE'</description>
      <pubDate>Thu, 20 Feb 2003 18:09:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822505#M48448</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2003-02-20T18:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822506#M48449</link>
      <description>Steve, I tested some more and it seems to be a problem with network writing. I used the following test program to demonstrate:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;!*********************************************************
!
!  PROGRAM: FWriteTest
!
!*********************************************************

PROGRAM FWriteTest

IMPLICIT NONE

! Variables

CHARACTER	FileName*260
INTEGER*4	i, ios
REAL*8		start, fin, time
!*********************************************************
! Body of FWriteTest
	
!FileName = 'C:TempFWriteTestTestOutput1.txt'
FileName = 'SRV-OSPREYDEVTestOutput1.txt'

OPEN ( UNIT = 1, FILE = FileName, STATUS = 'UNKNOWN', ACTION = 'WRITE', IOSTAT = ios, BUFFERED = 'YES' )

CALL CPU_TIME(start)
DO i = 1, 100000
	WRITE (1, *) 'All work and no play makes Jack a dull boy.'
END DO
CALL CPU_TIME(fin)

time = fin - start

WRITE (1, '(A, G10.5)') 'Time:', time
CLOSE (UNIT=1)
!*********************************************************
!FileName = 'C:TempFWriteTestTestOutput2.txt'
FileName = 'SRV-OSPREYDEVTestOutput2.txt'

OPEN ( UNIT = 1, FILE = FileName, STATUS = 'UNKNOWN', IOSTAT = ios, BUFFERED = 'YES' )

CALL CPU_TIME(start)
DO i = 1, 100000
	WRITE (1, *) 'All work and no play makes Jack a dull boy.'
END DO
CALL CPU_TIME(fin)

time = fin - start

WRITE (1, '(A, G10.5)') 'Time:', time

CLOSE (UNIT=1)
!*********************************************************
END PROGRAM FWriteTest

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;At first I didn't have the BUFFERED statement, and it&lt;BR /&gt;took 9.3s to write with ACTION='WRITE' and 0.5s to write&lt;BR /&gt;without. Buffering helps, bring both times down to about 0.1s, but it is still slightly faster without the ACTION='WRITE'</description>
      <pubDate>Thu, 20 Feb 2003 18:13:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822506#M48449</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2003-02-20T18:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822507#M48450</link>
      <description>Ah, the file is on a network share.  You didn't tell us that originally!&lt;BR /&gt;&lt;BR /&gt;I don't know why ACTION='WRITE' makes a difference, but I'm guessing this causes the Windows file system to do something different.  CVF just passes that as part of the arguments to CreateFile.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Fri, 21 Feb 2003 00:38:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822507#M48450</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-02-21T00:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Slow WRITE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822508#M48451</link>
      <description>We have noticed slower network access with CVF (6.6 on NT and XP) but have not been able to trace it - we cannot be sure it's CVF that is the problem though.</description>
      <pubDate>Fri, 21 Feb 2003 21:58:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-WRITE/m-p/822508#M48451</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2003-02-21T21:58:30Z</dc:date>
    </item>
  </channel>
</rss>

