diff --git a/etc/bashrc b/etc/bashrc index a501405811f47a51405ef43741f3321c85519679..e0e3039ae3f20bbc98932afcf8c1cfb4b4f6ecab 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -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: diff --git a/etc/config.csh/settings b/etc/config.csh/settings index 34ecb60d912e25cd8ed76ce6bd11a58a612f1a7f..47aa3ede7214d6605b1a903dae7a9d01c86763c6 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -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 diff --git a/etc/config.sh/settings b/etc/config.sh/settings index c331a5ff5f0c92cfcc0885b4607fbb97df179dbc..149a2d9f10a5f1e8c9d2e94e0472cbbbea9b1c45 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -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 diff --git a/etc/cshrc b/etc/cshrc index 39cbff0077e8de5efaeb698b65b9eb56b5982d8d..098d8856986fc54176585c13632a63550583d45f 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -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: diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index a57ec11949781881e7ec403b2dd51b58443a7d59..d888ccfcb891d595f36006f67f58438484d47222 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -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 diff --git a/wmake/rules/General/Pgi/c b/wmake/rules/General/Pgi/c new file mode 100644 index 0000000000000000000000000000000000000000..861c12bdb151c40f8f4de2842102212a0b89d93f --- /dev/null +++ b/wmake/rules/General/Pgi/c @@ -0,0 +1,7 @@ +SUFFIXES += .c + +cc = pgcc + +cDBUG = +cOPT = -O2 +cWARN = diff --git a/wmake/rules/General/Pgi/c++ b/wmake/rules/General/Pgi/c++ new file mode 100644 index 0000000000000000000000000000000000000000..39a8ec884f27d29c1c99e085ef6836b5b213d236 --- /dev/null +++ b/wmake/rules/General/Pgi/c++ @@ -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 = diff --git a/wmake/rules/General/Pgi/openmp b/wmake/rules/General/Pgi/openmp new file mode 100644 index 0000000000000000000000000000000000000000..cd007d152913387c2d85d48b65478cbcff769b71 --- /dev/null +++ b/wmake/rules/General/Pgi/openmp @@ -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 diff --git a/wmake/rules/linux64Pgi/c b/wmake/rules/linux64Pgi/c new file mode 100644 index 0000000000000000000000000000000000000000..3a9204233eb7ef69108b894ad196dc7793f2edc3 --- /dev/null +++ b/wmake/rules/linux64Pgi/c @@ -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 diff --git a/wmake/rules/linux64Pgi/c++ b/wmake/rules/linux64Pgi/c++ new file mode 100644 index 0000000000000000000000000000000000000000..4fc97794e8a98eb25fa9a65773565109d8157aa1 --- /dev/null +++ b/wmake/rules/linux64Pgi/c++ @@ -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 diff --git a/wmake/rules/linux64Pgi/c++Debug b/wmake/rules/linux64Pgi/c++Debug new file mode 100644 index 0000000000000000000000000000000000000000..48f0b6643e18406a22b768923aa876a312269ea1 --- /dev/null +++ b/wmake/rules/linux64Pgi/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -g -DFULLDEBUG +c++OPT = -O0 diff --git a/wmake/rules/linux64Pgi/c++Opt b/wmake/rules/linux64Pgi/c++Opt new file mode 100644 index 0000000000000000000000000000000000000000..2aedabd6280a3476bc58db13139a0a3aa579502b --- /dev/null +++ b/wmake/rules/linux64Pgi/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linux64Pgi/c++Prof b/wmake/rules/linux64Pgi/c++Prof new file mode 100644 index 0000000000000000000000000000000000000000..3bda4dad55e898a8198f6e8bfe21e8d829d7230a --- /dev/null +++ b/wmake/rules/linux64Pgi/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Pgi/cDebug b/wmake/rules/linux64Pgi/cDebug new file mode 100644 index 0000000000000000000000000000000000000000..7b7adf10deade9c64833672b98de8ace4fb61a0e --- /dev/null +++ b/wmake/rules/linux64Pgi/cDebug @@ -0,0 +1,2 @@ +cDBUG = -g -DFULLDEBUG +cOPT = -O0 diff --git a/wmake/rules/linux64Pgi/cOpt b/wmake/rules/linux64Pgi/cOpt new file mode 100644 index 0000000000000000000000000000000000000000..17318709f1fa39e6bf89cbe87778bc6fa459de17 --- /dev/null +++ b/wmake/rules/linux64Pgi/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Pgi/cProf b/wmake/rules/linux64Pgi/cProf new file mode 100644 index 0000000000000000000000000000000000000000..ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7 --- /dev/null +++ b/wmake/rules/linux64Pgi/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Pgi/general b/wmake/rules/linux64Pgi/general new file mode 100644 index 0000000000000000000000000000000000000000..91cca018b67869691a2e27ba803971268a2503ec --- /dev/null +++ b/wmake/rules/linux64Pgi/general @@ -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++ diff --git a/wmake/rules/linux64Pgi/mplibOPENMPI b/wmake/rules/linux64Pgi/mplibOPENMPI new file mode 100644 index 0000000000000000000000000000000000000000..0faf49ed1e5df5df4ba4ae67fe6d9e8210858e39 --- /dev/null +++ b/wmake/rules/linux64Pgi/mplibOPENMPI @@ -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