From: Daniel Arndt Date: Mon, 31 Oct 2022 13:06:29 +0000 (-0400) Subject: Remove support for CUDA files X-Git-Tag: v9.5.0-rc1~854^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcafb266c86a4977517184436c10825799630c64;p=dealii.git Remove support for CUDA files --- diff --git a/contrib/utilities/checkdoxygen.py b/contrib/utilities/checkdoxygen.py index 2b21bb556a..2566a7dbd9 100755 --- a/contrib/utilities/checkdoxygen.py +++ b/contrib/utilities/checkdoxygen.py @@ -121,12 +121,8 @@ if 'intro.dox' in filename: # get results.dox resultsname = filename.split('intro.dox',1)[0] + 'results.dox' - # try to open the '.cc' file, otherwise try to open a '.cu' file - try: - fstep = open(stepname) - except IOError: - stepname = stepname[:-2] + 'cu' - fstep = open(stepname) + # open the '.cc' file: + fstep = open(stepname) lines += fstep.readlines() fstep.close() diff --git a/contrib/utilities/count_lines.sh b/contrib/utilities/count_lines.sh index 0ddb1f7a17..7634f0182d 100755 --- a/contrib/utilities/count_lines.sh +++ b/contrib/utilities/count_lines.sh @@ -49,10 +49,10 @@ # # The output of this file consists of three numbers per line, showing # date source-lines test-lines -# displaying the number of lines of code in .h and .cc files (and .cu and -# .cuh files for CUDA), but excluding files in contributed libraries. The -# resulting output can be piped into a data file and then be visualized -# by importing into a spreadsheet, or using the following GNUPLOT script: +# displaying the number of lines of code in .h and .cc files, but excluding +# files in contributed libraries. The resulting output can be piped into a data +# file and then be visualized by importing into a spreadsheet, or using the +# following GNUPLOT script: # # set xdata time # set timefmt "%Y-%m-%d" @@ -106,7 +106,7 @@ for commit in $commits ; do date=$(git log --date=short --format="%ad" -n 1) - files_source=$(find . -name '*.h' -or -name '*.cc' -or -name '*.cu' -or -name '*.cuh' -type f | \ + files_source=$(find . -name '*.h' -or -name '*.cc' -type f | \ grep -E -i -v '(tests|boost|umfpack|bundled)/') lines_source=$(cat $files_source | wc -l) diff --git a/contrib/utilities/indent b/contrib/utilities/indent index 37455b80e0..798d32a8dd 100755 --- a/contrib/utilities/indent +++ b/contrib/utilities/indent @@ -61,7 +61,7 @@ checks # Process all source and header files: # -process_changed "tests include source examples cmake/scripts contrib/python-bindings" ".*\.(cc|h|cu|cuh)" format_file +process_changed "tests include source examples cmake/scripts contrib/python-bindings" ".*\.(cc|h)" format_file process_changed "source" ".*\.inst.in" format_inst # @@ -69,21 +69,21 @@ process_changed "source" ".*\.inst.in" format_inst # process_changed "tests include source examples cmake/scripts contrib/python-bindings" \ - ".*\.(cc|h|cu|cuh|inst.in|output.*|cmake)" fix_permissions + ".*\.(cc|h|inst.in|output.*|cmake)" fix_permissions process_changed "tests include source examples cmake/scripts contrib/python-bindings" \ - ".*\.(cc|h|cu|cuh|inst.in|cmake)" dos_to_unix + ".*\.(cc|h|inst.in|cmake)" dos_to_unix # # Removing trailing whitespace # process_changed "tests include source examples cmake/scripts contrib/python-bindings doc" \ - ".*\.(cc|h|cu|cuh|html|dox|txt)" remove_trailing_whitespace + ".*\.(cc|h|html|dox|txt)" remove_trailing_whitespace # # Ensure only a single newline at end of files # process_changed "tests include source examples cmake/scripts contrib/python-bindings doc" \ - ".*\.(cc|h|cu|cuh|html|dox|txt)" ensure_single_trailing_newline + ".*\.(cc|h|html|dox|txt)" ensure_single_trailing_newline diff --git a/contrib/utilities/indent-all b/contrib/utilities/indent-all index 39a92389a4..5afb7255ce 100755 --- a/contrib/utilities/indent-all +++ b/contrib/utilities/indent-all @@ -65,7 +65,7 @@ checks # Process all source and header files: # -process "tests include source examples contrib/python-bindings" ".*\.(cc|h|cu|cuh)" format_file +process "tests include source examples contrib/python-bindings" ".*\.(cc|h" format_file process "source" ".*\.inst.in" format_inst # @@ -73,21 +73,21 @@ process "source" ".*\.inst.in" format_inst # process "tests include source examples cmake/scripts contrib/python-bindings" \ - ".*\.(cc|h|cu|cuh|inst.in|output.*|cmake)" fix_permissions + ".*\.(cc|h|inst.in|output.*|cmake)" fix_permissions process "tests include source examples cmake/scripts contrib/python-bindings" \ - ".*\.(cc|h|cu|cuh|inst.in|cmake)" dos_to_unix + ".*\.(cc|h|inst.in|cmake)" dos_to_unix # # Removing trailing whitespace # process "tests include source examples cmake/scripts contrib/python-bindings doc" \ - ".*\.(cc|h|cu|cuh|html|dox|txt)" remove_trailing_whitespace + ".*\.(cc|h|html|dox|txt)" remove_trailing_whitespace # # Ensure only a single newline at end of files # process "tests include source examples cmake/scripts contrib/python-bindings doc" \ - ".*\.(cc|h|cu|cuh|html|dox|txt)" ensure_single_trailing_newline + ".*\.(cc|h|html|dox|txt)" ensure_single_trailing_newline diff --git a/contrib/utilities/indent.py b/contrib/utilities/indent.py index 09411ea1d8..39b058482e 100644 --- a/contrib/utilities/indent.py +++ b/contrib/utilities/indent.py @@ -97,7 +97,7 @@ def parse_arguments(): parser.add_argument("-b", "--clang-format-binary", metavar="PATH", default=distutils.spawn.find_executable("clang-format")) - parser.add_argument("--regex", default="*.cc,*.h,*.cu,*.cuh", + parser.add_argument("--regex", default="*.cc,*.h", help="Regular expression (regex) to filter files on " "which clang-format is applied.") diff --git a/doc/doxygen/scripts/make_step.pl b/doc/doxygen/scripts/make_step.pl index 9f1e1d84de..881677e35f 100644 --- a/doc/doxygen/scripts/make_step.pl +++ b/doc/doxygen/scripts/make_step.pl @@ -58,19 +58,7 @@ system $^X, "$cmake_source_dir/doc/doxygen/scripts/intro2toc", "$cmake_source_di print "
  • The commented program\n"; -my $file_extension; - -if (-f "$cmake_source_dir/examples/$step/$step.cc") -{ - $file_extension = cc; -} - -if (-f "$cmake_source_dir/examples/$step/$step.cu") -{ - $file_extension = cu; -} - -system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2toc", "$cmake_source_dir/examples/$step/$step.$file_extension"; +system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2toc", "$cmake_source_dir/examples/$step/$step.cc"; print "
      @@ -102,7 +90,7 @@ print " *\n"; print " * \n"; print " *

      The commented program

      \n"; -system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2doxygen", "$cmake_source_dir/examples/$step/$step.$file_extension"; +system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2doxygen", "$cmake_source_dir/examples/$step/$step.cc"; system $^X, "$cmake_source_dir/doc/doxygen/scripts/create_anchors", "$cmake_source_dir/examples/$step/doc/results.dox"; @@ -114,6 +102,6 @@ print " *\n"; print "

      The plain program

      -\@include \"$step.$file_extension\" +\@include \"$step.cc\" */ "; diff --git a/doc/doxygen/scripts/program2doxygen b/doc/doxygen/scripts/program2doxygen index ce7a3721c2..45befbb8c5 100644 --- a/doc/doxygen/scripts/program2doxygen +++ b/doc/doxygen/scripts/program2doxygen @@ -15,7 +15,7 @@ # Skip header lines at the top of the file, such as copyright notices and -# license information, if the file is a step-xx.cc or .cu tutorial. Here, xx +# license information, if the file is a step-xx.cc tutorial. Here, xx # is either a number like step-32 or a number plus a letter like step-12b. # Don't skip for other files such as code-gallery files if ($ARGV[0] =~ /step-\d+[a-z]?.[cc|cu]/) diff --git a/doc/doxygen/tutorial/CMakeLists.txt b/doc/doxygen/tutorial/CMakeLists.txt index 99304a0516..a70b75590b 100644 --- a/doc/doxygen/tutorial/CMakeLists.txt +++ b/doc/doxygen/tutorial/CMakeLists.txt @@ -113,22 +113,16 @@ ADD_DEPENDENCIES(tutorial build_tutorial_h) FOREACH(_step ${_deal_ii_steps}) GET_FILENAME_COMPONENT(_step "${_step}" NAME) - IF(EXISTS "${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cu") - SET(_FILE_EXTENSION "cu") - ELSE() - SET(_FILE_EXTENSION "cc") - ENDIF() - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_step}.${_FILE_EXTENSION} + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_step}.cc COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/program2plain - < ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.${_FILE_EXTENSION} - > ${CMAKE_CURRENT_BINARY_DIR}/${_step}.${_FILE_EXTENSION} + < ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cc + > ${CMAKE_CURRENT_BINARY_DIR}/${_step}.cc DEPENDS ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/program2plain - ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.${_FILE_EXTENSION} + ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cc VERBATIM ) @@ -146,7 +140,7 @@ FOREACH(_step ${_deal_ii_steps}) ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/intro2toc ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/create_anchors ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/program2doxygen - ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.${_FILE_EXTENSION} + ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cc ${CMAKE_SOURCE_DIR}/examples/${_step}/doc/intro.dox ${CMAKE_SOURCE_DIR}/examples/${_step}/doc/results.dox ) @@ -154,7 +148,7 @@ FOREACH(_step ${_deal_ii_steps}) ADD_CUSTOM_TARGET(tutorial_${_step} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_step}.h - ${CMAKE_CURRENT_BINARY_DIR}/${_step}.${_FILE_EXTENSION} + ${CMAKE_CURRENT_BINARY_DIR}/${_step}.cc COMMENT "Building doxygen input file for tutorial program <${_step}>" ) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 08f2891f66..fdb895fb17 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -34,14 +34,6 @@ INSTALL(DIRECTORY deal.II FILES_MATCHING PATTERN "*.h" ) -IF(DEAL_II_WITH_CUDA) - INSTALL(DIRECTORY deal.II - DESTINATION ${DEAL_II_INCLUDE_RELDIR} - COMPONENT library - FILES_MATCHING PATTERN "*.cuh" - ) -ENDIF() - # # and don't forget to install all generated header files, too: # diff --git a/source/base/CMakeLists.txt b/source/base/CMakeLists.txt index c94f3efa19..306c11a6ad 100644 --- a/source/base/CMakeLists.txt +++ b/source/base/CMakeLists.txt @@ -154,7 +154,6 @@ SET(_inst FILE(GLOB _header ${CMAKE_SOURCE_DIR}/include/deal.II/base/*.h - ${CMAKE_SOURCE_DIR}/include/deal.II/base/*.cuh ) DEAL_II_ADD_LIBRARY(obj_base OBJECT ${_src} ${_header} ${_inst} diff --git a/tests/cuda/matrix_vector_common.h b/tests/cuda/matrix_vector_common.h index d36e08468a..fc506935f5 100644 --- a/tests/cuda/matrix_vector_common.h +++ b/tests/cuda/matrix_vector_common.h @@ -49,7 +49,7 @@ #include "matrix_vector_mf.h" -// forward declare this function. will be implemented in .cu files +// forward declare this function. will be implemented in .cc files template void test(); diff --git a/tests/quick_tests/CMakeLists.txt b/tests/quick_tests/CMakeLists.txt index bbff6d5551..f09ffb83d4 100644 --- a/tests/quick_tests/CMakeLists.txt +++ b/tests/quick_tests/CMakeLists.txt @@ -36,11 +36,7 @@ MACRO(make_quicktest test_basename build_name mpi_run) STRING(TOLOWER ${build_name} _build_lowercase) SET(_target ${test_basename}.${_build_lowercase}) LIST(APPEND ALL_TESTS "${_target}") - IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${test_basename}.cc") - ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${test_basename}.cc) - ELSE() - ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${test_basename}.cu) - ENDIF() + ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${test_basename}.cc) DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${build_name}) IF("${mpi_run}" STREQUAL "")