Apply changes to build for both mpich and openmpi
This commit is contained in:
parent
6d9e31bdab
commit
cac1297a27
@ -1,20 +0,0 @@
|
||||
EXE =
|
||||
LIB = .a
|
||||
OBJ = .o
|
||||
|
||||
MAKE = make
|
||||
AR = ar
|
||||
ARFLAGS = -ruv
|
||||
CAT = cat
|
||||
CCS = gcc
|
||||
CCP = mpicc
|
||||
CCD = mpicc
|
||||
CFLAGS = @RPMFLAGS@ -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_FILE_COMPRESS_BZ2 -DCOMMON_FILE_COMPRESS_LZMA -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -DSCOTCH_PTHREAD_NUMBER=2 -DSCOTCH_PTHREAD_AFFINITY_LINUX -Drestrict=__restrict
|
||||
LDFLAGS = -lpthread -lz -lbz2 -llzmadec -lm -lrt
|
||||
CP = cp -a
|
||||
LEX = flex -Pscotchyy -olex.yy.c
|
||||
LN = ln
|
||||
MKDIR = mkdir -p
|
||||
MV = mv
|
||||
RANLIB = ranlib
|
||||
YACC = bison -pscotchyy -y -b y
|
24
scotch-Makefile.shared.inc.in
Normal file
24
scotch-Makefile.shared.inc.in
Normal file
@ -0,0 +1,24 @@
|
||||
EXE =
|
||||
LIB = .so
|
||||
OBJ = .o
|
||||
|
||||
MAKE = make
|
||||
AR = gcc
|
||||
ARFLAGS = -shared -Wl,-soname=$@.0 -o
|
||||
CAT = cat
|
||||
CCS = gcc
|
||||
CCP = mpicc
|
||||
CCD = mpicc
|
||||
CFLAGS = @RPMFLAGS@ \
|
||||
-DCOMMON_FILE_COMPRESS_GZ -DCOMMON_FILE_COMPRESS_BZ2 -DCOMMON_FILE_COMPRESS_LZMA \
|
||||
-DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD \
|
||||
-Drestrict=__restrict -DIDXSIZE64
|
||||
CLIBFLAGS = -shared -fPIC
|
||||
LDFLAGS = -lz -lbz2 -llzmadec -lm -lrt -lpthread
|
||||
CP = cp -av
|
||||
LEX = flex
|
||||
LN = ln
|
||||
MKDIR = mkdir -p
|
||||
MV = mv
|
||||
RANLIB = echo
|
||||
YACC = bison -y
|
24
scotch-Makefile.static.inc.in
Normal file
24
scotch-Makefile.static.inc.in
Normal file
@ -0,0 +1,24 @@
|
||||
EXE =
|
||||
LIB = .a
|
||||
OBJ = .o
|
||||
|
||||
MAKE = make
|
||||
AR = ar
|
||||
ARFLAGS = -ruv
|
||||
CAT = cat
|
||||
CCS = gcc
|
||||
CCP = mpicc
|
||||
CCD = mpicc
|
||||
CFLAGS = @RPMFLAGS@ \
|
||||
-DCOMMON_FILE_COMPRESS_GZ -DCOMMON_FILE_COMPRESS_BZ2 -DCOMMON_FILE_COMPRESS_LZMA \
|
||||
-DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD \
|
||||
-Drestrict=__restrict -DIDXSIZE64
|
||||
CLIBFLAGS =
|
||||
LDFLAGS = -lz -lbz2 -llzmadec -lm -lrt -lpthread
|
||||
CP = cp -av
|
||||
LEX = flex
|
||||
LN = ln
|
||||
MKDIR = mkdir -p
|
||||
MV = mv
|
||||
RANLIB = ranlib
|
||||
YACC = bison -y
|
308
scotch.spec
308
scotch.spec
@ -1,17 +1,20 @@
|
||||
Summary: Graph, mesh and hypergraph partitioning library
|
||||
Name: scotch
|
||||
Version: 6.0.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: CeCILL-C
|
||||
Group: Development/Libraries
|
||||
URL: http://www.labri.fr/perso/pelegrin/scotch/
|
||||
Source0: https://gforge.inria.fr/frs/download.php/31831/%{name}_%{version}.tar.gz
|
||||
Source1: scotch-Makefile.inc.in
|
||||
BuildRequires: flex bison mpich-devel zlib-devel bzip2-devel lzma-devel
|
||||
Source0: https://gforge.inria.fr/frs/download.php/27583/%{name}_%{version}.tar.gz
|
||||
Source1: scotch-Makefile.static.inc.in
|
||||
Source2: scotch-Makefile.shared.inc.in
|
||||
BuildRequires: flex bison zlib-devel bzip2-devel lzma-devel
|
||||
Requires: %{name}-doc = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Scotch is a software package for graph and mesh/hypergraph partitioning and
|
||||
sparse matrix ordering.
|
||||
sparse matrix ordering. The parallel scotch lbrariries are packaged in the
|
||||
ptscotch sub-packages.
|
||||
|
||||
%package devel
|
||||
Summary: Development libraries for scotch
|
||||
@ -21,68 +24,163 @@ Requires: %{name} = %{version}-%{release}
|
||||
%description devel
|
||||
This package contains development libraries for scotch.
|
||||
|
||||
%package static
|
||||
Summary: Development libraries for scotch
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%description static
|
||||
This package contains libscotch static libraries.
|
||||
|
||||
%package doc
|
||||
Summary: Documentations and example for scotch and ptscotch
|
||||
Group: Documentation
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Contains documentations and example for scotch and ptscotch
|
||||
|
||||
%package -n ptscotch-mpich
|
||||
Summary: PT-Scotch libraries compiled against mpich
|
||||
Group: Development/Libraries
|
||||
BuildRequires: mpich-devel
|
||||
Requires: environment-modules mpich
|
||||
Requires: %{name}-doc = %{version}-%{release}
|
||||
|
||||
%description -n ptscotch-mpich
|
||||
Scotch is a software package for graph and mesh/hypergraph partitioning and
|
||||
sparse matrix ordering. This sub-package provides parallelized scotch libraries
|
||||
compiled with mpich
|
||||
|
||||
%package -n ptscotch-mpich-devel
|
||||
Summary: Development libraries for PT-Scotch (mpich)
|
||||
Group: Development/Libraries
|
||||
Requires: pt%{name}-mpich = %{version}-%{release}
|
||||
|
||||
%description -n ptscotch-mpich-devel
|
||||
This package contains development libraries for PT-Scotch, compiled against
|
||||
mpich.
|
||||
|
||||
%package -n ptscotch-mpich-static
|
||||
Summary: Static PT-Scotch libraries compiled against mpich
|
||||
Group: Development/Libraries
|
||||
Requires: pt%{name}-mpich-devel = %{version}-%{release}
|
||||
|
||||
%description -n ptscotch-mpich-static
|
||||
This package contains static libraries for Scotch, compiled against mpich.
|
||||
|
||||
%package -n ptscotch-openmpi
|
||||
Summary: PT-Scotch libraries compiled against openmpi
|
||||
Group: Development/Libraries
|
||||
BuildRequires: openmpi-devel
|
||||
Requires: environment-modules openmpi
|
||||
Requires: %{name}-doc = %{version}-%{release}
|
||||
|
||||
%description -n ptscotch-openmpi
|
||||
Scotch is a software package for graph and mesh/hypergraph partitioning and
|
||||
sparse matrix ordering. This sub-package provides parallelized scotch libraries
|
||||
compiled with openmpi
|
||||
|
||||
%package -n ptscotch-openmpi-devel
|
||||
Summary: Development libraries for PT-Scotch (openmpi)
|
||||
Group: Development/Libraries
|
||||
Requires: pt%{name}-openmpi = %{version}-%{release}
|
||||
|
||||
%description -n ptscotch-openmpi-devel
|
||||
This package contains development libraries for PT-Scotch, compiled against openmpi.
|
||||
|
||||
%package -n ptscotch-openmpi-static
|
||||
Summary: Static PT-Scotch libraries compiled against openmpi
|
||||
Group: Development/Libraries
|
||||
Requires: pt%{name}-openmpi-devel = %{version}-%{release}
|
||||
|
||||
%description -n ptscotch-openmpi-static
|
||||
This package contains static libraries for Scotch, compiled against openmpi.
|
||||
|
||||
%prep
|
||||
%setup -q -n scotch_%{version}
|
||||
sed s/@RPMFLAGS@/'%{optflags} -fPIC'/ < %SOURCE1 > src/Makefile.inc
|
||||
%setup -c -q -n scotch_%{version}
|
||||
pushd scotch_%{version}
|
||||
sed s/@RPMFLAGS@/'%{optflags} -fPIC'/ < %SOURCE1 > src/Makefile.static.inc
|
||||
sed s/@RPMFLAGS@/'%{optflags} -fPIC'/ < %SOURCE2 > src/Makefile.shared.inc
|
||||
popd
|
||||
|
||||
cp -ap scotch_%{version} scotch_%{version}_mpich
|
||||
cp -ap scotch_%{version} scotch_%{version}_openmpi
|
||||
|
||||
%build
|
||||
cd src/
|
||||
make %{?_smp_mflags}
|
||||
gcc -shared -Wl,-soname=libscotcherr.so.0 -o ../lib/libscotcherr.so.0.0 \
|
||||
libscotch/library_error.o
|
||||
gcc -shared -Wl,-soname=libscotcherrexit.so.0 -o \
|
||||
../lib/libscotcherrexit.so.0.0 libscotch/library_error_exit.o
|
||||
rm -f libscotch/library_error*.o
|
||||
gcc -shared -Wl,-soname=libscotch.so.0 -o ../lib/libscotch.so.0.0 \
|
||||
libscotch/*.o ../lib/libscotcherr.so.0.0 -lpthread -lgfortran -lz -lbz2 -llzmadec -lrt
|
||||
gcc -shared -Wl,-soname=libscotchmetis.so.0 -o ../lib/libscotchmetis.so.0.0\
|
||||
libscotchmetis/*.o ../lib/libscotch.so.0.0 ../lib/libscotcherr.so.0.0
|
||||
module purge
|
||||
|
||||
%{_mpich_load}
|
||||
%define dosingle() \
|
||||
rm -f Makefile.inc; \
|
||||
ln -s Makefile.static.inc Makefile.inc; \
|
||||
make %{?_smp_mflags}; \
|
||||
rm -f Makefile.inc; \
|
||||
ln -s Makefile.shared.inc Makefile.inc; \
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%define dobuild() \
|
||||
rm -f Makefile.inc; \
|
||||
ln -s Makefile.static.inc Makefile.inc; \
|
||||
make %{?_smp_mflags} ptscotch; \
|
||||
rm Makefile.inc; \
|
||||
ln -s Makefile.shared.inc Makefile.inc; \
|
||||
make %{?_smp_mflags} ptscotch
|
||||
mpicc -shared -Wl,-soname=libptscotcherr.so.0 -o ../lib/libptscotcherr.so.0.0\
|
||||
libscotch/library_error.o
|
||||
mpicc -shared -Wl,-soname=libptscotcherrexit.so.0 -o \
|
||||
../lib/libptscotcherrexit.so.0.0 libscotch/library_error_exit.o
|
||||
rm -f libscotch/library_error*.o
|
||||
mpicc -shared -Wl,-soname=libptscotch.so.0 -o ../lib/libptscotch.so.0.0 \
|
||||
libscotch/*.o ../lib/libptscotcherr.so.0.0 -lgfortran -lz -lbz2 -llzmadec
|
||||
mpicc -shared -Wl,-soname=libptscotchparmetis.so.0 -o \
|
||||
../lib/libptscotchparmetis.so.0.0 libscotchmetis/*.o \
|
||||
../lib/libptscotch.so.0.0 ../lib/libptscotcherr.so.0.0
|
||||
|
||||
pushd scotch_%{version}/src/
|
||||
%dosingle
|
||||
popd
|
||||
|
||||
pushd scotch_%{version}_mpich/src/
|
||||
%{_mpich_load}
|
||||
%dobuild
|
||||
%{_mpich_unload}
|
||||
popd
|
||||
|
||||
module purge
|
||||
|
||||
pushd scotch_%{version}_openmpi/src/
|
||||
%{_openmpi_load}
|
||||
%dobuild
|
||||
%{_openmpi_unload}
|
||||
popd
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
pushd src/
|
||||
make install prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} \
|
||||
includedir=%{buildroot}%{_includedir}/%{name}-%{_arch}/
|
||||
module purge
|
||||
|
||||
%define doinst() \
|
||||
pushd src/; \
|
||||
rm -f Makefile.inc; \
|
||||
ln -s Makefile.static.inc Makefile.inc; \
|
||||
make %{?_smp_mflags} install %*; \
|
||||
rm -f Makefile.inc; \
|
||||
ln -s Makefile.shared.inc Makefile.inc; \
|
||||
make %{?_smp_mflags} install %*; \
|
||||
popd \
|
||||
pushd $libdir; \
|
||||
for lib in *.so; do \
|
||||
mv $lib $lib.0.0; \
|
||||
ln -s $lib.0.0 $lib; \
|
||||
ln -s $lib.0.0 $lib.0; \
|
||||
done; \
|
||||
popd
|
||||
cp -pr include/*metis.h %{buildroot}%{_includedir}/%{name}-%{_arch}/
|
||||
|
||||
pushd lib
|
||||
for static_libs in lib*scotch*.a ; do
|
||||
libs=`basename $static_libs .a`
|
||||
ln -s $libs.so.0.0 $libs.so.0
|
||||
ln -s $libs.so.0.0 $libs.so
|
||||
rm -f $static_libs
|
||||
done
|
||||
cp -dp lib*scotch*.so* %{buildroot}%{_libdir}/
|
||||
pushd scotch_%{version}/
|
||||
export libdir=%{buildroot}%{_libdir}
|
||||
%doinst prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir}
|
||||
|
||||
pushd %{buildroot}%{_bindir}/
|
||||
for prog in *; do
|
||||
mv $prog scotch_$prog
|
||||
done
|
||||
popd
|
||||
rm -f %{buildroot}%{_libdir}/*.a
|
||||
|
||||
rm -f %{buildroot}%{_bindir}/*
|
||||
rm -f %{buildroot}%{_mandir}/man1/*
|
||||
pushd man/man1
|
||||
for progs in *.1 ; do
|
||||
prog=`basename $progs .1`
|
||||
cp -dp ../../bin/$prog %{buildroot}%{_bindir}/scotch_$prog
|
||||
cp -dp $progs %{buildroot}%{_mandir}/man1/scotch_$progs
|
||||
done
|
||||
pushd %{buildroot}%{_mandir}/man1/
|
||||
rm -f d*
|
||||
for prog in *; do
|
||||
mv $prog scotch_$prog
|
||||
done
|
||||
popd
|
||||
pushd %{buildroot}%{_bindir}
|
||||
rm -f scotch_dgpart && ln -s ./scotch_dgmap scotch_dgpart
|
||||
rm -f scotch_gpart && ln -s ./scotch_gmap scotch_gpart
|
||||
popd
|
||||
|
||||
@ -94,24 +192,106 @@ mv -f CeCILL-C_V1-en.txt.conv CeCILL-C_V1-en.txt
|
||||
mv -f CeCILL-C_V1-fr.txt.conv CeCILL-C_V1-fr.txt
|
||||
popd
|
||||
|
||||
popd
|
||||
|
||||
pushd scotch_%{version}_mpich
|
||||
%{_mpich_load}
|
||||
export libdir=%{buildroot}/${MPI_LIB}
|
||||
%doinst prefix=%{buildroot}/${MPI_HOME} libdir=%{buildroot}/${MPI_LIB} includedir=%{buildroot}/${MPI_INCLUDE} mandir=%{buildroot}/${MPI_MAN} bindir=%{buildroot}/${MPI_BIN}
|
||||
|
||||
pushd bin
|
||||
for prog in *; do
|
||||
mv $prog %{buildroot}/${MPI_BIN}/scotch_${prog}
|
||||
done
|
||||
popd
|
||||
|
||||
pushd %{buildroot}/${MPI_MAN}/man1/
|
||||
rm -f {a,g,m}*
|
||||
for man in *; do
|
||||
mv ${man} scotch_${man}
|
||||
done
|
||||
popd
|
||||
%{_mpich_unload}
|
||||
popd
|
||||
|
||||
module purge
|
||||
|
||||
pushd scotch_%{version}_openmpi
|
||||
%{_openmpi_load}
|
||||
export libdir=%{buildroot}/${MPI_LIB}
|
||||
%doinst prefix=%{buildroot}/${MPI_HOME} libdir=%{buildroot}/${MPI_LIB} includedir=%{buildroot}/${MPI_INCLUDE} mandir=%{buildroot}/${MPI_MAN} bindir=%{buildroot}/${MPI_BIN}
|
||||
|
||||
pushd bin
|
||||
for prog in *; do
|
||||
mv $prog %{buildroot}/${MPI_BIN}/scotch_${prog}
|
||||
done
|
||||
popd
|
||||
|
||||
pushd %{buildroot}/${MPI_MAN}/man1/
|
||||
rm -f {a,g,m}*
|
||||
for man in *; do
|
||||
mv ${man} scotch_${man}
|
||||
done
|
||||
popd
|
||||
%{_openmpi_unload}
|
||||
popd
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post -n ptscotch-mpich -p /sbin/ldconfig
|
||||
|
||||
%postun -n ptscotch-mpich -p /sbin/ldconfig
|
||||
|
||||
%post -n ptscotch-openmpi -p /sbin/ldconfig
|
||||
|
||||
%postun -n ptscotch-openmpi -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.txt doc/*
|
||||
%{_bindir}/*
|
||||
%{_libdir}/lib*scotch*.so.*
|
||||
%{_libdir}/libscotch*.so.*
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/lib*scotch*.so
|
||||
%{_includedir}/%{name}-%{_arch}/*scotch*.h
|
||||
%{_includedir}/%{name}-%{_arch}/*metis.h
|
||||
%{_libdir}/libscotch*.so
|
||||
%{_includedir}/*scotch*.h
|
||||
|
||||
%files static
|
||||
%{_libdir}/libscotch*.a
|
||||
|
||||
%files -n ptscotch-mpich
|
||||
%{_libdir}/mpich/lib/lib*.so.*
|
||||
%{_libdir}/mpich/bin/*
|
||||
%{_mandir}/mpich/*
|
||||
|
||||
%files -n ptscotch-openmpi
|
||||
%{_libdir}/openmpi/lib/lib*.so.*
|
||||
%{_libdir}/openmpi/bin/*
|
||||
%{_mandir}/openmpi*/*
|
||||
|
||||
%files -n ptscotch-mpich-devel
|
||||
%{_includedir}/mpich*/*scotch*.h
|
||||
%{_libdir}/mpich/lib/lib*.so
|
||||
|
||||
%files -n ptscotch-openmpi-devel
|
||||
%{_includedir}/openmpi*/*scotch*.h
|
||||
%{_libdir}/openmpi/lib/lib*.so
|
||||
|
||||
%files -n ptscotch-mpich-static
|
||||
%{_libdir}/mpich/lib/lib*.a
|
||||
|
||||
%files -n ptscotch-openmpi-static
|
||||
%{_libdir}/openmpi/lib/lib*.a
|
||||
|
||||
%files doc
|
||||
%doc scotch_%{version}/README.txt scotch_%{version}/doc/*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 27 2014 Deji Akingunola <dakingun@gmail.com> - 6.0.0-5
|
||||
- Slightly modified Erik Zeek spec re-write (See 2012-10-08 below)
|
||||
- Rename mpich and openmpi subpackages as ptscotch-(mpich/openmpi) (Laurence Mcglashan)
|
||||
|
||||
* Mon Feb 24 2014 Deji Akingunola <dakingun@gmail.com> - 6.0.0-4
|
||||
- Rebuild for mpich-3.1
|
||||
|
||||
@ -132,6 +312,12 @@ popd
|
||||
* Sat Nov 17 2012 Deji Akingunola <dakingun@gmail.com> - 5.1.12-1.b
|
||||
- Update to 5.1.12b
|
||||
|
||||
* Mon Oct 08 2012 Erik Zeek <eczeek@sandia.gov> - 5.1.11-4
|
||||
- Use internal build machinery to build shared libraries.
|
||||
- A bunch of MPI love.
|
||||
- Install Mpich2 libraries in the proper path.
|
||||
- Provide Mpich2 and OpenMPI libraries.
|
||||
|
||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.11-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
@ -172,8 +358,8 @@ popd
|
||||
* Wed May 13 2009 Deji Akingunola <dakingun@gmail.com> - 5.1.6-1
|
||||
- Update to 5.1.6
|
||||
|
||||
* Sat Nov 21 2008 Deji Akingunola <dakingun@gmail.com> - 5.1.2-1
|
||||
* Fri Nov 21 2008 Deji Akingunola <dakingun@gmail.com> - 5.1.2-1
|
||||
- Update to 5.1.2
|
||||
|
||||
* Tue Sep 19 2008 Deji Akingunola <dakingun@gmail.com> - 5.1.1-1
|
||||
* Fri Sep 19 2008 Deji Akingunola <dakingun@gmail.com> - 5.1.1-1
|
||||
- initial package creation
|
||||
|
Loading…
Reference in New Issue
Block a user