Hi, Van,
Thanks for your quick reply. Your suggestion solves the problem.
I confused the dummy argument with the module variable.
In fact, I have a long list of dummy arguments and their values are actually
equal to the corresponding module arguments. So I rename the dummy arguments pi1
as pi1_x etc and in the initialization subroutine add pi1 = pi1_x etc.
Part of the code now is,
module mymod
public :: initialize_mymod
public :: pi1, pi2,pi3
real*8 :: pi1,pi2,pi3
subroutine initialize_mymod(pi1_x,pi2_x,pi3_x)
real*8, intent(in) :: pi1_x, pi2_x,pi3_x
pi1 = pi1_x
pi2 = pi2_x
pi3 = pi3_x
end subroutine initialize_mymod
end module mymod
Xiaogang
|