Opened 11 years ago

Closed 11 years ago

#39438 closed defect (fixed)

openmpi @1.7.1 +threads +gcc47 creates code that hangs

Reported by: hans.ekkehard.plesser@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: openmpi

Description

The attached MPI hello world program will hang on MPI_Init_thread() when compiled with openmpicc from openmpi @1.7.1 +threads +gcc47 on OSX 10.8.4 and invoked with openmpirun on more than one process.

Everything works fine if I do one of the following:

  • use openmpi @1.6.4 +threads +gcc47
  • replace MPI_THREAD_SERIALIZED by MPI_THREAD_SINGLE, which is equivalent to calling MPI_Init().

The actual compiler invocation and compiler version are

[Macintosh:~/tmp/hw] hep% openmpicc -o hw_mpi hw_mpi.c --showme
/usr/bin/clang -o hw_mpi hw_mpi.c -I/opt/local/include/openmpi -L/opt/local/lib -lmpi

[Macintosh:~/tmp/hw] hep% /usr/bin/clang --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

I realized that this is most likely an OpenMPI problem and will report it there, too, but I wonder if it makes sense to have 1.7.1 as default on MacPorts given this problem.

Attachments (2)

hw_mpi.c (350 bytes) - added by hans.ekkehard.plesser@… 11 years ago.
OpenMPI171.Portfile.patch (454 bytes) - added by hans.ekkehard.plesser@… 11 years ago.
Patch that appears to solve this bug (at least on my machine, no warranties).

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by hans.ekkehard.plesser@…

Attachment: hw_mpi.c added

comment:1 Changed 11 years ago by hans.ekkehard.plesser@…

With some help from the OpenMPI User Mailing list (thanks to Ralph Castain and Elias Rudberg!) I found out that several additional configure switches are needed for the threads variant. In all, one needs

--enable-event-thread-support --enable-opal-multi-threads --enable-orte-progress-threads --enable-mpi-thread-multiple

I'll attach a patch. for this change.

One additional note: the --en/disable-mpi-f77/90 configure flags have disappeared in 1.7.1. I have not checked this in detail, but there is a switch --enable-mpi-fortran now, which may be a replacement.

Changed 11 years ago by hans.ekkehard.plesser@…

Attachment: OpenMPI171.Portfile.patch added

Patch that appears to solve this bug (at least on my machine, no warranties).

comment:2 Changed 11 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to mww@…

Assigning to maintainer. (If you don't Cc him when you create the ticket he doesn't get notified of its existence.)

comment:3 Changed 11 years ago by seanfarley (Sean Farley)

It seems that I can't get any threads variant to compiler on my 10.8 machine at all (with or without your patch). The good news is that openmpi-devel-* ports compile and run your code without hanging. Can this ticket be closed since a future version of openmpi fixes it?

comment:4 Changed 11 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

Fixed in r116569.

Note: See TracTickets for help on using tickets.