Skip to content

Commit

Permalink
Merge Pull Request #12717 from trilinos/Trilinos/master_merge_2024020…
Browse files Browse the repository at this point in the history
…2_175839

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: b'Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20240202_175839 branch to master'
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Feb 3, 2024
2 parents fd24949 + a988295 commit f1aef01
Show file tree
Hide file tree
Showing 63 changed files with 712 additions and 391 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ doxygen_objdb_*.tmp
# Ignore local gitdist config file (.gitdis.default is in git repo)
/.gitdist

# Ignore user-specific pre-commit files
/.pre-commit-config.yaml

# Allow github Kokkos to be cloned under Trilinos
/kokkos/

Expand Down
14 changes: 7 additions & 7 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INCLUDE(SetDefaultAndFromEnv)

SET(CTEST_NIGHTLY_START_TIME "04:00:00 UTC")
# NOTE: Above only is used by centralized VCS like CVS and SVN and does
# NOTE: Above is only used by centralized VCS like CVS and SVN and does
# nothing for git and other Distributed VCS. However, it needs to be set here
# to get around a defect in ctest_start() when passing in the APPEND argument
# which is used in ctest -S scripts to run tests on a different node from
Expand All @@ -11,7 +11,7 @@ SET(CTEST_NIGHTLY_START_TIME "04:00:00 UTC")
# Set actual CTest/CDash settings

IF (NOT DEFINED CTEST_DROP_METHOD)
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_METHOD "http")
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_METHOD "https")
ENDIF()

IF (CTEST_DROP_METHOD STREQUAL "http" OR CTEST_DROP_METHOD STREQUAL "https")
Expand All @@ -20,9 +20,9 @@ IF (CTEST_DROP_METHOD STREQUAL "http" OR CTEST_DROP_METHOD STREQUAL "https")
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_LOCATION "/cdash/submit.php?project=Trilinos")
SET_DEFAULT_AND_FROM_ENV(CTEST_TRIGGER_SITE "")
SET_DEFAULT_AND_FROM_ENV(CTEST_DROP_SITE_CDASH TRUE)
# # Secondary submit to development CDash site
# SET_DEFAULT_AND_FROM_ENV(TRIBITS_2ND_CTEST_DROP_SITE
# "testing-dev.sandia.gov")
# SET_DEFAULT_AND_FROM_ENV(TRIBITS_2ND_CTEST_DROP_LOCATION
# "/cdash/submit.php?project=Trilinos")
# Secondary submit to development CDash site
SET_DEFAULT_AND_FROM_ENV(TRIBITS_2ND_CTEST_DROP_SITE
"testing-dev.sandia.gov")
SET_DEFAULT_AND_FROM_ENV(TRIBITS_2ND_CTEST_DROP_LOCATION
"/cdash/submit.php?project=Trilinos")
ENDIF()
37 changes: 25 additions & 12 deletions cmake/std/atdm/van1-tx2/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ fi

if [[ "$ATDM_CONFIG_COMPILER" == "ARM-20.1_OPENMPI-4.0.5" ]]; then
module load sparc-dev/arm-20.1_openmpi-4.0.5
# devpack includes cmake/3.17.1 which is too old; swap it for this version
module load cmake/3.27.4
module unload yaml-cpp
# We'll use TPL_ROOT for consistency across ATDM environments
export MPI_ROOT=${MPI_DIR}
Expand All @@ -66,18 +68,35 @@ if [[ "$ATDM_CONFIG_COMPILER" == "ARM-20.1_OPENMPI-4.0.5" ]]; then
elif [[ "$ATDM_CONFIG_COMPILER" == "ARM-22.1_OPENMPI-4.0.5" ]]; then
export BLAS_ROOT=${ARMPL_DIR}
module load sparc-dev/arm-22.1_openmpi-4.0.5
module unload sparc-cmake/3.23.2
module load cmake/3.27.4
module unload yaml-cpp
# superlu and binutils are not included in the devpack:
# These TPLs are not included in the devpack:
module load superlu/5.2.1
module load superlu_dist/5.4.0
module load binutils/2.33.1
# This version of sparc-dev sets most of the $TPL_ROOT style variables,
# except these:
module load boost/1.72.0
module load phdf5/1.10.5
module load netcdf/4.6.3
module load pnetcdf/1.11.1
module load metis/5.1.0
module load parmetis/4.0.3
module load cgns/3.4.0
# Most <TPL>_ROOT paths are not set by TPLs, instead we have
# <TPL>_DIR. Trilinos looks for the _ROOT form.
export MPI_ROOT=${MPI_DIR}
export HDF5_ROOT=${HDF5_DIR}
export NETCDF_ROOT=${NETCDF_DIR}
export PNetCDF_ROOT=${PNETCDF_DIR}
export PNETCDF_ROOT=${PNETCDF_DIR}
export SUPERLU_ROOT=${SUPERLU_DIR}
export SUPERLUDist_ROOT=${SUPERLU_DIST_DIR}
export SuperLUDist_ROOT=${SUPERLU_DIST_DIR}
export METIS_ROOT=${METIS_DIR}
export PARMETIS_ROOT=${PARMETIS_DIR}
export CGNS_ROOT=${CGNS_DIR}
export BINUTILS_ROOT=${BINUTILS_DIR}
# SUPERLU_DIST and NETCDF libraries live in $ROOT/lib64 in this version
export ATDM_CONFIG_SUPERLUDIST_LIBS="-L${SUPERLUDIST_ROOT}/lib64;-lsuperlu_dist"
export ATDM_CONFIG_NETCDF_LIBS="-L${NETCDF_ROOT}/lib64;${NETCDF_ROOT}/lib64/libnetcdf.a;${PNETCDF_ROOT}/lib/libpnetcdf.a;${ATDM_CONFIG_HDF5_LIBS}"
export ATDM_CONFIG_SUPERLUDIST_LIBS="-L${SUPERLUDIST_ROOT}/lib;-lsuperlu_dist"
else
echo
echo "***"
Expand All @@ -100,12 +119,6 @@ else
export OMP_NUM_THREADS=1
fi

# Also unload this cmake module as 3.17 is too old to configure Trilinos.
# sparc-cmake/3.23.2 is the version we want to use
# (and both devpacks load it), but because it has a
# different name it won't unload this older version.
module unload cmake/3.17.1

# Common modules for all builds
module load ninja

Expand Down
55 changes: 26 additions & 29 deletions cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

# Standard TriBITS system includes

include("${CMAKE_CURRENT_LIST_DIR}/../utils/TribitsGitRepoVersionInfo.cmake")

include("${CMAKE_CURRENT_LIST_DIR}/../common/TribitsConstants.cmake")

include("${CMAKE_CURRENT_LIST_DIR}/../test_support/TribitsTestCategories.cmake")
Expand All @@ -53,7 +55,6 @@ include(TribitsGetVersionDate)
include(TribitsReportInvalidTribitsUsage)
include(TribitsReadAllProjectDepsFilesCreateDepsGraph)
include(TribitsAdjustPackageEnables)
include(TribitsGitRepoVersionInfo)
include(TribitsSetUpEnabledOnlyDependencies)
include(TribitsConfigureTiming)

Expand Down Expand Up @@ -685,6 +686,9 @@ macro(tribits_define_global_options_and_define_extra_repos)
CACHE BOOL
"Generate the ${PROJECT_NAME}RepoVersion.txt file.")

tribits_advanced_set_cache_var_and_default(${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS
BOOL OFF "Show parents' commit info in the repo version output.")

if ("${${PROJECT_NAME}_GENERATE_VERSION_DATE_FILES_DEFAULT}" STREQUAL "")
set(${PROJECT_NAME}_GENERATE_VERSION_DATE_FILES_DEFAULT OFF)
endif()
Expand Down Expand Up @@ -1207,48 +1211,41 @@ endmacro()

# Get the versions of all the git repos
#
function(tribits_generate_repo_version_file_string PROJECT_REPO_VERSION_FILE_STRING_OUT)
function(tribits_generate_repo_version_file_string projectRepoVersionFileStrOut)

set(REPO_VERSION_FILE_STR "")
set(projectRepoVersionFileStr "")

tribits_generate_single_repo_version_string(
${CMAKE_CURRENT_SOURCE_DIR}
SINGLE_REPO_VERSION)
string(APPEND REPO_VERSION_FILE_STR
${CMAKE_CURRENT_SOURCE_DIR} singleRepoVersionStr
INCLUDE_COMMIT_PARENTS ${${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS})
string(APPEND projectRepoVersionFileStr
"*** Base Git Repo: ${PROJECT_NAME}\n"
"${SINGLE_REPO_VERSION}\n" )
"${singleRepoVersionStr}\n" )

set(EXTRAREPO_IDX 0)
foreach(EXTRA_REPO ${${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES})

#print_var(EXTRA_REPO)
#print_var(EXTRAREPO_IDX)
#print_var(${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS)
set(extraRepoIdx 0)
foreach(extraRepo ${${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES})

if (${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS)
# Read from an extra repo file with potentially different dir.
list(GET ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS ${EXTRAREPO_IDX}
EXTRAREPO_DIR )
list(GET ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_DIRS ${extraRepoIdx}
extraRepoDir )
else()
# Not read from extra repo file so dir is same as name
set(EXTRAREPO_DIR ${EXTRA_REPO})
set(extraRepoDir ${extraRepo})
endif()
#print_var(EXTRAREPO_DIR)

tribits_generate_single_repo_version_string(
"${CMAKE_CURRENT_SOURCE_DIR}/${EXTRAREPO_DIR}"
SINGLE_REPO_VERSION)
string(APPEND REPO_VERSION_FILE_STR
"*** Git Repo: ${EXTRAREPO_DIR}\n"
"${SINGLE_REPO_VERSION}\n" )

#print_var(REPO_VERSION_FILE_STR)
"${CMAKE_CURRENT_SOURCE_DIR}/${extraRepoDir}" singleRepoVersionStr
INCLUDE_COMMIT_PARENTS ${${PROJECT_NAME}_SHOW_GIT_COMMIT_PARENTS})
string(APPEND projectRepoVersionFileStr
"*** Git Repo: ${extraRepoDir}\n"
"${singleRepoVersionStr}\n" )

math(EXPR EXTRAREPO_IDX "${EXTRAREPO_IDX}+1")
math(EXPR extraRepoIdx "${extraRepoIdx}+1")

endforeach()

set(${PROJECT_REPO_VERSION_FILE_STRING_OUT} ${REPO_VERSION_FILE_STR} PARENT_SCOPE)
set(${projectRepoVersionFileStrOut} ${projectRepoVersionFileStr} PARENT_SCOPE)

endfunction()

Expand All @@ -1260,17 +1257,17 @@ endfunction()
#
function(tribits_generate_repo_version_output_and_file)
# Get the repos versions
tribits_generate_repo_version_file_string(PROJECT_REPO_VERSION_FILE_STRING)
tribits_generate_repo_version_file_string(projectRepoVersionFileStr)
# Print the versions
message("\n${PROJECT_NAME} repos versions:\n"
"--------------------------------------------------------------------------------\n"
"${PROJECT_REPO_VERSION_FILE_STRING}"
"${projectRepoVersionFileStr}"
" --------------------------------------------------------------------------------\n"
)
#) Write out the version file
file(WRITE
"${CMAKE_CURRENT_BINARY_DIR}/${${PROJECT_NAME}_REPO_VERSION_FILE_NAME}"
"${PROJECT_REPO_VERSION_FILE_STRING}")
"${projectRepoVersionFileStr}")
endfunction()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function(tribits_git_repo_sha1 gitRepoDir gitRepoSha1Out)
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 "--pretty=format:%H"
WORKING_DIRECTORY ${gitRepoDir}
RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput
RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
)

if (NOT gitCmndRtn STREQUAL 0)
Expand All @@ -105,26 +106,118 @@ function(tribits_git_repo_sha1 gitRepoDir gitRepoSha1Out)
endfunction()


# Run the git log command to get the version info for a git repo
# @FUNCTION: tribits_generate_single_repo_version_string()
#
# Get the formatted string containing the current git repo version.
#
# Usage:
#
# tribits_generate_single_repo_version_string(<gitRepoDir>
# <repoVersionStringOut> [INCLUDE_PARENT_COMMITS ON|OFF])
#
# If the optional argument ``INCLUDE_PARENT_COMMITS <val>`` is passed,
# then the head commit's parent(s) info will be be included in
# the repo version output string formatted.
#
function(tribits_generate_single_repo_version_string gitRepoDir
repoVersionStringOut
)

cmake_parse_arguments( PARSE_ARGV 2
PARSE "" # prefix, optional
"INCLUDE_COMMIT_PARENTS" "" # one_value_keywords, multi_value_keyword
)
tribits_check_for_unparsed_arguments()
tribits_assert_parse_arg_zero_or_one_value(PARSE INCLUDE_COMMIT_PARENTS)

tribits_assert_git_executable()

# A) Get the basic version info.
# A) Get HEAD commit's info

tribits_generate_commit_info_string(${gitRepoDir} HEAD commitInfoString)

set(outStringBuilder ${commitInfoString})

# B) Get all of HEAD commit's parents into a list

execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 "--pretty=format:%h [%ad] <%ae>"
COMMAND ${GIT_EXECUTABLE} log -1 "--pretty=format:%p" HEAD
WORKING_DIRECTORY ${gitRepoDir}
RESULT_VARIABLE gitCmndRtn
OUTPUT_VARIABLE gitCmndOutput
RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
)

if (NOT gitCmndRtn STREQUAL 0)
message(FATAL_ERROR "ERROR, ${GIT_EXECUTABLE} command returned ${gitCmndRtn}!=0"
" with output '${gitCmndOutput}' for sha1 ${gitHeadSha1} of repo ${gitRepoDir}!")
set(headParentList "Error, could not get commit's parents!")
else()
string(REGEX REPLACE " +" ";" headParentList "${gitCmndOutput}")
endif()

list(LENGTH headParentList headNumParents)

# C) Get each parent's commit info and format the output

if (PARSE_INCLUDE_COMMIT_PARENTS)

set(parentIdx 1) # Parent commit indexes are 1-based by git

foreach(parentSha1 IN LISTS headParentList)

# C.1) Get parent commit info string

tribits_generate_commit_info_string(
${gitRepoDir} ${parentSha1}
commitInfoString)

# C.2) Format parent string to be pretty in config output

string(APPEND outStringBuilder
"\n *** Parent ${parentIdx}:")
string(REPLACE "\n" "\n "
commitInfoString "${commitInfoString}")
string(APPEND outStringBuilder "\n ${commitInfoString}" )

math(EXPR parentIdx "${parentIdx}+1")

endforeach()

endif()

set(${repoVersionStringOut} "${outStringBuilder}" PARENT_SCOPE)

endfunction()


# @FUNCTION: tribits_generate_commit_info_string()
#
# Get the formatted commit info containing commit's SHA1,
# author, date, email, and 80 character summary.
#
# Usage:
# tribits_generate_commit_info_string(<gitRepoDir> <gitCommitSha1>
# commitInfoStringOut)
#
# NOTE: Below, it is fine if ${maxSummaryLen} > len(${gitCmndOutput}) as
# string(SUBSTRING ...) will just shorten this to the length of the string.
#
function(tribits_generate_commit_info_string gitRepoDir gitCommitSha1
commitInfoStringOut
)

# A) Get commit hash, author, date, and email

execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 "--pretty=format:%h [%ad] <%ae>" ${gitCommitSha1}
WORKING_DIRECTORY ${gitRepoDir}
RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
)

if (NOT gitCmndRtn STREQUAL 0)
message(FATAL_ERROR "ERROR, ${GIT_EXECUTABLE} command returned ${gitCmndRtn}!=0"
" for repo ${gitRepoDir}!")
" with output '${gitCmndOutput}' for sha1 ${gitCommitSha1} of repo ${gitRepoDir}!")
set(gitVersionLine "Error, could not get version info!")
else()
set(gitVersionLine "${gitCmndOutput}")
Expand All @@ -133,27 +226,25 @@ function(tribits_generate_single_repo_version_string gitRepoDir
# B) Get the first 80 chars of the summary message for more info

execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%s
COMMAND ${GIT_EXECUTABLE} log -1 "--pretty=format:%s" ${gitCommitSha1}
WORKING_DIRECTORY ${gitRepoDir}
RESULT_VARIABLE gitCmndRtn
OUTPUT_VARIABLE gitCmndOutput
RESULT_VARIABLE gitCmndRtn OUTPUT_VARIABLE gitCmndOutput
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
)

if (NOT gitCmndRtn STREQUAL 0)
message(FATAL_ERROR "ERROR, ${GIT_EXECUTABLE} command returned ${gitCmndRtn}!=0"
" for extra repo ${gitRepoDir}!")
" with output '${gitCmndOutput}' for sha1 ${gitCommitSha1} of repo ${gitRepoDir}!")
set(gitSummaryStr "Error, could not get version summary!")
else()
set(maxSummaryLen 80)
string(SUBSTRING "${gitCmndOutput}" 0 ${maxSummaryLen} gitSummaryStr)
endif()

set(${repoVersionStringOut}
set(${commitInfoStringOut}
"${gitVersionLine}\n${gitSummaryStr}" PARENT_SCOPE)

endfunction()
# NOTE: Above, it is fine if ${maxSummaryLen} > len(${gitCmndOutput}) as
# string(SUBSTRING ...) will just shorten this to the length of the string.


function(tribits_assert_git_executable)
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/ctest_driver/TribitsAddDashboardTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#
################################################################################

include(TribitsGitRepoVersionInfo)
include("${CMAKE_CURRENT_LIST_DIR}/../core/utils/TribitsGitRepoVersionInfo.cmake")

#
# Macro that drives a experimental 'dashboard' target
Expand Down
Loading

0 comments on commit f1aef01

Please sign in to comment.