Commit a2fb1d0b authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

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

parent 8b63d634
......@@ -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:
......
......@@ -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
......
......@@ -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
......
......@@ -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:
......
......@@ -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
......
SUFFIXES += .c
cc = pgcc
cDBUG =
cOPT = -O2
cWARN =
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 =
# 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
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
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
c++DBUG = -g -DFULLDEBUG
c++OPT = -O0
c++DBUG =
c++OPT = -O3
c++DBUG = -pg
c++OPT = -O2
cDBUG = -g -DFULLDEBUG
cOPT = -O0
cDBUG = -pg
cOPT = -O2
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++
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment