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

Print ncores #3673

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
17 changes: 16 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,28 @@ def rocmtestnode(Map conf) {
checkout scm
}

NCORES = sh (
script: 'nproc',
returnStdout: true
).trim()

def working_cores = "${NCORES}" as int

if ( working_cores > 64) {
def MAXTIMEOUT = 3
} else {
def MAXTIMEOUT = 4
}
echo "Cores on server = ${NCORES}, Setting timeout to ${MAXTIMEOUT} hours"
println("Cores on server = " + ${NCORES} + ", Setting timeout to " + ${MAXTIMEOUT} + " hours")

gitStatusWrapper(credentialsId: "${env.migraphx_ci_creds}", gitHubContext: "Jenkins - ${variant}", account: 'ROCmSoftwarePlatform', repo: 'AMDMIGraphX') {
withCredentials([usernamePassword(credentialsId: 'docker_test_cred', passwordVariable: 'DOCKERHUB_PASS', usernameVariable: 'DOCKERHUB_USER')]) {
sh "echo $DOCKERHUB_PASS | docker login --username $DOCKERHUB_USER --password-stdin"
pre()
sh "docker pull ${DOCKER_IMAGE}:${env.IMAGE_TAG}"
withDockerContainer(image: "${DOCKER_IMAGE}:${env.IMAGE_TAG}", args: "--device=/dev/kfd --device=/dev/dri --group-add video --cap-add SYS_PTRACE -v=/home/jenkins/:/home/jenkins ${docker_args}") {
timeout(time: 2, unit: 'HOURS') {
timeout(time: MAXTIMEOUT, unit: 'HOURS') {
body(cmake_build)
}
}
Expand Down
Loading