I am a beginner of fortran, now I have a code which debugging with error 7976.
Program test_main
implicit none
integer NP,ele_n,NE,NNE,npt,num
integer,pointer :: ele_concentrate( : ),ele_c( : )
double precision,pointer::vcl( : , : )
interface
subroutine new_node(NP,ele_n,NE,NNE,ele_concentrate,ele_c,vcl,npt,num)
implicit none
integer NP,ele_n,NE,NNE,npt,num
integer,allocatable :: ele_concentrate(:),ele_c(:)
double precision,allocatable :: vcl(:,:)
end subroutine new_node
subroutine zhaobian_gj01(NP,ele_n,NE,NNE,ele_concentrate,ele_c,vcl,npt,num)
implicit none
integer NP,ele_n,NE,NNE,npt,num
integer,allocatable :: ele_concentrate(:),ele_c(:)
double precision,allocatable ::vcl(:,:)
end subroutine zhaobian_gj01
end interface
call zhaobian_gj01(NP,ele_n,NE,NNE,ele_concentrate,ele_c,vcl,npt,num)
call new_node(NP,ele_n,NE,NNE,ele_concentrate,ele_c,vcl,npt,num)
end
The compiler whines when calling subroutine zhaobian_gj01 and new_node, with error #7976: An allocatable dummy argument may only be argument associated with an allocatable actual argument. (ele_concentrate,ele_c,vcl)
How can I solve this problem? Thanks.