mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: adjust intel compiler and mpi settings (#2056)
- largely as per patch from Jong-Gwan (Jason) Do
NB: the intel-one setup adds in paths for intelmpi.
Its mpicc version does not harmonize with the OpenFOAM
system openmpi setup (using mpicc --showme:link).
Needs adjustment, or use intelmpi instead.
- update name mappings for newer gcc, clang versions
This commit is contained in:
@ -2,4 +2,4 @@
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -qopenmp
|
||||
LINK_OPENMP = -liomp5
|
||||
LINK_OPENMP = -qopenmp
|
||||
|
||||
10
wmake/rules/General/Icx/c
Normal file
10
wmake/rules/General/Icx/c
Normal file
@ -0,0 +1,10 @@
|
||||
SUFFIXES += .c
|
||||
|
||||
cc = icx
|
||||
|
||||
cARCH =
|
||||
cDBUG =
|
||||
cOPT = -O2
|
||||
cWARN = $(FOAM_EXTRA_CFLAGS)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
24
wmake/rules/General/Icx/c++
Normal file
24
wmake/rules/General/Icx/c++
Normal file
@ -0,0 +1,24 @@
|
||||
SUFFIXES += .C .cc .cpp .cxx
|
||||
|
||||
CC = icpx -std=c++11
|
||||
|
||||
c++ARCH =
|
||||
c++DBUG =
|
||||
c++OPT = -O2
|
||||
ptFLAGS = -DNoRepository
|
||||
|
||||
# - Standard warnings
|
||||
# - Less restrictive warnings (may be needed for flex++, CGAL, etc.).
|
||||
|
||||
c++WARN = \
|
||||
-Wall -Wextra \
|
||||
-Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
|
||||
-Wno-unknown-pragmas \
|
||||
-Wno-undefined-var-template \
|
||||
-diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076 \
|
||||
$(FOAM_EXTRA_CXXFLAGS)
|
||||
|
||||
c++LESSWARN = \
|
||||
-diag-disable 1224,2026,2305
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
5
wmake/rules/General/Icx/link-c
Normal file
5
wmake/rules/General/Icx/link-c
Normal file
@ -0,0 +1,5 @@
|
||||
LINK_LIBS = $(cDBUG)
|
||||
|
||||
LINKLIBSO = $(cc) $(cFLAGS) -shared
|
||||
|
||||
LINKEXE = $(cc) $(cFLAGS) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
|
||||
11
wmake/rules/General/Icx/link-c++
Normal file
11
wmake/rules/General/Icx/link-c++
Normal file
@ -0,0 +1,11 @@
|
||||
LINK_LIBS = $(c++DBUG)
|
||||
|
||||
LINKLIBSO = $(CC) $(c++FLAGS) -shared \
|
||||
-Xlinker --add-needed \
|
||||
-Xlinker --no-as-needed \
|
||||
$(FOAM_EXTRA_LDFLAGS)
|
||||
|
||||
LINKEXE = $(CC) $(c++FLAGS) \
|
||||
-Xlinker --add-needed \
|
||||
-Xlinker --no-as-needed \
|
||||
$(FOAM_EXTRA_LDFLAGS)
|
||||
5
wmake/rules/General/Icx/openmp
Normal file
5
wmake/rules/General/Icx/openmp
Normal file
@ -0,0 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fiopenmp
|
||||
LINK_OPENMP = -fiopenmp
|
||||
@ -1,8 +1,18 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# INTELMPI rules (x86_64)
|
||||
# - <root>/intel64/{include,lib}
|
||||
# - <root>/{include,lib}
|
||||
|
||||
PFLAGS = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX
|
||||
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
|
||||
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
|
||||
intelmpi_subdir := $(shell test -d "$(MPI_ARCH_PATH)/intel64" && echo /intel64)
|
||||
|
||||
PFLAGS = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX
|
||||
PINC = -isystem $(MPI_ARCH_PATH)$(intelmpi_subdir)/include
|
||||
PLIBS = -L$(MPI_ARCH_PATH)$(intelmpi_subdir)/lib/release -lmpi
|
||||
|
||||
# DEBUG
|
||||
# -----
|
||||
## $(info MPI_ARCH_PATH: $(MPI_ARCH_PATH))
|
||||
## $(info PINC $(PINC))
|
||||
## $(info PLIBS $(PLIBS))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#------------------------------------------------------------------------------
|
||||
include $(GENERAL_RULES)/Icc/c
|
||||
|
||||
cARCH =
|
||||
@ -11,4 +12,5 @@ ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
|
||||
|
||||
include $(GENERAL_RULES)/Icc/link-c
|
||||
|
||||
LINK_LIBS += -L$(IA32ROOT)/lib
|
||||
#legacy: LINK_LIBS += -L$(IA32ROOT)/lib
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#------------------------------------------------------------------------------
|
||||
include $(GENERAL_RULES)/Icc/c++
|
||||
|
||||
c++ARCH = -pthread -fp-trap=common -fp-model precise
|
||||
@ -13,4 +14,5 @@ cpptoo = $(Ctoo)
|
||||
|
||||
include $(GENERAL_RULES)/Icc/link-c++
|
||||
|
||||
LINK_LIBS += -L$(IA64ROOT)/lib
|
||||
#legacy: LINK_LIBS += -L$(IA64ROOT)/lib
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
c++DBUG = -pg
|
||||
c++DBUG = -p
|
||||
c++OPT = -O2
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
cDBUG = -pg
|
||||
cDBUG = -p
|
||||
cOPT = -O2
|
||||
|
||||
15
wmake/rules/linux64Icx/c
Normal file
15
wmake/rules/linux64Icx/c
Normal file
@ -0,0 +1,15 @@
|
||||
#------------------------------------------------------------------------------
|
||||
include $(GENERAL_RULES)/Icx/c
|
||||
|
||||
cARCH =
|
||||
|
||||
# Compile option is non-mandatory, but must be non-empty
|
||||
sinclude $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
|
||||
|
||||
cFLAGS = $(cARCH) $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
|
||||
|
||||
include $(GENERAL_RULES)/Icx/link-c
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
17
wmake/rules/linux64Icx/c++
Normal file
17
wmake/rules/linux64Icx/c++
Normal file
@ -0,0 +1,17 @@
|
||||
#------------------------------------------------------------------------------
|
||||
include $(GENERAL_RULES)/Icx/c++
|
||||
|
||||
c++ARCH = -fp-model precise
|
||||
|
||||
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
|
||||
|
||||
c++FLAGS = $(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
|
||||
cxxtoo = $(Ctoo)
|
||||
cctoo = $(Ctoo)
|
||||
cpptoo = $(Ctoo)
|
||||
|
||||
include $(GENERAL_RULES)/Icx/link-c++
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
2
wmake/rules/linux64Icx/c++Debug
Normal file
2
wmake/rules/linux64Icx/c++Debug
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG = -g -DFULLDEBUG -O0
|
||||
c++OPT =
|
||||
2
wmake/rules/linux64Icx/c++Opt
Normal file
2
wmake/rules/linux64Icx/c++Opt
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG =
|
||||
c++OPT = -O3
|
||||
4
wmake/rules/linux64Icx/c++OptKNL
Normal file
4
wmake/rules/linux64Icx/c++OptKNL
Normal file
@ -0,0 +1,4 @@
|
||||
c++DBUG =
|
||||
c++OPT = -xmic-avx512 -fp-speculation=safe -O3
|
||||
|
||||
ROUNDING_MATH = -frounding-math
|
||||
2
wmake/rules/linux64Icx/c++Prof
Normal file
2
wmake/rules/linux64Icx/c++Prof
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG = -pg
|
||||
c++OPT = -O2
|
||||
2
wmake/rules/linux64Icx/cDebug
Normal file
2
wmake/rules/linux64Icx/cDebug
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG = -g -DFULLDEBUG -O0
|
||||
cOPT =
|
||||
2
wmake/rules/linux64Icx/cOpt
Normal file
2
wmake/rules/linux64Icx/cOpt
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG =
|
||||
cOPT = -O3
|
||||
2
wmake/rules/linux64Icx/cOptKNL
Normal file
2
wmake/rules/linux64Icx/cOptKNL
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG =
|
||||
cOPT = -O3 -no-prec-div
|
||||
2
wmake/rules/linux64Icx/cProf
Normal file
2
wmake/rules/linux64Icx/cProf
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG = -pg
|
||||
cOPT = -O2
|
||||
13
wmake/rules/linux64Icx/general
Normal file
13
wmake/rules/linux64Icx/general
Normal file
@ -0,0 +1,13 @@
|
||||
CPP = /lib/cpp -traditional-cpp $(GFLAGS)
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
include $(GENERAL_RULES)/Icx/openmp
|
||||
|
||||
ifneq (,$(findstring ~openmp,$(WM_COMPILE_CONTROL)))
|
||||
include $(GENERAL_RULES)/no-openmp
|
||||
endif
|
||||
|
||||
include $(DEFAULT_RULES)/c
|
||||
include $(DEFAULT_RULES)/c++
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
1
wmake/rules/linux64Icx/mplibHPMPI
Normal file
1
wmake/rules/linux64Icx/mplibHPMPI
Normal file
@ -0,0 +1 @@
|
||||
include $(GENERAL_RULES)/mplib-x86_64-HPMPI
|
||||
1
wmake/rules/linux64Icx/mplibINTELMPI
Normal file
1
wmake/rules/linux64Icx/mplibINTELMPI
Normal file
@ -0,0 +1 @@
|
||||
include $(GENERAL_RULES)/mplib-x86_64-INTELMPI
|
||||
@ -1,5 +1,4 @@
|
||||
c++DBUG =
|
||||
|
||||
c++OPT = \
|
||||
-DICC_IA64_PREFETCH \
|
||||
-ansi-alias \
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
c++DBUG = -ggdb3 -DFULLDEBUG
|
||||
c++DBUG = -ggdb3 -DFULLDEBUG
|
||||
c++OPT = -O0 -fdefault-inline
|
||||
|
||||
Reference in New Issue
Block a user