RE: [Pympi-users] Mpi and mpi.allreduce inside a function
Status: Alpha
Brought to you by:
patmiller
|
From: Julian C. <rjc...@cs...> - 2005-07-21 19:49:03
|
Tks Pat
I tried it the way you suggested below. It runs, but seems to run way too
quickly, even over 10 processors. Maybe I'm just a pessimist:
>>> FinalVal, CancelArray = McTermIncrAccCall(dictInputs)
>>> mpi.synchronizedWrite(mpi.rank,FinalVal,"\n")
0 -291.326756623
1 12.493514467
2 -184.882043854
3 -508.240980905
4 -300.15308712
5 -240.614966934
6 -71.3924387702
7 -113.294540179
8 -462.743023119
9 -269.701236158
P.S. I FINALLY noticed that mpi.synchronizedWrite and
mpi.synchronizeQueuedOutput('/dev/null') exist. I had always struggled with
too much console output. I guess I never bothered to look at the entire
API....
Is there any way to gather FinalVal into a list on the root?
Julian
-----Original Message-----
From: pym...@li...
[mailto:pym...@li...]On Behalf Of Pat Miller
Sent: Thursday, July 21, 2005 3:00 PM
Cc: pym...@li...
Subject: Re: [Pympi-users] Mpi and mpi.allreduce inside a function
I tend to write things the second way
def localComputation(...):
...
localValue = localComputation()
globalValue = mpi.allreduce(localValue, mpi.SUM)
........[snip]
--
Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller
Access to power must be confined to those who are not in love with it.
-- Plato
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Pympi-users mailing list
Pym...@li...
https://lists.sourceforge.net/lists/listinfo/pympi-users
|