Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] getc in openmpi
From: Hanjun Kim (hanjunk_at_[hidden])
Date: 2010-05-12 13:48:41


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?

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

Thank you in advance.