Dear Mr. Brian and Mr. Davide,
Many thanks for your help, your replies help me a lot. Thanks again,
Best regards,
Nguyen Anh Tuan
Brian Barrett <brbarret_at_[hidden]> wrote: On Jan 12, 2006, at 6:45 AM, Davide Cesari wrote:
> Tuan Nguyen Anh ha scritto:
>
> From problem.c:
>> comm_of_group_0 = createComm( rank_0 , 2 , &group_0); (In this
>> program,
>> "comm_of_group_0" is a global variable and its
>> value will not change. I think that LAM will create private
>> "comm_of_group_0"
>> for each process, so it wastes our
>> memory. How do we rewrite this program for LAM to create only one
>> "comm_of_group_0" at runtime (like shared-variable)).
>
> Hi Tuan,
> MPI, and thus LAM-MPI, is by definition a library for distributed
> memory
> computation which relies on traditional serial compilers, and the
> communication
> among different MPI processes takes place only through calls to MPI
> routines, so
> there is no such concept as "memory/variables shared among MPI
> processes" like
> in OpenMP or in threaded programs, for example. As far as I know,
> the only MPI
> functionality that vaguely reminds shared memory are the Remote
> Memory Access
> routines of MPI-2, but I wonder whether they are supported in LAM
> since MPI-2 is
> quite a new standard and they are not probably what you are looking
> for.
> best regards, Davide
I agree with everything Davide said, including that MPI probably
isn't what you are looking for. You might want to look at something
like UPC (which can layer it's communication on MPI, of course),
which provides a shared-memory like appearance on distributed memory
systems.
I also agree that the RMA section of the MPI-2 standard doesn't sound
like what you want, but wanted to point out that LAM/MPI does have
support for the RMA chapter. It does not support WIN_LOCK/
WIN_UNLOCK, but the rest of the chapter is supported.
Hope this helps,
Brian
--
Brian Barrett
LAM/MPI developer and all around nice guy
Have a LAM/MPI day: http://www.lam-mpi.org/
_______________________________________________
This list is archived at http://www.lam-mpi.org/MailArchives/lam/
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
|