ENH: improve configuration of gperftools (now at version 2.5)

- support gperftools-none, gperftools-system configurations
  as per other third-party packages.

STYLE: clean up more environment variables

CONFIG: testing adios rule
This commit is contained in:
Mark Olesen 2016-11-27 16:24:40 +01:00
parent dc1c37e464
commit 00c3c6f9a7
4 changed files with 74 additions and 14 deletions

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -119,7 +119,6 @@ unsetenv OPAL_PREFIX
# Unset Ensight/ParaView-related environment variables # Unset Ensight/ParaView-related environment variables
unsetenv ENSIGHT9_READER unsetenv ENSIGHT9_READER
unsetenv CMAKE_HOME
unsetenv ParaView_DIR unsetenv ParaView_DIR
unsetenv ParaView_INCLUDE_DIR unsetenv ParaView_INCLUDE_DIR
unsetenv ParaView_MAJOR unsetenv ParaView_MAJOR
@ -129,12 +128,15 @@ unsetenv PV_PLUGIN_PATH
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# unset other ThirdParty environment variables # unset other ThirdParty environment variables
unsetenv ADIOS_ARCH_PATH
unsetenv BOOST_ARCH_PATH unsetenv BOOST_ARCH_PATH
unsetenv CCMIO_ARCH_PATH unsetenv CCMIO_ARCH_PATH
unsetenv CGAL_ARCH_PATH unsetenv CGAL_ARCH_PATH
unsetenv FFTW_ARCH_PATH unsetenv FFTW_ARCH_PATH
unsetenv GPERFTOOLS_ARCH_PATH
unsetenv GMP_ARCH_PATH unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH unsetenv MPFR_ARCH_PATH
unsetenv METIS_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH unsetenv SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -174,7 +176,6 @@ unalias wm32
unalias wmSP unalias wmSP
unalias wmDP unalias wmDP
unalias wmRefresh
unalias wmUnset unalias wmUnset
unalias wmSchedOn unalias wmSchedOn
@ -191,6 +192,7 @@ unalias util
unalias tut unalias tut
unalias run unalias run
unalias wmRefresh
unalias foamVersion unalias foamVersion
unalias foamPV unalias foamPV

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -25,17 +25,54 @@
# etc/config.sh/gperftools # etc/config.sh/gperftools
# #
# Description # Description
# Setup file for gperftools binaries libraries. # Setup file for gperftools binaries and libraries.
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
# #
# If using system-wide installations, use the following settings:
#
# gperftools_version=gperftools-system
#
# If the system gperftools is unusable (eg, too old) and you don't
# have or want a ThirdParty installation:
#
# gperftools_version=gperftools-none
#
# If using a central installation, but not located under ThirdParty:
# - specify gperftools-system
# - provide full paths for GPERFTOOLS_ARCH_PATH
#
# Note
# When _foamAddLib is unset (eg, called from makeGperftools):
# - gperftools_version variable are retained.
# - the LD_LIBRARY_PATH and PATH are not adjusted.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
version=svn gperftools_version=gperftools-2.5
gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
GPERFTOOLS_VERSION=gperftools-$version GPERFTOOLS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$gperftools_version
GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION
#------------------------------------------------------------------------------
export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH if [ "$FOAM_VERBOSE" -a "$PS1" ]
export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH then
echo "Using gperftools ($gperftools_version) -> $GPERFTOOLS_ARCH_PATH" 1>&2
fi
if type _foamAddLib > /dev/null 2>&1 # normal sourcing
then
# If GPERFTOOLS_ARCH_PATH does not end with '-system' or '-none',
# it is located within ThirdParty, or a central installation
# outside of ThirdParty and must be added to the lib-path.
ending="${GPERFTOOLS_ARCH_PATH##*-}"
if [ "$ending" != none -a "$ending" != system ]
then
_foamAddLib $GPERFTOOLS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddPath $GPERFTOOLS_ARCH_PATH/bin
fi
unset gperftools_version ending
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -115,7 +115,6 @@ fi
# Unset Ensight/ParaView-related environment variables # Unset Ensight/ParaView-related environment variables
unset ENSIGHT9_READER unset ENSIGHT9_READER
unset CMAKE_HOME
unset ParaView_DIR unset ParaView_DIR
unset ParaView_INCLUDE_DIR unset ParaView_INCLUDE_DIR
unset ParaView_MAJOR unset ParaView_MAJOR
@ -125,12 +124,15 @@ unset PV_PLUGIN_PATH
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# unset other ThirdParty environment variables # unset other ThirdParty environment variables
unset ADIOS_ARCH_PATH
unset BOOST_ARCH_PATH unset BOOST_ARCH_PATH
unset CCMIO_ARCH_PATH unset CCMIO_ARCH_PATH
unset CGAL_ARCH_PATH unset CGAL_ARCH_PATH
unset FFTW_ARCH_PATH unset FFTW_ARCH_PATH
unset GPERFTOOLS_ARCH_PATH
unset GMP_ARCH_PATH unset GMP_ARCH_PATH
unset MPFR_ARCH_PATH unset MPFR_ARCH_PATH
unset METIS_ARCH_PATH
unset SCOTCH_ARCH_PATH unset SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

19
wmake/rules/General/ADIOS Normal file
View File

@ -0,0 +1,19 @@
#-------------------------------*- makefile -*---------------------------------
# ADIOS includes/libraries
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
ADIOS_INC = -I$(ADIOS_ARCH_PATH)/include
ADIOS_LIBS := \
-L$(ADIOS_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \
-ladios_$(FOAM_MPI)
# ADIOS dependent libraries. Eg, after -L/usr/lib64 ...
# Query as sequential to reduce mpi-dependencies
ADIOS_LIBS +=
$(shell $(ADIOS_ARCH_PATH)/bin/adios_config -s -l | sed -e 's@^.*-L/usr/lib[^ ]*@@')
#------------------------------------------------------------------------------