Skip to content

Commit

Permalink
gpu nvhpc debug does not work (typo) (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryngelson authored Jun 9, 2024
1 parent f347b30 commit da71580
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,8 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 21.7)
message(FATAL_ERROR "${__err_msg}ERROR: When using NVHPC, v21.7 or newer is required to build MFC.")
endif()
if (MAKE_BUILD_TYPE STREQUAL "Debug")
if (MFC_OpenACC)
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 23.0)
message(FATAL_ERROR "${__err_msg}ERROR: When using NVHPC, v23.0 or newer is required to build MFC with Debug and GPU options.")
endif()
else()
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 23.8)
message(FATAL_ERROR "${__err_msg}ERROR: Debug is not working with NVHPC 23.X and older and CPU options at present.")
endif()
endif()
if ((CMAKE_BUILD_TYPE STREQUAL "Debug") AND MFC_OpenACC)
message(FATAL_ERROR "${__err_msg}ERROR: When using NVHPC, MFC with Debug and GPU options is unavailable.")
endif()
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
message(FATAL_ERROR "${__err_msg}ERROR: MFC does not support the Apple Clang compilers. Please consult the documentation.")
Expand Down Expand Up @@ -193,7 +185,7 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
endif()

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-C -g -O0 -traceback -Mchkptr -Mchkstk -Minform=inform -Mbounds)
add_compile_options(-C -g -O0 -traceback -Mchkptr -Minform=inform -Mbounds)
endif()

if (DEFINED ENV{MFC_CUDA_CC})
Expand Down

0 comments on commit da71580

Please sign in to comment.