problem with understanding (array)
Tim Prince
n8tm@aol.com
Mon Aug 23 13:20:00 GMT 2010
On 8/23/2010 5:40 AM, anton_helm wrote:
> Hello everybody.
>
> I write a program in F90 and MPI. And now I have some
> missunderstanding in the code.
> Maybe a short snapshot for understanding:
>
>
> --------------
> main.f
> --------------
> MAIN PROGRAM
> :
> integer*8 part_ind(N_p_t_max)
> :
> CALL profile(x,y,z, part_ind)
> :
> END MAIN PROGRAM
>
>
> --------------
> profile.f
> --------------
> SUBROUTINE profile(p_x,p_y,p_z, part_ind)
> :
> integer*8 part_ind(N_p_t_max)
> :
> CALL track(p_x, p_y, p_z, part_ind)
> :
> RETURN
> END SUBROUTINE profile
>
> --------------
> track.f
> --------------
> SUBROUTINE track(tr_x,tr_y,tr_z, part_ind)
> :
> integer*8 part_ind(N_p_t_max)
> :
> part_ind(1) = 1 !@this point the program goes broke
> :
> RETURN
> END SUBROUTINE track
>
> _____________________________________
> N_p_t_max....Set as global. It works fine!
> shape(part_ind) - give me the right shape
> huge(part_ind) - give me the right huge
>
> After I try to define part_ind(1) the program the process broke and my
> hole mpi-mesh too.
>
integer*8 isn't f90, although it's a near-universal extension. Maybe
this isn't the "F90" program you want comments upon?
You don't show what you mean by "Set as global." That's probably the
issue; you would need some declaration of it in each subroutine.
--
Tim Prince
More information about the Fortran
mailing list