Skip to content

Commit

Permalink
Revise Intel compiler flags without MPI
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Mar 8, 2023
1 parent e56efd9 commit 60e7f91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tools/toolchain/scripts/generate_arch_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ LD_arch="IF_MPI(${MPIFC}|${FC})"
# we always want good line information and backtraces
if [ "${with_intel}" != "__DONTUSE__" ]; then
if [ "${TARGET_CPU}" = "native" ]; then
BASEFLAGS="-fPIC -fp-model precise -g -qopenmp -qopenmp-simd -traceback -xHost"
BASEFLAGS="-fPIC -fp-model=precise -g -qopenmp -qopenmp-simd -traceback -xHost"
elif [ "${TARGET_CPU}" = "generic" ]; then
BASEFLAGS="-fPIC -fp-model precise -g -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback"
BASEFLAGS="-fPIC -fp-model=precise -g -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback"
else
BASEFLAGS="-fPIC -fp-model precise -g -march=${TARGET_CPU} -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback"
BASEFLAGS="-fPIC -fp-model=precise -g -march=${TARGET_CPU} -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback"
fi
OPT_FLAGS="-O2 -funroll-loops"
LDFLAGS_C="-nofor-main"
Expand Down Expand Up @@ -127,8 +127,8 @@ fi
if [ "${with_intel}" == "__DONTUSE__" ]; then
CFLAGS="$G_CFLAGS -std=c11 -Wall -Wextra -Werror -Wno-vla-parameter -Wno-deprecated-declarations \$(DFLAGS)"
else
CFLAGS="-cc=${I_MPI_CC} $G_CFLAGS -std=c11 -Wall \$(DFLAGS)"
FCFLAGS="-fc=${I_MPI_FC} $FCFLAGS -diag-disable=8291 -diag-disable=8293 -fpp -free"
CFLAGS="IF_MPI(-cc=${I_MPI_CC}|) $G_CFLAGS -std=c11 -Wall \$(DFLAGS)"
FCFLAGS="IF_MPI(-fc=${I_MPI_FC}|) $FCFLAGS -diag-disable=8291 -diag-disable=8293 -fpp -free"
fi

# Linker flags
Expand All @@ -144,7 +144,7 @@ LIBS="${CP_LIBS} -lstdc++"
if [ "${with_intel}" == "__DONTUSE__" ]; then
CXXFLAGS+=" --std=c++14 \$(DFLAGS) -Wno-deprecated-declarations"
else
CXXFLAGS+=" --std=c++14 \$(DFLAGS)"
CXXFLAGS=" ${G_CFLAGS} --std=c++14 \$(DFLAGS)"
fi
# CUDA handling
if [ "${ENABLE_CUDA}" = __TRUE__ ] && [ "${GPUVER}" != no ]; then
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/stage0/setup_buildtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ done

# Setup compiler flags, leading to nice stack traces on crashes but still optimised
if [ "${with_intel}" != "__DONTUSE__" ]; then
CFLAGS="-O2 -fPIC -fp-model precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback"
CFLAGS="-O2 -fPIC -fp-model=precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback"
if [ "${TARGET_CPU}" = "native" ]; then
CFLAGS="${CFLAGS} -xHost"
elif [ "${TARGET_CPU}" = "generic" ]; then
Expand Down

0 comments on commit 60e7f91

Please sign in to comment.