From e400725675b2d2cbb8b77099c43775f97851b0f6 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 2 Aug 2019 12:17:39 +0200 Subject: [PATCH] CONFIG: add sourcing hints for adios2, petsc --- etc/config.csh/adios1 | 2 +- etc/config.csh/adios2 | 2 +- etc/config.sh/adios1 | 4 ++-- etc/config.sh/adios2 | 4 ++-- etc/config.sh/petsc | 3 ++- wmake/scripts/have_adios2 | 18 +++++++++++++++++- wmake/scripts/have_petsc | 18 +++++++++++++++++- 7 files changed, 42 insertions(+), 9 deletions(-) diff --git a/etc/config.csh/adios1 b/etc/config.csh/adios1 index 108a8ee6f64..5457d09e350 100644 --- a/etc/config.csh/adios1 +++ b/etc/config.csh/adios1 @@ -42,7 +42,7 @@ if ($?FOAM_VERBOSE && $?prompt) then echo "Using adios ($adios1_version) -> $ADIOS1_ARCH_PATH" endif -# - only add if the directory really exists +# Only add to PATH if the directory really exists _foamAddLibAuto $ADIOS1_ARCH_PATH if ($status == 0) then _foamAddPath $ADIOS1_ARCH_PATH/bin diff --git a/etc/config.csh/adios2 b/etc/config.csh/adios2 index 81f21962041..8265ed0e75b 100644 --- a/etc/config.csh/adios2 +++ b/etc/config.csh/adios2 @@ -28,7 +28,7 @@ if ($?FOAM_VERBOSE && $?prompt) then echo "Using adios ($adios2_version) -> $ADIOS2_ARCH_PATH" endif -# - only add if the directory really exists +# Only add to PATH if the directory really exists _foamAddLibAuto $ADIOS2_ARCH_PATH if ($status == 0) then _foamAddPath $ADIOS2_ARCH_PATH/bin diff --git a/etc/config.sh/adios1 b/etc/config.sh/adios1 index f9393fe03bb..330da7dceb7 100644 --- a/etc/config.sh/adios1 +++ b/etc/config.sh/adios1 @@ -44,8 +44,8 @@ fi if command -v _foamAddLibAuto > /dev/null 2>&1 then - # Normal sourcing (not makeADIOS) - # - but only add if the directory really exists + # Normal sourcing (not makeAdios1) + # Only add to PATH if the directory really exists if _foamAddLibAuto $ADIOS1_ARCH_PATH then diff --git a/etc/config.sh/adios2 b/etc/config.sh/adios2 index 515d5864983..0c592fdc4a3 100644 --- a/etc/config.sh/adios2 +++ b/etc/config.sh/adios2 @@ -32,8 +32,8 @@ fi if command -v _foamAddLibAuto > /dev/null 2>&1 then - # Normal sourcing (not makeADIOS) - # - but only add if the directory really exists + # Normal sourcing (not makeAdios2) + # Only add to PATH if the directory really exists if _foamAddLibAuto $ADIOS2_ARCH_PATH then diff --git a/etc/config.sh/petsc b/etc/config.sh/petsc index 31047027647..d6b0e787a51 100644 --- a/etc/config.sh/petsc +++ b/etc/config.sh/petsc @@ -36,8 +36,9 @@ then echo "Using petsc ($petsc_version) -> $PETSC_ARCH_PATH" 1>&2 fi -if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makePETSC) +if command -v _foamAddLibAuto > /dev/null 2>&1 then + # Normal sourcing (not makePETSC) _foamAddLibAuto $PETSC_ARCH_PATH diff --git a/wmake/scripts/have_adios2 b/wmake/scripts/have_adios2 index 7a09259acd2..e293e04cb25 100644 --- a/wmake/scripts/have_adios2 +++ b/wmake/scripts/have_adios2 @@ -19,7 +19,7 @@ # ADIOS2_ARCH_PATH # # Functions provided -# have_adios2, no_adios2, echo_adios2 +# have_adios2, no_adios2, echo_adios2, hint_adios2 # # Variables set on success # HAVE_ADIOS2 @@ -50,6 +50,22 @@ echo_adios2() } +# Provide hint for enabling +hint_adios2() +{ + /bin/cat<<INFORMATION 1>&2 +==> adios2 not found? + +Enable in the OpenFOAM etc/bashrc, define manually or try with the +following (POSIX shell): + + eval \$(foamEtcFile -sh -config adios2 -- -force) + +== +INFORMATION +} + + # On success, return 0 and export variables # -> HAVE_ADIOS2, ADIOS2_INC_DIR, ADIOS2_LIB_DIR have_adios2() diff --git a/wmake/scripts/have_petsc b/wmake/scripts/have_petsc index ead138b78e9..dd4764666c8 100644 --- a/wmake/scripts/have_petsc +++ b/wmake/scripts/have_petsc @@ -19,7 +19,7 @@ # PETSC_ARCH_PATH # # Functions provided -# have_petsc, no_petsc, echo_petsc +# have_petsc, no_petsc, echo_petsc, hint_petsc # # Variables set on success # HAVE_PETSC @@ -50,6 +50,22 @@ echo_petsc() } +# Provide hint for enabling +hint_petsc() +{ + /bin/cat<<INFORMATION 1>&2 +==> petsc not found? + +Enable in the OpenFOAM etc/bashrc, define manually or try with the +following (POSIX shell): + + eval \$(foamEtcFile -sh -config petsc -- -force) + +== +INFORMATION +} + + # On success, return 0 and export variables # -> HAVE_PETSC, PETSC_INC_DIR, PETSC_LIB_DIR have_petsc() -- GitLab