[MPICH] about fortran and MPI_Send

Rajeev Thakur thakur at mcs.anl.gov
Fri Oct 21 12:55:49 CDT 2005


Yes. You can use MPI_Get_address to get the starting address of each array
and use that address as the displacement for the array in MPI_Type_hindexed.
MPI_Type_hindexed will have 3 entries, one for each array. Then call
MPI_Send with MPI_BOTTOM as the send buffer. MPI_Send(MPI_BOTTOM, 1,
hindexed_type, ...)

Rajeev 


> -----Original Message-----
> From: llwaeva at 21cn.com [mailto:llwaeva at 21cn.com] 
> Sent: Friday, October 21, 2005 12:56 PM
> To: Rajeev Thakur
> Subject: Re: [MPICH] about fortran and MPI_Send
> 
> 
> on 2005-10-22 1:35:32, "Rajeev Thakur" <thakur at mcs.anl.gov> wrote:
> > You can create a derived datatype and send them with a 
> single send. If the
> > arrays are of the same type, you can use MPI_Type_hindexed; 
> otherwise you
> > can use MPI_Type_struct.
> > 
> > Rajeev
> Thanks, but they are all seperated array (same datatype), can I apply
> MPI_Type_hindexed to create a new datatype?
> 
> Thx
> 
> 




More information about the mpich-discuss mailing list