Skip to content

Commit

Permalink
Merge 'trilinos/Trilinos:develop' (ea7ea22) into 'tcad-charon/Trilino…
Browse files Browse the repository at this point in the history
…s:develop' (ab899a0).

* trilinos-develop: (22 commits)
  Remove non-existant subdir kokkos-kernels/common/common (trilinos#11921, trilinos#11863)
  Teuchos: Fixing cmake logic
  Teuchos: Fixing catch() issues with C++ language drift
  TrilinosSS: include <omp.h> (Fix trilinos#11867)
  MueLu hierarchical: Fix build error
  Tpetra: Changes to StaticView for Kokkos PTHREAD to THREADS change
  Teuchos: Automatically enabling Tecuhos_ENABLE_THREAD_SAFE if you have Kokkos THREADS or OPENMP for the host
  Stokhos:  Add missing KOKKOS_INLINE_FUNCTION to fix build errors on HIP
  Phalanx: Remove usage of undefined var Kokkos_INCLUDE_DIRS (trilinos#11545)
  Kokkos: Mark HWLOC as a TriBITS TPL as well (trilinos#11938)
  Update for removal of Kokkos subpackages and Kokkos test renamings (trilinos#11545, trilinos#11808)
  KokkosKernels: Remove non-existent common/src/[impl,tpls] include dirs (trilinos#11545)
  Add test simpleBuildAgainstTrilinos_by_package_build_tree_name (trilinos#11545)
  Pass in and define compilers before calling find_package(Trilinos) (trilinos#11545)
  Add `Kokkos::all_libs` alias target for compatibility with TriBITS/Trilinos (trilinos#6157)
  Export Kokkos_ENABLE_<OPTION> that are relevant
  Do not append to Kokkos_OPTIONS variables those in the do not export list
  Expand list of kokkos options not to export with cmake
  Tpetra: Don't use std::binary_function
  Tpetra: Fixing missing HIP tesT
  ...
  • Loading branch information
Charonops Jenkins Pipeline committed Jun 7, 2023
2 parents ab899a0 + ea7ea22 commit 80037af
Show file tree
Hide file tree
Showing 61 changed files with 702 additions and 1,080 deletions.
15 changes: 13 additions & 2 deletions cmake/tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
ChangeLog for TriBITS
----------------------------------------

## 2023-5-03:

* **Added:** Added support for non-fully TriBITS-compatible external packages.
Now, a `<Package>Config.cmake` file need not define
`<UpstreamPkg>::all_libs` targets for all of its upstream dependencies. The
updated macro `tribits_process_enabled_tpls()` will find any missing
upstream external packages/TPLs as needed (see updated documentation in the
section "TriBITS-Compliant External Packages" in the "TriBITS Users Guide"
and the section "Processing of external packages/TPLs and TriBITS-compliant
external packages" in the "TriBITS Maintainers Guide").

## 2023-02-24:

* **Changed:** Upgraded minimum required CMake version from 3.17 to 3.23.
Expand Down Expand Up @@ -214,9 +225,9 @@ ChangeLog for TriBITS
macro `tribits_extpkg_define_dependencies()` that sets
`<tplName>_LIB_ALL_DEPENDENCIES`. Now `<tplName>_LIB_ENABLED_DEPENDENCIES`
is automatically set from `<tplName>_LIB_ALL_DEPENDENCIES` based on what
TPLs are actaully enabled. This avoids the problem described below from
TPLs are actually enabled. This avoids the problem described below from
directly setting `<tplName>_LIB_ENABLED_DEPENDENCIES` without reguard to
what TPLs are actaully enabled. This maintains backward compatibility for
what TPLs are actually enabled. This maintains backward compatibility for
existing configure scripts where an upstream TPL may not be enabled in some
strange configure scripts (see
[TriBITSPub/TriBITS#494](https://github.com/TriBITSPub/TriBITS/issues/494)).
Expand Down
54 changes: 32 additions & 22 deletions cmake/tribits/ci_support/CDashQueryAnalyzeReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@
try:
# Python 2
from urllib2 import urlopen
from urllib2 import quote as urlquote
except ImportError:
# Python 3
from urllib.request import urlopen
from urllib.parse import quote as urlquote

import sys
import hashlib
Expand Down Expand Up @@ -723,41 +725,45 @@ def getAndCacheCDashQueryDataOrReadFromCache(
return cdashQueryData


def normalizeUrlStrings(*args):
return [urlquote(x) for x in args]


# Construct full cdash/api/v1/index.php query URL to pull data down given the
# pieces
def getCDashIndexQueryUrl(cdashUrl, projectName, date, filterFields):
# for legacy reasons, this function assumes we normalized projectName
projectName, = normalizeUrlStrings(projectName,)
if date: dateArg = "&date="+date
else: dateArg = ""
return cdashUrl+"/api/v1/index.php?project="+projectName+dateArg \
+ "&"+filterFields
+ "&"+filterFields


# Construct full cdash/index.php browser URL given the pieces
def getCDashIndexBrowserUrl(cdashUrl, projectName, date, filterFields):
# for legacy reasons, this function assumes we normalized projectName
projectName, = normalizeUrlStrings(projectName,)
if date: dateArg = "&date="+date
else: dateArg = ""
return cdashUrl+"/index.php?project="+projectName+dateArg \
+ "&"+filterFields
+ "&"+filterFields


# Construct full cdash/api/v1/queryTests.php query URL given the pieces
def getCDashQueryTestsQueryUrl(cdashUrl, projectName, date, filterFields):
# for legacy reasons, this function assumes we normalized projectName
projectName, = normalizeUrlStrings(projectName,)
if date: dateArg = "&date="+date
else: dateArg = ""
cdashTestUrl = cdashUrl+"/api/v1/queryTests.php?project="+projectName+dateArg+"&"+filterFields
return replaceNonUrlCharsInUrl(cdashTestUrl)


# Replace non-URL chars and return new URL string
def replaceNonUrlCharsInUrl(url):
urlNew = url
urlNew = urlNew.replace(' ', '%20')
# ToDo: Replace other chars as needed
return urlNew
return cdashTestUrl


# Construct full cdash/queryTests.php browser URL given the pieces
def getCDashQueryTestsBrowserUrl(cdashUrl, projectName, date, filterFields):
# for legacy reasons, this function assumes we normalized projectName
projectName, = normalizeUrlStrings(projectName,)
if date: dateArg = "&date="+date
else: dateArg = ""
return cdashUrl+"/queryTests.php?project="+projectName+dateArg+"&"+filterFields
Expand Down Expand Up @@ -1708,29 +1714,33 @@ def __call__(self, testDict):
dateRangeEndDateStr = self.__date
beginEndUrlFields = "begin="+dateRangeBeginDateStr+"&end="+dateRangeEndDateStr

# normalize names for query
projectName_url, buildName_url, testname_url, site_url = normalizeUrlStrings(
projectName, buildName, testname, site)

# Define queryTests.php query filters for test history
testHistoryQueryFilters = \
beginEndUrlFields+"&"+\
"filtercombine=and&filtercombine=&filtercount=3&showfilters=1&filtercombine=and"+\
"&field1=buildname&compare1=61&value1="+buildName+\
"&field2=testname&compare2=61&value2="+testname+\
"&field3=site&compare3=61&value3="+site
"&field1=buildname&compare1=61&value1="+buildName_url+\
"&field2=testname&compare2=61&value2="+testname_url+\
"&field3=site&compare3=61&value3="+site_url

# URL used to get the history of the test in JSON form
testHistoryQueryUrl = \
getCDashQueryTestsQueryUrl(cdashUrl, projectName, None, testHistoryQueryFilters)
getCDashQueryTestsQueryUrl(cdashUrl, projectName_url, None, testHistoryQueryFilters)

# URL to embed in email to show the history of the test to humans
testHistoryBrowserUrl = \
getCDashQueryTestsBrowserUrl(cdashUrl, projectName, None, testHistoryQueryFilters)
getCDashQueryTestsBrowserUrl(cdashUrl, projectName_url, None, testHistoryQueryFilters)

# URL for to the build summary on index.php page
buildHistoryEmailUrl = getCDashIndexBrowserUrl(
cdashUrl, projectName, None,
cdashUrl, projectName_url, None,
beginEndUrlFields+"&"+\
"filtercombine=and&filtercombine=&filtercount=2&showfilters=1&filtercombine=and"+\
"&field1=buildname&compare1=61&value1="+buildName+\
"&field2=site&compare2=61&value2="+site
"&field1=buildname&compare1=61&value1="+buildName_url+\
"&field2=site&compare2=61&value2="+site_url
)
# ToDo: Replace this with the the URL to just this one build the index.php
# page. To do that, get the build stamp from the list of builds on CDash
Expand Down Expand Up @@ -2109,7 +2119,7 @@ def __call__(self, dict_in):
#
# limitRowsToDisplay [in]: The max number of rows to display. The default is
# None which will result in no limit to the number of rows displayed. The top
# limitRowsToDisplay items will be dispalyed after the list is sorted.
# limitRowsToDisplay items will be displayed after the list is sorted.
#
def sortAndLimitListOfDicts(listOfDicts, sortKeyList = None,
limitRowsToDisplay = None\
Expand Down Expand Up @@ -2412,7 +2422,7 @@ def getCDashDataSummaryHtmlTableTitleStr(dataTitle, dataCountAcronym, numItems,
#
# limitRowsToDisplay [in]: The max number of rows to display. The default is
# None which will result in no limit to the number of rows displayed. The top
# limitRowsToDisplay items will be dispalyed after the list is sorted.
# limitRowsToDisplay items will be displayed after the list is sorted.
#
# htmlStyle [in]: The HTML style data (between <style></style>. If None is
# passed in then a default style is provided internally (see
Expand Down Expand Up @@ -2699,7 +2709,7 @@ def __init__(self, cdashReportData,
#
# verbose [in] If set to True then some more verbose info is printed to
# STDOUT. If False, then nothing is printed to STDOUT (which is useful
# for unit testsing). The default is True.
# for unit testing). The default is True.
#
# On output, self.cdashReportData data will be updated with the summary and
# table of this given build-set. In particular, the following
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/ci_support/CheckinTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,7 @@ def checkinTest(tribitsDir, inOptions, configuration={}):
abortGracefullyDueToNoChangesToPush = True
runBuildCases = False
elif pullPassed:
print("\nThe pull passsed, running the build/test cases ...\n")
print("\nThe pull passed, running the build/test cases ...\n")
runBuildCases = True
else:
print("\nNot running any build/test cases because the pull failed!\n")
Expand Down
6 changes: 5 additions & 1 deletion cmake/tribits/ci_support/cdash_analyze_and_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ def getTestHistory(self, testLOD):
# D.2.a) Get list of dicts of builds off cdash/index.phpp
#

# @arghdos: note, we do not have to normalize the URLs from the input
# options because they are currently taken from the cdash site already
# (i.e., they are already in normalized form).

cdashIndexBuildsBrowserUrl = CDQAR.getCDashIndexBrowserUrl(
inOptions.cdashSiteUrl, inOptions.cdashProjectName, inOptions.date,
inOptions.cdashBuildsFilters)
Expand Down Expand Up @@ -663,7 +667,7 @@ def getTestHistory(self, testLOD):
CDQAR.MatchDictKeysValuesFunctor(nonpassingTestsSLOD)

#
# D.3) Partition the varous list of tests into different sets that will
# D.3) Partition the various list of tests into different sets that will
# be displayed in different tables.
#

Expand Down
5 changes: 2 additions & 3 deletions cmake/tribits/common_tpls/FindTPLHDF5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ set(HDF5_INTERNAL_IS_MODERN FALSE)

if (Netcdf_ALLOW_MODERN)

set(minimum_modern_HDF5_version 1.10.9)
print_var(Netcdf_ALLOW_MODERN)
message("-- Using find_package(HDF5 ${minimum_modern_HDF5_version} CONFIG) ...")
find_package(HDF5 ${minimum_modern_HDF5_version} CONFIG)
message("-- Using find_package(HDF5 CONFIG) ...")
find_package(HDF5 CONFIG)
if (HDF5_FOUND)
message("-- Found HDF5_CONFIG=${HDF5_CONFIG}")
message("-- Generating Netcdf::all_libs and NetcdfConfig.cmake")
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/common_tpls/utils/ParseLibraryList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function(parse_library_list)
endforeach()


# Now set output vairables
# Now set output variables
set(${PARSE_ARGS_DEBUG} "${_debug_libs}" PARENT_SCOPE)
set(${PARSE_ARGS_OPT} "${_opt_libs}" PARENT_SCOPE)
set(${PARSE_ARGS_GENERAL} "${_gen_libs}" PARENT_SCOPE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ include(PrintVar)
# instead. **WARNING:** If you want to run such tests using valgrind, you
# have to use the raw executable as the ``<cmndExec>`` argument and *not*
# the script. For example, if you have a python script
# ``my_python_test.py`` with ``/usr/bin/env pyhton`` at the top, you can't
# ``my_python_test.py`` with ``/usr/bin/env python`` at the top, you can't
# just use::
#
# CMND <path>/my_python_test.py ARGS "<arg0>" "<arg1>" ...
Expand Down
4 changes: 2 additions & 2 deletions cmake/tribits/core/package_arch/TribitsAddLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ include(TribitsSetAndIncDirs)
# ``${CMAKE_INSTALL_PREFIX}/lib/`` (actual install directory is given by
# ``${PROJECT}_INSTALL_LIB_DIR``, see `Setting the install prefix`_).
# However, this install target will not get created if
# `${PROJECT_NAME}_INSTALL_LIBRARIES_AND_HEADERS`_ is ``FASLE`` and
# `${PROJECT_NAME}_INSTALL_LIBRARIES_AND_HEADERS`_ is ``FALSE`` and
# ``BUILD_SHARD_LIBS=OFF``. But when ``BUILD_SHARD_LIBS=ON``, the install
# target will get added. Also, this install target will *not* get added if
# ``TESTONLY`` or ``NO_INSTALL_LIB_OR_HEADERS`` are passed in.
Expand All @@ -280,7 +280,7 @@ include(TribitsSetAndIncDirs)
# added using ``install(FILES <h0> <h1> ...)``, but only if ``TESTONLY`` and
# ``NO_INSTALL_LIB_OR_HEADERS`` are not passed in as well. Also, the install
# target for the headers will not get added if
# `${PROJECT_NAME}_INSTALL_LIBRARIES_AND_HEADERS`_ is ``FASLE``. If this
# `${PROJECT_NAME}_INSTALL_LIBRARIES_AND_HEADERS`_ is ``FALSE``. If this
# install target is added, then the headers get installed into the flat
# directory ``${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}/`` (default is
# ``${CMAKE_INSTALL_PREFIX}/include/``, see `Setting the install prefix`_).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ include(GlobalSet)
# it is true, then sets the global (internal cache) macro define variable
# ``<macroDefineName>`` to ``ON``, and otherwise sets it to ``OFF``. If
# ``NONCACHE`` is passed in, then ``<macroDefineName>`` is set as a non-cache
# local varaible instead of a cache variable.
# local variable instead of a cache variable.
#
# This is designed to make it easy to add a user-enabled option to a
# configured header file and have the define set in one shot. This would
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/core/package_arch/TribitsAddTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ function(tribits_add_test EXE_NAME)
elseif (PARSE_POSTFIX_AND_ARGS_0)
# We will use this list instead
else()
# Niether 'ARGS' nor 'POSTFIX_AND_ARGS' was selected so just assume one
# Neither 'ARGS' nor 'POSTFIX_AND_ARGS' was selected so just assume one
# empty arg
set(PARSE_ARGS " ")
set(NUM_PARSE_ARGS 1)
Expand Down
6 changes: 3 additions & 3 deletions cmake/tribits/core/package_arch/TribitsAddTestHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ endfunction()


#
# Set the timeout for a test already aded
# Set the timeout for a test already added
#
function(tribits_private_add_test_set_timeout TEST_NAME_IN TIMEOUT_USED_OUT)

Expand All @@ -753,7 +753,7 @@ endfunction()


#
# Set the environment for a test already aded
# Set the environment for a test already added
#
function(tribits_private_add_test_set_environment TEST_NAME_IN)

Expand All @@ -768,7 +768,7 @@ endfunction()


#
# Set the environment for a test already aded
# Set the environment for a test already added
#
function(tribits_private_add_test_set_processors TEST_NAME_IN
NUM_TOTAL_CORES_USED_IN PROCESSORS_OUT
Expand Down
26 changes: 13 additions & 13 deletions cmake/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ macro(tribits_set_package_and_related_upstream_packages_to_external packageName
tribits_set_upstream_dep_packages_as_external(${packageName}
${subpackageTriggeredParentPackageExternal})

tribits_set_package_as_processed_by_downstream_tribits_external_package(${packageName})
tribits_mark_package_as_upstream_of_tribits_compliant_external_package(${packageName})

endmacro()
# NOTE: In the above macro, if ${packageName} is made EXTERNAL because it one
Expand Down Expand Up @@ -1317,10 +1317,16 @@ macro(tribits_set_upstream_dep_packages_as_external packageName
endmacro()


# Mark a package as being processed by a downstream TriBITS-compliant external
# package
# Mark a package as being upstream of a TriBITS-compliant external package
# (and therefore should be processed by a downstream TriBITS-complaint
# package)
#
# NOTE: These packages are initially marked by setting
# ``${packageName}_PROCESSED_BY_DOWNSTREAM_TRIBITS_EXTERNAL_PACKAGE=TRUE``.
# If this packages are not actually defined by a downstream TriBITS-compliant
# external package, then this variable will be set to ``FALSE`` later.
#
macro(tribits_set_package_as_processed_by_downstream_tribits_external_package packageName)
macro(tribits_mark_package_as_upstream_of_tribits_compliant_external_package packageName)

set_default(${packageName}_PROCESSED_BY_DOWNSTREAM_TRIBITS_EXTERNAL_PACKAGE FALSE)

Expand All @@ -1344,10 +1350,10 @@ macro(tribits_set_package_as_processed_by_downstream_tribits_external_package p
endif()
if (packageEnable AND (NOT ${packageName}_IS_TRIBITS_COMPLIANT))
message("-- "
"NOTE: ${packageName} is ${directOrIndirectStr} downstream from a"
"NOTE: ${packageName} is ${directOrIndirectStr} upstream from a"
" TriBITS-compliant external package${downstreamPkgStr}")
endif()
set(${packageName}_PROCESSED_BY_DOWNSTREAM_TRIBITS_EXTERNAL_PACKAGE TRUE)
set(${packageName}_PROCESSED_BY_DOWNSTREAM_TRIBITS_EXTERNAL_PACKAGE TRUE)
break()
endif()

Expand All @@ -1358,6 +1364,7 @@ macro(tribits_set_package_as_processed_by_downstream_tribits_external_package p
endmacro()



# Macro that sets ``<ParentPackage>_ENABLE_<SubPackage>=ON`` if not already
# enabled for all enabled subpackages of a parent package.
#
Expand Down Expand Up @@ -1424,13 +1431,6 @@ macro(tribits_set_internal_package_to_external depPkgName)
endmacro()


macro(tribits_set_as_processed_by_downstream_tribits_external_package packageName
depPkgName
)

endmacro()


# Function to return if <packageName> is to be treated as an EXTERNAL package
# in processing of the package
#
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ macro(tribits_define_global_options_and_define_extra_repos)
message(FATAL_ERROR "Error, the value of"
" ${PROJECT_NAME}_CHECK_FOR_UNPARSED_ARGUMENTS ="
" '${${PROJECT_NAME}_CHECK_FOR_UNPARSED_ARGUMENTS}' is invalid!"
" Valid valules include 'WANRING', 'SEND_ERROR', and 'FATAL_ERROR'"
" Valid values include 'WARNING', 'SEND_ERROR', and 'FATAL_ERROR'"
)
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ include(CMakeParseArguments)
# If specified, then ``COMPONENT <component>`` will be passed into
# ``install()``. Otherwise, ``COMPONENT ${PROJECT_NAME}`` will get used.
#
# If `${PROJECT_NAME}_INSTALL_LIBRARIES_AND_HEADERS`_ is ``FASLE``, then the
# If `${PROJECT_NAME}_INSTALL_LIBRARIES_AND_HEADERS`_ is ``FALSE``, then the
# headers will not get installed.
#
function(tribits_install_headers)
Expand Down
Loading

0 comments on commit 80037af

Please sign in to comment.