Skip to content

Commit

Permalink
Merge pull request #8 from SC-SGS/develop
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
breyerml authored Oct 27, 2021
2 parents 5bd576d + 48a9a0a commit b7ce1d8
Show file tree
Hide file tree
Showing 137 changed files with 6,411 additions and 4,921 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ jobs:
uses: actions/checkout@v2
with:
path: PLSSVM

# install dependencies
- name: Dependancies
run: sudo apt-get install -y doxygen graphviz
# configure project via CMake
- name: Configure
run: |
cd PLSSVM
mkdir build
cd build
cmake -DPLSSVM_TARGET_PLATFORMS=cpu -DPLSSVM_ENABLE_DOCUMENTATION=ON -DPLSSVM_GENERATE_TEST_FILE=OFF PLSSVM_ENABLE_TESTING=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF ..
cmake -DPLSSVM_TARGET_PLATFORMS=cpu -DPLSSVM_ENABLE_DOCUMENTATION=ON -DPLSSVM_ENABLE_TESTING=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=OFF ..
# build project
- name: Generate
run: |
cd PLSSVM/build
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/msvc_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Windows CPU
on: push
jobs:
MSVC-Test:
runs-on: windows-latest
steps:
- name: "Install MSVC 14.29"
uses: ilammy/[email protected]
with:
toolset: 14.29
- name: "Install cmake 3.20.1"
uses: lukka/[email protected]
- name: "Clone Step"
uses: actions/checkout@v2
with:
path: PLSSVM
- name: "CMake Step"
run: |
mkdir PLSSVM/build
cd PLSSVM/build
cmake -DCMAKE_BUILD_TYPE=Debug -DPLSSVM_TARGET_PLATFORMS="cpu" -DPLSSVM_ENABLE_TESTING=ON -DPLSSVM_GENERATE_TEST_FILE=OFF -DPLSSVM_ENABLE_LTO=OFF -DPLSSVM_ENABLE_ASSERTS=ON..
- name: "Build Step"
run: |
cd PLSSVM/build
cmake --build .
- name: "Test Step"
run: |
cd PLSSVM/build
ctest -C Debug -V
307 changes: 307 additions & 0 deletions .jenkins/Jenkinsfile-multigpu-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
#!groovy

def buildbadge = addEmbeddableBadgeConfiguration(id: "Jenkins", subject: "Jenkins Tests", status: "skipped")

if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
print "INFO: Build on ${env.BRANCH_NAME}/${env.BUILD_NUMBER} triggered by branch indexing..."
if (env.BRANCH_NAME != "master") {
if (env.BUILD_NUMBER != "1") { // Always execute first build to load this configuration and thus the triggers
print "INFO: Build on ${env.BRANCH_NAME}/${env.BUILD_NUMBER} skipped due being triggered by Branch Indexing instead of SCM change!"
buildbadge.setStatus('skipped')
currentBuild.result = 'ABORTED'
return // early exit to avoid redundant builds
}
}
} else {
print "INFO: Build on ${env.BRANCH_NAME}/${env.BUILD_NUMBER} triggered by SCM change..."
print "Proceeding!"
}


pipeline {
agent { label 'argon-fs'}

options {
buildDiscarder(
logRotator(
daysToKeepStr: "21",
numToKeepStr: "50",
artifactDaysToKeepStr: "21",
artifactNumToKeepStr: "50"
)
)
}

triggers {
githubPush() // Trigger by push to respective github branch
pollSCM 'H/15 * * * *' // Fallback polling solution as some pushes are somehow lost
}

environment {
GITHUB_TOKEN = credentials('GITHUB_TOKEN')
BRANCH_NAME = "${env.BRANCH_NAME}"
}

stages {
stage('init') {
steps {
sh '''
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
curl --verbose\
--request POST \
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \
--header "Content-Type: application/json" \
--header "authorization: Bearer ${gitlab_token}" \
--data "{
\\"state\\": \\"pending\\",
\\"context\\": \\"jenkins-ctest-multigpu\\",
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-multigpu\\",
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-Multigpu/job/${BRANCH_NAME}/$BUILD_NUMBER\\"
}"
'''
}
}
stage('checkout') {
steps {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 03:00:00 -D /scratch bash -c "\
cd /scratch && \
mkdir -p jenkins && cd jenkins; \
if [[ ! -d spack ]]; then git clone --depth 1 https://github.com/spack/spack.git;fi; \
source spack/share/spack/setup-env.sh && \
spack compiler find && \
spack install [email protected] && \
spack load [email protected] && echo 'Successfully installed/loaded spack cmake'"
'''
sh '''
srun -w argon-gtx -N 1 -n 1 -t 0:05:00 -D /scratch bash -c "\
cd /scratch && \
mkdir -p jenkins && cd jenkins; \
mkdir -p plssvm/${BUILD_TAG} && cd plssvm/${BUILD_TAG} && \
rm -rf PLSSVM && \
git clone [email protected]:SC-SGS/PLSSVM.git PLSSVM && \
cd PLSSVM && \
pwd && \
git checkout ${GIT_COMMIT}"
'''
sh '''
mkdir ${BUILD_TAG}
'''
}
}
stage('setup python'){
steps{
sh '''
/usr/bin/python3.8 -m pip install --user arff
/usr/bin/python3.8 -m pip install --user pandas
/usr/bin/python3.8 -m pip install --user sklearn
/usr/bin/python3.8 -m pip install --user argparse
'''
}
}
stage('build and test'){
parallel {
stage('OpenMP, OpenCL, CUDA'){
stages{
stage('build plssvm Release') {
steps {
dir('plssvm') {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 00:05:00 -D /scratch/jenkins/plssvm/${BUILD_TAG}/PLSSVM bash -c "\
source /scratch/jenkins/spack/share/spack/setup-env.sh && spack load [email protected] &&\
module load cuda &&\
mkdir -p build/Release &&\
cd build/Release &&\
rm -rf * &&\
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS='cpu;nvidia:61' -DPLSSVM_ENABLE_ASSERTS=ON -S ../../ &&\
make -j4"
'''
}
}
}
stage('run tests Release') {
steps {
dir('plssvm') {
warnError('Release tests failed!') {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 01:00:00 -D /scratch/jenkins/plssvm/${BUILD_TAG}/PLSSVM --gres=gpu:2 bash -c "\
module load cuda &&\
cd build/Release &&\
ctest -j4 --no-compress-output -T Test --timeout 1200; \
returncode=$? && \
cp -r Testing /data/argon-fs/sgs/jenkins/workspace/$(basename ${WORKSPACE})/${BUILD_TAG}/Testing &&\
exit $returncode"
'''
}
}
}
}
}
}
stage('hipSYCL'){
stages{
stage('build plssvm hipSYCL Release') {
steps {
dir('plssvm') {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 00:05:00 -D /scratch/jenkins/plssvm/${BUILD_TAG}/PLSSVM bash -c "\
source /scratch/jenkins/spack/share/spack/setup-env.sh && spack load [email protected] &&\
module load cuda &&\
module use /home/breyerml/.modulefiles/ &&\
module load pcsgs05/hipsycl &&\
mkdir -p build/Release_hip &&\
cd build/Release_hip &&\
rm -rf * &&\
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS='cpu;nvidia:sm_61' -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=ON -DPLSSVM_ENABLE_ASSERTS=ON -S ../../ &&\
make -j4 "
'''
}
}
}
stage('run tests hipSYCL Release') {
steps {
dir('plssvm') {
warnError('hipSYCL Release tests failed!') {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 01:00:00 -D /scratch/jenkins/plssvm/${BUILD_TAG}/PLSSVM --gres=gpu:2 bash -c "\
module load cuda &&\
module use /home/breyerml/.modulefiles/ &&\
module load pcsgs05/hipsycl &&\
cd build/Release_hip &&\
ctest -j4 --no-compress-output -T Test --timeout 1200; \
returncode=$? && \
cp -r Testing /data/argon-fs/sgs/jenkins/workspace/$(basename ${WORKSPACE})/${BUILD_TAG}/Testing_hip && \
exit $returncode"
'''
}
}
}
}
}
}
stage('DPC++'){
stages{
stage('build plssvm DPC++ Release') {
steps {
dir('plssvm') {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 00:05:00 -D /scratch/jenkins/plssvm/${BUILD_TAG}/PLSSVM bash -c "\
source /scratch/jenkins/spack/share/spack/setup-env.sh && spack load [email protected] &&\
module load cuda &&\
module use /home/breyerml/.modulefiles/ &&\
module load pcsgs05/dpcpp_rt &&\
mkdir -p build/Release_dpcpp &&\
cd build/Release_dpcpp &&\
rm -rf * &&\
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS='cpu;nvidia:sm_61' -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=ON -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=ON -DPLSSVM_ENABLE_ASSERTS=ON -DPLSSVM_ENABLE_LTO=OFF -S ../../ &&\
make -j4 "
'''
}
}
}
stage('run tests DPC++ Release') {
steps {
dir('plssvm') {
warnError('DPC++ Release tests failed!') {
sh '''
srun -w argon-gtx -N 1 -n 1 -t 01:00:00 -D /scratch/jenkins/plssvm/${BUILD_TAG}/PLSSVM --gres=gpu:2 bash -c "\
module load cuda &&\
module use /home/breyerml/.modulefiles/ &&\
module load pcsgs05/dpcpp_rt &&\
cd build/Release_dpcpp &&\
ctest -j4 --no-compress-output -T Test --timeout 1200; \
returncode=$? && \
cp -r Testing /data/argon-fs/sgs/jenkins/workspace/$(basename ${WORKSPACE})/${BUILD_TAG}/Testing_dpcpp &&\
exit $returncode"
'''
}
}
}
}
}
}
}
}
}
post {
always {
// Process the CTest xml output with the xUnit plugin
xunit (
testTimeMargin: '3000',
thresholdMode: 1,
thresholds: [
skipped(failureThreshold: '0'),
failed(failureThreshold: '0')
],
tools: [CTest(
pattern: '${BUILD_TAG}/Testing*/**/*.xml',
deleteOutputFiles: true,
failIfNotNew: false,
skipNoTestFiles: true,
stopProcessingIfError: true
)]
)
sh '''
srun -w argon-gtx -n 1 -t 00:05:00 bash -c "rm -rf /data/scratch/jenkins/plssvm/${BUILD_TAG}"
rm -rf ${BUILD_TAG}
'''
}
success {
script {
buildbadge.setStatus('success')
}
sh '''
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
curl --verbose\
--request POST \
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \
--header "Content-Type: application/json" \
--header "authorization: Bearer ${gitlab_token}" \
--data "{
\\"state\\": \\"success\\",
\\"context\\": \\"jenkins-ctest-multigpu\\",
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-multigpu\\",
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-Multigpu/job/${BRANCH_NAME}/$BUILD_NUMBER\\"
}"
'''
}
failure {
script {
buildbadge.setStatus('failing')
}
sh '''
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
curl --verbose\
--request POST \
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \
--header "Content-Type: application/json" \
--header "authorization: Bearer ${gitlab_token}" \
--data "{
\\"state\\": \\"failure\\",
\\"context\\": \\"jenkins-ctest-multigpu\\",
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-multigpu\\",
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-Multigpu/job/${BRANCH_NAME}/$BUILD_NUMBER\\"
}"
'''
}
aborted {
script {
buildbadge.setStatus('aborted')
}
sh '''
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
curl --verbose\
--request POST \
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \
--header "Content-Type: application/json" \
--header "authorization: Bearer ${gitlab_token}" \
--data "{
\\"state\\": \\"error\\",
\\"context\\": \\"jenkins-ctest-multigpu\\",
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-multigpu\\",
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-Multigpu/job/${BRANCH_NAME}/$BUILD_NUMBER\\"
}"
'''
}
}
}
Loading

0 comments on commit b7ce1d8

Please sign in to comment.