Newsgroups: comp.parallel.mpi
From: raja@osc.edu (Raja Daoud)
Subject: Re: passing a structure
Organization: Ohio Supercomputer Center
Date: 1 Nov 1994 21:11:58 -0500
Message-ID: <396she$p4u@hawkeye.osc.edu>

animesh@top.cis.syr.edu (Animesh Chatterjee) writes:
>I need to send a structure which contains both integer and float type members.
>How can I do this in MPI?

You can either construct a "struct" datatype (MPI_Type_struct())
containing ints and floats and use it in MPI_Send()/MPI_Recv(),
or you can use the pack/unpack functions (MPI_Pack()/MPI_Unpack()).
The MPI std. book has examples for both cases.  For a quick tutorial
on MPI pack/unpack, check web page listed below.
Regards,

--Raja

-=-
Raja Daoud				raja@osc.edu
Ohio Supercomputer Center		http://www.osc.edu/lam.html

