Skip to content

Commit

Permalink
contrib/intel/jenkins: Use new CI to build
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdworkin committed Nov 12, 2024
1 parent dd7373a commit 62d5ef1
Showing 1 changed file with 80 additions and 62 deletions.
142 changes: 80 additions & 62 deletions contrib/intel/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run_middleware(providers, stage_name, test, hw, partition, node_num,
}
}

def run_ci(stage_name, config_name, additional_args=null) {
def run_ci(stage_name, config_name, additional_args="") {
sh """source ${CI_LOCATION}/${env.CI_MODULE}/venv/bin/activate;\
python run.py \
--output=${env.LOG_DIR}/${stage_name} \
Expand All @@ -102,6 +102,14 @@ def run_ci(stage_name, config_name, additional_args=null) {
"""
}

def build_ci(config_name) {
sh """source ${CI_LOCATION}/${env.CI_MODULE}/venv/bin/activate;\
python build.py \
--output=${env.LOG_DIR}/pre-build \
--job=${config_name}
"""
}

def gather_logs(cluster, key, dest, source) {
def address = "${env.USER}@${cluster}"

Expand Down Expand Up @@ -281,6 +289,13 @@ def bootstrap_ci() {
sh "${CI_LOCATION}/${env.CI_MODULE}/bootstrap.sh"
}

def checkout_tar(name) {
dir ("${env.CUSTOM_WORKSPACE}/${name}/libfabric") { checkout scm }
dir ("${env.CUSTOM_WORKSPACE}/${name}/") {
sh "tar -cvf libfabric.tar.gz libfabric/*"
}
}

def check_target() {
echo "CHANGE_TARGET = ${env.CHANGE_TARGET}"
if (changeRequest()) {
Expand Down Expand Up @@ -348,7 +363,7 @@ def skip() {
pipeline {
agent {
node {
label 'main-dev'
label 'main'
customWorkspace "workspace/${JOB_NAME}/${env.BUILD_NUMBER}"
}
}
Expand All @@ -370,27 +385,7 @@ pipeline {
stage ('checkout') {
steps {
script {
dir ("${CUSTOM_WORKSPACE}/source/libfabric") {
checkout scm
}
dir ("${CUSTOM_WORKSPACE}/grass/libfabric") {
checkout scm
}
dir ("${CUSTOM_WORKSPACE}/water/libfabric") {
checkout scm
}
dir ("${CUSTOM_WORKSPACE}/electric/libfabric") {
checkout scm
}
dir ("${CUSTOM_WORKSPACE}/ucx/libfabric") {
checkout scm
}
dir ("${CUSTOM_WORKSPACE}/cuda/libfabric") {
checkout scm
}
dir ("${CUSTOM_WORKSPACE}/iouring/libfabric") {
checkout scm
}
checkout_tar("source")
dir (CUSTOM_WORKSPACE) {
checkout_external_resources()
}
Expand Down Expand Up @@ -443,72 +438,88 @@ pipeline {
}
}
}
stage ('bootstrap-ci') {
steps {
script {
bootstrap_ci()
}
}
}
stage ('parallel-builds') {
when { equals expected: true, actual: DO_RUN }
parallel {
stage ('bootstrap-ci') {
steps {
script {
bootstrap_ci()
}
}
}
stage ('build-water') {
steps {
script {
slurm_build(BUILD_MODES, "totodile", "water", "water", "water")
slurm_batch("totodile", "1",
dir (CI_LOCATION) {
build_ci("pr_build_water.json")
build_ci("pr_build_shmem_water.json")
slurm_batch("totodile", "1",
"${env.LOG_DIR}/build_mpich_water_log",
"""python$PYTHON_VERSION ${RUN_LOCATION}/build.py \
--build_item=mpich --build_hw=water"""
)
run_ci("CI_shmem_grass", "pr_shmem_grass.json", "--build-only")
)
}
}
}
}
stage ('build-grass') {
steps {
script {
slurm_build(BUILD_MODES, "grass", "grass", "grass", "grass")
slurm_batch("grass", "1",
dir (CI_LOCATION) {
build_ci("pr_build_grass.json")
build_ci("pr_build_shmem_grass.json")
slurm_batch("grass", "1",
"${env.LOG_DIR}/build_mpich_grass_log",
"""python$PYTHON_VERSION ${RUN_LOCATION}/build.py \
--build_item=mpich --build_hw=grass"""
)
run_ci("CI_shmem_water", "pr_shmem_water.json", "--build-only")
)
}
}
}
}
stage ('build-electric') {
steps {
script {
slurm_build(BUILD_MODES, "electric", "electric", "electric",
"electric")
dir (CI_LOCATION) {
build_ci("pr_build_electric.json")
}
}
}
}
stage ('build-ucx') {
steps {
script {
slurm_build(BUILD_MODES, "totodile", "ucx", "ucx", "ucx")
dir (CI_LOCATION) {
build_ci("pr_build_ucx.json")
}
}
}
}
stage ('build-cuda') {
stage ('build-cyndaquil') {
steps {
script {
slurm_build(["reg"], "cyndaquil", "cuda", "cyndaquil",
"cyndaquil", "--cuda")
slurm_build(["reg"], "quilava", "cuda", "quilava",
"quilava", "--cuda")
dir (CI_LOCATION) {
build_ci("pr_build_cyndaquil.json")
}
}
}
}
stage ('build-iouring') {
stage ('build-quilava') {
steps {
script {
slurm_build(BUILD_MODES, "ivysaur", "iouring", "ivysaur",
"ivysaur")
dir (CI_LOCATION) {
build_ci("pr_build_quilava.json")
}
}
}
}
stage ('build-ivysaur') {
steps {
script {
dir (CI_LOCATION) {
build_ci("pr_build_ivysaur.json")
}
}
}
}
Expand All @@ -522,17 +533,21 @@ pipeline {
options { skipDefaultCheckout() }
steps {
script {
dir ("${CUSTOM_WORKSPACE}/source/libfabric") { checkout scm }
checkout_tar("source")
checkout_external_resources()
dir (CUSTOM_WORKSPACE) {
build("logdir")
build("libfabric", "reg", "daos")
build("fabtests", "reg", "daos")
// build("libfabric", "reg", "daos")
// build("fabtests", "reg", "daos")
}
bootstrap_ci()
dir (CI_LOCATION) {
build_ci("pr_build_daos.json")
}
}
}
}
stage ('build-gpu') {
stage ('build-fire') {
agent {
node {
label 'ze'
Expand All @@ -542,14 +557,17 @@ pipeline {
options { skipDefaultCheckout() }
steps {
script {
dir ("${CUSTOM_WORKSPACE}/source/libfabric") { checkout scm }
checkout_tar("source")
checkout_external_resources()
dir (CUSTOM_WORKSPACE) {
build("logdir")
build("builddir")
bootstrap_ci()
slurm_build(BUILD_MODES, "fabrics-ci", "source", "ze", "gpu",
"--gpu")
// slurm_build(BUILD_MODES, "fabrics-ci", "source", "ze", "gpu",
// "--gpu")
}
bootstrap_ci()
dir (CI_LOCATION) {
build_ci("pr_build_fire.json")
}
}
}
Expand Down Expand Up @@ -800,16 +818,16 @@ pipeline {
script {
dir (RUN_LOCATION) {
run_middleware([["psm3", null]], "oneCCL-GPU-v3", "onecclgpu",
"gpu", "torchic", "1", null, null,
"fire", "torchic", "1", null, null,
"FI_HMEM_DISABLE_P2P=1")
run_middleware([["verbs", null]], "oneCCL-GPU-v3", "onecclgpu",
"gpu", "torchic", "1", null, null,
"fire", "torchic", "1", null, null,
"FI_HMEM_DISABLE_P2P=1")
run_middleware([["tcp", null]], "oneCCL-GPU-v3", "onecclgpu",
"gpu", "torchic", "1", null, null,
"fire", "torchic", "1", null, null,
"FI_HMEM_DISABLE_P2P=1")
run_middleware([["shm", null]], "oneCCL-GPU-v3", "onecclgpu",
"gpu", "torchic", "1", null, null,
"fire", "torchic", "1", null, null,
"FI_HMEM_DISABLE_P2P=1")
}
}
Expand Down Expand Up @@ -851,7 +869,7 @@ pipeline {
dir (RUN_LOCATION) {
dmabuf_output = "${LOG_DIR}/DMABUF-Tests_verbs-rxm_dmabuf"
cmd = """ python3.9 runtests.py --test=dmabuf \
--prov=verbs --util=rxm --build_hw=gpu"""
--prov=verbs --util=rxm --build_hw=fire"""
slurm_batch("torchic", "1", "${dmabuf_output}_reg",
"${cmd}")
}
Expand Down

0 comments on commit 62d5ef1

Please sign in to comment.