rpms/blacs/devel Bmake.inc,1.9,1.10 blacs.spec,1.32,1.33
Tom Callaway
spot at fedoraproject.org
Fri Aug 7 02:41:37 UTC 2009
- Previous message (by thread): rpms/anaconda/devel .cvsignore, 1.651, 1.652 anaconda.spec, 1.801, 1.802 sources, 1.785, 1.786
- Next message (by thread): rpms/scalapack/devel scalapack-1.7-fedora.patch, 1.9, 1.10 scalapack.spec, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: spot
Update of /cvs/pkgs/rpms/blacs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29151
Modified Files:
Bmake.inc blacs.spec
Log Message:
rework for new MPI model
Index: Bmake.inc
===================================================================
RCS file: /cvs/pkgs/rpms/blacs/devel/Bmake.inc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- Bmake.inc 23 Sep 2008 16:03:50 -0000 1.9
+++ Bmake.inc 7 Aug 2009 02:41:37 -0000 1.10
@@ -13,7 +13,7 @@
# -----------------------------
# The top level BLACS directory
# -----------------------------
- BTOPdir = $(RPM_BUILD_DIR)/blacs/BLACS
+ BTOPdir = $(RPM_BUILD_DIR)/blacs/BLACS-FOO
# ---------------------------------------------------------------------------
# The communication library your BLACS have been written for.
Index: blacs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/blacs/devel/blacs.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- blacs.spec 24 Jul 2009 18:09:01 -0000 1.32
+++ blacs.spec 7 Aug 2009 02:41:37 -0000 1.33
@@ -1,7 +1,32 @@
+# These macros will go away soon. Hopefully.
+%global _openmpi_load \
+ . /etc/profile.d/modules.sh; \
+ module load openmpi-%{_arch}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _openmpi_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload openmpi-%{_arch};
+
+%global _lam_load \
+ . /etc/profile.d/modules.sh; \
+ module load lam-%{_arch}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _lam_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload lam-%{_arch};
+
+%global _mpich2_load \
+ . /etc/profile.d/modules.sh; \
+ module load mpich2-%{__isa_bits}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _mpich2_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload mpich2-%{__isa_bits};
+
Summary: Basic Linear Algebra Communication Subprograms
Name: blacs
Version: 1.1
-Release: 32%{?dist}
+Release: 33%{?dist}
License: Public Domain
Group: Development/Libraries
URL: http://www.netlib.org/blacs
@@ -14,8 +39,7 @@ Source5: http://www.netlib.org/blacs/f77
Source6: http://www.netlib.org/blacs/cblacsqref.ps
Source7: http://www.netlib.org/blacs/lawn94.ps
BuildRequires: gcc-gfortran
-BuildRequires: lapack, blas, openmpi-devel
-Requires: lapack, blas
+BuildRequires: lapack, blas
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: blacs-fedora.patch
@@ -30,30 +54,121 @@ algorithms makes it impractical to rewri
parallel machine. The BLACS exist in order to make linear algebra
applications both easier to program and more portable.
-%package devel
-Summary: Development libraries for blacs
+%package common
+Summary: Common files for blacs
+Group: Development/Libraries
+Requires: lapack, blas
+
+%description common
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This file contains common files which are not specific to any MPI implementation.
+
+%package lam
+Summary: BLACS libraries compiled against lam
+Group: Development/Libraries
+BuildRequires: lam-devel
+Requires: %{name}-common = %{version}-%{release}
+Requires: environment-modules
+
+%description lam
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This package contains BLACS libraries compiled with lam.
+
+%package lam-devel
+Summary: Development libraries for blacs (lam)
+Group: Development/Libraries
+Requires: %{name}-lam = %{version}-%{release}
+Provides: %{name}-lam-static = %{version}-%{release}
+
+%description lam-devel
+This package contains development libraries for blacs, compiled against lam.
+
+%package mpich2
+Summary: BLACS libraries compiled against mpich2
+Group: Development/Libraries
+BuildRequires: mpich2-devel
+Requires: %{name}-common = %{version}-%{release}
+Requires: environment-modules
+
+%description mpich2
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This package contains BLACS libraries compiled with mpich2.
+
+%package mpich2-devel
+Summary: Development libraries for blacs (mpich2)
+Group: Development/Libraries
+Requires: %{name}-mpich2 = %{version}-%{release}
+Provides: %{name}-mpich2-static = %{version}-%{release}
+
+%description mpich2-devel
+This package contains development libraries for blacs, compiled against mpich2.
+
+%package openmpi
+Summary: BLACS libraries compiled against openmpi
+Group: Development/Libraries
+Requires: %{name}-common = %{version}-%{release}
+Requires: environment-modules
+
+%description openmpi
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This package contains BLACS libraries compiled with openmpi.
+
+%package openmpi-devel
+Summary: Development libraries for blacs (openmpi)
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+BuildRequires: openmpi-devel
+Requires: %{name}-openmpi = %{version}-%{release}
+Provides: %{name}-openmpi-static = %{version}-%{release}
-%description devel
-This package contains development libraries for blacs.
+%description openmpi-devel
+This package contains development libraries for blacs, compiled against openmpi.
%prep
%setup -q -c -n %{name}
%patch0 -p1
-cd BLACS/
-cp -f %{SOURCE1} .
-
-%build
-cd BLACS/
-CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-fstack-protector//g'`
-RPM_OPT_FLAGS=`echo $CFLAGS`
-make mpi
-
-cd TESTING/
-make
-cd ../..
+for i in lam mpich2 openmpi; do
+ cp -a BLACS BLACS-$i
+ cp -f %{SOURCE1} BLACS-$i/
+ sed -i "s|FOO|$i|g" BLACS-$i/Bmake.inc
+done
+# copy in docs:
cp %{SOURCE2} mpi_prop.ps
cp %{SOURCE3} blacs_install.ps
cp %{SOURCE4} mpiblacs_issues.ps
@@ -61,44 +176,117 @@ cp %{SOURCE5} f77blacsqref.ps
cp %{SOURCE6} cblacsqref.ps
cp %{SOURCE7} lawn94.ps
-%install
-rm -fr ${RPM_BUILD_ROOT}
-mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
-mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
-
-cd BLACS/LIB
-for f in *.a *.so*; do
- cp -f $f ${RPM_BUILD_ROOT}%{_libdir}/$f
-done
-cd ../TESTING/EXE
-cp -f x*test_MPI-LINUX-0 ${RPM_BUILD_ROOT}%{_bindir}
+%build
+# CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-fstack-protector//g'`
+# RPM_OPT_FLAGS=`echo $CFLAGS`
-cd ${RPM_BUILD_ROOT}%{_libdir}
-for i in libmpiblacs libmpiblacsF77init libmpiblacsCinit; do
- ln -fs $i.so.1.0.0 $i.so.1
- ln -s $i.so.1.0.0 $i.so
-done
+# To avoid replicated code define a build macro
+%define dobuild() \
+cd BLACS-$MPI_COMPILER; \
+make mpi ; \
cd ..
-%post -p /sbin/ldconfig
+# Build LAM version
+export MPI_COMPILER=lam
+%{_lam_load}
+RPM_OPT_FLAGS=`echo $CFLAGS`
+%dobuild
+%{_lam_unload}
+
+# Build mpich2 version
+export MPI_COMPILER=mpich2
+%{_mpich2_load}
+RPM_OPT_FLAGS=`echo $CFLAGS`
+%dobuild
+%{_mpich2_unload}
+
+# Build OpenMPI version
+export MPI_COMPILER=openmpi
+%{_openmpi_load}
+RPM_OPT_FLAGS=`echo $CFLAGS`
+%dobuild
+%{_openmpi_unload}
-%postun -p /sbin/ldconfig
+# cd TESTING/
+# make
+# cd ../..
+
+%install
+# mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
+
+for i in lam mpich2 openmpi; do
+ mkdir -p %{buildroot}%{_libdir}/blacs-$i/
+ pushd BLACS-$i/LIB
+ for f in *.a *.so*; do
+ cp -f $f %{buildroot}%{_libdir}/blacs-$i/$f
+ done
+ popd
+ pushd %{buildroot}%{_libdir}/blacs-$i/
+ for l in libmpiblacs libmpiblacsF77init libmpiblacsCinit; do
+ ln -fs $l.so.1.0.0 $l.so.1
+ ln -s $l.so.1.0.0 $l.so
+ done
+ popd
+# Generate environment module file
+mkdir -p %{buildroot}%{_datadir}/Modules/modulefiles/
+cat << EOF > %{buildroot}%{_datadir}/Modules/modulefiles/blacs-$i-%{_arch}
+#%Module 1.0
+#
+# Blacs libraries compiled with $i support
+#
+prepend-path LD_LIBRARY_PATH %{_libdir}/blacs-$i
+setenv LDFLAGS -L%{_libdir}/blacs-$i
+EOF
+done
+
+# cd ../TESTING/EXE
+# cp -f x*test_MPI-LINUX-0 ${RPM_BUILD_ROOT}%{_bindir}
%clean
rm -fr ${RPM_BUILD_ROOT}
-%files
+%files common
%defattr(-,root,root,0755)
%doc mpi_prop.ps blacs_install.ps mpiblacs_issues.ps f77blacsqref.ps cblacsqref.ps lawn94.ps
-%{_bindir}/x*test_MPI-LINUX-0
-%{_libdir}/libmpiblacs*.so.*
+# %{_bindir}/x*test_MPI-LINUX-0
+
+%files lam
+%defattr(-,root,root,0755)
+%dir %{_libdir}/blacs-lam/
+%{_datadir}/Modules/modulefiles/blacs-lam-%{_arch}
+%{_libdir}/blacs-lam/*.so.*
+
+%files lam-devel
+%defattr(-,root,root,0755)
+%{_libdir}/blacs-lam/*.a
+%{_libdir}/blacs-lam/*.so
-%files devel
+%files mpich2
%defattr(-,root,root,0755)
-%{_libdir}/libmpiblacs*.a
-%{_libdir}/libmpiblacs*.so
+%dir %{_libdir}/blacs-mpich2/
+%{_datadir}/Modules/modulefiles/blacs-mpich2-%{_arch}
+%{_libdir}/blacs-mpich2/*.so.*
+
+%files mpich2-devel
+%defattr(-,root,root,0755)
+%{_libdir}/blacs-mpich2/*.a
+%{_libdir}/blacs-mpich2/*.so
+
+%files openmpi
+%defattr(-,root,root,0755)
+%dir %{_libdir}/blacs-openmpi/
+%{_datadir}/Modules/modulefiles/blacs-openmpi-%{_arch}
+%{_libdir}/blacs-openmpi/*.so.*
+
+%files openmpi-devel
+%defattr(-,root,root,0755)
+%{_libdir}/blacs-openmpi/*.a
+%{_libdir}/blacs-openmpi/*.so
%changelog
+* Thu Aug 6 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 1.1-33
+- rework package to handle all supported MPI environments in Fedora
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
- Previous message (by thread): rpms/anaconda/devel .cvsignore, 1.651, 1.652 anaconda.spec, 1.801, 1.802 sources, 1.785, 1.786
- Next message (by thread): rpms/scalapack/devel scalapack-1.7-fedora.patch, 1.9, 1.10 scalapack.spec, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list