-
Notifications
You must be signed in to change notification settings - Fork 19
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 #365 from STEllAR-GROUP/develop
Add new hydro / kokkos kernels
- Loading branch information
Showing
164 changed files
with
16,110 additions
and
5,713 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ newgit | |
cmake-build-* | ||
cmake-cuda-* | ||
.spack-env/* | ||
.clangd/* |
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,3 @@ | ||
[submodule "octotiger-testdata"] | ||
path = octotiger-testdata | ||
url = https://github.com/G-071/octotiger-testdata.git |
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,173 @@ | ||
#!groovy | ||
|
||
void setBuildStatus(String message, String state) { | ||
step([ | ||
$class: "GitHubCommitStatusSetter", | ||
reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/STEllAR-GROUP/octotiger"], | ||
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/build-status"], | ||
errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]], | ||
statusResultSource: [ $class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]] ] | ||
]); | ||
} | ||
|
||
pipeline { | ||
agent any | ||
|
||
options { | ||
buildDiscarder( | ||
logRotator( | ||
daysToKeepStr: "21", | ||
numToKeepStr: "50", | ||
artifactDaysToKeepStr: "21", | ||
artifactNumToKeepStr: "50" | ||
) | ||
) | ||
} | ||
environment { | ||
GITHUB_TOKEN = credentials('GITHUB_TOKEN_OCTOTIGER') | ||
} | ||
stages { | ||
stage('checkout') { | ||
steps { | ||
dir('octotiger') { | ||
checkout scm | ||
echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}" | ||
} | ||
} | ||
} | ||
stage('build') { | ||
matrix { | ||
axes { | ||
axis { | ||
name 'compiler_config' | ||
values 'with-CC', 'with-CC-clang' | ||
} | ||
axis { | ||
name 'cuda_config' | ||
values 'with-cuda', 'without-cuda' | ||
} | ||
axis { | ||
name 'kokkos_config' | ||
values 'with-kokkos', 'without-kokkos' | ||
} | ||
axis { | ||
name 'build_type' | ||
values 'Release' | ||
} | ||
} | ||
stages { | ||
stage('init') { | ||
steps { | ||
dir('octotiger') { | ||
sh ''' | ||
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${github_token}" \ | ||
--data "{ | ||
\\"state\\": \\"pending\\", | ||
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\" | ||
}" | ||
''' | ||
} | ||
} | ||
} | ||
stage('checkout_buildscripts') { | ||
steps { | ||
dir('octotiger') { | ||
sh ''' | ||
#!/bin/bash -l | ||
cd .. | ||
#rm -rf octo-buildscripts/src/octotiger | ||
#rm -rf "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" #remove line for dependency caching | ||
if [[ -d "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" ]] | ||
then | ||
cd "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" | ||
git reset --hard # reset griddim modification in case of unclean directory | ||
git pull | ||
rm -rf build/octotiger | ||
rm -rf src/octotiger | ||
else | ||
git clone https://github.com/diehlpk/PowerTiger.git "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" | ||
cd "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" | ||
git checkout clang_build | ||
mkdir src | ||
fi | ||
cd .. | ||
pwd | ||
cp -r octotiger "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}/src/octotiger" | ||
''' | ||
} | ||
} | ||
} | ||
stage('build') { | ||
steps { | ||
dir('octotiger') { | ||
sh ''' | ||
#!/bin/bash -l | ||
cd "../octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" | ||
src/octotiger/.jenkins/lsu/entry.sh | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
success { | ||
sh ''' | ||
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${github_token}" \ | ||
--data "{ | ||
\\"state\\": \\"success\\", | ||
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\" | ||
}" | ||
''' | ||
} | ||
failure { | ||
sh ''' | ||
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${github_token}" \ | ||
--data "{ | ||
\\"state\\": \\"failure\\", | ||
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\" | ||
}" | ||
''' | ||
} | ||
aborted { | ||
sh ''' | ||
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${github_token}" \ | ||
--data "{ | ||
\\"state\\": \\"error\\", | ||
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\", | ||
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\" | ||
}" | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,38 @@ | ||
#!/bin/bash -l | ||
|
||
set -eux | ||
|
||
#default: Assume gcc | ||
compiler_module="gcc/9.3.0" | ||
|
||
# if clang: change modules and no blast test (no quadmath..) | ||
if [ "${compiler_config}" = "with-CC-clang" ]; then | ||
compiler_module="clang/11.0.1" | ||
sed -i 's/OCTOTIGER_WITH_BLAST_TEST=ON/OCTOTIGER_WITH_BLAST_TEST=OFF/' build-octotiger.sh | ||
fi | ||
|
||
# Load everything | ||
echo "Loading modules: " | ||
module load "${compiler_module}" cuda/11.0 hwloc | ||
|
||
# Tests with griddim = 8 | ||
if [ "${kokkos_config}" = "with-kokkos" ]; then | ||
echo "Running tests with griddim=8 on diablo" | ||
srun -p QxV100 -N 1 -n 1 -t 01:00:00 bash -c "module load ${compiler_module} cuda/11.0 hwloc && ./build-all.sh Release ${compiler_config} ${cuda_config} without-mpi without-papi without-apex ${kokkos_config} with-simd with-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling boost jemalloc hdf5 silo vc hpx kokkos cppuddle octotiger && cd build/octotiger/build && ctest " | ||
|
||
# Tests with griddim = 16 - only test in full kokkos + cuda build | ||
if [ "${cuda_config}" = "with-cuda" ]; then | ||
sed -i 's/GRIDDIM=8/GRIDDIM=16/' build-octotiger.sh | ||
echo "Running tests with griddim=16 on diablo" | ||
srun -p QxV100 -N 1 -n 1 -t 01:00:00 bash -c "module load ${compiler_module} cuda/11.0 hwloc && ./build-all.sh Release ${compiler_config} ${cuda_config} without-mpi without-papi without-apex ${kokkos_config} with-simd with-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling boost jemalloc hdf5 silo vc hpx kokkos cppuddle octotiger && cd build/octotiger/build && ctest " | ||
sed -i 's/GRIDDIM=16/GRIDDIM=8/' build-octotiger.sh | ||
fi | ||
else | ||
echo "Running tests with griddim=8 on diablo" | ||
srun -p QxV100 -N 1 -n 1 -t 01:00:00 bash -c "module load ${compiler_module} cuda/11.0 hwloc && ./build-all.sh Release ${compiler_config} ${cuda_config} without-mpi without-papi without-apex ${kokkos_config} with-simd with-hpx-backend-multipole without-hpx-backend-monopole with-hpx-cuda-polling boost jemalloc hdf5 silo vc hpx cppuddle octotiger && cd build/octotiger/build && ctest " | ||
fi | ||
|
||
# Reset buildscripts (in case of failure, the next job will reset it in the checkout step) | ||
if [ "${compiler_config}" = "with-CC-clang" ]; then | ||
sed -i 's/OCTOTIGER_WITH_BLAST_TEST=OFF/OCTOTIGER_WITH_BLAST_TEST=ON/' build-octotiger.sh | ||
fi |
Oops, something went wrong.