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:
Mark Olesen
2021-04-20 16:24:06 +02:00
parent 8878050ff9
commit d549826528
32 changed files with 285 additions and 50 deletions

View File

@ -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
View File

@ -0,0 +1,10 @@
SUFFIXES += .c
cc = icx
cARCH =
cDBUG =
cOPT = -O2
cWARN = $(FOAM_EXTRA_CFLAGS)
#------------------------------------------------------------------------------

View 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
#------------------------------------------------------------------------------

View File

@ -0,0 +1,5 @@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) $(cFLAGS) -shared
LINKEXE = $(cc) $(cFLAGS) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View 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)

View 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

View File

@ -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))
#------------------------------------------------------------------------------