Skip to content

Commit

Permalink
Merge pull request #365 from STEllAR-GROUP/develop
Browse files Browse the repository at this point in the history
Add new hydro / kokkos kernels
  • Loading branch information
diehlpk authored Jul 12, 2021
2 parents 1158ec8 + 42720b8 commit e8c225c
Show file tree
Hide file tree
Showing 164 changed files with 16,110 additions and 5,713 deletions.
35 changes: 31 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,55 @@ jobs:
steps:
- checkout:
path: /octotiger
- run:
name: Get reference data submodule
command: cd /octotiger && git submodule update --init --recursive && cd ..
- run:
name: Checkout CPPuddle
command: git clone https://github.com/G-071/hpx-kokkos-interopt-WIP.git cppuddle
- run:
name: Create CPPuddle installation directory
command: mkdir cppuddle-install
- run:
name: Configure CPPuddle
command: cmake -Hcppuddle -Bcppuddle/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cppuddle-install
- run:
name: Build CPPuddle
command: cmake --build cppuddle/build -- -j 2 VERBOSE=1
- run:
name: Install CPPuddle
command: cmake --build cppuddle/build --target install
- run:
name: Configure Octo-Tiger
command: |
cmake -H/octotiger -B/octotiger/build \
-DCMAKE_BUILD_TYPE=Release \
-DHPX_DIR=/local/hpx/lib/cmake/HPX \
-DVc_DIR=/local/vc/lib/cmake/Vc \
-DCPPuddle_DIR=/root/project/cppuddle-install/lib/cmake/CPPuddle \
-DSilo_DIR=/local/silo \
-DHDF5_ROOT=/local/hdf5 \
-DBOOST_ROOT=/local/boost \
-DOCTOTIGER_WITH_Vc=OFF \
-DOCTOTIGER_WITH_DOCU=ON \
-GNinja
- run:
name: Build
command: cmake --build /octotiger/build -- -j2
- run:
name: Install CPPuddle lib to persistent octotiger directory
command: |
cp cppuddle-install/lib/libbuffer_manager.so /octotiger/build/libbuffer_manager.so
cp cppuddle-install/lib/libstream_manager.so /octotiger/build/libstream_manager.so
- run:
name: Documentation
command: make -C /octotiger/build doc
- persist_to_workspace:
root: /
paths:
- octotiger/build
- cppuddle/build
- cppuddle-install

test_marshak:
<<: *docker_config
Expand Down Expand Up @@ -78,7 +105,7 @@ jobs:
at: /
- run:
name: Blast test
command: ctest --output-on-failure -R test_problems.cpu.blast.diff
command: ctest --output-on-failure -R test_problems.cpu.blast_legacy
no_output_timeout: 200m
- run:
name: Move artifacts
Expand All @@ -99,7 +126,7 @@ jobs:
at: /
- run:
name: Sod shock tube test
command: ctest --output-on-failure -R test_problems.cpu.sod.diff
command: ctest --output-on-failure -R test_problems.cpu.sod_legacy
no_output_timeout: 25m
- run:
name: Move artifacts
Expand All @@ -120,7 +147,7 @@ jobs:
at: /
- run:
name: Solid sphere test
command: ctest --output-on-failure -R test_problems.cpu.sphere.diff
command: ctest --output-on-failure -R test_problems.cpu.sphere_legacy
no_output_timeout: 25m
- run:
name: Move artifacts
Expand All @@ -141,7 +168,7 @@ jobs:
at: /
- run:
name: Rotating star test
command: ctest --output-on-failure -R test_problems.cpu.rotating_star.diff
command: ctest --output-on-failure -R test_problems.cpu.rotating_star_legacy
no_output_timeout: 25m
- run:
name: Move artifacts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ newgit
cmake-build-*
cmake-cuda-*
.spack-env/*
.clangd/*
3 changes: 3 additions & 0 deletions .gitmodules
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
173 changes: 173 additions & 0 deletions .jenkins/lsu/Jenkinsfile
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\\"
}"
'''
}
}
}
}
}
}
38 changes: 38 additions & 0 deletions .jenkins/lsu/entry.sh
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
Loading

0 comments on commit e8c225c

Please sign in to comment.