Skip to content

Commit 0b5306a

Browse files
authored
Merge pull request #467 from llnl/466-fix-scheduled-pipeline-bug
Prevent jobs-prod from running in scheduled pipelines
2 parents d66107a + 3b8a03f commit 0b5306a

12 files changed

Lines changed: 122 additions & 74 deletions

.gitlab-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ stages:
2828
- update_tpls
2929
- tpls
3030
- build_and_install
31+
- perf_install
3132
- run_ats
3233
- run_perf
3334
- generate_buildcache
@@ -57,4 +58,9 @@ include:
5758
- if: '$CI_PIPELINE_SOURCE == "push"'
5859
when: always
5960
- local: .gitlab/jobs-prod.yml
61+
rules:
62+
- if: '$CI_PIPELINE_SOURCE == "scheduled" || $CI_COMMIT_TAG'
63+
when: never
64+
- if: '$CI_PIPELINE_SOURCE == "push"'
65+
when: always
6066
- local: .gitlab/pages.yml

.gitlab/jobs-mpi.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ toss_gcc_mpi_cxxonly_init:
66

77
toss_gcc_mpi_cxxonly_tpls:
88
extends: [.toss_resource1, .gcc_mpi_cxxonly, .tpls]
9-
needs: [toss_gcc_mpi_cxxonly_init]
9+
needs:
10+
- job: toss_update_tpls
11+
optional: true
12+
- job: toss_gcc_mpi_cxxonly_init
1013

1114
toss_gcc_mpi_cxxonly_build:
1215
extends: [.toss_resource1, .gcc_mpi_cxxonly, .build]
@@ -26,14 +29,19 @@ toss_gcc_mpi_init:
2629

2730
toss_gcc_mpi_tpls:
2831
extends: [.toss_resource2, .gcc_mpi, .tpls]
29-
needs: [toss_gcc_mpi_init]
32+
needs:
33+
- job: toss_update_tpls
34+
optional: true
35+
- job: toss_gcc_mpi_init
3036

3137
toss_gcc_mpi_build:
32-
variables:
33-
DO_PERF_INSTALL: 1
3438
extends: [.toss_resource2, .gcc_mpi, .build_and_test]
3539
needs: [toss_gcc_mpi_tpls]
3640

41+
toss_gcc_mpi_perf_install:
42+
extends: [.toss_resource2, .gcc_mpi, .perf_install]
43+
needs: [toss_gcc_mpi_build]
44+
3745
toss_gcc_mpi_test:
3846
extends: [.toss_resource2, .gcc_mpi, .run_ats]
3947
needs: [toss_gcc_mpi_build]
@@ -48,15 +56,20 @@ toss_clang_mpi_dev_build_init:
4856

4957
toss_clang_mpi_dev_build_tpls:
5058
extends: [.toss_resource3, .clang_mpi_dev_build, .tpls]
51-
needs: [toss_clang_mpi_dev_build_init]
59+
needs:
60+
- job: toss_update_tpls
61+
optional: true
62+
- job: toss_clang_mpi_dev_build_init
5263

5364
toss_clang_mpi_dev_build_build:
5465
extends: [.toss_resource3, .clang_mpi_dev_build, .build_and_test]
5566
needs: [toss_clang_mpi_dev_build_tpls]
5667

68+
toss_clang_mpi_dev_build_perf_install:
69+
extends: [.toss_resource3, .clang_mpi_dev_build, .perf_install]
70+
needs: [toss_clang_mpi_dev_build_build]
71+
5772
toss_clang_mpi_dev_build_test:
58-
variables:
59-
DO_PERF_INSTALL: 1
6073
extends: [.toss_resource3, .clang_mpi_dev_build, .run_ats]
6174
needs: [toss_clang_mpi_dev_build_build]
6275

@@ -74,14 +87,19 @@ cray_rocm_mpi_init:
7487

7588
cray_rocm_mpi_tpls:
7689
extends: [.cray_resource1, .rocm_mpi, .tpls]
77-
needs: [cray_rocm_mpi_init]
90+
needs:
91+
- job: cray_update_tpls
92+
optional: true
93+
- job: cray_rocm_mpi_init
7894

7995
cray_rocm_mpi_build:
80-
variables:
81-
DO_PERF_INSTALL: 1
8296
extends: [.cray_resource1, .rocm_mpi, .build_and_test]
8397
needs: [cray_rocm_mpi_tpls]
8498

99+
cray_rocm_mpi_perf_install:
100+
extends: [.cray_resource1, .rocm_mpi, .perf_install]
101+
needs: [cray_rocm_mpi_build]
102+
85103
cray_rocm_mpi_test:
86104
extends: [.cray_resource1, .rocm_mpi, .run_ats]
87105
needs: [cray_rocm_mpi_build]
@@ -96,14 +114,19 @@ cray_hip_rocm_mpi_init:
96114

97115
cray_hip_rocm_mpi_tpls:
98116
extends: [.cray_resource2, .hip_rocm_mpi, .tpls]
99-
needs: [cray_hip_rocm_mpi_init]
117+
needs:
118+
- job: cray_update_tpls
119+
optional: true
120+
- job: cray_hip_rocm_mpi_init
100121

101122
cray_hip_rocm_mpi_build:
102-
variables:
103-
DO_PERF_INSTALL: 1
104123
extends: [.cray_resource2, .hip_rocm_mpi, .build_and_test]
105124
needs: [cray_hip_rocm_mpi_tpls]
106125

126+
cray_hip_rocm_mpi_perf_install:
127+
extends: [.cray_resource2, .hip_rocm_mpi, .perf_install]
128+
needs: [cray_hip_rocm_mpi_build]
129+
107130
cray_hip_rocm_mpi_test:
108131
extends: [.cray_resource2, .hip_rocm_mpi, .run_ats]
109132
needs: [cray_hip_rocm_mpi_build]

.gitlab/jobs-seq.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ toss_gcc_~mpi_init:
66

77
toss_gcc_~mpi_tpls:
88
extends: [.gcc_~mpi, .tpls, .toss_resource1]
9-
needs: [toss_gcc_~mpi_init]
9+
needs:
10+
- job: toss_update_tpls
11+
optional: true
12+
- job: toss_gcc_~mpi_init
1013

1114
toss_gcc_~mpi_build:
1215
extends: [.gcc_~mpi, .build_and_test, .toss_resource1]
@@ -27,7 +30,10 @@ cray_hip_rocm_~mpi_init:
2730

2831
cray_hip_rocm_~mpi_tpls:
2932
extends: [.cray_resource2, .hip_rocm_~mpi, .tpls]
30-
needs: [cray_hip_rocm_~mpi_init]
33+
needs:
34+
- job: cray_update_tpls
35+
optional: true
36+
- job: cray_hip_rocm_~mpi_init
3137

3238
cray_hip_rocm_~mpi_build:
3339
extends: [.cray_resource2, .hip_rocm_~mpi, .build_and_test]
@@ -48,7 +54,10 @@ cray_rocm_~mpi_Debug_init:
4854

4955
cray_rocm_~mpi_Debug_tpls:
5056
extends: [.cray_resource1, .rocm_~mpi_Debug, .tpls]
51-
needs: [cray_rocm_~mpi_Debug_init]
57+
needs:
58+
- job: cray_update_tpls
59+
optional: true
60+
- job: cray_rocm_~mpi_Debug_init
5261

5362
cray_rocm_~mpi_Debug_build:
5463
extends: [.cray_resource1, .rocm_~mpi_Debug, .build_and_test]

.gitlab/os.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@
55
variables:
66
LLNL_SERVICE_USER: sphapp
77
UPSTREAM_DIR: /usr/WS2/sduser/Spheral/spack_upstream/0.22
8-
# On merge to develop, do the install in this directory
9-
PERF_INSTALL_DIR: /usr/workspace/sduser/Spheral/performance_installs
108
DISPLAY: ':0.0'
119

1210
.on_toss_4_x86:
1311
variables:
1412
ARCH: 'toss_4_x86_64_ib'
1513
SPHERAL_BUILDS_DIR: /p/lustre1/sphapp/spheral-ci-builds
14+
# On merge to develop, do the install in this directory
15+
PERF_INSTALL_DIR: /usr/workspace/sduser/Spheral/performance_installs/$ARCH
1616
RUN_CMD: 'srun'
1717
extends: [.sys_config]
1818

1919
.on_toss_4_x86_cray:
2020
variables:
2121
ARCH: 'toss_4_x86_64_ib_cray'
2222
SPHERAL_BUILDS_DIR: /p/lustre1/sphapp/spheral-ci-builds
23+
# On merge to develop, do the install in this directory
24+
PERF_INSTALL_DIR: /usr/workspace/sduser/Spheral/performance_installs/$ARCH
2325
RUN_CMD: 'flux run'
2426
extends: [.sys_config]

.gitlab/performance.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
GIT_STRATEGY: none
66
FF_ENABLE_BASH_EXIT_CODE_CHECK: 1
77
FF_USE_NEW_BASH_EVAL_STRATEGY: 1
8-
INSTALL_LOCATION: "$PERF_INSTALL_DIR/$SYS_TYPE/${SPEC#?}"
98
rules:
109
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_PIPELINE_SCHEDULE_DESCRIPTION == "Performance tests"'
1110
- if: '$CI_COMMIT_MESSAGE =~ /test-perf/'
1211
script:
1312
# This script submits a job that runs at 7
1413
# Benchmark directory is set in scripts/spheral_ats.py
15-
- echo "Submitting performance tests for install at $INSTALL_LOCATION"
16-
- $INSTALL_LOCATION/bin/spheral-ats --ciRun --numNodes 2 --delay --batch --logs perf_logs $INSTALL_LOCATION/$PERF_ATS_FILE || exit_code=$?
14+
- INSTALL_DIR=$PERF_INSTALL_DIR/${SPEC#?}
15+
- echo "Running performance tests using install at $INSTALL_DIR"
16+
- $INSTALL_DIR/bin/spheral-ats --ciRun --numNodes 2 --delay --batch --logs perf_logs $INSTALL_DIR/$PERF_ATS_FILE || exit_code=$?
1717
- exit $exit_code
1818

1919
toss_gcc_mpi_perf:

.gitlab/scripts.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,10 @@
4040
stage: build_and_install
4141
variables:
4242
GIT_STRATEGY: none
43-
rules:
44-
# If test-perf is in commit message or this is a merge to develop, do install in $PERF_INSTALL_DIR
45-
- if: '($CI_COMMIT_MESSAGE =~ /test-perf/ || $CI_COMMIT_REF_NAME == "develop") && $DO_PERF_INSTALL'
46-
variables:
47-
EXTRA_INSTALL_ARGS: "-i $PERF_INSTALL_DIR/$SYS_TYPE/${SPEC#?}" # Removes the leading %
48-
- when: always
49-
variables:
50-
EXTRA_INSTALL_ARGS: "--no-clean"
5143
script:
5244
- CI_BUILD_DIR=$(cat ci-dir.txt)
5345
- cd $CI_BUILD_DIR && cat job-name.txt
54-
- ./$SCRIPT_DIR/devtools/host-config-build.py $EXTRA_INSTALL_ARGS --build --ctest --nprocs $NPROC --host-config gitlab.cmake -DSPHERAL_ENABLE_TIMERS=ON $EXTRA_CMAKE_ARGS
46+
- ./$SCRIPT_DIR/devtools/host-config-build.py --no-clean --build --ctest --nprocs $NPROC --host-config gitlab.cmake -DSPHERAL_ENABLE_TIMERS=ON $EXTRA_CMAKE_ARGS
5547
artifacts:
5648
paths:
5749
- ci-dir.txt
@@ -69,6 +61,28 @@
6961
- ci-dir.txt
7062
- job-name.txt
7163

64+
# This copies the install so scheduled perf tests can use it
65+
.perf_install:
66+
extends: [.retry_rule]
67+
stage: perf_install
68+
variables:
69+
GIT_STRATEGY: none
70+
rules:
71+
- if: '($CI_COMMIT_MESSAGE =~ /test-perf/ || $CI_COMMIT_REF_NAME == "develop")'
72+
when: always
73+
script:
74+
- CI_BUILD_DIR=$(cat ci-dir.txt)
75+
- INSTALL_DIR=$PERF_INSTALL_DIR/${SPEC#?}
76+
- echo "Copying install from $CI_BUILD_DIR/build_gitlab/install to $INSTALL_DIR"
77+
- ml load mpifileutils
78+
- if [[ -d $INSTALL_DIR ]]; then $RUN_CMD -n $NPROC drm $INSTALL_DIR; else echo "No install exists."; fi
79+
- cd $CI_BUILD_DIR
80+
- $RUN_CMD -n $NPROC dcp ./build_gitlab/install $INSTALL_DIR
81+
- $RUN_CMD -n $NPROC dchmod --mode go+rx $INSTALL_DIR
82+
artifacts:
83+
paths:
84+
- ci-dir.txt
85+
7286
.run_ats:
7387
extends: [.retry_rule]
7488
stage: run_ats

RELEASE_NOTES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ Notable changes include:
77
* New features / API changes:
88
* Added view class for PairwiseField (PairwiseFieldView).
99
* Refactored use of pair-wise fields in hydro packages to avoid using pointers and allow empty PairwiseFields.
10+
* Bin files in install (bin/spheral and bin/spheral-ats) now use relative paths instead of being configured for one specific path. This allows installs to be relocatable.
1011

1112
* Bug fixes
1213

1314
* Build changes / improvements:
14-
* Updated to PYB11Genertor 2025.12.1
15+
* Updated to PYB11Generator 2025.12.1.
1516
* Converted all Spheral Python modules to be submodules of a single PYB11Generator module (SpheralCompiledModules).
1617
For users importing from the master Spheral.py file (or it's dimensional specialization) this change is hidden,
1718
so there is no user interface impact.
@@ -20,7 +21,7 @@ Notable changes include:
2021
* The performance tests and deploy jobs are now scheduled pipelines that run nightly.
2122
* Gitlab pages now uses Plotly for interactive visualizations.
2223
* Gathering of performance data for the deploy stage is now parallelized over ranks and threads.
23-
* Merges to develop will trigger builds to be done in a shared directory for use by the performance testing scripts.
24+
* Merges to develop will copy installs to a shared directory for use by the performance testing scripts.
2425

2526
Version v2025.12.0 -- Release date 2025-12-19
2627
==============================================

scripts/CMakeLists.txt

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,9 @@ if (SPHERAL_ENABLE_PYTHON)
1111
# Build Stage
1212
# ***********
1313

14-
# Configure the build time scripts to run a build dir spheral environment.
15-
set(SPHERAL_EXEC_DIR ${CMAKE_BINARY_DIR})
16-
set(SPHERAL_SCRIPT_DIR ${SPHERAL_ROOT_DIR})
17-
configure_file(
18-
"${CMAKE_CURRENT_SOURCE_DIR}/spheral-env.in"
19-
"${CMAKE_BINARY_DIR}/bin/spheral"
20-
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
21-
)
22-
23-
configure_file(
24-
"${CMAKE_CURRENT_SOURCE_DIR}/atstest.in"
25-
"${CMAKE_BINARY_DIR}/bin/spheral-ats"
14+
# Copy the spheral-env to run a build time environment.
15+
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/spheral-env.sh"
16+
DESTINATION "${CMAKE_BINARY_DIR}/bin/spheral"
2617
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
2718
)
2819

@@ -47,28 +38,25 @@ if (SPHERAL_ENABLE_PYTHON)
4738
DESTINATION "${CMAKE_INSTALL_PREFIX}/scripts"
4839
)
4940

41+
install(FILES
42+
"${CMAKE_CURRENT_SOURCE_DIR}/spheral-env.sh"
43+
RENAME "spheral"
44+
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
45+
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
46+
)
47+
48+
install(FILES
49+
"${CMAKE_CURRENT_SOURCE_DIR}/atstest.sh"
50+
RENAME "spheral-ats"
51+
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
52+
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
53+
)
54+
5055
# Configure scripts for the install stage.
5156
install( CODE "
5257
message(\"-- Setting up spheral python virtual environment.\")
5358
5459
execute_process(COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target python_runtime_env)
55-
56-
message(\"-- Setting up spheral executable scripts.\")
57-
58-
set(SPHERAL_EXEC_DIR ${CMAKE_INSTALL_PREFIX})
59-
set(SPHERAL_SCRIPT_DIR ${CMAKE_INSTALL_PREFIX})
60-
61-
configure_file(
62-
\"${CMAKE_CURRENT_SOURCE_DIR}/spheral-env.in\"
63-
\"${CMAKE_INSTALL_PREFIX}/bin/spheral\"
64-
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
65-
)
66-
67-
configure_file(
68-
\"${CMAKE_CURRENT_SOURCE_DIR}/atstest.in\"
69-
\"${CMAKE_INSTALL_PREFIX}/bin/spheral-ats\"
70-
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
71-
)
7260
")
7361

7462
# byte compile all of the venv site-packages.
@@ -80,8 +68,9 @@ if (SPHERAL_ENABLE_PYTHON)
8068
message(\"-- Byte compilation complete.\")
8169
")
8270

83-
message("-- Creating local Silo module path file.")
84-
file(WRITE "${CMAKE_BINARY_DIR}/.venv/${SPHERAL_SITE_PACKAGES_PATH}/silo_lib.pth"
85-
"@CONFIG_SILO_DIR@/lib"
86-
)
71+
# This is unused so no need to do it at the moment
72+
# message("-- Creating local Silo module path file.")
73+
# file(WRITE "${CMAKE_BINARY_DIR}/.venv/${SPHERAL_SITE_PACKAGES_PATH}/silo_lib.pth"
74+
# "@CONFIG_SILO_DIR@/lib"
75+
# )
8776
endif()

scripts/atstest.in

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

scripts/atstest.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
# Determine the path of this script file
4+
SPHERAL_BIN_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5+
$SPHERAL_BIN_DIR/spheral $SPHERAL_BIN_DIR/../scripts/spheral_ats.py "$@"

0 commit comments

Comments
 (0)