Add/modify "PGI" compiler options for NVIDIA SDK 20.11
This commit is contained in:
parent
e40416567a
commit
b212a2fb9f
|
@ -181,7 +181,7 @@ endif
|
||||||
|
|
||||||
# On x86_64 build getarch with march=native unless the compiler is PGI. This is required to detect AVX512 support in getarch.
|
# On x86_64 build getarch with march=native unless the compiler is PGI. This is required to detect AVX512 support in getarch.
|
||||||
ifeq ($(HOSTARCH), x86_64)
|
ifeq ($(HOSTARCH), x86_64)
|
||||||
ifeq ($(findstring pgcc,$(HOSTCC)),)
|
ifeq ($(findstring pgcc,$(HOSTCC))$(findstring nvc,$(HOSTCC)),)
|
||||||
GETARCH_FLAGS += -march=native
|
GETARCH_FLAGS += -march=native
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -847,9 +847,19 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(C_COMPILER), PGI)
|
ifeq ($(C_COMPILER), PGI)
|
||||||
|
PGCVERSIONGT20 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \> 20)
|
||||||
|
PGCVERSIONGTEQ20 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \>= 20)
|
||||||
|
PGCMINORVERSIONGE11 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -c 4-5` == 11)
|
||||||
|
PGCVERSIONCHECK := $(PGCVERSIONGT20)$(PGCVERSIONEQ20)$(PGCMINORVERSIONGE11)
|
||||||
|
ifeq ($(PGCVERSIONCHECK), $(filter $(PGCVERSIONCHECK), 110 111 011))
|
||||||
|
NEWPGI := 1
|
||||||
|
endif
|
||||||
ifdef BINARY64
|
ifdef BINARY64
|
||||||
ifeq ($(ARCH), x86_64)
|
ifeq ($(ARCH), x86_64)
|
||||||
CCOMMON_OPT += -tp p7-64 -D__MMX__ -Mnollvm
|
CCOMMON_OPT += -tp p7-64
|
||||||
|
ifneq ($(NEWPGI),1)
|
||||||
|
CCOMMON_OPT += -D__MMX__ -Mnollvm
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(ARCH), power)
|
ifeq ($(ARCH), power)
|
||||||
ifeq ($(CORE), POWER8)
|
ifeq ($(CORE), POWER8)
|
||||||
|
@ -1040,7 +1050,7 @@ endif
|
||||||
else
|
else
|
||||||
FCOMMON_OPT += -tp p7
|
FCOMMON_OPT += -tp p7
|
||||||
endif
|
endif
|
||||||
FCOMMON_OPT += -Mrecursive
|
FCOMMON_OPT += -Mrecursive -Kieee
|
||||||
ifeq ($(USE_OPENMP), 1)
|
ifeq ($(USE_OPENMP), 1)
|
||||||
FCOMMON_OPT += -mp
|
FCOMMON_OPT += -mp
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue