diff --git a/contrib/intel/jenkins/Jenkinsfile b/contrib/intel/jenkins/Jenkinsfile index 7e82edf0669..7712d8d547e 100644 --- a/contrib/intel/jenkins/Jenkinsfile +++ b/contrib/intel/jenkins/Jenkinsfile @@ -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"] @@ -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 srun --partition=${partition} -N ${node_num} \ + --wait -o ${output} --open-mode=append \'env;${command}\' + """ + } 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} \ @@ -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}") + } } } @@ -160,7 +178,7 @@ pipeline { } stages { - stage ('opt-out') { + /*stage ('opt-out') { steps { script { TARGET=check_target() @@ -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." @@ -206,8 +224,8 @@ pipeline { } } } - } - stage ('build-daos') { + }*/ + /* stage ('build-daos') { agent { node { label 'daos_head' @@ -241,8 +259,8 @@ pipeline { --build_item=fabtests""") } } - } - stage ('build-dsa') { + }*/ + /*stage ('build-dsa') { agent { node { label 'dsa' @@ -267,7 +285,7 @@ pipeline { """ } } - } + }*/ stage ('build-gpu') { agent { node { @@ -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}/") { @@ -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") } } @@ -492,8 +510,8 @@ pipeline { } } } - } - stage('daos_tcp') { + }*/ + /*stage('daos_tcp') { agent { node { label 'daos_tcp' } } options { skipDefaultCheckout() } steps { @@ -518,7 +536,7 @@ pipeline { } } } - } + }*/ stage ('DMABUF-Tests') { agent { node { label 'ze' } } options { skipDefaultCheckout() } @@ -531,7 +549,7 @@ pipeline { } } } - stage ('ze-shm') { + /*stage ('ze-shm') { steps { script { dir ("${env.WORKSPACE}/${SCRIPT_LOCATION}/") { @@ -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']) { @@ -643,8 +661,8 @@ pipeline { """ } } - } - stage ('Summary-daos') { + }*/ + /*stage ('Summary-daos') { agent {node {label 'daos_head'}} when { equals expected: 1, actual: DO_RUN } steps { @@ -657,7 +675,7 @@ pipeline { """ } } - } + }*/ } post { @@ -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 @@ -678,7 +696,7 @@ 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" @@ -686,7 +704,7 @@ pipeline { } } 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() @@ -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") { @@ -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() @@ -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}") { @@ -767,3 +785,4 @@ pipeline { } } } + diff --git a/contrib/intel/jenkins/tests.py b/contrib/intel/jenkins/tests.py index 6c7036510dc..7cd0b904905 100755 --- a/contrib/intel/jenkins/tests.py +++ b/contrib/intel/jenkins/tests.py @@ -1056,7 +1056,6 @@ def cmd(self): def execute_cmd(self, test_type): os.chdir(self.DMABUFtestpath) server_cmd = '' - print("Before if statmnt") if 'H2H' in test_type or 'D2H' in test_type: server_cmd = f"{self.cmd} -m malloc -p {self.core_prov}" else: