Use ISA for GCC flags and change binary and build directory names

Signed-off-by: Rafael Ravedutti <rafael.r.ravedutti@fau.de>
This commit is contained in:
Rafael Ravedutti 2023-01-16 23:05:21 +01:00
parent ffad9d40f3
commit 8aad7e87a0
3 changed files with 29 additions and 13 deletions

View File

@ -1,6 +1,7 @@
#CONFIGURE BUILD SYSTEM
TARGET = MDBench-$(TAG)-$(OPT_SCHEME)
BUILD_DIR = ./$(TAG)-$(OPT_SCHEME)
IDENTIFIER = $(OPT_SCHEME)-$(TAG)-$(ISA)-$(DATA_TYPE)
TARGET = MDBench-$(IDENTIFIER)
BUILD_DIR = ./build-$(IDENTIFIER)
SRC_DIR = ./$(OPT_SCHEME)
ASM_DIR = ./asm
COMMON_DIR = ./common
@ -155,9 +156,8 @@ clean:
cleanall:
$(info ===> CLEAN)
@rm -rf ICC-lammps ICX-lammps GCC-lammps CLANG-lammps NVCC-lammps
@rm -rf ICC-gromacs ICX-gromacs GCC-gromacs CLANG-gromacs NVCC-gromacs
@rm -rf MDBench-GCC* MDBench-ICC* MDBench-ICX* MDBench-CLANG* MDBench-NVCC*
@rm -rf build-*
@rm -rf MDBench-*
@rm -f tags
distclean: clean

View File

@ -6,13 +6,29 @@ ANSI_CFLAGS += -std=c99
ANSI_CFLAGS += -pedantic
ANSI_CFLAGS += -Wextra
#CFLAGS = -O0 -g -std=c99 -fargument-noalias
ifeq ($(ISA),AVX512)
CFLAGS = -Ofast -mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd -ffast-math -funroll-loops # -fopenmp
#CFLAGS = -O3 -march=cascadelake -ffast-math -funroll-loops # -fopenmp
CFLAGS = -Ofast -march=native -ffast-math -funroll-loops # -fopenmp
endif
ifeq ($(ISA),AVX2)
#CFLAGS = -Ofast -march=native -mavx2 -ffast-math -funroll-loops # -fopenmp
#CFLAGS = -O3 -march=znver1 -ffast-math -funroll-loops # -fopenmp
#CFLAGS = -Ofast -mavx2 -ffast-math -funroll-loops # -fopenmp
CFLAGS = -Ofast -mavx2 -mfma -ffast-math -funroll-loops # -fopenmp
endif
ifeq ($(ISA),AVX)
CFLAGS = -Ofast -mavx -ffast-math -funroll-loops # -fopenmp
endif
ifeq ($(ISA),SSE)
CFLAGS = -Ofast -msse4.2 -ffast-math -funroll-loops # -fopenmp
endif
#CFLAGS = -O0 -g -std=c99 -fargument-noalias
#CFLAGS = -Ofast -march=native -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 =
DEFINES = -D_GNU_SOURCE -DNO_ZMM_INTRIN

View File

@ -4,21 +4,21 @@ LINKER = $(CC)
OPENMP = #-qopenmp
PROFILE = #-profile-functions -g -pg
ifeq($(ISA),AVX512)
ifeq ($(ISA),AVX512)
OPTS = -Ofast -xCORE-AVX512 -qopt-zmm-usage=high $(PROFILE)
endif
ifeq($(ISA),AVX2)
ifeq ($(ISA),AVX2)
OPTS = -Ofast -xCORE-AVX2 $(PROFILE)
#OPTS = -Ofast -xAVX2 $(PROFILE)
#OPTS = -Ofast -march=core-avx2 $(PROFILE)
endif
ifeq($(ISA),AVX)
ifeq ($(ISA),AVX)
OPTS = -Ofast -xAVX $(PROFILE)
endif
ifeq($(ISA),SSE)
ifeq ($(ISA),SSE)
OPTS = -Ofast -xSSE4.2 $(PROFILE)
endif