Commit 00852f9e authored by Mark Olesen's avatar Mark Olesen
Browse files

CONFIG: add Cray compiler, cray mpich settings, wmake rules (fixes #558)

- the cray C/C++ compilers appear to be option-compatible with gcc.

- no wmake rules for 32bit builds (deemed to be unnecessary)
parent 7cadae56
......@@ -65,7 +65,7 @@ export WM_COMPILER_TYPE=system
#- Compiler:
# WM_COMPILER = Gcc | Gcc4[8-9] | Gcc5[1-4] | Gcc6[1-3] | GccKNL
# | Clang | Clang3[8-9] | Clang40 | Icc | IccKNL
# | Clang | Clang3[8-9] | Clang40 | Icc | IccKNL | Cray
export WM_COMPILER=Gcc
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
......@@ -89,7 +89,7 @@ export WM_COMPILE_OPTION=Opt
#- MPI implementation:
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPICH | MPICH-GM | HPMPI
# | MPI | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
# | MPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
export WM_MPLIB=SYSTEMOPENMPI
#- Operating System:
......
......@@ -141,6 +141,28 @@ case MPICH-GM:
_foamAddLib $GM_LIB_PATH
breaksw
case CRAY-MPICH:
if ( ! $?MPICH_DIR ) setenv MPICH_DIR /dev/null
setenv FOAM_MPI cray-mpich
setenv MPI_ARCH_PATH $MPICH_DIR
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using $WM_MPLIB"
echo " FOAM_MPI : $FOAM_MPI"
echo " MPICH_DIR : $MPI_ARCH_PATH"
endif
if ( ! -d "$MPI_ARCH_PATH" ) then
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/mpi:"
echo " Not a valid $WM_MPLIB installation directory."
echo " Please set MPICH_DIR properly."
echo " Currently using '$MPI_ARCH_PATH'"
endif
# _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
breaksw
case HPMPI:
setenv FOAM_MPI hpmpi
setenv MPI_HOME /opt/hpmpi
......
......@@ -214,12 +214,17 @@ if (! $?WM_COMPILER_TYPE ) setenv WM_COMPILER_TYPE system
# Adjustments for non-gcc compilers
switch ("$WM_COMPILER")
case Clang*:
# Using clang - not gcc
# Using clang compiler suite
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
breaksw
case Cray*:
# Using cray system compilers
setenv WM_CC 'cc'
setenv WM_CXX 'CC'
breaksw
case Icc*:
# Using icc - not gcc
# Using intel compilers
setenv WM_CC 'icc'
setenv WM_CXX 'icpc'
breaksw
......
......@@ -160,6 +160,28 @@ MPICH-GM)
_foamAddLib $GM_LIB_PATH
;;
CRAY-MPICH)
export FOAM_MPI=cray-mpich
export MPI_ARCH_PATH=$MPICH_DIR
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using $WM_MPLIB" 1>&2
echo " FOAM_MPI : $FOAM_MPI" 1>&2
echo " MPICH_DIR : $MPI_ARCH_PATH" 1>&2
fi
[ -d "$MPI_ARCH_PATH" ] || {
echo "Warning in $WM_PROJECT_DIR/etc/config.sh/mpi:" 1>&2
echo " Not a valid $WM_MPLIB installation directory." 1>&2
echo " Please set MPICH_DIR properly" 1>&2
echo " Currently using '$MPI_ARCH_PATH'" 1>&2
}
# _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
;;
HPMPI)
export FOAM_MPI=hpmpi
export MPI_HOME=/opt/hpmpi
......
......@@ -216,12 +216,17 @@ _foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN
# Adjust for non-gcc compilers
case "$WM_COMPILER" in
Clang*)
# Using clang - not gcc
# Using clang compiler suite
export WM_CC='clang'
export WM_CXX='clang++'
;;
Cray*)
# Using cray system compilers
export WM_CC='cc'
export WM_CXX='CC'
;;
Icc*)
# Using icc - not gcc
# Using intel compilers
export WM_CC='icc'
export WM_CXX='icpc'
;;
......
......@@ -61,7 +61,7 @@ setenv WM_COMPILER_TYPE system
#- Compiler:
# WM_COMPILER = Gcc | Gcc4[8-9] | Gcc5[1-4] | Gcc6[1-3] | GccKNL
# | Clang | Clang3[8-9] | Clang40 | Icc | IccKNL
# | Clang | Clang3[8-9] | Clang40 | Icc | IccKNL | Cray
setenv WM_COMPILER Gcc
setenv WM_COMPILER_ARCH # defined but empty
unsetenv WM_COMPILER_LIB_ARCH
......@@ -86,7 +86,7 @@ setenv WM_COMPILE_OPTION Opt
#- MPI implementation:
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPICH | MPICH-GM | HPMPI
# | MPI | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
# | MPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
setenv WM_MPLIB SYSTEMOPENMPI
#- Operating System:
......
include $(GENERAL_RULES)/mplibMPICH
SUFFIXES += .c
cWARN = -Wall
cc = cc -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
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = CC -std=c++11 -m64
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-100
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 -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline
c++DBUG =
c++OPT = -O3
ROUNDING_MATH = -frounding-math
c++DBUG = -pg
c++OPT = -O2
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions
cDBUG = -pg
cOPT = -O2
CPP = cpp -traditional-cpp $(GFLAGS)
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
# include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
# Flags for compiling/linking openmp
COMP_OPENMP = -DUSE_OMP -fopenmp
LINK_OPENMP = -lgomp
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