-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add development container #1267
Draft
upsj
wants to merge
16
commits into
develop
Choose a base branch
from
dev_container
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4dee840
add development container
upsj 26ac6d9
add prebuilt
upsj 440c21f
updates
upsj bb12491
wip
upsj 0dfa89b
simplify build cache reuse
upsj c196889
enable ensemble builds
upsj fe6d431
uniform distributed test folder structure
upsj ac02d86
test running unified build
upsj 516b502
add entrypoint again
upsj 98f08cd
make nvcc visible
upsj 95aff08
add build script that handles tagging
upsj 447bcb4
explicitly pass OpenMP flags
upsj 00db9d2
fix Kokkos build
upsj 5f2dfc0
disable OpenCV examples
upsj e70a771
debug list sycl devices
upsj 4c6f28b
fix Intel test execution
upsj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -100,3 +100,8 @@ | |
tags: | ||
- private_ci | ||
- intel-dgpu | ||
|
||
.use_gko-unified: | ||
image: ginkgodev/unified:latest | ||
tags: | ||
- unified |
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,78 @@ | ||
FROM ubuntu:22.04 | ||
|
||
# install spack prerequisites and basics | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
ca-certificates \ | ||
coreutils \ | ||
curl \ | ||
environment-modules \ | ||
gfortran \ | ||
git \ | ||
lsb-release \ | ||
python3 \ | ||
python3-distutils \ | ||
python3-venv \ | ||
unzip \ | ||
zip \ | ||
vim-nox \ | ||
wget \ | ||
pkg-config \ | ||
ninja-build \ | ||
# for ginkgo | ||
libopencv-dev \ | ||
# for rocm | ||
gnupg2 \ | ||
gawk \ | ||
# for spack | ||
perl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN (echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" > /etc/apt/sources.list.d/llvm15.list) && \ | ||
(curl https://apt.llvm.org/llvm-snapshot.gpg.key > /etc/apt/trusted.gpg.d/apt.llvm.org.asc) && apt-get update && \ | ||
apt-get install -y libllvm-15-ocaml-dev libllvm15 llvm-15 llvm-15-dev llvm-15-doc llvm-15-examples llvm-15-runtime \ | ||
clang-15 clang-tools-15 clang-15-doc libclang-common-15-dev libclang-15-dev libclang1-15 clang-format-15 python3-clang-15 \ | ||
clangd-15 clang-tidy-15 lldb-15 lld-15 libc++-15-dev libc++abi-15-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && \ | ||
wget https://repo.radeon.com/amdgpu-install/5.5/ubuntu/jammy/amdgpu-install_5.5.50500-1_all.deb && \ | ||
apt-get install -y --no-install-recommends ./amdgpu-install_5.5.50500-1_all.deb && \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
rocm-dev hipblas-dev hipfft-dev hipsparse-dev rocfft-dev rocrand-dev rocsolver-dev rocthrust-dev roctracer-dev && \ | ||
rm ./amdgpu-install_5.5.50500-1_all.deb && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN (echo "deb https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneapi.list) && \ | ||
(curl https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | ||
> /etc/apt/trusted.gpg.d/apt.repos.intel.com.asc) && apt-get update && \ | ||
apt-get install -y \ | ||
intel-oneapi-ccl-devel \ | ||
intel-oneapi-common-licensing \ | ||
intel-oneapi-common-vars \ | ||
intel-oneapi-compiler-dpcpp-cpp \ | ||
intel-oneapi-dev-utilities \ | ||
intel-oneapi-dpcpp-ct \ | ||
intel-oneapi-dpcpp-debugger \ | ||
intel-oneapi-ipp-devel \ | ||
intel-oneapi-libdpstd-devel \ | ||
intel-oneapi-mkl-devel \ | ||
intel-oneapi-tbb-devel \ | ||
intel-oneapi-vtune \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN cd /usr/ && wget -O cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.tar.gz && \ | ||
tar xzf cmake.tar.gz --strip-components 1 && rm cmake.tar.gz | ||
|
||
RUN cd /tmp && wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13822.6/intel-igc-core_1.0.13822.6_amd64.deb && \ | ||
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13822.6/intel-igc-opencl_1.0.13822.6_amd64.deb && \ | ||
wget https://github.com/intel/compute-runtime/releases/download/23.17.26241.22/intel-level-zero-gpu-dbgsym_1.3.26241.22_amd64.ddeb && \ | ||
wget https://github.com/intel/compute-runtime/releases/download/23.17.26241.22/intel-level-zero-gpu_1.3.26241.22_amd64.deb && \ | ||
wget https://github.com/intel/compute-runtime/releases/download/23.17.26241.22/intel-opencl-icd-dbgsym_23.17.26241.22_amd64.ddeb && \ | ||
wget https://github.com/intel/compute-runtime/releases/download/23.17.26241.22/intel-opencl-icd_23.17.26241.22_amd64.deb && \ | ||
wget https://github.com/intel/compute-runtime/releases/download/23.17.26241.22/libigdgmm12_22.3.0_amd64.deb && \ | ||
dpkg -i *.deb *.ddeb && rm *.deb *.ddeb | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
WORKDIR / |
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,32 @@ | ||
FROM ginkgodev/unified:latest | ||
|
||
SHELL ["/root/entrypoint.sh", "-c"] | ||
|
||
RUN git clone https://github.com/ginkgo-project/ginkgo && cd ginkgo && mkdir build && cd build && \ | ||
cmake .. \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_LINK_DEPENDS_NO_SHARED=ON \ | ||
-DCMAKE_CXX_COMPILER=g++ \ | ||
-DCMAKE_C_COMPILER=gcc \ | ||
-DCMAKE_CUDA_COMPILER=`spack location -i cuda`/bin/nvcc \ | ||
#-DCMAKE_CXX_FLAGS= \ | ||
#-DCMAKE_C_FLAGS= \ | ||
#-DCMAKE_CUDA_FLAGS= \ | ||
-DGINKGO_HIP_AMDGPU=gfx906 \ | ||
-DCMAKE_CUDA_ARCHITECTURES=OFF \ | ||
-DGINKGO_CUDA_ARCHITECTURES='61;70' \ | ||
-DGINKGO_BUILD_OMP=ON \ | ||
-DGINKGO_BUILD_CUDA=ON \ | ||
-DGINKGO_BUILD_HIP=ON \ | ||
-DGINKGO_BUILD_MPI=ON \ | ||
-DGINKGO_BUILD_TESTS=ON \ | ||
-DGINKGO_BUILD_EXAMPLES=ON \ | ||
-DGINKGO_BUILD_BENCHMARKS=ON \ | ||
-DGINKGO_MIXED_PRECISION=ON \ | ||
-DGINKGO_DEVEL_TOOLS=ON \ | ||
-DGINKGO_WITH_CCACHE=ON \ | ||
-GNinja | ||
|
||
RUN cd ginkgo/build && ninja install | ||
|
||
WORKDIR /root/ginkgo |
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,32 @@ | ||
FROM ginkgodev/base:latest | ||
|
||
RUN git clone --depth=1 -c feature.manyFiles=true https://github.com/spack/spack.git /spack | ||
|
||
RUN /spack/bin/spack compiler find && \ | ||
/spack/bin/spack external find --not-buildable opencv openssh perl llvm cmake ninja && \ | ||
/spack/bin/spack env create ginkgo && \ | ||
/spack/bin/spack bootstrap now && \ | ||
/spack/bin/spack gpg create buildcache build@cache | ||
|
||
COPY spack.yaml /spack/var/spack/environments/ginkgo/spack.yaml | ||
COPY packages.yaml /spack/etc/spack/packages.yaml | ||
COPY entrypoint.sh /usr/bin/ | ||
|
||
ENV CMAKE_GENERATOR=Ninja CMAKE_EXPORT_COMPILE_COMMANDS=ON | ||
ENV OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | ||
|
||
RUN --mount=type=cache,target=/cache \ | ||
. /spack/share/spack/setup-env.sh && \ | ||
if [ -d "/cache/build_cache" ]; then \ | ||
echo Reusing buildcache && \ | ||
spack mirror add buildcache /cache && \ | ||
spack buildcache keys --install --trust; \ | ||
fi && \ | ||
spack env activate ginkgo && \ | ||
spack install --use-cache --reuse && \ | ||
spack buildcache create -a /cache | ||
|
||
# remove the generated key to prevent malicious package injection | ||
RUN rm -rf /spack/opt/spack/gpg | ||
|
||
ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
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,2 @@ | ||
#!/bin/bash | ||
docker build -t ginkgodev/unified $(dirname -- $0) |
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,5 @@ | ||
#!/bin/bash | ||
. /spack/share/spack/setup-env.sh | ||
spack env activate ginkgo | ||
export CC=gcc CXX=g++ CUDACXX=`spack location -i cuda`/bin/nvcc PATH=$PATH:`spack location -i cuda`/bin | ||
exec "$@" |
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,63 @@ | ||
packages: | ||
all: | ||
target: ['x86_64'] | ||
hip: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/rocm-5.5.0 | ||
buildable: false | ||
hipblas: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/rocm-5.5.0 | ||
buildable: false | ||
hipsparse: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/rocm-5.5.0 | ||
buildable: false | ||
hipfft: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/rocm-5.5.0 | ||
buildable: false | ||
rocrand: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/rocm-5.5.0 | ||
buildable: false | ||
rocthrust: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/rocm-5.5.0 | ||
buildable: false | ||
intel-oneapi-compilers: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/intel/oneapi | ||
buildable: false | ||
intel-oneapi-mkl: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/intel/oneapi | ||
buildable: false | ||
intel-oneapi-vtune: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/intel/oneapi | ||
buildable: false | ||
intel-oneapi-tbb: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/intel/oneapi | ||
buildable: false | ||
intel-oneapi-dpl: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/intel/oneapi | ||
buildable: false | ||
intel-oneapi-dpct: | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/intel/oneapi | ||
buildable: false |
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,61 @@ | ||
spack: | ||
specs: | ||
# ginkgo | ||
- cmake | ||
- ninja | ||
- googletest +gmock cxxstd=14 | ||
- rapidjson | ||
- gflags | ||
# ginkgo examples and features | ||
- papi +sde | ||
- perfstubs | ||
- tau | ||
- kokkos | ||
- "hwloc @2.0:" | ||
- benchmark | ||
- opencv +videoio | ||
- python | ||
# ginkgo_mpi | ||
- "openmpi @4.1: +cuda" | ||
# development environment | ||
- valgrind | ||
- gdb +source-highlight +tui +python | ||
- git | ||
- ccache | ||
- llvm | ||
# ginkgo_cuda | ||
- cuda | ||
# ginkgo_hip | ||
- hip | ||
- hipsparse | ||
- hipblas | ||
- hipfft | ||
- rocrand | ||
- rocthrust | ||
# ginkgo_dpcpp | ||
- intel-oneapi-compilers | ||
- intel-oneapi-mkl | ||
- intel-oneapi-vtune | ||
- intel-oneapi-tbb | ||
- intel-oneapi-dpl | ||
- intel-oneapi-dpct | ||
# build dependencies of the above packages, | ||
# which would otherwise be missing from the cache | ||
- pkgconf | ||
- libsigsegv | ||
- util-macros | ||
- diffutils | ||
- m4 | ||
- libtool | ||
- bison | ||
- autoconf | ||
- automake | ||
- texinfo | ||
view: | ||
default: | ||
root: /spack/env/ | ||
# we need to exclude CUDA from the view, | ||
# since it contains Thrust, which conflicts with rocThrust | ||
exclude: ["cuda"] | ||
concretizer: | ||
unify: true |
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
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
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
add_subdirectory(distributed) | ||
add_subdirectory(solver) |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
ginkgo_create_common_and_reference_test(matrix MPI_SIZE 3) | ||
ginkgo_create_common_and_reference_test(vector MPI_SIZE 3) | ||
ginkgo_create_common_and_reference_test(matrix MPI_SIZE 3 DISABLE_EXECUTORS dpcpp) | ||
ginkgo_create_common_and_reference_test(vector MPI_SIZE 3 DISABLE_EXECUTORS dpcpp) | ||
|
||
add_subdirectory(preconditioner) | ||
add_subdirectory(solver) |
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 |
---|---|---|
@@ -1 +1 @@ | ||
ginkgo_create_common_and_reference_test(schwarz MPI_SIZE 3) | ||
ginkgo_create_common_and_reference_test(schwarz MPI_SIZE 3 DISABLE_EXECUTORS dpcpp) |
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 @@ | ||
ginkgo_create_common_and_reference_test(solver MPI_SIZE 3 DISABLE_EXECUTORS dpcpp) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should then require Kokkos >= 3.7