CONFIG: improve robustness/flexibility for MPI config handling

- use orte-info to determine prefix/libdir for openmpi.
  This removes a run-time dependency on mpicc, which is actually
  only needed for building with MPI (not running with MPI).
  The corresponding openmpi devel package (deb/rpm) will not
  necessarily be installed on a particular system.

- retain mpicc logic if the new logic using orte-info does not
  deliver an answer. Final fallback to using 'orterun' to
  infer prefix/libdir.

- Additional logic for intel and msmpi to make it easier to
  locate these vendor packages within ThirdParty
  (ie, under ThirdParty/opt/...)

CONFIG: improve robustness

- add check for absolute path when adding PATH/LD_LIBRARY_PATH etc.

- prefix more variables with '_foam*' to prevent accidental overwrite
  of userspace shell variables when sourcing
This commit is contained in:
Mark Olesen
2021-10-14 10:18:38 +02:00
parent f61228ae38
commit 16d48ed047
18 changed files with 288 additions and 130 deletions

View File

@ -9,8 +9,7 @@
# Copyright (C) 2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# etc/config.csh/complete-wrapper
@ -38,14 +37,14 @@ then
fi
# Preload completion cache
if [ -f $WM_PROJECT_DIR/etc/config.sh/completion_cache ]
then . $WM_PROJECT_DIR/etc/config.sh/completion_cache
if [ -f "$WM_PROJECT_DIR"/etc/config.sh/completion_cache ]
then . "$WM_PROJECT_DIR"/etc/config.sh/completion_cache
fi
# Use the bash completion function, but retain cache etc.
_of_complete_tcsh=true
if [ -f $WM_PROJECT_DIR/etc/config.sh/bash_completion ]
then . $WM_PROJECT_DIR/etc/config.sh/bash_completion
if [ -f "$WM_PROJECT_DIR"/etc/config.sh/bash_completion ]
then . "$WM_PROJECT_DIR"/etc/config.sh/bash_completion
else
# Could warn about missing file, or treat silently
echo