@@ -32,6 +32,7 @@ program test_chkder
3232 [.false. , .false. , .false. , .true. , .false. , .false. , .false. , &
3333 .true. , .false. , .false. , .false. , .false. , .true. , .false. ]
3434 real (wp), parameter :: one = 1.0_wp
35+ real (wp), parameter :: tol = sqrt (dpmpar(1 )) ! ! abstol for matching previously generated solutions
3536 real (wp), parameter :: solution_reltol = 1.0e-4_wp ! ! reltol for matching previously generated solutions
3637
3738 cp = 1.23e-1_wp
@@ -93,7 +94,8 @@ program test_chkder
9394 write (nwrite, ' (//5x, a//(5x, 5d15.7))' ) ' ERROR VECTOR' , (err (i), i= 1 , n)
9495
9596 ! compare with previously generated solutions:
96- if (any (abs ((solution(nprob) - diff)/ (solution(nprob))) > solution_reltol)) then
97+ if (any (abs (solution(nprob) - diff)>tol) .and. &
98+ any (abs ((solution(nprob) - diff)/ (solution(nprob))) > solution_reltol)) then
9799 write (nwrite,' (A)' ) ' Failed case'
98100 write (nwrite, ' (//5x, a//(5x, 5d15.7))' ) ' Expected diff: ' , solution(nprob)
99101 write (nwrite, ' (/5x, a//(5x, 5d15.7))' ) ' Computed diff: ' , diff
0 commit comments