Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 280586 | Differences between
and this patch

Collapse All | Expand All

(-)OpenFOAM-1.6-src/bin/paraFoam (-112 / +127 lines)
Lines 1-133 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#------------------------------------------------------------------------------
2
#
3
# =========                 |
3
# Copyright (c) 2008-2009 Takuya OSHIMA <oshima@eng.niigata-u.ac.jp>.
4
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4
# All rights reserved.
5
#  \\    /   O peration     |
5
#
6
#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6
# Redistribution and use in source and binary forms, with or without
7
#    \\/     M anipulation  |
7
# modification, are permitted provided that the following conditions are
8
#-------------------------------------------------------------------------------
8
# met:
9
# License
9
#
10
#     This file is part of OpenFOAM.
10
#  * Redistributions of source code must retain the above copyright
11
#
11
#    notice, this list of conditions and the following disclaimer.
12
#     OpenFOAM is free software; you can redistribute it and/or modify it
12
#
13
#     under the terms of the GNU General Public License as published by the
13
#  * Redistributions in binary form must reproduce the above copyright
14
#     Free Software Foundation; either version 2 of the License, or (at your
14
#    notice, this list of conditions and the following disclaimer in the
15
#     option) any later version.
15
#    documentation and/or other materials provided with the
16
#
16
#    distribution.
17
#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
#
18
#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
#  * Neither the name of the author nor the names of any contributors
19
#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19
#    may be used to endorse or promote products derived from this
20
#     for more details.
20
#    software without specific prior written permission.
21
#
21
#
22
#     You should have received a copy of the GNU General Public License
22
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
#     along with OpenFOAM; if not, write to the Free Software Foundation,
23
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
26
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
#
33
#
26
# Script
34
# Script
27
#     paraFoam
35
#     pvFoam
28
#
36
#
29
# Description
37
# Description
30
#     start paraview with the OpenFOAM libraries
38
#     ParaView interface script for use with vtkPOpenFOAMReader.
31
#
32
#------------------------------------------------------------------------------
33
usage() {
34
    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
35
    cat<<USAGE
36
37
usage: ${0##*/} [OPTION]
38
options:
39
  -case   dir    specify alternative case directory
40
  -region name   specify mesh region name
41
  -touch         only create the .OpenFOAM file
42
43
* start paraview $ParaView_VERSION with the OpenFOAM libraries
44
39
45
USAGE
40
# Adjust as necessary.
41
# You might also want to set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH.
42
paraviewPath="`which paraview`"
43
# or in full path like paraviewPath=/opt/ParaView3/bin/paraview
44
45
if [ ! -x "${paraviewPath}" -o -d "${paraviewPath}" ]; then
46
    # not using LINENO which is not supported by dash (yet)
47
    echo "ParaView not found; set paraviewPath at line" `awk '/paraviewPath/{print FNR;exit 0}' $0` "of $0."
46
    exit 1
48
    exit 1
47
}
49
fi
48
50
49
unset regionName touchOnly
51
ext=foam
52
casePath=.
53
script=${0##*/}
54
background=yes
55
trapCommand=trap
50
56
51
# parse options
57
while [ $# -gt 0 ]
52
while [ "$#" -gt 0 ]
53
do
58
do
54
    case "$1" in
59
    case "$1" in
55
    -h | -help)
60
	-case)
56
        usage
61
	    if [ $# -lt 2 ]; then
57
        ;;
62
		echo "-case requires path specification"
58
    -case)
63
		exit 1
59
        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
64
	    fi
60
        cd "$2" 2>/dev/null || usage "directory does not exist:  '$2'"
65
	    shift
61
        shift 2
66
	    casePath="$1"
62
        ;;
67
	    ;;
63
    -region)
68
	-clientServer|-cs)
64
        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
69
	    if [ $# -lt 2 ]; then
65
        regionName=$2
70
		echo "-clientServer or -cs requires specification of the server resource name"
66
        shift 2
71
		exit 1
67
        ;;
72
	    fi
68
    -touch)
73
	    shift
69
        touchOnly=true
74
	    csResourceName="$1"
70
        shift
75
	    ;;
71
        ;;
76
	-foreground|-fg)
72
    *)
77
	    background=no
73
        usage "unknown option/argument: '$*'"
78
	    ;;
74
        ;;
79
	-keepStub|-ks)
80
	    trapCommand=:
81
	    ;;
82
	-help)
83
	    echo "Usage: ${script} [-case <dir>] [-clientServer|-cs <server resource name>] [-foreground|-fg] [-keepStub|-ks] [-help]"
84
	    exit 0
85
	    ;;
75
    esac
86
    esac
87
    shift
76
done
88
done
77
89
78
# get a sensible caseName
90
# cd to the case directory
79
caseName=${PWD##*/}
91
if ! cd "${casePath}" > /dev/null 2>&1; then
80
caseFile="$caseName.OpenFOAM"
92
    echo "Cannot change directory to \"${casePath}\"; exiting"
81
fvControls="system"
93
    exit 1
82
83
if [ -n "$regionName" ]
84
then
85
    caseFile="$caseName{$regionName}.OpenFOAM"
86
    fvControls="$fvControls/$regionName"
87
fi
88
89
if [ -n "$touchOnly" ]
90
then
91
    touch "$caseFile"
92
    echo "created '$caseFile'"
93
    exit 0
94
fi
94
fi
95
95
96
# parent directory for normal or parallel results
96
caseName="${PWD##*/}"
97
case "$caseName" in
98
    processor*) parentDir=".." ;;
99
    *)          parentDir="."  ;;
100
esac
101
102
# check existence of essential files
103
for check in system/controlDict $fvControls/fvSchemes $fvControls/fvSolution
104
do
105
    [ -s "$parentDir/$check" ] || usage "file does not exist:  '$parentDir/$check'"
106
done
107
97
98
# see if caseName starts with controlDict or the case is in the root directory.
99
if [ "${caseName#controlDict}" != "${caseName}" -o ! "${caseName}" ]; then
100
    # Use case.foam as file name given to ParaView
101
    caseName="case"
102
fi
108
103
109
case "$ParaView_VERSION" in
104
fileName="${caseName}.${ext}"
110
2*)
105
if [ -e "${fileName}" ]; then
111
    trap "rm -f paraFoam.pvs $caseFile 2>/dev/null; exit 0" EXIT TERM INT
106
    if [ ! -r "${fileName}" ]; then
112
    touch "$caseFile"
107
	echo "Stub ${fileName} exists but not readable; exiting"
113
108
	exit 1
114
    # since we are now in the cwd, %CASE% is '$PWD/$caseFile'
109
    fi
115
    sed -e s@%CASE%@$PWD/$caseFile@g \
110
    trapCommand=:
116
        $WM_PROJECT_DIR/bin/tools/paraFoam.pvs > paraFoam.pvs
111
else
117
112
    if ! touch "${fileName}" > /dev/null 2>&1; then
118
    paraview paraFoam.pvs
113
	echo "Cannot create stub ${fileName}; exiting"
119
    ;;
114
	exit 1
120
115
    fi
121
*)
116
fi
122
    # only create/remove caseFile if it didn't already exist
123
    [ -e $caseFile ] || {
124
        trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
125
        touch "$caseFile"
126
        echo "created temporary '$caseFile'"
127
    }
128
117
129
    paraview --data="$caseFile"
118
# set the locale where ParaView is run under to "C" so that the
130
    ;;
119
# interpretation of decimal points by the system routines are not
120
# affected
121
export LANG=C
122
export LC_ALL=C
123
124
# specify fileName with full path so that it can easily be accessed
125
# later with File->Recent Files
126
if [ "${background}" = "yes" ]; then
127
    (
128
	${trapCommand} "rm -f \"${fileName}\" ; exit 0" \
129
	    EXIT HUP INT PIPE ALRM TERM USR1 USR2 ;
130
	if [ "${csResourceName}" ]; then
131
	    "${paraviewPath}" --data="${PWD}/${fileName}" \
132
		--server="${csResourceName}"
133
	else
134
	    "${paraviewPath}" --data="${PWD}/${fileName}"
135
	fi
136
    ) &
137
else
138
    ${trapCommand} "rm -f \"${fileName}\" ; exit 0" \
139
	EXIT HUP INT PIPE ALRM TERM USR1 USR2
140
    if [ "${csResourceName}" ]; then
141
	"${paraviewPath}" --data="${PWD}/${fileName}" \
142
	    --server="${csResourceName}"
143
    else
144
	"${paraviewPath}" --data="${PWD}/${fileName}"
145
    fi
146
fi
131
147
132
esac
133
#------------------------------------------------------------------------------
148
#------------------------------------------------------------------------------
(-)OpenFOAM-1.6-src/etc/bashrc (-6 / +6 lines)
Lines 43-51 Link Here
43
#
43
#
44
# Location of FOAM installation
44
# Location of FOAM installation
45
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
foamInstall=$HOME/$WM_PROJECT
46
# foamInstall=$HOME/$WM_PROJECT
47
# foamInstall=~$WM_PROJECT
47
# foamInstall=~$WM_PROJECT
48
# foamInstall=/usr/local/$WM_PROJECT
48
foamInstall=/usr/lib/$WM_PROJECT
49
# foamInstall=/opt/$WM_PROJECT
49
# foamInstall=/opt/$WM_PROJECT
50
#
50
#
51
# END OF (NORMAL) USER EDITABLE PART
51
# END OF (NORMAL) USER EDITABLE PART
Lines 73-79 Link Here
73
73
74
# Location of third-party software
74
# Location of third-party software
75
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
76
# export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
77
77
78
78
79
# Operating System/Platform
79
# Operating System/Platform
Lines 232-245 Link Here
232
232
233
233
234
_foamSource $WM_PROJECT_DIR/etc/settings.sh
234
_foamSource $WM_PROJECT_DIR/etc/settings.sh
235
_foamSource $WM_PROJECT_DIR/etc/aliases.sh
235
# _foamSource $WM_PROJECT_DIR/etc/aliases.sh
236
236
237
237
238
# Source user setup files for optional packages
238
# Source user setup files for optional packages
239
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
240
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
240
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
241
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
241
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
242
_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc
242
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc
243
243
244
244
245
# Clean environment paths again. Only remove duplicates
245
# Clean environment paths again. Only remove duplicates
(-)OpenFOAM-1.6-src/etc/cshrc (-5 / +5 lines)
Lines 42-50 Link Here
42
#
42
#
43
# Location of FOAM installation
43
# Location of FOAM installation
44
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
set foamInstall = $HOME/$WM_PROJECT
45
# set foamInstall = $HOME/$WM_PROJECT
46
# set foamInstall = ~$WM_PROJECT
46
# set foamInstall = ~$WM_PROJECT
47
# set foamInstall = /usr/local/$WM_PROJECT
47
set foamInstall = /usr/lib/$WM_PROJECT
48
# set foamInstall = /opt/$WM_PROJECT
48
# set foamInstall = /opt/$WM_PROJECT
49
#
49
#
50
# END OF (NORMAL) USER EDITABLE PART
50
# END OF (NORMAL) USER EDITABLE PART
Lines 67-73 Link Here
67
67
68
# Location of third-party software
68
# Location of third-party software
69
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
70
# setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
71
71
72
72
73
# Operating System/Platform
73
# Operating System/Platform
Lines 230-241 Link Here
230
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*'
230
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*'
231
231
232
_foamSource $WM_PROJECT_DIR/etc/settings.csh
232
_foamSource $WM_PROJECT_DIR/etc/settings.csh
233
_foamSource $WM_PROJECT_DIR/etc/aliases.csh
233
# _foamSource $WM_PROJECT_DIR/etc/aliases.csh
234
234
235
# Source user setup files for optional packages
235
# Source user setup files for optional packages
236
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc
237
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/cshrc
238
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
238
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
239
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc
239
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc
240
240
241
241
(-)OpenFOAM-1.6-src/etc/settings.csh (-21 / +21 lines)
Lines 37-63 Link Here
37
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
37
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
38
38
39
# location of the jobControl directory
39
# location of the jobControl directory
40
setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl
40
setenv FOAM_JOB_DIR $HOME/$WM_PROJECT/jobControl
41
41
42
# wmake configuration
42
# wmake configuration
43
setenv WM_DIR $WM_PROJECT_DIR/wmake
43
setenv WM_DIR $WM_PROJECT_DIR/wmake
44
setenv WM_LINK_LANGUAGE c++
44
setenv WM_LINK_LANGUAGE c++
45
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
45
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER
46
46
47
# base configuration
47
# base configuration
48
setenv FOAM_APP $WM_PROJECT_DIR/applications
48
setenv FOAM_APP $WM_PROJECT_DIR/applications
49
setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
49
setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin
50
setenv FOAM_LIB $WM_PROJECT_DIR/lib
50
setenv FOAM_LIB $WM_PROJECT_DIR/lib
51
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
51
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib
52
setenv FOAM_SRC $WM_PROJECT_DIR/src
52
setenv FOAM_SRC $WM_PROJECT_DIR/src
53
53
54
# shared site configuration - similar naming convention as ~OpenFOAM expansion
54
# shared site configuration - similar naming convention as ~OpenFOAM expansion
55
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
55
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin
56
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
56
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib
57
57
58
# user configuration
58
# user configuration
59
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
59
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin
60
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
60
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib
61
61
62
# convenience
62
# convenience
63
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
63
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
Lines 79-85 Link Here
79
# Select compiler installation
79
# Select compiler installation
80
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
# compilerInstall = OpenFOAM | System
81
# compilerInstall = OpenFOAM | System
82
set compilerInstall=OpenFOAM
82
set compilerInstall=System
83
83
84
switch ("$compilerInstall")
84
switch ("$compilerInstall")
85
case OpenFOAM:
85
case OpenFOAM:
Lines 124-153 Link Here
124
124
125
switch ("$WM_MPLIB")
125
switch ("$WM_MPLIB")
126
case OPENMPI:
126
case OPENMPI:
127
    set mpi_version=openmpi-1.3.3
127
    set mpi_version=openmpi
128
    setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
128
#     setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
129
    setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
129
    setenv MPI_ARCH_PATH /usr
130
130
131
    # Tell OpenMPI where to find its install directory
131
    # Tell OpenMPI where to find its install directory
132
    setenv OPAL_PREFIX $MPI_ARCH_PATH
132
    setenv OPAL_PREFIX $MPI_ARCH_PATH
133
133
134
    _foamAddPath $MPI_ARCH_PATH/bin
134
#     _foamAddPath $MPI_ARCH_PATH/bin
135
    _foamAddLib  $MPI_ARCH_PATH/lib
135
#     _foamAddLib  $MPI_ARCH_PATH/lib
136
136
137
    setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
137
    setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version
138
    unset mpi_version
138
    unset mpi_version
139
    breaksw
139
    breaksw
140
140
141
case MPICH:
141
case MPICH:
142
    set mpi_version=mpich-1.2.4
142
    set mpi_version=mpich
143
    setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
143
#     setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
144
    setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
144
    setenv MPI_ARCH_PATH /usr
145
    setenv MPICH_ROOT $MPI_ARCH_PATH
145
    setenv MPICH_ROOT $MPI_ARCH_PATH
146
146
147
    _foamAddPath $MPI_ARCH_PATH/bin
147
#     _foamAddPath $MPI_ARCH_PATH/bin
148
    _foamAddLib  $MPI_ARCH_PATH/lib
148
#     _foamAddLib  $MPI_ARCH_PATH/lib
149
149
150
    setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
150
    setenv FOAM_MPI_LIBBIN $FOAM_LIB/$mpi_version
151
    unset mpi_version
151
    unset mpi_version
152
    breaksw
152
    breaksw
153
153
(-)OpenFOAM-1.6-src/etc/settings.sh (-21 / +21 lines)
Lines 53-79 Link Here
53
53
54
54
55
# location of the jobControl directory
55
# location of the jobControl directory
56
export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl
56
export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl
57
57
58
# wmake configuration
58
# wmake configuration
59
export WM_DIR=$WM_PROJECT_DIR/wmake
59
export WM_DIR=$WM_PROJECT_DIR/wmake
60
export WM_LINK_LANGUAGE=c++
60
export WM_LINK_LANGUAGE=c++
61
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
61
export WM_OPTIONS=$WM_ARCH$WM_COMPILER
62
62
63
# base configuration
63
# base configuration
64
export FOAM_APP=$WM_PROJECT_DIR/applications
64
export FOAM_APP=$WM_PROJECT_DIR/applications
65
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
65
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin
66
export FOAM_LIB=$WM_PROJECT_DIR/lib
66
export FOAM_LIB=$WM_PROJECT_DIR/lib
67
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
67
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib
68
export FOAM_SRC=$WM_PROJECT_DIR/src
68
export FOAM_SRC=$WM_PROJECT_DIR/src
69
69
70
# shared site configuration - similar naming convention as ~OpenFOAM expansion
70
# shared site configuration - similar naming convention as ~OpenFOAM expansion
71
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
71
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin
72
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
72
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib
73
73
74
# user configuration
74
# user configuration
75
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
75
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin
76
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
76
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib
77
77
78
# convenience
78
# convenience
79
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
79
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
Lines 95-101 Link Here
95
# Select compiler installation
95
# Select compiler installation
96
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97
# compilerInstall = OpenFOAM | System
97
# compilerInstall = OpenFOAM | System
98
compilerInstall=OpenFOAM
98
compilerInstall=System
99
99
100
case "${compilerInstall:-OpenFOAM}" in
100
case "${compilerInstall:-OpenFOAM}" in
101
OpenFOAM)
101
OpenFOAM)
Lines 146-175 Link Here
146
146
147
case "$WM_MPLIB" in
147
case "$WM_MPLIB" in
148
OPENMPI)
148
OPENMPI)
149
    mpi_version=openmpi-1.3.3
149
    mpi_version=openmpi
150
    export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
150
#     export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
151
    export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
151
    export MPI_ARCH_PATH=/usr
152
152
153
    # Tell OpenMPI where to find its install directory
153
    # Tell OpenMPI where to find its install directory
154
    export OPAL_PREFIX=$MPI_ARCH_PATH
154
    export OPAL_PREFIX=$MPI_ARCH_PATH
155
155
156
    _foamAddPath $MPI_ARCH_PATH/bin
156
#     _foamAddPath $MPI_ARCH_PATH/bin
157
    _foamAddLib  $MPI_ARCH_PATH/lib
157
#     _foamAddLib  $MPI_ARCH_PATH/lib
158
158
159
    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
159
    export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version
160
    unset mpi_version
160
    unset mpi_version
161
    ;;
161
    ;;
162
162
163
MPICH)
163
MPICH)
164
    mpi_version=mpich-1.2.4
164
    mpi_version=mpich
165
    export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
165
#     export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
166
    export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
166
    export MPI_ARCH_PATH=/usr
167
    export MPICH_ROOT=$MPI_ARCH_PATH
167
    export MPICH_ROOT=$MPI_ARCH_PATH
168
168
169
    _foamAddPath $MPI_ARCH_PATH/bin
169
#     _foamAddPath $MPI_ARCH_PATH/bin
170
    _foamAddLib  $MPI_ARCH_PATH/lib
170
#     _foamAddLib  $MPI_ARCH_PATH/lib
171
171
172
    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
172
    export FOAM_MPI_LIBBIN=$FOAM_LIB/$mpi_version
173
    unset mpi_version
173
    unset mpi_version
174
    ;;
174
    ;;
175
175
(-)OpenFOAM-1.6-src/src/decompositionMethods/decompositionMethods/Make/options (-4 / +3 lines)
Lines 1-8 Link Here
1
EXE_INC = \
1
EXE_INC = \
2
    -I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch/lnInclude \
2
    -I/usr/include/scotch \
3
    -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include
3
    -I/usr/include/metis
4
4
5
LIB_LIBS = \
5
LIB_LIBS = \
6
    -lscotch \
6
    -lscotch \
7
    -lmetis \
7
    -lmetis
8
    -lGKlib
(-)OpenFOAM-1.6-src/src/decompositionMethods/parMetisDecomp/Make/options (-3 / +3 lines)
Lines 2-12 Link Here
2
2
3
EXE_INC = \
3
EXE_INC = \
4
    $(PFLAGS) $(PINC) \
4
    $(PFLAGS) $(PINC) \
5
    -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \
5
    -I/usr/include/parmetis \
6
    -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \
6
    -I/usr/include/metis \
7
    -I../decompositionMethods/lnInclude
7
    -I../decompositionMethods/lnInclude
8
8
9
LIB_LIBS = \
9
LIB_LIBS = \
10
    -L$(FOAM_MPI_LIBBIN) \
10
    -L$(FOAM_MPI_LIBBIN) \
11
    -lmetis-parmetis \
11
    -lmetis \
12
    -lparmetis
12
    -lparmetis
(-)OpenFOAM-1.6-src/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options (-4 / +2 lines)
Lines 1-5 Link Here
1
ParMGridGen = $(WM_THIRD_PARTY_DIR)/ParMGridGen-1.0
2
3
TYPE_REAL=
1
TYPE_REAL=
4
#if defined(WM_SP)
2
#if defined(WM_SP)
5
TYPE_REAL=-DTYPE_REAL
3
TYPE_REAL=-DTYPE_REAL
Lines 7-15 Link Here
7
5
8
EXE_INC = \
6
EXE_INC = \
9
    -I$(LIB_SRC)/finiteVolume/lnInclude \
7
    -I$(LIB_SRC)/finiteVolume/lnInclude \
10
    -I$(ParMGridGen)/MGridGen/Lib/lnInclude \
8
    -I/usr/include/mgridgen \
11
    -I$(ParMGridGen)/MGridGen/IMlib/lnInclude \
12
    $(TYPE_REAL)
9
    $(TYPE_REAL)
13
10
14
LIB_LIBS = \
11
LIB_LIBS = \
12
    -lIMlib \
15
    -lMGridGen
13
    -lMGridGen
(-)OpenFOAM-1.6-src/wmake/Makefile (-1 / +1 lines)
Lines 58-64 Link Here
58
58
59
LIB_SRC            = $(WM_PROJECT_DIR)/src
59
LIB_SRC            = $(WM_PROJECT_DIR)/src
60
LIB_DIR            = $(WM_PROJECT_DIR)/lib
60
LIB_DIR            = $(WM_PROJECT_DIR)/lib
61
LIB_WM_OPTIONS_DIR = $(LIB_DIR)/$(WM_OPTIONS)
61
LIB_WM_OPTIONS_DIR = $(LIB_DIR)
62
OBJECTS_DIR        = $(MAKE_DIR)/$(WM_OPTIONS)
62
OBJECTS_DIR        = $(MAKE_DIR)/$(WM_OPTIONS)
63
CLASSES_DIR        = $(MAKE_DIR)/classes
63
CLASSES_DIR        = $(MAKE_DIR)/classes
64
64
(-)OpenFOAM-1.6-src/bin/foamInstallationTest (-1 / +1 lines)
Lines 383-389 Link Here
383
383
384
384
385
checkOpenFOAMEnvironment() {
385
checkOpenFOAMEnvironment() {
386
    [ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || {
386
    [ -d "$WM_PROJECT_INST_DIR" ] || {
387
        echo ""
387
        echo ""
388
        echo "FATAL ERROR: OpenFOAM environment not configured."
388
        echo "FATAL ERROR: OpenFOAM environment not configured."
389
        echo ""
389
        echo ""

Return to bug 280586