CONFIG: harmonize makeAdios1, makeAdios2 files

- remove old dependency of adios2 on the adios1 library
This commit is contained in:
Mark Olesen
2019-07-31 14:28:53 +02:00
parent 17a443a557
commit 54d6b7994d
3 changed files with 60 additions and 67 deletions

View File

@ -154,7 +154,7 @@ export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mp
#### Optional Components #### Optional Components
`makeADIOS` `makeAdios1` `makeAdios2`
- Only required for [ADIOS](#parallel) support, - Only required for [ADIOS](#parallel) support,
which is currently staged in the [add-ons repository][link AddOns]. which is currently staged in the [add-ons repository][link AddOns].

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) 2016-2018 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -11,10 +11,10 @@
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
# #
# Script # Script
# makeADIOS # makeAdios1
# #
# Description # Description
# Build script for ADIOS # Build script for ADIOS1
# #
# ---------------------------------------------- # ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE # NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
@ -29,9 +29,9 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ADIOS version from OpenFOAM etc/config.sh file: # ADIOS version from OpenFOAM etc/config.sh file:
_foamConfig ADIOS _foamConfig adios1
adiosPACKAGE=${adios_version:-adios-none} adiosPACKAGE=${adios1_version:-adios-none}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
usage() { usage() {
@ -52,7 +52,7 @@ USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
exportCompiler true # Compiler info + flags for CMake/configure exportCompiler minimal # Minimal compiler info for CMake/configure
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -68,7 +68,10 @@ do
CMAKE_PATH="${2%%/}" CMAKE_PATH="${2%%/}"
shift shift
;; ;;
ADIOS-[1-9]* | adios-[1-9]* | ADIOS-git* | adios-git*) ADIOS1-[1-9]* | ADIOS1-git* | ADIOS-[1-9]* | ADIOS-git*)
adiosPACKAGE="${1%%/}"
;;
adios1-[1-9]* | adios1-git* | adios-[1-9]* | adios-git*)
adiosPACKAGE="${1%%/}" adiosPACKAGE="${1%%/}"
;; ;;
@ -95,11 +98,11 @@ fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# Build ADIOS # Build ADIOS
# ADIOS_SOURCE_DIR : location of the original sources # ADIOS1_SOURCE_DIR : location of the original sources
# ADIOS_ARCH_PATH : installation directory # ADIOS1_ARCH_PATH : installation directory
ADIOS_SOURCE_DIR=$sourceBASE/$adiosPACKAGE ADIOS1_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE ADIOS1_ARCH_PATH=$installBASE/$adiosPACKAGE
: ${FOAM_MPI:=dummy} : ${FOAM_MPI:=dummy}
@ -116,7 +119,7 @@ adjustADIOS()
{ {
# Rename libraries according to FOAM_MPI # Rename libraries according to FOAM_MPI
( (
cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1 cd $ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1
if [ "$FOAM_MPI" != dummy ] if [ "$FOAM_MPI" != dummy ]
then then
@ -132,13 +135,13 @@ adjustADIOS()
) )
# We don't need/use XML things # We don't need/use XML things
\rm -f $ADIOS_ARCH_PATH/bin/adios_lint \rm -f $ADIOS1_ARCH_PATH/bin/adios_lint
# Replace resolved paths with variables # Replace resolved paths with variables
echo "Adjust prefix for ADIOS" echo "Adjust prefix for ADIOS"
for i in \ for i in \
$ADIOS_ARCH_PATH/bin/adios_config \ $ADIOS1_ARCH_PATH/bin/adios_config \
$ADIOS_ARCH_PATH/etc/adios_config.flags \ $ADIOS1_ARCH_PATH/etc/adios_config.flags \
; ;
do do
[ -f "$i" ] || { [ -f "$i" ] || {
@ -163,7 +166,7 @@ adjustADIOS()
# #
echo "Adjust library names for ADIOS" echo "Adjust library names for ADIOS"
for i in \ for i in \
$ADIOS_ARCH_PATH/etc/adios_config.flags \ $ADIOS1_ARCH_PATH/etc/adios_config.flags \
; ;
do do
[ -f "$i" ] || { [ -f "$i" ] || {
@ -196,7 +199,7 @@ adjustADIOS()
# #
listMethods() listMethods()
{ {
[ -f $ADIOS_ARCH_PATH/bin/adios_config ] || { [ -f $ADIOS1_ARCH_PATH/bin/adios_config ] || {
echo "Warning: no adios_config" echo "Warning: no adios_config"
return 1 return 1
} }
@ -204,13 +207,13 @@ listMethods()
echo "===============" echo "==============="
# May have problems listing parallel methods (eg, transport key missing) # May have problems listing parallel methods (eg, transport key missing)
if $ADIOS_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1 if $ADIOS1_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1
then then
$ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null $ADIOS1_ARCH_PATH/bin/adios_config -m 2>/dev/null
else else
echo "Warning: could not list parallel methods" echo "Warning: could not list parallel methods"
# Fallback to serial methods # Fallback to serial methods
$ADIOS_ARCH_PATH/bin/adios_config -s -m 2>/dev/null $ADIOS1_ARCH_PATH/bin/adios_config -s -m 2>/dev/null
fi || echo "Warning: could not list configured methods" fi || echo "Warning: could not list configured methods"
echo "===============" echo "==============="
@ -220,12 +223,12 @@ listMethods()
# Needs future adjustment # Needs future adjustment
# - for shared library # - for shared library
# - for mpi-specific library locations # - for mpi-specific library locations
if [ -f $ADIOS_ARCH_PATH/include/adios.h \ if [ -f $ADIOS1_ARCH_PATH/include/adios.h \
-a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ] -a -r $ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ]
then then
echo " ADIOS header in $ADIOS_ARCH_PATH/include" echo " ADIOS header in $ADIOS1_ARCH_PATH/include"
### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic ### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic
echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static echo " ADIOS libs in $ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
listMethods listMethods
elif [ -z "$CMAKE_PATH" ] elif [ -z "$CMAKE_PATH" ]
then then
@ -269,15 +272,15 @@ then
# ---------------------------- # ----------------------------
buildDIR=$buildBASE/$adiosPACKAGE buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS_SOURCE_DIR || exit 1 cd $ADIOS1_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null [ -e Makefile ] && make distclean 2>/dev/null
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR applyPatch $adiosPACKAGE $ADIOS1_SOURCE_DIR
# Remove any existing build folder and recreate # Remove any existing build folder and recreate
rm -rf $ADIOS_ARCH_DIR rm -rf $ADIOS1_ARCH_DIR
rm -rf $buildDIR 2>/dev/null rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR mkdir -p $buildDIR
@ -296,9 +299,9 @@ then
fi fi
# Install into lib64/ # Install into lib64/
cd $buildDIR && $ADIOS_SOURCE_DIR/configure \ cd $buildDIR && $ADIOS1_SOURCE_DIR/configure \
--prefix=$ADIOS_ARCH_PATH \ --prefix=$ADIOS1_ARCH_PATH \
--libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \ --libdir=$ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
--disable-fortran \ --disable-fortran \
--with-pic \ --with-pic \
--without-fastbit \ --without-fastbit \
@ -317,13 +320,13 @@ else
echo echo
( (
buildDIR=$buildBASE/$adiosPACKAGE buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS_SOURCE_DIR || exit 1 cd $ADIOS1_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR applyPatch $adiosPACKAGE $ADIOS1_SOURCE_DIR
# Remove any existing build folder and recreate # Remove any existing build folder and recreate
rm -rf $ADIOS_ARCH_DIR rm -rf $ADIOS1_ARCH_DIR
rm -rf $buildDIR 2>/dev/null rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR mkdir -p $buildDIR
@ -340,11 +343,11 @@ else
# Install into lib64/ # Install into lib64/
cd $buildDIR && $cmake \ cd $buildDIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \ -DCMAKE_INSTALL_PREFIX=$ADIOS1_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DBUILD_FORTRAN=FALSE \ -DBUILD_FORTRAN=FALSE \
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \ ${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
$ADIOS_SOURCE_DIR \ $ADIOS1_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \ && make -j $WM_NCOMPPROCS all \
&& make install \ && make install \
&& echo "Built: $adiosPACKAGE" \ && echo "Built: $adiosPACKAGE" \

View File

@ -3,14 +3,14 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# This file is part of OpenFOAM, licensed under the GNU General Public License # This file is part of OpenFOAM, licensed under the GNU General Public License
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
# #
# Script # Script
# makeADIOS2 # makeAdios2
# #
# Description # Description
# Build script for ADIOS2 # Build script for ADIOS2
@ -27,9 +27,9 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ADIOS2 version from OpenFOAM etc/config.sh file: # ADIOS2 version from OpenFOAM etc/config.sh file:
_foamConfig ADIOS2 _foamConfig adios2
adios2PACKAGE=${adios2_version:-adios-none} adiosPACKAGE=${adios2_version:-adios-none}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
usage() { usage() {
@ -44,13 +44,13 @@ options:
-help -help
* Build ADIOS2 * Build ADIOS2
$adios2PACKAGE $adiosPACKAGE
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
exportCompiler true # Compiler info + flags for CMake/configure exportCompiler minimal # Minimal compiler info for CMake/configure
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -65,8 +65,11 @@ do
CMAKE_PATH="${2%%/}" CMAKE_PATH="${2%%/}"
shift shift
;; ;;
ADIOS2-[1-9]* | adios2-[1-9]* | ADIOS2-git* | adios2-git*) ADIOS2-[1-9]* | ADIOS2-git* | adios-[1-9]* | ADIOS-git*)
adios2PACKAGE="${1%%/}" adiosPACKAGE="${1%%/}"
;;
adios2-[1-9]* | adios2-git* | adios-[1-9]* | adios-git*)
adiosPACKAGE="${1%%/}"
;; ;;
*) *)
die "unknown option/argument: '$1'" die "unknown option/argument: '$1'"
@ -75,14 +78,14 @@ do
shift shift
done done
[ -n "$adios2PACKAGE" ] || die "The adios2-VERSION was not specified" [ -n "$adiosPACKAGE" ] || die "The adios2-VERSION was not specified"
# nothing to build # nothing to build
if _foamIsNone "$adios2PACKAGE" if _foamIsNone "$adiosPACKAGE"
then then
echo "Using adios-none (skip ThirdParty build of ADIOS)" echo "Using adios-none (skip ThirdParty build of ADIOS)"
exit 0 exit 0
elif _foamIsSystem "$adios2PACKAGE" elif _foamIsSystem "$adiosPACKAGE"
then then
echo "Using adios-system" echo "Using adios-system"
exit 0 exit 0
@ -94,20 +97,8 @@ fi
# ADIOS2_SOURCE_DIR : location of the original sources # ADIOS2_SOURCE_DIR : location of the original sources
# ADIOS2_ARCH_PATH : installation directory # ADIOS2_ARCH_PATH : installation directory
ADIOS2_SOURCE_DIR=$sourceBASE/$adios2PACKAGE ADIOS2_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
ADIOS2_ARCH_PATH=$installBASE/$adios2PACKAGE ADIOS2_ARCH_PATH=$installBASE/$adiosPACKAGE
# Some hacked in value, for binding in ADIOS1 as well (for the reader)
# Don't know if this is still needed
if [ -n "$ADIOS1_ARCH_PATH" ]
then
ADIOS1_ARCH_PATH=$installBASE/ADIOS-1.13.0
fi
if [ -d "$ADIOS1_ARCH_PATH" ]
then
export ADIOS1_ROOT="$ADIOS1_ARCH_PATH"
fi
: ${FOAM_MPI:=dummy} : ${FOAM_MPI:=dummy}
@ -128,14 +119,14 @@ then
echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
else else
# CMake options often lag the configure ones # CMake options often lag the configure ones
echo "Starting build: $adios2PACKAGE (using cmake)" echo "Starting build: $adiosPACKAGE (using cmake)"
echo echo
( (
buildDIR=$buildBASE/$adios2PACKAGE buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS2_SOURCE_DIR || exit 1 cd $ADIOS2_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
applyPatch $adios2PACKAGE $ADIOS2_SOURCE_DIR applyPatch $adiosPACKAGE $ADIOS2_SOURCE_DIR
# Remove any existing build folder and recreate # Remove any existing build folder and recreate
rm -rf $ADIOS2_ARCH_DIR rm -rf $ADIOS2_ARCH_DIR
@ -158,14 +149,13 @@ else
-DCMAKE_INSTALL_PREFIX=$ADIOS2_ARCH_PATH \ -DCMAKE_INSTALL_PREFIX=$ADIOS2_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DADIOS2_USE_Fortran=FALSE \ -DADIOS2_USE_Fortran=FALSE \
-DADIOS1_USE_STATIC_LIBS=TRUE \
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \ ${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
$ADIOS2_SOURCE_DIR \ $ADIOS2_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \ && make -j $WM_NCOMPPROCS all \
&& make install \ && make install \
&& echo "Built: $adios2PACKAGE" && echo "Built: $adiosPACKAGE"
) || { ) || {
echo "Error building: $adios2PACKAGE" echo "Error building: $adiosPACKAGE"
} }
fi fi