diff --git a/checks/test.f90 b/checks/test.f90 index 7f3ea52fd37cc5ace0050fe0884ee73384263638..8932562d2a31734e8a8d23f715eb35dd59246df9 100644 --- a/checks/test.f90 +++ b/checks/test.f90 @@ -32,6 +32,9 @@ PROGRAM TEST call do_timing_tests(5) call do_high_weight_tests #endif +#ifdef LONG_TEST + call do_long_test +#endif #endif #endif @@ -42,7 +45,6 @@ PROGRAM TEST stop 1 end if stop - call do_long_test CONTAINS @@ -655,6 +657,7 @@ CONTAINS end subroutine #endif +#ifdef LONG_TEST SUBROUTINE DO_LONG_TEST #if KINDREAL==16 @@ -670,16 +673,18 @@ CONTAINS type(inum), dimension(nzero+nieps+ncmpl) :: basis type(inum), dimension(size(perweight)) :: args type(inum), parameter :: ione = inum((1._prec,0._prec), di0) - integer i, j, w, seed + integer i, j, w, seed, oldseed integer(kind=1) i0 real(kind=prec) :: v, maxd complex(kind=prec) :: ans(2) complex(kind=8) :: geval + character,parameter :: cr = achar(13) maxd=0._prec seed = 112312 tol = 0.01 + open(unit=9, action='write', form='unformatted', file="long-test.txt") basis(1:nzero) = izero do i=nzero+1,nzero+nieps @@ -697,8 +702,9 @@ CONTAINS enddo do w=1,size(perweight) - print*,"Testing ",perweight(w)," GPLs with w=",w do i=1,perweight(w) + oldseed = seed + write( * , 900, advance='no' ) cr, i, perweight(w), w args(1:w) = basis((/ (1+int(size(basis)*ran2(seed)),j=1,w) /)) #if KINDREAL==16 ans(1) = cmplx(geval(inum2inum([args(1:w),ione]), w+1),kind=prec) @@ -706,20 +712,29 @@ CONTAINS ans(1) = cmplx(geval([args(1:w),ione], w+1),kind=prec) #endif ans(2) = G(args(1:w),ione) + write(9) w,i,oldseed, abs(ans(1)-ans(2)) if(abs(ans(1)-ans(2)) > maxd) maxd = abs(ans(1)-ans(2)) if(abs(ans(1)-ans(2)) > tol) goto 123 enddo + print*,' done. largest=',maxd + maxd=0. enddo print*,maxd + close(9) + return 123 continue print*,"Failed with delta",abs(ans(1)-ans(2)) print*,"Offending G was",args(1:w) print*,ans + close(9) + +900 FORMAT(a , 'Testing ',i5,'/',i5,' GPLs with w=',i1) END SUBROUTINE +#endif FUNCTION RAN2(randy) ! This is the usual "random"