Patch for building on Summit

This commit is contained in:
Wileam Phan 2020-07-20 23:30:28 -04:00
parent fcfb7ffafb
commit 9ae154ba89
4 changed files with 67 additions and 5 deletions

View File

@ -21,23 +21,56 @@ endif
ifeq ($(CORE), POWER9) ifeq ($(CORE), POWER9)
ifeq ($(USE_OPENMP), 1) ifeq ($(USE_OPENMP), 1)
COMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp
else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align -DUSE_OPENMP -mp
endif
ifneq ($(F_COMPILER), PGI)
FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp
else else
COMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -malign-power -fno-fast-math FCOMMON_OPT += -O2 -Mrecursive -DUSE_OPENMP -mp
endif
else
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -malign-power -fno-fast-math
else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
endif
ifneq ($(F_COMPILER), PGI)
FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -malign-power -fno-fast-math FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -malign-power -fno-fast-math
else
FCOMMON_OPT += -O2 -Mrecursive
endif
endif endif
endif endif
ifeq ($(CORE), POWER8) ifeq ($(CORE), POWER8)
ifeq ($(USE_OPENMP), 1) ifeq ($(USE_OPENMP), 1)
COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp
else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align -DUSE_OPENMP -mp
endif
ifneq ($(F_COMPILER), PGI)
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -DUSE_OPENMP -fno-fast-math -fopenmp
else else
COMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -fno-fast-math FCOMMON_OPT += -O2 -Mrecursive -DUSE_OPENMP -mp
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math endif
else
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -malign-power -fno-fast-math
else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
endif
ifneq ($(F_COMPILER), PGI)
ifeq ($(OSNAME), AIX) ifeq ($(OSNAME), AIX)
FCOMMON_OPT += -O1 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math FCOMMON_OPT += -O1 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math
else
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -malign-power -fno-fast-math
endif
else
FCOMMON_OPT += -O2 -Mrecursive
endif endif
endif endif
endif endif

View File

@ -796,8 +796,19 @@ endif
ifeq ($(C_COMPILER), PGI) ifeq ($(C_COMPILER), PGI)
ifdef BINARY64 ifdef BINARY64
ifeq ($(ARCH), x86_64)
CCOMMON_OPT += -tp p7-64 -D__MMX__ -Mnollvm CCOMMON_OPT += -tp p7-64 -D__MMX__ -Mnollvm
else else
ifeq ($(ARCH), power)
ifeq ($(CORE), POWER8)
CCOMMON_OPT += -tp pwr8
endif
ifeq ($(CORE), POWER9)
CCOMMON_OPT += -tp pwr9
endif
endif
endif
else
CCOMMON_OPT += -tp p7 CCOMMON_OPT += -tp p7
endif endif
endif endif
@ -960,8 +971,19 @@ ifneq ($(INTERFACE64), 0)
FCOMMON_OPT += -i8 FCOMMON_OPT += -i8
endif endif
endif endif
ifeq ($(ARCH), x86_64)
FCOMMON_OPT += -tp p7-64 FCOMMON_OPT += -tp p7-64
else else
ifeq ($(ARCH), power)
ifeq ($(CORE), POWER8)
FCOMMON_OPT += -tp pwr8
endif
ifeq ($(CORE), POWER9)
FCOMMON_OPT += -tp pwr9
endif
endif
endif
else
FCOMMON_OPT += -tp p7 FCOMMON_OPT += -tp p7
endif endif
FCOMMON_OPT += -Mrecursive FCOMMON_OPT += -Mrecursive

View File

@ -55,6 +55,10 @@ endif
endif endif
endif endif
ifeq ($(C_COMPILER), PGI)
EXTRALIB += -pgf90libs
endif
ifneq (,$(filter 1 2,$(NOFORTRAN))) ifneq (,$(filter 1 2,$(NOFORTRAN)))
FEXTRALIB = FEXTRALIB =
endif endif

View File

@ -82,6 +82,9 @@ if ($compiler eq "") {
if ($compiler =~ /flang/) { if ($compiler =~ /flang/) {
$vendor = FLANG; $vendor = FLANG;
$openmp = "-fopenmp"; $openmp = "-fopenmp";
} elsif ($compiler =~ /pgf/) {
$vendor = PGI;
$openmp = "-mp";
} else { } else {
$vendor = G77; $vendor = G77;
$openmp = ""; $openmp = "";