-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from SC-SGS/develop
Merge develop into main
- Loading branch information
Showing
137 changed files
with
6,411 additions
and
4,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\\" | ||
}" | ||
''' | ||
} | ||
} | ||
} |
Oops, something went wrong.