Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add timing thresholds to test codes #532

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions test/outtest4.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ program outtest4

character cmgtag*8, smid*9, dummystr*9

real cpu_time_start, cpu_time_end, cpu_secs
real*8 wall_secs
integer*8 wall_ctr_start, wall_ctr_end, wall_ctr_numpersec, wall_ctr_max, wall_ctr_total

! Start the program timings.

call system_clock ( count_rate = wall_ctr_numpersec, count_max = wall_ctr_max )
print *, 'wall_ctr_numpersec, wall_ctr_max = ', wall_ctr_numpersec, wall_ctr_max
call system_clock ( count = wall_ctr_start )
print *, 'wall_ctr_start = ', wall_ctr_start

call cpu_time ( cpu_time_start )
print *, 'cpu_time_start = ', cpu_time_start

print *, 'Testing writing OUT_4 using OPENBF IO = NODX and IO = QUIET, and using STRCPT, WRDXTB and WRITSA'

#ifdef KIND_8
Expand Down Expand Up @@ -250,4 +264,18 @@ program outtest4
ilenb = iupbs01(mgbf2, 'LENM')
IF (ilenb-ilena .ne. 6) stop 20

! End the program timings and check the results.

call system_clock ( count = wall_ctr_end )
print *, 'wall_ctr_end = ', wall_ctr_end
wall_ctr_total = wall_ctr_end - wall_ctr_start
if ( wall_ctr_total < 0 ) wall_ctr_total = wall_ctr_total + wall_ctr_max
wall_secs = real( wall_ctr_total, 8 ) / real( wall_ctr_numpersec, 8 )
print '("wall_secs = ",f8.3)', wall_secs

call cpu_time ( cpu_time_end )
print *, 'cpu_time_end = ', cpu_time_end
cpu_secs = cpu_time_end - cpu_time_start
print '("cpu_secs = ",f8.3)', cpu_secs

end program outtest4