Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Juee14Desai committed Aug 4, 2023
1 parent 3b86d61 commit 9357982
Showing 1 changed file with 45 additions and 26 deletions.
71 changes: 45 additions & 26 deletions contrib/intel/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import groovy.transform.Field
properties([disableConcurrentBuilds(abortPrevious: true)])
def DO_RUN=1
def TARGET="main"
def SCRIPT_LOCATION="py_scripts/contrib/intel/jenkins"
def SCRIPT_LOCATION="contrib/intel/jenkins"
def RELEASE=0
@Field def BUILD_MODES=["reg", "dbg", "dl"]
@Field def MPI_TYPES=["impi", "mpich", "ompi"]
Expand All @@ -16,6 +16,19 @@ def run_python(version, command, output=null) {
sh "python$version $command"
}

def slurm_allocation(partition, node_num, output, command) {
try {
sh """timeout 3600 salloc --partition=${partition} -N ${node_num} \
--wait 0 | ${command} >> ${output}
"""
} catch (Exception e) {
sh "scancel \$(cat ${output} | grep SLURM_JOBID | cut -d \"=\" -f 2)"
sh "cat ${output}"
error("Build failed ${e}")
}
sh "cat ${output}"
}

def slurm_batch(partition, node_num, output, command) {
try {
sh """timeout 3600 sbatch --partition=${partition} -N ${node_num} \
Expand Down Expand Up @@ -74,8 +87,13 @@ def run_middleware(providers, stage_name, test, partition, node_num, mpi=null,
output = "${prefix}${prov[0]}${suffix}"
}

/*if(stage_name == "DMABUF-Tests") {
slurm_allocation("${partition}", "${node_num}", "${output}",
"${base_cmd} ${opts}")
} else {*/
slurm_batch("${partition}", "${node_num}", "${output}",
"${base_cmd} ${opts}")
/*}*/
}
}

Expand Down Expand Up @@ -160,7 +178,7 @@ pipeline {
}

stages {
stage ('opt-out') {
/*stage ('opt-out') {
steps {
script {
TARGET=check_target()
Expand All @@ -172,11 +190,11 @@ pipeline {
RELEASE=release()
}
}
}
}*/
stage ('parallel-builds') {
when { equals expected: 1, actual: DO_RUN }
parallel {
stage ('build') {
/*stage ('build') {
steps {
script {
echo "Copying build dirs."
Expand Down Expand Up @@ -206,8 +224,8 @@ pipeline {
}
}
}
}
stage ('build-daos') {
}*/
/* stage ('build-daos') {
agent {
node {
label 'daos_head'
Expand Down Expand Up @@ -241,8 +259,8 @@ pipeline {
--build_item=fabtests""")
}
}
}
stage ('build-dsa') {
}*/
/*stage ('build-dsa') {
agent {
node {
label 'dsa'
Expand All @@ -267,7 +285,7 @@ pipeline {
"""
}
}
}
}*/
stage ('build-gpu') {
agent {
node {
Expand Down Expand Up @@ -300,7 +318,7 @@ pipeline {
stage('parallel-tests') {
when { equals expected: 1, actual: DO_RUN }
parallel {
stage('MPI_verbs-rxm') {
/*stage('MPI_verbs-rxm') {
steps {
script {
dir ("${env.WORKSPACE}/${SCRIPT_LOCATION}/") {
Expand Down Expand Up @@ -465,7 +483,7 @@ pipeline {
steps {
script {
dir ("${env.WORKSPACE}/${SCRIPT_LOCATION}/") {
run_middleware([["tcp", "rxm"]/*, ["psm3", null]*/], "oneCCL",
run_middleware([["tcp", "rxm"]/*, ["psm3", null]*//*], "oneCCL",
"oneccl", "bulbasaur", "2")
}
}
Expand All @@ -492,8 +510,8 @@ pipeline {
}
}
}
}
stage('daos_tcp') {
}*/
/*stage('daos_tcp') {
agent { node { label 'daos_tcp' } }
options { skipDefaultCheckout() }
steps {
Expand All @@ -518,7 +536,7 @@ pipeline {
}
}
}
}
}*/
stage ('DMABUF-Tests') {
agent { node { label 'ze' } }
options { skipDefaultCheckout() }
Expand All @@ -531,7 +549,7 @@ pipeline {
}
}
}
stage ('ze-shm') {
/*stage ('ze-shm') {
steps {
script {
dir ("${env.WORKSPACE}/${SCRIPT_LOCATION}/") {
Expand Down Expand Up @@ -611,10 +629,10 @@ pipeline {
"""
}
}
}
}*/
}
}
stage ('Summary') {
/*stage ('Summary') {
when { equals expected: 1, actual: DO_RUN }
steps {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin/:$PYTHONPATH']) {
Expand Down Expand Up @@ -643,8 +661,8 @@ pipeline {
"""
}
}
}
stage ('Summary-daos') {
}*/
/*stage ('Summary-daos') {
agent {node {label 'daos_head'}}
when { equals expected: 1, actual: DO_RUN }
steps {
Expand All @@ -657,7 +675,7 @@ pipeline {
"""
}
}
}
}*/
}

post {
Expand All @@ -667,7 +685,7 @@ pipeline {
}
}
success {
node ('daos_head') {
/*node ('daos_head') {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH']) {
sh """
if [[ ${DO_RUN} -eq 1 ]]; then
Expand All @@ -678,15 +696,15 @@ pipeline {
deleteDir()
}
}
}
}*/
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH']) {
dir("${env.WORKSPACE}") {
sh "python3.9 ${env.WORKSPACE}/${SCRIPT_LOCATION}/summary.py -v --summary_item=all"
}
}
}
aborted {
node ('daos_head') {
/*node ('daos_head') {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH']) {
dir ("${env.JOB_INSTALL_DIR}/${env.JOB_NAME}/${env.BUILD_NUMBER}/middlewares") {
deleteDir()
Expand All @@ -699,7 +717,7 @@ pipeline {
deleteDir()
}
}
}
}*/
node ('ze') {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH']) {
dir ("${env.JOB_INSTALL_DIR}/${env.JOB_NAME}/${env.BUILD_NUMBER}/middlewares") {
Expand All @@ -714,7 +732,7 @@ pipeline {
}
}
cleanup {
node ('daos_head') {
/*node ('daos_head') {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH']) {
dir ("${env.JOB_INSTALL_DIR}/${env.JOB_NAME}/${env.BUILD_NUMBER}") {
deleteDir()
Expand All @@ -739,7 +757,7 @@ pipeline {
deleteDir()
}
}
}
}*/
node ('ze') {
withEnv(['PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH']) {
dir ("${env.JOB_INSTALL_DIR}/${env.JOB_NAME}/${env.BUILD_NUMBER}") {
Expand Down Expand Up @@ -767,3 +785,4 @@ pipeline {
}
}
}

0 comments on commit 9357982

Please sign in to comment.