Skip to content

Commit e8c225c

Browse files
authored
Merge pull request #365 from STEllAR-GROUP/develop
Add new hydro / kokkos kernels
2 parents 1158ec8 + 42720b8 commit e8c225c

File tree

164 files changed

+16110
-5713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+16110
-5713
lines changed

.circleci/config.yml

+31-4
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,55 @@ jobs:
2424
steps:
2525
- checkout:
2626
path: /octotiger
27+
- run:
28+
name: Get reference data submodule
29+
command: cd /octotiger && git submodule update --init --recursive && cd ..
30+
- run:
31+
name: Checkout CPPuddle
32+
command: git clone https://github.com/G-071/hpx-kokkos-interopt-WIP.git cppuddle
33+
- run:
34+
name: Create CPPuddle installation directory
35+
command: mkdir cppuddle-install
36+
- run:
37+
name: Configure CPPuddle
38+
command: cmake -Hcppuddle -Bcppuddle/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cppuddle-install
39+
- run:
40+
name: Build CPPuddle
41+
command: cmake --build cppuddle/build -- -j 2 VERBOSE=1
42+
- run:
43+
name: Install CPPuddle
44+
command: cmake --build cppuddle/build --target install
2745
- run:
2846
name: Configure Octo-Tiger
2947
command: |
3048
cmake -H/octotiger -B/octotiger/build \
3149
-DCMAKE_BUILD_TYPE=Release \
3250
-DHPX_DIR=/local/hpx/lib/cmake/HPX \
3351
-DVc_DIR=/local/vc/lib/cmake/Vc \
52+
-DCPPuddle_DIR=/root/project/cppuddle-install/lib/cmake/CPPuddle \
3453
-DSilo_DIR=/local/silo \
3554
-DHDF5_ROOT=/local/hdf5 \
3655
-DBOOST_ROOT=/local/boost \
56+
-DOCTOTIGER_WITH_Vc=OFF \
3757
-DOCTOTIGER_WITH_DOCU=ON \
3858
-GNinja
3959
- run:
4060
name: Build
4161
command: cmake --build /octotiger/build -- -j2
62+
- run:
63+
name: Install CPPuddle lib to persistent octotiger directory
64+
command: |
65+
cp cppuddle-install/lib/libbuffer_manager.so /octotiger/build/libbuffer_manager.so
66+
cp cppuddle-install/lib/libstream_manager.so /octotiger/build/libstream_manager.so
4267
- run:
4368
name: Documentation
4469
command: make -C /octotiger/build doc
4570
- persist_to_workspace:
4671
root: /
4772
paths:
4873
- octotiger/build
74+
- cppuddle/build
75+
- cppuddle-install
4976

5077
test_marshak:
5178
<<: *docker_config
@@ -78,7 +105,7 @@ jobs:
78105
at: /
79106
- run:
80107
name: Blast test
81-
command: ctest --output-on-failure -R test_problems.cpu.blast.diff
108+
command: ctest --output-on-failure -R test_problems.cpu.blast_legacy
82109
no_output_timeout: 200m
83110
- run:
84111
name: Move artifacts
@@ -99,7 +126,7 @@ jobs:
99126
at: /
100127
- run:
101128
name: Sod shock tube test
102-
command: ctest --output-on-failure -R test_problems.cpu.sod.diff
129+
command: ctest --output-on-failure -R test_problems.cpu.sod_legacy
103130
no_output_timeout: 25m
104131
- run:
105132
name: Move artifacts
@@ -120,7 +147,7 @@ jobs:
120147
at: /
121148
- run:
122149
name: Solid sphere test
123-
command: ctest --output-on-failure -R test_problems.cpu.sphere.diff
150+
command: ctest --output-on-failure -R test_problems.cpu.sphere_legacy
124151
no_output_timeout: 25m
125152
- run:
126153
name: Move artifacts
@@ -141,7 +168,7 @@ jobs:
141168
at: /
142169
- run:
143170
name: Rotating star test
144-
command: ctest --output-on-failure -R test_problems.cpu.rotating_star.diff
171+
command: ctest --output-on-failure -R test_problems.cpu.rotating_star_legacy
145172
no_output_timeout: 25m
146173
- run:
147174
name: Move artifacts

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ newgit
44
cmake-build-*
55
cmake-cuda-*
66
.spack-env/*
7+
.clangd/*

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "octotiger-testdata"]
2+
path = octotiger-testdata
3+
url = https://github.com/G-071/octotiger-testdata.git

.jenkins/lsu/Jenkinsfile

+173
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
#!groovy
2+
3+
void setBuildStatus(String message, String state) {
4+
step([
5+
$class: "GitHubCommitStatusSetter",
6+
reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/STEllAR-GROUP/octotiger"],
7+
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/build-status"],
8+
errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]],
9+
statusResultSource: [ $class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]] ]
10+
]);
11+
}
12+
13+
pipeline {
14+
agent any
15+
16+
options {
17+
buildDiscarder(
18+
logRotator(
19+
daysToKeepStr: "21",
20+
numToKeepStr: "50",
21+
artifactDaysToKeepStr: "21",
22+
artifactNumToKeepStr: "50"
23+
)
24+
)
25+
}
26+
environment {
27+
GITHUB_TOKEN = credentials('GITHUB_TOKEN_OCTOTIGER')
28+
}
29+
stages {
30+
stage('checkout') {
31+
steps {
32+
dir('octotiger') {
33+
checkout scm
34+
echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}"
35+
}
36+
}
37+
}
38+
stage('build') {
39+
matrix {
40+
axes {
41+
axis {
42+
name 'compiler_config'
43+
values 'with-CC', 'with-CC-clang'
44+
}
45+
axis {
46+
name 'cuda_config'
47+
values 'with-cuda', 'without-cuda'
48+
}
49+
axis {
50+
name 'kokkos_config'
51+
values 'with-kokkos', 'without-kokkos'
52+
}
53+
axis {
54+
name 'build_type'
55+
values 'Release'
56+
}
57+
}
58+
stages {
59+
stage('init') {
60+
steps {
61+
dir('octotiger') {
62+
sh '''
63+
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
64+
curl --verbose\
65+
--request POST \
66+
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \
67+
--header "Content-Type: application/json" \
68+
--header "authorization: Bearer ${github_token}" \
69+
--data "{
70+
\\"state\\": \\"pending\\",
71+
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\",
72+
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\",
73+
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\"
74+
}"
75+
'''
76+
}
77+
}
78+
}
79+
stage('checkout_buildscripts') {
80+
steps {
81+
dir('octotiger') {
82+
sh '''
83+
#!/bin/bash -l
84+
cd ..
85+
#rm -rf octo-buildscripts/src/octotiger
86+
#rm -rf "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" #remove line for dependency caching
87+
if [[ -d "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}" ]]
88+
then
89+
cd "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}"
90+
git reset --hard # reset griddim modification in case of unclean directory
91+
git pull
92+
rm -rf build/octotiger
93+
rm -rf src/octotiger
94+
else
95+
git clone https://github.com/diehlpk/PowerTiger.git "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}"
96+
cd "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}"
97+
git checkout clang_build
98+
mkdir src
99+
fi
100+
101+
cd ..
102+
pwd
103+
cp -r octotiger "octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}/src/octotiger"
104+
'''
105+
}
106+
}
107+
}
108+
stage('build') {
109+
steps {
110+
dir('octotiger') {
111+
sh '''
112+
#!/bin/bash -l
113+
cd "../octo-buildscripts-${compiler_config}-${cuda_config}-${kokkos_config}"
114+
src/octotiger/.jenkins/lsu/entry.sh
115+
'''
116+
}
117+
}
118+
}
119+
}
120+
post {
121+
success {
122+
sh '''
123+
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
124+
curl --verbose\
125+
--request POST \
126+
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \
127+
--header "Content-Type: application/json" \
128+
--header "authorization: Bearer ${github_token}" \
129+
--data "{
130+
\\"state\\": \\"success\\",
131+
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\",
132+
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\",
133+
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\"
134+
}"
135+
'''
136+
}
137+
failure {
138+
sh '''
139+
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
140+
curl --verbose\
141+
--request POST \
142+
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \
143+
--header "Content-Type: application/json" \
144+
--header "authorization: Bearer ${github_token}" \
145+
--data "{
146+
\\"state\\": \\"failure\\",
147+
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\",
148+
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\",
149+
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\"
150+
}"
151+
'''
152+
}
153+
aborted {
154+
sh '''
155+
github_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':')
156+
curl --verbose\
157+
--request POST \
158+
--url "https://api.github.com/repos/STEllAR-GROUP/octotiger/statuses/$GIT_COMMIT" \
159+
--header "Content-Type: application/json" \
160+
--header "authorization: Bearer ${github_token}" \
161+
--data "{
162+
\\"state\\": \\"error\\",
163+
\\"context\\": \\"jenkins-${compiler_config}-${cuda_config}-${kokkos_config}\\",
164+
\\"description\\": \\"Jenkins CI Job: ${compiler_config}-${cuda_config}-${kokkos_config}\\",
165+
\\"target_url\\": \\"https://rostam.cct.lsu.edu/jenkins/job/Octo-Tiger/$BUILD_NUMBER/console\\"
166+
}"
167+
'''
168+
}
169+
}
170+
}
171+
}
172+
}
173+
}

.jenkins/lsu/entry.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash -l
2+
3+
set -eux
4+
5+
#default: Assume gcc
6+
compiler_module="gcc/9.3.0"
7+
8+
# if clang: change modules and no blast test (no quadmath..)
9+
if [ "${compiler_config}" = "with-CC-clang" ]; then
10+
compiler_module="clang/11.0.1"
11+
sed -i 's/OCTOTIGER_WITH_BLAST_TEST=ON/OCTOTIGER_WITH_BLAST_TEST=OFF/' build-octotiger.sh
12+
fi
13+
14+
# Load everything
15+
echo "Loading modules: "
16+
module load "${compiler_module}" cuda/11.0 hwloc
17+
18+
# Tests with griddim = 8
19+
if [ "${kokkos_config}" = "with-kokkos" ]; then
20+
echo "Running tests with griddim=8 on diablo"
21+
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 "
22+
23+
# Tests with griddim = 16 - only test in full kokkos + cuda build
24+
if [ "${cuda_config}" = "with-cuda" ]; then
25+
sed -i 's/GRIDDIM=8/GRIDDIM=16/' build-octotiger.sh
26+
echo "Running tests with griddim=16 on diablo"
27+
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 "
28+
sed -i 's/GRIDDIM=16/GRIDDIM=8/' build-octotiger.sh
29+
fi
30+
else
31+
echo "Running tests with griddim=8 on diablo"
32+
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 "
33+
fi
34+
35+
# Reset buildscripts (in case of failure, the next job will reset it in the checkout step)
36+
if [ "${compiler_config}" = "with-CC-clang" ]; then
37+
sed -i 's/OCTOTIGER_WITH_BLAST_TEST=OFF/OCTOTIGER_WITH_BLAST_TEST=ON/' build-octotiger.sh
38+
fi

0 commit comments

Comments
 (0)