diff --git a/etc/config.csh/example/paraview b/etc/config.csh/example/paraview index 47747cafad..b65dd6a07d 100644 --- a/etc/config.csh/example/paraview +++ b/etc/config.csh/example/paraview @@ -35,7 +35,7 @@ #------------------------------------------------------------------------------ # -# Use other (shipped) paraview.csh with a different ParaView_VERSION +# Use other (shipped) paraview with a different ParaView_VERSION # set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config.csh/paraview` diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi index 876357d435..b039588486 100644 --- a/etc/config.csh/mpi +++ b/etc/config.csh/mpi @@ -60,6 +60,12 @@ case OPENMPI: # Tell OpenMPI where to find its install directory setenv OPAL_PREFIX $MPI_ARCH_PATH + if ($?FOAM_VERBOSE && $?prompt) then + echo "Using OPENMPI:" + echo " OPAL_PREFIX : $OPAL_PREFIX" + echo " FOAM_MPI : $FOAM_MPI" + endif + _foamAddPath $MPI_ARCH_PATH/bin _foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH _foamAddMan $MPI_ARCH_PATH/share/man diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview index 50973a93d4..65209feb57 100644 --- a/etc/config.csh/paraview +++ b/etc/config.csh/paraview @@ -66,7 +66,8 @@ if ( $status == 0 ) setenv PATH $cleaned # ThirdParty cmake set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version if ( -r $cmake/bin/cmake ) then - _foamAddPath $cmake/bin + # _foamAddPath not available when foamPV alias is used + setenv PATH $cmake/bin:${PATH} endif # Evaluate command-line parameters for ParaView @@ -101,12 +102,11 @@ if ( $?ParaView_VERSION ) then set pvName=ParaView-$ParaView_VERSION set pvMajor=paraview-$ParaView_MAJOR - set pvSrcDir=$WM_THIRD_PARTY_DIR/$pvName setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$pvName - # Set paths if binaries or source are present - if ( -r $ParaView_DIR || -r $pvSrcDir ) then + # Set paths if binaries are present + if ( -r $ParaView_DIR ) then set pvLibDir=${ParaView_DIR}/lib/$pvMajor set pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping @@ -132,13 +132,18 @@ if ( $?ParaView_VERSION ) then echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH" endif else + if ($?FOAM_VERBOSE && $?prompt) then + echo "No paraview found" + echo " ParaView_DIR : $ParaView_DIR" + endif + unsetenv ParaView_INCLUDE_DIR PV_PLUGIN_PATH setenv ParaView_DIR # Defined but empty (used by foamPV alias) endif endif -unset cleaned cmake cmake_version pvName pvMajor pvSrcDir pvLibDir pvPython -unsetenv ParaView_VERSION ParaView_MAJOR +unset cleaned cmake cmake_version pvName pvMajor pvLibDir pvPython +unsetenv ParaView_MAJOR ParaView_VERSION #------------------------------------------------------------------------------ diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index d887268588..9e64803838 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -63,6 +63,13 @@ OPENMPI) # Tell OpenMPI where to find its install directory export OPAL_PREFIX=$MPI_ARCH_PATH + if [ "$FOAM_VERBOSE" -a "$PS1" ] + then + echo "Using OPENMPI:" 1>&2 + echo " OPAL_PREFIX : $OPAL_PREFIX" 1>&2 + echo " FOAM_MPI : $FOAM_MPI" 1>&2 + fi + _foamAddPath $MPI_ARCH_PATH/bin _foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH _foamAddMan $MPI_ARCH_PATH/share/man diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index 99a379422c..1ae361d8bf 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -49,6 +49,9 @@ # export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-5.2:$LD_LIBRARY_PATH # unset ParaView_VERSION # avoid using ThirdParty settings # +# Note +# When _foamAddLib is unset (eg, called from makeParaView or from foamPV): +# - the ParaView_VERSION variable is retained. #------------------------------------------------------------------------------ ParaView_VERSION=5.2.0 @@ -70,7 +73,8 @@ cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \ cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version if [ -r $cmake/bin/cmake ] then - _foamAddPath $cmake/bin + # _foamAddPath not available when foamPV function is used + PATH=$cmake/bin:$PATH fi # Evaluate command-line parameters for ParaView @@ -112,12 +116,11 @@ then pvName=ParaView-$ParaView_VERSION pvMajor=paraview-$ParaView_MAJOR - pvSrcDir=$WM_THIRD_PARTY_DIR/$pvName export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$pvName # Set paths if binaries or source are present - if [ -r $ParaView_DIR -o -r $pvSrcDir ] + if [ -r $ParaView_DIR ] then pvLibDir=$ParaView_DIR/lib/$pvMajor pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping @@ -147,13 +150,24 @@ then echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH" fi else + if [ "$FOAM_VERBOSE" -a "$PS1" ] + then + echo "No paraview found" + echo " ParaView_DIR : $ParaView_DIR" + fi + unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH fi fi unset -f _foamParaviewEval -unset cleaned cmake cmake_version pvName pvMajor pvSrcDir pvLibDir pvPython -unset ParaView_VERSION ParaView_MAJOR +unset cleaned cmake cmake_version pvName pvMajor pvLibDir pvPython +unset ParaView_MAJOR + +if type _foamAddLib > /dev/null 2>&1 # normal sourcing +then + unset ParaView_VERSION +fi #------------------------------------------------------------------------------