mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: add wmake rules for Pgi compiler (#1234)
This commit is contained in:
committed by
Andrew Heather
parent
8b63d63444
commit
a2fb1d0bdd
@ -71,7 +71,7 @@ export WM_COMPILER_TYPE=system
|
|||||||
|
|
||||||
# [WM_COMPILER] - Compiler:
|
# [WM_COMPILER] - Compiler:
|
||||||
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-5] | Gcc7[1-4] | Gcc8[12] |
|
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-5] | Gcc7[1-4] | Gcc8[12] |
|
||||||
# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm
|
# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi
|
||||||
export WM_COMPILER=Gcc
|
export WM_COMPILER=Gcc
|
||||||
|
|
||||||
# [WM_ARCH_OPTION] - Memory addressing:
|
# [WM_ARCH_OPTION] - Memory addressing:
|
||||||
|
|||||||
@ -249,6 +249,10 @@ case Arm*: # Arm system compilers
|
|||||||
setenv WM_CC 'armclang'
|
setenv WM_CC 'armclang'
|
||||||
setenv WM_CXX 'armclang++'
|
setenv WM_CXX 'armclang++'
|
||||||
breaksw
|
breaksw
|
||||||
|
case Pgi*: # Pgi system compilers
|
||||||
|
setenv WM_CC 'pgcc'
|
||||||
|
setenv WM_CXX 'pgc++'
|
||||||
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
# Clear prior to sourcing
|
# Clear prior to sourcing
|
||||||
|
|||||||
@ -249,6 +249,10 @@ Arm*) # Arm system compilers
|
|||||||
export WM_CC='armclang'
|
export WM_CC='armclang'
|
||||||
export WM_CXX='armclang++'
|
export WM_CXX='armclang++'
|
||||||
;;
|
;;
|
||||||
|
Pgi*) # Pgi system compilers
|
||||||
|
export WM_CC='pgcc'
|
||||||
|
export WM_CXX='pgc++'
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Clear prior to sourcing
|
# Clear prior to sourcing
|
||||||
|
|||||||
@ -73,7 +73,7 @@ setenv WM_COMPILER_TYPE system
|
|||||||
|
|
||||||
# [WM_COMPILER] - Compiler:
|
# [WM_COMPILER] - Compiler:
|
||||||
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-5] | Gcc7[1-4] | Gcc8[12] |
|
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-5] | Gcc7[1-4] | Gcc8[12] |
|
||||||
# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm
|
# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi
|
||||||
setenv WM_COMPILER Gcc
|
setenv WM_COMPILER Gcc
|
||||||
|
|
||||||
# [WM_ARCH_OPTION] - Memory addressing:
|
# [WM_ARCH_OPTION] - Memory addressing:
|
||||||
|
|||||||
@ -65,6 +65,12 @@ Description
|
|||||||
#ifdef darwin
|
#ifdef darwin
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
// PGI does not have __int128_t
|
||||||
|
#ifdef __PGIC__
|
||||||
|
#define __ILP32__
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
7
wmake/rules/General/Pgi/c
Normal file
7
wmake/rules/General/Pgi/c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
SUFFIXES += .c
|
||||||
|
|
||||||
|
cc = pgcc
|
||||||
|
|
||||||
|
cDBUG =
|
||||||
|
cOPT = -O2
|
||||||
|
cWARN =
|
||||||
13
wmake/rules/General/Pgi/c++
Normal file
13
wmake/rules/General/Pgi/c++
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
SUFFIXES += .C .cc .cpp .cxx
|
||||||
|
|
||||||
|
CC = pgc++ -std=c++11
|
||||||
|
|
||||||
|
c++DBUG =
|
||||||
|
c++OPT = -O2
|
||||||
|
ptFLAGS = -DNoRepository
|
||||||
|
|
||||||
|
# - Standard warnings
|
||||||
|
# - Less restrictive warnings (may be needed for flex++, CGAL, etc.)
|
||||||
|
|
||||||
|
c++WARN =
|
||||||
|
c++LESSWARN =
|
||||||
5
wmake/rules/General/Pgi/openmp
Normal file
5
wmake/rules/General/Pgi/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 -fopenmp
|
||||||
|
LINK_OPENMP = -lgomp
|
||||||
14
wmake/rules/linux64Pgi/c
Normal file
14
wmake/rules/linux64Pgi/c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
include $(GENERAL_RULES)/Pgi/c
|
||||||
|
|
||||||
|
cc = pgcc -m64
|
||||||
|
|
||||||
|
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
|
||||||
|
|
||||||
|
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
|
||||||
|
|
||||||
|
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
LINK_LIBS = $(cDBUG)
|
||||||
|
|
||||||
|
LINKLIBSO = $(cc) -shared
|
||||||
|
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
|
||||||
17
wmake/rules/linux64Pgi/c++
Normal file
17
wmake/rules/linux64Pgi/c++
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
include $(GENERAL_RULES)/Pgi/c++
|
||||||
|
|
||||||
|
CC = pgc++ -std=c++11 -m64
|
||||||
|
|
||||||
|
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
|
||||||
|
|
||||||
|
c++FLAGS = $(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)
|
||||||
|
|
||||||
|
LINK_LIBS = $(c++DBUG)
|
||||||
|
|
||||||
|
LINKLIBSO = $(CC) $(c++FLAGS) -shared
|
||||||
|
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed
|
||||||
2
wmake/rules/linux64Pgi/c++Debug
Normal file
2
wmake/rules/linux64Pgi/c++Debug
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
c++DBUG = -g -DFULLDEBUG
|
||||||
|
c++OPT = -O0
|
||||||
2
wmake/rules/linux64Pgi/c++Opt
Normal file
2
wmake/rules/linux64Pgi/c++Opt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
c++DBUG =
|
||||||
|
c++OPT = -O3
|
||||||
2
wmake/rules/linux64Pgi/c++Prof
Normal file
2
wmake/rules/linux64Pgi/c++Prof
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
c++DBUG = -pg
|
||||||
|
c++OPT = -O2
|
||||||
2
wmake/rules/linux64Pgi/cDebug
Normal file
2
wmake/rules/linux64Pgi/cDebug
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
cDBUG = -g -DFULLDEBUG
|
||||||
|
cOPT = -O0
|
||||||
2
wmake/rules/linux64Pgi/cOpt
Normal file
2
wmake/rules/linux64Pgi/cOpt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
cDBUG =
|
||||||
|
cOPT = -O3
|
||||||
2
wmake/rules/linux64Pgi/cProf
Normal file
2
wmake/rules/linux64Pgi/cProf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
cDBUG = -pg
|
||||||
|
cOPT = -O2
|
||||||
9
wmake/rules/linux64Pgi/general
Normal file
9
wmake/rules/linux64Pgi/general
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||||
|
|
||||||
|
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
|
||||||
|
|
||||||
|
include $(GENERAL_RULES)/standard
|
||||||
|
## include $(GENERAL_RULES)/Pgi/openmp
|
||||||
|
|
||||||
|
include $(DEFAULT_RULES)/c
|
||||||
|
include $(DEFAULT_RULES)/c++
|
||||||
3
wmake/rules/linux64Pgi/mplibOPENMPI
Normal file
3
wmake/rules/linux64Pgi/mplibOPENMPI
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PFLAGS = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX
|
||||||
|
PINC = -I$(MPI_ARCH_PATH)/include
|
||||||
|
PLIBS = -L$(MPI_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -L$(MPI_ARCH_PATH)/lib -lmpi
|
||||||
Reference in New Issue
Block a user