[mpich-discuss] Bcast question?

Kokron, Daniel S. (GSFC-610.1)[Computer Sciences Corporation] daniel.s.kokron at nasa.gov
Fri Aug 10 08:38:08 CDT 2012


Rank1 and 2 are waiting in the Bcast while rank 0 does the read.

Daniel Kokron
NASA Ames (ARC-TN)
SciCon group
301-286-3959

________________________________________
From: mpich-discuss-bounces at mcs.anl.gov [mpich-discuss-bounces at mcs.anl.gov] On Behalf Of John Chludzinski [john.chludzinski at gmail.com]
Sent: Friday, August 10, 2012 5:03 AM
To: mpich-discuss at mcs.anl.gov
Subject: [mpich-discuss] Bcast question?

I have a problem which requires all process to have a copy of an array of data that is read in from a file (process 0).  I Bcast the array to all processes (using MPI_COMM_WORLD).

I instrumented the code with some calls to Wtime to find the time consumed for different actions.  In particular, I was interested in comparing the time required for Bcast's vs. fread's.  The size of the array is 1,200,000 of type MPI_DOUBLE.

For a 3 process run:

RANK = 0      fread_time = 2.323575

vs.

RANK = 2      bcast_time = 2.361233
RANK = 0      bcast_time = 0.081910
RANK = 1      bcast_time = 2.399790

These numbers seem to indicate that Bcast-ing the data is as slow as reading the data from a file (on my Western Digital Passport USB drive).  Am I making a newbie mistake?

---John

PS> I'm using Fedora 16 (32 bit) notebook with a dual core AMD Phenom processor.


More information about the mpich-discuss mailing list