version 1.92, 2021/02/13 19:16:51
|
version 1.93, 2022/11/20 00:47:00
|
|
|
# | # |
COMPILER = icc | COMPILER = icc |
FCOMPILER = ifort | FCOMPILER = ifort |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
MPICOMPILER = mpiicc |
|
MPIFCOMPILER = mpiifort |
|
else |
MPICOMPILER = $(MPI_PATH)/mpicc | MPICOMPILER = $(MPI_PATH)/mpicc |
MPIFCOMPILER = $(MPI_PATH)/mpif90 | MPIFCOMPILER = $(MPI_PATH)/mpif90 |
|
endif |
| |
# can set through drmsparams.mk or through environment | # can set through drmsparams.mk or through environment |
ifneq ($(JSOC_COMPILER),) | ifneq ($(JSOC_COMPILER),) |
Line 126 GSLL = -L$(GSL_LIBS) |
|
Line 131 GSLL = -L$(GSL_LIBS) |
|
GSLLIBS = $(GSLL) -lgsl | GSLLIBS = $(GSLL) -lgsl |
| |
# FFTW | # FFTW |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
FFTWH = |
|
FFTWL = |
|
FFTW3LIBS = |
|
FFTW3FLIBS = |
|
else |
FFTWH = -I$(FFTW_INCS) | FFTWH = -I$(FFTW_INCS) |
FFTWL = -L$(FFTW_LIBS) | FFTWL = -L$(FFTW_LIBS) |
FFTW3LIBS = $(FFTWL) -lfftw3 | FFTW3LIBS = $(FFTWL) -lfftw3 |
FFTW3FLIBS = $(FFTWL) -lfftw3f | FFTW3FLIBS = $(FFTWL) -lfftw3f |
|
endif |
| |
# TAR | # TAR |
LIBTARH = -I$(TAR_INCS) | LIBTARH = -I$(TAR_INCS) |
|
|
# | # |
# Link flags for all targets | # Link flags for all targets |
# | # |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
LL_ALL = $(SYSLIBS) -lcurl -ltirpc |
|
else |
LL_ALL = $(SYSLIBS) -lcurl | LL_ALL = $(SYSLIBS) -lcurl |
|
endif |
| |
ifeq ($(JSOC_MACHINE), linux_avx) |
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
GCC_LF_ALL = $(STATIC) -Wl,--copy-dt-needed-entries |
|
ICC_LF_ALL = $(STATIC) -qopenmp -Wl,-export-dynamic -Wl,--copy-dt-needed-entries |
|
else ifeq ($(JSOC_MACHINE), linux_avx) |
GCC_LF_ALL = $(STATIC) -Wl,--copy-dt-needed-entries | GCC_LF_ALL = $(STATIC) -Wl,--copy-dt-needed-entries |
ICC_LF_ALL = -diag-disable 10237 $(STATIC) -openmp -static-intel -Wl,-export-dynamic -Wl,--copy-dt-needed-entries | ICC_LF_ALL = -diag-disable 10237 $(STATIC) -openmp -static-intel -Wl,-export-dynamic -Wl,--copy-dt-needed-entries |
else | else |
|
|
| |
# Fortran global LINK flags | # Fortran global LINK flags |
ifeq ($(FCOMPILER), ifort) | ifeq ($(FCOMPILER), ifort) |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
F_LF_ALL = -nofor-main -qopenmp -Wl,-export-dynamic |
|
else |
F_LF_ALL = -diag-disable 10237 -nofor-main -openmp -static-intel -Wl,-export-dynamic | F_LF_ALL = -diag-disable 10237 -nofor-main -openmp -static-intel -Wl,-export-dynamic |
endif | endif |
|
endif |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
#***********************************************************************************************# | #***********************************************************************************************# |
|
|
# GLOBAL COMPILE FLAGS | # GLOBAL COMPILE FLAGS |
# | # |
GCC_CF_GCCCOMP = -DGCCCOMP | GCC_CF_GCCCOMP = -DGCCCOMP |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
ICC_CF_ICCCOMP = -DICCCOMP -qopenmp |
|
else |
ICC_CF_ICCCOMP = -DICCCOMP -openmp | ICC_CF_ICCCOMP = -DICCCOMP -openmp |
|
endif |
| |
# can't figure out how to get stupid make to do if/else if/else | # can't figure out how to get stupid make to do if/else if/else |
ifeq ($(DEBUG), 0) | ifeq ($(DEBUG), 0) |
Line 254 ifeq ($(DEBUG), 0) |
|
Line 281 ifeq ($(DEBUG), 0) |
|
GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) | GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) |
endif | endif |
| |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
ICC_CF_ALL = -diag-disable=cpu-dispatch,warn,10441 -axcore-avx512,core-avx2 -I/usr/include/tirpc -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
|
endif |
|
|
ifeq ($(JSOC_MACHINE), linux_avx) | ifeq ($(JSOC_MACHINE), linux_avx) |
ICC_CF_ALL = -xavx -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG | ICC_CF_ALL = -xavx -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
endif | endif |
Line 268 ifeq ($(DEBUG), 0) |
|
Line 299 ifeq ($(DEBUG), 0) |
|
| |
else | else |
# -g tells the icc and gcc compilers to generate full debugging information | # -g tells the icc and gcc compilers to generate full debugging information |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
GCC_CF_ALL = -I/usr/include/tirpc -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) |
|
ICC_CF_ALL = -I/usr/include/tirpc -I$(SRCDIR)/base/include -std=c99 -g -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) |
|
else |
GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) | GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) |
ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) | ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) |
endif | endif |
|
endif |
| |
# Fortran global COMPILE flags | # Fortran global COMPILE flags |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
ifeq ($(FCOMPILER), ifort) |
|
F_CF_ALL := -diag-disable=cpu-dispatch,warn -axcore-avx512,core-avx2 -qopenmp |
|
endif |
|
endif |
|
|
ifeq ($(JSOC_MACHINE), linux_avx) | ifeq ($(JSOC_MACHINE), linux_avx) |
ifeq ($(FCOMPILER), ifort) | ifeq ($(FCOMPILER), ifort) |
F_CF_ALL := -xavx -openmp | F_CF_ALL := -xavx -openmp |