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 |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2017-2020 OpenCFD Ltd.
# Copyright (C) 2017-2021 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -25,6 +25,7 @@
# define the underlying compiler to be used
#
# User adjustments are controlled by these types of files:
# - config.sh/prefs.fjmpi
# - config.sh/prefs.intelmpi
# - config.sh/prefs.mpich
# - config.sh/prefs.mpich-gm
@ -289,12 +290,27 @@ MPI)
FJMPI)
export FOAM_MPI=fjmpi
export MPI_ARCH_PATH=/opt/FJSVmpi2
_foamEtc -config prefs.fjmpi ## Optional adjustments
_foamAddPath "$MPI_ARCH_PATH"/bin
_foamAddLib "$MPI_ARCH_PATH"/lib/sparcv9
_foamAddLib /opt/FSUNf90/lib/sparcv9
_foamAddLib /opt/FJSVpnidt/lib
# MPI_ARCH_PATH (prefs) or MPI_ROOT (inherited), in that order
if [ -n "$MPI_ARCH_PATH" ]
then
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
;;