-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve management of TPL dependencies with new TriBITS (#299, #63) #494
Comments
CC: @keitat So this issue with ParMETIS and METIS is actually impacting the Trilinos PR builds as shown here with the configure error like shown here showing:
What you see above is that these PR builds are enabling ParMETIS but not METIS and that is what causes the error. So it is critical that I address this as above. |
…ub#63, TriBITSPub#494) And with this I can strengthen the tests later.
…b#63, TriBITSPub#299, TriBITSPub#494) Here is what I did in detail: * Created new module TribitsPackageDependencies.cmake (and unit test driver) to collect standard dependency defintion macros and functions into. * Created function tribits_external_package_define_dependencies() that sets <tplName>_LIB_ALL_DEPENDENCIES and tribits_external_package_setup_enabled_dependencies() that sets <tplName>_LIB_ENABLED_DEPENDENCIES based on what TPLs are actually enabled. (This should address TriBITSPub#494.) * Renamed function tribits_external_package_append_upstream_target_link_libraries_get_name_and_vis() to tribits_external_package_get_dep_name_and_vis() and moved from TribitsExternalPackageWriteConfigFile.cmake to TribitsPackageDependencies.cmake. * Improved a bit of the existing documentation.
…SPub#63, TriBITSPub#299, TriBITSPub#494) ToDo: Describe exactly what was done!
…TriBITSPub#63, TriBITSPub#299, TriBITSPub#494) This commit primarily adds support for FindTPL<tplName>Dependencies.cmake files so you don't need to call tribits_external_package_define_dependencies() from the TPLsList.cmake file (which was a terrible hack). As part of this, I also updated the documentation related to external packages/TPLs. More specifically I did the following: * Added support for FindTPL<tplName>Dependencies.cmake files which including adding a new TPL var <tplName>_DEPENDENCIES_FILE. That included adding a new macro tribits_read_external_package_deps_files_add_to_graph() that gets run for each TPL during the generation of the project package dependencies (and added to teh call-graph for tribits_read_all_project_deps_files_create_deps_graph()). * Expanded documentation on TriBITS External Packages/TPLs: - Properly listed out FindTPL<tplName>.cmake and FindTPL<tplName>Dependencies.cmake in the section 'TriBITS External Package/TPL Core Files' - Added linked documentation entries for FindTPL<tplName>.cmake and FindTPL<tplName>Dependencies.cmake - Updated list of step to add a new TPL - Added a section 'Creating FindTPL<tplName>.cmake file' with mini-toc to the subsections to make easy to navigate - Added MUST_FIND_ALL_LIBS to example calls of tribits_tpl_find_include_dirs_and_libraries() * Refactored TribitsExampleProject2: - Added FindTPL<tplName>Depenencies.cmake files for Tpl2, Tpl3, and Tpl4. - Remove hacked calls to tribits_external_package_define_dependencies() in TPLsList.cmake * Other users and maintainers guides updates: - Sorted items in TribitsSystemMacroFunctionDocTemplate.rst - Changed from 'FindTPL*.cmake' to 'FindTPL<tplName>.cmake' in the documentation (which I think looks better). - Other small documentation fixups I noticed while looking at this stuff. * Changed over to foreach ( ... IN LISTS ... ) for a few loops.
…b#63, TriBITSPub#299, TriBITSPub#494) There was feedback from @KyleFromKitware that this was too long and too hard to see the prefix.
…Pub#63, TriBITSPub#299, TriBITSPub#494) I also reformated the entry noting that TPLs must declare dependencies.
This is addressed in PR #495. |
…targets-1-again-2 (TriBITSPub/TriBITS#299) Also related to TriBITSPub/TriBITS#494.
…SPub/TriBITS#494) Now no errors will occur when all of the upstream TPLs are not enabled. For exmaple, this will allow ParMETIS to be enabled but not METIS (like is done with the Trilinos PR GenConfig builds). I also removed item from RELEASE_NOTES on break in backward compatibility for TPL dependencies.
…s:develop' (e7b79cb). * trilinos-develop: (50 commits) Add rowmap import Update .gitdist.default for tribits_github_snapshot worktree Automatic snapshot commit from tribits at 0ac69f49 Correctly handle dependencies for SuperLUDist (TriBITSPub/TriBITS#299) Give SuperLU TPL proper dependencies (TriBITSPub/TriBITS#299) Ignore locally generated *.ini Switch over to using FindTPL<tplName>Dependencies.cmake files (TriBITSPub/TriBITS#494) Automatic snapshot commit from tribits at e121d767 Add C++17 standard for GCC 7.2.0 and GCC 7.2.0 serial Fix formatting Add C++17 standard for Clang 10.0.0 PR build FastILU : sort only not Metis, and sorted Tpetra CrsMatrix FastILU : replace create_mirror with create_mirror_view FastILU : sort only not Metis FastILU : create a map from (sorted) A to (sorted) U during symbolic, to avoid sorting of U in compute FastILU : skip sorting only if Metis is not requested. Add release note on needing to set <tplName>_LIB_ENABLED_DEPENDENCIES and issues (TriBITSPub/TriBITS#299) Automatic snapshot commit from tribits at c81102e2 Ifpack2 : fix Kokkos_ENABLE_DEBUG_BOUNDS_CHECK message, and disable skip-sort Ifpack2 : enable skip-sort option ...
…s:develop' (e7b79cb). * trilinos-develop: (50 commits) Add rowmap import Update .gitdist.default for tribits_github_snapshot worktree Automatic snapshot commit from tribits at 0ac69f49 Correctly handle dependencies for SuperLUDist (TriBITSPub/TriBITS#299) Give SuperLU TPL proper dependencies (TriBITSPub/TriBITS#299) Ignore locally generated *.ini Switch over to using FindTPL<tplName>Dependencies.cmake files (TriBITSPub/TriBITS#494) Automatic snapshot commit from tribits at e121d767 Add C++17 standard for GCC 7.2.0 and GCC 7.2.0 serial Fix formatting Add C++17 standard for Clang 10.0.0 PR build FastILU : sort only not Metis, and sorted Tpetra CrsMatrix FastILU : replace create_mirror with create_mirror_view FastILU : sort only not Metis FastILU : create a map from (sorted) A to (sorted) U during symbolic, to avoid sorting of U in compute FastILU : skip sorting only if Metis is not requested. Add release note on needing to set <tplName>_LIB_ENABLED_DEPENDENCIES and issues (TriBITSPub/TriBITS#299) Automatic snapshot commit from tribits at c81102e2 Ifpack2 : fix Kokkos_ENABLE_DEBUG_BOUNDS_CHECK message, and disable skip-sort Ifpack2 : enable skip-sort option ...
This has not caused any problems after the merge to Trilinos 'develop' and in fact has helped to make it easy to resolve issues with TPL dependencies in trilinos/Trilinos#10614. |
It just occurred to me a better way of dealing with the break in backward compatibility with the usage of
<tplName>_LIB_ENABLED_DEPENDENCIES
mentioned in trilinos/Trilinos#10614 (comment) and documented in:and in the entry "For now, dependencies between external packages (TPLs) can be set in the /TPLsList.cmake file by setting the cache var _LIB_ENABLED_DEPENDENCIES for each downstream external package (TPL). (See TribitsExampleProject2/TPLsList.cmake for an example.)" in:
The idea would be to instead of directly setting
<tplName>_LIB_ENABLED_DEPENDENCIES
we instead define a functiontribits_external_package_define_dependencies()
that sets<tplName>_LIB_ALL_DEPENDENCIES
. We then add enable/disable logic in TriBITS to set the cache var<tplName>_LIB_ENABLED_DEPENDENCIES
based on<tplName>_LIB_ALL_DEPENDENCIES
and what TPLs are actually enabled and based on the set value of<tplName>_ENABLE_<upstreamTpl>
(which would be empty by default but would allow the user to set<tplName>_ENABLE_<upstreamTpl>=OFF
and disable that dependency). That should maintain perfect backward compatibility such as in cases where the TPLs are currently enable dir disabled. In the future, we will want to enable upstream TPLs by default when downstream TPLs are enabled.The text was updated successfully, but these errors were encountered: