[mpiwrappers/el5/master] Initial import.

Jussi Lehtola jussilehtola at fedoraproject.org
Sat Oct 9 13:32:02 UTC 2010


commit 557517f3ba40ec2e28bc9e95adfbedc03733d456
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date:   Sat Oct 9 16:32:07 2010 +0300

    Initial import.

 mpiwrappers.module   |   29 +++++++++++
 mpiwrappers.rpmmacro |    6 ++
 mpiwrappers.spec     |  126 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 161 insertions(+), 0 deletions(-)
---
diff --git a/mpiwrappers.module b/mpiwrappers.module
new file mode 100644
index 0000000..9059655
--- /dev/null
+++ b/mpiwrappers.module
@@ -0,0 +1,29 @@
+#%Module 1.0
+
+# Environment module wrapper for MPI compilers in RHEL
+
+# Directory which holds the MPI compiler binaries
+prepend-path            PATH            	@BINDIR@
+# Directory which holds the binaries compiled against the MPI library
+prepend-path		PATH			@MPIBINDIR@
+# Directory which holds the MPI compiler libraries
+prepend-path            LD_LIBRARY_PATH		@LIBDIR@
+# Directory which holds the libraries compiled against the MPI library
+prepend-path		LD_LIBRARY_PATH		@MPILIBDIR@
+# Directory which holds the manual pages for the MPI compiler
+prepend-path		MANPATH			@MANDIR@
+# Directory which holds the manual pages for the MPI software
+prepend-path		MANPATH			@MPIMAN@
+# Directory which holds the Python modules compiled against the MPI library
+prepend-path		PYTHONPATH		@MPIPYTHONSITEARCH@
+
+# Helper variables.
+setenv                  MPI_BIN			@MPIBINDIR@
+setenv                  MPI_LIB			@MPILIBDIR@
+setenv			MPI_SYSCONFIG		@MPISYSCONFIG@
+setenv			MPI_FORTRAN_MOD_DIR	@MPIFORTRANMODDIR@
+setenv			MPI_INCLUDE		@MPIINCLUDE@
+setenv			MPI_MAN			@MPIMAN@
+setenv			MPI_PYTHON_SITEARCH	@MPIPYTHONSITEARCH@
+setenv			MPI_COMPILER		@MPICOMPILER@
+setenv			MPI_SUFFIX		@MPISUFFIX@
diff --git a/mpiwrappers.rpmmacro b/mpiwrappers.rpmmacro
new file mode 100644
index 0000000..4bc350f
--- /dev/null
+++ b/mpiwrappers.rpmmacro
@@ -0,0 +1,6 @@
+%_ at COMPILER@_load \
+ . /etc/profile.d/modules.sh; \
+ module load @COMPILER at -%{_arch};
+%_ at COMPILER@_unload \
+  . /etc/profile.d/modules.sh; \
+ module unload @COMPILER at -%{_arch};
diff --git a/mpiwrappers.spec b/mpiwrappers.spec
new file mode 100644
index 0000000..927f749
--- /dev/null
+++ b/mpiwrappers.spec
@@ -0,0 +1,126 @@
+# The version of Open MPI used
+%global openmpiver 1.4-gcc
+
+# Python arch 
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+# Fortran module directory
+%global _fmoddir %{_libdir}/gfortran/modules
+
+Name:		mpiwrappers
+Version:	1
+Release:	3%{?dist}
+Summary:	Environment module wrappers for MPI packages in RHEL
+Group:		Development/Libraries
+License:	GPL+
+Source0:	mpiwrappers.module
+Source1:	mpiwrappers.rpmmacro
+# This is an architecture specific package consisting only of environment
+# module files and directories
+BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+BuildRequires:	python-devel
+
+Requires:	%{name}-openmpi = %{version}-%{release}
+
+%description
+This package provides a compatibility layer with the use of environment modules
+for the MPI compilers in RHEL to ease packaging of MPI software in Fedora EPEL.
+
+This package pulls in all compatibility packages.
+
+
+%package devel
+Summary:        Environment module wrappers for MPI packages in RHEL
+Group:          Development/Libraries
+Requires:       %{name}-openmpi-devel = %{version}-%{release}
+
+%description devel
+This package provides a compatibility layer with the use of environment modules
+for the MPI compilers in RHEL to ease packaging of MPI software in Fedora EPEL.
+
+This package pulls in all compatibility development packages.
+
+# No wrapper for LAM which is obsolete
+
+# No wrappers for mvapich and mvapich2 that are not available on ppc
+
+%package openmpi
+Summary:	Environment module wrapper for Open MPI
+Group:		Development/Libraries
+Requires:	environment-modules
+Requires:	openmpi
+
+%description openmpi
+This package provides a compatibility layer with the use of environment modules
+for Open MPI to ease packaging of MPI software in Fedora EPEL.
+
+
+%package openmpi-devel
+Summary:        Environment module wrapper for Open MPI
+Group:          Development/Libraries
+Requires:       %{name}-openmpi = %{version}-%{release}
+Requires:	openmpi-devel
+
+%description openmpi-devel
+This package provides a compatibility layer with the use of environment modules
+for Open MPI to ease packaging of MPI software in Fedora EPEL.
+
+
+%prep
+
+%build
+
+%install
+rm -rf %{buildroot}
+
+# Install RPM macros
+mkdir -p %{buildroot}%{_sysconfdir}/rpm
+sed "s|@COMPILER@|openmpi|g" < %{SOURCE1} > %{buildroot}%{_sysconfdir}/rpm/macros.openmpi-%{_arch}
+
+# Install module files
+mkdir -p %{buildroot}%{_sysconfdir}/modulefiles
+
+# Open MPI
+%define cname openmpi
+sed "s|@BINDIR@|%{_libdir}/openmpi/%{openmpiver}/bin|g;s|@LIBDIR@|%{_libdir}/openmpi/%{openmpiver}/lib|g;s|@MANDIR@|%{_libdir}/%{openmpiver}/man|g;s|@MPIBINDIR@|%{_libdir}/%{cname}/bin|g;s|@MPISYSCONFIG@|%{_sysconfdir}/%{cname}-%{_arch}/|g;s|@MPIFORTRANMODDIR@|%{_fmoddir}/%{cname}/|g;s|@MPIINCLUDE@|%{_includedir}/%{cname}-%{_arch}/|g;s|@MPILIBDIR@|%{_libdir}/%{cname}/lib/|g;s|@MPIMAN@|%{_mandir}/%{cname}-%{_arch}|g;s|@MPIPYTHONSITEARCH@|%{python_sitearch}/%{cname}/|g;s|@MPICOMPILER@|openmpi-%{_arch}|g;s|@MPISUFFIX@|_openmpi|g" < %{SOURCE0} > %{buildroot}%{_sysconfdir}/modulefiles/openmpi-%{_arch}
+
+# Create the directories to be owned by the packages
+mkdir -p %{buildroot}%{_libdir}/openmpi/{bin,lib}
+mkdir -p %{buildroot}%{_sysconfdir}/openmpi-%{_arch}
+mkdir -p %{buildroot}%{_fmoddir}/openmpi
+mkdir -p %{buildroot}%{_includedir}/openmpi-%{_arch}
+mkdir -p %{buildroot}%{_mandir}/openmpi-%{_arch}
+mkdir -p %{buildroot}%{python_sitearch}/openmpi
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+
+%files devel
+%defattr(-,root,root,-)
+
+%files openmpi
+%defattr(-,root,root,-)
+%{_libdir}/openmpi/
+%{_sysconfdir}/modulefiles/openmpi-%{_arch}
+%{_sysconfdir}/openmpi-%{_arch}/
+%{_includedir}/openmpi-%{_arch}/
+%{_mandir}/openmpi-%{_arch}
+%{python_sitearch}/openmpi/
+
+%files openmpi-devel
+%defattr(-,root,root,-)
+%{_sysconfdir}/rpm/macros.openmpi-%{_arch}
+%{_fmoddir}/openmpi/
+
+%changelog
+* Sat Oct 9 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1-3
+- Dropped LAM, branched devel stuff in -devel package.
+
+* Sat Aug 21 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1-2
+- Review fixes.
+
+* Sat Aug 15 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1-1
+- First release.


More information about the scm-commits mailing list