Skip to content

Commit

Permalink
Better icx flags and (indirectly) force -qopenmp w/ icx >= 24.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre committed Dec 21, 2024
1 parent 29220cd commit b85a4e1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions acsm_compiler_flags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,24 @@ AC_DEFUN([ACSM_SET_CXX_FLAGS],
[intel_icx_*],
[
ACSM_PROFILING_FLAGS=""
ACSM_CXXFLAGS_DBG="$ACSM_CXXFLAGS_DBG -O0 -g"
ACSM_CXXFLAGS_OPT="$ACSM_CXXFLAGS_OPT -O3 -w0"
ACSM_CXXFLAGS_DBG="$ACSM_CXXFLAGS_DBG -O0 -g -fp-model=precise"
ACSM_CXXFLAGS_OPT="$ACSM_CXXFLAGS_OPT -O3"
ACSM_CXXFLAGS_DEVEL="$ACSM_CXXFLAGS_DEVEL -O2 -g"
ACSM_CFLAGS_DBG="$ACSM_CFLAGS_DBG -O0 -g"
ACSM_CFLAGS_OPT="$ACSM_CFLAGS_OPT -O3 -w0"
ACSM_CFLAGS_DBG="$ACSM_CFLAGS_DBG -O0 -g -fp-model=precise"
ACSM_CFLAGS_OPT="$ACSM_CFLAGS_OPT -O3"
ACSM_CFLAGS_DEVEL="$ACSM_CFLAGS_DEVEL -O2 -g"
],
[AC_MSG_RESULT(Unknown Intel compiler "$ACSM_GXX_VERSION")])
dnl icx >= 24.x accepts -fopenmp but prefers -qopenmp, issuing a warning
dnl with the former. The following causes compilation to fail with
dnl -fopenmp at configuration time, thereby forcing -qopenmp.
AS_CASE("$ACSM_GXX_VERSION",
[intel_icx_v21.x | intel_icx_v22.x | intel_icx_v23.x],
[],
[
CXXFLAGS="$CXXFLAGS -Werror=recommended-option"
CFLAGS="$CFLAGS -Werror=recommended-option"
])
],
[nvidia], [
Expand Down

0 comments on commit b85a4e1

Please sign in to comment.