Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] getc in openmpi
From: Fernando Lemos (fernandotcl_at_[hidden])
Date: 2010-05-12 15:01:36

On Wed, May 12, 2010 at 2:51 PM, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> On May 12, 2010, at 1:48 PM, Hanjun Kim wrote:
>> I am working on parallelizing my sequential program using OpenMPI.
>> Although I got performance speedup using many threads, there was
>> slowdown on a small number of threads like 4 threads.
>> I found that it is because getc worked much slower than sequential
>> version. Does OpenMPI override or wrap getc function?
> No.

Please correct me if I'm wrong, but I believe OpenMPI sends
stdin/stdout from the other ranks back to rank 0 so that the output is
displayed as the stdin of mpirun and the other way around with
stdout/stderr. Otherwise it wouldn't be possible to even see the
output from the other ranks. I guess that could make things slower.

MPICH-2 had a command line option that told mpiexec who would receive
stdin (all processes or only some of them) so that you could do things
like mpiexec <bigfile and not worry (too much) about the overhead of
distributing the contents of bigfile across the network.