ThirdParty: bumping Scotch to version 6.0.4

bumping hwloc to version 1.10.1
            Adjusting libccmio for Mac OSX Yosemite
            Adjustments for cmake 3.2.2
            Adding spec file for openmpi version 1.8.4
This commit is contained in:
Martin Beaudoin 2015-05-17 07:44:34 -04:00
parent e2b9bd5b80
commit ce2b0894c5
14 changed files with 710 additions and 20 deletions

View file

@ -122,6 +122,12 @@ fi
# Scotch
if [ -z "$SCOTCH_SYSTEM" ]
then
# Scotch 6.0.4
#
[ ! -z "$WM_THIRD_PARTY_USE_SCOTCH_604" ] && {
echo "Building Scotch 6.0.0"
( rpm_make -p scotch-6.0.4 -s scotch-6.0.4.spec -u http://gforge.inria.fr/frs/download.php/file/34618/scotch_6.0.4.tar.gz )
}
# Scotch 6.0.0
#
[ ! -z "$WM_THIRD_PARTY_USE_SCOTCH_600" ] && {
@ -184,6 +190,12 @@ fi
# hwloc
if [ -z "$HWLOC_SYSTEM" ]
then
# hwloc 1.10.1
#
[ ! -z "$WM_THIRD_PARTY_USE_HWLOC_1101" ] && {
echo "Building hwloc 1.10.1"
( rpm_make -p hwloc-1.10.1 -s hwloc-1.10.1.spec -u http://www.open-mpi.org/software/hwloc/v1.10/downloads/hwloc-1.10.1.tar.gz )
}
# hwloc 1.7.2
#
[ ! -z "$WM_THIRD_PARTY_USE_HWLOC_172" ] && {

View file

@ -7,7 +7,7 @@ diff -ruN libccmio-2.6.1_orig/config/config.gnu.to.star libccmio-2.6.1/config/co
# $Id: config.gnu.to.star,v 1.4 2006/06/05 21:12:16 geoffp Exp $
@@ -34,6 +34,10 @@
@@ -34,6 +34,11 @@
x86_64-unknown-linux-gnu-null) echo linux64_2.4-x86-glibc_2.2.5 ;;
ppc64-unknown-linux-gnu-null) echo linux64_2.6-pwr4-glibc_2.3.3 ;;
i386-apple-darwin8-null) echo i386-apple-darwin8 ;;
@ -15,6 +15,7 @@ diff -ruN libccmio-2.6.1_orig/config/config.gnu.to.star libccmio-2.6.1/config/co
+ i386-apple-darwin11-null) echo i386-apple-darwin11 ;;
+ i386-apple-darwin12-null) echo i386-apple-darwin12 ;;
+ i386-apple-darwin13-null) echo i386-apple-darwin13 ;;
+ i386-apple-darwin14-null) echo i386-apple-darwin14 ;;
*) echo unknown ;;
esac
@ -36,7 +37,7 @@ diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config.
# $Id: config.system,v 1.2 2005/09/29 22:19:19 geoffp Exp $
@@ -87,6 +87,21 @@
@@ -87,6 +87,24 @@
i386-apple-darwin8.11.1)
echo i386-apple-darwin8 ;;
@ -54,6 +55,9 @@ diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config.
+
+ i386-apple-darwin13.* )
+ echo i386-apple-darwin13 ;;
+
+ i386-apple-darwin14.* )
+ echo i386-apple-darwin14 ;;
+
*)
echo unknown

View file

@ -0,0 +1,44 @@
diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib
--- scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1969-12-31 19:00:00.000000000 -0500
+++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2010-10-31 15:44:58.000000000 -0400
@@ -0,0 +1,22 @@
+EXE =
+LIB = .dylib
+OBJ = .o
+
+MAKE = make
+AR = gcc
+ARFLAGS = -shared -dynamiclib -undefined dynamic_lookup -o
+
+CAT = cat
+CCS = gcc
+CCP = mpicc
+CCD = mpicc
+CFLAGS = -O3 -fPIC -DCOMMON_TIMING_OLD -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME
+LDFLAGS = -lz -lm
+LIBLDFLAGS = -dynamiclib -undefined dynamic_lookup
+CP = cp
+LEX = flex
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = ranlib
+YACC = bison -y
diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib
--- scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2010-08-07 00:02:42.000000000 -07
--- scotch_6.0.0_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2011-09-06 17:46:49.000000000 +0100
+++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2013-11-26 12:24:24.689990673 +0000
@@ -8,10 +8,10 @@
CAT = cat
CCS = gcc
CCP = mpicc
-CCD = gcc
-CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict
+CCD = mpicc -I$(MPI_HOME)/include
+CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -Xlinker --no-as-needed
CLIBFLAGS = -shared -fPIC
-LDFLAGS = -lz -lm -lrt
+LDFLAGS = -lpthread -lz -lm -lrt
CP = cp
LEX = flex -Pscotchyy -olex.yy.c
LN = ln

View file

@ -0,0 +1,25 @@
--- scotch_6.0.0_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1970-01-01 01:00:00.000000000 +0100
+++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2013-11-26 17:28:43.000000000 +0000
@@ -0,0 +1,22 @@
+EXE =
+LIB = .dylib
+OBJ = .o
+
+MAKE = make
+AR = gcc
+ARFLAGS = -shared -dynamiclib -undefined dynamic_lookup -o
+CAT = cat
+CCS = gcc
+CCP = mpicc
+CCD = mpicc
+CFLAGS = -O3 -Drestrict=__restrict -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DCOMMON_FILE_COMPRESS_GZ -DSCOTCH_RENAME
+CLIBFLAGS =
+LDFLAGS = -lz -lm
+LIBLDFLAGS = -dynamiclib -undefined dynamic_lookup
+CP = cp
+LEX = flex
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = ranlib
+YACC = bison -y

View file

@ -0,0 +1,150 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration |
# \\ / A nd | For copyright notice see file Copyright
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of foam-extend.
#
# foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# RPM spec file for hwloc-1.10.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2015)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# Disable the generation of debuginfo packages
%define debug_package %{nil}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in this file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name hwloc
%define release %{_WM_OPTIONS}
%define version 1.10.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: hwloc
License: the New BSD license
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.open-mpi.org/software/hwloc/v1.10/downloads/hwloc-1.10.1.tar.gz
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%build
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
./configure \
--prefix=%{_installPrefix}
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of foam-extend specific .csh and .sh files"
echo ""
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for foam-extend
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export HWLOC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export HWLOC_BIN_DIR=\$HWLOC_DIR/bin
# Enable access to the runtime package applications
[ -d \$HWLOC_BIN_DIR ] && _foamAddPath \$HWLOC_BIN_DIR
DOT_SH_EOF
#
# Generate package specific .csh file for foam-extend
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv HWLOC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
setenv HWLOC_BIN_DIR \$HWLOC_DIR/bin
if ( -e \$HWLOC_BIN_DIR ) then
_foamAddPath \$HWLOC_BIN_DIR
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -103,6 +103,7 @@ Patch0: libccmio-2.6.1.patch_0
[ ! -d config/i386-apple-darwin11 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin11
[ ! -d config/i386-apple-darwin12 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin12
[ ! -d config/i386-apple-darwin13 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin13
[ ! -d config/i386-apple-darwin14 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin14
%endif
# Warning:
# 1: The name of the ADF library will be renamed to libadf_ccmio since this

View file

@ -0,0 +1,265 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration |
# \\ / A nd | For copyright notice see file Copyright
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of foam-extend.
#
# foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# RPM spec file for openmpi-1.8.4
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2015)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# Disable the generation of debuginfo packages
%define debug_package %{nil}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in this file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name openmpi
%define release %{_WM_OPTIONS}
%define version 1.8.4
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: openmpi
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.open-mpi.org/software/ompi/v1.8/downloads
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
#--------------------------------------------------------------------------
#
# Here, we define default compiling options for openmpi
#
# One can override the option on the commande line : --define='MACRO EXPR'
#
%{!?_configureAdditionalArgs: %define _configureAdditionalArgs Undefined}
%description
%{summary}
%prep
%setup -q
%build
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
set +x
echo ""
echo "Compilation options:"
echo " _configureAdditionalArgs : %{_configureAdditionalArgs}"
echo ""
set -x
unset mpiWith
# Enable GridEngine if it appears to be in use
# If you don't want any integration with SGE, simply unset the SGE
# environment variable
if [ -n "$SGE_ROOT" ]
then
mpiWith="$mpiWith --with-sge"
else
mpiWith="$mpiWith --without-sge"
mpiWith="$mpiWith --enable-mca-no-build=ras-gridengine,pls-gridengine"
fi
# Infiniband support
# Adjust according to your local paths
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
# fi
./configure \
--prefix=%{_installPrefix} \
--exec_prefix=%{_installPrefix} \
--enable-mpirun-prefix-by-default \
--enable-orterun-prefix-by-default \
--enable-shared \
--enable-mpi-cxx \
--disable-static \
--disable-mpi-f77 \
--disable-mpi-f90 \
--without-slurm \
--enable-mpi-profile $mpiWith \
--disable-vt \
`echo %{?_configureAdditionalArgs}`
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
%install
make install DESTDIR=$RPM_BUILD_ROOT
# Creation of foam-extend specific .csh and .sh files"
echo ""
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for foam-extend
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export OPENMPI_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export OPENMPI_BIN_DIR=\$OPENMPI_DIR/bin
export OPENMPI_LIB_DIR=\$OPENMPI_DIR/lib
# Enable access to the package runtime applications and libraries
[ -d \$OPENMPI_BIN_DIR ] && _foamAddPath \$OPENMPI_BIN_DIR
[ -d \$OPENMPI_LIB_DIR ] && _foamAddLib \$OPENMPI_LIB_DIR
export MPI_HOME=\$OPENMPI_DIR
export MPI_ARCH_PATH=\$MPI_HOME
export OPAL_PREFIX=\$MPI_ARCH_PATH
# We initialize the rest of the environment using mpicc --showme:
export OPENMPI_INCLUDE_DIR="\`mpicc --showme:incdirs\`"
export OPENMPI_COMPILE_FLAGS="\`mpicc --showme:compile\`"
export OPENMPI_LINK_FLAGS="\`mpicc --showme:link\`"
# Set the foam-extend compilation flags
export PINC=\$OPENMPI_COMPILE_FLAGS
export PLIBS=\$OPENMPI_LINK_FLAGS
if [ "\$FOAM_VERBOSE" -a "\$PS1" ]
then
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
echo " OPENMPI_COMPILE_FLAGS : \$OPENMPI_COMPILE_FLAGS"
echo " OPENMPI_LINK_FLAGS : \$OPENMPI_LINK_FLAGS"
echo ""
echo " MPI_HOME : \$MPI_HOME"
echo " MPI_ARCH_PATH : \$MPI_ARCH_PATH"
echo " OPAL_PREFIX : \$OPAL_PREFIX"
echo " PINC : \$PINC"
echo " PLIBS : \$PLIBS"
fi
DOT_SH_EOF
#
# Generate package specific .csh file for foam-extend
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv OPENMPI_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
setenv OPENMPI_BIN_DIR \$OPENMPI_DIR/bin
setenv OPENMPI_LIB_DIR \$OPENMPI_DIR/lib
# Enable access to the package runtime applications and libraries
if ( -e \$OPENMPI_BIN_DIR ) then
_foamAddPath \$OPENMPI_BIN_DIR
endif
if ( -e \$OPENMPI_LIB_DIR ) then
_foamAddLib \$OPENMPI_LIB_DIR
endif
setenv MPI_HOME \$OPENMPI_DIR
setenv MPI_ARCH_PATH \$MPI_HOME
setenv OPAL_PREFIX \$MPI_ARCH_PATH
# We initialize the rest of the environment using mpicc --showme:
setenv OPENMPI_INCLUDE_DIR "\`mpicc --showme:incdirs\`"
setenv OPENMPI_COMPILE_FLAGS "\`mpicc --showme:compile\`"
setenv OPENMPI_LINK_FLAGS "\`mpicc --showme:link\`"
# Set the foam-extend compilation flags
setenv PINC "\$OPENMPI_COMPILE_FLAGS"
setenv PLIBS "\$OPENMPI_LINK_FLAGS"
if (\$?FOAM_VERBOSE && \$?prompt) then
echo " Environment variables defined for OpenMPI:"
echo " OPENMPI_BIN_DIR : \$OPENMPI_BIN_DIR"
echo " OPENMPI_LIB_DIR : \$OPENMPI_LIB_DIR"
echo " OPENMPI_INCLUDE_DIR : \$OPENMPI_INCLUDE_DIR"
echo " OPENMPI_COMPILE_FLAGS : \$OPENMPI_COMPILE_FLAGS"
echo " OPENMPI_LINK_FLAGS : \$OPENMPI_LINK_FLAGS"
echo ""
echo " MPI_HOME : \$MPI_HOME"
echo " MPI_ARCH_PATH : \$MPI_ARCH_PATH"
echo " OPAL_PREFIX : \$OPAL_PREFIX"
echo " PINC : \$PINC"
echo " PLIBS : \$PLIBS"
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}

View file

@ -0,0 +1,173 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration |
# \\ / A nd | For copyright notice see file Copyright
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of foam-extend.
#
# foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# RPM spec file for scotch-6.0.4
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2015)
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# Disable the generation of debuginfo packages
%define debug_package %{nil}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in this file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name scotch
%define release %{_WM_OPTIONS}
%define version 6.0.4
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: scotch
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: https://gforge.inria.fr/frs/download.php/31831
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: scotch-6.0.4_patch_0
Patch1: scotch-6.0.4_patch_darwin
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q -n %{name}_6.0.0
%ifos darwin
%patch1 -p1
%else
%patch0 -p1
%endif
%build
# export WM settings in a form that GNU configure recognizes
# [ -n "$WM_CC" ] && export CC="$WM_CC"
# [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS *****"
# [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
# [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
cd src
# Here, unfortunately, some hand tweaking might be necessary if your system is not running Linux or MacOS X
%ifos darwin
ln -s Make.inc/Makefile.inc.i686_mac_darwin10.shlib Makefile.inc
%else
ln -s Make.inc/Makefile.inc.i686_pc_linux2.shlib Makefile.inc
%endif
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS scotch CC="$WM_CC" CXX="$WM_CXX" CCD="$WM_CC" CCS="$WM_CC" AR="$WM_CC"
make -j $WM_NCOMPPROCS ptscotch AR="$WM_CC"
%install
cd src
mkdir -p $RPM_BUILD_ROOT%{_installPrefix}
make install prefix=$RPM_BUILD_ROOT%{_installPrefix}
# Creation of foam-extend specific .csh and .sh files"
echo ""
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for foam-extend
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export SCOTCH_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export SCOTCH_BIN_DIR=\$SCOTCH_DIR/bin
export SCOTCH_LIB_DIR=\$SCOTCH_DIR/lib
export SCOTCH_INCLUDE_DIR=\$SCOTCH_DIR/include
# Enable access to the runtime package applications and libraries
[ -d \$SCOTCH_BIN_DIR ] && _foamAddPath \$SCOTCH_BIN_DIR
[ -d \$SCOTCH_LIB_DIR ] && _foamAddLib \$SCOTCH_LIB_DIR
DOT_SH_EOF
#
# Generate package specific .csh file for foam-extend
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv SCOTCH_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
setenv SCOTCH_BIN_DIR \$SCOTCH_DIR/bin
setenv SCOTCH_LIB_DIR \$SCOTCH_DIR/lib
setenv SCOTCH_INCLUDE_DIR \$SCOTCH_DIR/include
if ( -e \$SCOTCH_BIN_DIR ) then
_foamAddPath \$SCOTCH_BIN_DIR
endif
if ( -e \$SCOTCH_LIB_DIR ) then
_foamAddLib \$SCOTCH_LIB_DIR
endif
DOT_CSH_EOF
#finally, generate a .tgz file for systems where using rpm for installing packages
# as a non-root user might be a problem.
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_installPrefix}/*

View file

@ -96,10 +96,10 @@ export WM_THIRD_PARTY_USE_METIS_510=1
export WM_THIRD_PARTY_USE_PARMGRIDGEN_10=1
export WM_THIRD_PARTY_USE_LIBCCMIO_261=1
export WM_THIRD_PARTY_USE_MESQUITE_212=1
export WM_THIRD_PARTY_USE_SCOTCH_600=1
export WM_THIRD_PARTY_USE_SCOTCH_604=1
export WM_THIRD_PARTY_USE_PARMETIS_403=1
export WM_THIRD_PARTY_USE_PYFOAM_064=1
export WM_THIRD_PARTY_USE_HWLOC_172=1
export WM_THIRD_PARTY_USE_HWLOC_1101=1
#
# For AllMake.stage4

View file

@ -89,10 +89,10 @@ setenv WM_THIRD_PARTY_USE_METIS_510 1
setenv WM_THIRD_PARTY_USE_PARMGRIDGEN_10 1
setenv WM_THIRD_PARTY_USE_LIBCCMIO_261 1
setenv WM_THIRD_PARTY_USE_MESQUITE_212 1
setenv WM_THIRD_PARTY_USE_SCOTCH_600 1
setenv WM_THIRD_PARTY_USE_SCOTCH_604 1
setenv WM_THIRD_PARTY_USE_PARMETIS_403 1
setenv WM_THIRD_PARTY_USE_PYFOAM_064 1
setenv WM_THIRD_PARTY_USE_HWLOC_172 1
setenv WM_THIRD_PARTY_USE_HWLOC_1101 1
#
# For AllMake.stage4

View file

@ -209,11 +209,13 @@ setenv WM_THIRD_PARTY_USE_METIS_510 1
setenv WM_THIRD_PARTY_USE_PARMGRIDGEN_10 1
setenv WM_THIRD_PARTY_USE_LIBCCMIO_261 1
setenv WM_THIRD_PARTY_USE_MESQUITE_212 1
setenv WM_THIRD_PARTY_USE_SCOTCH_600 1
setenv WM_THIRD_PARTY_USE_SCOTCH_604 1
#setenv WM_THIRD_PARTY_USE_SCOTCH_600 1
setenv WM_THIRD_PARTY_USE_PARMETIS_403 1
setenv WM_THIRD_PARTY_USE_ZOLTAN_36 1
setenv WM_THIRD_PARTY_USE_PYFOAM_064 1
setenv WM_THIRD_PARTY_USE_HWLOC_172 1
setenv WM_THIRD_PARTY_USE_HWLOC_1101 1
#setenv WM_THIRD_PARTY_USE_HWLOC_172 1
#
# For AllMake.stage4

View file

@ -219,11 +219,13 @@ export WM_THIRD_PARTY_USE_METIS_510=1
export WM_THIRD_PARTY_USE_PARMGRIDGEN_10=1
export WM_THIRD_PARTY_USE_LIBCCMIO_261=1
export WM_THIRD_PARTY_USE_MESQUITE_212=1
export WM_THIRD_PARTY_USE_SCOTCH_600=1
export WM_THIRD_PARTY_USE_SCOTCH_604=1
#export WM_THIRD_PARTY_USE_SCOTCH_600=1
export WM_THIRD_PARTY_USE_PARMETIS_403=1
export WM_THIRD_PARTY_USE_ZOLTAN_36=1
export WM_THIRD_PARTY_USE_PYFOAM_064=1
export WM_THIRD_PARTY_USE_HWLOC_172=1
export WM_THIRD_PARTY_USE_HWLOC_1101=1
#export WM_THIRD_PARTY_USE_HWLOC_172=1
#
# For AllMake.stage4

View file

@ -481,6 +481,10 @@ endif
# Scotch library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_604 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.csh
endif
if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_600 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.csh
endif
@ -495,12 +499,12 @@ endif
# cmake
# ~~~~~
if ( $?CMAKE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_CMAKE_2812 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.12/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS/etc/cmake-2.8.12.csh
if ( $?CMAKE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_CMAKE_322 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-3.2.2/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS/etc/cmake-3.2.2.csh
endif
if ( $?CMAKE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_CMAKE_311 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-3.2.2/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS/etc/cmake-3.2.2.csh
if ( $?CMAKE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_CMAKE_2812 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.12/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS/etc/cmake-2.8.12.csh
endif
# m4
@ -547,6 +551,9 @@ endif
if ( $?HWLOC_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_HWLOC_172 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/hwloc-1.7.2/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS/etc/hwloc-1.7.2.csh
endif
if ( $?HWLOC_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_HWLOC_1101 != 0 && -e "$WM_THIRD_PARTY_DIR"/packages/hwloc-1.10.1/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.10.1/platforms/$WM_OPTIONS/etc/hwloc-1.10.1.csh
endif
# QT
# ~~~~~

View file

@ -593,6 +593,11 @@ export MPI_BUFFER_SIZE
# Load Scotch library
# ~~~~~~~~~~~~~~~~~~~
[ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_604 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"
[ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_600 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.sh
}
@ -601,17 +606,14 @@ export MPI_BUFFER_SIZE
# Load cmake
# ~~~~~~~~~~
[ -z "$CMAKE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_CMAKE_322 ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS/etc/cmake-3.2.2.sh
}
[ -z "$CMAKE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_CMAKE_2812 ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS/etc/cmake-2.8.12.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR"
[ -z "$CMAKE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_CMAKE_311 ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS/etc/cmake-3.2.2.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR"
# Load m4
# ~~~~~~~~~~
[ -z "$M4_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_M4_1416 ] && [ -e $WM_THIRD_PARTY_DIR/packages/m4-1.4.16/platforms/$WM_OPTIONS ] && {
@ -670,6 +672,9 @@ fi
# Load hwloc
# ~~~~~~~~~~~
[ -z "$HWLOC_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_HWLOC_1101 ] && [ -e $WM_THIRD_PARTY_DIR/packages/hwloc-1.10.1/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.10.1/platforms/$WM_OPTIONS/etc/hwloc-1.10.1.sh
}
[ -z "$HWLOC_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_HWLOC_172 ] && [ -e $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS/etc/hwloc-1.7.2.sh
}