Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] MPI_Is_thread_main() with provided=MPI_THREAD_SERIALIZED
From: George Bosilca (bosilca_at_[hidden])
Date: 2013-09-04 06:11:47


You're in the SERIALIZED mode, so any thread can make MPI calls. As in such mode there is no notion of thread_main, consistently returning true out of MPI_Is_thread_main seem like a reasonable approach.

This function will have a different behavior in the FUNNELED mode.

  George.

On Sep 4, 2013, at 12:06 , Lisandro Dalcin <dalcinl_at_[hidden]> wrote:

> I'm using Open MPI 1.6.5 as packaged in Fedora 19. This build does not
> enable THREAD_MULTIPLE support:
>
> $ ompi_info | grep Thread
> Thread support: posix (MPI_THREAD_MULTIPLE: no, progress: no)
>
> In my code I call MPI_Init_thread(required=MPI_THREAD_MULTIPLE). After
> that, MPI_Query_thread() returns MPI_THREAD_SERIALIZED. But calling
> MPI_Is_thread_main() always return TRUE, either in the main thread or
> in newly spawned threads.
>
> I think this code is wrong for the case provided==MPI_THREAD_SERIALIZED :
> https://bitbucket.org/ompiteam/ompi-svn-mirror/src/0a159982d7204d4b4b9fa61771d0fc7e9dc16771/ompi/mpi/c/is_thread_main.c?at=default#cl-50
>
>
> --
> Lisandro Dalcin
> ---------------
> CIMEC (INTEC/CONICET-UNL)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1011)
> Tel/Fax: +54-342-4511169
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel