Newsgroups: comp.parallel.mpi
From: hi13@islhp4.mach.uni-karlsruhe.de (Jan Ehrhard)
Subject: cut memory need
Summary: I am trying to reduce the memory need of a MPI-program
Keywords: memory, MPI, MPI_ALLREDUCE
Organization: University of Karlsruhe, Germany
Date: 28 Mar 1996 15:41:54 +0100
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <4je8fi$6m9@islhp4.mach.uni-karlsruhe.de>


Hi !

I am trying to make a MPI-program more efficient, i.e. I try
to reduce the memory need.
Therefore I am faced with the following problem:

Let's say I am using 2 processors, then processor 1 calculates
the 1., 3., 5., 7., ... value of an array and processor 2 calculates
the 2., 4., 6., 8., ... value of that array.

Then I want to transmit the results from 1 to 2 and vice versa, so that
after the communication every processor has his own values and the 
values of the other processor, i.e. every processor knows the
values 1,2,3,4,5,6,7,8,... of the array.

This problem can be solved very simple by just using MPI_ALLREDUCE
and using two arrays. But this is of course not very memory efficient
and therefore I wonder whether there is a possibility to 
solve this problem more efficient.

Does anybody know a efficient solution ?

Regards,

	Jan

