Commit 7e07ce20 authored by mark's avatar mark

CONFIG: use newly added ADIOS wmake rules

- will be active in the future.
For now, just use copied version.
parent ad0f31b8
......@@ -3,15 +3,39 @@ cd ${0%/*} || exit 1 # run from this directory
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
if [ -n "$ADIOS_ARCH_PATH" ]
#
# Check prerequisites
hasAdios()
{
[ "${ADIOS_ARCH_PATH##*-}" = none ] && {
echo "Building ADIOS components disabled"
return 1
}
[ -f "$ADIOS_ARCH_PATH/include/adios.h" ] || \
[ "${ADIOS_ARCH_PATH##*-}" = system -a -f "/usr/include/adios.h" ] || {
echo
echo "WARNING: cannot build ADIOS components without headers"
echo " missing headers"
echo
return 1
}
[ -r "$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a" ] || {
echo
echo "WARNING: cannot build ADIOS components"
echo " missing library for $FOAM_MPI"
echo
return 1
}
return 0 # success?
}
if hasAdios
then
echo "using ADIOS_ARCH_PATH=$ADIOS_ARCH_PATH"
else
export ADIOS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64Gcc/adios-git
echo "setting ADIOS_ARCH_PATH=$ADIOS_ARCH_PATH"
adiosFoam/Allwmake $targetType $*
functionObjects/Allwmake $targetType $*
fi
adiosFoam/Allwmake $targetType $*
functionObjects/Allwmake $targetType $*
# ----------------------------------------------------------------- end-of-file
......@@ -3,15 +3,43 @@ cd ${0%/*} || exit 1 # run from this directory
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
if [ -n "$ADIOS_ARCH_PATH" ]
#
# Check prerequisites
hasAdios()
{
[ "${ADIOS_ARCH_PATH##*-}" = none ] && {
echo "Building ADIOS components disabled"
return 1
}
[ -f "$ADIOS_ARCH_PATH/include/adios.h" ] || \
[ "${ADIOS_ARCH_PATH##*-}" = system -a -f "/usr/include/adios.h" ] || {
echo
echo "WARNING: cannot build ADIOS components without headers"
echo " missing headers"
echo
return 1
}
[ -r "$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a" ] || {
echo
echo "WARNING: cannot build ADIOS components"
echo " missing library for $FOAM_MPI"
echo
return 1
}
return 0 # success?
}
if hasAdios
then
echo "using ADIOS_ARCH_PATH=$ADIOS_ARCH_PATH"
wmake $targetType
else
export ADIOS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64Gcc/adios-git
echo "setting ADIOS_ARCH_PATH=$ADIOS_ARCH_PATH"
echo
echo "Skipping adiosFoam library"
echo
fi
set -x
wmake $targetType
# ----------------------------------------------------------------- end-of-file
## sinclude $(GENERAL_RULES)/ADIOS
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
ADIOS_LIBS := ${shell ${ADIOS_ARCH_PATH}/bin/adios_config -l}
# Obtain compile/link flags via adios_config
ADIOS_INC := $(shell $(ADIOS_ARCH_PATH)/bin/adios_config -c)
ADIOS_LIBS := $(shell $(ADIOS_ARCH_PATH)/bin/adios_config -l)
EXE_INC = -DFOAM_PLATFORM="$(WM_ARCH)$(WM_COMPILER)" \
$(PFLAGS) $(PINC) \
-I${ADIOS_ARCH_PATH}/include \
EXE_INC = \
-DFOAM_PLATFORM="$(WM_ARCH)$(WM_COMPILER)" \
$(PFLAGS) $(PINC) $(ADIOS_INC) \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = $(PLIBS) \
$(ADIOS_LIBS) \
LIB_LIBS = \
$(PLIBS) $(ADIOS_LIBS) \
-llagrangian \
-lmeshTools -lfiniteVolume
......@@ -3,21 +3,45 @@ cd ${0%/*} || exit 1 # run from this directory
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
if [ -n "$ADIOS_ARCH_PATH" ]
then
echo "using ADIOS_ARCH_PATH=$ADIOS_ARCH_PATH"
else
export ADIOS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64Gcc/adios-git
echo "setting ADIOS_ARCH_PATH=$ADIOS_ARCH_PATH"
fi
#
# Check prerequisites
hasAdios()
{
[ "${ADIOS_ARCH_PATH##*-}" = none ] && {
echo "Building ADIOS components disabled"
return 1
}
[ -f "$ADIOS_ARCH_PATH/include/adios.h" ] || \
[ "${ADIOS_ARCH_PATH##*-}" = system -a -f "/usr/include/adios.h" ] || {
echo
echo "WARNING: cannot build ADIOS components without headers"
echo " missing headers"
echo
return 1
}
[ -r "$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a" ] || {
echo
echo "WARNING: cannot build ADIOS components"
echo " missing library for $FOAM_MPI"
echo
return 1
}
# extra compile/link options
adiosFoam=$(cd ../adiosFoam && pwd -P)
return 0 # success?
}
export ADIOS_EXTRA_COMP="-I$adiosFoam/lnInclude"
export ADIOS_EXTRA_LINK='-L$(FOAM_USER_LIBBIN) -ladiosFoam'
set -x
wmake $targetType adiosWrite
if hasAdios
then
# extra compile/link options
adiosFoam=$(cd ../adiosFoam && pwd -P)
export ADIOS_EXTRA_COMP="-I$adiosFoam/lnInclude"
export ADIOS_EXTRA_LINK='-L$(FOAM_USER_LIBBIN) -ladiosFoam'
wmake $targetType adiosWrite
fi
# ----------------------------------------------------------------- end-of-file
## sinclude $(GENERAL_RULES)/ADIOS
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
# Obtain compile/link flags via adios_config
ADIOS_INC := $(shell $(ADIOS_ARCH_PATH)/bin/adios_config -c)
ADIOS_LIBS := $(shell $(ADIOS_ARCH_PATH)/bin/adios_config -l)
EXE_INC = \
$(PFLAGS) $(PINC) \
-I${ADIOS_ARCH_PATH}/include $(ADIOS_EXTRA_COMP) \
-DFOAM_PLATFORM="$(WM_ARCH)$(WM_COMPILER)" \
$(PFLAGS) $(PINC) $(ADIOS_INC) \
${ADIOS_EXTRA_COMP} \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/spray/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
......@@ -23,7 +31,8 @@ EXE_INC = \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = $(PLIBS) \
LIB_LIBS = \
$(PLIBS) $(ADIOS_LIBS) \
${ADIOS_EXTRA_LINK} \
-llagrangian -llagrangianIntermediate -llagrangianSpray \
-lmolecule \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment