Ralph,

i think that will not work.

here is the full story :

once upon a time, on solaris, we did not try to compile pthread'ed app
without any special parameters.
that was a minor annoyance on solaris 10 with old gcc : configure passed
a flag (-pthread if i remember correctly)
that was not supported by gcc (at that time) and generated tons of warnings.
when i asked "why don't we just try no special parameter on solaris ?" i
was replied this is because looong time ago
openmpi used solaris lwp, so solaris was "special" anyway.
since solaris is able to build (compile+link) a pthread'ed app without
any flags, i removed the special case for solaris,
and no flag was used.
then i noticed that lead to bad code (errno is global instead of per
thread specific), so you automatically added -D_REENTRANT
on solaris (e.g. if the __sun__ macro is defined)
then i found that solarisstudio compilers do not define the __sun__macro
automatically (__sun and sun are defined) so i improved
the test (e.g. we are on solaris if __sun__ or __sun is defined)
this was merged (yesterday) and is not in rc4

what we should do know is unclear for me ...
is -D_REENTRANT enough for gcc compilers on solaris ?
is -D_REENTRANT *not* enough for solarisstudio compilers on solaris ?
/* if -D_REENTRANT is *not* enough, then we all we have to do is use -mt
since that implies -D_REENTRANT */


a working solution (minus the minor annoyance i described earlier) is to
restore
config/opal_check_os_flavors.m4
config/ompi_config_pthreads.m4

and then i ll find a better way to correctly set the flags that must be
used on solaris

that being said, and based on Paul's availability, i d rather have a new
tarball (rc5?) tested.
(do we *really* need -mt ? isn't -D_REENTRANT enough ?)
this tarball must include
https://github.com/open-mpi/ompi-release/commit/ac8b84ce674b958dbf8c9481b300beeef0548b83

configury: test the __sun macro to detect solaris OS.


FWIW. i was unable to reproduce the problem on solaris 11 with sunstudio
12.4 even if i do not use -D_REENTRANT *nor* -mt (!)

Cheers,

Gilles

On 2014/12/17 15:01, Ralph Castain wrote:
> Hi Paul
>
> Can you try the attached patch? It would require running autogen, I fear.
> Otherwise, I can add it to the tarball.
>
> Ralph
>
>
> On Tue, Dec 16, 2014 at 9:59 PM, Paul Hargrove <phhargr...@lbl.gov> wrote:
>> Gilles,
>>
>> The 1.8.3 test works where the 1.8.4rc4 one fails with identical configure
>> arguments.
>>
>> While it may be overkill, I configured 1.8.4rc4 with
>>
>>    CFLAGS="-m64 -mt" --with-wrapper-cflags="-m64 -mt" \
>>    LDFLAGS="-mt" --with-wrapper-ldflags="-mt"
>>
>> The resulting run worked!
>>
>> So, I very strongly suspect that the problem will be resolved if one
>> restores the configure logic that my previous email shows has vanished
>> (since that would restore "-mt" to CFLAGS and wrapper cflags).
>>
>> -Paul
>>
>> On Tue, Dec 16, 2014 at 8:10 PM, Paul Hargrove <phhargr...@lbl.gov> wrote:
>>> My 1.8.3 build has not completed.
>>> HOWEVER, I can already see a key difference in the configure step.
>>>
>>> In 1.8.3 "-mt" was added AUTOMATICALLY to CFLAGS by configure:
>>>
>>> checking if C compiler and POSIX threads work as is... no - Solaris, not
>>> checked
>>> checking if C++ compiler and POSIX threads work as is... no - Solaris,
>>> not checked
>>> checking if Fortran compiler and POSIX threads work as is... no -
>>> Solaris, not checked
>>> checking if C compiler and POSIX threads work with -pthread... no
>>> checking if C compiler and POSIX threads work with -pthreads... no
>>> checking if C compiler and POSIX threads work with -mt... yes
>>> checking if C++ compiler and POSIX threads work with -pthread... yes
>>> checking if Fortran compiler and POSIX threads work with -pthread... yes
>>>
>>> This is not the case in 1.8.4rc4:
>>>
>>> checking if C compiler and POSIX threads work as is... yes
>>> checking if C++ compiler and POSIX threads work as is... yes
>>> checking if Fortran compiler and POSIX threads work as is... yes
>>>
>>>
>>> So, it looks like a chunk of Solaris-specific configure logic was LOST.
>>>
>>> -Paul
>>>
>>
>> --
>> Paul H. Hargrove                          phhargr...@lbl.gov
>> Computer Languages & Systems Software (CLaSS) Group
>> Computer Science Department               Tel: +1-510-495-2352
>> Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
>>
>> _______________________________________________
>> 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/16625.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/16626.php

Reply via email to