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: Ralph Castain (rhc_at_[hidden])
Date: 2010-05-15 10:08:29

On May 12, 2010, at 1:01 PM, Fernando Lemos wrote:

> 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.

FWIW: OMPI has the same capability via cmd line args as shown by "mpirun -h"

   -stdin|--stdin <arg0>
                         Specify procs to receive stdin [rank, all, none]
                         (default: 0, indicating rank 0)

> Regards,
> _______________________________________________
> users mailing list
> users_at_[hidden]