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

Gitlab CI CD for LC mirror #246

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
70ddfa1
use absolute URL for submodules to allow mirroring
wrtobin Oct 11, 2023
bd96ccf
adding gitlab ci yaml to automate testing the current geos develop he…
wrtobin Oct 11, 2023
656ea31
wrong service user
wrtobin Oct 11, 2023
7e0eb24
adding WIP spack environments, tioga only known working for base AMD …
wrtobin Oct 11, 2023
5f4351f
moving environments to avoid potential for name conflicts in ci
wrtobin Oct 11, 2023
adb5892
working on spack testing
wrtobin Oct 11, 2023
859f4f0
drop incorrect timeout syntax
wrtobin Oct 11, 2023
07bb10f
incorrect variable syntax
wrtobin Oct 11, 2023
eaaf7c1
incorrect variable syntax (again)
wrtobin Oct 11, 2023
68baf8c
gitlab-runner vs cloud runner acts differently yay
wrtobin Oct 11, 2023
eb92a4c
gitlab is garbage
wrtobin Oct 11, 2023
20ce7bd
gitlab is garbage
wrtobin Oct 11, 2023
1535fe9
gitlab is garbage
wrtobin Oct 11, 2023
b8ad38b
adding job names
wrtobin Oct 11, 2023
f9d8959
adding spack installation test script
wrtobin Oct 11, 2023
2867257
+x
wrtobin Oct 11, 2023
2bd1f92
correct install directory spec to prevent redundancy
wrtobin Oct 11, 2023
cfffaf1
repairing tioga spack environment fully
wrtobin Oct 12, 2023
0aa5275
working on tioga testing
wrtobin Oct 12, 2023
75a7ae6
working on tioga testing
wrtobin Oct 12, 2023
62d1ccb
working on tioga testing
wrtobin Oct 12, 2023
e9017f7
working on tioga testing
wrtobin Oct 12, 2023
555d7d3
working on tioga testing
wrtobin Oct 12, 2023
413c31a
wip
wrtobin Oct 12, 2023
46566fa
adding frontier spack env
wrtobin Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
builds/*
build-*
install-*
.cproject
Expand Down
180 changes: 180 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
stages:
- test
- deploy

variables:
GIT_SUBMODULE_STRATEGY: recursive
GEOS_DIR: "geos"
GEOS_BRANCH: "feature/wrtobin/tpl-gitlab-ci-cd" # Default branch, can be overridden when CI is run manually
SPACK_DIR: "spack"
SPACK_BRANCH: "develop"
DEPLOY: "false" # default, override when launching manually to actually deploy
GEOS_TPL_BASE: ${GEOS_DIR}/src/coreComponents/LvArray/host-configs/LLNL/llnl-tpls-base.cmake
TIOGA_TPL_BASE: ${GEOS_DIR}/src/coreComponents/LvArray/host-configs/LLNL/tioga-base.cmake
TPL_ROOT_DIR: /usr/gapps/GEOSX/thirdPartyLibs
DATE: $(date +'%Y-%m-%d')
HOST_CONFIG_INSTALL_SCHEME: install-\$\{CONFIG_NAME\}-release
SPACK_INSTALL_SCHEME: install-\$\{CLUSTER\}-\$\{SYS_TYPE\}-release

.clone_geos_no_integrated:
script:
- git clone -b ${GEOS_BRANCH} [email protected]:GEOS-DEV/GEOS.git ${GEOS_DIR}
- cd ${GEOS_DIR}
- git submodule init src/cmake/blt
- git submodule init src/coreComponents/LvArray
- git submodule init src/coreComponents/constitutive/PVTPackage
- git submodule init src/coreComponents/fileIO/coupling/hdf5_interface
- git submodule update
- cd ..

.update_geos:
script:
- cd ${GEOS_DIR}/src/coreComponents/LvArray
- git checkout -b ${BRANCH}
- git add -A
- git commit -m "Update lc tpl installation."
- git push origin ${BRANCH}
- cd ${GEOS_DIR}
- git checkout -b ${BRANCH}
- git add -A
- git commit -m "Update lc tpl installation."
- git push origin ${BRANCH}

.test_spack:
script:
- git clone [email protected]:spack/spack.git
- srun -N 1 -t 90 -n 1 scripts/spack-install.sh ${CLUSTER} ${SYS_TYPE} 64
# - source spack/share/spack/setup-env.sh
# - spack env create ${CLUSTER}-${SYS_TYPE} spack-environments/${CLUSTER}-${SYS_TYPE}/spack.yaml
# - spack env activate ${CLUSTER}-${SYS_TYPE}
# - spack install
# - spack env deactivate

.install_spack:
script:
- git clone [email protected]:spack/spack.git
- source spack/share/spack/setup-env.sh
- modifyYaml.py -i spack-environment/${CLUSTER-${SYSTEM}/spack.yaml -o spack-environments/${CLUSTER}-${SYSTEM}/spack.yaml -y "spack:config:install_tree:root:/usr/WS1/GEOS/GEOSX/TPLs_$(date +'%Y-%m-%d')"
- srun -N 1 -t 90 -n 1 scripts/spack-install.sh ${CLUSTER} ${SYS_TYPE} 64
# - spack env create ${CLUSTER}-${SYS_TYPE} spack-environments/${CLUSTER}-${SYS_TYPE}/spack.yaml
# - spack env activate ${CLUSTER}-${SYS_TYPE}
# - spack install
# - INSTALL_SCHEME=${SPACK_INSTALL_SCHEME}
# - spack env deactivate

test_spack_tioga:
stage: test
when: manual
tags:
- tioga
- shell
variables:
CLUSTER: tioga
SYS_TYPE: toss_4_x86_64_ib_cray
script:
- git clone -b $GEOS_BRANCH [email protected]:GEOS-DEV/GEOS.git ${GEOS_DIR}
- cd ${GEOS_DIR}
- git submodule init src/cmake/blt
- git submodule init src/coreComponents/LvArray
- git submodule init src/coreComponents/constitutive/PVTPackage
- git submodule init src/coreComponents/fileIO/coupling/hdf5_interface
- git submodule update
- cd ..
- git clone [email protected]:spack/spack.git ${SPACK_DIR}
- SPACK_DIR_ABS=$(realpath "${SPACK_DIR}")
- srun -N 1 -t 90 -n 1 scripts/spack-install.sh "${SPACK_DIR_ABS}" "${CLUSTER}" "${SYS_TYPE}" 64
- sed -i "7s|.*|set(GEOSX_TPL_DIR \"${SPACK_DIR_ABS}/opt/spack/install-rhel8-x86_64-cce-15.0.0a/\" CACHE PATH \"\")|" "${TIOGA_TPL_BASE}"
- cd ${GEOS_DIR}
- ./scripts/config-build.py -hc host-configs/LLNL/tioga-cce-15.cmake -bt Release
- cd build-tioga-cce-15-release
- srun -N 1 -t 90 -n 1 make -j 64 geosx

test_uberenv_tioga:
stage: test
when: manual
tags:
- tioga
- shell
variables:
CLUSTER: tioga
SYS_TYPE: toss_4_x86_64_ib_cray
script:
- TPL_ROOT=${PWD}
- git clone -b $GEOS_BRANCH [email protected]:GEOS-DEV/GEOS.git ${GEOS_DIR}
- cd ${GEOS_DIR}
- git submodule init src/cmake/blt
- git submodule init src/coreComponents/LvArray
- git submodule init src/coreComponents/constitutive/PVTPackage
- git submodule init src/coreComponents/fileIO/coupling/hdf5_interface
- git submodule update
- cd scripts/uberenv
- srun -N 1 -t 90 -n 1 uberenv.py --spack-env-file ${TPL_ROOT}/spack-environments/${CLUSTER}-${SYS_TYPE}/spack.yaml --spec "%[email protected] ++rocm amdgpu_targets==gfx90a +hypre lai=hypre"
# - cd ../..
# - cp spack-build-*/tioga-rhel8-x85_64_ib.cmake host-configs/LLNL/
# - cp spack-build-*/tioga-rhel8-x85_64_ib.cmake src/coreComponents/LvArray/host-configs/LLNL/


test_lc_tpls:
stage: test
when: manual
tags:
- quartz
- shell
variables:
INSTALL_DIR: builds
script:
- git clone -b $GEOS_BRANCH [email protected]:GEOS-DEV/GEOS.git ${GEOS_DIR}
- cd ${GEOS_DIR}
- git submodule init src/cmake/blt
- git submodule init src/coreComponents/LvArray
- git submodule init src/coreComponents/constitutive/PVTPackage
- git submodule init src/coreComponents/fileIO/coupling/hdf5_interface
- git submodule update
- cd ..
- mkdir -p ${INSTALL_DIR}
- ./scripts/setupLC-TPL.bash ${GEOS_DIR} ${INSTALL_DIR}
- echo "set(GEOS_TPL_ROOT_DIR ${TPL_ROOT_DIR} CACHE PATH \"\")" > ${GEOS_TPL_BASE}
- echo "set(GEOS_TPL_DIR \$\{GEOS_TPL_ROOT_DIR\}/${TPL_DIR}/install-\$\{CONFIG_NAME\}-release CACHE PATH \"\")" >> ${GEOS_TPL_BASE}
- cd ${GEOS_DIR}
- scripts/setupLC.bash

deploy_lc_tpls:
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $DEPLOY == "true"'
stage: deploy
when: manual
tags:
- quartz
- shell
dependencies:
- test_lc_tpls
variables:
XSU: xsu geosadmn
INSTALL_DIR: ${TPL_ROOT_DIR}/${DATE}
BRANCH: feature/update-tpls-${DATE}
script:
- git clone -b $GEOS_BRANCH [email protected]:GEOS-DEV/GEOS.git ${GEOS_DIR}
- cd ${GEOS_DIR}
- git submodule init src/cmake/blt
- git submodule init src/coreComponents/LvArray
- git submodule init src/coreComponents/constitutive/PVTPackage
- git submodule init src/coreComponents/fileIO/coupling/hdf5_interface
- git submodule update
- cd ..
- ${XSU} mkdir -p ${INSTALL_DIR}
- ${XSU} ./scripts/setupLC-TPL.bash ${GEOS_DIR} ${INSTALL_DIR}
- echo "set(GEOS_TPL_ROOT_DIR ${TPL_ROOT_DIR} CACHE PATH \"\")" > ${GEOS_TPL_BASE}
- echo "set(GEOS_TPL_DIR \$\{GEOS_TPL_ROOT_DIR\}/${TPL_DIR}/install-\$\{CONFIG_NAME\}-release CACHE PATH \"\")" >> ${GEOS_TPL_BASE}
- cd ${GEOS_DIR}
- scripts/setupLC.bash
- cd ${GEOS_DIR}/src/coreComponents/LvArray
- git checkout -b ${BRANCH}
- git add -A
- git commit -m "Update lc tpl install location."
- git push origin ${BRANCH}
- cd ${GEOS_DIR}
- git checkout -b ${BRANCH}
- git add -A
- git commit -m "Update lc tpl install location."
- git push origin ${BRANCH}

3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "cmake/blt"]
path = cmake/blt
url = ../../LLNL/blt.git
url = https://github.com/LLNL/blt.git

10 changes: 5 additions & 5 deletions scripts/setupLC-TPL.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ rm -rf toBeDeleted &
echo "Building all LC TPLs from $GEOSX_DIR to be installed at $INSTALL_DIR"
chmod -R g+rx $INSTALL_DIR
chgrp -R GEOS $INSTALL_DIR
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR quartz clang-14 "srun -N 1 -t 90 -n 1 -A geosecp" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR quartz gcc-12 "srun -N 1 -t 90 -n 1 -A geosecp" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR lassen gcc-8-cuda-11 "lalloc 1 -qpdebug" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR lassen clang-13-cuda-11 "lalloc 1 -qpdebug" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR lassen clang-10-cuda-11 "lalloc 1 -qpdebug" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR quartz clang-14 "srun -N 1 -t 90 -n 1 -A geosecp -J quartz-clang-14-tpls" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR quartz gcc-12 "srun -N 1 -t 90 -n 1 -A geosecp -J quartz-gcc-12-tpls" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR lassen gcc-8-cuda-11 "bsub -J lassen-gcc-8-cuda-11-tpls -nnodes 1 -Is -W 60 -core_isolation 2 /usr/tce/packages/lalloc/lalloc-2.0/bin/lexec" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR lassen clang-13-cuda-11 "bsub -J lassen-clang-13-cuda-11-tpls -nnodes 1 -Is -W 60 -core_isolation 2 /usr/tce/packages/lalloc/lalloc-2.0/bin/lexec" $@ &
./scripts/setupLC-TPL-helper.bash $GEOSX_DIR $INSTALL_DIR lassen clang-10-cuda-11 "bsub -J lassen-clang-10-cuda-11-tpls -nnodes 1 -Is -W 60 -core_isolation 2 /usr/tce/packages/lalloc/lalloc-2.0/bin/lexec" $@ &

wait
echo "Complete"
12 changes: 12 additions & 0 deletions scripts/spack-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

SPACK_DIR=$1
CLUSTER=$2
SYS_TYPE=$3
NPROCS=$4

source spack/share/spack/setup-env.sh
spack env create ${CLUSTER}-${SYS_TYPE} spack-environments/${CLUSTER}-${SYS_TYPE}/spack.yaml
spack env activate ${CLUSTER}-${SYS_TYPE}
spack install -j ${NPROCS}
spack env deactivate
Loading