Commit da8f0c64 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

Merge branch 'update-master' into 'master'

Update master

Update master to include stable development changes and bugfixes.

See merge request !1
parents e321e17f 5bfb563d
# man gitignore for more information
# editor and misc backup files - anywhere
# Ignore editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# CVS recovered versions - anywhere
.#*
# objects and archives - anywhere
*.[oa]
*.la
*.so
*.jar
# derived files
lex.yy.c
# Corefiles
core
# dependency files - anywhere
*.dep
# lnInclude (symlink) folders - anywhere
lnInclude
# build folders - anywhere
linux*Gcc*/
linux*Icc*/
linuxming*/
SiCortex*Gcc*/
solaris*Gcc*/
SunOS*Gcc*/
# source packages - anywhere
# Ignore source packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Ignore build and platforms folders
build/
platforms/
# ignore the persistent .build tag in the main directory
/.build
# ignore .timeStamp in the main directory
/.timeStamp
# Generated files in the main directory
/*.html
# ignore unpacked sources in the main directory (match pkg-ver)
# Ignore unpacked sources in the main directory (match pkg-ver)
# this also matches symlinks
/*[-_][0-9]*
# ignore all sub-directories
# Ignore all top-level sub-directories
/*/
# do not ignore these ones
# Do not ignore these ones though
!/etc/
# do not ignore the first level of these ones
!/malloc/
/malloc/*/
!/malloc/fbsdmalloc/
# ignore these extra symlinks
libccmio
# track this patched version directly - until metis gets dropped
!/metis-5.0pre2/libmetis/metislib.h
# end-of-file
# End-of-file
......@@ -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.
......@@ -23,7 +23,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# AllClean
# Allclean
#
# Description
# Clean script for third-party applications and libraries
......@@ -39,24 +39,115 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
# . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
Script=${0##*/}
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: $Script [OPTION] [<platform> [ ... <platformN> ]]
options:
-all remove all platforms directories.
-current clean the current platform ($WM_OPTIONS).
-help print the usage
# clean various packages via 'distclean'
for i in openmpi-*
Cleanup intermediate build directories.
Optionally remove specified platform(s) from the ThirdParty platforms
directory $WM_THIRD_PARTY_DIR/platforms
USAGE
exit 1
}
# Print help message
if [ "$1" = "-h" -o "$1" = "-help" ]; then
usage
fi
#------------------------------------------------------------------------------
# Clean various packages via 'distclean'
for i in openmpi-* ADIOS-*
do
[ -d "$i" ] && ( set -x; cd $i && make distclean )
[ -d "$i" ] && (
echo
echo "${i%/*}"
echo " make distclean"
echo
cd $i && make distclean
)
done
# clean various packages via 'realclean'
# Clean various packages via 'realclean'
for i in scotch*/src
do
[ -d "$i" ] && ( set -x; cd $i && make realclean )
[ -d "$i" ] && (
echo
echo "${i%/*}"
echo " make realclean"
echo
cd $i && make realclean
)
done
# clean out-of-source build directories
[ -d platforms ] && ( set -x; rm -rf platforms/* )
# Clean out-of-source build directories
if [ -d build ]
then
echo
echo "Clean build/ directory"
rm -rf build/*
fi
# -----------------------------------------------------------------------------
#
# Clean platforms directories
#
if [ "$#" -ge 1 ]
then
echo
echo "Clean platforms/sub-directories"
fi
# ----------------------------------------------------------------- end-of-file
removePlatform()
{
local platform="$1"
if [ -n "$platform" -a -d "platforms/$platform" ]
then
echo
echo "Cleaning platform '$platform'"
\rm -rf "platforms/$platform"
else
echo
echo "Platform '$platform' not built"
fi
}
# Optionally cleanup platforms specified from the arguments
while [ "$#" -ge 1 ]
do
case "$1" in
-all)
echo
echo "Removing all platforms/sub-directories"
echo
\rm -rf platforms/*
break
;;
-current)
echo "Current platform '$WM_OPTIONS'"
removePlatform "$WM_OPTIONS"
;;
*)
removePlatform "$1"
;;
esac
shift
done
#------------------------------------------------------------------------------
......@@ -3,8 +3,8 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
# \\/ M anipulation |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
......@@ -56,12 +56,12 @@ echo
echo ========================================
echo Start ThirdParty Allwmake
echo ========================================
echo
echo
echo ========================================
echo Build MPI libraries if required
echo
echo " $MPI_ARCH_PATH"
case "$WM_MPLIB" in
OPENMPI)
if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ]
......@@ -74,24 +74,34 @@ OPENMPI)
echo
else
(
set -x
cd "${MPI_ARCH_PATH##*/}" || exit 1 # change to openmpi-VERSION
# configuration options:
# Start with GridEngine support - builds without external libraries
configOpt="--with-sge"
make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH
# Add InfiniBand support
ibDir=/usr/local/ofed
ibLib=$infbDIR/lib${WM_COMPILER_LIB_ARCH}
if [ -d "$ibDir" -a -d "$ibLib" ]
then
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
fi
# start with GridEngine support,
# it can be built without external libraries
configOpt="--with-sge"
# end of configuration options
# ----------------------------
mpiPACKAGE="${MPI_ARCH_PATH##*/}"
sourceDIR=$WM_THIRD_PARTY_DIR/$mpiPACKAGE
buildDIR=$buildBASE/$mpiPACKAGE
# Infiniband support
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# configOpt="$configOpt --with-openib=/usr/local/ofed"
# configOpt="$configOpt --with-openib-libdir=/usr/local/ofed/lib64"
# fi
cd $sourceDIR || exit 1
[ -e Makefile ] && make distclean 2>/dev/null
./configure \
rm -rf $MPI_ARCH_PATH
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
set -x
$sourceDIR/configure \
--prefix=$MPI_ARCH_PATH \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
......@@ -99,11 +109,13 @@ OPENMPI)
--enable-mpi-fortran=none \
--disable-mpi-profile \
$configOpt \
;
make -j $WM_NCOMPPROCS && make install
make distclean
)
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $mpiPACKAGE"
) || {
echo "Error building: $mpiPACKAGE"
exit 1
}
fi
;;
......@@ -112,19 +124,20 @@ MPICH)
then
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
echo
echo
elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ]
then
echo " have $WM_MPLIB static library ($FOAM_MPI)"
echo
else
(
# WARNING: unmaintained build code:
# ---------------------------------
set -x
cd $MPI_HOME || exit 1 # change to mpich-VERSION
make distclean 2>/dev/null
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH
rm util/machines/machines.*
rm -rf util/machines/machines.*
./configure \
--prefix=$MPI_ARCH_PATH \
......@@ -172,23 +185,26 @@ MPICH)
esac
#------------------------------------------------------------------------------
# building scotch is still a bit of a pain
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
then
. $settings
else
echo
echo "Error: no config/scotch.sh settings"
echo "Error: no config.sh/scotch settings"
echo
fi
# building scotch is still a bit of a pain
echo
echo ========================================
echo "Build Scotch decomposition library $SCOTCH_VERSION"
echo " $SCOTCH_ARCH_PATH"
# this needs generalizing
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-$WM_ARCH_OPTION$WM_LABEL_OPTION
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
......@@ -196,11 +212,11 @@ if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
then
echo " scotch header in $SCOTCH_ARCH_PATH/include"
echo " scotch libs in $FOAM_EXT_LIBBIN"
echo
else
elif [ -d "$SCOTCH_VERSION" ]
then
(
set -x
cd $SCOTCH_VERSION/src || exit 1
applyPatch $SCOTCH_VERSION .. # patch at parent-level
prefixDIR=$SCOTCH_ARCH_PATH
libDIR=$FOAM_EXT_LIBBIN
......@@ -233,23 +249,24 @@ else
# cleanup, could also remove Makefile.inc
make realclean 2>/dev/null
)
else
echo " Optional component (SCOTCH) was not found"
fi
# verify existence of scotch include
[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || {
echo
echo " WARNING: required include file 'scotch.h' not found!"
# build ptscotch if MPI (ThirdParty or system) is available
# and there is a scotch include available (ie, normal scotch was built)
if [ "${FOAM_MPI:-dummy}" != dummy ] && \
[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || \
{
echo
echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!"
false
}
# build ptscotch if MPI (ThirdParty or system) is available
if [ "${FOAM_MPI:-dummy}" != dummy ]
then
echo
echo ========================================
echo "Build PTScotch decomposition library $SCOTCH_VERSION (uses MPI)"
echo "Build pt-scotch decomposition library $SCOTCH_VERSION (with $FOAM_MPI)"
echo " $SCOTCH_ARCH_PATH"
echo
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \
......@@ -257,9 +274,9 @@ then
then
echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
echo
else
(
echo
set -x
cd $SCOTCH_VERSION/src || exit 1
......@@ -301,19 +318,19 @@ then
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
echo
echo " WARNING: required include file 'ptscotch.h' not found!"
echo
}
fi
# -----------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Metis is optional
echo
echo ========================================
echo Build Metis decomposition
# get METIS_VERSION, METIS_ARCH_PATH
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh`
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
then
. $settings
fi
......@@ -330,39 +347,105 @@ then
(
set -x
cd $METIS_VERSION || exit 1
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 '$FLOAT_PRECISION'=' \
include/metis.h
make config shared=1 prefix=$METIS_ARCH_PATH
make -j $WM_NCOMPPROCS install
cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
)
fi
else
echo " optional component Metis was not found"
echo " Optional component (METIS) was not found"
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 ========================================
echo Build CGAL
if [ -n "$CGAL_ARCH_PATH" ]
if [ -d "$CGAL_ARCH_PATH/include" \
-a -r "$CGAL_ARCH_PATH/lib/libCGAL.so" ]
then
(
if [ -r $CGAL_ARCH_PATH/lib/libCGAL.so ]
# first some information about boost
if [ -d "$BOOST_ARCH_PATH/include/boost" \
-a -r "$BOOST_ARCH_PATH/lib/libboost_system.so" ]
then
echo " CGAL headers in $CGAL_ARCH_PATH/include"
echo " CGAL libs in $CGAL_ARCH_PATH/lib"
else
./makeCGAL
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
)
echo " CGAL headers in $CGAL_ARCH_PATH/include"
echo " CGAL libs in $CGAL_ARCH_PATH/lib"
elif [ -n "$CGAL_ARCH_PATH" ]
then
./makeCGAL || warnBuildIssues CGAL
else
echo " optional component was not found"
warnNotFound CGAL
fi
# FFTW is optional
echo
echo ========================================
echo Build FFTW
if [ -d "$FFTW_ARCH_PATH/include" \
-a -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
then
echo " FFTW headers in $FFTW_ARCH_PATH/include"
echo " FFTW libs in $FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
elif [ -n "$FFTW_ARCH_PATH" ]
then
./makeFFTW || warnBuildIssues FFTW
else
warnNotFound FFTW
fi
#------------------------------------------------------------------------------
echo
echo ========================================
echo Done ThirdParty Allwmake
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>OpenFOAM-3.0.x Third-Party packages</title>
<!-- 2015-11-03 Tue 17:54 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center; }
.todo { font-family: monospace; color: red; }
.done { color: green; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.right { margin-left: auto; margin-right: 0px; text-align: right; }
.left { margin-left: 0px; margin-right: auto; text-align: left; }
.center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.right { text-align: center; }
th.left { text-align: center; }
th.center { text-align: center; }
td.right { text-align: right; }
td.left { text-align: left; }
td.center { text-align: center; }
dt { font-weight: bold; }
.footpara:nth-child(2) { display: inline; }
.footpara { display: block; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }