[mvapich-discuss] MVAPICH and pthreads

Gregory D Abram gabra at us.ibm.com
Wed Apr 16 16:15:19 EDT 2008


I have two versions of a MPI program - one which does all the work in one
thread, and one that spreads the work over several threads, but which does
all the MPI calls in the original thread.  I've been trying to figure out
why the threaded version doesn't go any faster on an 8 processor system,
and found that it appears that all the threads are running on one processor
(according to the top command - one is pegged, seven are idle).

So I wrote a little test program that spawns 5 threads that just sit there
doing arithmetic.   When run, top shows 5 processors busy.  I then stuck
MPI_Init at the start, compiled it for MVAPICH and ran it under mpirun on
the same node - just one process - and sure enough,  only 1 processor is
busy.  I then recompiled it for OpenMPI and ran it, again on the same node,
and got 5 processors busy.

Is this expected?  I'm trying to be MPI-version agnostic, but this is a
problem.

Greg



More information about the mvapich-discuss mailing list