Skip to content

Commit

Permalink
removed loop because 1 test is sufficent to find the compiler bug #495
Browse files Browse the repository at this point in the history
  • Loading branch information
hkershaw-brown committed Oct 23, 2023
1 parent 6c6ac53 commit b1ddaf2
Showing 1 changed file with 8 additions and 40 deletions.
48 changes: 8 additions & 40 deletions developer_tests/random_seq/test_ran_unif.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,19 @@ program test_ran_unif


type (random_seq_type) :: r
integer :: j, i, n, f, seq
logical :: write_this_one
character(len=50) :: formf = '(I12,4(F16.5))'
character(len=256) :: fname, temp

logical :: write_me = .true. ! if true, write each distribution into a file for later diagnostics
integer :: write_limit = 1000000 ! but only if rep count is not greater than this limit

! to add more tests or change the parameters, specify a test count
! and update the sets of inputs here:

integer, parameter :: ntests = 1
integer :: seq

call initialize_utilities('test_ran_unif')

write(*, *) ''

do j=1, ntests

call init_random_seq(r, 5)
call init_random_seq(r, 5)

n = j

! save all values in a file for post-plotting?
write_this_one = (write_me .and. n <= write_limit)

if (write_this_one) then
write(temp, "(A,I10)") "ran_unif_", n
call squeeze_out_blanks(temp, fname)
f = open_file(fname)
endif

seq = ran_twist(r)
seq = ran_twist(r)

if (seq == 953453411) then
write(*,*) 'ran_unif test: PASS'
if (write_this_one) write(f,*) 'PASS'
else
write(*,*) 'ran_unif test: FAIL'
if (write_this_one) write(f,*) 'FAIL'
endif

if (write_this_one) call close_file(f)

enddo
if (seq == 953453411) then
write(*,*) 'ran_unif test: PASS'
else
write(*,*) 'ran_unif test: FAIL'
endif

call finalize_utilities()

Expand Down

0 comments on commit b1ddaf2

Please sign in to comment.