From 60e7f91d1367dd062fe2fa4125183e5e3d99f205 Mon Sep 17 00:00:00 2001 From: Matthias Krack Date: Tue, 7 Mar 2023 18:15:37 +0100 Subject: [PATCH] Revise Intel compiler flags without MPI --- tools/toolchain/scripts/generate_arch_files.sh | 12 ++++++------ tools/toolchain/scripts/stage0/setup_buildtools.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/toolchain/scripts/generate_arch_files.sh b/tools/toolchain/scripts/generate_arch_files.sh index 9403437eee..f6becb3731 100755 --- a/tools/toolchain/scripts/generate_arch_files.sh +++ b/tools/toolchain/scripts/generate_arch_files.sh @@ -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" @@ -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 @@ -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 diff --git a/tools/toolchain/scripts/stage0/setup_buildtools.sh b/tools/toolchain/scripts/stage0/setup_buildtools.sh index cc89213086..1d6c7ed569 100755 --- a/tools/toolchain/scripts/stage0/setup_buildtools.sh +++ b/tools/toolchain/scripts/stage0/setup_buildtools.sh @@ -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