Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] 1.7.1 Hang with MPI_THREAD_MULTIPLE set
From: W Spector (w6ws_at_[hidden])
Date: 2013-05-31 00:12:48


Dear OpenMPI group,

The following trivial program hangs on the mpi_barrier call with 1.7.1.
  I am using gfortran/gcc 4.6.3 on Ubuntu linux. OpenMPI was built with
--enable-mpi-thread-multiple support and no other options (other than
--prefix).

Are there additional options we should be telling configure about? Or
have we done something very silly? Mpich2 works just fine...

Walter Spector

program hang
   use mpi
   implicit none

   integer :: me, npes
   integer :: mpierr, provided
   logical :: iampe0

   call mpi_init_thread ( &
       MPI_THREAD_MULTIPLE, &
       provided, &
       mpierr)
   print *, 'hello, world!'

! Hangs here with MPI_THREAD_MULTIPLE set...
   call mpi_barrier (MPI_COMM_WORLD, mpierr)

   call mpi_comm_rank (MPI_COMM_WORLD, me, mpierr)
   iampe0 = me == 0
   call mpi_comm_size (MPI_COMM_WORLD, npes, mpierr)
   print *, 'pe:', me, ', total comm size:', npes
   print *, 'I am ', trim (merge ('PE 0 ', 'not PE 0', iampe0))

   call mpi_finalize (mpierr)

end program