- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since a couple of days ago (early April 2023), the forum software has started displaying Fortran code with different font sizes for Fortran keywords and user variables. The result is not pleasant to view.
Secondly, the vertical spacing between the line number in the code display is different from the vertical spacing between lines of code, as the code sample below shows. Look at the last line of the code. On my display with Edge or Firefox as the browser, that line appears to have a line number of 69.5 instead of 70.
This disparity is not so apparent when one is creating a new message or a reply, but becomes apparent after posting.
program fpubench
implicit none
integer, parameter :: maxsiz = 2000, nrep = 5000
real*8 a(maxsiz,maxsiz), b(maxsiz), c(maxsiz,maxsiz)
integer dinfo, i, j, mtype, nsiz, nl, irep, rl
real*8 cputimesecs, finish, start, gflop, gflops
character*12 :: stars = "(1x,80('*'))"
mtype = 1
dinfo = 1
nsiz = maxsiz
print stars
write (*,'(1x,a,i0,a,i0)') 'Running ',nrep, &
' times with Matrix size ', nsiz
! Begin Computational Kernel
call cpu_time(start)
do irep = 1, nrep
do j = 1, nsiz
b(j) = dble(j)
do i = 1, nsiz
if ( i < j ) then
a(i,j) = 0.0d0
c(i,j) = 0.0d0
else
a(i,j) = dble(2*i+3*j) + 0.005*irep
c(i,j) = a(i,j)*b(j)
endif
enddo
enddo
!call check(nsiz, c)
enddo
call cpu_time(finish)
call check(nsiz, c)
! End Computational Kernel
cputimesecs = finish - start
gflop = real(nsiz*nsiz,8)*nrep/1.0d9
if ( cputimesecs/=0.0d0 ) then
gflops = gflop/cputimesecs
else
gflops = -999.0
endif
write (*,*) 'lower triangular matrix'
write (*,'(3(1x,a,g12.3))') 'a = ', a(1,1), 'b = ', b(1), 'c = ', c(1,1)
write (*,'(3(1x,a,g12.3))') 'a = ', a(nsiz,1), 'b = ', b(1), 'c = ', c(nsiz,1)
write (*,'(1x,a,f10.3)') 'total number of floating point calcs (gflop): ', gflop
write (*,'(1x,a,f10.3)') 'total cpu time (seconds); ', cputimesecs
write (*,'(1x,a,f10.3)') 'floating point ops per sec (gflops); ', gflops
print stars
write (*,*) 'fpu_bench has finished running'
end program
subroutine check(n,c)
implicit none
integer, intent(in) :: n
real*8, intent(in) :: c(n,n)
integer i,j,nrep
nrep = 5000
do j = 1, n
do i = 1, n
if(j > i)then
if(c(i,j) /= 0.0d0)print '(1x,2i5,es12.4)',i,j,c(i,j)
else
if(c(i,j) /= dble((2*i+3*j+0.005*nrep)*j))print '(1x,2i5,es12.4)',i,j,c(i,j)
endif
enddo
enddo
return
end subroutine ! Should be line 70
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FWIW pasting
call cpu_time(start)
into Word shows "call" as Consolas 12 and cpu_time as consolas 10.5
These should be Courier 12 (or some fixed pitch font, uniform for all text).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mixed font problem was fixed a couple of days after the original post, but without notification here, so a person viewing the original post in the future may wonder what the fuss is all about. Anyway, "problem solved!"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Internal to Intel:
Hey Intern someone is complaining about the website font and now the forum people want it fixed.
12 hours later, the intern after reading many manuals says to boss, no idea.
Boss says, do this, 30 seconds later fixed.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page