Skip to content

Commit

Permalink
Make nvhpc math abide IEEE standard
Browse files Browse the repository at this point in the history
  • Loading branch information
tcojean committed May 5, 2023
1 parent 18c5600 commit 18c9470
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,13 @@ endif()

# For now, PGI/NVHPC nvc++ compiler doesn't seem to support
# `#pragma omp declare reduction`
if (${CMAKE_CXX_COMPILER_ID} MATCHES "PGI|NVHPC")
#
# The math with optimization level -O2 doesn't follow IEEE standard, so we
# enable that back as well.
if (CMAKE_CXX_COMPILER_ID MATCHES "PGI|NVHPC")
message(STATUS "OpenMP: Switching to OFF because PGI/NVHPC nvc++ compiler lacks important features.")
set(GINKGO_BUILD_OMP OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Kieee")
endif()

set(GINKGO_CIRCULAR_DEPS_FLAGS "-Wl,--no-undefined")
Expand Down
2 changes: 1 addition & 1 deletion include/ginkgo/core/base/std_extensions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ template <typename... Ts>
using void_t = typename detail::make_void<Ts...>::type;


// Disable deprecation warnings when using standard > 2014
// Disable deprecation warnings when using standard > C++14
inline bool uncaught_exception() noexcept {
#if __cplusplus > 201402L
return std::uncaught_exceptions() > 0;
Expand Down

0 comments on commit 18c9470

Please sign in to comment.