I write code that uses the module structure.
The module consisted of subroutine and function. Some of them are called by the main prog and others are called by subroutines that placed in the module.
Here is the important part of the module which related to my problem:
module de
implicit none
public :: dsftdw ...
Private :: dless ...
contains
.
.
.
subroutine dsftdw ( l, u, k, lda, a, MAAP )
implicit none
integer(kind =3) :: lda
integer(kind =3) :: k
integer(kind =3) :: l
integer(kind =3) :: MAAP(:)
integer(kind =3) :: u
real(kind =3) :: a(lda,*)
logical :: dless
integer(kind =3) :: i
integer(kind =3) :: j
integer(kind =3) :: t
i = l
j = 2 * i
t = MAAP(i)
do
if ( u < j ) then
exit
end if
if ( j < u ) then
if ( dless ( k, a(1,maap(j)), a(1,maap(j+1)) ) ) then
j = j + 1
end if
end if
if ( dless ( k, a(1,maap(j)), a(1,t)) ) then
exit
end if
MAAP(i) = MAAP(j)
i = j
j = 2 * i
end do
MAAP(i) = t
end subroutine
.
.
.
function dless ( k, p, q )
implicit none
real(kind =3) :: cmax
logical :: dless
integer(kind =3) :: i
integer(kind =3) k
real(kind =3) :: p(k)
real(kind =3) :: q(k)
real(kind =3) :: tol
tol = 100.0D+00 * epsilon ( tol )
do i = 1, k
cmax = max ( abs ( p(i) ), abs ( q(i) ) )
if ( abs ( p(i) - q(i) ) <= tol * cmax .or. cmax <= tol ) then
cycle
end if
if ( p(i) < q(i) ) then
dless = .true.
else
dless = .false.
end if
return
end do
dless = .false.
end function
.
.
.
end module
(MAIN PROG BLOCK)
The module placed with the Main program in the same code. The above subroutine is independent of the main program and function is just employed in the module subroutine.
When I BUILD this code, it shows this warning:
WARNING the following symbols are missing
And when I run the code, it shows this error:
run-time error: Call to missing routine
Error is back to the function which was called in the module subroutine.
This program is run in PLATO (Fortran 95).
I will appreciate any comments that give me a little help and forgive me for writing shortcomings.