Skip to content

Commit

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

* trilinos-develop: (64 commits)
  Phalanx: fix exec space instance init for UVM=ON
  SEACAS: Fix for netcdf without pnetcdf
  EXODUS: Add a missed ifdef
  Sacado:  Remove a few instances of use of deprecated Rank
  Sacado fix subview for LayoutContiguous<LayoutLeft>
  Intrepid2: fix for trilinos#12037; resolves a test failure on certain CUDA platforms. (PR trilinos#12047)
  EXODUS: Need to check whether nc_def_var_fill is defined in netCDF
  IOSS: Fix bad changes from !compare to !=
  Use OpenMPI 1.10.1 for CXX20 build
  APREPRO: Fix "if" instead of "else if" in arg parsing
  IOSS: Remove fmt dependency for Trilinos users
  STK: Snapshot 07-12-23 07:43 from Sierra simon_2023-07-10-63-g4c25d07a
  Update logic for enabling TrilinosInstallTests in CI testing (trilinos#12024)
  Tempus: Example Problem to Use SolutionState
  Tempus: Example Problem to Use SolutionState
  Phalanx: only use partition_space if enough concurrency available
  Fix accidental debuggery
  Chomp usage whitespace before assertion
  Panzer : Remove deprecated STK code.
  Fix some error message testing
  ...
  • Loading branch information
Charonops Jenkins Pipeline committed Jul 17, 2023
2 parents 4539a08 + 4968200 commit 7616dd1
Show file tree
Hide file tree
Showing 1,154 changed files with 46,978 additions and 36,633 deletions.
57 changes: 10 additions & 47 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,7 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/ProjectName.cmake)
PROJECT(${PROJECT_NAME} NONE)

# Set up to use ccache
if($ENV{CCACHE_NODISABLE})
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
if(CMAKE_GENERATOR STREQUAL "Xcode")
message(FATAL_ERROR "ccache not supported with Xcode in Trilinos")
else()
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
else()
message(FATAL_ERROR "ccache requested but not found")
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/cmake/UseCCache.cmake")

# Set an env so we know we are in configure
set(ENV{CMAKE_IS_IN_CONFIGURE_MODE} 1)
Expand All @@ -103,44 +91,19 @@ SET(${PROJECT_NAME}_ENABLE_CPACK_PACKAGING_DEFAULT ON)
# Don't allow disabled subpackages to be excluded from tarball
SET(${PROJECT_NAME}_EXCLUDE_DISABLED_SUBPACKAGES_FROM_DISTRIBUTION_DEFAULT FALSE)

# Set up C++ language standard selection (rest is handled by TriBITS)
SET(${PROJECT_NAME}_CMAKE_CXX_STANDARD_DEFAULT 17)
SET(${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED "(17|20|23)")
ADVANCED_SET(CMAKE_CXX_STANDARD ${${PROJECT_NAME}_CMAKE_CXX_STANDARD_DEFAULT}
CACHE STRING
"C++ standard number with values ${${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED} (default ${${PROJECT_NAME}_CMAKE_CXX_STANDARD_DEFAULT})")
IF (NOT CMAKE_CXX_STANDARD MATCHES "^${${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED}$")
MESSAGE(FATAL_ERROR
"CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is not in the allowed set "
"${${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED}")
ENDIF ()

message(STATUS "The Current CXX Standard is : " ${CMAKE_CXX_STANDARD})

# Force off support for Makefile.export.* files while TriBITS is refactored to
# remove this (#8498)
SET(${PROJECT_NAME}_ENABLE_EXPORT_MAKEFILES OFF CACHE BOOL
"Support being removed from TriBITS (see trilinos/Trilinos#8498)" FORCE)
# Set up C++ language standard selection
include(SetTrilinosCxxStandard)

# Some CMake and TriBiTS tweaks just for Trilinos
include(TrilinosTweaks)

# Do all of the processing for this Tribits project
TRIBITS_PROJECT()

if (COMMAND INSTALL_BUILD_STATS_SCRIPTS)
INSTALL_BUILD_STATS_SCRIPTS()
endif()

# Install TriBITS so that other projects can use it.
ADVANCED_SET(${PROJECT_NAME}_INSTALL_TriBITS ON CACHE BOOL
"If ture, install TriBITS into <lib-install-dir>/cmake/tribits/")
IF (${PROJECT_NAME}_INSTALL_TriBITS)
ASSERT_DEFINED(Trilinos_SOURCE_DIR)
ASSERT_DEFINED(${PROJECT_NAME}_INSTALL_LIB_DIR)
INSTALL(
DIRECTORY "${Trilinos_SOURCE_DIR}/cmake/tribits"
DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake"
PATTERN "*.pyc" EXCLUDE
)
ENDIF()
INSTALL_BUILD_STATS_SCRIPTS()

# Install TriBITS so that other projects can use it
include(SetupTribitsInstall)

IF(${PROJECT_NAME}_ENABLE_YouCompleteMe)
INCLUDE(CodeCompletion)
Expand Down
14 changes: 11 additions & 3 deletions cmake/CallbackDefineRepositoryPackaging.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
MACRO(TRIBITS_REPOSITORY_DEFINE_PACKAGING)

#MESSAGE("TRIBITS_REPOSITORY_DEFINE_PACKAGING() called for Trilinos!")

# We need to make sure that these excludes only apply to Trilinos, not the global
# project.
SET(Trilinos_SOURCE_EXCLUDE_DIR ${Trilinos_SOURCE_DIR})
#PRINT_VAR(Trilinos_SOURCE_EXCLUDE_DIR)

SET(CPACK_SOURCE_IGNORE_FILES
${CPACK_SOURCE_IGNORE_FILES}
Expand Down Expand Up @@ -48,6 +45,17 @@ MACRO(TRIBITS_REPOSITORY_DEFINE_PACKAGING)
${Trilinos_SOURCE_EXCLUDE_DIR}/config/
)

if (NOT ${CMAKE_PROJECT_NAME}_ENABLE_TrilinosBuildStats)
# Don't strip out all of commonTools/build_stats/, just the TriBITS
# package-related files. We want to keep these, even for a tarball
# release.
set(buildStatsPkgDir "${Trilinos_SOURCE_DIR}/commonTools/build_stats")
list(REMOVE_ITEM CPACK_SOURCE_IGNORE_FILES "${buildStatsPkgDir}/")
list(APPEND CPACK_SOURCE_IGNORE_FILES
"${buildStatsPkgDir}/cmake/Dependencies.cmake"
"${buildStatsPkgDir}/CMakeLists.txt" )
endif()

APPEND_SET(TRIBITS_CPACK_PACKAGES_TO_NOT_IGNORE TriBITS)

ENDMACRO()
13 changes: 4 additions & 9 deletions cmake/CallbackSetupExtraOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,7 @@ ENDMACRO()
# Set up for build stats
#

set(buildStatsWrappersFile
"${Trilinos_SOURCE_DIR}/commonTools/build_stats/BuildStatsWrappers.cmake")
if (EXISTS "${buildStatsWrappersFile}")
include("${Trilinos_SOURCE_DIR}/commonTools/build_stats/BuildStatsWrappers.cmake")
generate_build_stats_wrappers()
remove_build_stats_file_on_configure()
remove_build_stats_timing_files_on_fresh_configure()
endif()

include("${Trilinos_SOURCE_DIR}/commonTools/build_stats/BuildStatsWrappers.cmake")
generate_build_stats_wrappers()
remove_build_stats_file_on_configure()
remove_build_stats_timing_files_on_fresh_configure()
13 changes: 13 additions & 0 deletions cmake/SetTrilinosCxxStandard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Set up C++ language standard selection (rest is handled by TriBITS)
SET(${PROJECT_NAME}_CMAKE_CXX_STANDARD_DEFAULT 17)
SET(${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED "(17|20|23)")
ADVANCED_SET(CMAKE_CXX_STANDARD ${${PROJECT_NAME}_CMAKE_CXX_STANDARD_DEFAULT}
CACHE STRING
"C++ standard number with values ${${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED} (default ${${PROJECT_NAME}_CMAKE_CXX_STANDARD_DEFAULT})")
IF (NOT CMAKE_CXX_STANDARD MATCHES "^${${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED}$")
MESSAGE(FATAL_ERROR
"CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is not in the allowed set "
"${${PROJECT_NAME}_CMAKE_CXX_STANDARDS_ALLOWED}")
ENDIF ()

message(STATUS "The Current CXX Standard is : " ${CMAKE_CXX_STANDARD})
12 changes: 12 additions & 0 deletions cmake/SetupTribitsInstall.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Install TriBITS so that other projects can use it.
ADVANCED_SET(${PROJECT_NAME}_INSTALL_TriBITS ON CACHE BOOL
"If ture, install TriBITS into <lib-install-dir>/cmake/tribits/")
IF (${PROJECT_NAME}_INSTALL_TriBITS)
ASSERT_DEFINED(Trilinos_SOURCE_DIR)
ASSERT_DEFINED(${PROJECT_NAME}_INSTALL_LIB_DIR)
INSTALL(
DIRECTORY "${Trilinos_SOURCE_DIR}/cmake/tribits"
DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake"
PATTERN "*.pyc" EXCLUDE
)
ENDIF()
8 changes: 8 additions & 0 deletions cmake/TrilinosTweaks.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Define Some CMake and TriBiTS tweaks just for Trilinos (a.k.a. hacks)
#

# Define empty macro to allow Kokkos and KokkosKernels to keep working until
# updated versions after Kokkos 4.1 are snapshotted in.
macro(tribits_exclude_autotools_files)
endmacro()
13 changes: 13 additions & 0 deletions cmake/UseCCache.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if($ENV{CCACHE_NODISABLE})
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
if(CMAKE_GENERATOR STREQUAL "Xcode")
message(FATAL_ERROR "ccache not supported with Xcode in Trilinos")
else()
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
else()
message(FATAL_ERROR "ccache requested but not found")
endif()
endif()
28 changes: 27 additions & 1 deletion cmake/tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,33 @@
ChangeLog for TriBITS
----------------------------------------

## 2023-5-03:
## 2023-06-22:

* **Added:** Packages are now determined to be missing if their dependencies
file `<packageDir>/cmake/Dependencies.cmake` is missing. If the package
directory `<packageDir>` exists but the dependencies file is missing, the
package is determined to be missing but a warning is printed. (This expands
behavior to gracefully deal with a situation where a package source
directory is only partially removed, such as with `git rm -r <packageDir>`,
but the base directory still exists. Therefore, this allows the project to
gracefully configure with the package being considered missing and avoids a
fatal error in this case.)

## 2023-06-02:

* **Added/Deprecated:** External packages/TPLs can now be (and should be)
listed in the `[TEST|LIB]_[REQUIRED|OPTIONAL]_PACKAGES` arguments/lists in
the macro `tribits_package_define_dependencies()` and the
`[TEST|LIB]_[REQUIRED|OPTIONAL]_TPLS` arguments/lists are deprecated (but
with no deprecation warning yet). This makes it easier to write
`<packageDir>/cmake/Dependencies.cmake` files for packages where the set of
internal and external upstream dependent packages is dynamic and changes
depending on the TriBITS project where these package are configured under.
(And conceptually, a downstream package should not care if an upstream
dependent package is pulled in as an external package or built as an
internal package.)

## 2023-05-03:

* **Added:** Added support for non-fully TriBITS-compatible external packages.
Now, a `<Package>Config.cmake` file need not define
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
################################################################################


include(TribitsConfigureTiming)


# @MACRO: tribits_write_xml_dependency_files()
#
# Usage::
Expand Down
97 changes: 97 additions & 0 deletions cmake/tribits/core/package_arch/TribitsConfigureTiming.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# @HEADER
# ************************************************************************
#
# TriBITS: Tribal Build, Integrate, and Test System
# Copyright 2013 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ************************************************************************
# @HEADER


include(TimingUtils)


# Optionally start CMake code configure timing
#
function(tribits_config_code_start_timer START_TIMER_SECONDS_VAR_OUT)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING)
timer_get_raw_seconds(START_TIMER_SECONDS)
set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE)
endif()
endfunction()


# Optionally stop CMake code configure timing
#
function(tribits_config_code_stop_timer START_TIMER_SECONDS_VAR_IN
TIMER_STR
)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING)
timer_get_raw_seconds(TIMER_STOP_SECONDS)
timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}}
${TIMER_STOP_SECONDS}
"${TIMER_STR}")
endif()
endfunction()


# Optionally start CMake code **package** configure timing
#
function(tribits_package_config_code_start_timer START_TIMER_SECONDS_VAR_OUT)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING
AND
( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING
OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING )
)
timer_get_raw_seconds(START_TIMER_SECONDS)
set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE)
endif()
endfunction()


# Optionally stop CMake code **package** configure timing
#
function(tribits_package_config_code_stop_timer START_TIMER_SECONDS_VAR_IN
TIMER_STR
)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING
AND
( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING
OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING )
)
timer_get_raw_seconds(TIMER_STOP_SECONDS)
timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}}
${TIMER_STOP_SECONDS}
"${TIMER_STR}")
endif()
endfunction()
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
# ************************************************************************
# @HEADER


include(TribitsConfigureTiming)

include(CMakeParseArguments)


Expand Down
56 changes: 0 additions & 56 deletions cmake/tribits/core/package_arch/TribitsGeneralMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,62 +46,6 @@ include(TribitsDeprecatedHelpers)
include(TribitsGetPackageEnableStatus)


# Optionally start CMake code configure timing
#
function(tribits_config_code_start_timer START_TIMER_SECONDS_VAR_OUT)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING)
timer_get_raw_seconds(START_TIMER_SECONDS)
set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE)
endif()
endfunction()


# Optionally stop CMake code configure timing
#
function(tribits_config_code_stop_timer START_TIMER_SECONDS_VAR_IN
TIMER_STR
)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING)
timer_get_raw_seconds(TIMER_STOP_SECONDS)
timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}}
${TIMER_STOP_SECONDS}
"${TIMER_STR}")
endif()
endfunction()


# Optionally start CMake code **package** configure timing
#
function(tribits_package_config_code_start_timer START_TIMER_SECONDS_VAR_OUT)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING
AND
( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING
OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING )
)
timer_get_raw_seconds(START_TIMER_SECONDS)
set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE)
endif()
endfunction()


# Optionally stop CMake code **package** configure timing
#
function(tribits_package_config_code_stop_timer START_TIMER_SECONDS_VAR_IN
TIMER_STR
)
if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING
AND
( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING
OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING )
)
timer_get_raw_seconds(TIMER_STOP_SECONDS)
timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}}
${TIMER_STOP_SECONDS}
"${TIMER_STR}")
endif()
endfunction()


# Set the combined directory name taking into account '.' repos.
#
function(tribits_get_repo_name REPO_DIR REPO_NAME_OUT)
Expand Down
Loading

0 comments on commit 7616dd1

Please sign in to comment.