Kewl - I wonder why it wasn’t fixed in trunk then?
> On Dec 9, 2014, at 7:52 AM, Nathan Hjelm <hje...@lanl.gov> wrote: > > > Ralph, I corrected this as part of the thread multiple pull request in > 1.8. > > https://github.com/rhc54/ompi-release/commit/52823d592c3759c53ed63ed1f63fe200d2491220#diff-3673b21a7f42dc0665ea4470b3171df1R510 > > -Nathan > > On Tue, Dec 09, 2014 at 12:31:55AM -0800, Ralph Castain wrote: >> Hi Pascal >> Is this in the trunk or in the 1.8 series (or both)? >> >> On Dec 9, 2014, at 12:28 AM, Pascal Deveze <pascal.dev...@bull.net> >> wrote: >> >> In case where MPI is compiled with --enable-mpi-thread-multiple, a call >> to opal_using_threads() always returns 0 in the routine >> btl_xxx_component_init() of the BTLs, event if the application calls >> MPI_Init_thread() with MPI_THREAD_MULTIPLE. >> >> This is because opal_set_using_threads(true) in >> ompi/runtime/ompi_mpi_init.c is called to late. >> >> I propose the following patch that solves the problem for me: >> >> diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c >> index 35509cf..c2370fc 100644 >> --- a/ompi/runtime/ompi_mpi_init.c >> +++ b/ompi/runtime/ompi_mpi_init.c >> @@ -512,6 +512,13 @@ int ompi_mpi_init(int argc, char **argv, int >> requested, int *provided) >> } >> #endif >> >> + /* If thread support was enabled, then setup OPAL to allow for >> + them. */ >> + if ((OPAL_ENABLE_PROGRESS_THREADS == 1) || >> + (*provided != MPI_THREAD_SINGLE)) { >> + opal_set_using_threads(true); >> + } >> + >> /* initialize datatypes. This step should be done early as it will >> * create the local convertor and local arch used in the proc >> * init. >> @@ -724,13 +731,6 @@ int ompi_mpi_init(int argc, char **argv, int >> requested, int *provided) >> goto error; >> } >> >> - /* If thread support was enabled, then setup OPAL to allow for >> - them. */ >> - if ((OPAL_ENABLE_PROGRESS_THREADS == 1) || >> - (*provided != MPI_THREAD_SINGLE)) { >> - opal_set_using_threads(true); >> - } >> - >> /* start PML/BTL's */ >> ret = MCA_PML_CALL(enable(true)); >> if( OMPI_SUCCESS != ret ) { >> _______________________________________________ >> devel mailing list >> de...@open-mpi.org >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel >> Link to this >> post: http://www.open-mpi.org/community/lists/devel/2014/12/16459.php > >> _______________________________________________ >> devel mailing list >> de...@open-mpi.org >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel >> Link to this post: >> http://www.open-mpi.org/community/lists/devel/2014/12/16461.php > > _______________________________________________ > devel mailing list > de...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2014/12/16473.php