From e9c4f9772868a786344e7b8a05ba11fc4fbe092b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 30 Jun 2017 08:21:02 +0200 Subject: [PATCH] ENH: update legacyCompile to use separate config files --- legacyCompile/README.md | 49 ++- legacyCompile/legacyCompile | 630 ++++++++++++++++++++---------------- legacyCompile/v1612.cfg | 53 +++ legacyCompile/v1706.cfg | 53 +++ 4 files changed, 478 insertions(+), 307 deletions(-) create mode 100644 legacyCompile/v1612.cfg create mode 100644 legacyCompile/v1706.cfg diff --git a/legacyCompile/README.md b/legacyCompile/README.md index 791f649..a84e49f 100644 --- a/legacyCompile/README.md +++ b/legacyCompile/README.md @@ -52,18 +52,17 @@ and package versions, it may not work for all users and environments. --- -## Script Configuration +## Configuration Users need to define the desired packages and versions to use for the OpenFOAM compilation. The packages and versions need to be input under the -paragraph `USER INPUT (2)`, stating whether the default version is to be +section `[software]`, stating whether the default version is to be used, or the user needs to use a different version. If both entries have information, the user-preference will prevail. In any case, a suitable tar/zip file with packageName-versionNumber needs to be placed under subdir `packages/`. The value `ompiType` refers to the openmpi type (system|third). - # USER INPUT (2) - # ~~~~~~~~~~~~~~ + [software] # Preferred software versions etc. Use 'third' for ThirdParty. #---------------------+-------------------+-------------------+ # package | default | user-preference | @@ -95,23 +94,21 @@ tar/zip file with packageName-versionNumber needs to be placed under subdir ## Usage - ./legacyCompile [OPTION] OPERATION [...OPERATION] + ./legacyCompile [OPTIONS] OPERATION [...OPERATION] configFile + options: + -purge Purge old directories before unpacking (CAUTION) + -int32 | -int64 Label width + -SP | -DP Precision + -sigfpe | -no-sigfpe Activate/deactivate FOAM_SIGFPE handling + -help + operations: -unpack Unpack sources, configure -third Compile ThirdParty -foam Compile OpenFOAM -list List configured versions only - -all Alias for -unpack -third -foam - -rebuild Alias for -third -foam - - options: - -purge Purge old directories before unpacking (CAUTION) - -help - - Config options: - -int32 | -int64 Label width (default: 32) - -SP | -DP Precision (default: DP) - -sigfpe |-no-sigfpe Activate/deactivate FOAM_SIGFPE handling + -all Alias for -unpack -third -foam + -rebuild Alias for -third -foam The script contains the three essential operations: @@ -127,43 +124,43 @@ unpack stage). * To compile first time (from scratch) with default label size and precision: - ./legacyCompile -all + ./legacyCompile -all configFile * To repeat the same, **overwriting** any existing installation: - ./legacyCompile -all -purge + ./legacyCompile -all -purge configFile * To unpack all packages and configure some OpenFOAM settings without compiling: - ./legacyCompile -unpack - ./legacyCompile -unpack -purge # caution: removes existing installation + ./legacyCompile -unpack configFile + ./legacyCompile -unpack -purge configFile # Caution: removes existing installation To compile with 64 bit label size in single precission: - ./legacyCompile -all -int64 -SP + ./legacyCompile -all -int64 -SP configFile If you change your third-party package selections or the preferred configuration (SP, DP etc), you will need the `-unpack` operation, which also includes some configuration operations. - ./legacyCompile -unpack + ./legacyCompile -unpack configFile To (re)compile ThirdParty and OpenFOAM individually: - ./legacyCompile -unpack -third -purge + ./legacyCompile -unpack -third -purge configFile (to compile ThirdParty from scratch) - ./legacyCompile -foam + ./legacyCompile -foam configFile (to compile OpenFOAM from existing ThirdParty) To compile with 32 bit label size in single precission: - ./legacyCompile -all -int64 -SP + ./legacyCompile -all -int64 -SP configFile --- @@ -183,4 +180,4 @@ building Clang), you should remove the corrsponding logfile(s) before recompiling with the '-unpack -third` options. --- -2016-12-21 +2017-06-29 diff --git a/legacyCompile/legacyCompile b/legacyCompile/legacyCompile index 6255670..9d6ff6c 100755 --- a/legacyCompile/legacyCompile +++ b/legacyCompile/legacyCompile @@ -7,220 +7,50 @@ # Simple convenience script to install OpenFOAM on older systems. # Use ThirdParty compiler, but retain most default software versions. # -# Adjust the relevant USER INPUT sections below prior to running. -# - INPUT (1) has the top-level packaging -# - INPUT (2) has version preferences +# [package] - Top-level package information +# [arch] - Architecture +# [software] - Preferred software versions # # Input Directory: -# - ./packages # Contains the tar files +# - ./packages - Contains the tar files # # Output Directories -# - ./install # The compiled installation -# - ./log # Log files from the build scripts +# - ./install - The compiled installation +# - ./log - Log files from the build scripts # # License # GPL v3 or later -# Copyright (C) 2016 Roger Almenar, ESI GmbH. +# Copyright (C) 2016-2017 Roger Almenar, ESI GmbH. #------------------------------------------------------------------------------ - -# ~~~~~~~~~~~~~~ -# USER INPUT (1) -# ~~~~~~~~~~~~~~ -FoamVersion=v1612+ -OFdirName=OpenFOAM-$FoamVersion -TPdirName=ThirdParty-$FoamVersion - -# Source package names may differ from the directory names above -# uncomment and change if needed) -# OFsource=OpenFOAM-plus -# TPsource=ThirdParty-plus - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# User input continues below at USER INPUT (2) -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#------------------------------------------------------------------------------ -_preferences() -{ - # 'package default version' lines=>packageDefault, packageVersion variable - local line pkg def val - while read -r line - do - set -- $line; pkg="$1"; def="$2"; val="$3" - if [ "$pkg" = "${pkg#[a-z]}" ] - then - continue # Packages must start with lowercase - elif [ $# -eq 2 -o $# -eq 3 ] - then - val="${3:-$def}" # Use default if not specified - eval "${pkg}Default=\"\$def\""; eval "${pkg}Version=\"\$val\"" - else - echo "Bad input while setting versions"; echo " $line" - exit 1 - fi - done -} -_preferences <<-USER_INPUT -# ~~~~~~~~~~~~~~ -# USER INPUT (2) -# ~~~~~~~~~~~~~~ -# Preferred software versions etc. Use 'third' for ThirdParty. -#---------------------+-------------------+-------------------+ -# package | default | user-preference | -#---------------------+-------------------+-------------------+ - boost boost_1_62_0 - cgal CGAL-4.9 - fftw fftw-3.3.5 - openmpi openmpi-1.10.4 - scotch scotch_6.0.3 - paraview ParaView-5.0.1 - cmake cmake-system cmake-3.5.2 - vtk none VTK-7.1.0 - mesa none mesa-13.0.1 - qt qt-system qt-4.8.7 - llvm llvm-3.7.0 - gcc system gcc-4.8.5 - gmp system gmp-6.1.1 - mpfr system mpfr-3.1.5 - mpc system mpc-1.0.3 - label 32 - precision DP - - ompiType system third - compilerType system third - compiler Gcc Clang -# ----------------------------------------------------------------------------- -USER_INPUT -# -# NO NORMAL EDITING BELOW THIS LINE -#------------------------------------------------------------------------------ - # Local directories INSTALL_DIR=$PWD/install PACKAGE_DIR=$PWD/packages LOGFILE_DIR=$PWD/log -# Special treatment for gcc sub-components (needs rethinking) -case "$compilerVersion" in -Gcc | Gcc48) - gccVersion=gcc-4.8.5 # match value in config.sh/compiler - ;; -Gcc49) - gccVersion=gcc-4.9.3 # match value in config.sh/compiler - ;; -Gcc62) - gccVersion=gcc-6.2.0 # match value in config.sh/compiler - ;; -Gcc*) - echo "Error: unconfigured gcc version '$compilerVersion'" - exit 1 # Really exit, since this must be an input error - ;; -esac -# ----------------------------------------------------------------------------- -# NO FURTHER EDITING BELOW THIS LINE -#------------------------------------------------------------------------------ - -# Name of qt source directory is a fixed value -qtSource="qt-everywhere-opensource-src-${qtVersion##*-}" - -# Change 'system' into 'gmp-system' etc -for check in gcc gmp mpfr mpc -do - if eval test "\$${check}Version = system" - then - eval "${check}Version=${check}-system" - eval "${check}Default=${check}-system" - fi -done - -# No gcc/gmp/mpfr/mpc for system compilers or non-Gcc compilers -case "$compilerTypeVersion:$compilerVersion" in - third:Gcc*) - ;; - third:Clang* | system:Clang* | system:Gcc | system:Icc | system:*) - # System, or known non-gcc - for check in gcc gmp mpfr mpc - do - eval "unset ${check}Version ${check}Default" - done - ;; - *) - echo "Error: unknown $compilerTypeVersion-compiler '$compilerVersion'" - exit 1 - ;; -esac - -# Separator lines -_line() -{ - echo " ==================== ==================== ====================" -} - -# Various formatting for -list output -# formatted print -_fmt2() -{ - local arg1="${1:-????}" - local arg2="${2:-undefined}" - printf " %-20s %-20s\n" "$arg1" "$arg2" -} - -# formatted print -# name version default [-nocheck] -_fmt3() -{ - local what="${1:-????}" - local arg1="${2:-undefined}" - local arg2="${3:-undefined}" - - if [ "$#" -eq 2 ] - then - _fmt2 "$what" "$arg1" - elif [ "$#" -eq 3 -a "$arg1" = "$arg2" ] - then - _fmt2 "$what" "$arg1" - else - printf " %-20s %-20s %-20s\n" "$what" "$arg1" "$arg2" - fi -} - -# input: 'package' -# output: 'package' packageDefault packageVersion -_fmtDefVer() -{ - local pkg="$1" - eval local "def=\$${pkg}Default" - eval local "val=\$${pkg}Version" - - _fmt3 "$pkg" "$def" "$val" -} - #------------------------------------------------------------------------------ usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< packageDEFAULT, packageVERSION variables +# +_software() +{ + local line pkg def val + while read -r line + do + # Packages must start with lowercase. Also removes rubbish + set -- $(echo $line | sed -e 's/=/ /g') + pkg="$1"; def="$2"; val="$3" + + ## echo "Using $# package=$pkg default='$def' version='$val'" 1>&2 + + if [ "$pkg" = "${pkg#[a-z]}" ] + then + continue # Packages must start with lowercase + elif [ $# -eq 2 ] + then + echo "${pkg}DEFAULT='${def}';${pkg}VERSION='${def}'" + elif [ $# -eq 3 ] + then + echo "${pkg}DEFAULT='${def}';${pkg}VERSION='${val}'" + else + echo "Bad input while setting versions" 1>&2 + echo " $line" 1>&2 + exit 1 + fi + done +} + +eval $( +sed -n \ + -e '/^ *[;#]/d' \ + -e '/^\[software\]/,/^\s*\[/{ s/^ *//g; s/ *$//g; s/ */=/g; p }' \ + $configFile | \ + _software +) + +#------------------------------------------------------------------------------ + +# Special treatment for gcc sub-components (needs rethinking) +case "$compilerVERSION" in +Gcc | Gcc48) + gccVERSION=gcc-4.8.5 # match value in config.sh/compiler + ;; +Gcc49) + gccVERSION=gcc-4.9.3 # match value in config.sh/compiler + ;; +Gcc62) + gccVERSION=gcc-6.2.0 # match value in config.sh/compiler + ;; +Gcc63) + gccVERSION=gcc-6.3.0 # match value in config.sh/compiler + ;; +Gcc71) + gccVERSION=gcc-7.1.0 # match value in config.sh/compiler + ;; +Gcc*) + echo "Error: unconfigured gcc version '$compilerVERSION'" + exit 1 # Really exit, since this must be an input error + ;; +esac +# ----------------------------------------------------------------------------- +# NO FURTHER EDITING BELOW THIS LINE +#------------------------------------------------------------------------------ + +# Name of qt source directory is a fixed value +qtSource="qt-everywhere-opensource-src-${qtVERSION##*-}" + +# Change 'system' into 'gmp-system' etc +for pkg in gcc gmp mpfr mpc +do + if eval test "\$${pkg}VERSION = system" + then + eval "${pkg}VERSION='${pkg}-system'" + eval "${pkg}DEFAULT='${pkg}-system'" + fi +done + +# No gcc/gmp/mpfr/mpc for system compilers or non-Gcc compilers +case "$compilerTypeVERSION:$compilerVERSION" in +third:Gcc*) + ;; +third:Clang* | system:Clang* | system:Gcc | system:Icc | system:*) + # System, or known non-gcc + for check in gcc gmp mpfr mpc + do + eval "unset ${check}VERSION ${check}DEFAULT" + done + ;; +*) + echo "Error: unknown ${compilerTypeVERSION}-compiler '$compilerVERSION'" + exit 1 + ;; +esac + +# Separator lines +_line() +{ + echo " ==================== ==================== ====================" +} + +# Various formatting for -list output +# formatted print +_fmt2() +{ + local arg1="${1:-????}" + local arg2="${2:-undefined}" + printf " %-20s %-20s\n" "$arg1" "$arg2" +} + +# formatted print +# name version default [-nocheck] +_fmt3() +{ + local what="${1:-????}" + local arg1="${2:-undefined}" + local arg2="${3:-undefined}" + + if [ "$#" -eq 2 ] + then + _fmt2 "$what" "$arg1" + elif [ "$#" -eq 3 -a "$arg1" = "$arg2" ] + then + _fmt2 "$what" "$arg1" + else + printf " %-20s %-20s %-20s\n" "$what" "$arg1" "$arg2" + fi +} + +# input: 'package' +# output: 'package' packageDEFAULT packageVERSION +_fmtDefVer() +{ + local pkg="$1" + eval local "def=\$${pkg}DEFAULT" + eval local "val=\$${pkg}VERSION" + + _fmt3 "$pkg" "$def" "$val" +} + + +# Location of the OpenFOAM bashrc +BASHRC_FILE=$INSTALL_DIR/$OFdirName/etc/bashrc + +if [ "$ompiTypeVERSION" != "$ompiTypeDEFAULT" ] then - configArch="$configArch -openmpi-$ompiTypeVersion" + configArch="$configArch -openmpi-$ompiTypeVERSION" fi #------------------------------------------------------------------------------ @@ -333,14 +401,14 @@ _listSettings() _fmtDefVer qt _fmtDefVer ompiType _fmtDefVer llvm - _fmt3 gcc "${gccDefault:-system}" "${gccVersion:-system}" - _fmt3 gmp "${gmpDefault:-system}" "${gmpVersion:-system}" - _fmt3 mpfr "${mpfrDefault:-system}" "${mpfrVersion:-system}" - _fmt3 mpc "${mpcDefault:-system}" "${mpcVersion:-system}" + _fmt3 gcc "${gccDEFAULT:-system}" "${gccVERSION:-system}" + _fmt3 gmp "${gmpDEFAULT:-system}" "${gmpVERSION:-system}" + _fmt3 mpfr "${mpfrDEFAULT:-system}" "${mpfrVERSION:-system}" + _fmt3 mpc "${mpcDEFAULT:-system}" "${mpcVERSION:-system}" _line echo echo " configure: $configArch" - echo " compiler: -$compilerTypeVersion $compilerVersion" + echo " compiler: -$compilerTypeVERSION $compilerVERSION" echo } @@ -493,11 +561,11 @@ unpackAllFiles() # Unpack OpenFOAM and ThirdParty # Source package names may differ from the directory names # Also handle '-plus' extensions (common problem?) - _unpack "${OFsource:=$OFdirName}" + _unpack "$OFsource" _mvdir "$OFsource" "$OFdirName" _mvdir OpenFOAM-plus "$OFdirName" - _unpack "${TPsource:=$TPdirName}"; + _unpack "$TPsource"; _mvdir "$TPsource" "$TPdirName" _mvdir ThirdParty-plus "$TPdirName" @@ -517,13 +585,13 @@ unpackAllFiles() if true then # Compiler configuration (already sanity checked much further above) - compilerOpt="-$compilerTypeVersion $compilerVersion" - case "$compilerTypeVersion:$compilerVersion" in + compilerOpt="-$compilerTypeVERSION $compilerVERSION" + case "$compilerTypeVERSION:$compilerVERSION" in third:Clang*) - compilerOpt="$compilerOpt -clang $llvmVersion" + compilerOpt="$compilerOpt -clang $llvmVERSION" ;; third:Gcc*) - compilerOpt="$compilerOpt $gmpVersion $mpfrVersion $mpcVersion" + compilerOpt="$compilerOpt $gmpVERSION $mpfrVERSION $mpcVERSION" ;; esac @@ -532,12 +600,12 @@ unpackAllFiles() $configArch $compilerOpt \ $( # package versions - _ifDifferent -cmake $cmakeVersion $cmakeDefault - _ifDifferent -boost $boostVersion $boostDefault - _ifDifferent -cgal $cgalVersion $cgalDefault - _ifDifferent -fftw $fftwVersion $fftwDefault - _ifDifferent -scotch $scotchVersion $scotchDefault - _ifDifferent -openmpi $openmpiVersion $openmpiDefault + _ifDifferent -cmake $cmakeVERSION $cmakeDEFAULT + _ifDifferent -boost $boostVERSION $boostDEFAULT + _ifDifferent -cgal $cgalVERSION $cgalDEFAULT + _ifDifferent -fftw $fftwVERSION $fftwDEFAULT + _ifDifferent -scotch $scotchVERSION $scotchDEFAULT + _ifDifferent -openmpi $openmpiVERSION $openmpiDEFAULT ) echo "foam-configure with settings:" @@ -557,76 +625,76 @@ unpackAllFiles() exit 1 } - _unpackIfDifferent $cmakeVersion $cmakeDefault - _unpackIfDifferent $boostVersion $boostDefault - _unpackIfDifferent $cgalVersion $cgalDefault - _unpackIfDifferent $fftwVersion $fftwDefault - _unpackIfDifferent $scotchVersion $scotchDefault - _unpackIfDifferent $openmpiVersion $openmpiDefault + _unpackIfDifferent $cmakeVERSION $cmakeDEFAULT + _unpackIfDifferent $boostVERSION $boostDEFAULT + _unpackIfDifferent $cgalVERSION $cgalDEFAULT + _unpackIfDifferent $fftwVERSION $fftwDEFAULT + _unpackIfDifferent $scotchVERSION $scotchDEFAULT + _unpackIfDifferent $openmpiVERSION $openmpiDEFAULT - case "$compilerTypeVersion:$compilerVersion" in + case "$compilerTypeVERSION:$compilerVERSION" in third:Gcc*) - echo "# ThirdParty Compiler: $compilerVersion" - _unpack $gccVersion - _unpack $gmpVersion - _unpack $mpfrVersion - _unpack $mpcVersion + echo "# ThirdParty Compiler: $compilerVERSION" + _unpack $gccVERSION + _unpack $gmpVERSION + _unpack $mpfrVERSION + _unpack $mpcVERSION ;; third:Clang*) - echo "# ThirdParty Compiler: $compilerVersion" + echo "# ThirdParty Compiler: $compilerVERSION" # Mostly unpacks to llvm-x.y.z.src, relocate to llvm-x.y.z - _unpack $llvmVersion - _mvdir "$llvmVersion.src" "$llvmVersion" # (*.src -> *) + _unpack $llvmVERSION + _mvdir "$llvmVERSION.src" "$llvmVERSION" # (*.src -> *) # Check if matching cfe (clang) version is required clangDir=tools/clang - cfeVersion="cfe${llvmVersion#llvm}" + cfeVERSION="cfe${llvmVERSION#llvm}" - if [ -d "$llvmVersion" -a ! -d "$llvmVersion/$clangDir" ] + if [ -d "$llvmVERSION" -a ! -d "$llvmVERSION/$clangDir" ] then - _unpack $cfeVersion - _mvdir "$cfeVersion.src" "$cfeVersion" # As above (*.src -> *) - _mvdir "$cfeVersion" "$llvmVersion/$clangDir" # Relocate to tools/clang + _unpack $cfeVERSION + _mvdir "$cfeVERSION.src" "$cfeVERSION" # As above (*.src -> *) + _mvdir "$cfeVERSION" "$llvmVERSION/$clangDir" # Relocate to tools/clang fi ;; esac echo "# Graphics" - _unpackIfDifferent $paraviewVersion $paraviewDefault + _unpackIfDifferent $paraviewVERSION $paraviewDEFAULT # Mostly unpacks to ParaView-vx.y.z | ParaView-vx.y.z-source, # relocate to ParaView-x.y.z # This is why bash - _mvdir "${paraviewVersion}-source" "$paraviewVersion" - _mvdir "${paraviewVersion/-/-v}" "$paraviewVersion" - _mvdir "${paraviewVersion/-/-v}-source" "$paraviewVersion" + _mvdir "${paraviewVERSION}-source" "$paraviewVERSION" + _mvdir "${paraviewVERSION/-/-v}" "$paraviewVERSION" + _mvdir "${paraviewVERSION/-/-v}-source" "$paraviewVERSION" - _unpack $mesaVersion + _unpack $mesaVERSION # May not really need QT (paraview only) _unpack $qtSource # VTK is a link to ParaView VTK - if [ -n "$vtkVersion" ] + if [ -n "$vtkVERSION" ] then - if readlink "$vtkVersion" > /dev/null + if readlink "$vtkVERSION" > /dev/null then - echo " Remove old link to $vtkVersion" - rm "$vtkVersion" + echo " Remove old link to $vtkVERSION" + rm "$vtkVERSION" fi - if [ -d "${paraviewVersion:-paraview#undef}/VTK" ] + if [ -d "${paraviewVERSION:-paraview#undef}/VTK" ] then - echo " Create new link $paraviewVersion/VTK $vtkVersion" - ln -sv $paraviewVersion/VTK $vtkVersion + echo " Create new link $paraviewVERSION/VTK $vtkVERSION" + ln -sv $paraviewVERSION/VTK $vtkVERSION else - echo " did not make link for vtk $vtkVersion" - echo " perhaps no paraview directory? ${paraviewVersion:-???}/VTK" + echo " did not make link for vtk $vtkVERSION" + echo " perhaps no paraview directory? ${paraviewVERSION:-???}/VTK" fi fi ## Check if these may be required (again, in the future) - ## _unpack $automakeVersion - ## _unpack $autoconfVersion + ## _unpack $automakeVERSION + ## _unpack $autoconfVERSION echo echo "Finished unpacking" @@ -648,7 +716,7 @@ compileThirdParty() echo " ... we are probably just going to build it now" echo - . $BASHRC_FILE + . $BASHRC_FILE '' cd $WM_THIRD_PARTY_DIR || { echo "Error: cannot change to ThirdParty directory - $WM_THIRD_PARTY_DIR" @@ -667,12 +735,12 @@ compileThirdParty() # Cmake (build with system gcc to avoid circular dependency) echo echo "cmake:" - if [ -d "$WM_THIRD_PARTY_DIR/${cmakeVersion:-cmake#undef}" ] + if [ -d "$WM_THIRD_PARTY_DIR/${cmakeVERSION:-cmake#undef}" ] then makeCommand=makeCmake - makeOptions="-gcc $cmakeVersion" + makeOptions="-gcc $cmakeVERSION" - makeTarget="$platforms/$WM_ARCH$WM_COMPILER/$cmakeVersion" + makeTarget="$platforms/$WM_ARCH$WM_COMPILER/$cmakeVERSION" logFile="$LOGFILE_DIR/log.$makeCommand-$WM_OPTIONS.txt" if [ -f "$logFile" ] then @@ -687,26 +755,26 @@ compileThirdParty() # Pickup changes (but should already be there) # - foamPV function should also work - . $BASHRC_FILE 2>/dev/null + . $BASHRC_FILE '' 2>/dev/null fi else echo " not specified or not found" fi ## Check if these may be required (again, in the future) - ## ( cd $automakeVersion && some more stuff ) - ## ( cd $autoconfVersion && some more stuff ) + ## ( cd $automakeVERSION && some more stuff ) + ## ( cd $autoconfVERSION && some more stuff ) # Compiler ... this can take a while echo echo "compiler:" - case "$compilerTypeVersion:$compilerVersion" in + case "$compilerTypeVERSION:$compilerVERSION" in third:Gcc*) makeCommand=makeGcc - makeOptions="-no-threadsafe $gccVersion $gmpVersion $mpfrVersion $mpcVersion" + makeOptions="-no-threadsafe $gccVERSION $gmpVERSION $mpfrVERSION $mpcVERSION" - makeTarget="$platforms/$WM_ARCH/$gccVersion" + makeTarget="$platforms/$WM_ARCH/$gccVERSION" logFile="$LOGFILE_DIR/log.$makeCommand-$WM_OPTIONS.txt" if [ -f "$logFile" ] then @@ -720,7 +788,7 @@ compileThirdParty() ./$makeCommand $makeOptions >> $logFile 2>&1 # Pickup changes (but should already be there) - . $BASHRC_FILE + . $BASHRC_FILE '' fi ;; third:Clang*) @@ -728,7 +796,7 @@ compileThirdParty() makeOptions="" # makeOptions="-gcc" - makeTarget="$platforms/$WM_ARCH/$llvmVersion" + makeTarget="$platforms/$WM_ARCH/$llvmVERSION" logFile="$LOGFILE_DIR/log.$makeCommand-$WM_OPTIONS.txt" if [ -f "$logFile" ] then @@ -742,7 +810,7 @@ compileThirdParty() ./$makeCommand $makeOptions >> $logFile 2>&1 # Pickup changes (but should already be there) - . $BASHRC_FILE + . $BASHRC_FILE '' fi ;; esac @@ -790,11 +858,11 @@ compileThirdParty() # but need to check how it manages relocating the package echo echo "mesa:" - mesaPREFIX="$platforms/$WM_ARCH$WM_COMPILER/$mesaVersion" - if [ -d "$WM_THIRD_PARTY_DIR/${mesaVersion:-mesa#undef}" ] + mesaPREFIX="$platforms/$WM_ARCH$WM_COMPILER/$mesaVERSION" + if [ -d "$WM_THIRD_PARTY_DIR/${mesaVERSION:-mesa#undef}" ] then makeCommand=makeMesa - makeOptions="$mesaVersion" + makeOptions="$mesaVERSION" makeTarget="$mesaPREFIX" logFile="$LOGFILE_DIR/log.$makeCommand-$WM_OPTIONS.txt" @@ -821,12 +889,12 @@ compileThirdParty() echo echo "VTK (with mesa)" - if [ -d "$mesaPREFIX" -a -d "$WM_THIRD_PARTY_DIR/${vtkVersion:-vtk#undef}" ] + if [ -d "$mesaPREFIX" -a -d "$WM_THIRD_PARTY_DIR/${vtkVERSION:-vtk#undef}" ] then makeCommand=makeVTK - makeOptions="$vtkVersion -osmesa -mesa-prefix $mesaPREFIX" + makeOptions="$vtkVERSION -osmesa -mesa-prefix $mesaPREFIX" - makeTarget="$platforms/$WM_ARCH$WM_COMPILER/$vtkVersion" + makeTarget="$platforms/$WM_ARCH$WM_COMPILER/$vtkVERSION" logFile="$LOGFILE_DIR/log.$makeCommand-$WM_OPTIONS.txt" if [ -f "$logFile" ] then @@ -845,11 +913,11 @@ compileThirdParty() echo echo "QT (needed for paraview)" - qtPREFIX="$platforms/$WM_ARCH$WM_COMPILER/$qtVersion" + qtPREFIX="$platforms/$WM_ARCH$WM_COMPILER/$qtVERSION" if [ -d "$WM_THIRD_PARTY_DIR/${qtSource:-qt#undef}" ] then makeCommand=makeQt - makeOptions="$qtVersion" + makeOptions="$qtVERSION" case "$WM_COMPILER" in Clang*) # Some build issues with clang, use system gcc instead @@ -872,12 +940,12 @@ compileThirdParty() fi else echo " not specified or not found" - unset qtVersion qtPREFIX # avoid using for paraview build + unset qtVERSION qtPREFIX # avoid using for paraview build fi echo echo "ParaView:" - if [ -d "$WM_THIRD_PARTY_DIR/${paraviewVersion:-paraview#undef}" ] + if [ -d "$WM_THIRD_PARTY_DIR/${paraviewVERSION:-paraview#undef}" ] then makeCommand=makeParaView makeOptions="" @@ -885,12 +953,12 @@ compileThirdParty() then makeOptions="$makeOptions -mesa-prefix $mesaPREFIX" fi - if [ -n "$qtVersion" -a -x "$qtPREFIX/bin/qmake" ] + if [ -n "$qtVERSION" -a -x "$qtPREFIX/bin/qmake" ] then - makeOptions="$makeOptions -$qtVersion" + makeOptions="$makeOptions -$qtVERSION" fi - makeTarget="$platforms/$WM_ARCH$WM_COMPILER/$paraviewVersion" + makeTarget="$platforms/$WM_ARCH$WM_COMPILER/$paraviewVERSION" logFile="$LOGFILE_DIR/log.$makeCommand-$WM_OPTIONS.txt" if [ -f "$logFile" ] then @@ -931,7 +999,7 @@ compileOpenFOAM() echo "Starting compilation of OpenFOAM" echo - . $BASHRC_FILE + . $BASHRC_FILE '' cd $WM_PROJECT_DIR || { echo "Error: cannot change to OpenFOAM directory - $WM_PROJECT_DIR" diff --git a/legacyCompile/v1612.cfg b/legacyCompile/v1612.cfg new file mode 100644 index 0000000..a6d1d2b --- /dev/null +++ b/legacyCompile/v1612.cfg @@ -0,0 +1,53 @@ +#------------------------------------------------------------------------------ +# File +# v1612.cfg +# +# Description +# Configuration file for legacyCompile +#------------------------------------------------------------------------------ + +# Top-level package information +[package] + +FoamVersion=v1612+ +OFdirName=OpenFOAM-v1612+ +TPdirName=ThirdParty-v1612+ + +# If source packages differ from the directory names, uncomment and adjust + +# OFsource=OpenFOAM-plus +# TPsource=ThirdParty-plus + +# Architecture +[arch] +label=32 +scalar=64 +sigfpe=false + + +[software] +# Preferred software versions etc. Use 'third' for ThirdParty. +#---------------------+-------------------+-------------------+ +# package | default | user-preference | +#---------------------+-------------------+-------------------+ + boost boost_1_62_0 + cgal CGAL-4.9 + fftw fftw-3.3.5 + openmpi openmpi-1.10.4 + scotch scotch_6.0.3 + paraview ParaView-5.0.1 + cmake cmake-system cmake-3.5.2 + vtk none VTK-7.1.0 + mesa none mesa-13.0.1 + qt qt-system qt-4.8.7 + llvm llvm-3.7.0 + gcc system gcc-4.8.5 + gmp system gmp-6.1.1 + mpfr system mpfr-3.1.5 + mpc system mpc-1.0.3 + + ompiType system third + compilerType system third + compiler Gcc Clang + +# ----------------------------------------------------------------------------- diff --git a/legacyCompile/v1706.cfg b/legacyCompile/v1706.cfg new file mode 100644 index 0000000..983cf44 --- /dev/null +++ b/legacyCompile/v1706.cfg @@ -0,0 +1,53 @@ +#------------------------------------------------------------------------------ +# File +# v1706.cfg +# +# Description +# Configuration file for legacyCompile +#------------------------------------------------------------------------------ + +# Top-level package information +[package] + +FoamVersion=v1706 +OFdirName=OpenFOAM-v1706 +TPdirName=ThirdParty-v1706 + +# If source packages differ from the directory names, uncomment and adjust + +# OFsource=OpenFOAM-plus +# TPsource=ThirdParty-plus + +# Architecture +[arch] +label=32 +scalar=32 +sigfpe=false + + +[software] +# Preferred software versions etc. Use 'third' for ThirdParty. +#---------------------+-------------------+-------------------+ +# package | default | user-preference | +#---------------------+-------------------+-------------------+ + boost boost_1_64_0 + cgal CGAL-4.9.1 + fftw fftw-3.3.6-pl1 + openmpi openmpi-1.10.4 + scotch scotch_6.0.3 + paraview ParaView-5.4.0 + cmake cmake-system cmake-3.5.2 + vtk none VTK-8.1.0 + mesa none mesa-17.1.1 + qt qt-system qt-4.8.7 + llvm llvm-3.7.0 + gcc system gcc-4.8.5 + gmp system gmp-6.1.1 + mpfr system mpfr-3.1.5 + mpc system mpc-1.0.3 + + ompiType system third + compilerType system third + compiler Gcc Clang + +# ----------------------------------------------------------------------------- -- GitLab