Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI_Init_thread(..., MPI_THREAD_SERIALIZED) hangs under OSX 10.8.4 if compiled with OpenMPI 1.7.1
From: Hans Ekkehard Plesser (hans.ekkehard.plesser_at_[hidden])
Date: 2013-06-16 08:27:42


On 15. juni 2013, at 01.31, Ralph Castain wrote:

> I have no idea how MacPorts configures OMPI - did you check the output of ompi_info to see if threading was even enabled?

ompi_info shows

          Thread support: posix (MPI_THREAD_MULTIPLE: yes, progress: no)

for 1.6.4 and 1.7.1. I could post the full ompi_info if that would help.

Best regards,
Hans

>
>
> On Jun 14, 2013, at 3:12 PM, Hans Ekkehard Plesser <hans.ekkehard.plesser_at_[hidden]> wrote:
>
>>
>> Hi!
>>
>> I use OpenMPI 1.7.1 from MacPorts (+threads +gcc47). When compiling a simple hello world program calling
>>
>> MPI_Init_thread(&argc, &argv, MPI_THREAD_SERIALIZED, &provided);
>>
>> the program hangs if run on more than one process. All works fine if I
>>
>> - either use MPI_THREAD_SINGLE
>> - or use OpenMPI 1.6.4.
>>
>> 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
>>
>> The full program code is shown below. I have also reported this to the MacPorts bug tracker.
>>
>> Best regards,
>> Hans E Plesser
>>
>> ------
>> #include <stdio.h>
>>
>> #include <mpi.h>
>>
>> int main(int argc, char **argv)
>> {
>> int provided;
>> MPI_Init_thread(&argc, &argv, MPI_THREAD_SERIALIZED, &provided);
>>
>> printf("Provided threading level: %d.\n", provided);
>>
>> int rank;
>> MPI_Comm_rank(MPI_COMM_WORLD, &rank);
>>
>> printf("Hello, world! This is rank %d.\n", rank);
>>
>> MPI_Finalize();
>> return 0;
>> }
>> ------
>>
>>
>> --
>>
>> Dr. Hans Ekkehard Plesser, Associate Professor
>> Head, Basic Science Section
>>
>> Dept. of Mathematical Sciences and Technology
>> Norwegian University of Life Sciences
>> PO Box 5003, 1432 Aas, Norway
>>
>> Phone +47 6496 5467
>> Fax +47 6496 5401
>> Email hans.ekkehard.plesser_at_[hidden]
>> Home http://arken.umb.no/~plesser
>>
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

--
Dr. Hans Ekkehard Plesser, Associate Professor
Head, Basic Science Section
Dept. of Mathematical Sciences and Technology
Norwegian University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6496 5467
Fax   +47 6496 5401
Email hans.ekkehard.plesser_at_[hidden]
Home  http://arken.umb.no/~plesser