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

CMake: export version and subversion to config file #1680

Merged
merged 3 commits into from
Feb 13, 2023

Conversation

lucbv
Copy link
Contributor

@lucbv lucbv commented Feb 9, 2023

The new logic exports CMake variables to KokkosKernels_config.h so that users can use them in their code more easily. It also allows us to print more cleanly version in print_config()

The new logic exports CMake variables to KokkosKernels_config.h
so that users can use them in their code more easily. It also
allows us to print more cleanly version in print_config()
@lucbv lucbv added enhancement Cleanup Code maintenance that isn't a bugfix or new feature labels Feb 9, 2023
@lucbv lucbv self-assigned this Feb 9, 2023
lucbv added 2 commits February 9, 2023 11:00
Small unit-test that asserts that the pre-processor macros to
access the version number of Kokkos Kernels are available and
that the values are consistent with each other.
@kokkos-devops-admin
Copy link

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request.

@kokkos-devops-admin
Copy link

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: KokkosKernels_PullRequest_GCC930_Light_Tpls_GCC930

  • Build Num: 293
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CUDA11_CUDA11_LayoutRight

  • Build Num: 300
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC1020

  • Build Num: 214
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC1020_Light_LayoutRight

  • Build Num: 213
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GCC1020

  • Build Num: 176
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_INTEL19

  • Build Num: 263
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CLANG1001

  • Build Num: 313
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CLANG13CUDA10

  • Build Num: 233
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_Tpls_ARMPL2110

  • Build Num: 128
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_GCC1020

  • Build Num: 126
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_VEGA908_ROCM520

  • Build Num: 122
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Using Repos:

Repo: KOKKOSKERNELS (lucbv/kokkos-kernels)
  • Branch: export_version_info
  • SHA: c9e631b
  • Mode: TEST_REPO

Pull Request Author: lucbv

@kokkos-devops-admin
Copy link

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: KokkosKernels_PullRequest_GCC930_Light_Tpls_GCC930

  • Build Num: 293
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CUDA11_CUDA11_LayoutRight

  • Build Num: 300
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC1020

  • Build Num: 214
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC1020_Light_LayoutRight

  • Build Num: 213
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GCC1020

  • Build Num: 176
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_INTEL19

  • Build Num: 263
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CLANG1001

  • Build Num: 313
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CLANG13CUDA10

  • Build Num: 233
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_Tpls_ARMPL2110

  • Build Num: 128
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_GCC1020

  • Build Num: 126
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_VEGA908_ROCM520

  • Build Num: 122
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH export_version_info
KOKKOSKERNELS_SOURCE_REPO https://github.com/lucbv/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA c9e631b
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA aac450b
PR_LABELS enhancement;Cleanup
PULLREQUESTNUM 1680
TEST_REPO_ALIAS KOKKOSKERNELS

@kokkos-devops-admin
Copy link

Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
THE LAST COMMIT TO THIS PULL REQUEST HAS NOT BEEN REVIEWED YET!

@kokkos-devops-admin
Copy link

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@lucbv lucbv requested a review from brian-kelley February 10, 2023 17:38
@lucbv
Copy link
Contributor Author

lucbv commented Feb 10, 2023

This is ready, just need one review before merge @srajama1 @e10harvey @brian-kelley

@kokkos-devops-admin
Copy link

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

2 similar comments
@kokkos-devops-admin
Copy link

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@kokkos-devops-admin
Copy link

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

KOKKOSKERNELS_VERSION_PATCH));
}

TEST_F(TestCategory, common_version) { test_version_info(); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider printing out the version information at runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really something we do in our unit-tests though? I think we it might be good to try to keep that output clean so it's easy for us to detect what tests are failing

@kokkos-devops-admin
Copy link

Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ e10harvey ]!

@kokkos-devops-admin
Copy link

Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - This Repo does not support Automerge

@lucbv lucbv merged commit c7765bc into kokkos:develop Feb 13, 2023
@lucbv lucbv deleted the export_version_info branch February 13, 2023 16:36
@ndellingwood
Copy link
Contributor

@lucbv does this need cherry-pick to release-candidate-4.0.0?

@lucbv
Copy link
Contributor Author

lucbv commented Feb 15, 2023

@ndellingwood it would make sense to pick it since it probably won't lead to any integration conflicts and it's nice to have : )

ndellingwood pushed a commit that referenced this pull request Feb 16, 2023
CMake: export version and subversion to config file
(cherry picked from commit c7765bc)
@ndellingwood
Copy link
Contributor

@lucbv I cherry-picked this to release-candidate-4.0.0 but the Test_Common_Version.hpp test is breaking with Trilinos builds:

18:47:34 /home/jenkins/weaver-new/workspace/KokkosEco_Trilinos_Weaver_CUDA112_Shared_Cplx/Trilinos/kokkos-kernels/common/unit_test/Test_Common_Version.hpp(45): error: expected an expression

For now I dropped the cherry-pick from release-candidate-4.0.0, we can reapply after the issue is resolved

@ndellingwood
Copy link
Contributor

@lucbv here is reference to a Trilinos build where the compilation error occurred: https://jenkins-son.sandia.gov/view/Kokkos/job/KokkosEco_Trilinos_Weaver_CUDA112_Shared_Cplx/140/

@lucbv
Copy link
Contributor Author

lucbv commented Feb 16, 2023

Yeah, I saw the failed build, it's not too clear what goes on there?
I am trying to do a build of kokkos-kernels directly with the proper compilers to see how that goes.
If I can't reproduce that way, I'll try building directly from within Trilinos...

ndellingwood pushed a commit that referenced this pull request Feb 17, 2023
CMake: export version and subversion to config file
(cherry picked from commit c7765bc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BlocksPromotion Cleanup Code maintenance that isn't a bugfix or new feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants