Absolutely correct (on both counts). :-)
You might want to look at the description of the MPI_COMM_SPLIT
function -- you can split MPI_COMM_WORLD to exclude the one process
that is doing your gravity work. Something like (this is typed off the
top of my head, so forgive typos/minor errors, but it should be enough
to give you the general idea):
-----
MPI_Comm new_comm;
int color = 0;
if (i_am_the_gravity_process) {
color = 1;
}
MPI_Comm_split(MPI_COMM_WORLD, color, 0, &new_comm);
-----
For full details of MPI_COMM_SPLIT, see:
http://www.mpi-forum.org/docs/mpi-11-html/node102.html#Node102
On Jun 30, 2005, at 12:47 PM, Jonathan Eckstein wrote:
> You can create a communicator for the hydrodyamics processor, and use
> that communicator instead of MPI_COMM_WORLD. Technically, your
> question
> was not LAM-specific, but a general MPI question.
>
> Jonathan
>
>
> ertheriault_at_[hidden] wrote:
>> Hi, I'm writing a program that uses many computers to calculate the
>> hydrodynamics of a system and one computer to calculate the
>> gravity-related parts. I've been using calls like mpi_bcast and
>> mpi_allreduce to share the particles' hydrodynamic information between
>> machines, but this, as far as I know, requires the participation of
>> the
>> gravity computer along with the other machines. I do not want the
>> gravity
>> computer to waste time with communication about the hydrodynamics. I
>> was
>> wondering if there are functions like mpi_bcast that can give
>> information
>> to all the processors except one. Or perhaps there's another way to
>> do it
>> using these calls in a different way? Thanks very much.
>>
>> Eric
>>
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|