MPI_Bcast in mpibcast (wrap_mpi.F90)


Subject: MPI_Bcast in mpibcast (wrap_mpi.F90)
From: In-Sun Song (sis@atmos.yonsei.ac.kr)
Date: Tue Feb 13 2001 - 22:43:35 MST


ear CCM users

While I was porting NCAR CCM3.10.11 to CRAY T3E, I found what I could
not understand.

In subroutine mpibcast (wrap_mpi.F90),

subroutine mpibcast(buffer,count,datatype,root,comm)

real (r8), intent(inout) buffer(*)
....
call MPI_Bcast(buffer,count,datatype.root.comm,ier)

But, in subroutine distnl (data.F90), the above subroutine is used as
following

call mpibcast(itsst,1,mpiint,0,mpicom)
...
call mpibcast(caseid,16,mpichar,0,mpicom)
...

Although the type of input variable is different from that of variable
defined in subroutine mpibcast, calling mpibcast works!!!! But, in the
case of the type of input variable is CHARACTER, compilation stops with
a error message like "unaligned address fault".

To solve the problem. I made another subroutine, MPIBCASTC, in
wrap_mpi.F90, and I changed real (r8) to character.
Then..... In the case of the type of input variable is CHARACTER, let
MPIBCASTC be used... this change did work!!! There was any aburpt stops
during compilation process.

Please let me know the reason
Looking forward to response

===================================
Song, In-Sun
Ph. D. Student
Laboratory for Mesoscale Dynamics
Department of Atmospheric Sciences
Yonsei University, Seoul, Korea.
E-mail : sis@atmos.yonsei.ac.kr
Tel : +82-2-2123-2688
Fax : +82-2-365-5163



This archive was generated by hypermail 2b27 : Tue Jan 22 2002 - 11:15:42 MST