Skip to content

Commit 99001ee

Browse files
authored
Merge pull request #738 from kwitaechong/kokkos_min4.1
Update kokkos min to 4.1
2 parents 9cc3824 + 22feee5 commit 99001ee

File tree

8 files changed

+69
-71
lines changed

8 files changed

+69
-71
lines changed

.github/workflows/CI.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cxx: ['g++', 'clang++']
2828
backend: ['OPENMP', 'SERIAL']
2929
cmake_build_type: ['Debug', 'Release']
30-
kokkos_ver: ['3.7.02']
30+
kokkos_ver: ['4.1.00']
3131
bounds_check: ['OFF']
3232
arborx: ['OFF']
3333
heffte: ['OFF' ]
@@ -42,7 +42,7 @@ jobs:
4242
cxx: 'g++'
4343
backend: 'THREADS'
4444
cmake_build_type: 'Debug'
45-
kokkos_ver: '3.7.02'
45+
kokkos_ver: '4.1.00'
4646
arborx: 'OFF'
4747
heffte: 'OFF'
4848
hypre: 'OFF'
@@ -52,7 +52,7 @@ jobs:
5252
cxx: 'icpx'
5353
backend: 'OPENMP'
5454
cmake_build_type: 'Release'
55-
kokkos_ver: '3.7.02'
55+
kokkos_ver: '4.1.00'
5656
arborx: 'OFF'
5757
heffte: 'OFF'
5858
hypre: 'OFF'
@@ -61,7 +61,7 @@ jobs:
6161
cxx: 'icpx'
6262
backend: 'OPENMP'
6363
cmake_build_type: 'Debug'
64-
kokkos_ver: '3.7.02'
64+
kokkos_ver: '4.1.00'
6565
arborx: 'OFF'
6666
heffte: 'OFF'
6767
hypre: 'OFF'
@@ -70,7 +70,7 @@ jobs:
7070
cxx: 'icpx'
7171
backend: 'SERIAL'
7272
cmake_build_type: 'Release'
73-
kokkos_ver: '3.7.02'
73+
kokkos_ver: '4.1.00'
7474
arborx: 'OFF'
7575
heffte: 'OFF'
7676
hypre: 'OFF'
@@ -79,7 +79,7 @@ jobs:
7979
cxx: 'icpx'
8080
backend: 'SERIAL'
8181
cmake_build_type: 'Debug'
82-
kokkos_ver: '3.7.02'
82+
kokkos_ver: '4.1.00'
8383
arborx: 'OFF'
8484
heffte: 'OFF'
8585
hypre: 'OFF'
@@ -88,7 +88,7 @@ jobs:
8888
cxx: 'icpx'
8989
backend: 'SERIAL'
9090
cmake_build_type: 'Debug'
91-
kokkos_ver: '3.7.02'
91+
kokkos_ver: '4.1.00'
9292
arborx: 'OFF'
9393
heffte: 'MKL'
9494
hypre: 'OFF'
@@ -98,7 +98,7 @@ jobs:
9898
cxx: 'g++'
9999
backend: 'OPENMP'
100100
cmake_build_type: 'Release'
101-
kokkos_ver: '4.0.00'
101+
kokkos_ver: '4.1.00'
102102
arborx: 'OFF'
103103
heffte: 'OFF'
104104
hypre: 'OFF'
@@ -109,7 +109,7 @@ jobs:
109109
cxx: 'clang++'
110110
backend: 'OPENMP'
111111
cmake_build_type: 'Release'
112-
kokkos_ver: '4.0.00'
112+
kokkos_ver: '4.1.00'
113113
arborx: 'OFF'
114114
heffte: 'OFF'
115115
hypre: 'OFF'
@@ -118,7 +118,7 @@ jobs:
118118
cxx: 'g++'
119119
cmake_build_type: 'Release'
120120
backend: 'OPENMP'
121-
kokkos_ver: '4.0.00'
121+
kokkos_ver: '4.1.00'
122122
arborx: 'OFF'
123123
heffte: 'OFF'
124124
hypre: 'OFF'
@@ -127,7 +127,7 @@ jobs:
127127
cxx: 'clang++'
128128
backend: 'OPENMP'
129129
cmake_build_type: 'Release'
130-
kokkos_ver: '4.0.00'
130+
kokkos_ver: '4.1.00'
131131
arborx: 'OFF'
132132
heffte: 'OFF'
133133
hypre: 'OFF'
@@ -137,7 +137,7 @@ jobs:
137137
cxx: 'g++'
138138
cmake_build_type: 'Release'
139139
backend: 'OPENMP'
140-
kokkos_ver: '3.7.02'
140+
kokkos_ver: '4.1.00'
141141
arborx: 'OFF'
142142
heffte: 'OFF'
143143
hypre: 'OFF'
@@ -146,7 +146,7 @@ jobs:
146146
cxx: 'clang++'
147147
backend: 'OPENMP'
148148
cmake_build_type: 'Release'
149-
kokkos_ver: '3.7.02'
149+
kokkos_ver: '4.1.00'
150150
arborx: 'OFF'
151151
heffte: 'OFF'
152152
hypre: 'OFF'
@@ -155,7 +155,7 @@ jobs:
155155
cxx: 'g++'
156156
backend: 'OPENMP'
157157
cmake_build_type: 'Debug'
158-
kokkos_ver: '4.0.00'
158+
kokkos_ver: '4.1.00'
159159
arborx: 'ArborX'
160160
heffte: 'OFF'
161161
hypre: 'OFF'
@@ -164,7 +164,7 @@ jobs:
164164
cxx: 'g++'
165165
backend: 'OPENMP'
166166
cmake_build_type: 'Release'
167-
kokkos_ver: '3.7.02'
167+
kokkos_ver: '4.1.00'
168168
arborx: 'ArborX'
169169
heffte: 'OFF'
170170
hypre: 'OFF'
@@ -173,7 +173,7 @@ jobs:
173173
cxx: 'g++'
174174
backend: 'OPENMP'
175175
cmake_build_type: 'Release'
176-
kokkos_ver: '3.7.02'
176+
kokkos_ver: '4.1.00'
177177
arborx: 'OFF'
178178
heffte: 'FFTW'
179179
hypre: 'OFF'
@@ -182,7 +182,7 @@ jobs:
182182
cxx: 'g++'
183183
backend: 'OPENMP'
184184
cmake_build_type: 'Release'
185-
kokkos_ver: '3.7.02'
185+
kokkos_ver: '4.1.00'
186186
arborx: 'OFF'
187187
heffte: 'OFF'
188188
hypre: 'OFF'
@@ -192,7 +192,7 @@ jobs:
192192
cxx: 'g++'
193193
backend: 'OPENMP'
194194
cmake_build_type: 'Debug'
195-
kokkos_ver: '3.7.02'
195+
kokkos_ver: '4.1.00'
196196
arborx: 'OFF'
197197
heffte: 'OFF'
198198
hypre: 'HYPRE'
@@ -201,7 +201,7 @@ jobs:
201201
cxx: 'g++'
202202
backend: 'OPENMP'
203203
cmake_build_type: 'Debug'
204-
kokkos_ver: '3.7.02'
204+
kokkos_ver: '4.1.00'
205205
arborx: 'OFF'
206206
heffte: 'OFF'
207207
hypre: 'OFF'
@@ -211,7 +211,7 @@ jobs:
211211
cxx: 'g++'
212212
backend: 'OPENMP'
213213
cmake_build_type: 'Debug'
214-
kokkos_ver: '3.7.02'
214+
kokkos_ver: '4.1.00'
215215
arborx: 'OFF'
216216
heffte: 'OFF'
217217
hypre: 'OFF'
@@ -221,7 +221,7 @@ jobs:
221221
cxx: 'g++'
222222
backend: 'OPENMP'
223223
cmake_build_type: 'Debug'
224-
kokkos_ver: '3.7.02'
224+
kokkos_ver: '4.1.00'
225225
arborx: 'ArborX'
226226
heffte: 'FFTW'
227227
hypre: 'HYPRE'
@@ -234,7 +234,7 @@ jobs:
234234
cxx: 'g++'
235235
backend: 'OPENMP'
236236
cmake_build_type: 'Debug'
237-
kokkos_ver: '3.7.02'
237+
kokkos_ver: '4.1.00'
238238
arborx: 'ArborX'
239239
heffte: 'FFTW'
240240
hypre: 'HYPRE'
@@ -568,7 +568,7 @@ jobs:
568568
matrix:
569569
cxx: ['nvcc']
570570
cmake_build_type: ['Release']
571-
kokkos_ver: ['3.7.02']
571+
kokkos_ver: ['4.1.00']
572572
runs-on: ubuntu-20.04
573573
container: ghcr.io/ecp-copa/ci-containers/cuda:12.2.0
574574
steps:

.jenkins

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ pipeline {
5656
}
5757
}
5858
}
59-
stage('ROCM-4.5-HIPCC-DEBUG') {
59+
stage('ROCM-5.2-HIPCC-DEBUG') {
6060
agent {
6161
dockerfile {
6262
filename 'Dockerfile.hipcc'
6363
dir 'docker'
64-
additionalBuildArgs '--build-arg BASE=rocm/dev-ubuntu-20.04:4.5-complete'
64+
additionalBuildArgs '--build-arg BASE=rocm/dev-ubuntu-20.04:5.2-complete'
6565
args '-v /tmp/ccache.kokkos:/tmp/ccache --device=/dev/kfd --device=/dev/dri --security-opt seccomp=unconfined --group-add video --env HIP_VISIBLE_DEVICES=$HIP_VISIBLE_DEVICES'
6666
label 'rocm-docker && vega && AMD_Radeon_Instinct_MI60'
6767
}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
3636
# Dependencies
3737
#------------------------------------------------------------------------------#
3838
# find kokkos
39-
find_package(Kokkos 3.7 REQUIRED)
39+
find_package(Kokkos 4.1 REQUIRED)
4040

4141
# set supported kokkos devices
4242
set(CABANA_SUPPORTED_DEVICES SERIAL THREADS OPENMP CUDA HIP SYCL OPENMPTARGET)

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN OPENMPI_VERSION=4.0.2 && \
6161
ENV PATH=${OPENMPI_DIR}/bin:$PATH
6262

6363
# Install Kokkos
64-
ARG KOKKOS_VERSION=3.7.02
64+
ARG KOKKOS_VERSION=4.1.00
6565
ENV KOKKOS_DIR=/opt/kokkos
6666
RUN KOKKOS_URL=https://github.com/kokkos/kokkos/archive/${KOKKOS_VERSION}.tar.gz && \
6767
KOKKOS_ARCHIVE=kokkos-${KOKKOS_VERSION}.tar.gz && \
@@ -84,7 +84,7 @@ RUN KOKKOS_URL=https://github.com/kokkos/kokkos/archive/${KOKKOS_VERSION}.tar.gz
8484

8585
# Install ArborX
8686
ENV ARBORX_DIR=/opt/arborx
87-
RUN ARBORX_VERSION=4834bff44c23c9510c6ed93366638dcdf85ab217 && \
87+
RUN ARBORX_VERSION=v1.4 && \
8888
ARBORX_URL=https://github.com/arborx/ArborX/archive/${ARBORX_VERSION}.tar.gz && \
8989
ARBORX_ARCHIVE=arborx.tar.gz && \
9090
wget --quiet ${ARBORX_URL} --output-document=${ARBORX_ARCHIVE} && \

docker/Dockerfile.hipcc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use -complete to get both rocm and rocfft
2-
ARG BASE=rocm/dev-ubuntu-20.04:4.5-complete
2+
ARG BASE=rocm/dev-ubuntu-20.04:5.2-complete
33
FROM $BASE
44

55
ARG NPROCS=4
@@ -71,7 +71,7 @@ RUN OPENMPI_VERSION=4.0.4 && \
7171
ENV PATH=${OPENMPI_DIR}/bin:$PATH
7272

7373
# Install Kokkos
74-
ARG KOKKOS_VERSION=3.7.02
74+
ARG KOKKOS_VERSION=4.1.00
7575
ARG KOKKOS_OPTIONS="-DKokkos_ENABLE_HIP=ON -DKokkos_ENABLE_LIBDL=OFF -DKokkos_ARCH_VEGA906=ON"
7676
ENV KOKKOS_DIR=/opt/kokkos
7777
RUN KOKKOS_URL=https://github.com/kokkos/kokkos/archive/${KOKKOS_VERSION}.tar.gz && \
@@ -88,7 +88,7 @@ RUN KOKKOS_URL=https://github.com/kokkos/kokkos/archive/${KOKKOS_VERSION}.tar.gz
8888

8989
# Install ArborX
9090
ENV ARBORX_DIR=/opt/arborx
91-
RUN ARBORX_VERSION=4834bff44c23c9510c6ed93366638dcdf85ab217 && \
91+
RUN ARBORX_VERSION=v1.4 && \
9292
ARBORX_URL=https://github.com/arborx/ArborX/archive/${ARBORX_VERSION}.tar.gz && \
9393
ARBORX_ARCHIVE=arborx.tar.gz && \
9494
wget --quiet ${ARBORX_URL} --output-document=${ARBORX_ARCHIVE} && \
@@ -100,7 +100,6 @@ RUN ARBORX_VERSION=4834bff44c23c9510c6ed93366638dcdf85ab217 && \
100100
-D CMAKE_INSTALL_PREFIX=${ARBORX_DIR} \
101101
-D CMAKE_BUILD_TYPE=Debug \
102102
-D CMAKE_CXX_COMPILER=hipcc \
103-
-D CMAKE_CXX_FLAGS=-amdgpu-target=gfx906 \
104103
-D CMAKE_CXX_EXTENSIONS=OFF \
105104
-D CMAKE_PREFIX_PATH=${KOKKOS_DIR} \
106105
.. && \

docker/Dockerfile.sycl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RUN wget https://cloud.cees.ornl.gov/download/oneapi-for-nvidia-gpus-${DPCPP_VER
6565
rm oneapi-for-nvidia-gpus-${DPCPP_VERSION}-linux.sh
6666

6767
# Install Kokkos
68-
ARG KOKKOS_VERSION=3.7.02
68+
ARG KOKKOS_VERSION=4.1.00
6969
ARG KOKKOS_OPTIONS="-DKokkos_ENABLE_SYCL=ON -DCMAKE_CXX_FLAGS=-Wno-unknown-cuda-version -DKokkos_ENABLE_UNSUPPORTED_ARCHS=ON -DKokkos_ARCH_VOLTA70=ON -DCMAKE_CXX_STANDARD=17"
7070
ENV KOKKOS_DIR=/opt/kokkos
7171
RUN . /opt/intel/oneapi/setvars.sh --include-intel-llvm && \

example/core_tutorial/04_aosoa_advanced_unmanaged/advanced_aosoa_unmanaged.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,31 +109,32 @@ void unmanagedAoAoAExample()
109109
if ( slice_b( i ) != ( i % VectorLength ) )
110110
{
111111
// Unexpected Value
112-
printf( "%d: Unexpected %d != %d \n", __LINE__, slice_b( i ),
113-
i % VectorLength );
112+
std::cout << "Error: " << slice_b( i ) << " != " << i % VectorLength
113+
<< std::endl;
114114
}
115115
}
116116

117117
/*
118-
* Use the view in an algorithm, like sort
118+
* Use the view in an algorithm, like binning
119119
*/
120-
auto binning_data = Cabana::sortByKey( slice_b );
120+
auto binning_data = Cabana::binByKey( slice_b, 64 );
121121
Cabana::permute( binning_data, aosoa );
122122

123123
// Check it worked
124-
for ( int i = 1; i < num_tuple; i++ )
124+
for ( int i = 1; i < num_tuple; i += 2 )
125125
{
126126
// We expect it to be monotonically increasing
127127
if ( !( slice_b( i - 1 ) <= slice_b( i ) ) )
128128
{
129129
// Unexpected value
130-
printf( "%d: Unexpected %d vs %d \n", __LINE__, slice_b( i - 1 ),
131-
slice_b( i ) );
130+
std::cout << "Error: " << slice_b( i - 1 ) << " > " << slice_b( i )
131+
<< std::endl;
132132
}
133133

134134
// We can also set values
135135
slice_a( i, 0 ) = i / 2;
136136
}
137+
std::cout << "Successful Cabana binning on unmanaged AoSoA." << std::endl;
137138

138139
// Clean up local data
139140
delete[] local_data;

0 commit comments

Comments
 (0)