Skip to content
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

Upgrade TriBITS to CMake 3.17 min (#299) #360

Merged

Conversation

bartlettroscoe
Copy link
Member

This updates TriBITS to require CMake 3.17+. This is a prerequisite to working #299.

See the commits for details.

How was this tested?

The local TriBITS test suite passed (of course) and I also tested against Trilinos (details below).

Detailed Trilinos test results

ATDM Trilinos 'sems-rhel7' configuration on my machine 'crf450' with:

$ cd ~/Trilinos.base/BUILDS/ATDM/CHECKIN/

$ ./checkin-test-atdm.sh clang-opt --enable-all-packages=on --configure

$ cd clang-opt/

$ . load-env.sh 
Hostname 'crf450' matches known ATDM host 'crf450' and system 'sems-rhel7'
Setting compiler and build options for build-name 'clang-opt'
Using SEMS RHEL7 compiler stack CLANG-10.0.0 to build RELEASE code with Kokkos node type SERIAL

$ rm -r CMake*

$ time ./do-configure -DTrilinos_TRIBITS_DIR:STRING=TriBITS/tribits &> configure.out

real    0m41.567s
user    0m30.890s
sys     0m9.841s

$ cat TrilinosRepoVersion.txt 

*** Base Git Repo: Trilinos
13630bd [Thu Mar 11 21:37:12 2021 -0700] <trilinos@sandia.gov>
Merge Pull Request #8744 from vqd8a/Trilinos/adelus_perf_test

$ time ninja -j24 &> make.out

real    33m48.699s
user    744m2.315s
sys     25m1.136s

$ time ctest -j16 &> ctest.out

real    3m4.104s
user    29m2.657s
sys     8m7.940s

$ grep -A 100 "failed out of" ctest.out

99% tests passed, 1 tests failed out of 1931

Subproject Time Summary:
Adelus                     =  21.51 sec*proc (4 tests)
Amesos2                    =   3.67 sec*proc (7 tests)
Belos                      =  88.59 sec*proc (125 tests)
Ifpack2                    =  22.61 sec*proc (44 tests)
Intrepid2                  =  94.36 sec*proc (163 tests)
Kokkos                     =  37.14 sec*proc (34 tests)
KokkosKernels              =  28.65 sec*proc (14 tests)
MueLu                      = 122.67 sec*proc (89 tests)
NOX                        =  61.53 sec*proc (108 tests)
Panzer                     = 1439.45 sec*proc (186 tests)
Phalanx                    =   5.31 sec*proc (33 tests)
Rythmos                    =  31.29 sec*proc (83 tests)
SEACAS                     =  21.31 sec*proc (27 tests)
STK                        =   0.85 sec*proc (2 tests)
Sacado                     =  83.09 sec*proc (299 tests)
Stratimikos                =  14.80 sec*proc (39 tests)
Teko                       =  49.56 sec*proc (18 tests)
Teuchos                    =  57.80 sec*proc (140 tests)
Thyra                      =  36.37 sec*proc (82 tests)
Tpetra                     = 135.08 sec*proc (260 tests)
TrilinosATDMConfigTests    =  53.17 sec*proc (12 tests)
TrilinosBuildStats         =   0.34 sec*proc (1 test)
Xpetra                     =  11.15 sec*proc (18 tests)
Zoltan2                    = 131.88 sec*proc (143 tests)

Total Test time (real) = 184.04 sec

The following tests FAILED:
        1011 - SEACASAprepro_lib_aprepro_lib_array_test (Failed)
Errors while running CTest

I ran that test again and it passesd:

$ ctest -R SEACASAprepro_lib_aprepro_lib_array_test
Test project /ascldap/users/rabartl/Trilinos.base/BUILDS/ATDM/CHECKIN/clang-opt
    Start 1011: SEACASAprepro_lib_aprepro_lib_array_test
1/1 Test #1011: SEACASAprepro_lib_aprepro_lib_array_test ...   Passed    0.16 sec

100% tests passed, 0 tests failed out of 1

Subproject Time Summary:
SEACAS    =   0.16 sec*proc (1 test)

Total Test time (real) =   1.75 sec

(Looks like a race-condition in the printout causing a diff.)

This does the basic text replacements of 3.10 to 3.17 everywhere I could find
it.  All of the tests do not pass but at least this is a good start.
… CMake 3.17 upgrade (TriBITSPub#299)

This fixes the behavior of the custom 'install_package_by_package' to
correctly install the project-level files <Project>Config.cmake and
Makefile.export.<Project> files.  To be able to invoke these install targets,
I had to move the targets into a subdir CMakeLists.txt file.  That allows
CMake -P 'cmake_install.cmake' script for just that subdir.  That way, the
install for each package can be done and the project-level installs can be
done even if one or more packages can't install their files (due to a build
error for example).

To get this to work, I had to change the binary directory for the
project-level files from CMAKE_CURRENT_BINARY_DIR to PROJECT_BINARY_DIR (which
is what they should have been all along).
…b#299)

* Remove <Project>_CTEST_USE_NEW_AAO_FEATURES var and hard-code it to true
  (but leave it set in TribitsConstants.cmake in case project code depends on
  this).  This also assumes that if one is using the all-at-once approach for
  tribits_ctest_driver() that one is submitting to CDash 3.0+.  This also
  allowed getting rid of the "AAO" tests and just having the "AAOP" tests.
  (Later I will remove the function GENERATE_AAO_TESTS() and switch "AAOP" to
  "AAO" in the test name.  But I don't want to do that until I merge a major
  branch that I have.)

* Hard code assumption that CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is
  supported (which it is in CMake 3.11.0+).

* Hard code assumption that ctest support for CTEST_RESOURCE_SPEC_FILE is
  supported (but is not fully supported until CMake 3.18 but the tests in
  TriBITS don't require that).

There may be other conditional logic for CMake versions less than 3.17 but I
have not been able to find them with some obvious searches for
'CMAKE_VERSION'.
@bartlettroscoe bartlettroscoe force-pushed the 299-upgrade-min-to-cmake-3.17 branch from 0fbcf18 to 07158ad Compare March 13, 2021 01:13
@bartlettroscoe bartlettroscoe merged commit ca44a62 into TriBITSPub:master Mar 13, 2021
bartlettroscoe added a commit to bartlettroscoe/Trilinos that referenced this pull request Mar 13, 2021
…ilinos#8401)

This brings in an updated version of TriBITS that required CMake 3.17+.  This
should not change the behavior of TriBITS for Trilinos.

Related: TriBITSPub/TriBITS#299, TriBITSPub/TriBITS#360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant