From cf62904daf05010265a1b0d24ee60a4cbb1fb49b Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 14 Nov 2024 10:06:45 -0700 Subject: [PATCH 1/5] ci: common.yml updates --- .gitlab/common.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitlab/common.yml b/.gitlab/common.yml index 506d2810..41f51307 100644 --- a/.gitlab/common.yml +++ b/.gitlab/common.yml @@ -25,7 +25,7 @@ default: - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "schedule" - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "pipeline" - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "push" + - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .darwin_regular_mr_only_job: variables: @@ -40,7 +40,6 @@ default: - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "pipeline" - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /darwin/ && $CI_PIPELINE_SOURCE == "push" .darwin_regular_default_branch_only_job: variables: @@ -74,13 +73,13 @@ default: - if: $ENABLED_CLUSTERS =~ /rocinante/ && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $ENABLED_CLUSTERS =~ /rocinante/ && $CI_PIPELINE_SOURCE == "schedule" - if: $ENABLED_CLUSTERS =~ /rocinante/ && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /rocinante/ && $CI_PIPELINE_SOURCE == "push" + - if: $ENABLED_CLUSTERS =~ /rocinante/ && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .venado_job: allow_failure: true variables: CLUSTER: venado - SCHEDULER_PARAMETERS: "-N 1 -p standard --time=02:00:00" + SCHEDULER_PARAMETERS: "-N 1 -A lanl_ai_g -p gpu --time=02:00:00" tags: - venado - batch @@ -100,7 +99,7 @@ default: - if: $ENABLED_CLUSTERS =~ /venado/ && $GITLAB_USER_LOGIN =~ $VENADO_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $ENABLED_CLUSTERS =~ /venado/ && $GITLAB_USER_LOGIN =~ $VENADO_USERS && $CI_PIPELINE_SOURCE == "schedule" - if: $ENABLED_CLUSTERS =~ /venado/ && $GITLAB_USER_LOGIN =~ $VENADO_USERS && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /venado/ && $GITLAB_USER_LOGIN =~ $VENADO_USERS && $CI_PIPELINE_SOURCE == "push" + - if: $ENABLED_CLUSTERS =~ /venado/ && $GITLAB_USER_LOGIN =~ $VENADO_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .rzansel_job: allow_failure: true @@ -118,7 +117,7 @@ default: - if: $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "schedule" - if: $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "push" + - if: $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .rzvernal_job: allow_failure: true @@ -137,7 +136,7 @@ default: - if: $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "schedule" - if: $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "push" + - if: $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .rzadams_job: allow_failure: true @@ -156,7 +155,7 @@ default: - if: $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" - if: $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "schedule" - if: $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "web" - - if: $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "push" + - if: $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH .build_and_test: stage: build_n_test From 2b9ddbf9e1851972ad4edb2312039ef5733a5ca3 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 14 Nov 2024 13:24:03 -0700 Subject: [PATCH 2/5] ci: add rzansel and report to cdash --- .gitlab-ci.yml | 123 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 113 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d239cee..cb8cacc8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,16 +4,36 @@ stages: variables: PROJECT_NAME: ports-of-call - ENABLE_CDASH: false + ENABLE_CDASH: true + # use this variable if there is a xcap/deployment MR you want to use instead + # PROJECT_SPACK_ENV_VERSION: mr/62/2024-10-15 include: - .gitlab/common.yml -######## -# Jobs # -######## +# Spack environments are defined in +# https://re-git.lanl.gov/xcap/deployment/-/tree/xcap-spack-env/systems +# for each system and for each XCAP project. +# +# The project configuration can be found at the top of +# .gitlab/build_and_test.sh. +# +# Each environment is uniquely identified by +# ${SYSTEM_NAME}/${PROJECT_GROUP}/${PROJECT_NAME}/${SPACK_ENV_NAME} +# +# For creating a new custom environment for testing use the special +# 'custom-spec' or 'custom-file` environments. +# +# The 'custom-spec` environment allows you specify an arbitrary Spack spec to +# be added to a system-specific empty Spack environment. Use the SPACK_ENV_SPEC +# environment variable to define the spec you want to add. +# The 'custom-file` environment allows you to manually define an environment +# from scratch. Use the SPACK_ENV_FILE environment variable to specify the +# path to the YAML file you want to use. Note, the environment will be placed +# in ${SYSTEM_NAME}/${PROJECT_GROUP}/${PROJECT_NAME}/custom-file/spack.yaml and +# can therefore make relative includes to common configuration files. openmpi_gcc: extends: [.ascgit_job, .darwin_job, .darwin_regular_job, .build_and_test] variables: @@ -26,17 +46,100 @@ openmpi_cuda_gcc_volta: SCHEDULER_PARAMETERS: "-N 1 --qos=debug -p volta-x86 -C cpu_family:haswell --time=02:00:00" openmpi_cuda_gcc_ampere: - extends: [.ascgit_job, .darwin_job, .build_and_test] + extends: [.ascgit_job, .darwin_job, .darwin_regular_job, .build_and_test] variables: SPACK_ENV_NAME: openmpi-cuda-gcc-ampere SCHEDULER_PARAMETERS: "-N 1 --qos=debug -p shared-gpu-ampere" -rzvernal_craympich_rocm_mi250_gcc: - extends: [.ascgit_job, .rzadams_job, .rzvernal_regular_job, .build_and_test] +rzansel_spectrummpi_cuda_volta_gcc: + extends: [.ascgit_job, .rzansel_job, .rzansel_regular_job, .build_and_test] + needs: [] + variables: + SPACK_ENV_NAME: spectrummpi-cuda-volta-gcc + SUBMIT_TO_CDASH: false # disable CDash submission, since LLNL systems can't reach them + BUILD_WITH_CTEST: "${ENABLE_CDASH}" # but do build with CTest to create the necessary files + SUBMIT_ON_ERROR: false # no network access, don't try to send from compute node + SUBMIT_AFTER: false # submit host also doesn't have access to CDash server + CREATE_SUBMIT_ARTIFACT: "${ENABLE_CDASH}" # archive results + +rzansel_spectrummpi_cuda_volta_xl: + extends: [.ascgit_job, .rzansel_job, .rzansel_regular_job, .build_and_test] + needs: [] + variables: + SPACK_ENV_NAME: spectrummpi-cuda-volta-xl + SUBMIT_TO_CDASH: false # disable CDash submission, since LLNL systems can't reach them + BUILD_WITH_CTEST: "${ENABLE_CDASH}" # but do build with CTest to create the necessary files + SUBMIT_ON_ERROR: false # no network access, don't try to send from compute node + SUBMIT_AFTER: false # submit host also doesn't have access to CDash server + CREATE_SUBMIT_ARTIFACT: "${ENABLE_CDASH}" # archive results + +rzvernal_craympich_rocm_mi250_cce: + extends: [.ascgit_job, .rzvernal_job, .rzvernal_regular_job, .build_and_test] + needs: [] variables: - SPACK_ENV_NAME: craympich-rocm-gfx90a-gcc + SPACK_ENV_NAME: craympich-rocm-gfx90a-cce + SUBMIT_TO_CDASH: false # disable CDash submission, since LLNL systems can't reach them + BUILD_WITH_CTEST: "${ENABLE_CDASH}" # but do build with CTest to create the necessary files + SUBMIT_ON_ERROR: false # no network access, don't try to send from compute node + SUBMIT_AFTER: false # submit host also doesn't have access to CDash server + CREATE_SUBMIT_ARTIFACT: "${ENABLE_CDASH}" # archive results -rzadams_craympich_rocm_mi300_gcc: +rzadams_craympich_rocm_mi300_cce: extends: [.ascgit_job, .rzadams_job, .rzadams_regular_job, .build_and_test] + needs: [] variables: - SPACK_ENV_NAME: craympich-rocm-gfx942-gcc + SPACK_ENV_NAME: craympich-rocm-gfx942-cce + SUBMIT_TO_CDASH: false # disable CDash submission, since LLNL systems can't reach them + BUILD_WITH_CTEST: "${ENABLE_CDASH}" # but do build with CTest to create the necessary files + SUBMIT_ON_ERROR: false # no network access, don't try to send from compute node + SUBMIT_AFTER: false # submit host also doesn't have access to CDash server + CREATE_SUBMIT_ARTIFACT: "${ENABLE_CDASH}" # archive results + +# collect job results from RZansel and submit them to CDash +post_rzansel_results_to_cdash: + extends: [.post_results_to_cdash] + allow_failure: true + rules: + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "schedule" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "web" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzansel/ && $GITLAB_USER_LOGIN =~ $RZANSEL_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: always + needs: + - rzansel_spectrummpi_cuda_volta_gcc + - rzansel_spectrummpi_cuda_volta_xl + +# collect job results from RZvernal and submit them to CDash +post_rzvernal_results_to_cdash: + extends: [.post_results_to_cdash] + allow_failure: true + rules: + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "schedule" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "web" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzvernal/ && $GITLAB_USER_LOGIN =~ $RZVERNAL_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: always + needs: + - rzvernal_craympich_rocm_mi250_cce + +# collect job results from RZadams and submit them to CDash +post_rzadams_results_to_cdash: + extends: [.post_results_to_cdash] + allow_failure: true + rules: + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "merge_request_event" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "schedule" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "web" + when: always + - if: $ENABLE_CDASH == "true" && $ENABLED_CLUSTERS =~ /rzadams/ && $GITLAB_USER_LOGIN =~ $RZADAMS_USERS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: always + needs: + - rzadams_craympich_rocm_mi300_cce From 9422b5c2254da37b07b5f58aa2aa1876770c2723 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 14 Nov 2024 13:58:40 -0700 Subject: [PATCH 3/5] cmake: add missing include(CTest) and fix dep var scope --- CMakeLists.txt | 9 ++++++--- test/CMakeLists.txt | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 569c1c11..3c6abe39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ target_compile_features(${POCLIB} # ---------------------------------------- if(PORTS_OF_CALL_BUILD_TESTING) message(STATUS "Configuring tests") - enable_testing() + include(CTest) add_subdirectory(test) endif() @@ -159,8 +159,11 @@ config_summary_variable("CMAKE_CXX_COMPILER") config_summary_variable("CMAKE_CXX_COMPILER_VERSION") config_summary_variable("CMAKE_CXX_FLAGS") -config_summary_block("Dependencies") -config_summary_dependency("Kokkos" "Kokkos") # Should this always be listed? +if(PORTS_OF_CALL_BUILD_TESTING) + config_summary_block("Dependencies") + config_summary_dependency("Kokkos" "Kokkos") + config_summary_dependency("Catch2" "Catch2") +endif() config_summary_block("User Options") # Are these the right user options? config_summary_option("PORTS_OF_CALL_BUILD_TESTING") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index eb8c5e2d..ad8bba83 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,6 +23,7 @@ if(NOT TARGET Catch2::Catch2) FetchContent_MakeAvailable(Catch2) list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/contrib) endif() + set(Catch2_VERSION "${Catch2_VERSION}" PARENT_SCOPE) endif() # this interface target is to collect @@ -42,6 +43,7 @@ if (PORTS_OF_CALL_TEST_PORTABILITY_STRATEGY STREQUAL "Kokkos") GIT_TAG 4.3.01) FetchContent_MakeAvailable(Kokkos) endif() + set(Kokkos_VERSION "${Kokkos_VERSION}" PARENT_SCOPE) endif() target_link_libraries(portsofcall_iface INTERFACE Kokkos::kokkos) From 8a7fcb5fbd3f41e7da8b4cc83c3860268d0092aa Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 14 Nov 2024 14:11:20 -0700 Subject: [PATCH 4/5] cmake: display correct option --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c6abe39..c62ac402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,7 +148,7 @@ export( include(config_summary) -config_summary_header("Ports-of-Call" "ports-of-call" 30) # 30 characters seems wide enough +config_summary_header("Ports-of-Call" "ports-of-call" 48) config_summary_block("CMake Options") config_summary_variable("CMAKE_BUILD_TYPE") @@ -167,8 +167,6 @@ endif() config_summary_block("User Options") # Are these the right user options? config_summary_option("PORTS_OF_CALL_BUILD_TESTING") -config_summary_option("PORTABILITY_STRATEGY_CUDA") -config_summary_option("PORTABILITY_STRATEGY_KOKKOS") -config_summary_option("PORTABILITY_STRATEGY_NONE") +config_summary_variable("PORTS_OF_CALL_TEST_PORTABILITY_STRATEGY") config_summary_print() From 1760ba1c7266f4631799e63521e72c92c0aa2c51 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 14 Nov 2024 23:42:36 -0700 Subject: [PATCH 5/5] ci: add missing cdash submissions --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb8cacc8..4df4a1d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,4 @@ stages: - - static_analysis - build_n_test variables: @@ -38,18 +37,21 @@ openmpi_gcc: extends: [.ascgit_job, .darwin_job, .darwin_regular_job, .build_and_test] variables: SPACK_ENV_NAME: openmpi-gcc + SUBMIT_TO_CDASH: "${ENABLE_CDASH}" openmpi_cuda_gcc_volta: extends: [.ascgit_job, .darwin_job, .darwin_regular_job, .build_and_test] variables: SPACK_ENV_NAME: openmpi-cuda-gcc-volta SCHEDULER_PARAMETERS: "-N 1 --qos=debug -p volta-x86 -C cpu_family:haswell --time=02:00:00" + SUBMIT_TO_CDASH: "${ENABLE_CDASH}" openmpi_cuda_gcc_ampere: extends: [.ascgit_job, .darwin_job, .darwin_regular_job, .build_and_test] variables: SPACK_ENV_NAME: openmpi-cuda-gcc-ampere SCHEDULER_PARAMETERS: "-N 1 --qos=debug -p shared-gpu-ampere" + SUBMIT_TO_CDASH: "${ENABLE_CDASH}" rzansel_spectrummpi_cuda_volta_gcc: extends: [.ascgit_job, .rzansel_job, .rzansel_regular_job, .build_and_test]