- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
In a simple ASCII-file read subroutine I observed a strange performance loss behavior only in x64 release mode but not in x64 debug, Win32 debug and Win32 release mode. In every release case I use /o3 (ifort 15.0.0.108), in debug optimization is turned off. The release reading performance in the latter three cases is nearly the same. The ASCII file contains x, y, z coordinates of a grid (1025 lines). Commenting the preprocessor commands and the screen output makes no difference.
But, if I use /o2 for this subroutine the performance is the same as for the three other cases, reading the files takes now 1 second instead of 12 seconds. Is it possible to find the reason for this behavior with only the information from the code snipped? In /o3 the vectorrization report shows the lopps do i.. and d j .. are vectorized. In /o2 they are not. In Win32 /o3 there are also vectorized, but no performance issue is seen. (r3grid is a double precision real array).
Any hint is welcome, Johannes
[fortran]
ie = len_trim(t0grid)
inquire(file=t0grid(1:ie), exist=l0in)
if (l0in) then
open(i0ugrid,file=t0grid(1:ie),status='old',buffered='YES',action='read')
else
write(*,9900) t0grid(1:ie)
pause
stop
end if
!
! *** read the mesh
read(i0ugrid,'(a)') t0dumy ! skip header
read(i0ugrid,*) t0circ,i0schnitte,t0profil,i0profilpunkte,t0dim,i0dim
!
allocate(r3grid(i0schnitte,i0profilpunkte,i0dim))
!
write(t0s,'(i4)') i0schnitte
write(t0p,'(i4)') i0profilpunkte
write(t0d,'(i4)') i0dim
call write_both( ' - Read GRID with '//t0s// &
& ' sections and '//t0p//' nodes in ' &
& //t0d//' dimensions')
!
#if defined(_WIN32) || defined(_WIN64)
open(6,carriagecontrol ='fortran')
#endif
do i = 1, i0schnitte
do j = 1, i0profilpunkte
read(i0ugrid,*) r3grid(i,j,1:i0dim)
end do
#if defined(_WIN32) || defined(_WIN64)
write(6,'("+ Progress: ",i4," von ",i4," Sections read.")') i,i0schnitte
#endif
end do
#if defined(_WIN32) || defined(_WIN64)
open(6,carriagecontrol ='list')
#endif
[/fortran]
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page