From 165335cea0dbed573a2427bf0400c9f2f86f8228 Mon Sep 17 00:00:00 2001 From: Rafael Ravedutti Date: Mon, 17 Jan 2022 11:40:44 +0100 Subject: [PATCH] Update compilation flags for all available compilers Signed-off-by: Rafael Ravedutti --- include_CLANG.mk | 4 +++- include_GCC.mk | 2 ++ include_ICC.mk | 2 +- src/util.c | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include_CLANG.mk b/include_CLANG.mk index 59fa579..49b7751 100644 --- a/include_CLANG.mk +++ b/include_CLANG.mk @@ -1,4 +1,4 @@ -CC = cc +CC = clang LINKER = $(CC) ANSI_CFLAGS = -ansi @@ -6,6 +6,8 @@ ANSI_CFLAGS += -std=c99 ANSI_CFLAGS += -pedantic ANSI_CFLAGS += -Wextra +#CFLAGS = -O3 -march=native $(ANSI_CFLAGS) #-Xpreprocessor -fopenmp -g +#CFLAGS = -O3 -march=cascadelake $(ANSI_CFLAGS) #-Xpreprocessor -fopenmp -g CFLAGS = -Ofast $(ANSI_CFLAGS) -g #-Xpreprocessor -fopenmp -g ASFLAGS = -masm=intel LFLAGS = diff --git a/include_GCC.mk b/include_GCC.mk index 954ac5d..d900a61 100644 --- a/include_GCC.mk +++ b/include_GCC.mk @@ -7,6 +7,8 @@ ANSI_CFLAGS += -pedantic ANSI_CFLAGS += -Wextra # CFLAGS = -O0 -g -std=c99 -fargument-noalias +#CFLAGS = -O3 -march=cascadelake -ffast-math -funroll-loops # -fopenmp +#CFLAGS = -O3 -march=native -ffast-math -funroll-loops # -fopenmp CFLAGS = -O3 -march=znver1 -ffast-math -funroll-loops # -fopenmp ASFLAGS = -masm=intel LFLAGS = diff --git a/include_ICC.mk b/include_ICC.mk index 37b017f..ba4b548 100644 --- a/include_ICC.mk +++ b/include_ICC.mk @@ -3,7 +3,7 @@ LINKER = $(CC) OPENMP = #-qopenmp PROFILE = #-profile-functions -g -pg - OPTS = -Ofast -xCORE-AVX512 -qopt-zmm-usage=high $(PROFILE) +OPTS = -Ofast -xCORE-AVX512 -qopt-zmm-usage=high $(PROFILE) #OPTS = -fast -xCORE-AVX2 $(PROFILE) #OPTS = -fast -xAVX $(PROFILE) #OPTS = -fast -xSSE4.2 $(PROFILE) diff --git a/src/util.c b/src/util.c index 1fa01e8..0347ab6 100644 --- a/src/util.c +++ b/src/util.c @@ -20,6 +20,8 @@ * with MD-Bench. If not, see . * ======================================================================================= */ +#include + #include /* Park/Miller RNG w/out MASKING, so as to be like f90s version */