CONFIG: update/generalize FJMPI settings (#2044)

- previously had a very old (likely irrelevant) setting for solaris
  systems only.

- support site-specific customization.
  Eg, using etc/config.{csh,sh}/prefs.fjmpi

- remove erroneous shell redirects present in cshell files
This commit is contained in:
Tomoki, Karatsu
2021-03-29 11:14:34 +02:00
committed by Mark Olesen
parent b0e6c1fcd3
commit 13ea1b70fe
4 changed files with 49 additions and 17 deletions

View File

@ -6,7 +6,7 @@
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation # Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2017-2020 OpenCFD Ltd. # Copyright (C) 2017-2021 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -25,6 +25,7 @@
# define the underlying compiler to be used # define the underlying compiler to be used
# #
# User adjustments are controlled by these types of files: # User adjustments are controlled by these types of files:
# - config.csh/prefs.fjmpi
# - config.csh/prefs.intelmpi # - config.csh/prefs.intelmpi
# - config.csh/prefs.mpich # - config.csh/prefs.mpich
# - config.csh/prefs.mpich-gm # - config.csh/prefs.mpich-gm
@ -223,7 +224,7 @@ case CRAY-MPICH:
setenv MPI_ARCH_PATH "$MPICH_DIR" setenv MPI_ARCH_PATH "$MPICH_DIR"
if ( ! -d "$MPI_ARCH_PATH" ) then if ( ! -d "$MPI_ARCH_PATH" ) then
echo "%{_foamMpiWarning}invalid $WM_MPLIB directory" 1>&2 echo "%{_foamMpiWarning}invalid $WM_MPLIB directory"
echo " => $MPI_ARCH_PATH" echo " => $MPI_ARCH_PATH"
echo "Please set MPICH_DIR correctly" echo "Please set MPICH_DIR correctly"
endif endif
@ -269,12 +270,24 @@ case MPI:
case FJMPI: case FJMPI:
setenv FOAM_MPI fjmpi setenv FOAM_MPI fjmpi
setenv MPI_ARCH_PATH /opt/FJSVmpi2 _foamEtc -config prefs.fjmpi ## Optional adjustments
_foamAddPath "$MPI_ARCH_PATH"/bin # MPI_ARCH_PATH (prefs) or MPI_ROOT (inherited), in that order
_foamAddLib "$MPI_ARCH_PATH"/lib/sparcv9 if ( "$MPI_ARCH_PATH" != "" ) then
_foamAddLib /opt/FSUNf90/lib/sparcv9 setenv MPI_ROOT "$MPI_ARCH_PATH"
_foamAddLib /opt/FJSVpnidt/lib else if ( $?MPI_ROOT ) then
setenv MPI_ARCH_PATH "$MPI_ROOT"
endif
if ( -d "$MPI_ARCH_PATH" ) then
setenv OPAL_PREFIX "$MPI_ARCH_PATH" # An openmpi-derivative
_foamAddPath "$MPI_ARCH_PATH"/bin
_foamAddLib "$MPI_ARCH_PATH"/lib64
else
echo "%{_foamMpiWarning}invalid $WM_MPLIB directory"
echo " => ${MPI_ARCH_PATH:-unset}"
echo "Please set MPI_ARCH_PATH or MPI_ROOT correctly"
endif
breaksw breaksw
@ -297,7 +310,7 @@ case SGIMPI:
setenv MPI_ARCH_PATH "$MPI_ROOT" setenv MPI_ARCH_PATH "$MPI_ROOT"
if ( ! -d "$MPI_ARCH_PATH" ) then if ( ! -d "$MPI_ARCH_PATH" ) then
echo "%{_foamMpiWarning}invalid $WM_MPLIB directory" 1>&2 echo "%{_foamMpiWarning}invalid $WM_MPLIB directory"
echo " => $MPI_ARCH_PATH" echo " => $MPI_ARCH_PATH"
echo "Please set MPI_ROOT correctly" echo "Please set MPI_ROOT correctly"
endif endif
@ -339,8 +352,8 @@ case INTELMPI*:
endsw endsw
else else
echo "${_foamMpiWarning}invalid $WM_MPLIB directory" 1>&2 echo "${_foamMpiWarning}invalid $WM_MPLIB directory"
echo " => ${MPI_ARCH_PATH}" 1>&2 echo " => ${MPI_ARCH_PATH}"
echo "Please set I_MPI_ROOT or MPI_ROOT correctly." echo "Please set I_MPI_ROOT or MPI_ROOT correctly."
endif endif

View File

@ -125,7 +125,7 @@ case "system":
if ($?FOAM_VERBOSE && $?prompt) then if ($?FOAM_VERBOSE && $?prompt) then
if ( $?pv_plugin_dir ) then if ( $?pv_plugin_dir ) then
echo "Using paraview (system)" echo "Using paraview (system)"
echo " plugins : ${pv_plugin_dir}" 1>&2 echo " plugins : ${pv_plugin_dir}"
else else
echo "system paraview (not found)" echo "system paraview (not found)"
endif endif

View File

@ -6,7 +6,7 @@
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation # Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2017-2020 OpenCFD Ltd. # Copyright (C) 2017-2021 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -25,6 +25,7 @@
# define the underlying compiler to be used # define the underlying compiler to be used
# #
# User adjustments are controlled by these types of files: # User adjustments are controlled by these types of files:
# - config.sh/prefs.fjmpi
# - config.sh/prefs.intelmpi # - config.sh/prefs.intelmpi
# - config.sh/prefs.mpich # - config.sh/prefs.mpich
# - config.sh/prefs.mpich-gm # - config.sh/prefs.mpich-gm
@ -289,12 +290,27 @@ MPI)
FJMPI) FJMPI)
export FOAM_MPI=fjmpi export FOAM_MPI=fjmpi
export MPI_ARCH_PATH=/opt/FJSVmpi2 _foamEtc -config prefs.fjmpi ## Optional adjustments
_foamAddPath "$MPI_ARCH_PATH"/bin # MPI_ARCH_PATH (prefs) or MPI_ROOT (inherited), in that order
_foamAddLib "$MPI_ARCH_PATH"/lib/sparcv9 if [ -n "$MPI_ARCH_PATH" ]
_foamAddLib /opt/FSUNf90/lib/sparcv9 then
_foamAddLib /opt/FJSVpnidt/lib export MPI_ROOT="$MPI_ARCH_PATH"
elif [ -n "$MPI_ROOT" ]
then
export MPI_ARCH_PATH="$MPI_ROOT"
fi
if [ -d "$MPI_ARCH_PATH" ]
then
export OPAL_PREFIX="$MPI_ARCH_PATH" # An openmpi-derivative
_foamAddPath "$MPI_ARCH_PATH"/bin
_foamAddLib "$MPI_ARCH_PATH"/lib64
else
echo "%{_foamMpiWarning}invalid $WM_MPLIB directory" 1>&2
echo " => ${MPI_ARCH_PATH:-unset}" 1>&2
echo "Please set MPI_ARCH_PATH or MPI_ROOT correctly" 1>&2
fi
;; ;;

View File

@ -0,0 +1,3 @@
PFLAGS = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include/mpi/fujitsu
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi