COMP: add wmake rules for Pgi compiler (#1234)

This commit is contained in:
Mark Olesen 2019-03-11 15:56:40 +01:00 committed by Andrew Heather
parent 8b63d63444
commit a2fb1d0bdd
18 changed files with 96 additions and 2 deletions

View File

@ -71,7 +71,7 @@ export WM_COMPILER_TYPE=system
# [WM_COMPILER] - Compiler:
# = 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
# [WM_ARCH_OPTION] - Memory addressing:

View File

@ -249,6 +249,10 @@ case Arm*: # Arm system compilers
setenv WM_CC 'armclang'
setenv WM_CXX 'armclang++'
breaksw
case Pgi*: # Pgi system compilers
setenv WM_CC 'pgcc'
setenv WM_CXX 'pgc++'
breaksw
endsw
# Clear prior to sourcing

View File

@ -249,6 +249,10 @@ Arm*) # Arm system compilers
export WM_CC='armclang'
export WM_CXX='armclang++'
;;
Pgi*) # Pgi system compilers
export WM_CC='pgcc'
export WM_CXX='pgc++'
;;
esac
# Clear prior to sourcing

View File

@ -73,7 +73,7 @@ setenv WM_COMPILER_TYPE system
# [WM_COMPILER] - Compiler:
# = 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
# [WM_ARCH_OPTION] - Memory addressing:

View File

@ -65,6 +65,12 @@ Description
#ifdef darwin
#include <mach-o/dyld.h>
#else
// PGI does not have __int128_t
#ifdef __PGIC__
#define __ILP32__
#endif
#include <link.h>
#endif

View File

@ -0,0 +1,7 @@
SUFFIXES += .c
cc = pgcc
cDBUG =
cOPT = -O2
cWARN =

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

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 -fopenmp
LINK_OPENMP = -lgomp

14
wmake/rules/linux64Pgi/c Normal file
View 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

View 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

View File

@ -0,0 +1,2 @@
c++DBUG = -g -DFULLDEBUG
c++OPT = -O0

View File

@ -0,0 +1,2 @@
c++DBUG =
c++OPT = -O3

View File

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View File

@ -0,0 +1,2 @@
cDBUG = -g -DFULLDEBUG
cOPT = -O0

View File

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View File

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

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

View 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