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: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-05-12 13:51:16


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.

> To find the cause, I added mpi.h to the program and compiled it with
> mpicc. There are two versions on the program;
> 1. The sequential program without MPI_Init_thread and MPI_Finalize.
> 2. The sequential program with MPI_Init_thread and MPI_Finalize.
> Version 2 was 4x slower than version 1. I think it is because of slow
> getc. Does MPI_Init_thread have some relation with the getc function
> call?

Not that I'm aware of. Perhaps something about linking in threading libraries changes getc...?

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/