Merge remote-tracking branch 'origin/nextRelease' into nr/feature/changeGlobalControlDictParamsFromCmdLine

This commit is contained in:
Martin Beaudoin 2014-05-28 01:21:37 -04:00
commit 705a5bc7c9
47 changed files with 476 additions and 323 deletions

View file

@ -141,10 +141,7 @@ Contents:
* New features in foam-extend-3.0 * New features in foam-extend-3.0
The list of features is a result of the work of numerous contributors. The The list of features is a result of the work of numerous contributors. The
maintainers of foam-extend would formally like to thank them all. Features maintainers of foam-extend would formally like to thank them all.
listed below have are new with regard to OpenFOAM-1.6-ext. For a list of
extension features in OpenFOAM-1.6-ext, please refer to file
"ReleaseNotes-1.6-ext".
** Core library ** Core library

View file

@ -55,12 +55,12 @@ echo "Starting ThirdParty AllMake: Stage5 "
echo "========================================" echo "========================================"
echo echo
# swak4Foam - Version 0.3.0 # swak4Foam - Version 0.3.1
# In fact, we are basically tracking the head branch from the Mercurial repository # In fact, we are basically tracking the head branch from the Mercurial repository
# which is also replicated under the Breeder_2.0 section of the Subversion repository # which is also replicated under the Breeder_2.0 section of the Subversion repository
# #
SWAK_RELEASE_VERSION=0.3.0 SWAK_RELEASE_VERSION=0.3.1
if [ -z "$SWAK4FOAM_SYSTEM" ] if [ -z "$SWAK4FOAM_SYSTEM" ]
then then

View file

@ -170,7 +170,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
vectorField n = patch().nf(); vectorField n = patch().nf();
const fvPatchField<tensor>& gradU = const fvPatchTensorField& gradU =
patch().lookupPatchField<volTensorField, tensor>("grad(U)"); patch().lookupPatchField<volTensorField, tensor>("grad(U)");
gradient() = gradient() =
@ -188,7 +188,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
dimensionedScalar alpha(thermalProperties.lookup("alpha")); dimensionedScalar alpha(thermalProperties.lookup("alpha"));
dimensionedScalar threeKalpha = threeK*alpha; dimensionedScalar threeKalpha = threeK*alpha;
const fvPatchField<scalar>& T = const fvPatchScalarField& T =
patch().lookupPatchField<volScalarField, scalar>("T"); patch().lookupPatchField<volScalarField, scalar>("T");
gradient() += n*threeKalpha.value()*T/(2.0*mu + lambda).value(); gradient() += n*threeKalpha.value()*T/(2.0*mu + lambda).value();

View file

@ -1,14 +1,14 @@
if(divSigmaExpMethod == "standard") if(divSigmaExpMethod == "standard")
{ {
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (
mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU, mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU,
"div(sigma)" "div(sigma)"
) )
- gradThreeKalphaDeltaT; - gradThreeKalphaDeltaT;
} }
else if(divSigmaExpMethod == "surface") else if(divSigmaExpMethod == "surface")
{ {
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (
muf*(mesh.Sf() & fvc::interpolate(gradU.T())) muf*(mesh.Sf() & fvc::interpolate(gradU.T()))
@ -16,27 +16,27 @@ if(divSigmaExpMethod == "standard")
- (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradU)) - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradU))
- threeKalphaDeltaTf - threeKalphaDeltaTf
); );
} }
else if(divSigmaExpMethod == "decompose") else if(divSigmaExpMethod == "decompose")
{ {
snGradU = fvc::snGrad(U); snGradU = fvc::snGrad(U);
surfaceTensorField shearGradU = surfaceTensorField shearGradU =
((I - n*n)&fvc::interpolate(gradU)); ((I - n*n)&fvc::interpolate(gradU));
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (
( (
mesh.magSf() mesh.magSf()*
*( (
- (muf + lambdaf)*(snGradU&(I - n*n)) - (muf + lambdaf)*(snGradU & (I - n*n))
+ lambdaf*tr(shearGradU&(I - n*n))*n + lambdaf*tr(shearGradU & (I - n*n))*n
+ muf*(shearGradU&n) + muf*(shearGradU & n)
) )
) )
- threeKalphaDeltaTf - threeKalphaDeltaTf
); );
} }
/* else if(divSigmaExpMethod == "expLaplacian") /* else if(divSigmaExpMethod == "expLaplacian")
{ {
divSigmaExp = divSigmaExp =
@ -48,7 +48,8 @@ if(divSigmaExpMethod == "standard")
"div(sigma)" "div(sigma)"
); );
}*/ }*/
else else
{ {
FatalError << "divSigmaExp method " << divSigmaExpMethod << " not found!" << endl; FatalErrorIn(args.executable())
} << "divSigmaExp method " << divSigmaExpMethod << " not found!" << endl;
}

View file

@ -1,24 +1,24 @@
#if defined(linux64) #if defined(linux64)
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
#elif defined(darwinIntel) || defined(darwinIntel64) || defined(darwinPpc) || defined(darwinPpc64) #elif defined(darwinIntel) || defined(darwinIntel64) || defined(darwinPpc) || defined(darwinPpc64)
TECIO_FLAGS = -DMAKEARCHIVE -DDARWIN -DUSEENUM -DTHREED -U_WIN32 TECIO_FLAGS = -DMAKEARCHIVE -DDARWIN -DUSEENUM -DTHREED -U_WIN32 -DENGINE
#elif defined(linuxIA64) #elif defined(linuxIA64)
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUXI64 -DUSEENUM -DTHREED -U_WIN32 TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUXI64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
#elif defined(linux) #elif defined(linux)
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
#elif defined(darwinIntel) #elif defined(darwinIntel)
# warning "DarwinIntel architecture detected" # warning "DarwinIntel architecture detected"
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
#else #else

View file

@ -4,27 +4,46 @@ import sys
filename=sys.argv[1] filename=sys.argv[1]
address=sys.argv[2] address=sys.argv[2]
import re import re
from os import environ,path
import subprocess fullFile=None
if path.exists(filename):
fullFile=filename
p = subprocess.Popen("gdb -batch -x /dev/stdin", for v in ["PATH","LD_LIBRARY_PATH"]:
shell=True, if not fullFile:
bufsize=0, for d in environ[v].split(':'):
stdin=subprocess.PIPE, if path.exists(path.join(d,filename)):
stdout=subprocess.PIPE, fullFile=path.join(d,filename)
close_fds=True) break
(child_stdin, child_stdout) = (p.stdin, p.stdout) if not fullFile:
child_stdin.write("set sharedlibrary preload-libraries no\n") fullFile=filename
child_stdin.write("file "+filename+"\n")
child_stdin.write("info line *"+address+"\n")
result=child_stdout.readline()
answer="??:0" answer="??:0"
match=re.compile('Line (.+) of "(.+)" starts at').match(result) if path.exists(fullFile):
if match: import subprocess
answer=match.group(2)+":"+match.group(1)
result=subprocess.Popen(["xcrun", "atos",
"-o",fullFile,
address],
stdout=subprocess.PIPE
).communicate()[0]
match=re.compile('.+ \((.+)\) \((.+)\)').match(result)
if match:
answer=match.group(2)+" "+match.group(1)
else:
import os
result=subprocess.Popen(["xcrun", "atos",
"-p",str(os.getppid()),
address],
stdout=subprocess.PIPE
).communicate()[0]
match=re.compile('.+ \((.+)\) \((.+)\)').match(result)
if match:
answer=match.group(2)+" "+match.group(1)
print answer, print answer,
sys.exit(255) sys.exit(255)

View file

@ -25,7 +25,7 @@ http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/
sudo yum groupinstall "Development Tools" sudo yum groupinstall "Development Tools"
sudo yum install gcc-c++ binutils-devel bison flex m4 zlib-devel \ sudo yum install gcc-c++ binutils-devel bison flex m4 zlib-devel \
qt-devel qtwebkit-devel mercurial qt-devel qtwebkit-devel mercurial graphviz
* Set environment variables: * Set environment variables:

View file

@ -24,7 +24,8 @@ http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/
* Install required packages: * Install required packages:
sudo apt-get install git-core build-essential binutils-dev flex bison \ sudo apt-get install git-core build-essential binutils-dev flex bison \
zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev libxt-dev rpm mercurial zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev libxt-dev rpm \
mercurial graphviz
Make an additional link: Make an additional link:

View file

@ -0,0 +1,59 @@
Below are build instructions for Ubuntu 14.04.
These instructions assume that you install in the default location, which is
~/foam/ . Create this folder with:
cd ~
mkdir foam
* Obtain and unpack source code (if you read this, you probably already have):
The recommended way is to get the source code through git source code
management system. This way, you can get updates and bugfixes easily by running
"git pull". To install into the default location run:
cd ~/foam
git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0
Alternatively, you can download a snapshot (.tgz) of the source code from:
http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/
* Install required packages:
sudo apt-get install git-core build-essential binutils-dev flex bison \
zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev libiberty-dev \
libxt-dev rpm mercurial graphviz
Make an additional link:
sudo ln -s /usr/bin/make /usr/bin/gmake
* Set environment variables:
cd ~/foam/foam-extend-3.0
. etc/bashrc
Optionally, set environment variable for Qt to compile ParaView:
export QT_BIN_DIR=/usr/bin
Optionally, set environment variable for compiling Cuda solvers, for example
(replace "sm_30" with value according to your GPU architecture):
export CUDA_ARCH=sm_30
* Compile:
./Allwmake.firstInstall
* Create user directory:
mkdir -p $FOAM_RUN
And you are ready to start.

View file

@ -225,9 +225,6 @@ Darwin)
# this makes certain things easier # this makes certain things easier
export WM_ARCH_BASE=darwin export WM_ARCH_BASE=darwin
# Remove limit of open files
ulimit -n 1000
case `uname -p` in case `uname -p` in
powerpc) powerpc)
export WM_ARCH=darwinPpc export WM_ARCH=darwinPpc
@ -258,109 +255,113 @@ Darwin)
;; ;;
esac esac
# Make sure that binaries use the best features of the used OS-Version
# We need to get rid of the revision number from this string. eg turn "10.7.5" into "10.7"
export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion | sed -e "s/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2/g"`
which -s port >/dev/null which -s port >/dev/null
if [ $? -eq "0" -a -d '/opt/local/etc/macports' ] if [ $? -eq "0" -a -d '/opt/local/etc/macports' ]
then then
if [ "$FOAM_VERBOSE" -a "$PS1" ] if [ "$FOAM_VERBOSE" -a "$PS1" ]
then then
echo "Using Macports binaries" echo "Using Macports binaries"
fi fi
export WM_USE_MACPORT=1 export WM_USE_MACPORT=1
export WM_BASE_COMPILER=`echo $WM_COMPILER | tr -d "[:digit:]"`
export WM_MACPORT_MPI_VERSION=`echo $WM_COMPILER | tr "[:upper:]" "[:lower:]"`
export WM_MACPORT_VERSION=`echo $WM_MACPORT_MPI_VERSION | tr -d "[:alpha:]" | sed -e "s/\(.\)\(.\)/\1\.\2/"`
if [ -e '/opt/local/bin/openmpicc' ] if [ -z "$WM_CHOSEN_MAC_MPI" ]
then then
export WM_MPLIB=MACPORTOPENMPI if [ -e '/opt/local/bin/mpicc' ]
else then
if [ -z "$WM_CHOSEN_MAC_MPI" ] readlink /opt/local/bin/mpicc | grep openmpi >/dev/null
then if [ $? -eq "0" ]
echo "WM_CHOSEN_MAC_MPI unset. Using OPENMPI" then
export WM_MPLIB=OPENMPI export WM_MPLIB=MACPORTOPENMPI
else if [ "$FOAM_VERBOSE" -a "$PS1" ]
export WM_MPLIB=$WM_CHOSEN_MAC_MPI then
fi echo "Using OpenMPI from MacPorts"
fi fi
else
readlink /opt/local/bin/mpicc | grep mpich >/dev/null
if [ $? -eq "0" ]
then
export WM_MPLIB=MACPORTMPICH
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using MPICH from MacPorts"
fi
else
echo "/opt/local/bin/mpicc neither OpenMPI nor MPICH. Confused. Defaulting to OPENMPI"
export WM_MPLIB=OPENMPI
fi
fi
fi
else
export WM_MPLIB=$WM_CHOSEN_MAC_MPI
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "User chose WM_CHOSEN_MAC_MPI=$WM_CHOSEN_MAC_MPI"
fi
fi
if [ "$compilerInstall" == "System" ] if [ "$WM_MPLIB" == "MACPORTOPENMPI" ]
then then
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2 if [ ! -e "/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION" ]
case $WM_COMPILER in then
Gcc42) export WM_MACPORT_MPI_VERSION=mp
export WM_MACPORT_VERSION=4.2 if [ ! -e "/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION" ]
export WM_BASE_COMPILER=Gcc then
;; echo "Proper OpenMPI not installed. Either do 'port install openmpi-$WM_MACPORT_MPI_VERSION' or 'port install openmpi-default'"
Gcc43) fi
export WM_MACPORT_VERSION=4.3 fi
export WM_BASE_COMPILER=Gcc else
;; if [ "$WM_MPLIB" == "MACPORTMPICH" ]
Gcc44) then
export WM_MACPORT_VERSION=4.4 if [ ! -e "/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION" ]
export WM_BASE_COMPILER=Gcc then
;; echo "MPICH wants the same version as the used compiler. Do 'port install mpich-$WM_MACPORT_MPI_VERSION'"
Gcc45) fi
export WM_MACPORT_VERSION=4.5 fi
export WM_BASE_COMPILER=Gcc fi
;;
Gcc46)
export WM_MACPORT_VERSION=4.6
export WM_BASE_COMPILER=Gcc
;;
Gcc47)
export WM_MACPORT_VERSION=4.7
export WM_BASE_COMPILER=Gcc
;;
Gcc48)
export WM_MACPORT_VERSION=4.8
export WM_BASE_COMPILER=Gcc
;;
Clang32)
export WM_BASE_COMPILER=Clang
export WM_MACPORT_VERSION=3.2
;;
Clang33)
export WM_BASE_COMPILER=Clang
export WM_MACPORT_VERSION=3.3
;;
Clang34)
export WM_BASE_COMPILER=Clang
export WM_MACPORT_VERSION=3.4
;;
Gcc)
;;
*)
echo "Unsupported MacPorts-Compiler $WM_COMPILER"
;;
esac
if [ "$WM_MACPORT_VERSION" != "" ]
then
if [ "$WM_BASE_COMPILER" == "Gcc" ]
then
export WM_CC="gcc-mp-$WM_MACPORT_VERSION"
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
export WM_FC="gfortran-mp-$WM_MACPORT_VERSION"
else
export WM_CC="clang-mp-$WM_MACPORT_VERSION"
export WM_CXX="clang++-mp-$WM_MACPORT_VERSION"
# hardcoded. Needed for ThirdParty if [ "$WM_COMPILER" != "Gcc" ]
export WM_FC="gfortran-mp-4.5" then
fi if [ "$WM_BASE_COMPILER" == "Gcc" ]
then
export WM_CC="gcc-mp-$WM_MACPORT_VERSION"
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
elif [ "$WM_BASE_COMPILER" == "Clang" ]
then
export WM_CC="clang-mp-$WM_MACPORT_VERSION"
export WM_CXX="clang++-mp-$WM_MACPORT_VERSION"
elif [ "$WM_BASE_COMPILER" == "Dragonegg" ]
then
export WM_CC="dragonegg-$WM_MACPORT_VERSION-gcc"
export WM_CXX="dragonegg-$WM_MACPORT_VERSION-g++"
else
echo "Unknown base compiler $WM_BASE_COMPILER"
fi
ruleDirBase=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH$WM_BASE_COMPILER ruleDirBase=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH
ruleDir=$WM_PROJECT_DIR/wmake/rules/$WM_ARCH$WM_COMPILER ruleDirTarget=$ruleDirBase$WM_BASE_COMPILER
if [ ! -e $ruleDir ] ruleDir=$ruleDirBase$WM_COMPILER
then if [ ! -e $ruleDir ]
echo "Rule directory $ruleDir not existing. Linking to $ruleDirBase" then
ln -s $ruleDirBase $ruleDir echo "Rule directory $ruleDir not existing. Linking to $ruleDirTarget"
fi ln -s $ruleDirTarget $ruleDir
unset ruleDir ruleDirBase fi
fi unset ruleDir ruleDirBase
fi fi
else
echo "Seems you're not using MacPorts. This is currently not supported/tested. Find this line in 'etc/config/settings.sh', modify it accordingly and send patches to Bernhard"
export WM_COMPILER=
export WM_MPLIB=OPENMPI
fi fi
# Make sure that binaries use the best features of the used OS-Version
# We need to get rid of the revision number from this string. eg turn "10.7.5" into "10.7"
# v=(`sw_vers -productVersion | sed 's/\./ /g'`)
# export MACOSX_DEPLOYMENT_TARGET="${v[1]}.${v[2]}"
export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion | sed -e "s/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2/g"`
;; ;;
SunOS) SunOS)
@ -438,6 +439,14 @@ then
export LD_PRELOAD export LD_PRELOAD
fi fi
if [[ `uname -s` == "Darwin" ]]
then
if [[ `ulimit -n` == "unlimited" || `ulimit -n` < 8192 ]]
then
# higher limit needed for wmkdeps
ulimit -n 8192
fi
fi
# cleanup environment: # cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~

View file

@ -237,20 +237,30 @@ OPENMPI)
;; ;;
MACPORTOPENMPI) MACPORTOPENMPI)
unset OPAL_PREFIX unset OPAL_PREFIX
export FOAM_MPI=openmpi-macport export FOAM_MPI=openmpi-macport-$WM_MACPORT_MPI_VERSION
libDir=`openmpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi # Currently not correctly working on MacPorts
# include files and libraries. # libDir=`mpicc-openmpi-$WM_MACPORT_MPI_VERSION --showme:libdirs`
export MPI_ARCH_PATH="${libDir%/*}" libDir=/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
_foamAddLib $libDir
unset libDir
;;
_foamAddLib $libDir MACPORTMPICH)
unset libDir export FOAM_MPI=mpich-macports-$WM_MACPORT_MPI_VERSION
;; export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
libDir=/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION
_foamAddLib $libDir
unset libDir
;;
SYSTEMOPENMPI) SYSTEMOPENMPI)
mpi_version=openmpi-system mpi_version=openmpi-system

View file

@ -31,10 +31,13 @@ License
#include "readHexLabel.H" #include "readHexLabel.H"
#include <cxxabi.h> #include <cxxabi.h>
#ifndef darwin
#include <execinfo.h> #include <execinfo.h>
#endif
#include <dlfcn.h> #include <dlfcn.h>
#include <string.h>
#ifdef darwin
#include <mach-o/dyld.h>
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -126,14 +129,17 @@ void printSourceFileAndLine
myAddress = nStream.str(); myAddress = nStream.str();
} }
#ifndef darwin
if (filename[0] == '/') if (filename[0] == '/')
#else
if (1)
#endif
{ {
string line = pOpen string line = pOpen
( (
#ifndef darwin #ifndef darwin
"addr2line -f --demangle=auto --exe " "addr2line -f --demangle=auto --exe "
#else #else
// "gaddr2line -f --inline --demangle=auto --exe "
"addr2line4Mac.py " "addr2line4Mac.py "
#endif #endif
+ filename + filename
@ -144,119 +150,22 @@ void printSourceFileAndLine
if (line == "") if (line == "")
{ {
os << " addr2line failed"; os << " addr2line failed";
} }
else if (line == "??:0") else if (line == "??:0")
{ {
os << " in " << filename; os << " in " << filename;
} }
else else
{ {
string cwdLine(line.replaceAll(cwd() + '/', "")); string cwdLine(line.replaceAll(cwd() + '/', ""));
string homeLine(cwdLine.replaceAll(home(), '~')); string homeLine(cwdLine.replaceAll(home(), '~'));
os << " at " << homeLine.c_str(); os << " at " << homeLine.c_str();
} }
} }
} }
#ifdef darwin
// Trying to emulate the original backtrace and backtrace_symbol from the glibc
// After an idea published by Rush Manbert at http://lists.apple.com/archives/xcode-users/2006/Apr/msg00528.html
template<int level>
void *getStackAddress()
{
const unsigned int stackLevel=level;
return (
__builtin_frame_address(level)
? __builtin_return_address(stackLevel)
: (void *)0
);
};
#define GET_STACK_ADDRESS(lvl) \
case lvl: {return getStackAddress<lvl>(); break; }
// please don't laugh. For some reason this is necessary (the compiler won't accept it otherwise)
void *getStackAddress(int level)
{
switch(level) {
GET_STACK_ADDRESS(0);
GET_STACK_ADDRESS(1);
GET_STACK_ADDRESS(2);
GET_STACK_ADDRESS(3);
GET_STACK_ADDRESS(4);
GET_STACK_ADDRESS(5);
GET_STACK_ADDRESS(6);
GET_STACK_ADDRESS(7);
GET_STACK_ADDRESS(8);
GET_STACK_ADDRESS(9);
GET_STACK_ADDRESS(10);
GET_STACK_ADDRESS(11);
GET_STACK_ADDRESS(12);
GET_STACK_ADDRESS(13);
GET_STACK_ADDRESS(14);
GET_STACK_ADDRESS(15);
GET_STACK_ADDRESS(16);
GET_STACK_ADDRESS(17);
GET_STACK_ADDRESS(18);
GET_STACK_ADDRESS(19);
GET_STACK_ADDRESS(20);
GET_STACK_ADDRESS(21);
default:
return (void *)0;
break;
}
}
unsigned backtrace(void **bt, unsigned maxAddrs)
{
unsigned valid=0;
bool ok=true;
for(int level=0;level<maxAddrs;level++) {
if(ok) {
bt[level]=getStackAddress(level);
if(bt[level]!=(void *)0) {
valid=level;
} else {
ok=false;
}
} else {
bt[level]=(void *)0;
}
}
return valid;
}
// This function is a potential memory leak. But I don't care because the program is terminating anyway
char **backtrace_symbols(void **bt,unsigned nr)
{
char **strings=(char **)malloc(sizeof(char *)*nr);
for(unsigned i=0;i<nr;i++) {
Dl_info info;
int result=dladdr(bt[i],&info);
char tmp[1000];
#ifdef darwinIntel64
sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned long)bt[i]-(unsigned long)info.dli_saddr),bt[i]);
#else
sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned int)bt[i]-(unsigned int)info.dli_saddr),bt[i]);
#endif
strings[i]=(char *)malloc(strlen(tmp)+1);
strcpy(strings[i],tmp);
}
return strings;
}
#endif
void getSymbolForRaw void getSymbolForRaw
( (
@ -273,7 +182,6 @@ void getSymbolForRaw
#ifndef darwin #ifndef darwin
"addr2line -f --demangle=auto --exe " "addr2line -f --demangle=auto --exe "
#else #else
// "gaddr2line -f --inline --demangle=auto --exe "
"addr2line4Mac.py " "addr2line4Mac.py "
#endif #endif
+ filename + filename
@ -283,11 +191,11 @@ void getSymbolForRaw
if (fcnt != "") if (fcnt != "")
{ {
os << fcnt.c_str(); os << fcnt.c_str();
return; return;
} }
} }
os << "Uninterpreted: " << raw.c_str(); os << "Uninterpreted: " << raw.c_str();
} }
void error::printStack(Ostream& os) void error::printStack(Ostream& os)
@ -308,7 +216,7 @@ void error::printStack(Ostream& os)
{ {
IFstream is("/proc/" + name(pid()) + "/maps"); IFstream is("/proc/" + name(pid()) + "/maps");
while(is.good()) while (is.good())
{ {
string line; string line;
is.getLine(line); is.getLine(line);
@ -340,13 +248,14 @@ void error::printStack(Ostream& os)
fileName programFile; fileName programFile;
word address; word address;
os << '#' << label(i) << " "; os << '#' << label(i) << " ";
//os << "Raw : " << msg << "\n\t"; //os << "Raw : " << msg << "\n\t";
#ifndef darwin
{ {
string::size_type lPos = msg.find('['); string::size_type lPos = msg.find('[');
string::size_type rPos = msg.find(']'); string::size_type rPos = msg.find(']');
if (lPos != string::npos && rPos != string::npos && lPos<rPos) if (lPos != string::npos && rPos != string::npos && lPos < rPos)
{ {
address = msg.substr(lPos+1, rPos-lPos-1); address = msg.substr(lPos+1, rPos-lPos-1);
msg = msg.substr(0, lPos); msg = msg.substr(0, lPos);
@ -371,7 +280,38 @@ void error::printStack(Ostream& os)
} }
string::size_type bracketPos = msg.find('('); string::size_type bracketPos = msg.find('(');
#else
string::size_type counter=0;
while(msg[counter]!=' ') {
counter++;
}
while(msg[counter]==' ') {
counter++;
}
string::size_type fileStart=counter;
while(msg[counter]!=' ') {
counter++;
}
programFile = msg.substr(fileStart,counter-fileStart);
if(programFile=="???") {
char path[1024];
uint32_t size = sizeof(path);
if (_NSGetExecutablePath(path, &size) == 0) {
programFile=path;
} else {
programFile="unknownFile";
}
}
while(msg[counter]==' ') {
counter++;
}
string::size_type addrStart=counter;
while(msg[counter]!=' ') {
counter++;
}
address = msg.substr(addrStart,counter-addrStart);
#endif
#ifndef darwin
if (bracketPos != string::npos) if (bracketPos != string::npos)
{ {
string::size_type start = bracketPos+1; string::size_type start = bracketPos+1;
@ -381,7 +321,21 @@ void error::printStack(Ostream& os)
if (plusPos != string::npos) if (plusPos != string::npos)
{ {
string cName(msg.substr(start, plusPos-start)); string cName(msg.substr(start, plusPos-start));
#else
if(1){
while(msg[counter]==' ') {
counter++;
}
string::size_type nameStart=counter;
while(msg[counter]!=' ') {
counter++;
}
string::size_type start = counter;
if(1) {
string cName(msg.substr(nameStart,counter-nameStart));
#endif
int status; int status;
char* cplusNamePtr = abi::__cxa_demangle char* cplusNamePtr = abi::__cxa_demangle
( (
@ -393,12 +347,12 @@ void error::printStack(Ostream& os)
if (status == 0 && cplusNamePtr) if (status == 0 && cplusNamePtr)
{ {
os << cplusNamePtr; os << cplusNamePtr;
free(cplusNamePtr); free(cplusNamePtr);
} }
else else
{ {
os << cName.c_str(); os << cName.c_str();
} }
} }
else else
@ -409,7 +363,7 @@ void error::printStack(Ostream& os)
{ {
string fullName(msg.substr(start, endBracketPos-start)); string fullName(msg.substr(start, endBracketPos-start));
os << fullName.c_str() << nl; os << fullName.c_str() << nl;
} }
else else
{ {
@ -426,7 +380,7 @@ void error::printStack(Ostream& os)
printSourceFileAndLine(os, addressMap, programFile, address); printSourceFileAndLine(os, addressMap, programFile, address);
os << nl; os << nl;
} }
free(strings); free(strings);

View file

@ -73,8 +73,8 @@ Foam::label Foam::metisDecomp::decompose
METIS_SetDefaultOptions(options); METIS_SetDefaultOptions(options);
// processor weights initialised with no size, only used if specified in // processor weights initialised with no size, only used if specified in
// a file // a file - use the data type that metis expects here
Field<floatScalar> processorWeights; Field<real_t> processorWeights;
// cell weights (so on the vertices of the dual) // cell weights (so on the vertices of the dual)
List<int> cellWeights; List<int> cellWeights;

View file

@ -100,8 +100,8 @@ Foam::label Foam::parMetisDecomp::decompose
} }
cellOffsets[Pstream::nProcs()] = nGlobalCells; cellOffsets[Pstream::nProcs()] = nGlobalCells;
// Convert pointField into float // Convert pointField into the data type parMetis expects (float or double)
Field<floatScalar> xyz(3*cellCentres.size()); Field<real_t> xyz(3*cellCentres.size());
int compI = 0; int compI = 0;
forAll(cellCentres, cellI) forAll(cellCentres, cellI)
{ {
@ -139,7 +139,7 @@ Foam::label Foam::parMetisDecomp::decompose
Field<int> prevXadj(fromPrevProc); Field<int> prevXadj(fromPrevProc);
Field<int> prevAdjncy(fromPrevProc); Field<int> prevAdjncy(fromPrevProc);
Field<floatScalar> prevXyz(fromPrevProc); Field<real_t> prevXyz(fromPrevProc);
Field<int> prevCellWeights(fromPrevProc); Field<int> prevCellWeights(fromPrevProc);
Field<int> prevFaceWeights(fromPrevProc); Field<int> prevFaceWeights(fromPrevProc);
@ -182,7 +182,7 @@ Foam::label Foam::parMetisDecomp::decompose
toNextProc toNextProc
<< Field<int>::subField(xadj, nCells, startCell)-startFace << Field<int>::subField(xadj, nCells, startCell)-startFace
<< Field<int>::subField(adjncy, nFaces, startFace) << Field<int>::subField(adjncy, nFaces, startFace)
<< SubField<floatScalar>(xyz, nDims*nCells, nDims*startCell) << SubField<real_t>(xyz, nDims*nCells, nDims*startCell)
<< <<
( (
cellWeights.size() cellWeights.size()
@ -267,9 +267,9 @@ Foam::label Foam::parMetisDecomp::decompose
// Number of weights or balance constraints // Number of weights or balance constraints
int nCon = 1; int nCon = 1;
// Per processor, per constraint the weight // Per processor, per constraint the weight
Field<floatScalar> tpwgts(nCon*nProcessors_, 1./nProcessors_); Field<real_t> tpwgts(nCon*nProcessors_, 1./nProcessors_);
// Imbalance tolerance // Imbalance tolerance
Field<floatScalar> ubvec(nCon, 1.02); Field<real_t> ubvec(nCon, 1.02);
if (nProcessors_ == 1) if (nProcessors_ == 1)
{ {
// If only one processor there is no imbalance. // If only one processor there is no imbalance.

View file

@ -5,6 +5,7 @@ EXE_INC = \
ifeq ($(WM_ARCH_BASE), darwin) ifeq ($(WM_ARCH_BASE), darwin)
/* No librt for Mac OS X */ /* No librt for Mac OS X */
LIB_LIBS = \ LIB_LIBS = \
-lfoam \
-L$(SCOTCH_LIB_DIR) -lscotch \ -L$(SCOTCH_LIB_DIR) -lscotch \
-L$(SCOTCH_LIB_DIR) -lscotcherrexit -L$(SCOTCH_LIB_DIR) -lscotcherrexit
else else

View file

@ -35,8 +35,8 @@ SourceFiles
#ifndef refineCell_H #ifndef refineCell_H
#define refineCell_H #define refineCell_H
#include "label.H"
#include "vector.H" #include "vector.H"
#include "label.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -123,4 +123,3 @@ public:
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View file

@ -52,7 +52,7 @@ void Foam::layerAdditionRemoval::addCellLayer
if (debug) if (debug)
{ {
Info<< "void layerAdditionRemoval::addCellLayer(" Pout<< "void layerAdditionRemoval::addCellLayer("
<< "polyTopoChange& ref) const for object " << name() << " : " << "polyTopoChange& ref) const for object " << name() << " : "
<< "Adding cell layer" << endl; << "Adding cell layer" << endl;
} }
@ -74,7 +74,7 @@ void Foam::layerAdditionRemoval::addCellLayer
{ {
if (debug) if (debug)
{ {
Info<< "void layerAdditionRemoval::addCellLayer(" Pout<< "void layerAdditionRemoval::addCellLayer("
<< "polyTopoChange& ref) const " << "polyTopoChange& ref) const "
<< " for object " << name() << " : " << " for object " << name() << " : "
<< "Using edges for point insertion" << endl; << "Using edges for point insertion" << endl;
@ -93,7 +93,7 @@ void Foam::layerAdditionRemoval::addCellLayer
{ {
if (debug) if (debug)
{ {
Info<< "void layerAdditionRemoval::addCellLayer(" Pout<< "void layerAdditionRemoval::addCellLayer("
<< "polyTopoChange& ref) const " << "polyTopoChange& ref) const "
<< " for object " << name() << " : " << " for object " << name() << " : "
<< "A valid layer could not be found in front of " << "A valid layer could not be found in front of "
@ -102,7 +102,7 @@ void Foam::layerAdditionRemoval::addCellLayer
<< endl; << endl;
} }
extrusionDir = 1.1*minLayerThickness_*masterFaceLayer.pointNormals(); extrusionDir = minLayerThickness_*masterFaceLayer.pointNormals();
} }
// Add the new points // Add the new points
@ -550,7 +550,7 @@ void Foam::layerAdditionRemoval::addCellLayer
if (debug) if (debug)
{ {
Info<< "void layerAdditionRemoval::addCellLayer(" Pout<< "void layerAdditionRemoval::addCellLayer("
<< "polyTopoChange& ref) const " << "polyTopoChange& ref) const "
<< " for object " << name() << " : " << " for object " << name() << " : "
<< "Finished adding cell layer" << endl; << "Finished adding cell layer" << endl;

View file

@ -54,6 +54,7 @@ void Foam::multiTopoBodyFvMesh::addZonesAndModifiers()
Info<< "void multiTopoBodyFvMesh::addZonesAndModifiers() : " Info<< "void multiTopoBodyFvMesh::addZonesAndModifiers() : "
<< "Zones and modifiers already present. Skipping." << "Zones and modifiers already present. Skipping."
<< endl; << endl;
return; return;
} }
@ -228,7 +229,10 @@ bool Foam::multiTopoBodyFvMesh::update()
if (localMeshChanged) if (localMeshChanged)
{ {
// // Map old points onto the new mesh // Map old points onto the new mesh
// Not needed: only a single motion in time-step so old points
// are already in the correct postion for mesh motion.
// HJ, 19/May/2014
// pointField mappedOldPointsNew(allPoints().size()); // pointField mappedOldPointsNew(allPoints().size());
// mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap()); // mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap());

View file

@ -582,7 +582,7 @@ tmp<pointField> GGIInterpolation<MasterPatch, SlavePatch>::projectPointsOnPlane
scalarField dist(lpoints.size(), 0.0); scalarField dist(lpoints.size(), 0.0);
if (lpoints.size() > 3) if (lpoints.size() > 3 && mag(normalVector) > SMALL)
{ {
// Construct the plane // Construct the plane
plane projectionPlane(planeOrig, normalVector); plane projectionPlane(planeOrig, normalVector);

View file

@ -531,22 +531,22 @@ void GGIInterpolation<MasterPatch, SlavePatch>::rescaleWeightingFactors() const
scalar curMWC = 0; scalar curMWC = 0;
// Rescaling the slave weights // Rescaling the slave weights
if(debug) if (debug)
{ {
if if
( (
uncoveredMasterFaces().size() > 0 uncoveredMasterFaces().size() > 0
|| uncoveredSlaveFaces().size() > 0 || uncoveredSlaveFaces().size() > 0
) )
{ {
InfoIn InfoIn
( (
"void GGIInterpolation<MasterPatch, SlavePatch>::" "void GGIInterpolation<MasterPatch, SlavePatch>::"
"rescaleWeightingFactors() const" "rescaleWeightingFactors() const"
) << "Uncovered faces found. On master: " ) << "Uncovered faces found. On master: "
<< uncoveredMasterFaces().size() << uncoveredMasterFaces().size()
<< " on slave: " << uncoveredSlaveFaces().size() << endl; << " on slave: " << uncoveredSlaveFaces().size() << endl;
} }
} }
forAll (saW, saWi) forAll (saW, saWi)

View file

@ -125,6 +125,7 @@ addSolverToBlockMatrix(Type, block##Type##CGSolver, symMatrix); \
typedef BlockGaussSeidelSolver<type > block##Type##GaussSeidelSolver; \ typedef BlockGaussSeidelSolver<type > block##Type##GaussSeidelSolver; \
makeBlockSolverTypeName(block##Type##GaussSeidelSolver); \ makeBlockSolverTypeName(block##Type##GaussSeidelSolver); \
addSolverToBlockMatrix(Type, block##Type##GaussSeidelSolver, symMatrix); \ addSolverToBlockMatrix(Type, block##Type##GaussSeidelSolver, symMatrix); \
addSolverToBlockMatrix(Type, block##Type##GaussSeidelSolver, asymMatrix); \
\ \
typedef BlockGMRESSolver<type > block##Type##GMRESSolver; \ typedef BlockGMRESSolver<type > block##Type##GMRESSolver; \
makeBlockSolverTypeName(block##Type##GMRESSolver); \ makeBlockSolverTypeName(block##Type##GMRESSolver); \

View file

@ -35,8 +35,8 @@ SourceFiles
#ifndef meshTools_H #ifndef meshTools_H
#define meshTools_H #define meshTools_H
#include "label.H"
#include "vector.H" #include "vector.H"
#include "label.H"
#include "labelList.H" #include "labelList.H"
#include "pointField.H" #include "pointField.H"
#include "faceList.H" #include "faceList.H"

View file

@ -36,7 +36,8 @@ Description
void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
{ {
// Update zones // Update zones. Since boundary depends on zones, they need to be
// updated first. HJ, 20/May/2014
pointZones_.updateMesh(); pointZones_.updateMesh();
faceZones_.updateMesh(); faceZones_.updateMesh();
cellZones_.updateMesh(); cellZones_.updateMesh();
@ -83,14 +84,15 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
// Sync mesh update with changes on other processors // Sync mesh update with changes on other processors
void Foam::polyMesh::syncUpdateMesh() void Foam::polyMesh::syncUpdateMesh()
{ {
// Update boundaryMesh (note that patches themselves already ok) // Update zones. Since boundary depends on zones, they need to be
boundary_.updateMesh(); // updated first. HJ, 20/May/2014
// Update zones
pointZones_.updateMesh(); pointZones_.updateMesh();
faceZones_.updateMesh(); faceZones_.updateMesh();
cellZones_.updateMesh(); cellZones_.updateMesh();
// Update boundaryMesh (note that patches themselves already ok)
boundary_.updateMesh();
// Clear out parallel data. HJ, 27/Nov/2009 // Clear out parallel data. HJ, 27/Nov/2009
deleteDemandDrivenData(globalMeshDataPtr_); deleteDemandDrivenData(globalMeshDataPtr_);

View file

@ -187,6 +187,12 @@ void Foam::ggiPolyPatch::calcPatchToPatch() const
if (master()) if (master())
{ {
if (debug)
{
InfoIn("void ggiPolyPatch::calcPatchToPatch() const")
<< "Calculating patch to patch interpolation" << endl;
}
// Create interpolation for zones // Create interpolation for zones
patchToPatchPtr_ = patchToPatchPtr_ =
new ggiZoneInterpolation new ggiZoneInterpolation

View file

@ -312,6 +312,7 @@ public:
//- Return interpolation face zone //- Return interpolation face zone
const faceZone& zone() const; const faceZone& zone() const;
// Interpolation data // Interpolation data
//- Is this the master side? //- Is this the master side?

View file

@ -20,4 +20,4 @@ LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lfoam -L$(FOAM_MPI_LIBBIN) -lPstream # LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lfoam -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN)/$(FOAM_MPI) -lPstream

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I/opt/local/include/mpich-$(WM_MACPORT_MPI_VERSION)
PLIBS = -L/opt/local/lib/mpich-$(WM_MACPORT_MPI_VERSION) -lmpich -lpmpich

View file

@ -1,3 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include/openmpi PINC = $(shell mpicc-openmpi-mp --showme:compile)
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi PLIBS = $(shell mpicc-openmpi-mp --showme:link)

View file

@ -0,0 +1 @@
by bgschaid. 2010-10-05

View file

@ -0,0 +1,3 @@
XFLAGS =
XINC = $(XFLAGS) -I/usr/X11R6/include
XLIBS = -L/usr/X11R6/lib -lXext -lX11

View file

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = $(WM_CC) $(WM_CXXFLAGS) -ftrapping-math
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -Ddarwin
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -dynamiclib -flat_namespace -undefined suppress
LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs

View file

@ -0,0 +1,22 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wno-overloaded-virtual -Wno-unsequenced -Wno-c++11-extensions -Wno-unused-comparison
CC = $(WM_CXX) $(WM_CXXFLAGS) -ftrapping-math
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-200
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -Ddarwin
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lfoam -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN)/$(FOAM_MPI) -lPstream

View file

@ -0,0 +1,2 @@
c++DBUG = -ggdb2 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View file

@ -0,0 +1,4 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View file

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View file

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View file

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View file

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View file

@ -0,0 +1,10 @@
CPP = cpp $(GFLAGS)
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT)
include $(GENERAL_RULES)/standard
include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC =
PLIBS =

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I/opt/local/include/mpich-$(WM_MACPORT_MPI_VERSION)
PLIBS = -L/opt/local/lib/mpich-$(WM_MACPORT_MPI_VERSION) -lmpich -lpmpich

View file

@ -0,0 +1,5 @@
PFLAGS = -DOMPI_SKIP_MPICXX
# PINC = $(shell mpicc-openmpi-$(WM_MACPORT_MPI_VERSION) --showme:compile)
# PLIBS = $(shell mpicc-openmpi-$(WM_MACPORT_MPI_VERSION) --showme:link)
PINC = -I/opt/local/include/openmpi-$(WM_MACPORT_MPI_VERSION)
PLIBS = -L/opt/local/lib/openmpi-$(WM_MACPORT_MPI_VERSION) -lmpi

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -0,0 +1 @@
PFLAGS = -DOMPI_SKIP_MPICXX

View file

@ -19,4 +19,4 @@ LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lfoam -L$(FOAM_MPI_LIBBIN) -lPstream # LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lfoam -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN)/$(FOAM_MPI) -lPstream

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I/opt/local/include/mpich-$(WM_MACPORT_MPI_VERSION)
PLIBS = -L/opt/local/lib/mpich-$(WM_MACPORT_MPI_VERSION) -lmpich -lpmpich

View file

@ -1,3 +1,5 @@
PFLAGS = -DOMPI_SKIP_MPICXX PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include/openmpi # PINC = $(shell mpicc-openmpi-$(WM_MACPORT_MPI_VERSION) --showme:compile)
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi # PLIBS = $(shell mpicc-openmpi-$(WM_MACPORT_MPI_VERSION) --showme:link)
PINC = -I/opt/local/include/openmpi-$(WM_MACPORT_MPI_VERSION)
PLIBS = -L/opt/local/lib/openmpi-$(WM_MACPORT_MPI_VERSION) -lmpi