From 0fa923d3d598e39363cb4d0f865b3a9848bec91f Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 6 Jan 2019 15:16:10 +0100 Subject: [PATCH] CONFIG: adjust intel-mpi paths (issue #1153) - and support setting cmake_version within the paraview config files --- etc/config.csh/mpi | 12 +++++++++--- etc/config.csh/paraview | 21 +++++++++++---------- etc/config.sh/mpi | 13 ++++++++++--- etc/config.sh/paraview | 24 ++++++++++++------------ 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi index 0dcad59332..cb7f278d51 100644 --- a/etc/config.csh/mpi +++ b/etc/config.csh/mpi @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -300,8 +300,14 @@ case INTELMPI: echo " Currently using '$MPI_ARCH_PATH'" endif - _foamAddPath $MPI_ARCH_PATH/bin64 - _foamAddLib $MPI_ARCH_PATH/lib64 + # Newer versions (5.0.3 or earlier?) with intel64/bin ... + if ( -d "$MPI_ARCH_PATH/intel64/bin" ) then + _foamAddPath "$MPI_ARCH_PATH/intel64/bin" + _foamAddLib "$MPI_ARCH_PATH/intel64/lib" + else + _foamAddPath "$MPI_ARCH_PATH/bin64" + _foamAddLib "$MPI_ARCH_PATH/lib64" + endif breaksw endsw diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview index a0fb0c6351..29d1914d02 100644 --- a/etc/config.csh/paraview +++ b/etc/config.csh/paraview @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -29,7 +29,7 @@ # ParaView_DIR # PV_PLUGIN_PATH # The OpenFOAM plugin must be the first in PV_PLUGIN_PATH and have -# paraview-major.minor version encoded in its name. +# paraview-major.minor encoded in its name. # # For central installations not located under ThirdParty, the environment # values must be set manually. For example, @@ -66,16 +66,10 @@ set archDir="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER" eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=PATH "$ParaView_DIR $archDir/ParaView- $archDir/qt- $archDir/cmake-"` eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=LD_LIBRARY_PATH "$ParaView_DIR $archDir/ParaView- $archDir/qt-"` -# ThirdParty cmake -set cmake="$archDir/$cmake_version" -if ( -r "$cmake/bin/cmake" ) then - # _foamAddPath not available when foamPV alias is used - setenv PATH "$cmake/bin:${PATH}" -endif - -# Evaluate command-line parameters for ParaView +# Evaluate command-line parameters for ParaView and cmake while ( $#argv > 0 ) switch ($argv[1]) + case cmake*=*: case ParaView*=*: # name=value -> set name=value eval "set $argv[1]" @@ -84,6 +78,13 @@ while ( $#argv > 0 ) shift end +# ThirdParty cmake +set cmake="$archDir/$cmake_version" +if ( -r "$cmake/bin/cmake" ) then + # _foamAddPath not available when foamPV alias is used + setenv PATH "$cmake/bin:${PATH}" +endif + if ($?ParaView_VERSION) then switch ("$ParaView_VERSION") case "": diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index 28b95885d3..4f0bd9545a 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -303,8 +303,15 @@ INTELMPI) export FOAM_MPI MPI_ARCH_PATH - _foamAddPath $MPI_ARCH_PATH/bin64 - _foamAddLib $MPI_ARCH_PATH/lib64 + # Newer versions (5.0.3 or earlier?) with intel64/bin ... + if [ -d "$MPI_ARCH_PATH/intel64/bin" ] + then + _foamAddPath "$MPI_ARCH_PATH/intel64/bin" + _foamAddLib "$MPI_ARCH_PATH/intel64/lib" + else + _foamAddPath "$MPI_ARCH_PATH/bin64" + _foamAddLib "$MPI_ARCH_PATH/lib64" + fi ;; esac diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index 87ba79beb9..7538f3ca47 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -71,6 +71,17 @@ eval \ "$($WM_PROJECT_DIR/bin/foamCleanPath -sh-env=LD_LIBRARY_PATH \ $ParaView_DIR $archDir/ParaView- $archDir/qt-)" +# Evaluate command-line parameters for ParaView and cmake +for i +do + case "$i" in + (cmake*=* | ParaView*=*) + # name=value -> export name=value + eval "export $i" + ;; + esac +done + # ThirdParty cmake cmake="$archDir/$cmake_version" if [ -r "$cmake/bin/cmake" ] @@ -79,17 +90,6 @@ then PATH="$cmake/bin:$PATH" fi -# Evaluate command-line parameters for ParaView -for i -do - case "$i" in - (ParaView*=*) - # name=value -> export name=value - eval "export $i" - ;; - esac -done - case "$ParaView_VERSION" in ('') # empty - do nothing