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
>
diff --git a/config/ompi_config_pthreads.m4 b/config/ompi_config_pthreads.m4
index 3f073d8..1ff8ada 100644
--- a/config/ompi_config_pthreads.m4
+++ b/config/ompi_config_pthreads.m4
@@ -267,6 +267,14 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], [
 #
 # C compiler
 #
+case "${host_cpu}-${host_os}" in
+  *solaris*)
+    pflags="-pthread -pthreads -mt"
+  ;;
+  *)
+    pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
+  ;;
+esac
 if test "$ompi_pthread_c_success" = "0"; then
   for pf in $pflags; do
     AC_MSG_CHECKING([if C compiler and POSIX threads work with $pf])
@@ -294,6 +302,14 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], [
 # C++ compiler
 #
 if test "$ompi_pthread_cxx_success" = "0"; then
+  case "${host_cpu}-${host_os}" in
+    *solaris*)
+      pflags="-pthread -pthreads -mt"
+    ;;
+    *)
+      pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
+    ;;
+  esac
   for pf in $pflags; do
     AC_MSG_CHECKING([if C++ compiler and POSIX threads work with $pf])
     CXXFLAGS="$orig_CXXFLAGS $pf"
@@ -320,6 +336,14 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], [
 # Fortran compiler
 #
 if test "$ompi_pthread_fortran_success" = "0" -a "$OMPI_WANT_FORTRAN_BINDINGS" 
= "1" -a $ompi_fortran_happy -eq 1; then
+  case "${host_cpu}-${host_os}" in
+    *solaris*)
+      pflags="-pthread -pthreads -mt"
+    ;;
+    *)
+      pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
+    ;;
+  esac
   for pf in $pflags; do
     AC_MSG_CHECKING([if Fortran compiler and POSIX threads work with $pf])
     FCFLAGS="$orig_FCFLAGS $pf"

Reply via email to