Repository: open-mpi/ompi
Pull request #13206: Remove stale solaris configure references
Author: login: rhc54
Labels: name: Target: main
Created: 2025-04-22T15:20:21Z | Merged: 2025-04-29T20:54:12Z

A prior commit (PR #13163) removed the stale Solaris components as we no longer support that environment. However, the PR left the Solaris configure references in the code base.

This PR removes those references. It also removes a duplicate m4 file (opal_check_os_flavors.m4) that exists in the OAC configure area. All references to the OPAL version have been updated to OAC.


Diff:
diff --git a/autogen.pl b/autogen.pl
index 1396f7a46b6..ecc726b54eb 100755
--- a/autogen.pl
+++ b/autogen.pl
@@ -11,6 +11,7 @@
 # Copyright (c) 2020      Amazon.com, Inc. or its affiliates.
 #                         All Rights reserved.
 #
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -81,12 +82,6 @@
 
 # Patch program
 my $patch_prog = "patch";
-# Solaris "patch" doesn't understand unified diffs, and will cause
-# autogen.pl to hang with a "File to patch:" prompt. Default to Linux
-# "patch", but use "gpatch" on Solaris.
-if ($^O eq "solaris") {
-    $patch_prog = "gpatch";
-}
 
 $username = $ENV{USER} || getpwuid($>);
 $full_hostname = $ENV{HOSTNAME} || `hostname`;
diff --git a/config/ompi_setup_java.m4 b/config/ompi_setup_java.m4
index 02029b83dd6..8339fe3cccb 100644
--- a/config/ompi_setup_java.m4
+++ b/config/ompi_setup_java.m4
@@ -18,6 +18,7 @@ dnl Copyright (c) 2013      Intel, Inc.  All rights reserved.
 dnl Copyright (c) 2015-2018 Research Organization for Information Science
 dnl                         and Technology (RIST). All rights reserved.
 dnl Copyright (c) 2017      FUJITSU LIMITED.  All rights reserved.
+dnl Copyright (c) 2025      Nanook Consulting  All rights reserved.
 dnl $COPYRIGHT$
 dnl
 dnl Additional copyrights may follow
@@ -128,17 +129,6 @@ AC_DEFUN([_OMPI_SETUP_JAVA],[
                              [AC_MSG_RESULT([not found])])])
            fi
 
-           if test "$ompi_java_found" = "0"; then
-               # Solaris
-               ompi_java_dir=/usr/java
-               AC_MSG_CHECKING([for Java in Solaris locations])
-               AS_IF([test -d $ompi_java_dir && test -r "$ompi_java_dir/include/jni.h"],
-                     [AC_MSG_RESULT([found ($ompi_java_dir)])
-                      with_jdk_headers=$ompi_java_dir/include
-                      with_jdk_bindir=$ompi_java_dir/bin
-                      ompi_java_found=1],
-                     [AC_MSG_RESULT([not found])])
-           fi
           ],
           [ompi_java_found=1])
 
@@ -188,11 +178,6 @@ EOF
                       # too.  Ugh.
                       AS_IF([test -d "$with_jdk_headers/linux"],
                             [OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/linux"])
-                      # Solaris JDK also require -I<blah>/solaris.
-                      # See if that's there, and if so, add a -I for that,
-                      # too.  Ugh.
-                      AS_IF([test -d "$with_jdk_headers/solaris"],
-                            [OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/solaris"])
                       # Darwin JDK also require -I<blah>/darwin.
                       # See if that's there, and if so, add a -I for that,
                       # too.  Ugh.
diff --git a/config/opal_check_os_flavors.m4 b/config/opal_check_os_flavors.m4
deleted file mode 100644
index fd7ae323f7b..00000000000
--- a/config/opal_check_os_flavors.m4
+++ /dev/null
@@ -1,69 +0,0 @@
-dnl -*- shell-script -*-
-dnl
-dnl Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
-dnl Copyright (c) 2014      Intel, Inc. All rights reserved.
-dnl Copyright (c) 2014      Research Organization for Information Science
-dnl                         and Technology (RIST). All rights reserved.
-dnl
-dnl $COPYRIGHT$
-dnl
-dnl Additional copyrights may follow
-dnl
-dnl $HEADER$
-dnl
-
-# OPAL_CHECK_OS_FLAVOR_SPECIFIC()
-# ----------------------------------------------------
-# Helper macro from OPAL-CHECK-OS-FLAVORS(), below.
-# $1 = macro to look for
-# $2 = suffix of env variable to set with results
-AC_DEFUN([OPAL_CHECK_OS_FLAVOR_SPECIFIC],
-[
-    AC_MSG_CHECKING([$1])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-     [[#ifndef $1
-      #this is not $1, error
-      #endif
-     ]])],
-                      [opal_found_$2=yes],
-                      [opal_found_$2=no])
-    AC_MSG_RESULT([$opal_found_$2])
-])dnl
-
-# OPAL_CHECK_OS_FLAVORS()
-# ----------------------------------------------------
-# Try to figure out the various OS flavors out there.
-#
-AC_DEFUN([OPAL_CHECK_OS_FLAVORS],
-[
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__NetBSD__], [netbsd])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__FreeBSD__], [freebsd])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__OpenBSD__], [openbsd])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__DragonFly__], [dragonfly])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__386BSD__], [386bsd])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__bsdi__], [bsdi])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__APPLE__], [apple])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__linux__], [linux])
-    OPAL_CHECK_OS_FLAVOR_SPECIFIC([__sun__], [sun])
-    AS_IF([test "$opal_found_sun" = "no"],
-          OPAL_CHECK_OS_FLAVOR_SPECIFIC([__sun], [sun]))
-
-    AS_IF([test "$opal_found_sun" = "yes"],
-          [opal_have_solaris=1
-           CFLAGS="$CFLAGS -D_REENTRANT"
-           CPPFLAGS="$CPPFLAGS -D_REENTRANT"],
-          [opal_have_solaris=0])
-    AC_DEFINE_UNQUOTED([OPAL_HAVE_SOLARIS],
-                       [$opal_have_solaris],
-                       [Whether or not we have solaris])
-
-    # check for sockaddr_in (a good sign we have TCP)
-    AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h])
-    AC_CHECK_TYPES([struct sockaddr_in],
-                   [opal_found_sockaddr=yes],
-                   [opal_found_sockaddr=no],
-                   [AC_INCLUDES_DEFAULT
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif])
-])dnl
diff --git a/configure.ac b/configure.ac
index 46cc5d612f3..8dea10cb32a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,7 @@
 # Copyright (c) 2019      Triad National Security, LLC. All rights
 #                         reserved.
 # Copyright (c) 2023      Jeffrey M. Squyres.  All rights reserved.
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -995,7 +996,7 @@ AC_CACHE_SAVE
 opal_show_title "System-specific tests"
 
 ##################################
-OPAL_CHECK_OS_FLAVORS
+OAC_CHECK_OS_FLAVORS
 
 
 
diff --git a/opal/mca/if/bsdx_ipv4/configure.m4 b/opal/mca/if/bsdx_ipv4/configure.m4
index d572cc44d70..a373b58f949 100644
--- a/opal/mca/if/bsdx_ipv4/configure.m4
+++ b/opal/mca/if/bsdx_ipv4/configure.m4
@@ -3,6 +3,8 @@
 # Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
 # Copyright (c) 2015      Research Organization for Information Science
 #                         and Technology (RIST). All rights reserved.
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
+# Copyright (c) 2025      Jeffrey M. Squyres.  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -22,25 +24,26 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_COMPILE_MODE], [
 AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [
     AC_CONFIG_FILES([opal/mca/if/bsdx_ipv4/Makefile])
 
-    AC_REQUIRE([OPAL_CHECK_OS_FLAVORS])
+    AC_REQUIRE([OAC_CHECK_OS_FLAVORS])
 
-    # If we found struct sockaddr and we're on any of the BSDs, we're
+    # If we previously found struct sockaddr_in (we don't repeat the
+    # AC CHECK_TYPES test here simply because it's cumbersome with all
+    # the required #includes) and we're on any of the BSDs, we're
     # happy.  I.e., this:
     #if defined(__NetBSD__) || defined(__FreeBSD__) || \
     #    defined(__OpenBSD__) || defined(__DragonFly__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in again])
+    AS_IF([test "$ac_cv_type_struct_sockaddr_in" = "yes"],
+          [AC_MSG_RESULT([yes (OPAL cached)])
            AC_MSG_CHECKING([NetBSD, FreeBSD, OpenBSD, or DragonFly])
-           AS_IF([test "$opal_found_netbsd" = "yes" || \
-                  test "$opal_found_freebsd" = "yes" || \
-                  test "$opal_found_openbsd" = "yes" || \
-                  test "$opal_found_dragonfly" = "yes"],
+           AS_IF([test "$oac_found_netbsd" = "yes" || \
+                  test "$oac_found_freebsd" = "yes" || \
+                  test "$oac_found_openbsd" = "yes" || \
+                  test "$oac_found_dragonfly" = "yes"],
                  [AC_MSG_RESULT([yes])
                   $1],
                  [AC_MSG_RESULT([no])
                   $2])],
-          [AC_MSG_RESULT([no (cached)])
+          [AC_MSG_RESULT([no (OPAL cached)])
            $2])
 ])
-
diff --git a/opal/mca/if/bsdx_ipv6/configure.m4 b/opal/mca/if/bsdx_ipv6/configure.m4
index 4b2122f7012..ed38208e65e 100644
--- a/opal/mca/if/bsdx_ipv6/configure.m4
+++ b/opal/mca/if/bsdx_ipv6/configure.m4
@@ -3,6 +3,8 @@
 # Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
 # Copyright (c) 2015      Research Organization for Information Science
 #                         and Technology (RIST). All rights reserved.
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
+# Copyright (c) 2025      Jeffrey M. Squyres.  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -22,26 +24,28 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_COMPILE_MODE], [
 AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [
     AC_CONFIG_FILES([opal/mca/if/bsdx_ipv6/Makefile])
 
-    AC_REQUIRE([OPAL_CHECK_OS_FLAVORS])
+    AC_REQUIRE([OAC_CHECK_OS_FLAVORS])
 
-    # If we found struct sockaddr and we're on any of the BSDs, we're
+    # If we previously found struct sockaddr_in6 (we don't repeat the
+    # AC CHECK_TYPES test here simply because it's cumbersome with all
+    # the required #includes) and we're on any of the BSDs, we're
     # happy.  I.e., this:
     #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
     #             defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in6 again])
+    AS_IF([test "$ac_cv_type_struct_sockaddr_in6" = "yes"],
+          [AC_MSG_RESULT([yes (OPAL cached)])
            AC_MSG_CHECKING([some flavor of BSD])
-           AS_IF([test "$opal_found_netbsd" = "yes" || \
-                  test "$opal_found_freebsd" = "yes" || \
-                  test "$opal_found_openbsd" = "yes" || \
-                  test "$opal_found_386bsd" = "yes" || \
-                  test "$opal_found_bsdi" = "yes" ||
-                  test "$opal_found_apple" = "yes"],
+           AS_IF([test "$oac_found_netbsd" = "yes" || \
+                  test "$oac_found_freebsd" = "yes" || \
+                  test "$oac_found_openbsd" = "yes" || \
+                  test "$oac_found_386bsd" = "yes" || \
+                  test "$oac_found_bsdi" = "yes" ||
+                  test "$oac_found_apple" = "yes"],
                  [AC_MSG_RESULT([yes])
                   $1],
                  [AC_MSG_RESULT([no])
                   $2])],
-          [AC_MSG_RESULT([no (cached)])
+          [AC_MSG_RESULT([no (OPAL cached)])
            $2])
 ])dnl
diff --git a/opal/mca/if/linux_ipv6/configure.m4 b/opal/mca/if/linux_ipv6/configure.m4
index 583d59e93fe..096fdbe5665 100644
--- a/opal/mca/if/linux_ipv6/configure.m4
+++ b/opal/mca/if/linux_ipv6/configure.m4
@@ -3,6 +3,8 @@
 # Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
 # Copyright (c) 2015      Research Organization for Information Science
 #                         and Technology (RIST). All rights reserved.
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
+# Copyright (c) 2025      Jeffrey M. Squyres.  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -22,12 +24,13 @@ AC_DEFUN([MCA_opal_if_linux_ipv6_COMPILE_MODE], [
 AC_DEFUN([MCA_opal_if_linux_ipv6_CONFIG], [
     AC_CONFIG_FILES([opal/mca/if/linux_ipv6/Makefile])
 
-    AC_REQUIRE([OPAL_CHECK_OS_FLAVORS])
+    AC_REQUIRE([OAC_CHECK_OS_FLAVORS])
 
-    AC_MSG_CHECKING([if we are on Linux with TCP])
-    # If we have struct sockaddr and we're on Linux, then we're
-    # happy.
-    AS_IF([test "$opal_found_sockaddr" = "yes" && test "$opal_found_linux" = "yes"],
+    # If we previously found struct sockaddr_in6 (we don't repeat the
+    # AC CHECK_TYPES test here simply because it's cumbersome with all
+    # the required #includes) and we're on Linux, we're happy.
+    AC_MSG_CHECKING([for Linux with struct sockaddr_in6])
+    AS_IF([test "$ac_cv_type_struct_sockaddr_in6" = "yes" && test "$oac_found_linux" = "yes"],
           [AC_MSG_RESULT([yes])
            $1],
           [AC_MSG_RESULT([no])
diff --git a/opal/mca/if/posix_ipv4/configure.m4 b/opal/mca/if/posix_ipv4/configure.m4
index 73548efb985..f5574434937 100644
--- a/opal/mca/if/posix_ipv4/configure.m4
+++ b/opal/mca/if/posix_ipv4/configure.m4
@@ -3,6 +3,8 @@
 # Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
 # Copyright (c) 2015      Research Organization for Information Science
 #                         and Technology (RIST). All rights reserved.
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
+# Copyright (c) 2025      Jeffrey M. Squyres.  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -25,22 +27,24 @@ AC_DEFUN([MCA_opal_if_posix_ipv4_CONFIG], [
     OPAL_VAR_SCOPE_PUSH([opal_if_posix_ipv4_happy])
     opal_if_posix_ipv4_happy=no
 
-    AC_REQUIRE([OPAL_CHECK_OS_FLAVORS])
+    AC_REQUIRE([OAC_CHECK_OS_FLAVORS])
 
-    # If we found struct sockaddr and we're NOT on most of the BSDs,
-    # we're happy.  I.e., if posix but not:
+    # If we previously found struct sockaddr_in (we don't repeat the
+    # AC CHECK_TYPES test here simply because it's cumbersome with all
+    # the required #includes) and we're NOT on most of the BSDs, we're
+    # happy.  I.e., this:
     #if defined(__NetBSD__) || defined(__FreeBSD__) || \
     #    defined(__OpenBSD__) || defined(__DragonFly__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in again])
+    AS_IF([test "$ac_cv_type_struct_sockaddr_in" = "yes"],
+          [AC_MSG_RESULT([yes (OPAL cached)])
            AC_MSG_CHECKING([not NetBSD, FreeBSD, OpenBSD, or DragonFly])
-           AS_IF([test "$opal_found_netbsd" = "no" && test "$opal_found_freebsd" = "no" && test "$opal_found_openbsd" = "no" && test "$opal_found_dragonfly" = "no"],
+           AS_IF([test "$oac_found_netbsd" = "no" && test "$oac_found_freebsd" = "no" && test "$oac_found_openbsd" = "no" && test "$oac_found_dragonfly" = "no"],
                  [AC_MSG_RESULT([yes])
                   opal_if_posix_ipv4_happy=yes],
                  [AC_MSG_RESULT([no])]
                 )],
-          [AC_MSG_RESULT([no (cached)])]
+          [AC_MSG_RESULT([no (OPAL cached)])]
          )
 
     AS_IF([test "$opal_if_posix_ipv4_happy" = "yes"],
diff --git a/opal/mca/shmem/posix/shmem_posix_common_utils.c b/opal/mca/shmem/posix/shmem_posix_common_utils.c
index 5e1f5416757..4b6d164e145 100644
--- a/opal/mca/shmem/posix/shmem_posix_common_utils.c
+++ b/opal/mca/shmem/posix/shmem_posix_common_utils.c
@@ -19,6 +19,7 @@
  *                         reserved.
  * Copyright (c) 2022      IBM Corporation. All rights reserved
  *
+ * Copyright (c) 2025      Nanook Consulting  All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -33,15 +34,9 @@
 #    include <fcntl.h>
 #endif /* HAVE_FCNTL_H */
 #include <string.h>
-#if OPAL_HAVE_SOLARIS && !defined(_POSIX_C_SOURCE)
-#    define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */
+#ifdef HAVE_SYS_MMAN_H
 #    include <sys/mman.h>
-#    undef _POSIX_C_SOURCE
-#else
-#    ifdef HAVE_SYS_MMAN_H
-#        include <sys/mman.h>
-#    endif /* HAVE_SYS_MMAN_H */
-#endif
+#endif /* HAVE_SYS_MMAN_H */
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/opal/mca/shmem/posix/shmem_posix_module.c b/opal/mca/shmem/posix/shmem_posix_module.c
index a2f781819e6..ef1843535f7 100644
--- a/opal/mca/shmem/posix/shmem_posix_module.c
+++ b/opal/mca/shmem/posix/shmem_posix_module.c
@@ -17,6 +17,7 @@
  * Copyright (c) 2019      Triad National Security, LLC. All rights
  *                         reserved.
  * Copyright (c) 2022      IBM Corporation. All rights reserved
+ * Copyright (c) 2025      Nanook Consulting  All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -30,15 +31,9 @@
 #ifdef HAVE_FCNTL_H
 #    include <fcntl.h>
 #endif /* HAVE_FCNTL_H */
-#if OPAL_HAVE_SOLARIS && !defined(_POSIX_C_SOURCE)
-#    define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */
+#ifdef HAVE_SYS_MMAN_H
 #    include <sys/mman.h>
-#    undef _POSIX_C_SOURCE
-#else
-#    ifdef HAVE_SYS_MMAN_H
-#        include <sys/mman.h>
-#    endif /* HAVE_SYS_MMAN_H */
-#endif
+#endif /* HAVE_SYS_MMAN_H */
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>
 #endif /* HAVE_UNISTD_H */
diff --git a/opal/mca/threads/pthreads/configure.m4 b/opal/mca/threads/pthreads/configure.m4
index 0bf263e7570..126653dc008 100644
--- a/opal/mca/threads/pthreads/configure.m4
+++ b/opal/mca/threads/pthreads/configure.m4
@@ -16,6 +16,7 @@
 # Copyright (c) 2019      Sandia National Laboratories.  All rights reserved.
 # Copyright (c) 2019      Triad National Security, LLC. All rights
 #                         reserved.
+# Copyright (c) 2025      Nanook Consulting  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -363,23 +364,15 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS],[
 # -Kthread:
 # -kthread:  FreeBSD kernel threads
 # -pthread:  Modern GCC (most all platforms)
-# -pthreads: GCC on solaris
 # -mthreads:
-# -mt:       Solaris native compilers / HP-UX aCC
+# -mt:       HP-UX aCC
 #
 # Put -mt before -mthreads because HP-UX aCC will properly compile
 # with -mthreads (reading as -mt), but emit a warning about unknown
-# flags hreads.  Stupid compilers.
+# flags "hreads".  Stupid compilers.
 OPAL_VAR_SCOPE_PUSH([pflags])
 
-case "${host_cpu}-${host_os}" in
-  *solaris*)
-    pflags="-pthread -pthreads -mt"
-  ;;
-  *)
-    pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
-  ;;
-esac
+pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
 
 # Only run C++ and Fortran if those compilers were found
 
@@ -705,7 +698,7 @@ AC_DEFUN([MCA_opal_threads_pthreads_COMPILE_MODE], [
 
 # If component was selected, $1 will be 1 and we should set the base header
 AC_DEFUN([MCA_opal_threads_pthreads_POST_CONFIG],[
-    AS_IF([test "$1" = "1"], 
+    AS_IF([test "$1" = "1"],
           [opal_thread_type_found="pthreads"
            AC_DEFINE_UNQUOTED([MCA_threads_base_include_HEADER],
                               ["opal/mca/threads/pthreads/threads_pthreads_threads.h"],
diff --git a/opal/util/path.c b/opal/util/path.c
index 6931de8756b..9e4200a9384 100644
--- a/opal/util/path.c
+++ b/opal/util/path.c
@@ -17,6 +17,7 @@
  * Copyright (c) 2016      University of Houston. All rights reserved.
  * Copyright (c) 2016      Research Organization for Information Science
  *                         and Technology (RIST). All rights reserved.
+ * Copyright (c) 2025      Nanook Consulting  All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -86,7 +87,7 @@
 #endif
 
 /*
- * Note that some OS's (e.g., NetBSD and Solaris) have statfs(), but
+ * Note that some OS's (e.g., NetBSD has statfs(), but
  * no struct statfs (!).  So check to make sure we have struct statfs
  * before allowing the use of statfs().
  */
@@ -409,8 +410,8 @@ char *opal_find_absolute_path(char *app_name)
 
 /**
  * Read real FS type from /etc/mtab, needed to translate autofs fs type into real fs type
- * TODO: solaris? OSX?
- * Limitations: autofs on solaris/osx will be assumed as "nfs" type
+ * TODO: OSX?
+ * Limitations: autofs on osx will be assumed as "nfs" type
  */
 
 static char *opal_check_mtab(char *dev_path)
@@ -457,10 +458,6 @@ static char *opal_check_mtab(char *dev_path)
  *   statvfs (const char *path, struct statvfs *buf);
  *          with unsigned long  f_fsid;   -- returns wrong info
  *          return 0 success, -1 on failure with errno set.
- * Solaris:
- *   statvfs (const char *path, struct statvfs *buf);
- *          with f_basetype, contains a string of length FSTYPSZ
- *          return 0 success, -1 on failure with errno set.
  * FreeBSD:
  *   statfs(const char *path, struct statfs *buf);
  *          with f_fstypename, contains a string of length MFSNAMELEN
diff --git a/oshmem/mca/memheap/ptmalloc/malloc.c b/oshmem/mca/memheap/ptmalloc/malloc.c
index f5a77108e25..0b11a6fb327 100644
--- a/oshmem/mca/memheap/ptmalloc/malloc.c
+++ b/oshmem/mca/memheap/ptmalloc/malloc.c
@@ -1263,9 +1263,6 @@ extern void*     sbrk(ptrdiff_t);
 #if USE_LOCKS
 #ifndef WIN32
 #include <pthread.h>
-#if defined (__SVR4) && defined (__sun)  /* solaris */
-#include <thread.h>
-#endif /* solaris */
 #else
 #ifndef _M_AMD64
 /* These are already defined on AMD64 builds */
@@ -1544,15 +1541,11 @@ static FORCEINLINE int pthread_acquire_lock (MLOCK_T *sl) {
         break;
       }
       if ((++spins & SPINS_PER_YIELD) == 0) {
-#if defined (__SVR4) && defined (__sun) /* solaris */
-        thr_yield();
-#else
 #ifdef linux
         sched_yield();
 #else  /* no-op yield on unknown systems */
         ;
 #endif /* linux */
-#endif /* solaris */
       }
     }
   }


Reviews:
user: login: bwbarrett
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-04-22T20:26:22Z
user: login: rhc54
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T20:47:43Z
user: login: bosilca
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-04-28T04:07:38Z
user: login: jsquyres
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T13:08:57Z
user: login: jsquyres
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T13:11:24Z
user: login: jsquyres
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T13:13:37Z
user: login: jsquyres
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T13:17:03Z
user: login: bosilca
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T19:48:54Z
user: login: jsquyres
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T22:56:24Z
user: login: rhc54
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T02:45:21Z
user: login: bosilca
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-29T04:40:26Z
user: login: bosilca
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-29T04:57:06Z
user: login: jsquyres
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-29T13:53:12Z
user: login: bosilca
body: If we're putting efforts into updating this to 2025 let's do it right. Check for `sockaddr`, `sockaddr_in` and `sockaddr_in6`, get rid of all the BSD decisions, and change the logic in all the IPv6 components to use `ac_cv_type_struct_sockaddr_in6`.

And don't check for OAC_CHECK_OS_FLAVORS for this particular topic.
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-29T15:20:11Z
user: login: bosilca
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-29T20:53:59Z

Review comments:
diff_hunk: @@ -363,23 +364,15 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS],[
 # -Kthread:
 # -kthread:  FreeBSD kernel threads
 # -pthread:  Modern GCC (most all platforms)
-# -pthreads: GCC on solaris
 # -mthreads:
-# -mt:       Solaris native compilers / HP-UX aCC
+# -mt:       HP-UX aCC
 #
 # Put -mt before -mthreads because HP-UX aCC will properly compile
 # with -mthreads (reading as -mt), but emit a warning about unknown
-# flags hreads.  Stupid compilers.
+# flags threads.  Stupid compilers.
path: opal/mca/threads/pthreads/configure.m4
user: login: bwbarrett
body: This was not a typo.  The compiler emitted a warning about unknown flags `hreads`, because the `t` was consumed as part of the `-mt` parsing.
created_at: 2025-04-22T20:25:23Z
author_association: MEMBER
diff_hunk: @@ -363,23 +364,15 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS],[
 # -Kthread:
 # -kthread:  FreeBSD kernel threads
 # -pthread:  Modern GCC (most all platforms)
-# -pthreads: GCC on solaris
 # -mthreads:
-# -mt:       Solaris native compilers / HP-UX aCC
+# -mt:       HP-UX aCC
 #
 # Put -mt before -mthreads because HP-UX aCC will properly compile
 # with -mthreads (reading as -mt), but emit a warning about unknown
-# flags hreads.  Stupid compilers.
+# flags threads.  Stupid compilers.
path: opal/mca/threads/pthreads/configure.m4
user: login: rhc54
body: Done - I put quotes around the word so it is a little more obviously intentional.
created_at: 2025-04-22T20:47:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -735,7 +735,26 @@ AC_CACHE_SAVE
 
 opal_show_title "Type tests"
 
-AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_in6,
path: configure.ac
user: login: bosilca
body: You don't need to split this `AC_CHECK_TYPES` because this macro will set `ac_cv_type_struct_sockaddr_in` if `struct sockaddr_in` is found (in addition to setting the #define `HAVE_STRUCT_SOCKADDR_IN`). This means you can simply set `opal_found_sockaddr_in` to `ac_cv_type_struct_sockaddr_in`.
created_at: 2025-04-28T03:42:00Z
author_association: MEMBER
diff_hunk: @@ -29,19 +30,18 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [
     # happy.  I.e., this:
     #if defined(__NetBSD__) || defined(__FreeBSD__) || \
     #    defined(__OpenBSD__) || defined(__DragonFly__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv4/configure.m4
user: login: bosilca
body: `struct sockaddr` is an umbrella struct for all network protocols, and is OS-dependent (which might explain why the check was done in `opal_check_os_flavors.m4`). However, I don't think any modern (aka post 2000) OS providing BSD-like network support can do so without it. Checking for `struct sockaddr_in` and `struct sock_addr_in6` make sense, but the check for `struct sockaddr` has no value other than consistency. What would not having this struct actually mean ? No network support at all ?


created_at: 2025-04-28T03:59:29Z
author_association: MEMBER
diff_hunk: @@ -29,20 +30,20 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [
     # happy.  I.e., this:
     #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
     #             defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv6/configure.m4
user: login: bosilca
body: Why would we care is `struct sockaddr_in` is defined in an IPV6 bound module ?
created_at: 2025-04-28T04:04:45Z
author_association: MEMBER
diff_hunk: @@ -28,7 +29,7 @@ AC_DEFUN([MCA_opal_if_linux_ipv6_CONFIG], [
     AC_MSG_CHECKING([if we are on Linux with TCP])
     # If we have struct sockaddr and we're on Linux, then we're
     # happy.
-    AS_IF([test "$opal_found_sockaddr" = "yes" && test "$opal_found_linux" = "yes"],
+    AS_IF([test "$opal_found_sockaddr_in" = "yes" && test "$oac_found_linux" = "yes"],
path: opal/mca/if/linux_ipv6/configure.m4
user: login: bosilca
body: Same question as above why do we care if IPV4 struct exists on an IPV6 module ?
created_at: 2025-04-28T04:05:43Z
author_association: MEMBER
diff_hunk: @@ -735,7 +735,26 @@ AC_CACHE_SAVE
 
 opal_show_title "Type tests"
 
-AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_in6,
path: configure.ac
user: login: jsquyres
body: I avoided doing exactly that because technically, that's an internal AC macro name that is subject to change over time.  Practically, it likely won't change -- but I explicitly didn't want to use the unpublished / undocumented internal cached name.
created_at: 2025-04-28T13:08:57Z
author_association: MEMBER
diff_hunk: @@ -29,19 +30,18 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [
     # happy.  I.e., this:
     #if defined(__NetBSD__) || defined(__FreeBSD__) || \
     #    defined(__OpenBSD__) || defined(__DragonFly__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv4/configure.m4
user: login: jsquyres
body: I'm not sure I follow.  Where do you see a check for `struct sockaddr` here?
created_at: 2025-04-28T13:11:24Z
author_association: MEMBER
diff_hunk: @@ -29,20 +30,20 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [
     # happy.  I.e., this:
     #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
     #             defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv6/configure.m4
user: login: jsquyres
body: I think we were using the check for `sockaddr_in` as a proxy for also checking for IPv6 support / structures.  I.e., back when this was written, I think that if you have IPv4 support, you also had IPv6 support.  It looks like it was replacing C #if's like this:

```
    # If we found struct sockaddr and we're on any of the BSDs, we're                           
    # happy.  I.e., this:                                                                       
    #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \               
    #             defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__)                
```
created_at: 2025-04-28T13:13:37Z
author_association: MEMBER
diff_hunk: @@ -28,7 +29,7 @@ AC_DEFUN([MCA_opal_if_linux_ipv6_CONFIG], [
     AC_MSG_CHECKING([if we are on Linux with TCP])
     # If we have struct sockaddr and we're on Linux, then we're
     # happy.
-    AS_IF([test "$opal_found_sockaddr" = "yes" && test "$opal_found_linux" = "yes"],
+    AS_IF([test "$opal_found_sockaddr_in" = "yes" && test "$oac_found_linux" = "yes"],
path: opal/mca/if/linux_ipv6/configure.m4
user: login: jsquyres
body: Same answer as above.
created_at: 2025-04-28T13:17:03Z
author_association: MEMBER
diff_hunk: @@ -29,19 +30,18 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [
     # happy.  I.e., this:
     #if defined(__NetBSD__) || defined(__FreeBSD__) || \
     #    defined(__OpenBSD__) || defined(__DragonFly__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv4/configure.m4
user: login: bosilca
body: Nowhere now, as if the only thing that matter is "do we have support for IPv4 (aka struct sockaddr_in)?"
created_at: 2025-04-28T19:48:53Z
author_association: MEMBER
diff_hunk: @@ -29,20 +30,20 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [
     # happy.  I.e., this:
     #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
     #             defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv6/configure.m4
user: login: jsquyres
body: @bosilca Can you comment on this? ^^
created_at: 2025-04-28T22:56:23Z
author_association: MEMBER
diff_hunk: @@ -735,7 +735,26 @@ AC_CACHE_SAVE
 
 opal_show_title "Type tests"
 
-AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_in6,
path: configure.ac
user: login: rhc54
body: @jsquyres Just curious and would welcome clarification. OMPI's configure code actually uses these "ac_xxx" variables in quite a few places. Are you suggesting that these be changed (over time!) to remove that dependency?

I ask because I'm trying to maintain a list of "to-do" items for calling PMIx/PRRTE "complete". If there is a serious reason to replace our dependency on those vars, then I'll add that to the list
created_at: 2025-04-29T02:45:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -735,7 +735,26 @@ AC_CACHE_SAVE
 
 opal_show_title "Type tests"
 
-AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_in6,
path: configure.ac
user: login: bosilca
body: We use these internal variables everywhere (all datatype detection, fortran support). we are doomed anyway if they change names, but meanwhile we remain consistent with ourselves.
created_at: 2025-04-29T04:40:26Z
author_association: MEMBER
diff_hunk: @@ -29,20 +30,20 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [
     # happy.  I.e., this:
     #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
     #             defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__)
-    AC_MSG_CHECKING([struct sockaddr])
-    AS_IF([test "$opal_found_sockaddr" = "yes"],
-          [AC_MSG_RESULT([yes (cached)])
+    AC_MSG_CHECKING([struct sockaddr_in])
path: opal/mca/if/bsdx_ipv6/configure.m4
user: login: bosilca
body: There is a difference between `struct sockaddr` (the umbrella struct for all sockaddr) and a specific protocol support such as `struct sockaddr_in` (specific for IPv4). But, even if these two checks (`sockaddr` and `sockaddr_in`) are morally equivalent on BSD, it seems like a stretch to infer that IPv4 support automatically grants IPv6 (again, even if in this particular case, BSD-like OS, it is the case). Personally, I prefer the old inference, `struct sockaddr` implies `sockaddr_in6` on BSD.
created_at: 2025-04-29T04:57:06Z
author_association: MEMBER
diff_hunk: @@ -735,7 +735,26 @@ AC_CACHE_SAVE
 
 opal_show_title "Type tests"
 
-AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_in6,
path: configure.ac
user: login: jsquyres
body: No, I'm not suggesting that we change.  I was just trying to be better / use the actual documented mechanisms.

But this is admittedly a weak argument here: these names haven't changed in years.  Indeed, I suspect that if Autoconf ever *did* actually change these names, a *lot* of `configure.ac` scripts would break.

I'll update to use the internal names.
created_at: 2025-04-29T13:53:12Z
author_association: MEMBER

PR comments:
user: login: rhc54
created_at: 2025-04-22T15:51:43Z
body: Not sure the failure has anything to do with this PR - the singleton test is timing out. I do see the following:
```shell
testHIndexed (test_util_dtlib.TestUtilDTLib.testHIndexed) ... 20 more processes
have sent help message help-mca-bml-r2.txt / unreachable proc
```
Any ideas?
author_association: CONTRIBUTOR
user: login: rhc54
created_at: 2025-04-22T22:01:27Z
body: Something is messed up in your main branch - I'm seeing a bunch of errors like this one:
```shell
testCreateGroup (test_exceptions.TestExcSession.testCreateGroup) ... --------------------------------------------------------------------------
Your application has invoked an MPI function that is not supported in
this environment.

  MPI function: MPI_Group_from_session_pset
  Reason:       PMIx server unreachable
--------------------------------------------------------------------------
```
Looks like you are trying to test comm_spawn related functions and the "mpirun" server isn't getting spawned for some reason. The tests don't always just fail - you get lots of "proc not reachable" for the child job. Since it takes time for all those individual comm_spawn tests to fail, the overall CI test eventually times out.

Again, I can't see how this is related to what is being done here. Did something sneak into your main branch?
author_association: CONTRIBUTOR
user: login: hppritcha
created_at: 2025-04-23T02:21:07Z
body: This is expected behavior. Nothing to do at all with spawning processes.  Just no server to handle pmix group construct ops.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-23T03:17:38Z
body: > This is expected behavior. Nothing to do at all with spawning processes. Just no server to handle pmix group construct ops.

Okay - so how do you guys get this CI to pass? I didn't touch the yaml file.
author_association: CONTRIBUTOR
user: login: hppritcha
created_at: 2025-04-23T13:53:29Z
body: Check the mpi4py testcreatefromgroup unit test.  That’s where the exception is special cased.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-23T14:02:02Z
body: Just running it by hand, the problem is that mpi4py is running a bunch of singleton comm_spawn tests - and those are generating errors and an eventual hang. Here is a sample of them:
```shell
testArgsOnlyAtRoot (test_spawn.TestSpawnSingleWorld.testArgsOnlyAtRoot) ... 64 more processes have sent help message help-mca-bml-r2.txt / unreachable proc
testCommSpawn (test_spawn.TestSpawnSingleWorldMany.testCommSpawn) ... ERROR
testErrcodes (test_spawn.TestSpawnSingleWorldMany.testErrcodes) ... ERROR
testNoArgs (test_spawn.TestSpawnSingleWorldMany.testNoArgs) ... ERROR
testToMemory (test_status.TestStatus.testToMemory) ... ERROR
test_util_dtlib (unittest.loader._FailedTest.test_util_dtlib) ... ERROR
```
and here is the traceback for the test that eventually hangs - note that it has called spawn 40 times!
```shell
test_apply (test_util_pool.TestProcessPool.test_apply) ... 17 more processes have sent help message help-mca-bml-r2.txt / unreachable proc
^CTraceback (most recent call last):
  File "/opt/hpc/build/mpi4py/test/main.py", line 361, in <module>
    main(module=None)
  File "/usr/local/lib/python3.11/unittest/main.py", line 102, in __init__
    self.runTests()
  File "/opt/hpc/build/mpi4py/test/main.py", line 346, in runTests
    super().runTests()
  File "/usr/local/lib/python3.11/unittest/main.py", line 274, in runTests
    self.result = testRunner.run(self.test)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/unittest/runner.py", line 217, in run
    test(result)
  File "/usr/local/lib/python3.11/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.11/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.11/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.11/unittest/case.py", line 678, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
  File "/usr/local/lib/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/opt/hpc/build/mpi4py/test/test_util_pool.py", line 80, in test_apply
    self.assertEqual(papply(sqr, (5,)), sqr(5))
                     ^^^^^^^^^^^^^^^^^
  File "/opt/hpc/build/mpi4py/build/lib.linux-aarch64-cpython-311/mpi4py/util/pool.py", line 79, in apply
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 451, in result
    self._condition.wait(timeout)
  File "/usr/local/lib/python3.11/threading.py", line 327, in wait
    waiter.acquire()

[rhc-node01:10447] dpm_disconnect_init: error -12 in isend to process 0
```
...bunch of error outputs like the one below:
```shell
--------------------------------------------------------------------------
At least one pair of MPI processes are unable to reach each other for
MPI communications.  This means that no Open MPI device has indicated
that it can be used to communicate between these processes.  This is
an error; Open MPI requires that all MPI processes be able to reach
each other.  This error can sometimes be the result of forgetting to
specify the "self" BTL.

  Process 1 ([[24043,0],0]) is on host: rhc-node01
  Process 2 ([[51572,40],0]) is on host: rhc-node01
  BTLs attempted: self sm smcuda

Your MPI job is now going to abort; sorry.
--------------------------------------------------------------------------
```

author_association: CONTRIBUTOR
user: login: hppritcha
created_at: 2025-04-23T19:53:19Z
body: I did some investigations here and it looks like some changes in this PR somehow broke the connection management in the TCP BTL.  If one runs main with mpi4py with OMPI_MCA_btl=self,tcp things work.  But with this PR it doesn't.  There are some suspicioius differences between the opal_config.h generated in this PR vs main and I suspect that's a symptom of other config differences that wind up giving the TCP BTL problems.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-23T23:18:35Z
body: Okay, I'll leave this up in case someone else wants to pick it up. I don't have any more time, I'm afraid. There was a check_os_flavors.m4 file still in OMPI that is a duplicate of one in OAC - could be that there is some differences there. Otherwise, I'm not sure what pieces would cause the conflict.
author_association: CONTRIBUTOR
user: login: jsquyres
created_at: 2025-04-24T13:16:59Z
body: Thanks @rhc54.

I confirm @hppritcha's findings -- there's weird `configure` results differences between this PR and `main`.  I diff'ed the output from running configure on `main` vs. running configure on this branch.  The meaningful differences appear to be these (- == `main`, + == this PR):

```diff
@@ -536,10 +536,6 @@
 checking __linux__... no
 checking __sun__... no
 checking __sun... no
-checking for netdb.h... (cached) yes
-checking for netinet/in.h... (cached) yes
-checking for netinet/tcp.h... (cached) yes
-checking for struct sockaddr_in... (cached) yes
 checking for _SC_NPROCESSORS_ONLN... yes
 checking whether byte ordering is bigendian... no
 checking for broken qsort... no

@@ -3608,15 +3604,13 @@
 
 --- MCA component if:bsdx_ipv4 (m4 configuration macro)
 checking for MCA component if:bsdx_ipv4 compile mode... static
-checking struct sockaddr... yes (cached)
-checking NetBSD, FreeBSD, OpenBSD, or DragonFly... no
+checking struct sockaddr... no (cached)
 checking if MCA component if:bsdx_ipv4 can compile... no
 
 --- MCA component if:bsdx_ipv6 (m4 configuration macro)
 checking for MCA component if:bsdx_ipv6 compile mode... static
-checking struct sockaddr... yes (cached)
-checking some flavor of BSD... yes
-checking if MCA component if:bsdx_ipv6 can compile... yes
+checking struct sockaddr... no (cached)
+checking if MCA component if:bsdx_ipv6 can compile... no
 
 --- MCA component if:linux_ipv6 (m4 configuration macro)
 checking for MCA component if:linux_ipv6 compile mode... static
@@ -3625,11 +3619,8 @@
 
 --- MCA component if:posix_ipv4 (m4 configuration macro)
 checking for MCA component if:posix_ipv4 compile mode... static
-checking struct sockaddr... yes (cached)
-checking not NetBSD, FreeBSD, OpenBSD, or DragonFly... yes
-checking for struct ifreq.ifr_hwaddr... no
-checking for struct ifreq.ifr_mtu... yes
-checking if MCA component if:posix_ipv4 can compile... yes
+checking struct sockaddr... no (cached)
+checking if MCA component if:posix_ipv4 can compile... no
 
 +++ Configuring MCA framework installdirs
 checking for no configure components in framework installdirs... 
```

I can investigate more this weekend.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-24T13:25:16Z
body: Smells like it might be the difference between opal and OAC check_os_flavors.m4? Note that I do have a PR open on the OAC version - don't think it will solve this problem, but just wanted to alert you to it:

https://github.com/open-mpi/oac/pull/20
author_association: CONTRIBUTOR
user: login: jsquyres
created_at: 2025-04-24T13:39:31Z
body: Yeah, the first hunk of that diff is definitely a difference between the OPAL and OAC version.  But that *shouldn't* make a difference...

I'm confused by the "(cached)" notation of the `checking struct sockaddr...` test in the subsequent hunks.  How can the *first* difference between those 2 `configure` outputs be a cached difference?  I.e., that should be a test that was already run, and they would have had to come up with different answers.  But I'm not seeing that.  🤷‍♂️  

I'll investigate more this weekend.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-24T14:42:48Z
body: Just for another data point: I checked the diffs for PMIx and PRRTE before/after the change, and I don't see any of the differences that you flagged. Note that PMIx has the same interface components (and configury) as OPAL. All the differences I see are benign and expected. 🤷‍♂️ 
author_association: CONTRIBUTOR
user: login: bosilca
created_at: 2025-04-24T15:55:57Z
body: This PR disables most of the `if` components as it removed the check for support for sockaddr that is required by the `if` components. This is due to a difference between OAC's check_os_flavors.m4 and OMPI check_os_flavors .m4, the former does not check for network support (headers and sockaddr). Going back to using OMPI's `check_os_flavors.m4` should fix these issues.
author_association: MEMBER
user: login: hppritcha
created_at: 2025-04-24T16:14:11Z
body: This speaks for having mpi4py being a required to merge CI test.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-24T20:35:14Z
body: I believe the thought for OAC was that "check_os_flavors" really meant "identify the OS" - and did not include testing the environment for all sorts of unrelated things. In PMIx/PRRTE, we do that in a separate section. Keeps things cleaner. Also explains why PMIx/PRRTE didn't see similar problems.

Up to you how you want to resolve it - return the OPAL version or add the detection code in a separate area. Just please don't change the OAC version by adding in a bunch of stuff that goes beyond its intended purpose.

> This speaks for having mpi4py being a required to merge CI test.

You don't need 30 min of mpi4py to detect this  problem, though it does have other uses.
author_association: CONTRIBUTOR
user: login: jsquyres
created_at: 2025-04-24T21:26:55Z
body: Yes, I would agree -- there's a reason we removed the network detection stuff from the OAC "check OS" macro (because it has nothing to do with detecting the OS).  So we don't really want to go back to the OPAL version, and we also don't want to add those checks into the OAC version.

Worst case, we just do those checks in OMPI's `configure.ac`.  

This is the conclusion I came to before I posted my comment this morning, but the reason I didn't just do that outright because I want to understand the `(cached)` oddity first: I don't understand why it says those results are cached when we previously ran those tests and agreed with the configure output from `main`.  That makes no sense to me.
author_association: MEMBER
user: login: rhc54
created_at: 2025-04-24T21:50:41Z
body: Maybe an OAC_check_network.m4? Could the caching be due to running the configure in PMIx and PRRTE prior to you doing it in OPAL? I believe all the var names are common between the projects.
author_association: CONTRIBUTOR
user: login: jsquyres
created_at: 2025-04-25T13:19:33Z
body: I found the issue (issues, actually).  It's much more mundane than we thought.  Here's the commit message for the commit I just pushed:

------

opal/mca/if: fix "struct sockaddr_in" and OS checks
    
Found a few more places we needed to adjust for changing from OPAL_CHECK_OS_FLAVORS to OAC_CHECK_OS_FLAVORS.
    
Also, in the opal/mca/if components, we have configure.m4 scripts that explicitly check $opal_found_sockaddr.  This was a problem for a few reasons:
    
1. We just deleted the setting of $opal_found_sockaddr from the previous OPAL_CHECK_OS_FLAVORS macro (*why* it was set in that macro isn't really clear -- "struct sockaddr" doesn't really have anything to do with checking OS flavors).
2. The old OPAL_CHECK_OS_FLAVORS macro is actually checking for "struct sockaddr_in", not "struct sockaddr".  This led to a lot of confusion in this round of debugging.
    
Also, the additional network header checks and check for struct sockaddr_in in OPAL_CHECK_OS_FLAVORS were redundant: they were already being performed in OMPI's top-level configure.ac.  Deleting these redundant tests -- and indeed, deleting all of OPAL_CHECK_OS_FLAVORS -- is fine.  But we did need to set a global variable for the opal/mca/if/*/configure.m4 scripts to check.  This commit therefore adjusts the top-level configure.ac script to explicitly save the result of checking for "struct sockaddr_in" into $opal_found_sockaddr_in.
    
Finally, slightly change the AC_MSG_RESULT output in the opal/mca/if/*/configure.m4 scripts to make it clear that the check for "struct sockaddr_in" is *not* using the regular AC_CHECK_TYPES method. Instead, the "cached" results it is getting are from OPAL caching, not regular Autoconf test caching.  Do this because the "(cached)" output that it previously emitted caused considerable confusion during this round of debugging (i.e., I assumed it was coming from regular Autoconf test caching, which is an entirely different mechanism).
author_association: MEMBER
user: login: jsquyres
created_at: 2025-04-29T14:43:43Z
body: @bosilca Please review the new commit I just pushed.
author_association: MEMBER
user: login: jsquyres
created_at: 2025-04-29T15:32:52Z
body: > If we're putting efforts into updating this to 2025 let's do it right. Check for `sockaddr`, `sockaddr_in` and `sockaddr_in6`, 

`struct sockaddr_in` and `struct sockaddr_in6` are already tested in `configure.ac`.  Are you looking for something else here?

What is the need for testing for `struct sockaddr`?  If we have `sockaddr_in` and/or `sockaddr_in6`, then -- by definition -- we have `sockaddr`.

> get rid of all the BSD decisions, 

Do we know that that is safe?  I don't have any way to test that.

> and change the logic in all the IPv6 components to use `ac_cv_type_struct_sockaddr_in6`.

That was already done.

> And don't check for OAC_CHECK_OS_FLAVORS for this particular topic.

Not sure what you mean here...?

If you're referring to `AC_REQUIRE([OAC_CHECK_OS_FLAVORS])` in each of the components, a) that was already there, and b) that's the Correct way to ensure that that macro has already been invoked before this one.  It's basically the Autoconf mechanism for expressing dependencies between macros.  I don't know why we would remove that from these `configure.m4` files...?

author_association: MEMBER
user: login: bosilca
created_at: 2025-04-29T18:03:57Z
body: What I meant was that if you remove the current assumption that IPv4+BSD-like implies IPv6, and instead rely on the existence of `struct sockaddr_in` and `struct sockaddr_in6`, there is no need to know the OS flavor and therefore you can remove the dependency on `OAC_CHECK_OS_FLAVORS`.
author_association: MEMBER
user: login: jsquyres
created_at: 2025-04-29T19:56:27Z
body: > What I meant was that if you remove the current assumption that IPv4+BSD-like implies IPv6, and instead rely on the existence of `struct sockaddr_in` and `struct sockaddr_in6`, there is no need to know the OS flavor and therefore you can remove the dependency on `OAC_CHECK_OS_FLAVORS`.

I'm not sure that's entirely correct.  Why do we have 4 components, then, instead of 2?

* bsd_ipv4
* bsd_ipv6
* posix_ipv4
* linux_ipv6

I have not looked at the code differences between the BSD components and the POSIX/Linux components.

**Also, please remember:** this PR is about getting rid of Solaris support.  It's not a PR to clean up the `if` modules -- I did not sign up for that...  😄 
author_association: MEMBER
user: login: bosilca
created_at: 2025-04-29T20:53:29Z
body: My bad, it's good as is. If `struct sockaddr_in6` exists and we are on a BSD-like build the bsdx_ipv6 component, otherwise build the linux_ipv6. 
author_association: MEMBER