Commit 171d7a35 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: relocate 3rd party libraries -> FOAM_EXT_LIBBIN

- place under $WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
- relocate FOAM_MPI_LIBBIN accordingly
parent 54e9622e
......@@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || {
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
}
# wmake is required for subsequent targets
( cd wmake/src && make )
......
......@@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
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
}
set -x
wmake all utilities
......
......@@ -47,15 +47,19 @@ setenv WM_DIR $WM_PROJECT_DIR/wmake
setenv WM_LINK_LANGUAGE c++
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
# base configuration
# base executables/libraries
setenv FOAM_APPBIN $WM_PROJECT_DIR/bin/$WM_OPTIONS
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
# shared site configuration - similar naming convention as ~OpenFOAM expansion
# external (ThirdParty) libraries
setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
# shared site executables/libraries
# similar naming convention as ~OpenFOAM expansion
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
# user configuration
# user executables/libraries
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/bin/$WM_OPTIONS
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
......@@ -74,8 +78,8 @@ if ( -d "${WM_DIR}" ) setenv PATH ${WM_DIR}:${PATH}
setenv PATH ${WM_PROJECT_DIR}/bin:${PATH}
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
# Make sure to pick up dummy versions of external libraries last
_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_LIBBIN}/dummy
# Make sure to pick up dummy versions of external libraries last
_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_LIBBIN}:${FOAM_LIBBIN}/dummy
# Compiler settings
# ~~~~~~~~~~~~~~~~~
......@@ -264,7 +268,7 @@ case OPENMPI:
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddMan $MPI_ARCH_PATH/man
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
unset mpi_version
breaksw
......@@ -286,7 +290,7 @@ case SYSTEMOPENMPI:
_foamAddLib $libDir
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
unset mpi_version libDir
breaksw
......@@ -299,7 +303,7 @@ case MPICH:
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddMan $MPI_ARCH_PATH/share/man
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
unset mpi_version
breaksw
......@@ -312,7 +316,7 @@ case MPICH-GM:
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddLib $GM_LIB_PATH
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpich-gm
breaksw
case HPMPI:
......@@ -336,22 +340,22 @@ case HPMPI:
breaksw
endsw
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/hpmpi
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/hpmpi
breaksw
case GAMMA:
setenv MPI_ARCH_PATH /usr
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/gamma
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/gamma
breaksw
case MPI:
setenv MPI_ARCH_PATH /opt/mpi
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpi
breaksw
case FJMPI:
setenv MPI_ARCH_PATH /opt/FJSVmpi2
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpi
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
_foamAddLib /opt/FSUNf90/lib/sparcv9
......@@ -390,8 +394,8 @@ endif
# Enable the hoard memory allocator if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#if ( -f $FOAM_LIBBIN/libhoard.so ) then
# setenv LD_PRELOAD $FOAM_LIBBIN/libhoard.so:$LD_PRELOAD
#if ( -f $FOAM_EXT_LIBBIN/libhoard.so ) then
# setenv LD_PRELOAD $FOAM_EXT_LIBBIN/libhoard.so:$LD_PRELOAD
#endif
......
......@@ -70,15 +70,19 @@ export WM_DIR=$WM_PROJECT_DIR/wmake
export WM_LINK_LANGUAGE=c++
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
# base configuration
# base executables/libraries
export FOAM_APPBIN=$WM_PROJECT_DIR/bin/$WM_OPTIONS
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
# shared site configuration - similar naming convention as ~OpenFOAM expansion
# external (ThirdParty) libraries
export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
# shared site executables/libraries
# similar naming convention as ~OpenFOAM expansion
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
# user configuration
# user executables/libraries
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/bin/$WM_OPTIONS
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
......@@ -97,8 +101,8 @@ export FOAM_RUN=$WM_PROJECT_USER_DIR/run
export PATH=$WM_PROJECT_DIR/bin:$PATH
_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
# Make sure to pick up dummy versions of external libraries last
_foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_LIBBIN/dummy
# Make sure to pick up dummy versions of external libraries last
_foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$FOAM_LIBBIN/dummy
# Compiler settings
# ~~~~~~~~~~~~~~~~~
......@@ -284,7 +288,7 @@ OPENMPI)
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddMan $MPI_ARCH_PATH/man
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
unset mpi_version
;;
......@@ -307,7 +311,7 @@ SYSTEMOPENMPI)
_foamAddLib $libDir
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
unset mpi_version libDir
;;
......@@ -320,7 +324,7 @@ MPICH)
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddMan $MPI_ARCH_PATH/share/man
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
unset mpi_version
;;
......@@ -333,7 +337,7 @@ MPICH-GM)
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddLib $GM_LIB_PATH
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpich-gm
;;
HPMPI)
......@@ -358,22 +362,22 @@ HPMPI)
;;
esac
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/hpmpi
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/hpmpi
;;
GAMMA)
export MPI_ARCH_PATH=/usr
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/gamma
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/gamma
;;
MPI)
export MPI_ARCH_PATH=/opt/mpi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpi
;;
FJMPI)
export MPI_ARCH_PATH=/opt/FJSVmpi2
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpi
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
......@@ -383,7 +387,7 @@ FJMPI)
QSMPI)
export MPI_ARCH_PATH=/usr/lib/mpi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/qsmpi
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/qsmpi
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
......@@ -411,9 +415,9 @@ export MPI_BUFFER_SIZE
# Enable the hoard memory allocator if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#if [ -f $FOAM_LIBBIN/libhoard.so ]
#if [ -f $FOAM_EXT_LIBBIN/libhoard.so ]
#then
# export LD_PRELOAD=$FOAM_LIBBIN/libhoard.so:$LD_PRELOAD
# export LD_PRELOAD=$FOAM_EXT_LIBBIN/libhoard.so:$LD_PRELOAD
#fi
......
......@@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
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
}
set -x
# update OpenFOAM version strings if required
......
metisDecomp.C
LIB = $(FOAM_LIBBIN)/libmetisDecomp
LIB = $(FOAM_EXT_LIBBIN)/libmetisDecomp
......@@ -4,5 +4,4 @@ EXE_INC = \
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-lmetis \
-lGKlib
-L$(FOAM_EXT_LIBBIN) -lmetis -lGKlib
scotchDecomp.C
LIB = $(FOAM_LIBBIN)/libscotchDecomp
LIB = $(FOAM_EXT_LIBBIN)/libscotchDecomp
......@@ -4,4 +4,4 @@ EXE_INC = \
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-lscotch -lscotcherrexit -lrt
-L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt
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