Skip to content

Commit

Permalink
Merge pull request dealii#17474 from masterleinad/remove_cudawrappers
Browse files Browse the repository at this point in the history
Remove CUDAWrappers, related documentation and macros
  • Loading branch information
Rombur authored Aug 16, 2024
2 parents 71cca2f + f549fc6 commit 1223e67
Show file tree
Hide file tree
Showing 130 changed files with 60 additions and 10,389 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ jobs:
-D CMAKE_CXX_COMPILER=${GITHUB_WORKSPACE}/kokkos/bin/nvcc_wrapper \
-D DEAL_II_CXX_FLAGS='-Werror -Wno-non-template-friend' \
-D DEAL_II_EARLY_DEPRECATIONS=ON \
-D DEAL_II_WITH_CUDA="ON" \
-D DEAL_II_WITH_KOKKOS="ON" \
-D KOKKOS_DIR=${GITHUB_WORKSPACE}/../kokkos-install \
-D DEAL_II_WITH_MPI="ON" \
Expand All @@ -386,10 +385,8 @@ jobs:
- name: build CUDA tests
run: |
cd build
make -j2 setup_tests_cuda setup_tests_matrix_free_kokkos
cd tests/cuda
make -j2 compile_test_executables
cd ../matrix_free_kokkos
make -j2 setup_tests_matrix_free_kokkos
cd tests/matrix_free_kokkos
make -j2 compile_test_executables
#############################
Expand Down Expand Up @@ -463,7 +460,6 @@ jobs:
-D DEAL_II_FORCE_BUNDLED_BOOST=ON \
-D DEAL_II_CXX_FLAGS="-std=c++17" \
-D DEAL_II_EARLY_DEPRECATIONS=ON \
-D DEAL_II_WITH_CUDA="ON" \
-D DEAL_II_WITH_KOKKOS="ON" \
-D KOKKOS_DIR=${GITHUB_WORKSPACE}/../kokkos-install \
-D DEAL_II_WITH_MPI="ON" \
Expand All @@ -484,8 +480,6 @@ jobs:
- name: build CUDA tests
run: |
cd build
make -j2 setup_tests_cuda setup_tests_matrix_free_kokkos
cd tests/cuda
make -j2 compile_test_executables
cd ../matrix_free_kokkos
make -j2 setup_tests_matrix_free_kokkos
cd tests/matrix_free_kokkos
make -j2 compile_test_executables
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ verbose_include(${CMAKE_SOURCE_DIR}/cmake/setup_cached_variables.cmake)
# Now, set the project and set up the rest:
#
project(deal.II CXX C)
enable_language_optional(Fortran)

verbose_include(${CMAKE_SOURCE_DIR}/cmake/setup_deal_ii.cmake)

Expand Down
10 changes: 0 additions & 10 deletions cmake/checks/check_01_cpu_features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,6 @@ if(DEAL_II_HAVE_ARM_NEON)
set(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128)
endif()

#
# We need to disable SIMD vectorization for CUDA device code.
# Otherwise, nvcc compilers from version 9 on will emit an error message like:
# "[...] contains a vector, which is not supported in device code"
#

if(DEAL_II_WITH_CUDA)
set(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 0)
endif()

#
# If we have OpenMP SIMD support (i.e. DEAL_II_HAVE_OPENMP_SIMD is true)
# populate DEAL_II_OPENMP_SIMD_PRAGMA.
Expand Down
7 changes: 1 addition & 6 deletions cmake/configure/configure_10_mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ macro(feature_mpi_configure_external)
# TODO: We might consider refactoring this option into an automatic check
# (in Modules/FindMPI.cmake) at some point. For the time being this is an
# advanced configuration option.
#
if(DEAL_II_MPI_WITH_CUDA_SUPPORT)
option(DEAL_II_MPI_WITH_DEVICE_SUPPORT "Enable MPI Device support" ON)
else()
option(DEAL_II_MPI_WITH_DEVICE_SUPPORT "Enable MPI Device support" OFF)
endif()
option(DEAL_II_MPI_WITH_DEVICE_SUPPORT "Enable MPI Device support" OFF)
mark_as_advanced(DEAL_II_MPI_WITH_DEVICE_SUPPORT)
endmacro()

Expand Down
126 changes: 0 additions & 126 deletions cmake/configure/configure_40_cuda.cmake

This file was deleted.

1 change: 0 additions & 1 deletion contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ RUN cd /usr/src && \
-DDEAL_II_WITH_BOOST=ON \
-DDEAL_II_WITH_CGAL=ON \
-DDEAL_II_WITH_COMPLEX_VALUES=ON \
-DDEAL_II_WITH_CUDA=OFF \
-DDEAL_II_WITH_GINKGO=OFF \
-DDEAL_II_WITH_GMSH=ON \
-DDEAL_II_WITH_GSL=ON \
Expand Down
21 changes: 0 additions & 21 deletions doc/doxygen/headers/cuda.h

This file was deleted.

2 changes: 1 addition & 1 deletion doc/doxygen/headers/glossary.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@
* <dt class="glossary">@anchor GlossDevice <b>Device</b></dt>
*
* <dd> We commonly refer to GPUs as "devices" in deal.II. The context is
* always related to Kokkos or CUDA that motivated using this term.
* always related to Kokkos that motivated using this term.
* Occasionally, we also call data corresponding to MemorySpace::Default "device data"
* (even though it is allocated in CPU memory if Kokkos was configured without
* a GPU backend) to distinguish between MemorySpace::Default and MemorySpace::Host.
Expand Down
1 change: 0 additions & 1 deletion doc/doxygen/headers/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
rank="same";
petsc [label="PETSc", URL="\ref PETScWrappers"];
trilinos [label="Trilinos", URL="\ref TrilinosWrappers"];
cuda [label="CUDA", URL="\ref CUDAWrappers"];
}
umfpack [label="UMFPACK"];
Expand Down
6 changes: 3 additions & 3 deletions doc/doxygen/headers/matrixfree.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ digraph G
color="gray", fontcolor="gray", fillcolor="white", style="filled"];
fevalues [label="FEEvaluation", fillcolor="deepskyblue"];
mf [label="MatrixFree loops", fillcolor="deepskyblue"];
cuda [label="CUDA", URL="\ref CUDAWrappers", fontname="FreeSans",fontsize=12,
portable [label="Portable", URL="\ref Portable", fontname="FreeSans",fontsize=12,
height=0.2,width=0.4,
color="gray", fontcolor="gray", fillcolor="white", style="filled"];
tbb [label="TBB", fontname="FreeSans",fontsize=12,
Expand All @@ -51,8 +51,8 @@ digraph G
{rank=same
simd -> fevalues [dir="none", color="transparent"];
fevalues -> mf [dir="none", color="transparent"];
mf -> cuda [dir="none", color="transparent"];
cuda -> tbb [dir="none", color="transparent"];
mf -> portable [dir="none", color="transparent"];
portable -> tbb [dir="none", color="transparent"];
}
subgraph sol {
rank="same";
Expand Down
1 change: 0 additions & 1 deletion doc/doxygen/options.dox.in
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ PREDEFINED = DOXYGEN=1 \
DEAL_II_CGAL_VERSION_GTE=1 \
DEAL_II_WITH_TASKFLOW=1 \
DEAL_II_WITH_COMPLEX_VALUES=1 \
DEAL_II_WITH_CUDA=1 \
DEAL_II_WITH_GINKGO=1 \
DEAL_II_WITH_GMSH=1 \
DEAL_II_GMSH_WITH_API=1 \
Expand Down
14 changes: 0 additions & 14 deletions doc/external-libs/cuda.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ <h1>Installing deal.II with CUDA</h1>
<p>
To compile and run CUDA code, you need to use an external Kokkos
installation that has been configured with CUDA support.

To enable deal.II's own CUDA backend, you will need your GPU to have compute
capability 6.0 or higher. Independently from the GPU itself, you also need a
version of CUDA between 10.2 and 11.8.
</p>

<p>
To configure deal.II's own CUDA backend use the following option:
<pre>

-DDEAL_II_WITH_CUDA=ON
</pre>
CUDA versions prior to 11.0 don't support C++17 or higher. You will have
to make sure that C++17 is disabled when using earlier versions.
</p>

<p>
Expand Down
4 changes: 4 additions & 0 deletions doc/news/changes/incompatibilities/20240811Arndt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Removed: All support for CUDAWrappers and CUDA-related macros have been removed.
GPU support is provided through Kokkos.
<br>
(Daniel Arndt, 2024/08/11)
1 change: 0 additions & 1 deletion doc/users/cmake_dealii.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ <h3>Feature configuration</h3>
DEAL_II_WITH_BOOST
DEAL_II_WITH_CGAL
DEAL_II_WITH_COMPLEX_VALUES
DEAL_II_WITH_CUDA
DEAL_II_WITH_GINKGO
DEAL_II_WITH_GMSH
DEAL_II_WITH_GSL
Expand Down
1 change: 0 additions & 1 deletion doc/users/cmake_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ <h2> <code>deal.IIConfig.cmake</code> </h2>
DEAL_II_WITH_ARPACK
DEAL_II_WITH_ASSIMP
DEAL_II_WITH_COMPLEX_VALUES
DEAL_II_WITH_CUDA
DEAL_II_WITH_GINKGO
DEAL_II_WITH_GMSH
DEAL_II_WITH_GSL
Expand Down
1 change: 0 additions & 1 deletion doc/users/config.sample
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
# set(DEAL_II_WITH_BOOST "ON" CACHE BOOL "")
# set(DEAL_II_WITH_CGAL "ON" CACHE BOOL "")
# set(DEAL_II_WITH_COMPLEX_VALUES "ON" CACHE BOOL "")
# set(DEAL_II_WITH_CUDA "ON" CACHE BOOL "")
# set(DEAL_II_WITH_GINKGO "ON" CACHE BOOL "")
# set(DEAL_II_WITH_GMSH "ON" CACHE BOOL "")
# set(DEAL_II_WITH_GSL "ON" CACHE BOOL "")
Expand Down
4 changes: 2 additions & 2 deletions examples/step-64/doc/intro.dox
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ The data movement in deal.II is done using LinearAlgebra::ReadWriteVector. These
vectors can be seen as buffers on the host that are used to either store data
received from the device or to send data to the device. There are two types of vectors
that can be used on the device:
- LinearAlgebra::CUDAWrappers::Vector, which is similar to the more common
Vector<Number>, and
- LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace>, that has a host
and device copy of the data, and
- LinearAlgebra::distributed::Vector<Number,
MemorySpace::Default>, which is a regular
LinearAlgebra::distributed::Vector where we have specified which memory
Expand Down
3 changes: 1 addition & 2 deletions examples/step-64/step-64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ namespace Step64
// Since all the operations in the `solve()` function are executed on the
// graphics card, it is necessary for the vectors used to store their values
// on the GPU as well. LinearAlgebra::distributed::Vector can be told which
// memory space to use. There is also LinearAlgebra::CUDAWrappers::Vector
// that always uses GPU memory storage but doesn't work with MPI. It might
// memory space to use. It might
// be worth noticing that the communication between different MPI processes
// can be improved if the MPI implementation is GPU-aware and the configure
// flag `DEAL_II_MPI_WITH_DEVICE_SUPPORT` is enabled. (The value of this
Expand Down
4 changes: 0 additions & 4 deletions include/deal.II/base/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#cmakedefine DEAL_II_FEATURE_BOOST_BUNDLED_CONFIGURED
#cmakedefine DEAL_II_WITH_CGAL
#cmakedefine DEAL_II_WITH_COMPLEX_VALUES
#cmakedefine DEAL_II_WITH_CUDA
#cmakedefine DEAL_II_WITH_GINKGO
#cmakedefine DEAL_II_WITH_GMSH
#cmakedefine DEAL_II_WITH_GSL
Expand Down Expand Up @@ -491,9 +490,6 @@
#endif

#cmakedefine DEAL_II_MPI_WITH_DEVICE_SUPPORT
#ifdef DEAL_II_MPI_WITH_DEVICE_SUPPORT
#cmakedefine DEAL_II_MPI_WITH_CUDA_SUPPORT
#endif

/***********************************************************************
* Two macro names that we put at the top and bottom of all deal.II files
Expand Down
Loading

0 comments on commit 1223e67

Please sign in to comment.