From 7623d184cdcaefebe9e20a8aeea7c7d59eea3e89 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 4 Nov 2016 11:16:30 +0100 Subject: [PATCH 01/24] CONFIG: build boost, CGAL into lib64/ (issue #8) - On 64-bit systems, the library locations for boost, CGAL are changing. * Boost 1_62_0 and older build into 'lib/'. * CGAL-4.9 builds into 'lib64/', older versions into 'lib/'. Future-proof things by using lib$WM_COMPILER_LIB_ARCH for boost and CGAL targets. --- makeCGAL | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/makeCGAL b/makeCGAL index c8f6796..37e3c58 100755 --- a/makeCGAL +++ b/makeCGAL @@ -146,31 +146,32 @@ fi #------------------------------------------------------------------------------ # # Build Boost -# For 64-bit -# - Third-Party builds into 'lib' +# For 64-bit: # - system is normally built into 'lib64' +# - use Third-Party 'lib64' for consistency. +# Boost 1_62_0 and older normally build into 'lib'. # # BOOST_SOURCE_DIR : location of the original sources BOOST_ARCH_PATH=$installBASE/$boostPACKAGE BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE -if [ -d "$BOOST_ARCH_PATH" ] -then - boostInc="$BOOST_ARCH_PATH/include" - boostLib="$BOOST_ARCH_PATH/lib" -elif _foamIsSystem $BOOST_ARCH_PATH +boostInc="$BOOST_ARCH_PATH/include" +boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" + +if _foamIsSystem $BOOST_ARCH_PATH then echo "Using boost-system (skip ThirdParty build of BOOST)" boostInc="/usr/include" boostLib="/usr/lib$WM_COMPILER_LIB_ARCH" +elif [ -f "$boostInc/boost/version.hpp" -a -d "$boostLib" ] +then + echo "Using $boostPACKAGE" else - echo "Starting build: boost" + echo "Starting build: $boostPACKAGE" echo - - boostInc="$BOOST_ARCH_PATH/include" - boostLib="$BOOST_ARCH_PATH/lib" + # Absolute path for --libdir ( cd $BOOST_SOURCE_DIR || exit 1 @@ -179,6 +180,7 @@ else ./bootstrap.sh \ --prefix=$BOOST_ARCH_PATH \ + --libdir=$boostLib \ --with-libraries=thread \ --with-libraries=system \ && ./bjam toolset=$WM_CC -j $WM_NCOMPPROCS install \ @@ -225,9 +227,10 @@ SUMMARY #------------------------------------------------------------------------------ # # Build CGAL -# For 64-bit -# - Third-Party builds into 'lib' +# For 64-bit: # - system is normally built into 'lib64' +# - use Third-Party 'lib64' for consistency. +# CGAL-4.9 normally builds into 'lib64', older versions into 'lib'. # # CGAL_SOURCE_DIR : location of the original sources # CGAL_BINARY_DIR : location of the build @@ -255,12 +258,17 @@ recordCGALinfo() CGAL_VERSION=$(sed -ne 's/^ *# *define *CGAL_VERSION_NR *\([0-9][0-9]*\).*$/\1/p' $CGAL_ARCH_PATH/include/CGAL/version.h 2>/dev/null) cat< $buildInfoFile +# Information from OpenFOAM build on '$(date)' +# CGAL=${CGAL_ARCH_PATH##*/} BOOST=${BOOST_ARCH_PATH##*/} GMP=${GMP_ARCH_PATH##*/} MPFR=${MPFR_ARCH_PATH##*/} CGAL_VERSION=$CGAL_VERSION BOOST_VERSION=$BOOST_VERSION + +CGAL_lib=lib$WM_COMPILER_LIB_ARCH +BOOST_lib=lib$WM_COMPILER_LIB_ARCH BUILD_INFO } @@ -287,6 +295,8 @@ cgalIsCurrent() local info=$(cat $buildInfoFile 2>/dev/null) [ -n "$info" ] || return 1 + local libDirName="lib$WM_COMPILER_LIB_ARCH" + echo "checking information from existing build ..." echo " ${CGAL_ARCH_PATH}" @@ -295,6 +305,8 @@ cgalIsCurrent() infoValueEq GMP "${GMP_ARCH_PATH##*/}" "$info" || return 1 infoValueEq MPFR "${MPFR_ARCH_PATH##*/}" "$info" || return 1 infoValueEq BOOST_VERSION "${BOOST_VERSION}" "$info" || return 1 + infoValueEq CGAL_lib "$libDirName" "$info" || return 1 + infoValueEq BOOST_lib "$libDirName" "$info" || return 1 return 0 } @@ -375,16 +387,20 @@ CMAKE_OPTIONS echo " system : mpfr" fi + # For CGAL < 4.9, for installation into lib64/, not lib/ + # Name only (not path) for CGAL_INSTALL_LIB_DIR echo "----" set -x cmake \ -DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \ + -DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_CGAL_Qt5=OFF \ $configBoost $configGmp $configMpfr \ $CGAL_SOURCE_DIR \ && make -j $WM_NCOMPPROCS \ && make install || exit 1 + set +x echo "----" echo "create '\$CGAL_ARCH_PATH/share/files'" From 1e75ef584d1689fb7d40a2c1795dc545e0c798fb Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 4 Nov 2016 11:36:10 +0100 Subject: [PATCH 02/24] ENH: update building of ADIOS - ADIOS source packages now include mxml, which means that it doesn't need to be built separately. - Use OpenFOAM config.sh/ADIOS (if it exists), or explicitly define the version to compile. Eg, ./makeADIOS ADIOS-1.10.0 --- README.org | 8 ++- makeADIOS | 175 +++++++++++++++++++++++++++-------------------------- 2 files changed, 97 insertions(+), 86 deletions(-) diff --git a/README.org b/README.org index 88768f6..c4977ee 100644 --- a/README.org +++ b/README.org @@ -2,7 +2,7 @@ # #+TITLE: OpenFOAM Third-Party packages #+AUTHOR: The OpenFOAM Foundation / OpenCFD Ltd. -#+DATE: 2016-06-28 +#+DATE: 2016-10-14 #+LINK: http://www.openfoam.org #+OPTIONS: author:nil ^:{} # Copyright (c) 2014-2016 OpenFOAM Foundation. @@ -18,6 +18,7 @@ *** Optional Build Components: + makeLLVM (Replaces makeGcc in the above description - to use clang as compiler) + + makeADIOS (Only required for ADIOS support) + makeCCMIO (Only required for conversion of STAR-CCM+ meshes) + Allclean (Only required to save disk space) * Versions and locations to download the third party packages @@ -40,6 +41,8 @@ + ParaView-4.4.0 http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz + ParaView-5.0.1 http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz but may need patching to compile (See [[Notes]]). +*** ADIOS + + https://github.com/ornladios/ADIOS/archive/v1.10.0.tar.gz *** CGAL + CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz + CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.1/CGAL-4.8.1.tar.xz @@ -48,6 +51,9 @@ + FFTW http://www.fftw.org/fftw-3.3.4.tar.gz + libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz * Notes +*** Building Scotch + + The zlib library and zlib development headers are required. +* Notes *** Building ParaView-4.3.1/4.4.0/5.0.0/5.0.1 The ParaView-4.3.1/4.4.0/5.0.0 source-pack provided by KitWare will not build and install correctly without a minor correction: lines 653-656 diff --git a/makeADIOS b/makeADIOS index a731185..0bff942 100755 --- a/makeADIOS +++ b/makeADIOS @@ -26,11 +26,16 @@ # makeADIOS # # Description -# Build script for ADIOS (and MXML) +# Build script for ADIOS # #------------------------------------------------------------------------------ -adiosPACKAGE=adios-git -mxmlPACKAGE=mxml-2.9 + +# Get version info +. $WM_PROJECT_DIR/etc/config.sh/functions +unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only +_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS) + +adiosPACKAGE=${adios_version:-adios-none} #------------------------------------------------------------------------------ # run from third-party directory only @@ -48,24 +53,24 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat</dev/null - mkdir -p $buildDIR - - [ -e Makefile ] && make clean 2>/dev/null # for safety - mkdir -p $FOAM_EXT_LIBBIN 2>/dev/null - - # handle non-gcc compilers - unset configEnv - if [ "${WM_CC:-gcc}" != gcc ] - then - export CC=$WM_CC - export CCS=$WM_CC - fi - - # installs into lib64/ - cd $buildDIR && \ - $sourceDIR/configure --prefix=$MXML_ARCH_PATH \ - && make -j $WM_NCOMPPROCS all \ - && make install \ - && echo "Built: $mxmlPACKAGE" \ - && rsync -a $MXML_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/*.so* $FOAM_EXT_LIBBIN/ - ) || { - echo "Error building: $mxmlPACKAGE" - } - fi + echo "Using adios-none (skip ThirdParty build of ADIOS)" + exit 0 +elif _foamIsSystem "$adiosPACKAGE" +then + echo "Using adios-system" + exit 0 fi -# build ADIOS +#------------------------------------------------------------------------------ +# +# Build ADIOS + +ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE +ADIOS_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE + +: ${FOAM_MPI:=dummy} + echo echo ======================================== -echo "Build adios library $adiosPACKAGE" +echo "Build adios library $adiosPACKAGE for $FOAM_MPI" echo -# Needs future adjustment for shared library, for mpi-specific library location +# Needs future adjustment +# - for shared library +# - for mpi-specific library locations if [ -f $ADIOS_ARCH_PATH/include/adios.h \ - -a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libadios.so ] + -a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ] then echo " ADIOS header in $ADIOS_ARCH_PATH/include" echo " ADIOS libs in $FOAM_EXT_LIBBIN" @@ -163,43 +132,61 @@ then else ( # configuration options: - # Start with GridEngine support - builds without external libraries unset configOpt # Add InfiniBand support ibDir=/usr/local/ofed - if [ -d "$ibDir/include" ] + if [ -d "$ibDir" ] then configOpt="$configOpt --with-infiniband=$ibDir" fi - ## $configOpt="$configOpt --with-hdf5=..." - # for externally compiled MXML - # configOpt="$configOpt --with-mxml=$MXML_ARCH_PATH" + # Transport layers + if [ -f "/usr/include/bzlib.h" ] + then + configOpt="$configOpt --with-bzip2=/usr" + fi + + if [ -f "/usr/include/zlib.h" ] + then + configOpt="$configOpt --with-zlib=/usr" + fi + + # Other types of support + ## $configOpt="$configOpt --with-hdf5=..." + ## $configOpt="$configOpt --with-lustre=..." + configOpt="$configOpt --enable-research-transports" # end of configuration options # ---------------------------- - - sourceDIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE buildDIR=$buildBASE/$adiosPACKAGE - cd $sourceDIR || exit 1 - export GIT_DIR=$sourceDIR/.git + cd $ADIOS_SOURCE_DIR || exit 1 + [ -e Makefile ] && make distclean 2>/dev/null + + export GIT_DIR=$ADIOS_SOURCE_DIR/.git # Remove any existing build folder and recreate - \rm -rf $buildDIR 2>/dev/null + rm -rf $ADIOS_ARCH_DIR + rm -rf $buildDIR 2>/dev/null mkdir -p $buildDIR - [ -e Makefile ] && make clean 2>/dev/null # for safety - [ -f configure ] || { echo "no configure for $adiosPACKAGE ... trying autogen" ./autogen.sh } + # May not work properly with FOAM_MPI = dummy + if [ "$FOAM_MPI" = dummy ] + then + configOpt="$configOpt --without-mpi" + else + CC=mpicc + CXX=mpicxx + fi + # installs into lib64/ - cd $buildDIR && \ - CC=mpicc CXX=mpicxx CFLAGS="-fPIC" $sourceDIR/configure \ + cd $buildDIR && $ADIOS_SOURCE_DIR/configure \ --prefix=$ADIOS_ARCH_PATH \ --disable-fortran \ --with-pic \ @@ -208,7 +195,25 @@ else && make -j $WM_NCOMPPROCS all \ && make install \ && echo "Built: $adiosPACKAGE" \ - && rsync -a --no-r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/ $FOAM_EXT_LIBBIN/$FOAM_MPI/ + && cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH && \ + { + # Rename according to FOAM_MPI + if [ "$FOAM_MPI" != dummy ] + then + \mv -f libadios.a libadios_$FOAM_MPI.a + \mv -f libadiosread.a libadiosread_$FOAM_MPI.a + fi + \mv -f libadios_nompi.a libadios_dummy.a + \mv -f libadiosread_nompi.a libadiosread_dummy.a + + echo + echo "ADIOS library renamed to libadios_$FOAM_MPI" + echo + } && cd $ADIOS_ARCH_PATH/bin && \ + { + # We don't need/use XML things + \rm -f adios_lint + } && $ADIOS_ARCH_PATH/bin/adios_config -m ) || { echo "Error building: $adiosPACKAGE" } From cb7d48b4281d5bfb40cdb7b7d8c150e0e5dbf576 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 4 Nov 2016 14:41:03 +0100 Subject: [PATCH 03/24] DOC: update notes for makeMesa - building with 12.x still seems not to work --- README.org | 4 ++++ makeMesa | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index c4977ee..4b1fcfe 100644 --- a/README.org +++ b/README.org @@ -51,6 +51,10 @@ + FFTW http://www.fftw.org/fftw-3.3.4.tar.gz + libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz * Notes +*** Building ADIOS + + Currently requires GNU autoconf tools (eg, autoconf, autoheader, automake) + for its configuration. + + Optionally uses zlib, bzip2 development headers (eg, zlib-devel, libbz2-devel). *** Building Scotch + The zlib library and zlib development headers are required. * Notes diff --git a/makeMesa b/makeMesa index f48ecb9..c5a6ae9 100755 --- a/makeMesa +++ b/makeMesa @@ -29,8 +29,10 @@ # Build script for Mesa # # Note -# Building with mesa-12.0.1 failed to install an "osmesa.h" file, -# which renders it useless for off-screen VTK. +# Building with mesa-12.x.x fails to create an include/GL directory and +# an "osmesa.h" file. Both make it fairly useless for off-screen VTK. +# +# Building with mesa-11.x is fine and mesa-13.0.0 also seems to be okay. # #------------------------------------------------------------------------------ mesaPACKAGE=mesa-11.2.2 From 6b8eecffbd8e98686dfc4ec25c92a194d541ccce Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 4 Nov 2016 21:02:21 +0100 Subject: [PATCH 04/24] BUG: missing check for boost, CGAL lib64/ in Allwmake - Non-critical since makeCGAL still caught things anyhow. - Also report the correct locations. --- Allwmake | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Allwmake b/Allwmake index 9a8c381..61a7ff2 100755 --- a/Allwmake +++ b/Allwmake @@ -399,22 +399,21 @@ echo echo ======================================== echo Build CGAL if [ -d "$CGAL_ARCH_PATH/include" \ - -a -r "$CGAL_ARCH_PATH/lib/libCGAL.so" ] + -a -r "$CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libCGAL.so" ] then # first some information about boost - if [ -d "$BOOST_ARCH_PATH/include/boost" \ - -a -r "$BOOST_ARCH_PATH/lib/libboost_system.so" ] - then - echo " BOOST headers in $BOOST_ARCH_PATH/include" - echo " BOOST libs in $BOOST_ARCH_PATH/lib" - elif [ -d "/usr/include/boost" \ - -a -r "/usr/lib${WM_COMPILER_LIB_ARCH}/libboost_system.so" ] - then - echo " BOOST headers in /usr/include" - echo " BOOST libs in /usr/lib${WM_COMPILER_LIB_ARCH}" - fi + for root in "$BOOST_ARCH_PATH" /usr + do + if [ -d "$root/include/boost" \ + -a -r "$root/lib$WM_COMPILER_LIB_ARCH/libboost_system.so" ] + then + echo " BOOST headers in $root/include" + echo " BOOST libs in $root/lib$WM_COMPILER_LIB_ARCH" + break + fi + done echo " CGAL headers in $CGAL_ARCH_PATH/include" - echo " CGAL libs in $CGAL_ARCH_PATH/lib" + echo " CGAL libs in $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" elif [ -n "$CGAL_ARCH_PATH" ] then ./makeCGAL || warnBuildIssues CGAL From 363691ff97476314b516dcee12a4eb1d261d493f Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 4 Nov 2016 21:11:24 +0100 Subject: [PATCH 05/24] STYLE: inconsistency in scotch, metis library locations - avoid leaving any duplicate run-time libraries about that are not part of the LD_LIBRARY_PATH. - incorrect ADIOS library path reported --- Allwmake | 119 +++++++++++++++++++++++++++++------------------------- makeADIOS | 3 +- 2 files changed, 66 insertions(+), 56 deletions(-) diff --git a/Allwmake b/Allwmake index 61a7ff2..ada1307 100755 --- a/Allwmake +++ b/Allwmake @@ -52,6 +52,25 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + +warnBuildIssues() +{ + echo + echo " ---------------------------------------------------" + echo " Optional component ($1) had build issues" + echo " OpenFOAM will nonetheless remain largely functional" + echo " ---------------------------------------------------" + echo +} + +warnNotFound() +{ + echo " Optional component ($1) was not found" + echo +} + +#------------------------------------------------------------------------------ + echo echo ======================================== echo Start ThirdParty Allwmake @@ -216,6 +235,8 @@ elif [ -d "$SCOTCH_VERSION" ] then ( cd $SCOTCH_VERSION/src || exit 1 + rm -rf $SCOTCH_ARCH_PATH + applyPatch $SCOTCH_VERSION .. # patch at parent-level prefixDIR=$SCOTCH_ARCH_PATH @@ -248,15 +269,16 @@ then # cleanup, could also remove Makefile.inc make realclean 2>/dev/null -) +) || warnBuildIssues SCOTCH else - echo " Optional component (SCOTCH) was not found" + warnNotFound SCOTCH fi -# build ptscotch if MPI (ThirdParty or system) is available -# and there is a scotch include available (ie, normal scotch was built) +# Build ptscotch if MPI (ThirdParty or system) is available +# and normal scotch was build (has include and library) if [ "${FOAM_MPI:-dummy}" != dummy ] && \ - [ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || \ + [ -f $SCOTCH_ARCH_PATH/include/scotch.h \ + -a -r $FOAM_EXT_LIBBIN/libscotch.so ] || \ { echo echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!" @@ -314,7 +336,7 @@ then ) fi - # verify existence of scotch include + # verify existence of ptscotch include [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || { echo echo " WARNING: required include file 'ptscotch.h' not found!" @@ -334,66 +356,53 @@ if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis) then . $settings fi -if [ -d "$METIS_VERSION" ] + +if [ -f $METIS_ARCH_PATH/include/metis.h \ + -a -r $FOAM_EXT_LIBBIN/libmetis.so ] then + echo " metis header in $METIS_ARCH_PATH/include" + echo " metis libs in $FOAM_EXT_LIBBIN" + echo +elif [ -d "$METIS_VERSION" ] +then +( + cd $METIS_VERSION || exit 1 + rm -rf $METIS_ARCH_PATH - if [ -f $METIS_ARCH_PATH/include/metis.h \ - -a -r $FOAM_EXT_LIBBIN/libmetis.so ] - then - echo " metis header in $METIS_ARCH_PATH/include" - echo " metis libs in $FOAM_EXT_LIBBIN" - echo - else - ( - set -x - cd $METIS_VERSION || exit 1 + case "$WM_PRECISION_OPTION" in + SP) + WM_SCALAR_SIZE=32 + ;; + DP) + WM_SCALAR_SIZE=64 + ;; + *) + echo " Metis pre-configure error:" + echo " WM_PRECISION_OPTION neither DP nor SP" + exit 1 + esac - if [ "$WM_PRECISION_OPTION" = "DP" ] - then - FLOAT_PRECISION=64 - elif [ "$WM_PRECISION_OPTION" = "SP" ] - then - FLOAT_PRECISION=32 - else - echo " Metis pre-configure error:" - echo " WM_PRECISION_OPTION is neither DP nor SP" - exit 1 - fi + # Change user settings automatically + sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \ + -e 's=\(#define REALTYPEWIDTH\).*=\1 '$WM_SCALAR_SIZE'=' \ + include/metis.h - # Change user settings automatically - sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \ - -e 's=\(#define REALTYPEWIDTH\).*=\1 '$FLOAT_PRECISION'=' \ - include/metis.h + # No config option for the library location. + # - build normally and use mv to relocate it - make config shared=1 prefix=$METIS_ARCH_PATH - make -j $WM_NCOMPPROCS install - cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN - ) - fi + make config shared=true prefix=$METIS_ARCH_PATH \ + && make -j $WM_NCOMPPROCS install \ + && mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN + + rmdir $METIS_ARCH_PATH/lib 2>/dev/null || true # failure is not critical +) || warnBuildIssues METIS else - echo " Optional component (METIS) was not found" + warnNotFound METIS fi #------------------------------------------------------------------------------ -warnBuildIssues() -{ - echo - echo " ---------------------------------------------------" - echo " Optional component ($1) had build issues" - echo " OpenFOAM will nonetheless remain largely functional" - echo " ---------------------------------------------------" - echo -} - -warnNotFound() -{ - echo " Optional component ($1) was not found" - echo -} - - # CGAL is optional echo echo ======================================== diff --git a/makeADIOS b/makeADIOS index 0bff942..deebe3f 100755 --- a/makeADIOS +++ b/makeADIOS @@ -127,7 +127,8 @@ if [ -f $ADIOS_ARCH_PATH/include/adios.h \ -a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ] then echo " ADIOS header in $ADIOS_ARCH_PATH/include" - echo " ADIOS libs in $FOAM_EXT_LIBBIN" + ### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic + echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static echo else ( From 0e474dcd5169e7f31ad58d93055883ed625ddabf Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 10 Nov 2016 16:26:26 +0100 Subject: [PATCH 06/24] STYLE: adjust comment to reflect change to wmRefresh --- etc/tools/ParaView3Functions | 4 ++-- etc/tools/ParaViewFunctions | 2 +- makeCCMIO | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/tools/ParaView3Functions b/etc/tools/ParaView3Functions index 7a3cd28..f998a85 100644 --- a/etc/tools/ParaView3Functions +++ b/etc/tools/ParaView3Functions @@ -391,8 +391,8 @@ installParaView() cat<< INFO --- Installation complete for paraview-$ParaView_VERSION - Now update the environment by running: - wmREFRESH + You may need to update the OpenFOAM environment by running: + wmRefresh --- INFO } diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index c989264..7968344 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -415,7 +415,7 @@ cat<< INFO ParaView_DIR=$ParaView_DIR You may need to update the OpenFOAM environment by running: - wmREFRESH + wmRefresh --- INFO } diff --git a/makeCCMIO b/makeCCMIO index 5d1beb6..74a246b 100755 --- a/makeCCMIO +++ b/makeCCMIO @@ -102,7 +102,7 @@ do done # assert: directory must be available -[ -d "${ccmioPACKAGE}" ] || die "missing source directory '$ccmioPACKAGE'" +[ -d "$ccmioPACKAGE" ] || die "missing source directory '$ccmioPACKAGE'" #------------------------------------------------------------------------------ From 06b4a31573cf3305900518a236421cb66d3c837d Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 10 Nov 2016 16:27:16 +0100 Subject: [PATCH 07/24] ENH: provide makeTecio for newest tecplot library - installs headers and static library into ThirdParty/platforms/$WM_ARCH$WM_COMPILER/tecio --- makeTecio | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100755 makeTecio diff --git a/makeTecio b/makeTecio new file mode 100755 index 0000000..bfa9b13 --- /dev/null +++ b/makeTecio @@ -0,0 +1,198 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# makeTecio +# +# Description +# Build Tecplot library +# +#------------------------------------------------------------------------------ + +# Get boost versions +. $WM_PROJECT_DIR/etc/config.sh/functions +unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only + +_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL) + +boostPACKAGE=${boost_version:-boost-system} +tecioPACKAGE=tecio +targetType=lib + +#------------------------------------------------------------------------------ +# run from third-party directory only +cd ${0%/*} || exit 1 +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +[ -n "$FOAM_EXT_LIBBIN" ] || { + echo "Error: FOAM_EXT_LIBBIN not set" + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +. etc/tools/ThirdPartyFunctions +#------------------------------------------------------------------------------ + +usage() +{ + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + /bin/cat</dev/null + + /bin/cp -pv \ + $TECIO_BINARY_DIR/libtecio.a \ + $TECIO_SOURCE_DIR/TECIO.h \ + $TECIO_SOURCE_DIR/tecio_Exports.h \ + $TECIO_ARCH_PATH + + chmod 0644 $TECIO_ARCH_PATH/* + } \ + && echo "Built: $tecioPACKAGE" +) || { + echo "Error building: $tecioPACKAGE" +} +fi + +#------------------------------------------------------------------------------ From ecab02b5aaae5b8c89123fcc84f09fb3a47f69c6 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 11 Nov 2016 13:16:07 +0100 Subject: [PATCH 08/24] DEFEATURE: remove make scripts for paraview 3.x (issue #9) - With paraview 3.14 (Feb 2012) and paraview 3.98 (Dec 2012) experience unresolvable build issues. Can no longer compile. --- etc/tools/ParaView3Functions | 426 ----------------------------------- makeParaView3 | 341 ---------------------------- 2 files changed, 767 deletions(-) delete mode 100644 etc/tools/ParaView3Functions delete mode 100755 makeParaView3 diff --git a/etc/tools/ParaView3Functions b/etc/tools/ParaView3Functions deleted file mode 100644 index f998a85..0000000 --- a/etc/tools/ParaView3Functions +++ /dev/null @@ -1,426 +0,0 @@ -#---------------------------------*- sh -*------------------------------------- -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. -#------------------------------------------------------------------------------ -# License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . -# -# File -# etc/tools/ParaViewFunctions -# -# Description -# ParaView make/install helper functions -# -#------------------------------------------------------------------------------ - -# buildBASE, installBASE defined from tools/ThirdPartyFunctions - -# -# Where things are or should be put -# ParaView_VERSION and ParaView_MAJOR should already have been set -# -# ParaView_SOURCE_DIR : location of the original sources -# ParaView_BINARY_DIR : location of the build -# ParaView_DIR : location of the installed program -# -setParaViewDirs() -{ - ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION - - [ -d "$ParaView_SOURCE_DIR" ] || { - echo "did not find ParaView-$ParaView_VERSION in these directories:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" - echo - echo "abort build" - exit 1 - } - - # ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD} - ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION - - # ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD} - ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION - - export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR - - echo - echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR" - echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR" - echo "ParaView_DIR=$ParaView_DIR" - - # Forcefully override the .git path for the ParaView source code directory - export GIT_DIR=$ParaView_SOURCE_DIR/.git -} - - -# -# Set ParaView_VERSION and adjust ParaView_MAJOR accordingly -# -# $1 can contain something something like 4.4.0, paraview-4.4.0, ParaView-4.0.0 -# -setParaViewVersion() -{ - [ $# -gt 0 ] || { - echo "Error: function setParaViewVersion() called without an argument" - exit 1 - } - - ParaView_VERSION="${1##*-}" - - # The major version is "." - ParaView_MAJOR=$(echo $ParaView_VERSION | \ - sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/') - - export ParaView_VERSION ParaView_MAJOR -} - - -#------------------------------------------------------------------------------ - -# -# Compare version information (specified vs what is found in CMakeLists.txt) -# Parse this type of content: -# set (PARAVIEW_VERSION_FULL "3.98.1") -# -checkVersion() -{ - local ver=$( - sed -ne 's/^ *set *( *PARAVIEW_VERSION_FULL[ "]*\([.0-9]*\).*$/\1/ip' \ - $ParaView_SOURCE_DIR/CMakeLists.txt - ) - - if [ "$ParaView_VERSION" != "$ver" ] - then - echo "MISMATCH!" - echo " specified $ParaView_VERSION" - echo " found ${ver:-NONE}" - fi -} - -# -# Set CMake cache variables -# -addCMakeVariable() -{ - while [ -n "$1" ] - do - CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1" - shift - done -} - - -# -# Verbose makefiles -# -addVerbosity() -{ - if [ "${withVERBOSE:=false}" = true ] - then - addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE" - fi -} - - -# -# Define options for mpi support -# -addMpiSupport() -{ - if [ "${withMPI:=false}" != true ] - then - return - fi - - OBJ_ADD="$OBJ_ADD-mpi" - - addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON" - addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS" -} - - -# -# Define options for python support -# -addPythonSupport() -{ - if [ "${withPYTHON:=false}" != true ] - then - return - fi - - OBJ_ADD="$OBJ_ADD-py" - - if pythonBin=$(which python 2>/dev/null) - then - if [ -n "$PYTHON_LIBRARY" ] - then - # Check $PYTHON_LIBRARY if it has been set - if [ ! -e "$PYTHON_LIBRARY" ] - then - echo "*** Error: libpython not found at location specified " \ - "by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY" - fi - else - # Try to get $PYTHON_LIBRARY from dynamically linked binary - PYTHON_LIBRARY=$(ldd $pythonBin | \ - sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p') - - [ -e "$PYTHON_LIBRARY" ] || { - echo "*** Error: Unable to determine path to python library." - } - fi - - [ -e "$PYTHON_LIBRARY" ] || { - echo " Please set the full path to the python library " - echo " (including libpython) using the -python-lib option, " - echo " or deactivate python support by not using the -python " - echo " option" - exit 1 - } - - pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/') - pythonInclude=/usr/include/python$pythonMajor - - # Note - we could also allow for a PYTHON_INCLUDE variable ... - [ -d "$pythonInclude" ] || { - echo " No python headers found in $pythonInclude/" - echo " Please install python headers or deactivate " - echo " python support by not using the -python option" - exit 1 - } - - addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON" - addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude" - addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY" - - echo "----" - echo "Python information:" - echo " executable : $pythonBin" - echo " version : $pythonMajor" - echo " include path : $pythonInclude" - echo " library : $PYTHON_LIBRARY" - - unset pythonBin pythonInclude pythonMajor - else - echo "*** Error: python not found" - echo "*** Deactivate python support by not using the -python " - echo "*** option" - exit 1 - fi -} - - -# -# Define options for mesa support -# -addMesaSupport() -{ - if [ "${withMESA:=false}" != true ] - then - return - fi - - if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ] - then - OBJ_ADD="$OBJ_ADD-mesa" - - addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON" - addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE" - addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY" - - else - echo "*** Error: no MESA information found" - echo "*** Deactivate MESA support by not using the -mesa option, " - echo "*** or set the correct paths for:" - echo "*** -mesa-include ($MESA_INCLUDE)" - echo "*** -mesa-lib ($MESA_LIBRARY)" - exit 1 - fi -} - - -addQtSupport() -{ - QtVersion=none - - if [ "${withQT:=false}" != true ] - then - return - fi - - addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" - - local qmake=$(findQtMake) - - # Check qmake can be found - if type $qmake >/dev/null 2>&1 - then - # Check the Qt version selected - # parse -> "Using Qt version X.Y.Z in ..." - QtVersion=$($qmake -query QT_VERSION) - - # Split Major.Minor.Revision - could also use IFS hacking - set -- $(echo "$QtVersion" | sed -e 's/\./ /g') - - QtMajor=$1 - QtMinor=$2 - - if [ $QtMajor -ne 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ] - then - echo "*** Error: Qt version provided < 4.5" - echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 and < 5.0" - echo "*** e.g." - echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake" - echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake" - exit 1 - fi - else - echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" - exit 1 - fi -} - - -# -# Configure via cmake, but don't actually build anything -# -configParaView() -{ - local cmake=$(findCMake) - - # Remove any existing build folder and recreate - if [ -d $ParaView_BINARY_DIR ] - then - echo "removing old build directory" - echo " $ParaView_BINARY_DIR" - rm -rf $ParaView_BINARY_DIR - fi - mkdir -p $ParaView_BINARY_DIR - - cd $ParaView_BINARY_DIR || exit 1 # Change to build folder - - echo "----" - echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)" - echo " MPI support : ${withMPI:-false}" - echo " Python support : ${withPYTHON:-false}" - echo " MESA support : ${withMESA:-false}" - echo " GL2 rendering : false" - echo " Qt dev support : ${withQT:-false}" - echo " Source : $ParaView_SOURCE_DIR" - echo " Build : $ParaView_BINARY_DIR" - echo " Target : $ParaView_DIR" - echo " Cmake : $cmake" - echo "----" - echo - echo "$cmake" \ - -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ - $CMAKE_VARIABLES \ - $ParaView_SOURCE_DIR - echo - echo "----" - echo - - # Run cmake to create Makefiles - $cmake -Wno-dev \ - -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ - $CMAKE_VARIABLES \ - $ParaView_SOURCE_DIR -} - - -# -# Invoke make -# also link bin/ to lib/paraview-* for development without installation -# -makeParaView() -{ - cd $ParaView_BINARY_DIR || exit 1 # Change to build folder - echo " Starting make" - time make -j $WM_NCOMPPROCS - echo " Done make" - - # Remove lib if it is a link - # (how this was previously handled before 'make install' worked) - if [ -L lib ] - then - rm lib 2>/dev/null - fi -} - - -# -# Install the program -# -installParaView() -{ - cd $ParaView_BINARY_DIR || exit 1 # Change to build folder - echo " Installing ParaView to $ParaView_DIR" - - make install - -# hack for missing files after install of version 3.14.1 - echo "Copying missing files to install folder" - CMAKE_SRC_DIR=$ParaView_SOURCE_DIR/CMake - CMAKE_INSTALL_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR/CMake - cp -f $ParaView_SOURCE_DIR/ParaViewUse.cmake $CMAKE_INSTALL_DIR - cp -f $CMAKE_SRC_DIR/generate_proxydocumentation.cmake $CMAKE_INSTALL_DIR - cp -f $CMAKE_SRC_DIR/smxml_to_xml.xsl $CMAKE_INSTALL_DIR - cp -f $CMAKE_SRC_DIR/xml_to_html.xsl $CMAKE_INSTALL_DIR - cp -f $CMAKE_SRC_DIR/xml_to_wiki.xsl.in $CMAKE_INSTALL_DIR - cp -f $CMAKE_SRC_DIR/generate_qhp.cmake $CMAKE_INSTALL_DIR - unset CMAKE_SRC_DIR CMAKE_INSTALL_DIR -# --- end hack - -cat<< INFO - --- - Installation complete for paraview-$ParaView_VERSION - You may need to update the OpenFOAM environment by running: - wmRefresh - --- -INFO -} - - -#------------------------------------------------------------------------------ - -# Clear the referenced variables before using any of the functions -unset withMPI withVERBOSE -unset withQT QMAKE_PATH -unset withMESA MESA_INCLUDE MESA_LIBRARY -unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY -unset CMAKE_VARIABLES -unset OBJ_ADD - - -# Start with these general settings -addCMakeVariable "VTK_USE_TK:BOOL=OFF" -addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF" -addCMakeVariable "CMAKE_BUILD_TYPE:STRING=Release" - -# Include development files in "make install" -addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON" - -# Don't build test tree -addCMakeVariable "BUILD_TESTING:BOOL=OFF" - -# remove dependency on WebKit -# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF - -#------------------------------------------------------------------------------ diff --git a/makeParaView3 b/makeParaView3 deleted file mode 100755 index 6d86c09..0000000 --- a/makeParaView3 +++ /dev/null @@ -1,341 +0,0 @@ -#!/bin/sh -#------------------------------------------------------------------------------ -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. -#------------------------------------------------------------------------------ -# License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . -# -# Script -# makeParaView3 -# -# Description -# Make and install paraview for version 3.14.1 and higher -# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION -# (note capitalisation) -# -#------------------------------------------------------------------------------ -# Get ParaView_DIR location from OpenFOAM config file -. $WM_PROJECT_DIR/etc/config.sh/functions -_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview) - -# Determine ParaView_VERSION from ParaView_DIR location: -ParaView_VERSION="${ParaView_DIR##*/}"; export ParaView_VERSION -: ${ParaView_VERSION##*-} - -#------------------------------------------------------------------------------ -# Run from third-party directory only -cd ${0%/*} || exit 1 -wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { - echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" - echo " The environment variables are inconsistent with the installation." - echo " Check the OpenFOAM entries in your dot-files and source them." - exit 1 -} -. etc/tools/ThirdPartyFunctions -. etc/tools/ParaView3Functions -#------------------------------------------------------------------------------ -# -# USER OPTIONS: -# ~~~~~~~~~~~~~ - -# MPI support: -withMPI=false -MPI_MAX_PROCS=32 - -# Python support: -# note: script will try to determine the appropriate python library. -# If it fails, specify the path using the PYTHON_LIBRARY variable -withPYTHON=false -PYTHON_LIBRARY="" -# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0" - -# MESA graphics support: -withMESA=false -MESA_INCLUDE="/usr/include/GL" -MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so" - -# extra QT gui support (useful for some third party apps) -withQT=true - -# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older -QMAKE_PATH="" - -# Set the path to cmake -CMAKE_PATH="" - -# -# NO FURTHER EDITING BELOW THIS LINE -# -#----------------------------------------------------------------------------- -Script=${0##*/} - -usage() { - : ${ParaView_VERSION:=none} # some dummy value for usage information - exec 1>&2 - while [ "$#" -ge 1 ]; do echo "$1"; shift; done - cat< Date: Fri, 11 Nov 2016 14:26:49 +0100 Subject: [PATCH 09/24] COMP: Ensure makeParaView works for current and upcoming paraview (issue #10) - minor patching is still required for 5.1.2 (July 2016 release). - no patching is currently needed for 5.2.0-RC4. We have supplied the necessary patches upstream. - https://gitlab.kitware.com/paraview/paraview/merge_requests/1022 - https://gitlab.kitware.com/paraview/paraview/merge_requests/1024 --- README.org | 48 +++++++++-------------------------- etc/patches/paraview-5.1.2 | 13 ++++++++++ etc/tools/ThirdPartyFunctions | 2 ++ makeCGAL | 11 ++++++-- makeParaView | 2 +- makeTecio | 12 +++++++-- makeVTK | 2 +- 7 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 etc/patches/paraview-5.1.2 diff --git a/README.org b/README.org index 4b1fcfe..302f1ec 100644 --- a/README.org +++ b/README.org @@ -2,7 +2,7 @@ # #+TITLE: OpenFOAM Third-Party packages #+AUTHOR: The OpenFOAM Foundation / OpenCFD Ltd. -#+DATE: 2016-10-14 +#+DATE: 2016-11-11 #+LINK: http://www.openfoam.org #+OPTIONS: author:nil ^:{} # Copyright (c) 2014-2016 OpenFOAM Foundation. @@ -40,6 +40,8 @@ + cmake http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz + ParaView-4.4.0 http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz + ParaView-5.0.1 http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz + + ParaView-5.1.2 http://www.paraview.org/files/v5.1/ParaView-v5.1.2.tar.gz + + ParaView-5.2.0 http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz but may need patching to compile (See [[Notes]]). *** ADIOS + https://github.com/ornladios/ADIOS/archive/v1.10.0.tar.gz @@ -50,6 +52,7 @@ *** Miscellaneous + FFTW http://www.fftw.org/fftw-3.3.4.tar.gz + libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz + + tecio http://www.tecplot.com/my/tecio-library/ (needs registration) * Notes *** Building ADIOS + Currently requires GNU autoconf tools (eg, autoconf, autoheader, automake) @@ -58,45 +61,18 @@ *** Building Scotch + The zlib library and zlib development headers are required. * Notes -*** Building ParaView-4.3.1/4.4.0/5.0.0/5.0.1 - The ParaView-4.3.1/4.4.0/5.0.0 source-pack provided by KitWare will not - build and install correctly without a minor correction: lines 653-656 - (650-653 in ParaView-5.0.0, 659-662 in ParaView-5.0.1) must be removed or - commented from file - /ThirdParty-???/ParaView-[45].?.?/Qt/Components/CMakeLists.txt/ after - unpacking and renaming the ParaView-[45].?.? directory. This is because the - file ui_pqExportStateWizard.h referred to in - #+begin_src C - if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" - DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") - endif() - #+end_src - does not exist and cannot be installed causing the build and installation to - fail. - - Additionally for ParaView-4.4.0 there is a bug in the STL reader. - (see http://www.openfoam.org/mantisbt/view.php?id=1887). - - For ParaView-4.4.0 and ParaView-5.0.1, - the necessary patches are supplied with the ThirdParty repository - (see the etc/patches directory) and are applied when building paraview. - -*** Building ParaView-5.0.1 with gcc-6.1.0 -***** Add support for gcc-6.?.? - The following cmake files - + ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake - + ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake - specifically limit the gcc versions supported. - To add support gcc-6.?.? replace the '[345]' with '[3456]'. - - This patch is also supplied with the ThirdParty repository and - applied when building paraview. - +*** Building ParaView-4.4.0/5.0.0/5.0.1/5.1.2 + If using makeParaView, the following patches will be automatically + applied (see the etc/patches directory): + + Bugfix for STL reader - affects 4.4.0 only. + + Broken installation [ui_pqExportStateWizard.h] - affects 4.4.0/5.0.0/5.0.1/5.1.x + + Building with gcc-6.1.0 - affects 4.4.0/5.0.0/5.0.1 (patch applied for 5.0.1) ***** SciberQuestToolKit The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes the compilation of ParaView to halt. The easiest solution is to delete the ParaView-5.0.1/Plugins/SciberQuestToolKit directory. +*** Building ParaView-5.2.0 + Now compiles without patching. *** Building ParaView-4.1.0 On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent GNU/Linux distributions there is an issue in the GL libraries requiring a diff --git a/etc/patches/paraview-5.1.2 b/etc/patches/paraview-5.1.2 new file mode 100644 index 0000000..9bd8929 --- /dev/null +++ b/etc/patches/paraview-5.1.2 @@ -0,0 +1,13 @@ +--- ParaView-5.1.2/Qt/Components/CMakeLists.txt.orig 2016-07-26 21:52:16.000000000 +0200 ++++ ParaView-5.1.2/Qt/Components/CMakeLists.txt 2016-11-11 14:41:19.395242358 +0100 +@@ -590,8 +590,8 @@ + + #the pqSGExportStateWizard has subclasses that directly access + #the UI file, and currently we don't have a clean way to break this hard +-#dependency, so for no we install this ui file. +-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) ++#dependency, so for now we manually install this ui file. ++if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" + DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") + endif() diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index 40356ce..61f6030 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -89,6 +89,7 @@ _foamIsSystem() # try to locate cmake according to the CMAKE_PATH # or just use what is found in the path # +unset CMAKE_PATH # clear when first loaded findCMake() { local candidate @@ -157,6 +158,7 @@ NOT_FOUND # try to locate qmake according to the QMAKE_PATH # or just use what is found in the path # +unset QMAKE_PATH # clear when first loaded findQtMake() { local candidate diff --git a/makeCGAL b/makeCGAL index 37e3c58..f365036 100755 --- a/makeCGAL +++ b/makeCGAL @@ -67,6 +67,7 @@ usage() { usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION] options: + -cmake PATH with cmake from the path given -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -system use system versions for boost/gmp/mpfr -help @@ -86,7 +87,6 @@ USAGE exit 1 } #------------------------------------------------------------------------------ - # Ensure CMake gets the correct C/C++ compiler [ -n "$WM_CC" ] && export CC="$WM_CCX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" @@ -105,6 +105,11 @@ do export CC=gcc # use gcc/g++ export CXX=g++ ;; + -cmake) + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + CMAKE_PATH="${2%%/}" + shift + ;; -sys*) gmpPACKAGE="gmp-system" mpfrPACKAGE="mpfr-system" @@ -387,11 +392,13 @@ CMAKE_OPTIONS echo " system : mpfr" fi + cmake=$(findCMake) + # For CGAL < 4.9, for installation into lib64/, not lib/ # Name only (not path) for CGAL_INSTALL_LIB_DIR echo "----" set -x - cmake \ + $cmake \ -DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \ -DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/makeParaView b/makeParaView index 3164fde..f0a24af 100755 --- a/makeParaView +++ b/makeParaView @@ -106,7 +106,7 @@ options: -mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no upper-limit on processes. -python with python (if not already enabled) - -cmake PATH with the cmake version corresponding to the cmake path given + -cmake PATH with cmake from the path given -qmake PATH with the Qt version corresponding to the qmake path given -qt with extra Qt gui support (if not already enabled) -qt-VER with Qt version corresponding to diff --git a/makeTecio b/makeTecio index bfa9b13..6ee8132 100755 --- a/makeTecio +++ b/makeTecio @@ -65,7 +65,8 @@ usage() Usage: ${0##*/} [OPTION] [boost-VERSION] [tecio-VERSION] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -cmake PATH with cmake from the path given + -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -help @@ -93,6 +94,11 @@ do export CC=gcc # use gcc/g++ export CXX=g++ ;; + -cmake) + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + CMAKE_PATH="${2%%/}" + shift + ;; boost-[0-9]* | boost_[0-9]* | boost-system ) boostPACKAGE="${1%%/}" ;; @@ -168,9 +174,11 @@ then echo " Boost : system" fi + cmake=$(findCMake) + echo "----" set -x - cd $TECIO_BINARY_DIR && cmake \ + cd $TECIO_BINARY_DIR && $cmake \ -DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \ -DCMAKE_BUILD_TYPE=Release \ -DBoost_INCLUDE_DIR=$boostInc \ diff --git a/makeVTK b/makeVTK index 4e084e6..d2b4937 100755 --- a/makeVTK +++ b/makeVTK @@ -89,7 +89,7 @@ options: -mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no upper-limit on processes. -osmesa with off-screen mesa only - -cmake PATH with the cmake version corresponding to the cmake path given + -cmake PATH with cmake from the path given -gcc force g++ instead of the value from \$WM_CXX -verbose verbose output in Makefiles -version VER specify an alternative version (current value: $VTK_VERSION) From 223718a8f234bc1c53e44653cf2d0fc79d5b3660 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 11 Nov 2016 18:58:07 +0100 Subject: [PATCH 10/24] COMP: ensure min compiler versions are properly noted. - update makeLLVM to build latest clang (3.9.0), which needs cmake. --- Allclean | 2 +- README.org | 11 ++++-- makeLLVM | 111 ++++++++++++++++++++++++++++++++++++++--------------- 3 files changed, 87 insertions(+), 37 deletions(-) diff --git a/Allclean b/Allclean index 22792c1..2416e67 100755 --- a/Allclean +++ b/Allclean @@ -67,7 +67,7 @@ fi #------------------------------------------------------------------------------ # Clean various packages via 'distclean' -for i in openmpi-* ADIOS-* +for i in openmpi-* ADIOS-* metis-* do [ -d "$i" ] && ( echo diff --git a/README.org b/README.org index 302f1ec..77a0f1b 100644 --- a/README.org +++ b/README.org @@ -11,19 +11,18 @@ * Description Scripts for building third-party packages. * Build Order: - + makeGcc (recommended if the system gcc is < 4.7) + + makeGcc (recommended if the system gcc is < 4.8) + Allwmake (Builds OpenMPI, Scotch etc.) + makeCmake (if the system cmake version is < 2.8.8) + makeParaView *** Optional Build Components: - + makeLLVM (Replaces makeGcc in the above description - - to use clang as compiler) + + makeLLVM (Replaces makeGcc in the above description to use clang as compiler) + makeADIOS (Only required for ADIOS support) + makeCCMIO (Only required for conversion of STAR-CCM+ meshes) + Allclean (Only required to save disk space) * Versions and locations to download the third party packages *** Gcc C++ Compiler - The minimum version of gcc required is 4.5.0 + The minimum version of gcc required is 4.8.0 + gcc http://gcc.gnu.org/releases.html + gmp http://gmplib.org/ ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.bz2 @@ -31,6 +30,10 @@ ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2 + mpc http://www.multiprecision.org/ ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz +*** Clang/LLVM C++ Compiler + The minimum version of clang required is 3.3 + + clang http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz + + llvm http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz *** Parallel Processing ***** Scotch + Scotch/PtScotch: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz diff --git a/makeLLVM b/makeLLVM index 33c0e0b..8d301bb 100755 --- a/makeLLVM +++ b/makeLLVM @@ -52,7 +52,7 @@ # #------------------------------------------------------------------------------ # get default llvm/clang version -WM_COMPILER_TYPE="ThirdParty" # ensure we get the correct compiler settings +WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings WM_COMPILER=Clang # force values for 'clang' . $WM_PROJECT_DIR/etc/config.sh/functions @@ -79,6 +79,8 @@ usage() { usage: $Script [OPTION] [llvm-VERSION] options: + -cmake PATH with cmake from the path given + -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -help * build llvm/clang @@ -89,6 +91,10 @@ USAGE } #----------------------------------------------------------------------------- +# Ensure CMake gets the correct C/C++ compiler +[ -n "$WM_CC" ] && export CC="$WM_CCX" +[ -n "$WM_CXX" ] && export CXX="$WM_CXX" + # parse options while [ "$#" -gt 0 ] @@ -97,6 +103,15 @@ do -h | -help) usage ;; + -gcc) + export CC=gcc # use gcc/g++ + export CXX=g++ + ;; + -cmake) + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + CMAKE_PATH="${2%%/}" + shift + ;; llvm-[0-9]* | llvm-svn*) llvmPACKAGE="${1%%/}" ;; @@ -114,16 +129,16 @@ done buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH -LLVM_ARCH_PATH=$installBASE/$llvmPACKAGE +# Build LLVM (clang) +# LLVM_SOURCE_DIR : location of the original sources +# LLVM_BINARY_DIR : location of the build +# LLVM_ARCH_PATH : location of the installed program +# - Strip any trailing '.src' from the proper names + +LLVM_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$llvmPACKAGE +LLVM_BINARY_DIR=$buildBASE/${llvmPACKAGE%%.src} +LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src} -# name of source directory -# - may have a llvm/ subdirectory, depending on how the sources were fetched -# -sourceDIR=$WM_THIRD_PARTY_DIR/$llvmPACKAGE -if [ -f $sourceDIR/llvm/configure ] -then - sourceDIR=$sourceDIR/llvm -fi # # Build LLVM @@ -132,31 +147,63 @@ echo "---------------" if [ -d $LLVM_ARCH_PATH ] then echo "Already built: $llvmPACKAGE" -else - echo "Starting build: $llvmPACKAGE" +elif [ -z "$CMAKE_PATH" ] && $LLVM_SOURCE_DIR/configure -help >/dev/null 2>&1 +then + # configure can be used prior to 3.9.0 + # but use cmake if someone explicitly mentioned -cmake on the command-line + + echo "Starting build: $llvmPACKAGE (using configure)" echo -( - cd $sourceDIR || exit 1 - make distclean 2>/dev/null + ( + cd $LLVM_SOURCE_DIR || exit 1 + make distclean 2>/dev/null - buildDIR=$buildBASE/$llvmPACKAGE - rm -rf $buildDIR - mkdir -p $buildDIR - cd $buildDIR + rm -rf $LLVM_BINARY_DIR + mkdir -p $LLVM_BINARY_DIR + cd $LLVM_BINARY_DIR + + set -x + $LLVM_SOURCE_DIR/configure \ + --prefix=$LLVM_ARCH_PATH \ + --with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \ + --enable-optimized \ + --enable-shared \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $llvmPACKAGE" + ) || { + echo "Error building: $llvmPACKAGE" + exit 1 + } + +else + # CMake used with 3.9.0 and later + + echo "Starting build: $llvmPACKAGE (using cmake)" + echo + ( + cd $LLVM_SOURCE_DIR || exit 1 + + rm -rf $LLVM_BINARY_DIR + mkdir -p $LLVM_BINARY_DIR + cd $LLVM_BINARY_DIR + + cmake=$(findCMake) + + set -x + $cmake \ + -DCMAKE_INSTALL_PREFIX=$LLVM_ARCH_PATH \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + $LLVM_SOURCE_DIR \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $llvmPACKAGE" + ) || { + echo "Error building: $llvmPACKAGE" + exit 1 + } - set -x - $sourceDIR/configure \ - --prefix=$LLVM_ARCH_PATH \ - --with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \ - --enable-optimized \ - --enable-shared \ - && make -j $WM_NCOMPPROCS \ - && make install \ - && echo "Built: $llvmPACKAGE" -) || { - echo "Error building: $llvmPACKAGE" - exit 1 -} fi #------------------------------------------------------------------------------ From d23b9bf9682c25ce77e18acbd926f643bed381f5 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 13 Nov 2016 19:55:36 +0100 Subject: [PATCH 11/24] CONFIG: use metis 'native' size for float/double - this follows the change to metisDecomp --- Allwmake | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Allwmake b/Allwmake index ada1307..76acefb 100755 --- a/Allwmake +++ b/Allwmake @@ -369,28 +369,14 @@ then cd $METIS_VERSION || exit 1 rm -rf $METIS_ARCH_PATH - case "$WM_PRECISION_OPTION" in - SP) - WM_SCALAR_SIZE=32 - ;; - DP) - WM_SCALAR_SIZE=64 - ;; - *) - echo " Metis pre-configure error:" - echo " WM_PRECISION_OPTION neither DP nor SP" - exit 1 - esac - - # Change user settings automatically + # Adjust metis integer size to match OpenFOAM label-size sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \ - -e 's=\(#define REALTYPEWIDTH\).*=\1 '$WM_SCALAR_SIZE'=' \ include/metis.h # No config option for the library location. # - build normally and use mv to relocate it - make config shared=true prefix=$METIS_ARCH_PATH \ + make config shared=1 prefix=$METIS_ARCH_PATH \ && make -j $WM_NCOMPPROCS install \ && mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN From ba2c04d45440ffa0aa1d341bf36d75859403ceba Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 21 Nov 2016 23:09:34 +0100 Subject: [PATCH 12/24] ENH: also support compilation of ParaView-vX.Y.Z source directories (issue #10) - The ParaView sources mostly unpack into ParaView-v5.2.0, so support this directly without forcing people to rename the directory first. --- etc/tools/ParaViewFunctions | 16 +++++++++++++--- etc/tools/vtkFunctions | 16 +++++++++++++--- makeParaView | 9 ++++++--- makeVTK | 10 ++++++---- 4 files changed, 38 insertions(+), 13 deletions(-) diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 7968344..94fc562 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -41,11 +41,21 @@ # setParaViewDirs() { - ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION + set -- "ParaView-$ParaView_VERSION" "ParaView-v$ParaView_VERSION" + + unset ParaView_SOURCE_DIR + for i + do + ParaView_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i" + [ -d "$ParaView_SOURCE_DIR" ] && break + done [ -d "$ParaView_SOURCE_DIR" ] || { - echo "did not find ParaView-$ParaView_VERSION in these directories:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo "Did not locate ParaView version:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "In the directory:" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" echo echo "abort build" exit 1 diff --git a/etc/tools/vtkFunctions b/etc/tools/vtkFunctions index a87e4e0..89e2392 100644 --- a/etc/tools/vtkFunctions +++ b/etc/tools/vtkFunctions @@ -42,11 +42,21 @@ # setVtkDirs() { - VTK_SOURCE_DIR=$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION + set -- "VTK-$VTK_VERSION" "VTK-v$VTK_VERSION" + unset VTK_SOURCE_DIR + + for i + do + VTK_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i" + [ -d "$VTK_SOURCE_DIR" ] && break + done [ -d "$VTK_SOURCE_DIR" ] || { - echo "did not find VTK-$VTK_VERSION in these directories:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo "Did not locate VTK version:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "In the directory:" + echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" echo echo "abort build" exit 1 diff --git a/makeParaView b/makeParaView index f0a24af..b559e8f 100755 --- a/makeParaView +++ b/makeParaView @@ -26,9 +26,12 @@ # makeParaView # # Description -# Make and install paraview 4 or 5 -# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION -# (note capitalisation) +# Make and install ParaView 4 or 5. +# The ParaView sources should be located under one of these locations: +# - $WM_THIRD_PARTY_DIR/ParaView-VERSION +# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION +# +# Note the capitalization of ParaView in the directory names. # #------------------------------------------------------------------------------ # Get ParaView_DIR location from OpenFOAM config file diff --git a/makeVTK b/makeVTK index d2b4937..d87b7ce 100755 --- a/makeVTK +++ b/makeVTK @@ -26,16 +26,18 @@ # makeVTK # # Description -# Make and install VTK -# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION +# Make and install VTK. +# The VTK sources should be located under one of these locations: +# - $WM_THIRD_PARTY_DIR/ParaView-VERSION +# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION # # To use the VTK source from the ParaView source tree, simply make an # appropriate link first. For example, # -# ln -s ParaView-5.1.0/VTK VTK-7.1.0 +# ln -s ParaView-v5.2.0/VTK VTK-7.1.0 # #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only cd ${0%/*} || exit 1 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" From 9c1fb023c7f0b2cb0084b064543218ecb55ab622 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 21 Nov 2016 23:27:52 +0100 Subject: [PATCH 13/24] COMP: Ensure makeQt work (issue #11) --- etc/relocateQt | 28 +++++++---- etc/tools/QtFunctions | 50 ++++++++++---------- makeQt | 107 ++++++++++++++++++++++++++++-------------- 3 files changed, 116 insertions(+), 69 deletions(-) diff --git a/etc/relocateQt b/etc/relocateQt index 1542115..915ab0b 100755 --- a/etc/relocateQt +++ b/etc/relocateQt @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -26,12 +26,13 @@ # etc/relocateQt # # Description -# Change prefix when relocating qt installation +# Change prefix when relocating QT installation # #------------------------------------------------------------------------------ -qtVERSION=4.7.2 +qtVERSION=4.8.7 + #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" echo " The environment variables are inconsistent with the installation." @@ -49,15 +50,18 @@ usage() { usage: ${0##*/} [OPTION] [VERSION] options: - -force create qt.conf and edit pkgconfig to use \${prefix} + -force Create qt.conf and edit pkgconfig to use \${prefix} -help +Adjust prefix in qt.conf and pkgconfig files after relocating third-party +with a QT installation. + * adjust relocation prefix for $qtVERSION USAGE exit 1 } - +#------------------------------------------------------------------------------ unset forceOpt # parse options @@ -70,9 +74,10 @@ do -f | -force) forceOpt=true ;; - [1-9]* | qt-[1-9]*) + -qt-[1-9]* | [1-9]* | qt-*) + # -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION qtVERSION="${1%%/}"; - qtVERSION="${qtVERSION#qt-}" + qtVERSION="${qtVERSION##*-}" ;; *) die "unknown option/argument: '$1'" @@ -82,9 +87,12 @@ do done #------------------------------------------------------------------------------ -prefixDIR=$installBASE/qt-$qtVERSION +QT_ARCH_PATH=$installBASE/qt-$qtVERSION -[ "${forceOpt:-false}" = true ] && finalizeQt +if [ "${forceOpt:-false}" = true ] +then + finalizeQt +fi changePrefix diff --git a/etc/tools/QtFunctions b/etc/tools/QtFunctions index 8d6e3ac..363de9e 100644 --- a/etc/tools/QtFunctions +++ b/etc/tools/QtFunctions @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -30,41 +30,41 @@ #------------------------------------------------------------------------------ # -# create a qt.conf file in the QT bin/ -# this can be modified easily if the qt installation gets relocated +# Create a qt.conf file in the QT bin/ +# - this can be modified easily if the qt installation is relocated # createQtConf() { echo "create:" - echo " $prefixDIR/bin/qt.conf" + echo " $QT_ARCH_PATH/bin/qt.conf" - [ -n "$prefixDIR" -a -d "$prefixDIR/bin" ] || { - echo "Error: prefixDIR not correctly set" + [ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" ] || { + echo "Error: QT_ARCH_PATH not correctly set" return } - echo "[Paths]" > $prefixDIR/bin/qt.conf - echo "Prefix=$prefixDIR" >> $prefixDIR/bin/qt.conf + echo "[Paths]" > $QT_ARCH_PATH/bin/qt.conf + echo "Prefix=$QT_ARCH_PATH" >> $QT_ARCH_PATH/bin/qt.conf } # -# adjust pkgconfig information +# Adjust pkgconfig information # to generalize *location=, -L/... and -I/... # to use ${prefix} # adjustPkgConfig() { echo "edit pkgconfig:" - echo " $prefixDIR/lib/pkgconfig/*.pc" + echo " $QT_ARCH_PATH/lib/pkgconfig/*.pc" - [ -n "$prefixDIR" -a -d "$prefixDIR/lib/pkgconfig" ] || { - echo "Error: prefixDIR not correctly set" + [ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/lib/pkgconfig" ] || { + echo "Error: QT_ARCH_PATH not correctly set" return } ( - cd $prefixDIR/lib/pkgconfig || exit + cd $QT_ARCH_PATH/lib/pkgconfig || exit unset nfiles for i in *.pc @@ -73,8 +73,8 @@ adjustPkgConfig() then nfiles="x$nfiles" sed -i \ - -e 's@\(location=\)'"$prefixDIR/"'@\1${prefix}/@' \ - -e 's@\(-[IL]\)'"$prefixDIR/"'@\1${prefix}/@g' \ + -e 's@\(location=\)'"$QT_ARCH_PATH/"'@\1${prefix}/@' \ + -e 's@\(-[IL]\)'"$QT_ARCH_PATH/"'@\1${prefix}/@g' \ $i fi done @@ -84,29 +84,29 @@ adjustPkgConfig() # -# change prefix=... and Prefix=... to use ${prefix} +# Change prefix=... and Prefix=... to use ${prefix} # changePrefix() { echo "relocate QT installation to new prefix directory:" - echo " $prefixDIR" + echo " $QT_ARCH_PATH" echo "edit:" - echo " $prefixDIR/bin/qt.conf" - echo " $prefixDIR/lib/pkgconfig/*.pc" + echo " $QT_ARCH_PATH/bin/qt.conf" + echo " $QT_ARCH_PATH/lib/pkgconfig/*.pc" - [ -n "$prefixDIR" -a -d "$prefixDIR/bin" -a -d "$prefixDIR/lib/pkgconfig" ] || { - echo "Error: prefixDIR not correctly set" + [ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" -a -d "$QT_ARCH_PATH/lib/pkgconfig" ] || { + echo "Error: QT_ARCH_PATH not correctly set" return } # adjust qt.conf - for i in $prefixDIR/bin/qt.conf + for i in $QT_ARCH_PATH/bin/qt.conf do if [ -f "$i" ] then nfiles="x$nfiles" sed -i \ - -e 's@^\([Pp]refix=\).*$@\1'"$prefixDIR@" \ + -e 's@^\([Pp]refix=\).*$@\1'"$QT_ARCH_PATH@" \ $i echo " edited 1 file" fi @@ -114,7 +114,7 @@ changePrefix() # adjust pkgconfig files ( - cd $prefixDIR/lib/pkgconfig || exit + cd $QT_ARCH_PATH/lib/pkgconfig || exit unset nfiles for i in *.pc @@ -123,7 +123,7 @@ changePrefix() then nfiles="x$nfiles" sed -i \ - -e 's@^\([Pp]refix=\).*$@\1'"$prefixDIR@" \ + -e 's@^\([Pp]refix=\).*$@\1'"$QT_ARCH_PATH@" \ $i fi done diff --git a/makeQt b/makeQt index d0723fa..1b65e6e 100755 --- a/makeQt +++ b/makeQt @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -26,13 +26,14 @@ # makeQt # # Description -# Build script for qt-everywhere-opensource-src +# Build script for QT (the qt-everywhere-opensource-src package) # #------------------------------------------------------------------------------ -qtVERSION=4.7.3 +qtVERSION=4.8.7 qtTYPE=qt-everywhere-opensource-src + #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" echo " The environment variables are inconsistent with the installation." @@ -59,10 +60,11 @@ USAGE exit 1 } #------------------------------------------------------------------------------ - -# ensure configure gets the correct C/C++ compiler -[ -n "$WM_CC" ] && export CC="$WM_CC" -[ -n "$WM_CXX" ] && export CXX="$WM_CXX" +# export WM settings in a form that GNU configure recognizes +[ -n "$WM_CC" ] && export CC="$WM_CC" +[ -n "$WM_CXX" ] && export CXX="$WM_CXX" +[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" +[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" # parse options while [ "$#" -gt 0 ] @@ -75,9 +77,10 @@ do export CC=gcc # use gcc/g++ export CXX=g++ ;; - [1-9]* | qt-[1-9]*) + -qt-[1-9]* | [1-9]* | qt-*) + # -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION qtVERSION="${1%%/}"; - qtVERSION="${qtVERSION#qt-}" + qtVERSION="${qtVERSION##*-}" ;; *) die "unknown option/argument: '$1'" @@ -85,47 +88,83 @@ do esac shift done +qtPACKAGE=$qtTYPE-$qtVERSION + +# nothing to build +if _foamIsNone "$qtPACKAGE" +then + echo "Using qt-none (skip ThirdParty build of QT)" + exit 0 +elif _foamIsSystem "$qtPACKAGE" +then + echo "Using qt-system" + exit 0 +fi #------------------------------------------------------------------------------ -qtPACKAGE=$qtTYPE-$qtVERSION -prefixDIR=$installBASE/qt-$qtVERSION - - # # Build QT -# -echo "---------------" -if [ -d "$prefixDIR" -a -r "$prefixDIR/bin/qmake" ] + +QT_ARCH_PATH=$installBASE/qt-$qtVERSION +QT_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$qtPACKAGE + +echo +echo ======================================== +echo "Build Qt $qtPACKAGE" +echo +if [ -d "$QT_ARCH_PATH" -a -r "$QT_ARCH_PATH/bin/qmake" ] then echo "Already built: Qt-$qtVERSION" else echo "Starting build: Qt-$qtVERSION" ( - sourceDIR=$WM_THIRD_PARTY_DIR/$qtPACKAGE + # Configuration options: + unset configOpt + configOpt="$configOpt -nomake examples" + + case "$qtVERSION" in + 4*) # QT-4 + # Without demos. + configOpt="$configOpt -nomake demos" + + # Without old qt3 transition code + configOpt="$configOpt -no-qt3support" + + # Without WebKit - uses std:tr1 and does not compile with c++11 + # Fortunately WebKit is now optional for ParaView + configOpt="$configOpt -no-webkit" + ;; + + *) # QT-5 + # Avoid too many X11 system dependencies. + configOpt="$configOpt -qt-xcb" + ;; + esac + + # end of configuration options + # ---------------------------- buildDIR=$buildBASE/$qtPACKAGE - cd $sourceDIR || exit 1 - make distclean 2>/dev/null + cd $QT_SOURCE_DIR || exit 1 + [ -e Makefile ] && make distclean 2>/dev/null - rm -rf $buildDIR + # Remove any existing build folder and recreate + rm -rf $QT_ARCH_DIR + rm -rf $buildDIR 2>/dev/null mkdir -p $buildDIR - cd $buildDIR - # remove old junk - rm -rf $prefixDIR + # Remove any remnants from a previous shadow build + rm -f "$QT_SOURCE_DIR/.qmake.cache" 2>/dev/null + rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null + rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null - # remove any remnants from a previous shadow build - rm -f "$sourceDIR/.qmake.cache" 2>/dev/null - rm -f "$sourceDIR/src/corelib/global/qconfig.h" 2>/dev/null - rm -f "$sourceDIR/src/corelib/global/qconfig.cpp" 2>/dev/null + cd $buildDIR || exit 1 - # compile as opensource, accepting LGPL conditions - echo "yes" | \ - $sourceDIR/configure \ - --prefix=$prefixDIR \ + # Compile as opensource, accepting LGPL conditions (yes) + echo yes | $QT_SOURCE_DIR/configure \ + -prefix $QT_ARCH_PATH \ -opensource \ - -nomake demos \ - -nomake examples \ + $configOpt \ && time make -j $WM_NCOMPPROCS \ && make install \ && echo "Built: Qt-$qtVERSION" \ From e5f3d03715531a8057587425c0f60d2e1c5b96f4 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 22 Nov 2016 00:10:02 +0100 Subject: [PATCH 14/24] ENH: provide more detailed description as README.md file (issue #11) - include comments about building Qt etc. --- README.md | 426 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.org | 86 ----------- minCmake | 96 ++++++++++++ 3 files changed, 522 insertions(+), 86 deletions(-) create mode 100644 README.md delete mode 100644 README.org create mode 100755 minCmake diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ee070b --- /dev/null +++ b/README.md @@ -0,0 +1,426 @@ + + +--- + +# OpenFOAM® ThirdParty + +OpenFOAM depends to a certain extent on third-party libraries +(*opensource only*). It also provides some interfaces to *opensource* or +*proprietary* libraries. This third-party package contains configurations and +scripts for building third-party packages. It should normally only be used in +conjunction with the corresponding OpenFOAM version. + + +## Configuration of Third-Party Versions + +The distributed make scripts can generally be used for a variety of +versions of the third-party libraries, with the software version +specified on the command-line. For example, + + $ ./makeFFTW -help + usage: makeFFTW [OPTION] [fftw-VERSION] + +If a version is not explicitly specified on the command-line, it will +use the version as specified by the appropriate OpenFOAM +`etc/config.sh/...` entry. + +This approach avoids duplicate entries for the default versions and +ensures the best overall consistency between the OpenFOAM installation +and its corresponding third-party installation. + +--- + +## Before Starting + +1. Decide on compiler type/version, + MPI type/version, + ParaView type/version, + CMake type/version, etc. + - If the system compiler is not relatively recent, you will need to use a + [third-party compiler installation](#makeGcc). +2. If you are using a system MPI (eg, openmpi), ensure that this environment + has also been properly activated for your user. + Often (but not always) a `mpi-selector` command is available for this purpose. + You may need to open a new shell afterwards for the change to take effect. + Using the following command may help diagnosing things: + + which mpicc + +3. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent + `prefs.sh` files to reflect your preferred configuration. + For many config files, there are several configuration possibilities: + - Define a particular third-party version. + - Use a system installation. + - Disable use of an optional component. + - Define an alternative site-wide central location. + - After making the desired changes, use `wmRefresh` or equivalent to use the configurations. + + +--- + +## Build Sequence +1. `makeGcc` _or_ `makeLLVM` *(optional)* + - Makes a third-party [gcc](#gcc-compiler) or [clang](#clang-compiler) installation, + which is needed if the system gcc is [too old](#gcc-compiler). + If your system compiler is recent enough, you can skip this step. + - If you do use this option, you will need the following adjustments to the + OpenFOAM `etc/bashrc` or your equivalent `prefs.sh` file: + - `WM_COMPILER_TYPE=ThirdParty` + - `WM_COMPILER=Gcc48` (for example) + - or `WM_COMPILER=Clang` and adjust the `clang_version` entry in the OpenFOAM + `etc/config.sh/compiler` or equivalent. + - More description is contained in the header comments of the + `makeGcc` and `makeLLVM` files. + - *Attention*: If you are building a newer version of clang, you may need to + update your CMake beforehand. +2. `makeCmake` *(optional)* + - Makes a third-party [CMake](#general-packages) installation, which is + needed if a system CMake does not exist or is [too old](#min-cmake), + - Note that CMake is being used by an number of third-party packages + (CGAL, LLVM, ParaView, VTK, ...) + so this may become an increasingly important aspect of the build. +3. `Allwmake` + - This will be automatically invoked by the top-level OpenFOAM `Allwmake`, but + can also be invoked directly to find possible build errors. + - Builds an mpi library (openmpi or mpich), scotch decomposition, boost, CGAL, FFTW. + - If the optional metis directory is found, it will also be compiled. +4. `makeParaView` *(optional but highly recommended)* + - This is optional, but extremely useful for visualization and for + run-time post-processing function objects. + You can build this at a later point in time, but then you should + remember to rebuild the post-processing function objects and the + reader module as well. +5. Make any additional optional components + + +### Optional Components + +`makeADIOS` +- Only required for future ADIOS support + +`makeCGAL` +- Builds third-party boost and CGAL. + Automatically invoked from the ThirdParty `Allwmake`, + but can be invoked directly to resolve possible build errors. + +`makeFFTW` +- Builds third-party FFTW. + Automatically invoked from the ThirdParty `Allwmake`, + but can be invoked directly to resolve possible build errors. + +`makeCCMIO` +- Only required for conversion to/from STARCD/STARCCM+ files. + +`makeTecio` +- Only required for conversion of results to Tecplot format. + +`makeMesa`, `makeVTK` +- Additional support for building offscreen rendering components. + Useful if you want to render on computer servers without graphics cards. + The `makeParaView.example` and `makeVTK.example` files provide some useful + suggestions about compiling such a configuration. + +`makeQt` +- Script to build a [third-party installation of Qt](#makeQt), including qmake. +- Possibly needed for `makeParaView`. + +`makeGperftools` +- Build gperftools (originally Google Performance Tools) + +`minCmake` +- Scour specified directories for CMakeLists.txt and their cmake_minimum. + Report in sorted order. + +`Allclean` +- After building, this script may be used to remove intermediate build information +and save some disk space. + + +## Build Notes + +### ADIOS +- The github release currently requires GNU autoconf tools (eg, + autoconf, autoheader, automake) for its configuration. +- Some inconsistency in directory names (ADIOS vs. adios) between releases. +- Optionally uses bzip2, zlib development headers (eg, libbz2-devel, zlib-devel) + for the corresponding compression tranforms. +- The [zfp floating point compression][page zfp] library is now included as + part of ADIOS. + +### Scotch +- The zlib library and zlib development headers are required. + + +### Mesa +- Needed for off-screen rendering. +- Building with mesa-12 fails to create an `include/GL` directory and + an `osmesa.h` file - making it fairly useless for off-screen VTK. +- Building with [mesa-11][older mesa] is fine and [mesa-13][linkg mesa] also seems to be okay. + + +### VTK +- Needed for off-screen rendering and run-time post-processing without + ParaView. +- Rather than downloading VTK separately, it is easy to reuse the VTK + sources that are bundled with ParaView. + For example, by using a symbolic link: + + ln -s ParaView-5.2.0/VTK VTK-7.1.0 + + The appropriate VTK version number can be found from the constents of + the `vtkVersion.cmake` file. + For example, + + $ cat ParaView-5.2.0/VTK/CMake/vtkVersion.cmake + + # VTK version number components. + set(VTK_MAJOR_VERSION 7) + set(VTK_MINOR_VERSION 1) + set(VTK_BUILD_VERSION 0) + +### ParaView +- Building ParaView requires CMake, qmake and a `qt` development files. + Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as + required. + See additional notes below about [making Qt](#makeQt) if necessary. + +### ParaView +- Both CMake and qmake are required when building ParaView. + +#### 5.2.0 +- Compiles without patching. + +#### 4.4.0/5.0.0/5.0.1/5.1.2 +- If using `makeParaView`, the following patches will be automatically + applied (see the `etc/patches` directory): + - Bugfix for STL reader - affects 4.4.0 only. + - Broken installation (ui_pqExportStateWizard.h) - affects 4.4.0/5.0.0/5.0.1/5.1.x + - Building with gcc-6.1.0 - affects 4.4.0/5.0.0/5.0.1 (patch applied for 5.0.1) + - The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes + the compilation of ParaView to halt. The easiest solution is to delete + the ParaView-5.0.1/Plugins/SciberQuestToolKit directory. + + +### Making Qt +- Building a third-party Qt installation (prior to building ParaView) requires + some additional effort, but should nonetheless work smoothly. + +1. Download a [*qt-everywhere-opensource-src*][link Qt] package and + unpack in the third-party directory. +2. Use the `makeQt` script with the QT version number. For example, + + ./makeQt 4.8.7 + +3. Build ParaView using this third-party QT. For example, + + ./makeParaView -qt-4.8.7 5.2.0 + +- ParaView does not yet support QT5. + +- If you relocate the third-party directory to another location + (eg, you built in your home directory, but want to install it in a + central location), you will need to use the `etc/relocateQt` script + afterwards. + + +--- + +## Versions + +### Gcc Compiler + +The minimum version of gcc required is 4.8.0. + +| Name | Location | +|-------------------|--------------------------------------------| +| [gcc][page gcc] | [releases][link gcc] | +| [gmp][page gmp] | system is often ok, otherwise [download][link gmp] | +| [mpfr][page mpfr] | system is often ok, otherwise [download][link mpfr] | +| [mpc][page mpc] | system is often ok, otherwise [download][link mpc] | + + +#### Potential MPFR conflicts + +If you elect to use a third-party version of mpfr, you may experience +conflicts with your installed system mpfr. +On some systems, mpfr is compiled as *non-threaded*, whereas the +third-party will use *threaded* by default. +This can cause some confusion at the linker stage, since it may +resolve the system mpfr first (and find that it is *non-threaded*). + +You can avoid this by one of two means: +1. Use system components for gmp/mpfr/mpc: `makeGcc -system ...` +2. Use third-party mpfr, but without threading: `makeGcc -no-threadsafe ...` + + +#### 32-bit build (on 64-bit) + +If you have a 64-bit system, but wish to have a 32-bit compiler, you +will need to enable multi-lib support for Gcc: `makeGcc -multilib`, +which is normally disabled, since many (most?) 64-bit systems do not +install the 32-bit development libraries by default. + + +### Clang Compiler + +The minimum version of clang required is 3.3. + +*Attention*: If you are building a newer version of clang, you may need to +update your CMake beforehand. +GNU *configure* can only be used prior to clang version 3.9. + + +| Name | Location | +|-----------------------|------------------------| +| [clang][page clang] | [download][link clang] | +| [llvm][page llvm] | [download][link llvm] | + + +### Parallel Processing + +| Name | Location | +|-----------------------|------------------------| +| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios] | +| [scotch, ptscotch][page scotch] | [download][link scotch] | +| [openmpi][page openmpi] | [download][link openmpi] | + + +### General + +| Name | Location | +|-----------------------|------------------------| +| [CMake][page cmake] | [download][link cmake] | +| [boost][page boost] | [download][link boost] | +| [CGAL][page CGAL] | [download][link CGAL] or [newer][newer CGAL] | +| [FFTW][page FFTW] | [download][link FFTW] | +| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio] | +| [tecio][page tecio] | [link tecio][link tecio] | +| gperftools | [repo][repo gperftools] or [download][link gperftools] | + + +### Visualization + +| Name | Location | +|-----------------------|------------------------| +| [MESA][page mesa] | [download][link mesa] or [older][older mesa] | +| [ParaView][page ParaView] | [download][link ParaView] or older [5.1][older ParaView-51], [5.0][older ParaView-50], [4.4][older ParaView-44] | +| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView. | + + +### CMake Minimum Requirements + +The minimum CMake requirements for building various components. + + 2.8 ADIOS-1.10.0 + 2.8 llvm-3.4.2 + 2.8 metis-5.1.0 + 2.8.11 CGAL-4.9 + 2.8.12.2 llvm-3.8.0 + 2.8.4 cmake-3.6.0 + 3.3 ParaView-5.1.2 + 3.3 ParaView-v5.2.0 + 3.4.3 llvm-3.9.0.src + 3.5 ParaView-5.1.0 + + + +[page gcc]: http://gcc.gnu.org/releases.html +[page gmp]: http://gmplib.org/ +[page mpfr]: http://www.mpfr.org/ +[page mpc]: http://www.multiprecision.org/ + +[link gcc]: http://gcc.gnu.org/releases.html +[link gmp]: ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.bz2 +[link mpfr]: ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2 +[link mpc]: ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz + + + +[page clang]: http://llvm.org/ +[page llvm]: http://llvm.org/ + +[link clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz +[link llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz + + + +[page adios]: https://www.olcf.ornl.gov/center-projects/adios/ +[repo adios]: https://github.com/ornladios/ADIOS +[link adios]: https://github.com/ornladios/ADIOS/archive/v1.11.0.tar.gz +[altlink adios]: http://users.nccs.gov/%7Epnorbert/adios-1.11.0.tar.gz +[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions + +[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/ +[link scotch]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz + +[page openmpi]: http://www.open-mpi.org/ +[link openmpi]: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.4.tar.bz2 +[newer openmpi]: https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.1.tar.bz2 + + + +[page cmake]: http://www.cmake.org/ +[link cmake]: http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz + +[page boost]: http://boost.org +[link boost]: https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2 + +[page CGAL]: http://cgal.org +[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz +[newer CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz + +[page FFTW]: http://www.fftw.org/ +[link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz + +[page cgns]: http://cgns.github.io/ +[link ccmio]: http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz (check usage conditions) + +[page tecio]: http://www.tecplot.com/ +[link tecio]: http://www.tecplot.com/my/tecio-library/ (needs registration) + +[repo gperftools]: https://github.com/gperftools/gperftools +[link gperftools]: https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz + + + + +[page ParaView]: http://www.paraview.org/ +[link ParaView]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz + +[page ParaView]: http://www.paraview.org/ +[link ParaView]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz + +[older ParaView-44]: http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz +[older ParaView-50]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz +[older ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz + +[page mesa]: http://mesa3d.org/ +[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.1/mesa-13.0.1.tar.xz +[older mesa]: ftp://ftp.freedesktop.org/pub/mesa/11.2.2/mesa-11.2.2.tar.xz + +[page Qt]: https://www.qt.io/download-open-source/ +[repo Qt]: http://code.qt.io/cgit/qt-creator/qt-creator.git +[link Qt]: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz +[newer Qt5]: http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz + + + +## Additional OpenFOAM Links + +- [Download and installation instructions](http://www.openfoam.com/releases) +- [Documentation](http://www.openfoam.com/documentation) +- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php) +- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php) +- [Contacting OpenCFD](http://www.openfoam.com/contact) + +--- + +Copyright 2016 OpenCFD Ltd diff --git a/README.org b/README.org deleted file mode 100644 index 77a0f1b..0000000 --- a/README.org +++ /dev/null @@ -1,86 +0,0 @@ -# -*- mode: org; -*- -# -#+TITLE: OpenFOAM Third-Party packages -#+AUTHOR: The OpenFOAM Foundation / OpenCFD Ltd. -#+DATE: 2016-11-11 -#+LINK: http://www.openfoam.org -#+OPTIONS: author:nil ^:{} -# Copyright (c) 2014-2016 OpenFOAM Foundation. -# Copyright (c) 2016 OpenCFD Ltd. - -* Description - Scripts for building third-party packages. -* Build Order: - + makeGcc (recommended if the system gcc is < 4.8) - + Allwmake (Builds OpenMPI, Scotch etc.) - + makeCmake (if the system cmake version is < 2.8.8) - + makeParaView -*** Optional Build Components: - + makeLLVM (Replaces makeGcc in the above description to use clang as compiler) - + makeADIOS (Only required for ADIOS support) - + makeCCMIO (Only required for conversion of STAR-CCM+ meshes) - + Allclean (Only required to save disk space) -* Versions and locations to download the third party packages -*** Gcc C++ Compiler - The minimum version of gcc required is 4.8.0 - + gcc http://gcc.gnu.org/releases.html - + gmp http://gmplib.org/ - ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.bz2 - + mpfr http://www.mpfr.org/ - ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2 - + mpc http://www.multiprecision.org/ - ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz -*** Clang/LLVM C++ Compiler - The minimum version of clang required is 3.3 - + clang http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz - + llvm http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz -*** Parallel Processing -***** Scotch - + Scotch/PtScotch: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz -***** OpenMPI - + OpenMPI: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.2.tar.bz2 -*** ParaView - + cmake http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz - + ParaView-4.4.0 http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz - + ParaView-5.0.1 http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz - + ParaView-5.1.2 http://www.paraview.org/files/v5.1/ParaView-v5.1.2.tar.gz - + ParaView-5.2.0 http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz - but may need patching to compile (See [[Notes]]). -*** ADIOS - + https://github.com/ornladios/ADIOS/archive/v1.10.0.tar.gz -*** CGAL - + CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz - + CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.1/CGAL-4.8.1.tar.xz - + boost https://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.bz2/download -*** Miscellaneous - + FFTW http://www.fftw.org/fftw-3.3.4.tar.gz - + libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz - + tecio http://www.tecplot.com/my/tecio-library/ (needs registration) -* Notes -*** Building ADIOS - + Currently requires GNU autoconf tools (eg, autoconf, autoheader, automake) - for its configuration. - + Optionally uses zlib, bzip2 development headers (eg, zlib-devel, libbz2-devel). -*** Building Scotch - + The zlib library and zlib development headers are required. -* Notes -*** Building ParaView-4.4.0/5.0.0/5.0.1/5.1.2 - If using makeParaView, the following patches will be automatically - applied (see the etc/patches directory): - + Bugfix for STL reader - affects 4.4.0 only. - + Broken installation [ui_pqExportStateWizard.h] - affects 4.4.0/5.0.0/5.0.1/5.1.x - + Building with gcc-6.1.0 - affects 4.4.0/5.0.0/5.0.1 (patch applied for 5.0.1) -***** SciberQuestToolKit - The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes - the compilation of ParaView to halt. The easiest solution is to delete - the ParaView-5.0.1/Plugins/SciberQuestToolKit directory. -*** Building ParaView-5.2.0 - Now compiles without patching. -*** Building ParaView-4.1.0 - On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent - GNU/Linux distributions there is an issue in the GL libraries requiring a - change to the vtkXOpenGLRenderWindow.cxx file in ParaView: Uncomment line 30 - - #define GLX_GLXEXT_LEGACY - -# -------------------------------------------------------------------------- diff --git a/minCmake b/minCmake new file mode 100755 index 0000000..1d94eef --- /dev/null +++ b/minCmake @@ -0,0 +1,96 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# minCmake +# +# Description +# Scour CMakeLists.txt files to report the cmake_minimum required. +# +#------------------------------------------------------------------------------ +# Run from third-party directory only +wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { + echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +} +#------------------------------------------------------------------------------ +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat</dev/null) + + if [ -n "$min" ] + then + echo "${min%.0}" $dir # With trailing ".0 removed + fi + +done \ + | sort -n -k 1 \ + | xargs printf " %-10s %s\n" + # Use 4 leading spaces for easier pasting as Markdown + +#------------------------------------------------------------------------------ From 0f5e1d67323e8a036b68aedb20638eae66d660a7 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 23 Nov 2016 15:52:24 +0100 Subject: [PATCH 15/24] ENH: initial support for building ParaView with QT5 - still issues with the required version eg, system has qt-5.5, but ParaView tries to use qt-5.6 --- etc/tools/ParaViewFunctions | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 94fc562..6a4d7c3 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -307,23 +307,31 @@ addQtSupport() # parse -> "Using Qt version X.Y.Z in ..." QtVersion=$($qmake -query QT_VERSION) - # Split Major.Minor.Revision - could also use IFS hacking - set -- $(echo "$QtVersion" | sed -e 's/\./ /g') + case "$QtVersion" in + 3.* | 4.[0-4]*) + # QT is too old + cat <= 4.5" - echo "*** e.g." - echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake" - echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake" +QT version ($QtVersion) provided < 4.5 +Please use the -qmake option to specify the location of a newer QT version +For example, + ... -qmake /usr/local/qt-4.6.2/bin/qmake + ... -qmake $installBASE/qt-4.6.2/bin/qmake +---- +ERROR exit 1 - fi + ;; + + 5.*) + # QT4 is the default, must specify QT5 explicitly + addCMakeVariable "PARAVIEW_QT_VERSION:STRING=5" + ;; + esac else - echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + echo "Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + echo exit 1 fi } From cc2161856b146e8d84bd693068dd646cdace1e79 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 27 Nov 2016 15:57:51 +0100 Subject: [PATCH 16/24] ENH: improve third-party make with central installations - initial attempt for building CGAL as headers-only, and without gmp/mpfr --- BUILD.md | 6 +- etc/tools/ThirdPartyFunctions | 2 +- makeADIOS | 18 +++--- makeCCMIO | 10 ++- makeCGAL | 112 ++++++++++++++++++++++++---------- makeCmake | 50 +++++++-------- makeFFTW | 16 ++--- makeGcc | 3 +- makeGperftools | 89 +++++++++++++++++---------- makeLLVM | 11 +--- makeMesa | 15 ++--- makeParaView | 11 ++-- makeParaView.example | 1 + makeQt | 98 +++++++++++++++-------------- makeTecio | 28 ++++----- makeVTK | 9 +-- makeVTK.example | 1 + 17 files changed, 265 insertions(+), 215 deletions(-) diff --git a/BUILD.md b/BUILD.md index 54290db..98ffb9b 100644 --- a/BUILD.md +++ b/BUILD.md @@ -295,7 +295,7 @@ GNU *configure* can only be used prior to clang version 3.9. |-----------------------|------------------------| | [CMake][page cmake] | [download][link cmake] | | [boost][page boost] | [download][link boost] | -| [CGAL][page CGAL] | [download][link CGAL] or [newer][newer CGAL] | +| [CGAL][page CGAL] | [download][link CGAL] or [older][older CGAL] | | [FFTW][page FFTW] | [download][link FFTW] | | [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio] | | [tecio][page tecio] | [link tecio][link tecio] | @@ -368,8 +368,8 @@ The minimum CMake requirements for building various components. [link boost]: https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2 [page CGAL]: http://cgal.org -[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz -[newer CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz +[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz +[older CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz [page FFTW]: http://www.fftw.org/ [link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index 0d9055e..21e6104 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -151,7 +151,7 @@ NOT_FOUND fi # Default to use the path, try resolving (so we know what we are using) - foundExe=$(command -v cmake 2> /dev/null) || foundExe=qmake + foundExe=$(command -v cmake 2> /dev/null) || foundExe=cmake echo "Using cmake=${foundExe:-NotFound}" 1>&2 echo "${foundExe:-cmake}" } diff --git a/makeADIOS b/makeADIOS index deebe3f..17f245f 100755 --- a/makeADIOS +++ b/makeADIOS @@ -29,7 +29,6 @@ # Build script for ADIOS # #------------------------------------------------------------------------------ - # Get version info . $WM_PROJECT_DIR/etc/config.sh/functions unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only @@ -38,7 +37,7 @@ _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS) adiosPACKAGE=${adios_version:-adios-none} #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" echo " The environment variables are inconsistent with the installation." @@ -47,7 +46,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -64,15 +62,14 @@ options: USAGE exit 1 } - #------------------------------------------------------------------------------ -# export WM settings in a form that GNU configure recognizes +# Export WM settings in a form that GNU configure recognizes [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" -# parse options +# Parse options while [ "$#" -gt 0 ] do case "$1" in @@ -109,6 +106,8 @@ fi #------------------------------------------------------------------------------ # # Build ADIOS +# ADIOS_ARCH_PATH : installation directory +# ADIOS_SOURCE_DIR : location of the original sources ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE ADIOS_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE @@ -186,9 +185,10 @@ else CXX=mpicxx fi - # installs into lib64/ + # Install into lib64/ cd $buildDIR && $ADIOS_SOURCE_DIR/configure \ --prefix=$ADIOS_ARCH_PATH \ + --libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \ --disable-fortran \ --with-pic \ --without-fastbit \ @@ -214,7 +214,9 @@ else { # We don't need/use XML things \rm -f adios_lint - } && $ADIOS_ARCH_PATH/bin/adios_config -m + $ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null || \ + echo "Warning: Problems running adios_config" + } ) || { echo "Error building: $adiosPACKAGE" } diff --git a/makeCCMIO b/makeCCMIO index 74a246b..0b6a120 100755 --- a/makeCCMIO +++ b/makeCCMIO @@ -29,7 +29,6 @@ # Build CD-adapco's ccmio library # #------------------------------------------------------------------------------ - # Get version info . $WM_PROJECT_DIR/etc/config.sh/functions _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio) @@ -38,7 +37,7 @@ ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1} targetType=lib #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only cd ${0%/*} || exit 1 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" @@ -53,7 +52,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ - usage() { exec 1>&2 @@ -79,6 +77,7 @@ options: USAGE exit 1 } +#------------------------------------------------------------------------------ # Parse options @@ -104,16 +103,16 @@ done # assert: directory must be available [ -d "$ccmioPACKAGE" ] || die "missing source directory '$ccmioPACKAGE'" - #------------------------------------------------------------------------------ CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE +CCMIO_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$ccmioPACKAGE # # Build LIBCCMIO # echo "---------------" ( - cd $ccmioPACKAGE || exit 1 + cd $CCMIO_SOURCE_DIR || exit 1 incDIR=$CCMIO_ARCH_PATH/include/libccmio libDIR=$CCMIO_ARCH_PATH/lib @@ -135,5 +134,4 @@ echo "---------------" fi ) - #------------------------------------------------------------------------------ diff --git a/makeCGAL b/makeCGAL index f365036..0a73530 100755 --- a/makeCGAL +++ b/makeCGAL @@ -35,13 +35,14 @@ # makeCGAL boost-system gmp-system # #------------------------------------------------------------------------------ - # Get CGAL, boost and gmp/mpfr versions . $WM_PROJECT_DIR/etc/config.sh/functions -unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only +unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only +unset BOOST_ARCH_PATH CGAL_ARCH_PATH # purge current values -_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL) +# compiler first, let CGAL config override GMP (eg, when there is no GMP) _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler) +_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL) boostPACKAGE=${boost_version:-boost-system} gmpPACKAGE=${gmp_version:-gmp-system} @@ -59,7 +60,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ Script="${0##*/}" - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -69,6 +69,7 @@ usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSI options: -cmake PATH with cmake from the path given -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -no-lib compile CGAL for use in headers only mode (since CGAL 4.9) -system use system versions for boost/gmp/mpfr -help @@ -83,6 +84,8 @@ To override this behaviour (and use the system boost and/or gmp/mpfr), simply specify a 'system' version. For example, $Script boost-system gmp-system +Use gmp-none to disable use of gmp/mpfr (eg, not available) + USAGE exit 1 } @@ -91,6 +94,8 @@ USAGE [ -n "$WM_CC" ] && export CC="$WM_CCX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" +unset optHeadersOnly + # Parse options while [ "$#" -gt 0 ] do @@ -114,18 +119,24 @@ do gmpPACKAGE="gmp-system" mpfrPACKAGE="mpfr-system" boostPACKAGE="boost-system" + unset BOOST_ARCH_PATH # avoid inconsistency ;; - gmp-[4-9]* | gmp-system) + -no-lib) + optHeadersOnly=true + ;; + gmp-[4-9]* | gmp-system | gmp-none) gmpPACKAGE="${1%%/}" ;; - mpfr-[2-9]* | mpfr-system) + mpfr-[2-9]* | mpfr-system | mpfr-none) mpfrPACKAGE="${1%%/}" ;; CGAL-[0-9]*) cgalPACKAGE="${1%%/}" + unset CGAL_ARCH_PATH # avoid inconsistency ;; boost-[0-9]* | boost_[0-9]* | boost-system ) boostPACKAGE="${1%%/}" + unset BOOST_ARCH_PATH # avoid inconsistency ;; *) die "unknown option/argument: '$1'" @@ -136,13 +147,13 @@ done [ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified" -# nothing to build -if _foamIsNone "$boostPACKAGE" +# Nothing to build +if _foamIsNone $boostPACKAGE then echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)" exit 0 fi -if _foamIsNone "$cgalPACKAGE" +if _foamIsNone $cgalPACKAGE then echo "Using cgal-none (skip ThirdParty build of CGAL)" exit 0 @@ -156,21 +167,26 @@ fi # - use Third-Party 'lib64' for consistency. # Boost 1_62_0 and older normally build into 'lib'. # +# BOOST_ARCH_PATH : installation directory # BOOST_SOURCE_DIR : location of the original sources -BOOST_ARCH_PATH=$installBASE/$boostPACKAGE BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE +: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback boostInc="$BOOST_ARCH_PATH/include" boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" -if _foamIsSystem $BOOST_ARCH_PATH +if _foamIsSystem $boostPACKAGE then echo "Using boost-system (skip ThirdParty build of BOOST)" - boostInc="/usr/include" - boostLib="/usr/lib$WM_COMPILER_LIB_ARCH" -elif [ -f "$boostInc/boost/version.hpp" -a -d "$boostLib" ] + # Tagged as 'system' but could actually point to a central location + [ -d "$BOOST_ARCH_PATH/include" ] || { + boostInc="/usr/include" + boostLib="/usr/lib$WM_COMPILER_LIB_ARCH" + } + +elif [ -f "$boostInc/boost/version.hpp" ] then echo "Using $boostPACKAGE" else @@ -197,7 +213,7 @@ else fi # nothing left to build -if _foamIsSystem "$cgalPACKAGE" +if _foamIsSystem $cgalPACKAGE then echo "Using cgal-system (skip ThirdParty build of CGAL)" exit 0 @@ -239,20 +255,30 @@ SUMMARY # # CGAL_SOURCE_DIR : location of the original sources # CGAL_BINARY_DIR : location of the build -# CGAL_DIR : location of the installed program +# CGAL_ARCH_PATH : installation directory CGAL_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$cgalPACKAGE CGAL_BINARY_DIR=$buildBASE/$cgalPACKAGE -CGAL_ARCH_PATH=$installBASE/$cgalPACKAGE -CGAL_DIR=$CGAL_ARCH_PATH +: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback -# -# gmp/mpfr installed without compiler name +# gmp/mpfr are installed without compiler name installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH GMP_ARCH_PATH=$installBASE/$gmpPACKAGE MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE +# Enable/disable gmp/mpfr together +if _foamIsNone $gmpPACKAGE || _foamIsNone $mpfrPACKAGE +then + GMP_ARCH_PATH=none + MPFR_ARCH_PATH=none +elif _foamIsSystem $GMP_ARCH_PATH || _foamIsSystem $MPFR_ARCH_PATH +then + GMP_ARCH_PATH=system # for an accurate record + MPFR_ARCH_PATH=system +fi + + # # build information recorded for later use # @@ -274,6 +300,7 @@ BOOST_VERSION=$BOOST_VERSION CGAL_lib=lib$WM_COMPILER_LIB_ARCH BOOST_lib=lib$WM_COMPILER_LIB_ARCH +CGAL_HEADER_ONLY=${optHeadersOnly:-false} BUILD_INFO } @@ -316,6 +343,7 @@ cgalIsCurrent() return 0 } + if cgalIsCurrent then echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping" @@ -340,10 +368,21 @@ fi echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION" echo " Source : $CGAL_SOURCE_DIR" echo " Build : $CGAL_BINARY_DIR" - echo " Target : $CGAL_DIR" + echo " Target : $CGAL_ARCH_PATH" - if [ -d "$BOOST_ARCH_PATH" ] + # See http://doc.cgal.org/latest/Manual/installation.html + if _foamIsSystem $boostPACKAGE + then + echo " system : boost" + # Tagged as 'system' but could actually point to a central location + if [ -d "$BOOST_ARCH_PATH/include" ] + then + configBoost="-DBOOST_ROOT=$BOOST_ARCH_PATH" + fi + ## For system - possible that /usr/lib64 not being found? + ## configBoost="-DBoost_LIBRARY_DIRS=$boostLib" + elif [ -d "$BOOST_ARCH_PATH" ] then echo " ThirdParty : boost" configBoost=$(cat <&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -60,12 +59,11 @@ USAGE exit 1 } #------------------------------------------------------------------------------ - -# ensure CMake gets the correct C/CC++ compiler +# Ensure CMake gets the correct C/CC++ compiler [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" -# parse options +# Parse options while [ "$#" -gt 0 ] do case "$1" in @@ -89,36 +87,38 @@ done [ -n "$cmakePACKAGE" ] || die "The cmake-VERSION was not specified" #------------------------------------------------------------------------------ -CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE - # # Build CMAKE -# -echo "---------------" +# CMAKE_ARCH_PATH : installation directory +# CMAKE_SOURCE_DIR : location of the original sources + +CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE +CMAKE_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$cmakePACKAGE + if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ] then echo "Already built: $cmakePACKAGE" else echo "Starting build: $cmakePACKAGE" -( - sourceDIR=$WM_THIRD_PARTY_DIR/$cmakePACKAGE - buildDIR=$buildBASE/$cmakePACKAGE + ( + buildDIR=$buildBASE/$cmakePACKAGE - cd $sourceDIR || exit 1 - make distclean 2>/dev/null + cd $CMAKE_SOURCE_DIR || exit 1 + make distclean 2>/dev/null - rm -rf $buildDIR - mkdir -p $buildDIR - cd $buildDIR + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR - $sourceDIR/bootstrap --prefix=$CMAKE_ARCH_PATH \ - && time make -j $WM_NCOMPPROCS \ - && make install \ - && echo "Built: $cmakePACKAGE" -) || { - echo "Error building: $cmakePACKAGE" - exit 1 -} + $CMAKE_SOURCE_DIR/bootstrap \ + --prefix=$CMAKE_ARCH_PATH \ + && time make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $cmakePACKAGE" + ) || { + echo "Error building: $cmakePACKAGE" + exit 1 + } fi #------------------------------------------------------------------------------ diff --git a/makeFFTW b/makeFFTW index 07e46d3..d91c7cd 100755 --- a/makeFFTW +++ b/makeFFTW @@ -29,7 +29,6 @@ # Build script for FFTW # #------------------------------------------------------------------------------ - # Get FFTW versions . $WM_PROJECT_DIR/etc/config.sh/functions unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only @@ -48,14 +47,12 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ -Script="${0##*/}" - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat</dev/null + cd $GPERFTOOLS_SOURCE_DIR || exit 1 - rm -rf $buildDIR - mkdir -p $buildDIR - cd $buildDIR + make distclean 2>/dev/null - # remove old junk - rm -rf $prefixDIR + rm -rf $GPERFTOOLS_ARCH_PATH + rm -rf $buildDIR + mkdir -p $buildDIR + cd $buildDIR - $sourceDIR/configure \ - --prefix=$prefixDIR \ - && make -j $WM_NCOMPPROCS \ - && make install \ - && echo "Built: $gperftoolsPACKAGE" \ -) || { - echo "Error building: $gperftoolsPACKAGE" - exit 1 -} + set -x + $GPERFTOOLS_SOURCE_DIR/configure \ + --prefix=$GPERFTOOLS_ARCH_PATH \ + && make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: $gperftoolsPACKAGE" \ + ) || { + echo "Error building: $gperftoolsPACKAGE" + exit 1 + } fi #------------------------------------------------------------------------------ diff --git a/makeLLVM b/makeLLVM index 8d301bb..ad065c1 100755 --- a/makeLLVM +++ b/makeLLVM @@ -51,7 +51,7 @@ # mv cfe-3.8.0.src llvm-3.8.0/tools/clang # #------------------------------------------------------------------------------ -# get default llvm/clang version +# Get default llvm/clang version WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings WM_COMPILER=Clang # force values for 'clang' @@ -70,14 +70,12 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ -Script=${0##*/} - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 @@ -154,15 +153,13 @@ Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings. USAGE exit 1 } - #------------------------------------------------------------------------------ - -# ensure CMake gets the correct C/C++ compiler +# Ensure CMake gets the correct C/C++ compiler [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" # -# add options based on script name: +# Add options based on script name: # case "$Script" in *-mesa*) withMESA=true;; esac case "$Script" in *-mpi*) withMPI=true;; esac @@ -173,13 +170,13 @@ case "$Script" in *-qt*) withQT=true;; esac setParaViewVersion ${ParaView_VERSION:-none} # -# various building stages +# Various building stages # unset runPATCH runCONFIG runMAKE runINSTALL runDEFAULT=true buildType=Release -# parse options +# Parse options while [ "$#" -gt 0 ] do case "$1" in diff --git a/makeParaView.example b/makeParaView.example index 361b69c..5fe489e 100755 --- a/makeParaView.example +++ b/makeParaView.example @@ -4,6 +4,7 @@ # - off-screen mesa mesa=mesa-11.2.2 +# mesa=mesa-13.0.2 ./makeParaView \ -mpi=0 \ diff --git a/makeQt b/makeQt index 1b65e6e..9e545e9 100755 --- a/makeQt +++ b/makeQt @@ -43,7 +43,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { . etc/tools/ThirdPartyFunctions . etc/tools/QtFunctions #------------------------------------------------------------------------------ - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -60,13 +59,13 @@ USAGE exit 1 } #------------------------------------------------------------------------------ -# export WM settings in a form that GNU configure recognizes +# Export WM settings in a form that GNU configure recognizes [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" -# parse options +# Parse options while [ "$#" -gt 0 ] do case "$1" in @@ -117,63 +116,62 @@ then echo "Already built: Qt-$qtVERSION" else echo "Starting build: Qt-$qtVERSION" -( - # Configuration options: - unset configOpt - configOpt="$configOpt -nomake examples" + ( + # Configuration options: + unset configOpt + configOpt="$configOpt -nomake examples" - case "$qtVERSION" in - 4*) # QT-4 - # Without demos. - configOpt="$configOpt -nomake demos" + case "$qtVERSION" in + 4*) # QT-4 + # Without demos. + configOpt="$configOpt -nomake demos" - # Without old qt3 transition code - configOpt="$configOpt -no-qt3support" + # Without old qt3 transition code + configOpt="$configOpt -no-qt3support" - # Without WebKit - uses std:tr1 and does not compile with c++11 - # Fortunately WebKit is now optional for ParaView - configOpt="$configOpt -no-webkit" - ;; + # Without WebKit - uses std:tr1 and does not compile with c++11 + # Fortunately WebKit is now optional for ParaView + configOpt="$configOpt -no-webkit" + ;; - *) # QT-5 - # Avoid too many X11 system dependencies. - configOpt="$configOpt -qt-xcb" - ;; - esac + *) # QT-5 + # Avoid too many X11 system dependencies. + configOpt="$configOpt -qt-xcb" + ;; + esac - # end of configuration options - # ---------------------------- - buildDIR=$buildBASE/$qtPACKAGE + # end of configuration options + # ---------------------------- + buildDIR=$buildBASE/$qtPACKAGE - cd $QT_SOURCE_DIR || exit 1 - [ -e Makefile ] && make distclean 2>/dev/null + cd $QT_SOURCE_DIR || exit 1 + [ -e Makefile ] && make distclean 2>/dev/null - # Remove any existing build folder and recreate - rm -rf $QT_ARCH_DIR - rm -rf $buildDIR 2>/dev/null - mkdir -p $buildDIR + # Remove any existing build folder and recreate + rm -rf $QT_ARCH_DIR + rm -rf $buildDIR 2>/dev/null + mkdir -p $buildDIR - # Remove any remnants from a previous shadow build - rm -f "$QT_SOURCE_DIR/.qmake.cache" 2>/dev/null - rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null - rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null + # Remove any remnants from a previous shadow build + rm -f "$QT_SOURCE_DIR/.qmake.cache" 2>/dev/null + rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null + rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null - cd $buildDIR || exit 1 + cd $buildDIR || exit 1 - # Compile as opensource, accepting LGPL conditions (yes) - echo yes | $QT_SOURCE_DIR/configure \ - -prefix $QT_ARCH_PATH \ - -opensource \ - $configOpt \ - && time make -j $WM_NCOMPPROCS \ - && make install \ - && echo "Built: Qt-$qtVERSION" \ - && finalizeQt -) || { - echo "Error building: Qt-$qtVERSION" - exit 1 -} + # Compile as opensource, accepting LGPL conditions (yes) + echo yes | $QT_SOURCE_DIR/configure \ + -prefix $QT_ARCH_PATH \ + -opensource \ + $configOpt \ + && time make -j $WM_NCOMPPROCS \ + && make install \ + && echo "Built: Qt-$qtVERSION" \ + && finalizeQt + ) || { + echo "Error building: Qt-$qtVERSION" + exit 1 + } fi - # ----------------------------------------------------------------- end-of-file diff --git a/makeTecio b/makeTecio index 6ee8132..41a3af7 100755 --- a/makeTecio +++ b/makeTecio @@ -29,8 +29,7 @@ # Build Tecplot library # #------------------------------------------------------------------------------ - -# Get boost versions +# Get boost version (headers only) . $WM_PROJECT_DIR/etc/config.sh/functions unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only @@ -41,7 +40,7 @@ tecioPACKAGE=tecio targetType=lib #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only cd ${0%/*} || exit 1 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" @@ -56,7 +55,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ - usage() { exec 1>&2 @@ -65,8 +63,8 @@ usage() Usage: ${0##*/} [OPTION] [boost-VERSION] [tecio-VERSION] options: - -cmake PATH with cmake from the path given - -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -cmake PATH With cmake from the path given + -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -help @@ -77,13 +75,12 @@ options: USAGE exit 1 } - #------------------------------------------------------------------------------ # Ensure CMake gets the correct C/C++ compiler [ -n "$WM_CC" ] && export CC="$WM_CCX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" -# parse options +# Parse options while [ "$#" -gt 0 ] do case "$1" in @@ -121,16 +118,19 @@ done # Get Boost information # - only headers are required -BOOST_ARCH_PATH=$installBASE/$boostPACKAGE +: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback boostInc="$BOOST_ARCH_PATH/include" -if _foamIsSystem $BOOST_ARCH_PATH +if _foamIsSystem $boostPACKAGE then echo "Using boost-system" - boostInc="/usr/include" -elif [ -f "$boostInc/boost/version.hpp" -a -d "$boostLib" ] + # Tagged as 'system' but could actually point to a central location + [ -d "$BOOST_ARCH_PATH/include" ] || { + boostInc="/usr/include" + } +elif [ -f "$boostInc/boost/version.hpp" ] then echo "Using $boostPACKAGE" fi @@ -140,7 +140,7 @@ fi # # TECIO_SOURCE_DIR : location of the original sources # TECIO_BINARY_DIR : location of the build -# TECIO_DIR : location of the installed program +# TECIO_ARCH_PATH : location of the installed program TECIO_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$tecioPACKAGE/teciosrc TECIO_BINARY_DIR=$buildBASE/$tecioPACKAGE @@ -180,7 +180,7 @@ then set -x cd $TECIO_BINARY_DIR && $cmake \ -DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BINARY_TYPE=Release \ -DBoost_INCLUDE_DIR=$boostInc \ $TECIO_SOURCE_DIR \ && make -j $WM_NCOMPPROCS \ diff --git a/makeVTK b/makeVTK index d87b7ce..151d57f 100755 --- a/makeVTK +++ b/makeVTK @@ -70,13 +70,11 @@ CMAKE_PATH="" # Default to auto-config based on VTK version withGL2=auto - # # NO FURTHER EDITING BELOW THIS LINE # #----------------------------------------------------------------------------- Script=${0##*/} - usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -124,20 +122,19 @@ USAGE } #------------------------------------------------------------------------------ - -# ensure CMake gets the correct C/C++ compiler +# Ensure CMake gets the correct C/C++ compiler [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" # -# various building stages +# Various building stages # unset runPATCH runCONFIG runMAKE runINSTALL runDEFAULT=true buildType=Release withOSMESA=false -# parse options +# Parse options while [ "$#" -gt 0 ] do case "$1" in diff --git a/makeVTK.example b/makeVTK.example index a21d682..fcfe492 100755 --- a/makeVTK.example +++ b/makeVTK.example @@ -4,6 +4,7 @@ vtk=vtk-7.1.0 mesa=mesa-11.2.2 +# mesa=mesa-13.0.2 ./makeVTK \ $vtk \ From 318e2495421660afe5b3f41c33d9b5fc0e957d80 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 27 Nov 2016 16:23:21 +0100 Subject: [PATCH 17/24] STYLE: reference the location of sources via the sourceBASE variable - in the future it may be useful to locate all the sources under a sub-directory instead --- Allwmake | 37 +++++++++++++++++++---------------- etc/tools/ParaViewFunctions | 6 +++--- etc/tools/ThirdPartyFunctions | 4 ++-- etc/tools/vtkFunctions | 6 +++--- makeADIOS | 4 ++-- makeCCMIO | 2 +- makeCGAL | 4 ++-- makeCmake | 4 ++-- makeFFTW | 4 ++-- makeGcc | 8 ++++---- makeGperftools | 3 +-- makeLLVM | 4 ++-- makeMesa | 3 ++- makeQt | 2 +- makeTecio | 2 +- makeVTK | 3 +-- minCmake | 3 ++- 17 files changed, 51 insertions(+), 48 deletions(-) diff --git a/Allwmake b/Allwmake index 76acefb..750aea6 100755 --- a/Allwmake +++ b/Allwmake @@ -29,7 +29,7 @@ # Build script for ThirdParty # #------------------------------------------------------------------------------ -# run from third-party directory only +# Run from third-party directory only cd ${0%/*} || exit 1 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" @@ -44,8 +44,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ - -# export WM settings in a form that GNU configure recognizes +# Export WM settings in a form that GNU configure recognizes [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" @@ -108,7 +107,7 @@ OPENMPI) # end of configuration options # ---------------------------- mpiPACKAGE="${MPI_ARCH_PATH##*/}" - sourceDIR=$WM_THIRD_PARTY_DIR/$mpiPACKAGE + sourceDIR=$sourceBASE/$mpiPACKAGE buildDIR=$buildBASE/$mpiPACKAGE cd $sourceDIR || exit 1 @@ -151,9 +150,10 @@ MPICH) ( # WARNING: unmaintained build code: # --------------------------------- - set -x - cd $MPI_HOME || exit 1 # change to mpich-VERSION + sourceDIR=$sourceBASE/$MPI_HOME + cd $sourceDIR || exit 1 + set -x [ -e Makefile ] && make distclean 2>/dev/null rm -rf $MPI_ARCH_PATH rm -rf util/machines/machines.* @@ -205,9 +205,9 @@ esac #------------------------------------------------------------------------------ -# building scotch is still a bit of a pain +# Building scotch is still a bit of a pain -# get SCOTCH_VERSION, SCOTCH_ARCH_PATH +# Get SCOTCH_VERSION, SCOTCH_ARCH_PATH if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch) then . $settings @@ -222,7 +222,9 @@ echo ======================================== echo "Build Scotch decomposition library $SCOTCH_VERSION" echo " $SCOTCH_ARCH_PATH" -# this needs generalizing +SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION + +# This needs generalizing, but works fairly well scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \ @@ -231,10 +233,10 @@ if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \ then echo " scotch header in $SCOTCH_ARCH_PATH/include" echo " scotch libs in $FOAM_EXT_LIBBIN" -elif [ -d "$SCOTCH_VERSION" ] +elif [ -d "$SCOTCH_SOURCE_DIR" ] then ( - cd $SCOTCH_VERSION/src || exit 1 + cd $SCOTCH_SOURCE_DIR/src || exit 1 rm -rf $SCOTCH_ARCH_PATH applyPatch $SCOTCH_VERSION .. # patch at parent-level @@ -298,18 +300,17 @@ then echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI" else ( + cd $SCOTCH_SOURCE_DIR/src || exit 1 echo - set -x - cd $SCOTCH_VERSION/src || exit 1 prefixDIR=$SCOTCH_ARCH_PATH - libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI incDIR=$SCOTCH_ARCH_PATH/include/$FOAM_MPI + libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI mkdir -p $prefixDIR 2>/dev/null mkdir -p $libDIR 2>/dev/null - configOpt="prefix=$prefixDIR libdir=$libDIR includedir=$incDIR" + configOpt="prefix=$prefixDIR includedir=$incDIR libdir=$libDIR" if [ -f $scotchMakefile ] then @@ -357,16 +358,18 @@ then . $settings fi +METIS_SOURCE_DIR=$sourceBASE/$METIS_VERSION + if [ -f $METIS_ARCH_PATH/include/metis.h \ -a -r $FOAM_EXT_LIBBIN/libmetis.so ] then echo " metis header in $METIS_ARCH_PATH/include" echo " metis libs in $FOAM_EXT_LIBBIN" echo -elif [ -d "$METIS_VERSION" ] +elif [ -d "$METIS_SOURCE_DIR" ] then ( - cd $METIS_VERSION || exit 1 + cd $METIS_SOURCE_DIR || exit 1 rm -rf $METIS_ARCH_PATH # Adjust metis integer size to match OpenFOAM label-size diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 6a4d7c3..95d7341 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------------ -# buildBASE, installBASE defined from tools/ThirdPartyFunctions +# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions # # Where things are or should be put @@ -46,7 +46,7 @@ setParaViewDirs() unset ParaView_SOURCE_DIR for i do - ParaView_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i" + ParaView_SOURCE_DIR="$sourceBASE/$i" [ -d "$ParaView_SOURCE_DIR" ] && break done @@ -55,7 +55,7 @@ setParaViewDirs() while [ "$#" -ge 1 ]; do echo " $1"; shift; done echo echo "In the directory:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo " $sourceBASE" echo echo "abort build" exit 1 diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index 21e6104..b7d9c1e 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -31,11 +31,11 @@ # Define WM_NCOMPPROCS always. #------------------------------------------------------------------------------ -# Define the normal build and prefix directories +# The normal locations for source, build and installation (prefix-dir) +sourceBASE=$WM_THIRD_PARTY_DIR buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER - # # Mostly building without wmake # - disable wmakeScheduler variables diff --git a/etc/tools/vtkFunctions b/etc/tools/vtkFunctions index 89e2392..3d2a4cb 100644 --- a/etc/tools/vtkFunctions +++ b/etc/tools/vtkFunctions @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------------ -# buildBASE, installBASE defined from tools/ThirdPartyFunctions +# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions # # Where things are or should be put @@ -47,7 +47,7 @@ setVtkDirs() for i do - VTK_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i" + VTK_SOURCE_DIR="$sourceBASE/$i" [ -d "$VTK_SOURCE_DIR" ] && break done @@ -56,7 +56,7 @@ setVtkDirs() while [ "$#" -ge 1 ]; do echo " $1"; shift; done echo echo "In the directory:" - echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo " $sourceBASE" echo echo "abort build" exit 1 diff --git a/makeADIOS b/makeADIOS index 17f245f..6c92352 100755 --- a/makeADIOS +++ b/makeADIOS @@ -106,11 +106,11 @@ fi #------------------------------------------------------------------------------ # # Build ADIOS -# ADIOS_ARCH_PATH : installation directory # ADIOS_SOURCE_DIR : location of the original sources +# ADIOS_ARCH_PATH : installation directory +ADIOS_SOURCE_DIR=$sourceBASE/$adiosPACKAGE ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE -ADIOS_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE : ${FOAM_MPI:=dummy} diff --git a/makeCCMIO b/makeCCMIO index 0b6a120..8b7282c 100755 --- a/makeCCMIO +++ b/makeCCMIO @@ -104,8 +104,8 @@ done [ -d "$ccmioPACKAGE" ] || die "missing source directory '$ccmioPACKAGE'" #------------------------------------------------------------------------------ +CCMIO_SOURCE_DIR=$sourceBASE/$ccmioPACKAGE CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE -CCMIO_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$ccmioPACKAGE # # Build LIBCCMIO diff --git a/makeCGAL b/makeCGAL index 0a73530..1d5178e 100755 --- a/makeCGAL +++ b/makeCGAL @@ -170,7 +170,7 @@ fi # BOOST_ARCH_PATH : installation directory # BOOST_SOURCE_DIR : location of the original sources -BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE +BOOST_SOURCE_DIR=$sourceBASE/$boostPACKAGE : ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback boostInc="$BOOST_ARCH_PATH/include" @@ -257,7 +257,7 @@ SUMMARY # CGAL_BINARY_DIR : location of the build # CGAL_ARCH_PATH : installation directory -CGAL_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$cgalPACKAGE +CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE CGAL_BINARY_DIR=$buildBASE/$cgalPACKAGE : ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback diff --git a/makeCmake b/makeCmake index 01eab4c..6b3145f 100755 --- a/makeCmake +++ b/makeCmake @@ -89,11 +89,11 @@ done #------------------------------------------------------------------------------ # # Build CMAKE -# CMAKE_ARCH_PATH : installation directory # CMAKE_SOURCE_DIR : location of the original sources +# CMAKE_ARCH_PATH : installation directory +CMAKE_SOURCE_DIR=$sourceBASE/$cmakePACKAGE CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE -CMAKE_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$cmakePACKAGE if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ] then diff --git a/makeFFTW b/makeFFTW index d91c7cd..27647e2 100755 --- a/makeFFTW +++ b/makeFFTW @@ -114,11 +114,11 @@ fi # - Third-Party builds into 'lib64' # - system is normally built into 'lib64' # -# FFTW_ARCH_PATH : installation directory # FFTW_SOURCE_DIR : location of the original sources +# FFTW_ARCH_PATH : installation directory +FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE -FFTW_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$fftwPACKAGE if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ] then diff --git a/makeGcc b/makeGcc index 96ac22d..b5f10ae 100755 --- a/makeGcc +++ b/makeGcc @@ -180,7 +180,7 @@ else echo "Starting build: $gmpPACKAGE" echo ( - sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE + sourceDIR=$sourceBASE/$gmpPACKAGE buildDIR=$buildBASE/$gmpPACKAGE cd $sourceDIR || exit 1 @@ -232,7 +232,7 @@ else echo "Starting build: $mpfrPACKAGE" echo ( - sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE + sourceDIR=$sourceBASE/$mpfrPACKAGE buildDIR=$buildBASE/$mpfrPACKAGE cd $sourceDIR || exit 1 @@ -288,7 +288,7 @@ else echo "Starting build: $mpcPACKAGE" echo ( - sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE + sourceDIR=$sourceBASE/$mpcPACKAGE buildDIR=$buildBASE/$mpcPACKAGE cd $sourceDIR || exit 1 @@ -344,7 +344,7 @@ else echo "Starting build: $gccPACKAGE" echo ( - sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE + sourceDIR=$sourceBASE/$gccPACKAGE buildDIR=$buildBASE/$gccPACKAGE cd $sourceDIR || exit 1 diff --git a/makeGperftools b/makeGperftools index 573281d..e12efd5 100755 --- a/makeGperftools +++ b/makeGperftools @@ -106,9 +106,8 @@ fi # # Build gperftools # -# build/install without compiler name +GPERFTOOLS_SOURCE_DIR=$sourceBASE/$gperftoolsPACKAGE GPERFTOOLS_ARCH_PATH=$installBASE/$gperftoolsPACKAGE -GPERFTOOLS_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$gperftoolsPACKAGE echo "---------------" if [ -d "$GPERFTOOLS_ARCH_PATH" ] diff --git a/makeLLVM b/makeLLVM index ad065c1..ede1394 100755 --- a/makeLLVM +++ b/makeLLVM @@ -121,7 +121,7 @@ done [ -n "$llvmPACKAGE" ] || die "The llvm-VERSION was not specified" #------------------------------------------------------------------------------ -# build/install without compiler name +# Build/install locations without a compiler name buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH @@ -131,7 +131,7 @@ installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH # LLVM_ARCH_PATH : location of the installed program # - Strip any trailing '.src' from the proper names -LLVM_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$llvmPACKAGE +LLVM_SOURCE_DIR=$sourceBASE/$llvmPACKAGE LLVM_BINARY_DIR=$buildBASE/${llvmPACKAGE%%.src} LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src} diff --git a/makeMesa b/makeMesa index 9ee025a..2221692 100755 --- a/makeMesa +++ b/makeMesa @@ -136,9 +136,10 @@ fi # - MESA itself will normally build into 'lib64'. # # MESA_SOURCE_DIR : location of the original sources +# MESA_ARCH_DIR : installation directory +MESA_SOURCE_DIR=$sourceBASE/$mesaPACKAGE MESA_ARCH_PATH=$installBASE/$mesaPACKAGE -MESA_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$mesaPACKAGE ( # configuration options: diff --git a/makeQt b/makeQt index 9e545e9..5c27532 100755 --- a/makeQt +++ b/makeQt @@ -104,8 +104,8 @@ fi # # Build QT +QT_SOURCE_DIR=$sourceBASE/$qtPACKAGE QT_ARCH_PATH=$installBASE/qt-$qtVERSION -QT_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$qtPACKAGE echo echo ======================================== diff --git a/makeTecio b/makeTecio index 41a3af7..ea2cea3 100755 --- a/makeTecio +++ b/makeTecio @@ -142,7 +142,7 @@ fi # TECIO_BINARY_DIR : location of the build # TECIO_ARCH_PATH : location of the installed program -TECIO_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$tecioPACKAGE/teciosrc +TECIO_SOURCE_DIR=$sourceBASE/$tecioPACKAGE/teciosrc TECIO_BINARY_DIR=$buildBASE/$tecioPACKAGE TECIO_ARCH_PATH=$installBASE/$tecioPACKAGE diff --git a/makeVTK b/makeVTK index 151d57f..1206ab6 100755 --- a/makeVTK +++ b/makeVTK @@ -34,7 +34,7 @@ # To use the VTK source from the ParaView source tree, simply make an # appropriate link first. For example, # -# ln -s ParaView-v5.2.0/VTK VTK-7.1.0 +# (cd $WM_THIRD_PARTY_DIR && ln -s ParaView-v5.2.0/VTK VTK-7.1.0) # #------------------------------------------------------------------------------ # Run from third-party directory only @@ -120,7 +120,6 @@ For finer control, the build stages can be selected or deselected individually: USAGE exit 1 } - #------------------------------------------------------------------------------ # Ensure CMake gets the correct C/C++ compiler [ -n "$WM_CC" ] && export CC="$WM_CC" diff --git a/minCmake b/minCmake index 1d94eef..f6bcc6b 100755 --- a/minCmake +++ b/minCmake @@ -85,7 +85,8 @@ do if [ -n "$min" ] then - echo "${min%.0}" $dir # With trailing ".0 removed + # Remove trailing ".0" from version + echo "${min%.0}" "${dir#sources/}" fi done \ From 74b42821eb68893100605e872bd4dea2ac230542 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 27 Nov 2016 18:49:10 +0100 Subject: [PATCH 18/24] STYLE: minor adjustment for documentation - remove extra scotch readme, already mentioned in regular BUILD/README files - additional sources.txt to note which versions have been shipped. --- BUILD.md | 31 ++- README.md | 22 +- README_scotch | 543 -------------------------------------------------- sources.txt | 38 ++++ 4 files changed, 66 insertions(+), 568 deletions(-) delete mode 100644 README_scotch create mode 100644 sources.txt diff --git a/BUILD.md b/BUILD.md index 98ffb9b..4ebacec 100644 --- a/BUILD.md +++ b/BUILD.md @@ -18,24 +18,33 @@ OpenFOAM depends to a certain extent on third-party libraries scripts for building third-party packages. It should normally only be used in conjunction with the corresponding OpenFOAM version. +## Organization + +The ThirdParty directory contains a number of build scripts as well as +some directories: + +| Directory | Contains +|-------------------|-------------------------------------------- +| etc/ | auxiliary scripts used for the build process +| build/ | intermediate build objects +| platforms/ | the installation directories + ## Configuration of Third-Party Versions -The distributed make scripts can generally be used for a variety of -versions of the third-party libraries, with the software version -specified on the command-line. For example, - - $ ./makeFFTW -help - usage: makeFFTW [OPTION] [fftw-VERSION] - -If a version is not explicitly specified on the command-line, it will -use the version as specified by the appropriate OpenFOAM -`etc/config.sh/...` entry. - +For most of the build scripts, the default software version +is provided by an appropriate OpenFOAM `etc/config.sh/...` entry. This approach avoids duplicate entries for the default versions and ensures the best overall consistency between the OpenFOAM installation and its corresponding third-party installation. +Nonethess, the distributed make scripts can generally be used for a +variety of versions of the third-party libraries, with the software +version specified on the command-line. For example, + + $ ./makeFFTW -help + usage: makeFFTW [OPTION] [fftw-VERSION] + --- ## Before Starting diff --git a/README.md b/README.md index 41615cc..51a45b3 100644 --- a/README.md +++ b/README.md @@ -18,24 +18,18 @@ OpenFOAM depends to a certain extent on third-party libraries scripts for building third-party packages. It should normally only be used in conjunction with the corresponding OpenFOAM version. - ## Configuration of Third-Party Versions -The distributed make scripts can generally be used for a variety of -versions of the third-party libraries, with the software version -specified on the command-line. For example, - - $ ./makeFFTW -help - usage: makeFFTW [OPTION] [fftw-VERSION] - -If a version is not explicitly specified on the command-line, it will -use the version as specified by the appropriate OpenFOAM -`etc/config.sh/...` entry. - +For most of the build scripts, the default software version +is provided by an appropriate OpenFOAM `etc/config.sh/...` entry. This approach avoids duplicate entries for the default versions and ensures the best overall consistency between the OpenFOAM installation and its corresponding third-party installation. +Nonethess, the distributed make scripts can generally be used for a +variety of versions of the third-party libraries, with the software +version specified on the command-line. + --- ## Before Starting @@ -56,10 +50,10 @@ and its corresponding third-party installation. Many components of ThirdParty are *optional* or are invoked automatically as part of the top-level OpenFOAM `Allwmake`. -Nonetheless it may be necessary or useful to build various +Nonetheless it may be necessary or useful to build particular ThirdParty components prior to building OpenFOAM itself. -## Build Sequence +### Build Sequence 1. `makeGcc` _or_ `makeLLVM` *(optional)* 2. `makeCmake` *(optional)* diff --git a/README_scotch b/README_scotch deleted file mode 100644 index f61dec9..0000000 --- a/README_scotch +++ /dev/null @@ -1,543 +0,0 @@ -OpenFOAM uses shared object libraries from the Scotch/PT-Scotch software: -https://www.labri.fr/perso/pelegrin/scotch/ - -The software is licensed under the CeCILL-C Free Software Licence -Agreement, a copy of which is reproduced below. - -Please note the limitation of both the Licensor's warranty and liability -as set forth in Articles 8 and 9 of the Agreement. - -If only the object libraries of Scotch are provided, the full source code -can be obtained from: - -http://gforge.inria.fr/projects/scotch/ - Home page of the SCOTCH project repository. - -http://gforge.inria.fr/frs/?group_id=248 - File download section of the SCOTCH project repository, - where source tarballs can be downloaded from. - -http://gforge.inria.fr/scm/?group_id=248 - Source code repository of the SCOTCH project. - -http://gforge.inria.fr/docman/?group_id=248 - Documentation regarding the SCOTCH project. - ---- - -CeCILL-C FREE SOFTWARE LICENSE AGREEMENT - - - Notice - -This Agreement is a Free Software license agreement that is the result -of discussions between its authors in order to ensure compliance with -the two main principles guiding its drafting: - - * firstly, compliance with the principles governing the distribution - of Free Software: access to source code, broad rights granted to - users, - * secondly, the election of a governing law, French law, with which - it is conformant, both as regards the law of torts and - intellectual property law, and the protection that it offers to - both authors and holders of the economic rights over software. - -The authors of the CeCILL-C (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) -license are: - -Commissariat à l'Energie Atomique - CEA, a public scientific, technical -and industrial research establishment, having its principal place of -business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. - -Centre National de la Recherche Scientifique - CNRS, a public scientific -and technological establishment, having its principal place of business -at 3 rue Michel-Ange, 75794 Paris cedex 16, France. - -Institut National de Recherche en Informatique et en Automatique - -INRIA, a public scientific and technological establishment, having its -principal place of business at Domaine de Voluceau, Rocquencourt, BP -105, 78153 Le Chesnay cedex, France. - - - Preamble - -The purpose of this Free Software license agreement is to grant users -the right to modify and re-use the software governed by this license. - -The exercising of this right is conditional upon the obligation to make -available to the community the modifications made to the source code of -the software so as to contribute to its evolution. - -In consideration of access to the source code and the rights to copy, -modify and redistribute granted by the license, users are provided only -with a limited warranty and the software's author, the holder of the -economic rights, and the successive licensors only have limited liability. - -In this respect, the risks associated with loading, using, modifying -and/or developing or reproducing the software by the user are brought to -the user's attention, given its Free Software status, which may make it -complicated to use, with the result that its use is reserved for -developers and experienced professionals having in-depth computer -knowledge. Users are therefore encouraged to load and test the -suitability of the software as regards their requirements in conditions -enabling the security of their systems and/or data to be ensured and, -more generally, to use and operate it in the same conditions of -security. This Agreement may be freely reproduced and published, -provided it is not altered, and that no provisions are either added or -removed herefrom. - -This Agreement may apply to any or all software for which the holder of -the economic rights decides to submit the use thereof to its provisions. - - - Article 1 - DEFINITIONS - -For the purpose of this Agreement, when the following expressions -commence with a capital letter, they shall have the following meaning: - -Agreement: means this license agreement, and its possible subsequent -versions and annexes. - -Software: means the software in its Object Code and/or Source Code form -and, where applicable, its documentation, "as is" when the Licensee -accepts the Agreement. - -Initial Software: means the Software in its Source Code and possibly its -Object Code form and, where applicable, its documentation, "as is" when -it is first distributed under the terms and conditions of the Agreement. - -Modified Software: means the Software modified by at least one -Integrated Contribution. - -Source Code: means all the Software's instructions and program lines to -which access is required so as to modify the Software. - -Object Code: means the binary files originating from the compilation of -the Source Code. - -Holder: means the holder(s) of the economic rights over the Initial -Software. - -Licensee: means the Software user(s) having accepted the Agreement. - -Contributor: means a Licensee having made at least one Integrated -Contribution. - -Licensor: means the Holder, or any other individual or legal entity, who -distributes the Software under the Agreement. - -Integrated Contribution: means any or all modifications, corrections, -translations, adaptations and/or new functions integrated into the -Source Code by any or all Contributors. - -Related Module: means a set of sources files including their -documentation that, without modification to the Source Code, enables -supplementary functions or services in addition to those offered by the -Software. - -Derivative Software: means any combination of the Software, modified or -not, and of a Related Module. - -Parties: mean both the Licensee and the Licensor. - -These expressions may be used both in singular and plural form. - - - Article 2 - PURPOSE - -The purpose of the Agreement is the grant by the Licensor to the -Licensee of a non-exclusive, transferable and worldwide license for the -Software as set forth in Article 5 hereinafter for the whole term of the -protection granted by the rights over said Software. - - - Article 3 - ACCEPTANCE - -3.1 The Licensee shall be deemed as having accepted the terms and -conditions of this Agreement upon the occurrence of the first of the -following events: - - * (i) loading the Software by any or all means, notably, by - downloading from a remote server, or by loading from a physical - medium; - * (ii) the first time the Licensee exercises any of the rights - granted hereunder. - -3.2 One copy of the Agreement, containing a notice relating to the -characteristics of the Software, to the limited warranty, and to the -fact that its use is restricted to experienced users has been provided -to the Licensee prior to its acceptance as set forth in Article 3.1 -hereinabove, and the Licensee hereby acknowledges that it has read and -understood it. - - - Article 4 - EFFECTIVE DATE AND TERM - - - 4.1 EFFECTIVE DATE - -The Agreement shall become effective on the date when it is accepted by -the Licensee as set forth in Article 3.1. - - - 4.2 TERM - -The Agreement shall remain in force for the entire legal term of -protection of the economic rights over the Software. - - - Article 5 - SCOPE OF RIGHTS GRANTED - -The Licensor hereby grants to the Licensee, who accepts, the following -rights over the Software for any or all use, and for the term of the -Agreement, on the basis of the terms and conditions set forth hereinafter. - -Besides, if the Licensor owns or comes to own one or more patents -protecting all or part of the functions of the Software or of its -components, the Licensor undertakes not to enforce the rights granted by -these patents against successive Licensees using, exploiting or -modifying the Software. If these patents are transferred, the Licensor -undertakes to have the transferees subscribe to the obligations set -forth in this paragraph. - - - 5.1 RIGHT OF USE - -The Licensee is authorized to use the Software, without any limitation -as to its fields of application, with it being hereinafter specified -that this comprises: - - 1. permanent or temporary reproduction of all or part of the Software - by any or all means and in any or all form. - - 2. loading, displaying, running, or storing the Software on any or - all medium. - - 3. entitlement to observe, study or test its operation so as to - determine the ideas and principles behind any or all constituent - elements of said Software. This shall apply when the Licensee - carries out any or all loading, displaying, running, transmission - or storage operation as regards the Software, that it is entitled - to carry out hereunder. - - - 5.2 RIGHT OF MODIFICATION - -The right of modification includes the right to translate, adapt, -arrange, or make any or all modifications to the Software, and the right -to reproduce the resulting software. It includes, in particular, the -right to create a Derivative Software. - -The Licensee is authorized to make any or all modification to the -Software provided that it includes an explicit notice that it is the -author of said modification and indicates the date of the creation thereof. - - - 5.3 RIGHT OF DISTRIBUTION - -In particular, the right of distribution includes the right to publish, -transmit and communicate the Software to the general public on any or -all medium, and by any or all means, and the right to market, either in -consideration of a fee, or free of charge, one or more copies of the -Software by any means. - -The Licensee is further authorized to distribute copies of the modified -or unmodified Software to third parties according to the terms and -conditions set forth hereinafter. - - - 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION - -The Licensee is authorized to distribute true copies of the Software in -Source Code or Object Code form, provided that said distribution -complies with all the provisions of the Agreement and is accompanied by: - - 1. a copy of the Agreement, - - 2. a notice relating to the limitation of both the Licensor's - warranty and liability as set forth in Articles 8 and 9, - -and that, in the event that only the Object Code of the Software is -redistributed, the Licensee allows effective access to the full Source -Code of the Software at a minimum during the entire period of its -distribution of the Software, it being understood that the additional -cost of acquiring the Source Code shall not exceed the cost of -transferring the data. - - - 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE - -When the Licensee makes an Integrated Contribution to the Software, the -terms and conditions for the distribution of the resulting Modified -Software become subject to all the provisions of this Agreement. - -The Licensee is authorized to distribute the Modified Software, in -source code or object code form, provided that said distribution -complies with all the provisions of the Agreement and is accompanied by: - - 1. a copy of the Agreement, - - 2. a notice relating to the limitation of both the Licensor's - warranty and liability as set forth in Articles 8 and 9, - -and that, in the event that only the object code of the Modified -Software is redistributed, the Licensee allows effective access to the -full source code of the Modified Software at a minimum during the entire -period of its distribution of the Modified Software, it being understood -that the additional cost of acquiring the source code shall not exceed -the cost of transferring the data. - - - 5.3.3 DISTRIBUTION OF DERIVATIVE SOFTWARE - -When the Licensee creates Derivative Software, this Derivative Software -may be distributed under a license agreement other than this Agreement, -subject to compliance with the requirement to include a notice -concerning the rights over the Software as defined in Article 6.4. -In the event the creation of the Derivative Software required modification -of the Source Code, the Licensee undertakes that: - - 1. the resulting Modified Software will be governed by this Agreement, - 2. the Integrated Contributions in the resulting Modified Software - will be clearly identified and documented, - 3. the Licensee will allow effective access to the source code of the - Modified Software, at a minimum during the entire period of - distribution of the Derivative Software, such that such - modifications may be carried over in a subsequent version of the - Software; it being understood that the additional cost of - purchasing the source code of the Modified Software shall not - exceed the cost of transferring the data. - - - 5.3.4 COMPATIBILITY WITH THE CeCILL LICENSE - -When a Modified Software contains an Integrated Contribution subject to -the CeCILL license agreement, or when a Derivative Software contains a -Related Module subject to the CeCILL license agreement, the provisions -set forth in the third item of Article 6.4 are optional. - - - Article 6 - INTELLECTUAL PROPERTY - - - 6.1 OVER THE INITIAL SOFTWARE - -The Holder owns the economic rights over the Initial Software. Any or -all use of the Initial Software is subject to compliance with the terms -and conditions under which the Holder has elected to distribute its work -and no one shall be entitled to modify the terms and conditions for the -distribution of said Initial Software. - -The Holder undertakes that the Initial Software will remain ruled at -least by this Agreement, for the duration set forth in Article 4.2. - - - 6.2 OVER THE INTEGRATED CONTRIBUTIONS - -The Licensee who develops an Integrated Contribution is the owner of the -intellectual property rights over this Contribution as defined by -applicable law. - - - 6.3 OVER THE RELATED MODULES - -The Licensee who develops a Related Module is the owner of the -intellectual property rights over this Related Module as defined by -applicable law and is free to choose the type of agreement that shall -govern its distribution under the conditions defined in Article 5.3.3. - - - 6.4 NOTICE OF RIGHTS - -The Licensee expressly undertakes: - - 1. not to remove, or modify, in any manner, the intellectual property - notices attached to the Software; - - 2. to reproduce said notices, in an identical manner, in the copies - of the Software modified or not; - - 3. to ensure that use of the Software, its intellectual property - notices and the fact that it is governed by the Agreement is - indicated in a text that is easily accessible, specifically from - the interface of any Derivative Software. - -The Licensee undertakes not to directly or indirectly infringe the -intellectual property rights of the Holder and/or Contributors on the -Software and to take, where applicable, vis-à-vis its staff, any and all -measures required to ensure respect of said intellectual property rights -of the Holder and/or Contributors. - - - Article 7 - RELATED SERVICES - -7.1 Under no circumstances shall the Agreement oblige the Licensor to -provide technical assistance or maintenance services for the Software. - -However, the Licensor is entitled to offer this type of services. The -terms and conditions of such technical assistance, and/or such -maintenance, shall be set forth in a separate instrument. Only the -Licensor offering said maintenance and/or technical assistance services -shall incur liability therefor. - -7.2 Similarly, any Licensor is entitled to offer to its licensees, under -its sole responsibility, a warranty, that shall only be binding upon -itself, for the redistribution of the Software and/or the Modified -Software, under terms and conditions that it is free to decide. Said -warranty, and the financial terms and conditions of its application, -shall be subject of a separate instrument executed between the Licensor -and the Licensee. - - - Article 8 - LIABILITY - -8.1 Subject to the provisions of Article 8.2, the Licensee shall be -entitled to claim compensation for any direct loss it may have suffered -from the Software as a result of a fault on the part of the relevant -Licensor, subject to providing evidence thereof. - -8.2 The Licensor's liability is limited to the commitments made under -this Agreement and shall not be incurred as a result of in particular: -(i) loss due the Licensee's total or partial failure to fulfill its -obligations, (ii) direct or consequential loss that is suffered by the -Licensee due to the use or performance of the Software, and (iii) more -generally, any consequential loss. In particular the Parties expressly -agree that any or all pecuniary or business loss (i.e. loss of data, -loss of profits, operating loss, loss of customers or orders, -opportunity cost, any disturbance to business activities) or any or all -legal proceedings instituted against the Licensee by a third party, -shall constitute consequential loss and shall not provide entitlement to -any or all compensation from the Licensor. - - - Article 9 - WARRANTY - -9.1 The Licensee acknowledges that the scientific and technical -state-of-the-art when the Software was distributed did not enable all -possible uses to be tested and verified, nor for the presence of -possible defects to be detected. In this respect, the Licensee's -attention has been drawn to the risks associated with loading, using, -modifying and/or developing and reproducing the Software which are -reserved for experienced users. - -The Licensee shall be responsible for verifying, by any or all means, -the suitability of the product for its requirements, its good working -order, and for ensuring that it shall not cause damage to either persons -or properties. - -9.2 The Licensor hereby represents, in good faith, that it is entitled -to grant all the rights over the Software (including in particular the -rights set forth in Article 5). - -9.3 The Licensee acknowledges that the Software is supplied "as is" by -the Licensor without any other express or tacit warranty, other than -that provided for in Article 9.2 and, in particular, without any warranty -as to its commercial value, its secured, safe, innovative or relevant -nature. - -Specifically, the Licensor does not warrant that the Software is free -from any error, that it will operate without interruption, that it will -be compatible with the Licensee's own equipment and software -configuration, nor that it will meet the Licensee's requirements. - -9.4 The Licensor does not either expressly or tacitly warrant that the -Software does not infringe any third party intellectual property right -relating to a patent, software or any other property right. Therefore, -the Licensor disclaims any and all liability towards the Licensee -arising out of any or all proceedings for infringement that may be -instituted in respect of the use, modification and redistribution of the -Software. Nevertheless, should such proceedings be instituted against -the Licensee, the Licensor shall provide it with technical and legal -assistance for its defense. Such technical and legal assistance shall be -decided on a case-by-case basis between the relevant Licensor and the -Licensee pursuant to a memorandum of understanding. The Licensor -disclaims any and all liability as regards the Licensee's use of the -name of the Software. No warranty is given as regards the existence of -prior rights over the name of the Software or as regards the existence -of a trademark. - - - Article 10 - TERMINATION - -10.1 In the event of a breach by the Licensee of its obligations -hereunder, the Licensor may automatically terminate this Agreement -thirty (30) days after notice has been sent to the Licensee and has -remained ineffective. - -10.2 A Licensee whose Agreement is terminated shall no longer be -authorized to use, modify or distribute the Software. However, any -licenses that it may have granted prior to termination of the Agreement -shall remain valid subject to their having been granted in compliance -with the terms and conditions hereof. - - - Article 11 - MISCELLANEOUS - - - 11.1 EXCUSABLE EVENTS - -Neither Party shall be liable for any or all delay, or failure to -perform the Agreement, that may be attributable to an event of force -majeure, an act of God or an outside cause, such as defective -functioning or interruptions of the electricity or telecommunications -networks, network paralysis following a virus attack, intervention by -government authorities, natural disasters, water damage, earthquakes, -fire, explosions, strikes and labor unrest, war, etc. - -11.2 Any failure by either Party, on one or more occasions, to invoke -one or more of the provisions hereof, shall under no circumstances be -interpreted as being a waiver by the interested Party of its right to -invoke said provision(s) subsequently. - -11.3 The Agreement cancels and replaces any or all previous agreements, -whether written or oral, between the Parties and having the same -purpose, and constitutes the entirety of the agreement between said -Parties concerning said purpose. No supplement or modification to the -terms and conditions hereof shall be effective as between the Parties -unless it is made in writing and signed by their duly authorized -representatives. - -11.4 In the event that one or more of the provisions hereof were to -conflict with a current or future applicable act or legislative text, -said act or legislative text shall prevail, and the Parties shall make -the necessary amendments so as to comply with said act or legislative -text. All other provisions shall remain effective. Similarly, invalidity -of a provision of the Agreement, for any reason whatsoever, shall not -cause the Agreement as a whole to be invalid. - - - 11.5 LANGUAGE - -The Agreement is drafted in both French and English and both versions -are deemed authentic. - - - Article 12 - NEW VERSIONS OF THE AGREEMENT - -12.1 Any person is authorized to duplicate and distribute copies of this -Agreement. - -12.2 So as to ensure coherence, the wording of this Agreement is -protected and may only be modified by the authors of the License, who -reserve the right to periodically publish updates or new versions of the -Agreement, each with a separate number. These subsequent versions may -address new issues encountered by Free Software. - -12.3 Any Software distributed under a given version of the Agreement may -only be subsequently distributed under the same version of the Agreement -or a subsequent version. - - - Article 13 - GOVERNING LAW AND JURISDICTION - -13.1 The Agreement is governed by French law. The Parties agree to -endeavor to seek an amicable solution to any disagreements or disputes -that may arise during the performance of the Agreement. - -13.2 Failing an amicable solution within two (2) months as from their -occurrence, and unless emergency proceedings are necessary, the -disagreements or disputes shall be referred to the Paris Courts having -jurisdiction, by the more diligent Party. - - -Version 1.0 dated 2006-09-05. diff --git a/sources.txt b/sources.txt new file mode 100644 index 0000000..4666475 --- /dev/null +++ b/sources.txt @@ -0,0 +1,38 @@ +Third-Party Sources +=================== + +OpenFOAM+ v1612 +--------------- +CGAL-4.9 +ParaView-5.2.0 +boost_1_62_0 +fftw-3.3.5 +openmpi-1.10.4 +scotch_6.0.3 + + +OpenFOAM+ v1606 +--------------- +CGAL-4.8 +ParaView-5.0.1 +boost_1_61_0 +fftw-3.3.4 +openmpi-1.10.2 +scotch_6.0.3 + + +OpenFOAM+ v3.0 +--------------- +CGAL-4.7 +ParaView-4.4.0 +openmpi-1.10.0 +scotch_6.0.3 + + +OpenFOAM+ 2.4 +--------------- +CGAL-4.6 +ParaView-4.1.0 +cmake-2.8.12.1 +openmpi-1.8.5 +scotch_6.0.3 From fb4a0ee7cdfdf7bd4be90dbcc268f044d9f8b08e Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 28 Nov 2016 11:27:09 +0100 Subject: [PATCH 19/24] ENH: ensure adios_config information reflects installation and is moveable --- makeADIOS | 315 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 227 insertions(+), 88 deletions(-) diff --git a/makeADIOS b/makeADIOS index 6c92352..480a5f6 100755 --- a/makeADIOS +++ b/makeADIOS @@ -53,6 +53,7 @@ usage() { usage: ${0##*/} [OPTION] [adios-VERSION] options: + -cmake PATH With cmake from the path given -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -help @@ -80,7 +81,12 @@ do export CC=gcc # use gcc/g++ export CXX=g++ ;; - ADIOS-[1-9]* | adios-[1-9]* | ADIOS-git | adios-git) + -cmake) + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + CMAKE_PATH="${2%%/}" + shift + ;; + ADIOS-[1-9]* | adios-[1-9]* | ADIOS-git* | adios-git*) adiosPACKAGE="${1%%/}" ;; *) @@ -119,86 +125,16 @@ echo ======================================== echo "Build adios library $adiosPACKAGE for $FOAM_MPI" echo -# Needs future adjustment -# - for shared library -# - for mpi-specific library locations -if [ -f $ADIOS_ARCH_PATH/include/adios.h \ - -a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ] -then - echo " ADIOS header in $ADIOS_ARCH_PATH/include" - ### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic - echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static - echo -else -( - # configuration options: - unset configOpt - # Add InfiniBand support - ibDir=/usr/local/ofed - if [ -d "$ibDir" ] - then - configOpt="$configOpt --with-infiniband=$ibDir" - fi +# +# Manual adjustments to adios config +# +adjustADIOS() +{ + # Rename libraries according to FOAM_MPI + ( + cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1 - # Transport layers - if [ -f "/usr/include/bzlib.h" ] - then - configOpt="$configOpt --with-bzip2=/usr" - fi - - if [ -f "/usr/include/zlib.h" ] - then - configOpt="$configOpt --with-zlib=/usr" - fi - - # Other types of support - ## $configOpt="$configOpt --with-hdf5=..." - ## $configOpt="$configOpt --with-lustre=..." - configOpt="$configOpt --enable-research-transports" - - # end of configuration options - # ---------------------------- - buildDIR=$buildBASE/$adiosPACKAGE - - cd $ADIOS_SOURCE_DIR || exit 1 - [ -e Makefile ] && make distclean 2>/dev/null - - export GIT_DIR=$ADIOS_SOURCE_DIR/.git - - # Remove any existing build folder and recreate - rm -rf $ADIOS_ARCH_DIR - rm -rf $buildDIR 2>/dev/null - mkdir -p $buildDIR - - [ -f configure ] || { - echo "no configure for $adiosPACKAGE ... trying autogen" - ./autogen.sh - } - - # May not work properly with FOAM_MPI = dummy - if [ "$FOAM_MPI" = dummy ] - then - configOpt="$configOpt --without-mpi" - else - CC=mpicc - CXX=mpicxx - fi - - # Install into lib64/ - cd $buildDIR && $ADIOS_SOURCE_DIR/configure \ - --prefix=$ADIOS_ARCH_PATH \ - --libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \ - --disable-fortran \ - --with-pic \ - --without-fastbit \ - $configOpt \ - && make -j $WM_NCOMPPROCS all \ - && make install \ - && echo "Built: $adiosPACKAGE" \ - && cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH && \ - { - # Rename according to FOAM_MPI if [ "$FOAM_MPI" != dummy ] then \mv -f libadios.a libadios_$FOAM_MPI.a @@ -210,16 +146,219 @@ else echo echo "ADIOS library renamed to libadios_$FOAM_MPI" echo - } && cd $ADIOS_ARCH_PATH/bin && \ - { - # We don't need/use XML things - \rm -f adios_lint - $ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null || \ - echo "Warning: Problems running adios_config" - } -) || { - echo "Error building: $adiosPACKAGE" + ) + + # We don't need/use XML things + \rm -f $ADIOS_ARCH_PATH/bin/adios_lint + + # Replace resolved paths with variables + echo "Adjust prefix for ADIOS" + for i in \ + $ADIOS_ARCH_PATH/bin/adios_config \ + $ADIOS_ARCH_PATH/etc/adios_config.flags \ + ; + do + [ -f "$i" ] || { + echo " no such file - '$i'" + continue + } + if sed -i -e 's|'"$WM_THIRD_PARTY_DIR"'|$WM_THIRD_PARTY_DIR|g' $i + then + echo " '$i'" + else + echo " problems with '$i'" + fi + done + + # Adjust the config flags file: + # * Remove references to Fortran libraries (disabled in configure) + # * Remove references to deprecated version 1 API + # * Cleanup excessive whitespace + # * Handle renamed libraries: + # - libadios -> libadios_$FOAM_MPI + # - libadios_nompi -> libadios_dummy + # + echo "Adjust library names for ADIOS" + for i in \ + $ADIOS_ARCH_PATH/etc/adios_config.flags \ + ; + do + [ -f "$i" ] || { + echo " no such file - '$i'" + continue + } + + if sed -i \ + -e '/_FLIB=/d' \ + -e '/_V1_INC=/d' \ + -e 's| *| |g' \ + -e 's|\(-ladios[a-z]*_\)nompi |\1dummy |g' \ + $i + then + echo " '$i'" + else + echo " problems with '$i'" + fi + + if [ "$FOAM_MPI" != dummy ] + then + sed -i -e 's|\(-ladios[a-z]*\) |\1_'"$FOAM_MPI |g" $i || \ + echo " problems with '$i'" + fi + done } + +# +# List ADIOS methods/configuration +# +listMethods() +{ + [ -f $ADIOS_ARCH_PATH/bin/adios_config ] || { + echo "Warning: no adios_config" + return 1 + } + + echo "===============" + + # May have problems listing parallel methods (eg, transport key missing) + if $ADIOS_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1 + then + $ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null + else + echo "Warning: could not list parallel methods" + # Fallback to serial methods + $ADIOS_ARCH_PATH/bin/adios_config -s -m 2>/dev/null + fi || echo "Warning: could not list configured methods" + echo "===============" + +} + + +# Needs future adjustment +# - for shared library +# - for mpi-specific library locations +if [ -f $ADIOS_ARCH_PATH/include/adios.h \ + -a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ] +then + echo " ADIOS header in $ADIOS_ARCH_PATH/include" + ### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic + echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static + listMethods +elif [ -z "$CMAKE_PATH" ] +then + echo "Starting build: $adiosPACKAGE (using configure)" + echo + ( + # configuration options: + unset configOpt + + # Add InfiniBand support + ibDir=/usr/local/ofed + if [ -d "$ibDir" -a "$FOAM_MPI" != dummy ] + then + configOpt="$configOpt --with-infiniband=$ibDir" + fi + + # Transport layers + if [ -f "/usr/include/bzlib.h" ] + then + configOpt="$configOpt --with-bzip2" + fi + + if [ -f "/usr/include/zlib.h" ] + then + configOpt="$configOpt --with-zlib" + fi + + # Other types of support + ## $configOpt="$configOpt --with-hdf5=..." + ## $configOpt="$configOpt --with-lustre=..." + ## configOpt="$configOpt --enable-research-transports" + + # end of configuration options + # ---------------------------- + buildDIR=$buildBASE/$adiosPACKAGE + + cd $ADIOS_SOURCE_DIR || exit 1 + [ -e Makefile ] && make distclean 2>/dev/null + + export GIT_DIR=$ADIOS_SOURCE_DIR/.git + + # Remove any existing build folder and recreate + rm -rf $ADIOS_ARCH_DIR + rm -rf $buildDIR 2>/dev/null + mkdir -p $buildDIR + + [ -f configure ] || { + echo "no configure for $adiosPACKAGE ... trying autogen" + ./autogen.sh + } + + # May not work properly with FOAM_MPI = dummy + if [ "$FOAM_MPI" = dummy ] + then + configOpt="$configOpt --without-mpi" + else + CC=mpicc + CXX=mpicxx + fi + + # Install into lib64/ + cd $buildDIR && $ADIOS_SOURCE_DIR/configure \ + --prefix=$ADIOS_ARCH_PATH \ + --libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \ + --disable-fortran \ + --with-pic \ + --without-fastbit \ + $configOpt \ + && make -j $WM_NCOMPPROCS all \ + && make install \ + && echo "Built: $adiosPACKAGE" \ + && adjustADIOS \ + && listMethods + ) || { + echo "Error building: $adiosPACKAGE" + } +else + # CMake options often lag the configure ones + echo "Starting build: $adiosPACKAGE (using cmake)" + echo + ( + buildDIR=$buildBASE/$adiosPACKAGE + cd $ADIOS_SOURCE_DIR || exit 1 + + export GIT_DIR=$ADIOS_SOURCE_DIR/.git + + # Remove any existing build folder and recreate + rm -rf $ADIOS_ARCH_DIR + rm -rf $buildDIR 2>/dev/null + mkdir -p $buildDIR + + # May not work properly with FOAM_MPI = dummy + if [ "$FOAM_MPI" = dummy ] + then + configOpt="$configOpt --without-mpi" + else + CC=mpicc + CXX=mpicxx + fi + + cmake=$(findCMake) + + # Install into lib64/ + cd $buildDIR && $cmake \ + -DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_FORTRAN:BOOL=FALSE \ + $ADIOS_SOURCE_DIR \ + && make -j $WM_NCOMPPROCS all \ + && make install \ + && echo "Built: $adiosPACKAGE" \ + && adjustADIOS \ + && listMethods + ) || { + echo "Error building: $adiosPACKAGE" + } fi # ----------------------------------------------------------------- end-of-file From 852e88b495798fb9f471c959803f36622e4f11c3 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 28 Nov 2016 17:49:14 +0100 Subject: [PATCH 20/24] STYLE: align makeParaView with other make scripts - obtain version by sourcing the coresponding OpenFOAM config file STYLE: update build documents --- Allwmake | 3 +- BUILD.md | 88 +++++++++++++++++++++++++------------------------ README.md | 3 +- makeCmake | 4 +-- makeMesa | 13 ++++---- makeParaView | 7 ++-- makeVTK.example | 2 +- sources.txt | 2 +- 8 files changed, 64 insertions(+), 58 deletions(-) diff --git a/Allwmake b/Allwmake index 750aea6..06642ef 100755 --- a/Allwmake +++ b/Allwmake @@ -150,7 +150,8 @@ MPICH) ( # WARNING: unmaintained build code: # --------------------------------- - sourceDIR=$sourceBASE/$MPI_HOME + mpiPACKAGE="${MPI_ARCH_PATH##*/}" + sourceDIR=$sourceBASE/$mpiPACKAGE cd $sourceDIR || exit 1 set -x diff --git a/BUILD.md b/BUILD.md index 4ebacec..2638177 100644 --- a/BUILD.md +++ b/BUILD.md @@ -178,13 +178,13 @@ and save some disk space. sources that are bundled with ParaView. For example, by using a symbolic link: - ln -s ParaView-5.2.0/VTK VTK-7.1.0 + ln -s ParaView-5.0.1/VTK VTK-7.1.0 The appropriate VTK version number can be found from the contents of the `vtkVersion.cmake` file. For example, - $ cat ParaView-5.2.0/VTK/CMake/vtkVersion.cmake + $ cat ParaView-5.0.1/VTK/CMake/vtkVersion.cmake # VTK version number components. set(VTK_MAJOR_VERSION 7) @@ -192,19 +192,21 @@ and save some disk space. set(VTK_BUILD_VERSION 0) ### ParaView +- **ParaView-5.0.1** is the last version for which the OpenFOAM reader + modules (eg, to visualize a `blockMeshDict`) work in their present form. + - Building ParaView requires CMake, qmake and a `qt` development files. Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as required. See additional notes below about [making Qt](#makeQt) if necessary. -### ParaView -- Both CMake and qmake are required when building ParaView. - #### 5.2.0 -- Compiles without patching. +- Compiles without patching, but the OpenFOAM reader modules + (eg, to visualize a `blockMeshDict`) have not yet been migrated + to this version. #### 4.4.0/5.0.0/5.0.1/5.1.2 -- If using `makeParaView`, the following patches will be automatically +- When using `makeParaView`, the following patches will be automatically applied (see the `etc/patches` directory): - Bugfix for STL reader - affects 4.4.0 only. - Broken installation (ui_pqExportStateWizard.h) - affects 4.4.0/5.0.0/5.0.1/5.1.x @@ -213,7 +215,6 @@ and save some disk space. the compilation of ParaView to halt. The easiest solution is to delete the ParaView-5.0.1/Plugins/SciberQuestToolKit directory. - ### Making Qt - Building a third-party Qt installation (prior to building ParaView) requires some additional effort, but should nonetheless work smoothly. @@ -226,7 +227,7 @@ and save some disk space. 3. Build ParaView using this third-party QT. For example, - ./makeParaView -qt-4.8.7 5.2.0 + ./makeParaView -qt-4.8.7 5.0.1 - ParaView does not yet support QT5. @@ -235,7 +236,6 @@ and save some disk space. central location), you will need to use the `etc/relocateQt` script afterwards. - --- ## Versions @@ -244,12 +244,12 @@ and save some disk space. The minimum version of gcc required is 4.8.0. -| Name | Location | -|-------------------|--------------------------------------------| -| [gcc][page gcc] | [releases][link gcc] | -| [gmp][page gmp] | system is often ok, otherwise [download][link gmp] | -| [mpfr][page mpfr] | system is often ok, otherwise [download][link mpfr] | -| [mpc][page mpc] | system is often ok, otherwise [download][link mpc] | +| Name | Location +|-------------------|-------------------------------------------- +| [gcc][page gcc] | [releases][link gcc] +| [gmp][page gmp] | system is often ok, otherwise [download][link gmp] +| [mpfr][page mpfr] | system is often ok, otherwise [download][link mpfr] +| [mpc][page mpc] | system is often ok, otherwise [download][link mpc] #### Potential MPFR conflicts @@ -283,41 +283,41 @@ update your CMake beforehand. GNU *configure* can only be used prior to clang version 3.9. -| Name | Location | -|-----------------------|------------------------| -| [clang][page clang] | [download][link clang] | -| [llvm][page llvm] | [download][link llvm] | +| Name | Location +|-----------------------|------------------------ +| [clang][page clang] | [download][link clang] +| [llvm][page llvm] | [download][link llvm] ### Parallel Processing -| Name | Location | -|-----------------------|------------------------| -| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios] | -| [scotch, ptscotch][page scotch] | [download][link scotch] | -| [openmpi][page openmpi] | [download][link openmpi] | +| Name | Location +|-----------------------|------------------------ +| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios] +| [scotch, ptscotch][page scotch] | [download][link scotch] +| [openmpi][page openmpi] | [download][link openmpi] ### General -| Name | Location | -|-----------------------|------------------------| -| [CMake][page cmake] | [download][link cmake] | -| [boost][page boost] | [download][link boost] | -| [CGAL][page CGAL] | [download][link CGAL] or [older][older CGAL] | -| [FFTW][page FFTW] | [download][link FFTW] | -| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio] | -| [tecio][page tecio] | [link tecio][link tecio] | -| gperftools | [repo][repo gperftools] or [download][link gperftools] | +| Name | Location +|-----------------------|------------------------ +| [CMake][page cmake] | [download][link cmake] +| [boost][page boost] | [download][link boost] +| [CGAL][page CGAL] | [download][link CGAL] or [older][older CGAL] +| [FFTW][page FFTW] | [download][link FFTW] +| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio] +| [tecio][page tecio] | [link tecio][link tecio] +| gperftools | [repo][repo gperftools] or [download][link gperftools] ### Visualization -| Name | Location | -|-----------------------|------------------------| -| [MESA][page mesa] | [download][link mesa] or [older][older mesa] | -| [ParaView][page ParaView] | [download][link ParaView] or older [5.1][older ParaView-51], [5.0][older ParaView-50], [4.4][older ParaView-44] | -| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView. | +| Name | Location +|-----------------------|------------------------ +| [MESA][page mesa] | [download][link mesa] or [older][older mesa] +| [ParaView][page ParaView] | [download][link ParaView]. The reader modules do not yet work with the newest paraview versions. +| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView. ### CMake Minimum Requirements @@ -325,6 +325,7 @@ GNU *configure* can only be used prior to clang version 3.9. The minimum CMake requirements for building various components. 2.8 llvm-3.4.2 + 2.8.8 ParaView-5.0.1 2.8.11 CGAL-4.9 2.8.12.2 llvm-3.8.0 2.8.4 cmake-3.6.0 @@ -396,11 +397,11 @@ The minimum CMake requirements for building various components. [page ParaView]: http://www.paraview.org/ -[link ParaView]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz +[link ParaView]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz [older ParaView-44]: http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz -[older ParaView-50]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz -[older ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz +[newer ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz +[newer ParaView-52]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz [page mesa]: http://mesa3d.org/ [link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.1/mesa-13.0.1.tar.xz @@ -415,7 +416,8 @@ The minimum CMake requirements for building various components. ## Additional OpenFOAM Links -- [Download and installation instructions](http://www.openfoam.com/releases) +- [Download](http://www.openfoam.com/releases) and + [installation instructions](http://www.openfoam.com/download/installation.php) - [Documentation](http://www.openfoam.com/documentation) - [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php) - [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php) diff --git a/README.md b/README.md index 51a45b3..975a68d 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ More details can be found the ThirdParty ./BUILD.md information. ## Additional OpenFOAM Links -- [Download and installation instructions](http://www.openfoam.com/releases) +- [Download](http://www.openfoam.com/releases) and + [installation instructions](http://www.openfoam.com/download/installation.php) - [Documentation](http://www.openfoam.com/documentation) - [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php) - [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php) diff --git a/makeCmake b/makeCmake index 6b3145f..b60bef5 100755 --- a/makeCmake +++ b/makeCmake @@ -29,7 +29,7 @@ # Build script for cmake # #------------------------------------------------------------------------------ -# Special purpose script, no default cmake version. +# Special purpose script, no default version. unset cmakePACKAGE #------------------------------------------------------------------------------ @@ -47,7 +47,7 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< Date: Tue, 13 Dec 2016 17:23:19 +0100 Subject: [PATCH 21/24] ENH: retain backup copies when patching files - allows the user to inspect what has been patched. - also use fuzzy patching (ignore whitespace) for a bit more robustness --- etc/tools/ThirdPartyFunctions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index b7d9c1e..e2fd201 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -325,7 +325,7 @@ applyPatch() else echo "apply patch for $pkg" touch "$sentinel" - patch -p1 < $patch 2>&1 | tee $sentinel + patch -b -l -p1 < $patch 2>&1 | tee $sentinel fi ) else From 391a6b24caabb7ae479fa36352c76250bfcea58f Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 13 Dec 2016 18:09:01 +0100 Subject: [PATCH 22/24] CONFIG: update patches for paraview 5.0.1, 5.1.0, 5.1.2 - also avoid issues with '+' being treated as a list separator (already patched in 5.2) -- STYLE: reformat version check output (in makeParaView) --- etc/patches/mkdiff-paraview-5.0.1 | 14 ++++++ etc/patches/paraview-4.4.0 | 20 +++----- etc/patches/paraview-5.0.0 | 1 + etc/patches/paraview-5.0.1 | 80 ++++++++++++++++++++++++------- etc/patches/paraview-5.1.0 | 18 +------ etc/patches/paraview-5.1.2 | 62 ++++++++++++++++++++++-- etc/tools/ParaViewFunctions | 6 +-- makeParaView | 3 +- makeVTK.example | 4 +- 9 files changed, 150 insertions(+), 58 deletions(-) create mode 120000 etc/patches/paraview-5.0.0 mode change 100644 => 120000 etc/patches/paraview-5.1.0 diff --git a/etc/patches/mkdiff-paraview-5.0.1 b/etc/patches/mkdiff-paraview-5.0.1 index c6a7343..b727ef9 100644 --- a/etc/patches/mkdiff-paraview-5.0.1 +++ b/etc/patches/mkdiff-paraview-5.0.1 @@ -2,12 +2,26 @@ # simple script to generate patches paraview=ParaView-5.0.1 +if [ "$#" -gt 0 ] +then + paraview="${1%%/}" +fi + +[ -d "$paraview" ] || { + echo "No directory '$paraview'" 1>&2 + exit 2 +} for i in \ $paraview/VTK/CMake/vtkCompilerExtras.cmake \ $paraview/VTK/CMake/GenerateExportHeader.cmake \ $paraview/Qt/Components/CMakeLists.txt \ + $paraview/CMake/generate_qhp.cmake \ + $paraview/CMake/ParaViewMacros.cmake \ + $paraview/CMake/generate_proxydocumentation.cmake \ ; do diff -uw $i.orig $i done + +# ----------------------------------------------------------------------------- diff --git a/etc/patches/paraview-4.4.0 b/etc/patches/paraview-4.4.0 index 2c34de3..92ff39b 100644 --- a/etc/patches/paraview-4.4.0 +++ b/etc/patches/paraview-4.4.0 @@ -16,7 +16,7 @@ ERROR_VARIABLE _gcc_version_info) - string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" -+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" ++ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" _gcc_version "${_gcc_version_info}") if(NOT _gcc_version) string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" @@ -27,24 +27,18 @@ OUTPUT_VARIABLE _gcc_version_info ERROR_VARIABLE _gcc_version_info) - string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" _gcc_version "${_gcc_version_info}") # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the # patch level, handle this here: --- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200 +++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200 -@@ -656,10 +656,10 @@ +@@ -640,7 +640,7 @@ #the pqSGExportStateWizard has subclasses that directly access #the UI file, and currently we don't have a clean way to break this hard #dependency, so for no we install this ui file. -if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" -- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") --endif() -+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" -+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") -+#OPENFOAM patch#endif() - - #IF (NOT PV_INSTALL_NO_DEVELOPMENT) - # # Headers ++if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" + DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") + endif() diff --git a/etc/patches/paraview-5.0.0 b/etc/patches/paraview-5.0.0 new file mode 120000 index 0000000..1f0fde9 --- /dev/null +++ b/etc/patches/paraview-5.0.0 @@ -0,0 +1 @@ +paraview-5.0.1 \ No newline at end of file diff --git a/etc/patches/paraview-5.0.1 b/etc/patches/paraview-5.0.1 index 24aceba..4b00f66 100644 --- a/etc/patches/paraview-5.0.1 +++ b/etc/patches/paraview-5.0.1 @@ -1,39 +1,87 @@ --- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200 -+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-06-11 15:10:14.820958942 +0200 ++++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-12-13 17:21:25.382720945 +0100 @@ -32,7 +32,7 @@ OUTPUT_VARIABLE _gcc_version_info ERROR_VARIABLE _gcc_version_info) - string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" -+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" ++ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" _gcc_version "${_gcc_version_info}") if(NOT _gcc_version) string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" --- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200 -+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-06-11 15:12:16.344357746 +0200 ++++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-12-13 17:21:25.382720945 +0100 @@ -166,7 +166,7 @@ execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info ERROR_VARIABLE _gcc_version_info) - string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" _gcc_version "${_gcc_version_info}") # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the # patch level, handle this here: ---- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200 -+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200 -@@ -656,10 +656,10 @@ +--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-03-28 17:07:03.000000000 +0200 ++++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100 +@@ -656,7 +656,7 @@ #the pqSGExportStateWizard has subclasses that directly access #the UI file, and currently we don't have a clean way to break this hard #dependency, so for no we install this ui file. -if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" -- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") --endif() -+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" -+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") -+#OPENFOAM patch#endif() ++if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" + DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") + endif() +--- ParaView-5.0.1/CMake/generate_qhp.cmake.orig 2016-03-28 17:06:22.000000000 +0200 ++++ ParaView-5.0.1/CMake/generate_qhp.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -44,7 +48,9 @@ + message(FATAL_ERROR "Missing one of the required arguments!!") + endif () + +-string (REPLACE "+" ";" file_patterns "${file_patterns}") ++# Recover original ';' separated list. ++string(REPLACE "_s" ";" file_patterns "${file_patterns}") ++string(REPLACE "_u" "_" file_patterns "${file_patterns}") + + get_filename_component(working_dir "${output_file}" PATH) + +--- ParaView-5.0.1/CMake/ParaViewMacros.cmake.orig 2016-03-28 17:07:03.000000000 +0200 ++++ ParaView-5.0.1/CMake/ParaViewMacros.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -219,15 +226,21 @@ + set (xmls_string "") + foreach (xml ${xmls}) + get_filename_component(xml "${xml}" ABSOLUTE) +- set (xmls_string "${xmls_string}${xml}+") ++ set (xmls_string "${xmls_string}${xml};") + endforeach() + + set (gui_xmls_string "") + foreach (gui_xml ${gui_xmls}) + get_filename_component(gui_xml "${gui_xml}" ABSOLUTE) +- set (gui_xmls_string "${gui_xmls_string}${gui_xml}+") ++ set (gui_xmls_string "${gui_xmls_string}${gui_xml};") + endforeach() + ++ # Escape ';' in lists ++ string(REPLACE "_" "_u" xmls_string "${xmls_string}") ++ string(REPLACE ";" "_s" xmls_string "${xmls_string}") ++ string(REPLACE "_" "_u" gui_xmls_string "${gui_xmls_string}") ++ string(REPLACE ";" "_s" gui_xmls_string "${gui_xmls_string}") ++ + set (all_xmls ${xmls} ${gui_xmls}) + list (GET all_xmls 0 first_xml) + if (NOT first_xml) +--- ParaView-5.0.1/CMake/generate_proxydocumentation.cmake.orig 2016-03-28 17:06:22.000000000 +0200 ++++ ParaView-5.0.1/CMake/generate_proxydocumentation.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -21,8 +21,10 @@ + endif() + + # input_xmls is a pseudo-list. Convert it to a real CMake list. +-string(REPLACE "+" ";" input_xmls "${input_xmls}") +-string(REPLACE "+" ";" input_gui_xmls "${input_gui_xmls}") ++string(REPLACE "_s" ";" input_xmls "${input_xmls}") ++string(REPLACE "_u" "_" input_xmls "${input_xmls}") ++string(REPLACE "_s" ";" input_gui_xmls "${input_gui_xmls}") ++string(REPLACE "_u" "_" input_gui_xmls "${input_gui_xmls}") + + set (xslt_xml) - #IF (NOT PV_INSTALL_NO_DEVELOPMENT) - # # Headers diff --git a/etc/patches/paraview-5.1.0 b/etc/patches/paraview-5.1.0 deleted file mode 100644 index 534e698..0000000 --- a/etc/patches/paraview-5.1.0 +++ /dev/null @@ -1,17 +0,0 @@ ---- ParaView-5.1.0/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200 -+++ ParaView-5.1.0/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200 -@@ -656,10 +656,10 @@ - #the pqSGExportStateWizard has subclasses that directly access - #the UI file, and currently we don't have a clean way to break this hard - #dependency, so for no we install this ui file. --if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" -- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") --endif() -+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" -+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") -+#OPENFOAM patch#endif() - - #IF (NOT PV_INSTALL_NO_DEVELOPMENT) - # # Headers diff --git a/etc/patches/paraview-5.1.0 b/etc/patches/paraview-5.1.0 new file mode 120000 index 0000000..36a4164 --- /dev/null +++ b/etc/patches/paraview-5.1.0 @@ -0,0 +1 @@ +paraview-5.1.2 \ No newline at end of file diff --git a/etc/patches/paraview-5.1.2 b/etc/patches/paraview-5.1.2 index 9bd8929..ccfc7c1 100644 --- a/etc/patches/paraview-5.1.2 +++ b/etc/patches/paraview-5.1.2 @@ -1,13 +1,65 @@ --- ParaView-5.1.2/Qt/Components/CMakeLists.txt.orig 2016-07-26 21:52:16.000000000 +0200 -+++ ParaView-5.1.2/Qt/Components/CMakeLists.txt 2016-11-11 14:41:19.395242358 +0100 -@@ -590,8 +590,8 @@ - ++++ ParaView-5.1.2/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100 +@@ -591,7 +591,7 @@ #the pqSGExportStateWizard has subclasses that directly access #the UI file, and currently we don't have a clean way to break this hard --#dependency, so for no we install this ui file. + #dependency, so for no we install this ui file. -if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -+#dependency, so for now we manually install this ui file. +if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") endif() +--- ParaView-5.1.2/CMake/generate_qhp.cmake.orig 2016-03-28 17:06:22.000000000 +0200 ++++ ParaView-5.1.2/CMake/generate_qhp.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -44,7 +48,9 @@ + message(FATAL_ERROR "Missing one of the required arguments!!") + endif () + +-string (REPLACE "+" ";" file_patterns "${file_patterns}") ++# Recover original ';' separated list. ++string(REPLACE "_s" ";" file_patterns "${file_patterns}") ++string(REPLACE "_u" "_" file_patterns "${file_patterns}") + + get_filename_component(working_dir "${output_file}" PATH) + +--- ParaView-5.1.2/CMake/ParaViewMacros.cmake.orig 2016-03-28 17:07:03.000000000 +0200 ++++ ParaView-5.1.2/CMake/ParaViewMacros.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -219,15 +226,21 @@ + set (xmls_string "") + foreach (xml ${xmls}) + get_filename_component(xml "${xml}" ABSOLUTE) +- set (xmls_string "${xmls_string}${xml}+") ++ set (xmls_string "${xmls_string}${xml};") + endforeach() + + set (gui_xmls_string "") + foreach (gui_xml ${gui_xmls}) + get_filename_component(gui_xml "${gui_xml}" ABSOLUTE) +- set (gui_xmls_string "${gui_xmls_string}${gui_xml}+") ++ set (gui_xmls_string "${gui_xmls_string}${gui_xml};") + endforeach() + ++ # Escape ';' in lists ++ string(REPLACE "_" "_u" xmls_string "${xmls_string}") ++ string(REPLACE ";" "_s" xmls_string "${xmls_string}") ++ string(REPLACE "_" "_u" gui_xmls_string "${gui_xmls_string}") ++ string(REPLACE ";" "_s" gui_xmls_string "${gui_xmls_string}") ++ + set (all_xmls ${xmls} ${gui_xmls}) + list (GET all_xmls 0 first_xml) + if (NOT first_xml) +--- ParaView-5.1.2/CMake/generate_proxydocumentation.cmake.orig 2016-03-28 17:06:22.000000000 +0200 ++++ ParaView-5.1.2/CMake/generate_proxydocumentation.cmake 2016-12-13 17:21:25.382720945 +0100 +@@ -21,8 +21,10 @@ + endif() + + # input_xmls is a pseudo-list. Convert it to a real CMake list. +-string(REPLACE "+" ";" input_xmls "${input_xmls}") +-string(REPLACE "+" ";" input_gui_xmls "${input_gui_xmls}") ++string(REPLACE "_s" ";" input_xmls "${input_xmls}") ++string(REPLACE "_u" "_" input_xmls "${input_xmls}") ++string(REPLACE "_s" ";" input_gui_xmls "${input_gui_xmls}") ++string(REPLACE "_u" "_" input_gui_xmls "${input_gui_xmls}") + + set (xslt_xml) + diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 95d7341..2d428b4 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -117,9 +117,9 @@ checkVersion() if [ "$ParaView_VERSION" != "$ver" ] then - echo "MISMATCH!" - echo " specified $ParaView_VERSION" - echo " found ${ver:-NONE}" + echo "(${ver:-none}) mismatch?" + else + echo "(${ver:-none})" fi } diff --git a/makeParaView b/makeParaView index 3d2141d..2ca6ebf 100755 --- a/makeParaView +++ b/makeParaView @@ -381,10 +381,9 @@ Features selected --------------------- Version information qt ${QtVersion:-none} - version ${ParaView_VERSION:-unknown} + version ${ParaView_VERSION:-unknown} $(checkVersion) major ${ParaView_MAJOR:-unknown} build ${buildType:-Release} -$(checkVersion) --------------------- SUMMARY diff --git a/makeVTK.example b/makeVTK.example index 398b3aa..a4566d1 100755 --- a/makeVTK.example +++ b/makeVTK.example @@ -3,8 +3,8 @@ # - off-screen mesa vtk=VTK-7.1.0 -mesa=mesa-11.2.2 -# mesa=mesa-13.0.2 +# mesa=mesa-11.2.2 +mesa=mesa-13.0.1 ./makeVTK \ $vtk \ From c838cae68093d8d58877489bc10708e808c21610 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 14 Dec 2016 09:19:09 +0100 Subject: [PATCH 23/24] CONFIG: adjust clang/llvm link to 3.7.0 - corresponds to the system clang for opensuse leap 42.1, which has been used extensively during the development process. --- BUILD.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BUILD.md b/BUILD.md index 2638177..d8f4a6a 100644 --- a/BUILD.md +++ b/BUILD.md @@ -327,6 +327,7 @@ The minimum CMake requirements for building various components. 2.8 llvm-3.4.2 2.8.8 ParaView-5.0.1 2.8.11 CGAL-4.9 + 2.8.12.2 llvm-3.7.0 2.8.12.2 llvm-3.8.0 2.8.4 cmake-3.6.0 3.3 ParaView-5.1.2 @@ -351,8 +352,11 @@ The minimum CMake requirements for building various components. [page clang]: http://llvm.org/ [page llvm]: http://llvm.org/ -[link clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz -[link llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz +[link clang]: http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz +[link llvm]: http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz + +[newer clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz +[newer llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz From 09428646a03a4d8f731fecba47b8de9d9db394c2 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 14 Dec 2016 15:29:02 +0100 Subject: [PATCH 24/24] COMP: provide patch for ADIOS 1.11.0, when reading available transformations --- etc/patches/ADIOS-1.11.0 | 12 ++++++++++++ etc/patches/adios-1.11.0 | 1 + makeADIOS | 4 ++++ 3 files changed, 17 insertions(+) create mode 100644 etc/patches/ADIOS-1.11.0 create mode 120000 etc/patches/adios-1.11.0 diff --git a/etc/patches/ADIOS-1.11.0 b/etc/patches/ADIOS-1.11.0 new file mode 100644 index 0000000..60ca0dd --- /dev/null +++ b/etc/patches/ADIOS-1.11.0 @@ -0,0 +1,12 @@ +--- ADIOS-1.11.0/src/core/adios_transform_methods.c.orig 2016-11-17 19:46:11.000000000 +0100 ++++ ADIOS-1.11.0/src/core/adios_transform_methods.c 2016-12-14 15:19:39.870832445 +0100 +@@ -7,6 +7,9 @@ + + ADIOS_AVAILABLE_TRANSFORM_METHODS * adios_available_transform_methods() + { ++ /* Ensure the transforms are initialized before accessing */ ++ adios_transform_read_init(); ++ + int i, n; + n = 0; + for (i = (int)adios_transform_none; i < num_adios_transform_types; i++) { diff --git a/etc/patches/adios-1.11.0 b/etc/patches/adios-1.11.0 new file mode 120000 index 0000000..ab6c15d --- /dev/null +++ b/etc/patches/adios-1.11.0 @@ -0,0 +1 @@ +ADIOS-1.11.0 \ No newline at end of file diff --git a/makeADIOS b/makeADIOS index 480a5f6..0c8d4d7 100755 --- a/makeADIOS +++ b/makeADIOS @@ -284,6 +284,8 @@ then export GIT_DIR=$ADIOS_SOURCE_DIR/.git + applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR + # Remove any existing build folder and recreate rm -rf $ADIOS_ARCH_DIR rm -rf $buildDIR 2>/dev/null @@ -329,6 +331,8 @@ else export GIT_DIR=$ADIOS_SOURCE_DIR/.git + applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR + # Remove any existing build folder and recreate rm -rf $ADIOS_ARCH_DIR rm -rf $buildDIR 2>/dev/null