mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy2/OpenFOAM/OpenFOAM-dev
This commit is contained in:
86
README
86
README
@ -104,9 +104,9 @@
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
If you cannot find an appropriate binary pack for your platform you can
|
||||
build the complete OpenFOAM from the source-pack. First you will need to
|
||||
compile or obtain a recent version of gcc (we recommend gcc-4.1.?) for
|
||||
compile or obtain a recent version of gcc (we recommend gcc-4.2.?) for
|
||||
your platform which may be obtained from http://gcc.gnu.org/. Install the
|
||||
compiler in $WM_PROJECT_INST_DIR/$WM_ARCH/gcc-4.1.? and change the gcc
|
||||
compiler in $WM_PROJECT_INST_DIR/$WM_ARCH/gcc-4.2.? and change the gcc
|
||||
version number in $WM_PROJECT_DIR/.bashrc and $WM_PROJECT_DIR/.cshrc as
|
||||
appropriate and update the environment variables as in section 3.
|
||||
|
||||
@ -167,87 +167,7 @@
|
||||
http://www.OpenFOAM.org/bugs.html
|
||||
|
||||
|
||||
A. Network settings
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
OpenFOAM requires a basic level of networking to be set up. Firstly, the
|
||||
host name must be set - to test, type 'uname -a'. The running shell must
|
||||
be tcsh, csh, bash or ksh - to test type 'echo $SHELL'
|
||||
|
||||
The user must be able to 'ping' the host machine itself (<host>) - to
|
||||
test, type 'ping -c 1 <host>'
|
||||
|
||||
If the ping fails then it is possible that that the entry for the host
|
||||
machine is missing, incorrect or duplicated in the /etc/hosts file. The
|
||||
user can check this by typing 'grep <host> /etc/hosts' which should return
|
||||
a single line, typically of the form:
|
||||
|
||||
<IPaddress> <host>.<domain> <host>
|
||||
|
||||
The <IPaddress> must correspond to that in the networking settings of the
|
||||
machine which can also be checked by typing on Linux '/sbin/ifconfig'
|
||||
which should produce lines of output that include something similar to the
|
||||
following:
|
||||
|
||||
eth0 Link encap:Ethernet HWaddr ...
|
||||
inet addr:<IPaddress> ...
|
||||
|
||||
If the user is connected to a network that uses dynamic IP addresses, they
|
||||
must be particularly careful to ensure that an entry for their hostname/IP
|
||||
exists in the /etc/hosts file. If the server frequently reallocates IP
|
||||
addresses across the network, it is advisable that the /etc/hosts file is
|
||||
updated automatically when any changes occur.
|
||||
|
||||
The user should also be able to contact any other machine that it needs
|
||||
to, either a remote licence host or other machines that are being used
|
||||
within some parallel computation. Essentially the user needs to be able to
|
||||
ping these machines as described in preceeding sections.
|
||||
|
||||
The machine must have one of (or both) remote (rsh) and secure shell (ssh)
|
||||
running on his/her account. To check whether rsh is running correctly, the
|
||||
user should type 'rsh <host> ls'. Alternatively the user can check if ssh
|
||||
is running correctly by typing 'ssh <host> ls'. In either case, the output
|
||||
to the command should produce a file/directory listing for the current
|
||||
directory and no other text. If neither command works, we recommend the
|
||||
user set up rsh for their use as follows:
|
||||
|
||||
Check the rsh executable actually exists, e.g. the path to the executable
|
||||
should be returned when typing 'which rsh'. Check with the system
|
||||
administrator that rsh is enabled on the user's account; if not, request
|
||||
that it is enabled. Create a '.rhosts' file in the $HOME directory
|
||||
containing entries to access any machines they need to access, i.e. their
|
||||
own machine and, if different, the licence host machine. The entries are
|
||||
of the form: '<host> <user>'.
|
||||
|
||||
Remote shell accesses the .bashrc (or .cshrc) file and will not run
|
||||
correctly if there is a problem with this file. In particular the user
|
||||
should be careful with the following:
|
||||
|
||||
The ~/.cshrc (or ~/.bashrc) file should not contain errors that prevent it
|
||||
from executing fully at startup; all error messages during execution of
|
||||
the ~/.bashrc (or ~/.cshrc) file should be investigated and acted upon to
|
||||
eliminate them. echo (print to screen) statements within ~/.bashrc (or
|
||||
~/.cshrc) must not be executed during the running of rsh. This does not
|
||||
mean that echo statements are forbidden from the ~/.cshrc (or ~/.bashrc)
|
||||
file, but they must be enclosed in a control structure, e.g. an if
|
||||
statement, that ensures they are not executed when rsh is executed.
|
||||
For ~.bashrc:
|
||||
|
||||
if [ "$PS1" ]; then
|
||||
echo "..."
|
||||
fi
|
||||
|
||||
# or, alternatively
|
||||
|
||||
if /usr/bin/tty -s 2>/dev/null; then
|
||||
echo "..."
|
||||
fi
|
||||
|
||||
and, for ~.cshrc:
|
||||
|
||||
if ($?prompt) then ; echo "..." ; endif
|
||||
|
||||
|
||||
B. Running OpenFOAM in 32-bit mode on 64-bit machines
|
||||
A. Running OpenFOAM in 32-bit mode on 64-bit machines
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Those users with an installation of Linux on a 64-bit machine may install
|
||||
either or both of the 32-bit version of OpenFOAM (linux) or the 64-bit
|
||||
|
||||
@ -127,7 +127,7 @@ public:
|
||||
{}
|
||||
|
||||
//- Return the block holding these datasets
|
||||
const int block() const
|
||||
int block() const
|
||||
{
|
||||
return block_;
|
||||
}
|
||||
@ -137,17 +137,17 @@ public:
|
||||
return name_;
|
||||
}
|
||||
|
||||
const int start() const
|
||||
int start() const
|
||||
{
|
||||
return start_;
|
||||
}
|
||||
|
||||
const int end() const
|
||||
int end() const
|
||||
{
|
||||
return start_ + size_;
|
||||
}
|
||||
|
||||
const int size() const
|
||||
int size() const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
393
bin/foamThirdParty
Executable file
393
bin/foamThirdParty
Executable file
@ -0,0 +1,393 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use File::Spec;
|
||||
use Getopt::Long;
|
||||
|
||||
#############################################################################
|
||||
# SETTINGS
|
||||
#
|
||||
my %config = (
|
||||
thirdParty => "$ENV{WM_PROJECT_INST_DIR}/ThirdParty",
|
||||
project => ( $ENV{WM_PROJECT} || '' ) . "-"
|
||||
. ( $ENV{WM_PROJECT_VERSION} || '' ),
|
||||
);
|
||||
|
||||
my %packages = (
|
||||
lam => {
|
||||
-opt => 1,
|
||||
url => "http://www.lam-mpi.org/download/files/lam-7.1.4.tar.bz2",
|
||||
},
|
||||
|
||||
libccmio => {
|
||||
-opt => 1,
|
||||
url =>
|
||||
"https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz",
|
||||
},
|
||||
|
||||
openmpi => {
|
||||
url =>
|
||||
"http://www.open-mpi.org/software/ompi/v1.2/downloads/openmpi-1.2.6.tar.bz2",
|
||||
},
|
||||
|
||||
metis => {
|
||||
url =>
|
||||
"http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz"
|
||||
},
|
||||
mico => {
|
||||
-opt => 1,
|
||||
url => "http://www.mico.org/mico-2.3.12.tar.gz",
|
||||
},
|
||||
|
||||
mpich => {
|
||||
-opt => 1,
|
||||
url => "ftp://ftp.mcs.anl.gov/pub/mpi/old/mpich-1.2.4.tar.gz",
|
||||
},
|
||||
|
||||
ParMetis => {
|
||||
url =>
|
||||
"http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.tar.gz",
|
||||
},
|
||||
|
||||
ParMGridGen => {
|
||||
url =>
|
||||
"http://www-users.cs.umn.edu/~moulitsa/download/ParMGridGen-1.0.tar.gz",
|
||||
},
|
||||
|
||||
zlib => { url => "http://www.zlib.net/zlib-1.2.3.tar.gz", },
|
||||
|
||||
hoard => {
|
||||
-opt => 1,
|
||||
url =>
|
||||
"http://www.cs.umass.edu/%7Eemery/hoard/hoard-3.7.1/hoard-371.tar.gz"
|
||||
},
|
||||
|
||||
## # this really doesn't work well, but code needs minor patching anyhow:
|
||||
## fbsdmalloc => {
|
||||
## url =>
|
||||
## "http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libc/stdlib/malloc.c?rev=1.171",
|
||||
##
|
||||
## },
|
||||
);
|
||||
|
||||
#
|
||||
# END OF SETTINGS
|
||||
############################################################################
|
||||
|
||||
( my $Script = $0 ) =~ s{^.*/}{};
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
sub usage {
|
||||
my ( @req, @opt );
|
||||
|
||||
for ( sort keys %packages ) {
|
||||
if ( $packages{$_}{-opt} ) {
|
||||
push @opt, $_;
|
||||
}
|
||||
else {
|
||||
push @req, $_;
|
||||
}
|
||||
}
|
||||
|
||||
$! = 0; # clean exit
|
||||
warn "@_\n" if @_;
|
||||
die <<"USAGE";
|
||||
usage:
|
||||
$Script [OPTION] [package1 .. packageN]
|
||||
|
||||
options:
|
||||
-help usage
|
||||
-status show status [default]
|
||||
-list list versions and resource locations
|
||||
-version list versions only
|
||||
-dir list unpack directory
|
||||
-reldir list unpack directory relative to cwd
|
||||
-get get packages as required (uses curl)
|
||||
-unpack unpack packages where required and possible
|
||||
|
||||
Simple management of 3rd party software for '$config{project}'
|
||||
using the directory
|
||||
$config{thirdParty}
|
||||
|
||||
Packages: @req
|
||||
Optional: @opt
|
||||
|
||||
Return codes:
|
||||
-status -get -unpack number of missing packages or errors
|
||||
|
||||
USAGE
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
my %opt;
|
||||
|
||||
# default action is -status
|
||||
@ARGV or $opt{status}++;
|
||||
GetOptions(
|
||||
\%opt, ##
|
||||
"help", "status", "list", "version", "dir",
|
||||
"reldir", "get", "unpack",
|
||||
)
|
||||
or usage;
|
||||
|
||||
$opt{help} and usage;
|
||||
|
||||
-d $config{thirdParty} or usage "ERROR: no '$config{thirdParty}' dir";
|
||||
|
||||
#
|
||||
# complete the config
|
||||
#
|
||||
if ( not exists $config{sources} ) {
|
||||
$config{sources} = "$config{thirdParty}/sources";
|
||||
-d $config{sources} or mkdir $config{sources};
|
||||
}
|
||||
|
||||
#
|
||||
# cleanup the packages table
|
||||
#
|
||||
for my $name ( keys %packages ) {
|
||||
my $href = $packages{$name};
|
||||
|
||||
if ( not $href->{url} ) {
|
||||
warn "$name without url\n";
|
||||
delete $packages{$name};
|
||||
next;
|
||||
}
|
||||
|
||||
if ( not exists $href->{file} ) {
|
||||
( $href->{file} = $href->{url} ) =~ s{^.*/|\?.*$}{}g;
|
||||
}
|
||||
|
||||
if ( not exists $href->{dir} ) {
|
||||
( $href->{dir} = $href->{file} ) =~ s{\.(zip|tar(\.(gz|bz2))?)$}{};
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# check for names in the packages
|
||||
#
|
||||
sub selectNames {
|
||||
my @names;
|
||||
my $req;
|
||||
|
||||
while ( @_ and $_[0] =~ /^-/ ) {
|
||||
my $opt = shift;
|
||||
if ( $opt =~ /^-req/ ) {
|
||||
$req++;
|
||||
}
|
||||
}
|
||||
|
||||
if (@_) {
|
||||
my ( %seen, @reject );
|
||||
for my $name (@_) {
|
||||
next if $seen{$name}++;
|
||||
if ( exists $packages{$name} ) {
|
||||
push @names, $name;
|
||||
}
|
||||
else {
|
||||
push @reject, $name;
|
||||
}
|
||||
}
|
||||
|
||||
usage "unknown package(s): @reject" if @reject;
|
||||
}
|
||||
else {
|
||||
@names =
|
||||
grep { not $req or not $packages{$_}{-opt} } sort keys %packages;
|
||||
}
|
||||
|
||||
@names or usage "no packages";
|
||||
|
||||
return @names;
|
||||
}
|
||||
|
||||
#
|
||||
# list the current status
|
||||
#
|
||||
if ( $opt{status} ) {
|
||||
my @names = selectNames @ARGV;
|
||||
|
||||
my $nMissing = 0;
|
||||
|
||||
for my $name (@names) {
|
||||
my $href = $packages{$name};
|
||||
my ( $dir, $file, $url ) = @$href{qw( dir file url )};
|
||||
|
||||
my @status;
|
||||
if ( -e "$config{sources}/$file" ) {
|
||||
push @status, " packed: $config{sources}/$file";
|
||||
}
|
||||
|
||||
if ( -d "$config{thirdParty}/$dir" ) {
|
||||
push @status, "unpacked: $config{thirdParty}/$dir";
|
||||
}
|
||||
|
||||
unless (@status) {
|
||||
$nMissing++;
|
||||
@status = "missing";
|
||||
}
|
||||
|
||||
for (@status) {
|
||||
printf "%-16s %-16s %s", $name, $dir, $_;
|
||||
|
||||
if ( $href->{-opt} ) {
|
||||
print " [optional]";
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit $nMissing;
|
||||
}
|
||||
|
||||
#
|
||||
# show an overview of the versions and the resource locations
|
||||
#
|
||||
if ( $opt{list} ) {
|
||||
my @names = selectNames @ARGV;
|
||||
|
||||
for my $name (@names) {
|
||||
my $href = $packages{$name};
|
||||
my ( $dir, $file, $url ) = @$href{qw( dir file url )};
|
||||
|
||||
printf "%-16s %-16s %s", $name, $dir, $url;
|
||||
if ( $href->{-opt} ) {
|
||||
print " [optional]";
|
||||
}
|
||||
print "\n";
|
||||
|
||||
}
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
#
|
||||
# show the version (directory name) only
|
||||
#
|
||||
if ( $opt{version} ) {
|
||||
my @names = selectNames @ARGV;
|
||||
|
||||
for my $name (@names) {
|
||||
my $href = $packages{$name};
|
||||
my ( $dir, $file, $url ) = @$href{qw( dir file url )};
|
||||
|
||||
print $dir, "\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
#
|
||||
# show the unpack directory name
|
||||
#
|
||||
if ( $opt{dir} or $opt{reldir} ) {
|
||||
my @names = selectNames @ARGV;
|
||||
my $base = $config{thirdParty};
|
||||
|
||||
if ( $opt{reldir} ) {
|
||||
$base = File::Spec->abs2rel($base);
|
||||
length $base or $base = '.';
|
||||
}
|
||||
|
||||
for my $name (@names) {
|
||||
my $href = $packages{$name};
|
||||
my ( $dir, $file, $url ) = @$href{qw( dir file url )};
|
||||
|
||||
print File::Spec->catfile( $base, $dir ), "\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
#
|
||||
# get and/or unpack packages as required and possible
|
||||
# avoid getting/unpacking optional packages
|
||||
#
|
||||
if ( $opt{get} or $opt{unpack} ) {
|
||||
my @names = selectNames -required => @ARGV;
|
||||
|
||||
my $nError = 0;
|
||||
|
||||
for my $name (@names) {
|
||||
my $href = $packages{$name};
|
||||
my ( $dir, $file, $url ) = @$href{qw( dir file url )};
|
||||
|
||||
my $flags = "";
|
||||
if ( $href->{-opt} ) {
|
||||
$flags .= "[optional]";
|
||||
}
|
||||
|
||||
warn '-' x 70, "\n", "$name ($dir) $flags\n";
|
||||
|
||||
if ( -d "$config{thirdParty}/$dir" ) {
|
||||
warn "unpacked: $config{thirdParty}/$dir\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ( $opt{get} ) {
|
||||
if ( -e "$config{sources}/$file" ) {
|
||||
warn " packed: $config{sources}/$file\n";
|
||||
}
|
||||
else {
|
||||
my $fetch = "curl -k -o $file";
|
||||
|
||||
# curl seems to hang on anonymous ftp?
|
||||
if ( $url =~ /^ftp:/ ) {
|
||||
$fetch = "wget -v";
|
||||
}
|
||||
|
||||
system "set -x; cd $config{sources} && $fetch $url";
|
||||
|
||||
if ( not -e "$config{sources}/$file" ) {
|
||||
$nError++;
|
||||
warn " download failed!?\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $opt{unpack} ) {
|
||||
if ( -e "$config{sources}/$file" ) {
|
||||
my $unpack;
|
||||
if ( $file =~ m{\.zip$} ) {
|
||||
$unpack = "unzip";
|
||||
}
|
||||
elsif ( $file =~ m{\.tar$} ) {
|
||||
$unpack = "tar -xf";
|
||||
}
|
||||
elsif ( $file =~ m{\.tar\.bz2$} ) {
|
||||
$unpack = "tar -xjf";
|
||||
}
|
||||
elsif ( $file =~ m{\.(tgz|tar\.gz)$} ) {
|
||||
$unpack = "tar -xzf";
|
||||
}
|
||||
else {
|
||||
$nError++;
|
||||
warn " no unpack defined for $file\n";
|
||||
next;
|
||||
}
|
||||
|
||||
system
|
||||
"set -x; cd $config{thirdParty} && $unpack $config{sources}/$file";
|
||||
|
||||
# catch isolated cases where it unpacks without a version number
|
||||
if ( -d "$config{thirdParty}/$name"
|
||||
and not -d "$config{thirdParty}/$dir" )
|
||||
{
|
||||
rename "$config{thirdParty}/$name",
|
||||
"$config{thirdParty}/$dir";
|
||||
}
|
||||
|
||||
unless ( -d "$config{thirdParty}/$dir" ) {
|
||||
$nError++;
|
||||
warn "unpack failed!?\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
warn '-' x 70, "\n\n";
|
||||
exit $nError;
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
@ -43,7 +43,7 @@ addCMakeVariable ()
|
||||
|
||||
initialiseVariables ()
|
||||
{
|
||||
unset CMAKE_VARIABLES OBJ_ADD MPI_ARCH_PATH
|
||||
unset CMAKE_VARIABLES OBJ_ADD
|
||||
|
||||
if [ "$VERBOSE" = ON ]; then
|
||||
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
||||
@ -55,26 +55,7 @@ addMpiSupport ()
|
||||
{
|
||||
[ "$INCLUDE_MPI" = ON ] || return
|
||||
|
||||
# using OpenFOAM variables to identify location of MPI libraries
|
||||
case "$WM_MPLIB" in
|
||||
OPENMPI)
|
||||
MPI_ARCH_PATH=$OPENMPI_ARCH_PATH
|
||||
MPI_LIBRARY=$OPENMPI_ARCH_PATH/lib/libmpi.so
|
||||
;;
|
||||
LAM)
|
||||
MPI_ARCH_PATH=$LAM_ARCH_PATH
|
||||
MPI_LIBRARY=$LAM_ARCH_PATH/lib/libmpi.so
|
||||
;;
|
||||
MPICH)
|
||||
MPI_ARCH_PATH=$MPICH_ARCH_PATH
|
||||
MPI_LIBRARY=$MPICH_ARCH_PATH/lib/libmpich.so
|
||||
;;
|
||||
*)
|
||||
echo "*** Error: unknown/unsupported mpi: $WM_MPLIB"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
MPI_LIBRARY=$MPI_ARCH_PATH/lib/libmpi.so
|
||||
MPI_INCLUDE_PATH=$MPI_ARCH_PATH/include
|
||||
MPI_RUN=$MPI_ARCH_PATH/bin/mpirun
|
||||
|
||||
@ -274,7 +255,6 @@ installParaView ()
|
||||
# for good measure - clear a few variables before using any of the functions
|
||||
|
||||
unset VERBOSE INCLUDE_MPI INCLUDE_PYTHON INCLUDE_MESA PYTHON_LIBRARY
|
||||
unset MPI_ARCH_PATH
|
||||
unset CMAKE_VARIABLES OBJ_ADD
|
||||
unset CMAKE_SKIP
|
||||
|
||||
|
||||
@ -130,70 +130,67 @@ endif
|
||||
# Communications library
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
unset MPI_ARCH_PATH
|
||||
|
||||
switch ("$WM_MPLIB")
|
||||
case OPENMPI:
|
||||
set ompi_version=1.2.6
|
||||
setenv OPENMPI_HOME $thirdParty/openmpi-$ompi_version
|
||||
setenv OPENMPI_ARCH_PATH $OPENMPI_HOME/platforms/$WM_OPTIONS
|
||||
set mpi_version=openmpi-1.2.6
|
||||
setenv MPI_ARCH_PATH $thirdParty/$mpi_version/platforms/$WM_OPTIONS
|
||||
|
||||
# Tell OpenMPI where to find it's install directory
|
||||
setenv OPAL_PREFIX $OPENMPI_ARCH_PATH
|
||||
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
||||
|
||||
AddLib $OPENMPI_ARCH_PATH/lib
|
||||
AddPath $OPENMPI_ARCH_PATH/bin
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/openmpi-$ompi_version
|
||||
unset ompi_version
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
breaksw
|
||||
|
||||
case LAM:
|
||||
set lam_version=7.1.4
|
||||
setenv LAMHOME $thirdParty/lam-$lam_version
|
||||
setenv LAM_ARCH_PATH $LAMHOME/platforms/$WM_OPTIONS
|
||||
set mpi_version=lam-7.1.4
|
||||
setenv MPI_ARCH_PATH $thirdParty/$mpi_version/platforms/$WM_OPTIONS
|
||||
setenv LAMHOME $thirdParty/$mpi_version
|
||||
|
||||
AddLib $LAM_ARCH_PATH/lib
|
||||
AddPath $LAM_ARCH_PATH/bin
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/lam-$lam_version
|
||||
unset lam_version
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
breaksw
|
||||
|
||||
case MPICH:
|
||||
set mpich_version=1.2.4
|
||||
setenv MPICH_PATH $thirdParty/mpich-$mpich_version
|
||||
setenv MPICH_ARCH_PATH $MPICH_PATH/platforms/$WM_OPTIONS
|
||||
setenv MPICH_ROOT $MPICH_ARCH_PATH
|
||||
set mpi_version=mpich-1.2.4
|
||||
setenv MPI_ARCH_PATH $thirdParty/$mpi_version/platforms/$WM_OPTIONS
|
||||
setenv MPICH_ROOT $MPI_ARCH_PATH
|
||||
|
||||
AddLib $MPICH_ARCH_PATH/lib
|
||||
AddPath $MPICH_ARCH_PATH/bin
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-$mpich_version
|
||||
unset mpich_version
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
breaksw
|
||||
|
||||
case MPICH-GM:
|
||||
setenv MPICH_PATH /opt/mpi
|
||||
setenv MPICH_ARCH_PATH $MPICH_PATH
|
||||
setenv MPICH_ROOT $MPICH_ARCH_PATH
|
||||
setenv MPI_ARCH_PATH $MPICH_PATH
|
||||
setenv GM_LIB_PATH /opt/gm/lib64
|
||||
|
||||
AddLib $MPICH_ARCH_PATH/lib
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddLib $GM_LIB_PATH
|
||||
AddPath $MPICH_ARCH_PATH/bin
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
|
||||
breaksw
|
||||
|
||||
case GAMMA:
|
||||
setenv GAMMA_ARCH_PATH /usr
|
||||
|
||||
# AddLib $GAMMA_ARCH_PATH/lib
|
||||
# AddPath $GAMMA_ARCH_PATH/bin
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/gamma
|
||||
breaksw
|
||||
|
||||
case MPI:
|
||||
setenv MPI_ARCH_PATH /opt/mpi
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
|
||||
breaksw
|
||||
|
||||
|
||||
@ -39,18 +39,22 @@ fi
|
||||
|
||||
AddPath()
|
||||
{
|
||||
if [ $# -ge 1 ]; then
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
[ -d $1 ] || mkdir -p $1
|
||||
export PATH=$1:$PATH
|
||||
fi
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
AddLib()
|
||||
{
|
||||
if [ $# -ge 1 ]; then
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
[ -d $1 ] || mkdir -p $1
|
||||
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||
fi
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@ -117,7 +121,7 @@ OpenFOAM)
|
||||
if [ ! -d "$WM_COMPILER_DIR" ]
|
||||
then
|
||||
echo
|
||||
echo "Warning in $1:"
|
||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
||||
echo " Cannot find $WM_COMPILER_DIR installation."
|
||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||
echo " change the WM_COMPILER_INST setting to 'System' in this file"
|
||||
@ -135,78 +139,71 @@ if [ "$WM_COMPILER_BIN" != "" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# Third-party software
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
thirdParty=$WM_PROJECT_INST_DIR/ThirdParty
|
||||
|
||||
|
||||
# Communications library
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
unset MPI_ARCH_PATH
|
||||
|
||||
case "$WM_MPLIB" in
|
||||
OPENMPI)
|
||||
ompi_version=1.2.6
|
||||
export OPENMPI_HOME=$thirdParty/openmpi-$ompi_version
|
||||
export OPENMPI_ARCH_PATH=$OPENMPI_HOME/platforms/$WM_OPTIONS
|
||||
mpi_version=openmpi-1.2.6
|
||||
export MPI_ARCH_PATH=$thirdParty/$mpi_version/platforms/$WM_OPTIONS
|
||||
|
||||
# Tell OpenMPI where to find it's install directory
|
||||
export OPAL_PREFIX=$OPENMPI_ARCH_PATH
|
||||
# Tell OpenMPI where to find its install directory
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
|
||||
AddLib $OPENMPI_ARCH_PATH/lib
|
||||
AddPath $OPENMPI_ARCH_PATH/bin
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/openmpi-$ompi_version
|
||||
unset ompi_version
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
;;
|
||||
|
||||
LAM)
|
||||
lam_version=7.1.4
|
||||
export LAMHOME=$thirdParty/lam-$lam_version
|
||||
export LAM_ARCH_PATH=$LAMHOME/platforms/$WM_OPTIONS
|
||||
mpi_version=lam-7.1.4
|
||||
export MPI_ARCH_PATH=$thirdParty/$mpi_version/platforms/$WM_OPTIONS
|
||||
export LAMHOME=$thirdParty/$mpi_version
|
||||
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
||||
|
||||
AddLib $LAM_ARCH_PATH/lib
|
||||
AddPath $LAM_ARCH_PATH/bin
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/lam-$lam_version
|
||||
unset lam_version
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
;;
|
||||
|
||||
MPICH)
|
||||
mpich_version=1.2.4
|
||||
export MPICH_PATH=$thirdParty/mpich-$mpich_version
|
||||
export MPICH_ARCH_PATH=$MPICH_PATH/platforms/$WM_OPTIONS
|
||||
mpi_version=mpich-1.2.4
|
||||
export MPI_ARCH_PATH=$thirdParty/$mpi_version/platforms/$WM_OPTIONS
|
||||
export MPICH_ROOT=$MPICH_ARCH_PATH
|
||||
|
||||
AddLib $MPICH_ARCH_PATH/lib
|
||||
AddPath $MPICH_ARCH_PATH/bin
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-$mpich_version
|
||||
unset mpich_version
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
;;
|
||||
|
||||
MPICH-GM)
|
||||
export MPICH_PATH=/opt/mpi
|
||||
export MPICH_ARCH_PATH=$MPICH_PATH
|
||||
export MPICH_ROOT=$MPICH_ARCH_PATH
|
||||
export MPICH_ROOT=$MPICH_PATH
|
||||
export MPI_ARCH_PATH=$MPICH_PATH
|
||||
export GM_LIB_PATH=/opt/gm/lib64
|
||||
|
||||
AddLib $MPICH_ARCH_PATH/lib
|
||||
AddLib $MPI_ARCH_PATH/lib
|
||||
AddLib $GM_LIB_PATH
|
||||
AddPath $MPICH_ARCH_PATH/bin
|
||||
AddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
|
||||
;;
|
||||
|
||||
GAMMA)
|
||||
export GAMMA_ARCH_PATH=/usr
|
||||
|
||||
# AddLib $GAMMA_ARCH_PATH/lib
|
||||
# AddPath $GAMMA_ARCH_PATH/bin
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/gamma
|
||||
;;
|
||||
|
||||
MPI)
|
||||
export MPI_ARCH_PATH=/opt/mpi
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
|
||||
;;
|
||||
|
||||
|
||||
@ -68,7 +68,8 @@ bool Foam::dictionary::add(entry* ePtr, bool mergeEntry)
|
||||
else
|
||||
{
|
||||
IOWarningIn("dictionary::add(entry* ePtr)", (*this))
|
||||
<< "problem replacing entry in dictionary " << name()
|
||||
<< "problem replacing entry "<< ePtr->keyword()
|
||||
<< " in dictionary " << name()
|
||||
<< endl;
|
||||
|
||||
IDLList<entry>::remove(ePtr);
|
||||
@ -91,7 +92,8 @@ bool Foam::dictionary::add(entry* ePtr, bool mergeEntry)
|
||||
else
|
||||
{
|
||||
IOWarningIn("dictionary::add(entry* ePtr)", (*this))
|
||||
<< "attempt to add an entry already in dictionary " << name()
|
||||
<< "attempt to add entry "<< ePtr->keyword()
|
||||
<< " which already exists in dictionary " << name()
|
||||
<< endl;
|
||||
|
||||
delete ePtr;
|
||||
|
||||
@ -535,16 +535,6 @@ Foam::argList::argList
|
||||
// Set the case as an environment variable
|
||||
setEnv("FOAM_CASE", rootPath_/globalCase_, true);
|
||||
|
||||
// Set the relative parent directory as an environment variable
|
||||
if (parRunControl_.parRun())
|
||||
{
|
||||
setEnv("FOAM_ROOT", "..", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEnv("FOAM_ROOT", ".", true);
|
||||
}
|
||||
|
||||
// Switch on signal trapping. We have to wait until after Pstream::init
|
||||
// since this sets up its own ones.
|
||||
sigFpe_.set();
|
||||
|
||||
Reference in New Issue
Block a user