diff --git a/NEWS b/NEWS index 6f82f993b52..3c6ec8f7fc8 100644 --- a/NEWS +++ b/NEWS @@ -59,6 +59,9 @@ Master (not on release branches yet) ------------------------------------ - Fix rank-by algorithms to properly rank by object and span +- Do not build Open SHMEM layer when there are no SPMLs available. + Currently, this means the Open SHMEM layer will only build if + a MXM or UCX library is found. 3.1.0 -- May, 2018 ------------------ diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 index 358dc2f71f4..95ba540fb36 100644 --- a/config/opal_summary.m4 +++ b/config/opal_summary.m4 @@ -76,8 +76,10 @@ EOF if test "$project_oshmem_amc" = "true" ; then echo "Build Open SHMEM support: yes" - else + elif test -z "$project_oshmem_amc" ; then echo "Build Open SHMEM support: no" + else + echo "Build Open SHMEM support: $project_oshmem_amc" fi if test $WANT_DEBUG = 0 ; then diff --git a/configure.ac b/configure.ac index 4489b8ad98c..511e0100a6c 100644 --- a/configure.ac +++ b/configure.ac @@ -272,8 +272,8 @@ m4_ifndef([project_ompi], [project_ompi_amc=false]) AS_IF([test "$enable_orte" != "no"], [project_orte_amc=true], [project_orte_amc=false]) m4_ifndef([project_orte], [project_orte_amc=false]) -AS_IF([test "$enable_oshmem" != "no"], [project_oshmem_amc=true], [project_oshmem_amc=false]) -m4_ifndef([project_oshmem], [project_oshmem_amc=false]) +AS_IF([test "$enable_oshmem" != "no"], [project_oshmem_amc=true], [project_oshmem_amc="no (disabled)"]) +m4_ifndef([project_oshmem], [project_oshmem_amc="no (not available)"]) if test "$enable_binaries" = "no" && test "$enable_dist" = "yes"; then AC_MSG_WARN([--disable-binaries is incompatible with --enable dist]) @@ -1106,6 +1106,23 @@ OPAL_MCA m4_ifdef([project_ompi], [OMPI_REQUIRE_ENDPOINT_TAG_FINI]) +# Last minute disable of OpenSHMEM if we didn't find any oshmem SPMLs +if test "$project_oshmem_amc" = "true" && test $OSHMEM_FOUND_WORKING_SPML -eq 0 ; then + # We don't have an spml that will work, so oshmem wouldn't be able + # to run an application. Therefore, don't build the oshmem layer. + if test "$enable_oshmem" != "no" && test -n "$enable_oshmem"; then + AC_MSG_WARN([No spml found, so OpenSHMEM layer will be non functional.]) + AC_MSG_ERROR([Aborting because OpenSHMEM requested, but can not build.]) + else + AC_MSG_WARN([No spml found. Will not build OpenSHMEM layer.]) + project_oshmem_amc="false (no spml)" + # now for the hard part, remove project from list that will + # run. This is a hack, but it works as long as the project + # remains named "oshmem". + MCA_PROJECT_SUBDIRS=`echo "$MCA_PROJECT_SUBDIRS" | sed -e 's/oshmem//'` + fi +fi + # checkpoint results AC_CACHE_SAVE diff --git a/oshmem/mca/spml/configure.m4 b/oshmem/mca/spml/configure.m4 index 4113cb92a32..6f6ceca5fc2 100644 --- a/oshmem/mca/spml/configure.m4 +++ b/oshmem/mca/spml/configure.m4 @@ -16,4 +16,10 @@ AC_DEFUN([MCA_oshmem_spml_CONFIG],[ # this is a direct callable component, so set that up. MCA_SETUP_DIRECT_CALL($1, $2) + + if test -z "$MCA_$1_$2_DSO_COMPONENTS" && test -z "$MCA_$1_$2_STATIC_COMPONENTS"; then + OSHMEM_FOUND_WORKING_SPML=0 + else + OSHMEM_FOUND_WORKING_SPML=1 + fi ])