diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi index b937beb4b7d9091f8767de3b1f4b6fe21c9ae30d..13f56b64017de57332d00b38ce427833f427dca8 100644 --- a/etc/config.csh/mpi +++ b/etc/config.csh/mpi @@ -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.csh/prefs.fjmpi # - config.csh/prefs.intelmpi # - config.csh/prefs.mpich # - config.csh/prefs.mpich-gm @@ -223,7 +224,7 @@ case CRAY-MPICH: setenv MPI_ARCH_PATH "$MPICH_DIR" 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 "Please set MPICH_DIR correctly" endif @@ -269,12 +270,24 @@ case MPI: case FJMPI: setenv FOAM_MPI fjmpi - setenv 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 ( "$MPI_ARCH_PATH" != "" ) then + setenv MPI_ROOT "$MPI_ARCH_PATH" + 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 @@ -297,7 +310,7 @@ case SGIMPI: setenv MPI_ARCH_PATH "$MPI_ROOT" 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 "Please set MPI_ROOT correctly" endif @@ -339,8 +352,8 @@ case INTELMPI*: endsw else - echo "${_foamMpiWarning}invalid $WM_MPLIB directory" 1>&2 - echo " => ${MPI_ARCH_PATH}" 1>&2 + echo "${_foamMpiWarning}invalid $WM_MPLIB directory" + echo " => ${MPI_ARCH_PATH}" echo "Please set I_MPI_ROOT or MPI_ROOT correctly." endif diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview index b31d544d7395037501e8a703ab8e9ef22e6b7085..26739ade592fd8268299169a5cbd9911f24033d6 100644 --- a/etc/config.csh/paraview +++ b/etc/config.csh/paraview @@ -125,7 +125,7 @@ case "system": if ($?FOAM_VERBOSE && $?prompt) then if ( $?pv_plugin_dir ) then echo "Using paraview (system)" - echo " plugins : ${pv_plugin_dir}" 1>&2 + echo " plugins : ${pv_plugin_dir}" else echo "system paraview (not found)" endif diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index 69617b1badb82922c238fd3060ab448b94ff93eb..04e6219a0f31fdc7475f522780c47ecf2c363ad9 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -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 ;; diff --git a/wmake/rules/General/mplibFJMPI b/wmake/rules/General/mplibFJMPI new file mode 100644 index 0000000000000000000000000000000000000000..d61ebf8c3dc2a9badde2453c0c74d3a079efc7d0 --- /dev/null +++ b/wmake/rules/General/mplibFJMPI @@ -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