警告缺少以下符号
WARNING the following symbols are missing
我编写的代码使用了模块结构。
模块由子程序和函数组成。其中一些由主程序调用,另一些由放置在模块中的子程序调用。
这是模块中与我的问题相关的重要部分:
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)
与主程序放在同一代码中的模块。
上述子程序独立于主程序,函数只是在模块子程序中使用。
当我构建这段代码时,它显示了这个警告:
WARNING the following symbols are missing
当我 运行 代码时,它显示了这个错误:
run-time error: Call to missing routine
错误返回到模块子程序中调用的函数。
这个程序在 PLATO (Fortran 95) 中是 运行。
任何给我一点帮助的意见都将不胜感激,也请原谅我写的不足
请参阅 1 中提到的详细信息。总结:
This local declaration overrides the module function within this
subroutine. Thus the subsequent reference is looking for an external
function of that name, which apparently does not exist, and if it did,
then you would not be computing what you think you are computing. Just
remove this declaration to fix your 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)
与主程序放在同一代码中的模块。 上述子程序独立于主程序,函数只是在模块子程序中使用。
当我构建这段代码时,它显示了这个警告:
WARNING the following symbols are missing
当我 运行 代码时,它显示了这个错误:
run-time error: Call to missing routine
错误返回到模块子程序中调用的函数。
这个程序在 PLATO (Fortran 95) 中是 运行。
任何给我一点帮助的意见都将不胜感激,也请原谅我写的不足
请参阅 1 中提到的详细信息。总结:
This local declaration overrides the module function within this subroutine. Thus the subsequent reference is looking for an external function of that name, which apparently does not exist, and if it did, then you would not be computing what you think you are computing. Just remove this declaration to fix your problem.