主题:一个调用模块的错误,请大师指点
我先定义了一个 module parameter1
module parameter1
!--------------------------------定 义---------------------------------------
real k ! 有效增殖系数
real e1 ! k的收敛判据
real e2 ! phy的收敛判据
integer n ! 网格数
integer m ! 材料数
real*8,allocatable,save ::d1(:) ! 快群扩散系数
real*8,allocatable,save ::d2(:) ! 热群扩散系数
real*8,allocatable,save ::sigma_a1(:) ! 快群吸收截面
real*8,allocatable,save ::sigma_a2(:) ! 热群吸收截面
real*8,allocatable,save ::sigma_tr1(:) ! 快群移出截面
real*8,allocatable,save ::sigma_tr2(:) ! 热群移出截面
real*8,allocatable,save ::vsigma_f1(:) ! 快群裂变截面
real*8,allocatable,save ::vsigma_f2(:) ! 热群裂变截面
real*8,allocatable,save ::sigma_12(:) ! 快群散射到热群截面
real*8,allocatable,save ::phy1(:) ! 快群中子通量
real*8,allocatable,save ::phy2(:) ! 热群中子通量
real*8,allocatable,save ::dx(:) ! 网格间距
real*8,allocatable,save ::a1(:) ! 三对角矩阵中间量
real*8,allocatable,save ::b1(:) ! 三对角矩阵中间量
real*8,allocatable,save ::c1(:) ! 三对角矩阵中间量
real*8,allocatable,save ::c(:) ! 三对角矩阵下对角线元素
real*8,allocatable,save ::d(:) ! 三对角矩阵主对角线元素
real*8,allocatable,save ::e(:) ! 三对角矩阵上对角线元素
real*8,allocatable,save ::b(:) ! 三对角矩阵方程右端项以及解得的未知数向量
end module parameter1
然后在program 里给参数赋值,
program main
use parameter1
use imsl
!--------------------------------赋 值---------------------------------------
e1=0.00001
e2=0.0001
n=2600
m=2600
do i=1,m
sigma_a1(i)=8.603111E-03
sigma_a2(i)=7.853449E-02
vsigma_f1(i)=6.160544E-03
vsigma_f2(i)=1.207603E-01
sigma_tr1(i)=2.368355E-01
sigma_tr2(i)=9.082422E-01
sigma_12(i)=1.708253E-02
end do
end
最后错误提示 ,这到底是怎么回事啊??
--------------------Configuration: 1d_diffusion_may_19 - Win32 Debug--------------------
Compiling Fortran...
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(10) : Error: The same named entity from different modules and/or program units cannot be referenced. [E1]
e1=0.00001
--------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(10) : Error: This name has already been used as an external function name. [E1]
e1=0.00001
--------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [C]
call LSLTR (n, c, d, e, b)
-------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [D]
call LSLTR (n, c, d, e, b)
----------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [E]
call LSLTR (n, c, d, e, b)
-------------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [B]
call LSLTR (n, c, d, e, b)
----------------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [C]
call LSLTR (n, c, d, e, b)
-------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [D]
call LSLTR (n, c, d, e, b)
----------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [E]
call LSLTR (n, c, d, e, b)
-------------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [B]
call LSLTR (n, c, d, e, b)
----------------------------------------^
Error executing df.exe.
1d_diffusion_may_19.exe - 10 error(s), 0 warning(s)
[color=FF0000][/color]
module parameter1
!--------------------------------定 义---------------------------------------
real k ! 有效增殖系数
real e1 ! k的收敛判据
real e2 ! phy的收敛判据
integer n ! 网格数
integer m ! 材料数
real*8,allocatable,save ::d1(:) ! 快群扩散系数
real*8,allocatable,save ::d2(:) ! 热群扩散系数
real*8,allocatable,save ::sigma_a1(:) ! 快群吸收截面
real*8,allocatable,save ::sigma_a2(:) ! 热群吸收截面
real*8,allocatable,save ::sigma_tr1(:) ! 快群移出截面
real*8,allocatable,save ::sigma_tr2(:) ! 热群移出截面
real*8,allocatable,save ::vsigma_f1(:) ! 快群裂变截面
real*8,allocatable,save ::vsigma_f2(:) ! 热群裂变截面
real*8,allocatable,save ::sigma_12(:) ! 快群散射到热群截面
real*8,allocatable,save ::phy1(:) ! 快群中子通量
real*8,allocatable,save ::phy2(:) ! 热群中子通量
real*8,allocatable,save ::dx(:) ! 网格间距
real*8,allocatable,save ::a1(:) ! 三对角矩阵中间量
real*8,allocatable,save ::b1(:) ! 三对角矩阵中间量
real*8,allocatable,save ::c1(:) ! 三对角矩阵中间量
real*8,allocatable,save ::c(:) ! 三对角矩阵下对角线元素
real*8,allocatable,save ::d(:) ! 三对角矩阵主对角线元素
real*8,allocatable,save ::e(:) ! 三对角矩阵上对角线元素
real*8,allocatable,save ::b(:) ! 三对角矩阵方程右端项以及解得的未知数向量
end module parameter1
然后在program 里给参数赋值,
program main
use parameter1
use imsl
!--------------------------------赋 值---------------------------------------
e1=0.00001
e2=0.0001
n=2600
m=2600
do i=1,m
sigma_a1(i)=8.603111E-03
sigma_a2(i)=7.853449E-02
vsigma_f1(i)=6.160544E-03
vsigma_f2(i)=1.207603E-01
sigma_tr1(i)=2.368355E-01
sigma_tr2(i)=9.082422E-01
sigma_12(i)=1.708253E-02
end do
end
最后错误提示 ,这到底是怎么回事啊??
--------------------Configuration: 1d_diffusion_may_19 - Win32 Debug--------------------
Compiling Fortran...
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(10) : Error: The same named entity from different modules and/or program units cannot be referenced. [E1]
e1=0.00001
--------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(10) : Error: This name has already been used as an external function name. [E1]
e1=0.00001
--------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [C]
call LSLTR (n, c, d, e, b)
-------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [D]
call LSLTR (n, c, d, e, b)
----------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [E]
call LSLTR (n, c, d, e, b)
-------------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(68) : Error: The type of the actual argument differs from the type of the dummy argument. [B]
call LSLTR (n, c, d, e, b)
----------------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [C]
call LSLTR (n, c, d, e, b)
-------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [D]
call LSLTR (n, c, d, e, b)
----------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [E]
call LSLTR (n, c, d, e, b)
-------------------------------------^
E:\1d_diffusion\1d_diffusion_may_19\caculation.f90(74) : Error: The type of the actual argument differs from the type of the dummy argument. [B]
call LSLTR (n, c, d, e, b)
----------------------------------------^
Error executing df.exe.
1d_diffusion_may_19.exe - 10 error(s), 0 warning(s)
[color=FF0000][/color]