Commit 2f0e652e authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Updating the size of the mergesort test to reduce overhead. Removed duplicate print.

parent 08a6ca0a
Pipeline #20000 failed with stages
in 6 minutes and 30 seconds
......@@ -8,9 +8,11 @@
real, allocatable :: indices(:)
call DATE_AND_TIME(d1, d2, d3, time)
dtime1 = time(6)*60.+time(7)+time(8)/1000.
n = 100000000
n = 1000
allocate (a(n))
allocate (indices(n))
! avoid unitialised value warning
indices = 0
do i=1, time(7)
call RANDOM_NUMBER(dtime2)
end do
......@@ -28,8 +30,6 @@
print "(10f12.3/10f12.0)", (a(i), i=1, 10), (indices(i), i=1, 10)
print "(10f12.3/10f12.0)", (a(i), i=n-9, n), (indices(i), i=n-9, n)
call merge_sort(n, a, indices)
print "(10f12.3/10f12.0)", (a(i), i=1, 10), (indices(i), i=1, 10)
print "(10f12.3/10f12.0)", (a(i), i=n-9, n), (indices(i), i=n-9, n)
call DATE_AND_TIME(d1, d2, d3, time)
print *, "First/Last 10 elements after sorting"
print "(10f12.3/10f12.0)", (a(i), i=1, 10), (indices(i), i=1, 10)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment