Skip to content

Commit 5594438

Browse files
Merge Pull Request #14637 from sebrowne/Trilinos/remove-deprecated-packages-only
Automatically Merged using Trilinos Pull Request AutoTester PR Title: b'Remove deprecated packages only' PR Author: sebrowne
2 parents 2c62638 + 18ea19f commit 5594438

File tree

3,766 files changed

+208
-1604352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,766 files changed

+208
-1604352
lines changed

.github/workflows/per-commit.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,3 @@ jobs:
2121
$GITHUB_WORKSPACE/commonTools/test/utilities/check-commit-signoffs.sh \
2222
origin/${{ github.event.pull_request.base.ref }} \
2323
${{ github.event.pull_request.head.sha }}
24-
25-
no-modifying-deprecated-packages:
26-
runs-on: ubuntu-latest
27-
28-
steps:
29-
- name: Check out code
30-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31-
with:
32-
fetch-depth: 0
33-
34-
- name: Search for signoff statements in commit messages
35-
run: |
36-
$GITHUB_WORKSPACE/commonTools/test/utilities/check-not-modify-legacy-packages.sh \
37-
origin/${{ github.event.pull_request.base.ref }} \
38-
${{ github.event.pull_request.head.sha }}

CMakeLists.txt

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ PROJECT(${PROJECT_NAME} NONE)
1717
# Set up to use ccache
1818
include("${CMAKE_CURRENT_LIST_DIR}/cmake/UseCCache.cmake")
1919

20-
set(DEPRECATED_PACKAGES Amesos AztecOO Epetra EpetraExt Ifpack Intrepid Isorropia ML NewPackage Pliris PyTrilinos ShyLU_DDCore ThyraEpetraAdapters ThyraEpetraExtAdapters Triutils)
21-
FOREACH(package ${DEPRECATED_PACKAGES})
22-
set(${package}_DISABLE_STRONG_WARNINGS ON CACHE BOOL "Disable strong compile warnings for ${package}" FORCE)
23-
ENDFOREACH()
24-
2520
# Set an env so we know we are in configure
2621
set(ENV{CMAKE_IS_IN_CONFIGURE_MODE} 1)
2722

@@ -61,30 +56,4 @@ IF(${PROJECT_NAME}_ENABLE_YouCompleteMe)
6156
INCLUDE(CodeCompletion)
6257
ENDIF()
6358

64-
set(enabled_deprecated_packages "")
65-
FOREACH(package ${DEPRECATED_PACKAGES})
66-
IF(Trilinos_ENABLE_${package})
67-
set(enabled_deprecated_packages ${package} ${enabled_deprecated_packages})
68-
ENDIF()
69-
ENDFOREACH()
70-
71-
IF(enabled_deprecated_packages)
72-
message("********************************************************************")
73-
message("******** WARNING WARNING WARNING WARNING WARNING WARNING *********")
74-
message("********************************************************************")
75-
message("* Several Trilinos packages are scheduled for deprecation in 2025.")
76-
message("* The following deprecated packages are enabled (either explicitly")
77-
message("* or implicitly due to a dependency)")
78-
message("*")
79-
string(REPLACE ";" "\n* " p "${enabled_deprecated_packages}")
80-
message("* ${p}")
81-
message("*")
82-
message("********************************************************************")
83-
message("")
84-
message(WARNING "Deprecated packages that are enabled: ${enabled_deprecated_packages}")
85-
IF(Trilinos_HIDE_DEPRECATED_CODE)
86-
message(FATAL_ERROR "Trilinos cannot be built with deprecated code hidden if any deprecated packages are enabled!")
87-
ENDIF()
88-
ENDIF()
89-
9059
message(STATUS "If publishing results using Trilinos, please cite us: https://trilinos.github.io/cite.html")

PackagesList.cmake

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
1111
RTOp packages/rtop PT
1212
Sacado packages/sacado PT
1313
MiniTensor packages/minitensor PT
14-
Epetra packages/epetra ST
1514
SCOREClion SCOREC/lion ST
1615
SCORECpcu SCOREC/pcu ST
1716
SCORECgmi SCOREC/gmi ST
@@ -24,34 +23,21 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
2423
AvatarT packages/avatart EX
2524
Zoltan packages/zoltan PT
2625
Shards packages/shards PT
27-
Triutils packages/triutils ST
28-
EpetraExt packages/epetraext ST
2926
Tpetra packages/tpetra PT
3027
TrilinosSS packages/common/auxiliarySoftware/SuiteSparse PT # Auxiliary software.
31-
Domi packages/domi PT
3228
Thyra packages/thyra PT
3329
Xpetra packages/xpetra PT
34-
Isorropia packages/isorropia ST
35-
Pliris packages/pliris ST
36-
AztecOO packages/aztecoo ST
3730
Galeri packages/galeri PT
38-
Amesos packages/amesos ST
3931
Pamgen packages/pamgen PT
4032
Zoltan2Core packages/zoltan2/core PT
41-
Ifpack packages/ifpack ST
42-
ML packages/ml ST
4333
Belos packages/belos PT
4434
ShyLU_Node packages/shylu/shylu_node PT
4535
Amesos2 packages/amesos2 PT
4636
SEACAS packages/seacas PT # Depends on netcdf, optionally hdf5, xdmf, pamgen
47-
Komplex packages/komplex ST
4837
Anasazi packages/anasazi PT
4938
Ifpack2 packages/ifpack2 PT
5039
Stratimikos packages/stratimikos PT
51-
FEI packages/fei PT
5240
Teko packages/teko PT
53-
TriKota packages/TriKota ST
54-
Intrepid packages/intrepid ST
5541
Intrepid2 packages/intrepid2 PT
5642
Compadre packages/compadre ST
5743
STK packages/stk PT # Depends on boost
@@ -64,14 +50,12 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
6450
SCOREC SCOREC ST
6551
Phalanx packages/phalanx PT
6652
NOX packages/nox PT
67-
Moertel packages/moertel ST
6853
MueLu packages/muelu PT
6954
TrilinosLinearSolvers packages/trilinos_linear_solvers PT
7055
Zoltan2Sphynx packages/zoltan2/sphynx PT
7156
Zoltan2 packages/zoltan2 PT
7257
ShyLU_DD packages/shylu/shylu_dd PT
7358
ShyLU packages/shylu PT
74-
Rythmos packages/rythmos PT
7559
Tempus packages/tempus PT
7660
MOOCHO packages/moocho ST
7761
Stokhos packages/stokhos PT
@@ -81,14 +65,11 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
8165
UMR packages/umr ST
8266
Panzer packages/panzer PT
8367
CTrilinos packages/CTrilinos ST # Switched to ST to speed up checkin testing
84-
PyTrilinos packages/PyTrilinos ST
8568
PyTrilinos2 packages/PyTrilinos2 EX
8669
WebTrilinos packages/WebTrilinos EX # Should be ST
87-
NewPackage packages/new_package EX # Should be ST
8870
Optika packages/optika EX
8971
Adelus packages/adelus PT
9072
TrilinosCouplings packages/trilinoscouplings PT
91-
Pike packages/pike PT
9273
xSDKTrilinos packages/xSDKTrilinos ST
9374
TrilinosBuildStats commonTools/build_stats PT
9475
TrilinosInstallTests packages/TrilinosInstallTests PT
@@ -122,15 +103,6 @@ TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(SGM)
122103
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(UMR)
123104
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(TrilinosLinearSolvers)
124105

125-
# TRILFRAME-500
126-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Rythmos) # 27115 targets
127-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Pike) # 27048 targets
128-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Komplex) # 27030 targets
129-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Moertel) # 26995 targets
130-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(TriKota) # 26995 targets
131-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(Domi) # 26946 targets
132-
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(FEI)
133-
134106
#
135107
# Disable certain packages on certain platforms.
136108
#

cmake-dependencies-scrubber.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import os
2+
import re
3+
4+
def remove_words_from_sets(text, words_to_remove):
5+
# Create a regex pattern to match the SET commands
6+
pattern = r'SET\(([^)]+)\)'
7+
8+
def replace_function(match):
9+
# Extract the current list of packages
10+
current_packages = match.group(1)
11+
# Split the packages into a list and remove unwanted words
12+
packages = current_packages.split()
13+
filtered_packages = [pkg for pkg in packages if pkg not in words_to_remove]
14+
# Join the filtered packages back into a string
15+
return f'SET({" ".join(filtered_packages)})'
16+
17+
# Use re.sub to replace all SET commands with the filtered lists
18+
modified_text = re.sub(pattern, replace_function, text)
19+
return modified_text
20+
21+
def process_file(file_path, words_to_remove):
22+
# Read the content of the file
23+
with open(file_path, 'r') as file:
24+
content = file.read()
25+
26+
# Remove specified words from the SET commands
27+
modified_content = remove_words_from_sets(content, words_to_remove)
28+
29+
# Write the modified content back to the file
30+
with open(file_path, 'w') as file:
31+
file.write(modified_content)
32+
33+
def find_and_process_files(directory, words_to_remove):
34+
# Walk through the directory to find all Dependencies.cmake files
35+
for root, dirs, files in os.walk(directory):
36+
for file in files:
37+
if file == 'Dependencies.cmake':
38+
file_path = os.path.join(root, file)
39+
print(f"Processing file: {file_path}")
40+
process_file(file_path, words_to_remove)
41+
42+
43+
if __name__ == "__main__":
44+
# Specify the directory to search
45+
target_directory = os.getcwd()
46+
# Define the list of words to remove
47+
words_to_remove = ['Amesos', 'AztecOO', 'Epetra', 'EpetraExt', 'Ifpack', 'Intrepid', 'Isorropia', 'ML', 'NewPackage', 'Pliris', 'PyTrilinos', 'ShyLU_DDCore', 'ThyraEpetraAdapters', 'ThyraEpetraExtAdapters', 'Triutils']
48+
49+
# Find and process all Dependencies.cmake files
50+
find_and_process_files(target_directory, words_to_remove)

cmake/ProjectCompilerPostConfig.cmake

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
tribits_get_package_enable_status(Kokkos KokkosEnable "")
22

33

4-
macro(disable_warnings_for_deprecated_packages)
5-
message(STATUS "Disabling all warnings/errors for deprecated packages")
6-
foreach(package ${DEPRECATED_PACKAGES})
7-
set(${package}_CXX_FLAGS "-w ${${package}_CXX_FLAGS}")
8-
endforeach()
9-
endmacro()
10-
11-
124
macro(enable_warnings warnings)
135
message(STATUS "Trilinos warnings enabled: ${warnings}")
146
foreach(warning ${warnings})
@@ -211,14 +203,27 @@ if("${Trilinos_WARNINGS_MODE}" STREQUAL "WARN")
211203
enable_warnings("${upcoming_warnings}")
212204
filter_valid_warnings_as_errors("${promoted_warnings}" promoted_warnings)
213205
enable_errors("${promoted_warnings}")
214-
disable_warnings_for_deprecated_packages()
215206
elseif("${Trilinos_WARNINGS_MODE}" STREQUAL "ERROR")
216207
filter_valid_warnings_as_errors("${promoted_warnings}" promoted_warnings)
217208
filter_valid_warnings_as_errors("${upcoming_warnings}" upcoming_warnings)
218209
enable_errors("${promoted_warnings};${upcoming_warnings}")
219-
disable_warnings_for_deprecated_packages()
220210
endif()
221211

222212
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
223213
disable_warnings("${explicitly_disabled_warnings}")
224214
endif()
215+
216+
217+
# Make sure that all deprecated packages are forcefully disabled (and that the variables controlling enablement are defined)
218+
macro(force_disable_package packageName)
219+
tribits_filter_package_list_from_var(Trilinos_DEFINED_PACKAGES INTERNAL ON NONEMPTY packageSublist)
220+
set(Trilinos_ENABLE_${packageName} OFF CACHE BOOL "Enable ${packageName} (special setting for force-disable, should ALWAYS be `OFF`)")
221+
foreach(package ${packageSublist})
222+
set(${package}_ENABLE_${packageName} OFF CACHE BOOL "Enable ${packageName} support in ${package} (special setting for force-disable, should ALWAYS be `OFF`)")
223+
endforeach()
224+
endmacro()
225+
226+
set(DEPRECATED_PACKAGES Amesos AztecOO Epetra EpetraExt Ifpack Intrepid Isorropia ML NewPackage Pliris PyTrilinos ShyLU_DDCore ThyraEpetraAdapters ThyraEpetraExtAdapters Triutils)
227+
FOREACH(package ${DEPRECATED_PACKAGES})
228+
force_disable_package(${package})
229+
ENDFOREACH()

commonTools/framework/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ENDFUNCTION()
133133

134134

135135
set(ALL_TOPLEVEL_PACKAGES_REGEX
136-
"TrilinosFrameworkTests TrilinosATDMConfigTests .*Kokkos Teuchos KokkosKernels .*EpetraExt Tpetra .*Thyra .*SEACAS .*Teko Intrepid .*MueLu .*ShyLU_DD ShyLU .*Tempus Stokhos ROL Piro Panzer Adelus TrilinosCouplings TrilinosBuildStats TrilinosInstallTests")
136+
"TrilinosFrameworkTests TrilinosATDMConfigTests .*Kokkos Teuchos KokkosKernels .*Tpetra .*Thyra .*SEACAS .*Teko .*MueLu .*ShyLU_DD ShyLU .*Tempus Stokhos ROL .*Panzer Adelus TrilinosCouplings TrilinosBuildStats TrilinosInstallTests")
137137

138138
create_get_changed_trilinos_packages_test(ProjectsList_TeuchosCore
139139
"ProjectsList.cmake\npackages/teuchos/core/CMakeLists.txt"
@@ -153,27 +153,27 @@ create_get_changed_trilinos_packages_test(ProjectsList_TeuchosCore
153153
# want to list too many packages above in the regex.
154154

155155

156-
create_get_changed_trilinos_packages_test(cmake_std_atdm_TeuchosCore_PyTrilinos_Pliris
157-
"cmake/std/atdm/anything\npackages/teuchos/core/CMakeLists.txt\npackages/PyTrilinos/anything\npackages/pliris/CMakeLists.txt"
158-
"TrilinosATDMConfigTests,TeuchosCore,PyTrilinos,Pliris"
159-
"TrilinosATDMConfigTests,TeuchosCore,Pliris"
160-
"Setting Trilinos_ENABLE_TrilinosATDMConfigTests = ON;Setting Trilinos_ENABLE_TeuchosCore = ON;Setting Trilinos_ENABLE_Pliris = ON"
156+
create_get_changed_trilinos_packages_test(cmake_std_atdm_TeuchosCore_PyTrilinos_Compadre
157+
"cmake/std/atdm/anything\npackages/teuchos/core/CMakeLists.txt\npackages/PyTrilinos/anything\npackages/compadre/CMakeLists.txt"
158+
"TrilinosATDMConfigTests,TeuchosCore,Compadre"
159+
"TrilinosATDMConfigTests,TeuchosCore,Compadre"
160+
"Setting Trilinos_ENABLE_TrilinosATDMConfigTests = ON;Setting Trilinos_ENABLE_TeuchosCore = ON;Setting Trilinos_ENABLE_Compadre = ON"
161161
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
162162
)
163163
# The above test ensures that cmake/std/atdm/ changes don't trigger global
164-
# builds and it makes sure that PT (TeuchosCore) and ST packages (Pliris) do
164+
# builds and it makes sure that PT (TeuchosCore) and ST packages (Compadre) do
165165
# get enabled (but excluded ST package PyTrilinos does not get included).
166166

167167

168-
create_get_changed_trilinos_packages_test(TeuchosCore_NewPackage_Pliris
169-
"packages/teuchos/core/CMakeLists.txt\npackages/new_package/anything\npackages/pliris/a.txt"
170-
"TeuchosCore,NewPackage,Pliris"
171-
"TeuchosCore,Pliris"
172-
"Setting Trilinos_ENABLE_TeuchosCore = ON;Setting Trilinos_ENABLE_Pliris = ON"
168+
create_get_changed_trilinos_packages_test(TeuchosCore_PyTrilinos2_Compadre
169+
"packages/teuchos/core/CMakeLists.txt\npackages/PyTrilinos2/anything\npackages/compadre/a.txt"
170+
"TeuchosCore,PyTrilinos2,Compadre"
171+
"TeuchosCore,Compadre"
172+
"Setting Trilinos_ENABLE_TeuchosCore = ON;Setting Trilinos_ENABLE_Compadre = ON"
173173
"${ALL_TOPLEVEL_PACKAGES_REGEX}"
174174
)
175-
# The above test ensures PT (TeuchosCore) and ST packages (Piro) do get
176-
# enabled but EX packages (NewPackage) don't.
175+
# The above test ensures PT (TeuchosCore) and ST packages (Compadre) do get
176+
# enabled but EX packages (PyTrilinos2) don't.
177177

178178

179179
create_get_changed_trilinos_packages_test(cmake_std_atdm

commonTools/framework/get-changed-trilinos-packages-helpers-unit-tests.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ test_trilinos_filter_packages_to_test() {
139139
assertContains "${all_toplevel_packages}" ",TrilinosATDMConfigTests,"
140140
assertContains "${all_toplevel_packages}" ",Teuchos,"
141141
assertContains "${all_toplevel_packages}" ",Tpetra,"
142-
assertContains "${all_toplevel_packages}" ",PyTrilinos,"
143-
assertContains "${all_toplevel_packages}" ",NewPackage,"
142+
assertContains "${all_toplevel_packages}" ",PyTrilinos2,"
144143
assertContains "${all_toplevel_packages}" ",Panzer,"
145144

146145
}

packages/PyTrilinos/.gitignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)