Skip to content

Commit 261e551

Browse files
committed
remove read statements from tests so that can be run in CI
replaced with loops to run all the tests
1 parent adc7897 commit 261e551

File tree

5 files changed

+32
-41
lines changed

5 files changed

+32
-41
lines changed

test/file15.f90

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ program test
2727
!
2828
! **********
2929
integer i , ic , info , k , lwa , n , NFEv , NPRob , nread , &
30-
& ntries , nwrite
30+
ntries , nwrite, icase
3131
integer na(60) , nf(60) , np(60) , nx(60)
3232
double precision factor , fnorm1 , fnorm2 , one , ten , tol
3333
double precision fnm(60) , fvec(40) , wa(2660) , x(40)
@@ -44,9 +44,10 @@ program test
4444
tol = dsqrt(dpmpar(1))
4545
lwa = 2660
4646
ic = 0
47-
100 read (nread,99001) NPRob , n , ntries
48-
99001 format (3i5)
49-
if ( NPRob<=0 ) then
47+
n = 5
48+
ntries = 1
49+
do NPRob = 1, 16
50+
if ( NPRob==16 ) then
5051
write (nwrite,99002) ic
5152
99002 format ('1SUMMARY OF ',i3,' CALLS TO HYBRD1'/)
5253
write (nwrite,99003)
@@ -82,12 +83,9 @@ program test
8283
&' FINAL APPROXIMATE SOLUTION'//(5x,5d15.7))
8384
factor = ten*factor
8485
enddo
85-
goto 100
8686
endif
87-
!
88-
! LAST CARD OF DRIVER.
89-
!
90-
end
87+
end do
88+
end program test
9189

9290
subroutine fcn(n,x,Fvec,Iflag)
9391
implicit none

test/file16.f90

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ program test
4646
ldfjac = 40
4747
lwa = 1060
4848
ic = 0
49-
100 read (nread,99001) NPRob , n , ntries
50-
99001 format (3i5)
51-
if ( NPRob<=0 ) then
49+
n = 5
50+
ntries = 1
51+
do NPRob = 1, 16
52+
if ( NPRob==16 ) then
5253
write (nwrite,99002) ic
5354
99002 format ('1SUMMARY OF ',i3,' CALLS TO HYBRJ1'/)
5455
write (nwrite,99003)
@@ -88,12 +89,9 @@ program test
8889
&' FINAL APPROXIMATE SOLUTION'//(5x,5d15.7))
8990
factor = ten*factor
9091
enddo
91-
goto 100
9292
endif
93-
!
94-
! LAST CARD OF DRIVER.
95-
!
96-
end
93+
end do
94+
end program test
9795

9896
subroutine fcn(n,x,Fvec,Fjac,Ldfjac,Iflag)
9997
implicit none

test/file17.f90

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ program test
4747
ldfjac = 65
4848
lwa = 265
4949
ic = 0
50-
100 read (nread,99001) NPRob , n , m , ntries
51-
99001 format (4i5)
52-
if ( NPRob<=0 ) then
50+
n = 40
51+
m = 65
52+
ntries = 1
53+
do NPRob = 1, 20
54+
if ( NPRob==20) then
5355
write (nwrite,99002) ic
5456
99002 format ('1SUMMARY OF ',i3,' CALLS TO LMDER1'/)
5557
write (nwrite,99003)
@@ -91,12 +93,9 @@ program test
9193
&' FINAL APPROXIMATE SOLUTION'//(5x,5d15.7))
9294
factor = ten*factor
9395
enddo
94-
goto 100
9596
endif
96-
!
97-
! LAST CARD OF DRIVER.
98-
!
99-
end
97+
end do
98+
end program test
10099

101100
subroutine fcn(m,n,x,Fvec,Fjac,Ldfjac,Iflag)
102101
implicit none

test/file19.f90

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ program test
4545
tol = dsqrt(dpmpar(1))
4646
lwa = 2865
4747
ic = 0
48-
100 read (nread,99001) NPRob , n , m , ntries
49-
99001 format (4i5)
50-
if ( NPRob<=0 ) then
48+
n = 40
49+
m = 65
50+
ntries = 1
51+
do NPRob = 1, 20
52+
if ( NPRob==20 ) then
5153
write (nwrite,99002) ic
5254
99002 format ('1SUMMARY OF ',i3,' CALLS TO LMDIF1'/)
5355
write (nwrite,99003)
@@ -90,12 +92,9 @@ program test
9092
&' FINAL APPROXIMATE SOLUTION'//(5x,5d15.7))
9193
factor = ten*factor
9294
enddo
93-
goto 100
9495
endif
95-
!
96-
! LAST CARD OF DRIVER.
97-
!
98-
end
96+
end do
97+
end program test
9998

10099
subroutine fcn(m,n,x,Fvec,Iflag)
101100
implicit none

test/file20.f90

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ program test
4141
& .false./
4242
data cp , one/1.23d-1 , 1.0d0/
4343
ldfjac = 10
44-
100 read (nread,99001) nprob , n
45-
99001 format (2i5)
46-
if ( nprob<=0 ) then
44+
n = 10
45+
do nprob = 1, 15
46+
if ( nprob==15 ) then
4747
write (nwrite,99002) lnp
4848
99002 format ('1SUMMARY OF ',i3,' TESTS OF CHKDER'/)
4949
write (nwrite,99003)
@@ -86,12 +86,9 @@ program test
8686
99007 format (//5x,' FUNCTION DIFFERENCE VECTOR'//(5x,5d15.7))
8787
write (nwrite,99008) (err(i),i=1,n)
8888
99008 format (//5x,' ERROR VECTOR'//(5x,5d15.7))
89-
goto 100
9089
endif
91-
!
92-
! LAST CARD OF DERIVATIVE CHECK TEST DRIVER.
93-
!
94-
end
90+
end do
91+
end program test
9592

9693
subroutine errjac(n,x,Fjac,Ldfjac,Nprob)
9794
implicit none

0 commit comments

Comments
 (0)