Updating the ThirdParty packages env. variables before compiling a new package. Applying same recipe before compiling the OpenFOAM source code.
This commit is contained in:
parent
c787812631
commit
8156ee2b1f
4 changed files with 35 additions and 19 deletions
6
Allwmake
6
Allwmake
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
if [ "$PWD" != "$WM_PROJECT_DIR" ]
|
||||
|
@ -16,6 +16,10 @@ fi
|
|||
#( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
||||
( cd $WM_THIRD_PARTY_DIR && ./AllMake )
|
||||
|
||||
# We make sure the ThirdParty packages environment variables are up-to-date
|
||||
# before compiling the rest of OpenFOAM
|
||||
. $WM_PROJECT_DIR/etc/settings.sh
|
||||
|
||||
# build OpenFOAM libraries and applications
|
||||
src/Allwmake
|
||||
applications/Allwmake
|
||||
|
|
25
ThirdParty/AllMake.stage3
vendored
25
ThirdParty/AllMake.stage3
vendored
|
@ -56,7 +56,6 @@ echo Starting ThirdParty AllMake: Stage3
|
|||
echo ========================================
|
||||
echo
|
||||
|
||||
|
||||
# Metis
|
||||
( rpm_make metis-5.0pre2 http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.0pre2.tar.gz )
|
||||
|
||||
|
@ -69,25 +68,17 @@ echo
|
|||
# Mesquite
|
||||
( rpm_make mesquite-2.1.2 http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz )
|
||||
|
||||
# The following two packages depends on the availability of OpenMPI
|
||||
# The macro rpm_make() will make sure to update the ThirdParty environment variables before starting
|
||||
# the compilation.
|
||||
# Just make sure the OpenMPI environment variables are properly initialized, or that
|
||||
# the AllMake.stage2 script completed correctly
|
||||
#
|
||||
# Scotch
|
||||
if [ -d "$OPENMPI_DIR" ]; then
|
||||
( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
|
||||
else
|
||||
echo "WARNING: The OPENMPI_DIR environment variable is not set."
|
||||
echo "WARNING: Please make sure your environment is properly set up for openmpi. This is necessary for compiling scotch-5.1.10b"
|
||||
echo "WARNING: Skipping the compilation of scotch-5.1.10b"
|
||||
echo ""
|
||||
fi
|
||||
( rpm_make scotch-5.1.10b https://gforge.inria.fr/frs/download.php/27583/scotch-5.1.10b.tar.gz )
|
||||
|
||||
# ParMetis
|
||||
if [ -d "$OPENMPI_DIR" ]; then
|
||||
( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
|
||||
else
|
||||
echo "WARNING: The OPENMPI_DIR environment variable is not set."
|
||||
echo "WARNING: Please make sure your environment is properly set up for openmpi. This is necessary for compiling ParMetis-3.1.1"
|
||||
echo "WARNING: Skipping the compilation of ParMetis-3.1.1"
|
||||
echo ""
|
||||
fi
|
||||
( rpm_make ParMetis-3.1.1 http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.1.tar.gz )
|
||||
|
||||
echo ========================================
|
||||
echo Done ThirdParty AllMake: Stage3
|
||||
|
|
10
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
10
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
|
@ -50,6 +50,11 @@ echo ""
|
|||
rpm_make()
|
||||
{
|
||||
package="$1"
|
||||
|
||||
# Make sure the ThirdParty environment is up-to-date
|
||||
echo "Updating the ThirdParty environment variables before building package $package"
|
||||
. $WM_PROJECT_DIR/etc/settings.sh
|
||||
|
||||
rpmName=$package-$WM_OPTIONS.$architecture
|
||||
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
||||
|
||||
|
@ -121,7 +126,10 @@ rpm_build()
|
|||
|
||||
#Build RPM package
|
||||
echo "Building package $package"
|
||||
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
|
||||
#rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
|
||||
#
|
||||
# Let's keep the compilation directory alive for now in order to facilitate postmortems of failed compilations
|
||||
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"
|
||||
}
|
||||
|
||||
#
|
||||
|
|
|
@ -55,6 +55,19 @@ _foamAddLib()
|
|||
done
|
||||
}
|
||||
|
||||
# Source files, possibly with some verbosity
|
||||
# Yes, this is the same definition as in the file etc/bash
|
||||
# We need that definition available for scripts sourcing
|
||||
# settings.sh directly.
|
||||
_foamSource()
|
||||
{
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
|
||||
. $1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
# location of the jobControl directory
|
||||
export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl
|
||||
|
|
Reference in a new issue