From b3c3d23887ad477aa2a4feed5ffb8fba29ae18d5 Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Fri, 20 Jan 2012 11:35:11 -0500 Subject: [PATCH] Add new modulefile in mpi directory to make sorting out mpi modules easier and to allow for conflicts between mpi stacks. Bug #651074 Signed-off-by: Doug Ledford --- openmpi.module.in | 3 ++- openmpi.spec | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/openmpi.module.in b/openmpi.module.in index 59be874..3f40823 100644 --- a/openmpi.module.in +++ b/openmpi.module.in @@ -1,7 +1,8 @@ #%Module 1.0 # # OpenMPI module for use with 'environment-modules' package: -# +# +conflict mpi prepend-path PATH @LIBDIR@/bin prepend-path LD_LIBRARY_PATH @LIBDIR@/lib prepend-path PYTHONPATH @PYSITEARCH@ diff --git a/openmpi.spec b/openmpi.spec index 39f5871..89324f7 100644 --- a/openmpi.spec +++ b/openmpi.spec @@ -167,9 +167,10 @@ rm -f %{buildroot}%{_libdir}/%{name}/share/vampirtrace/doc/opari/lacsi01.ps.gz mkdir %{buildroot}%{_mandir}/%{namearch}/man{2,4,5,6,8,9,n} # Make the environment-modules file -mkdir -p %{buildroot}%{_sysconfdir}/modulefiles +mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi # Since we're doing our own substitution here, use our own definitions. -sed 's#@LIBDIR@#'%{_libdir}/%{name}'#g;s#@ETCDIR@#'%{_sysconfdir}/%{namearch}'#g;s#@FMODDIR@#'%{_fmoddir}/%{namearch}'#g;s#@INCDIR@#'%{_includedir}/%{namearch}'#g;s#@MANDIR@#'%{_mandir}/%{namearch}'#g;s#@PYSITEARCH@#'%{python_sitearch}/%{name}'#g;s#@COMPILER@#openmpi-'%{_arch}%{?_cc_name_suffix}'#g;s#@SUFFIX@#'%{?_cc_name_suffix}'_openmpi#g' < %SOURCE1 > %{buildroot}%{_sysconfdir}/modulefiles/%{namearch} +sed 's#@LIBDIR@#'%{_libdir}/%{name}'#g;s#@ETCDIR@#'%{_sysconfdir}/%{namearch}'#g;s#@FMODDIR@#'%{_fmoddir}/%{namearch}'#g;s#@INCDIR@#'%{_includedir}/%{namearch}'#g;s#@MANDIR@#'%{_mandir}/%{namearch}'#g;s#@PYSITEARCH@#'%{python_sitearch}/%{name}'#g;s#@COMPILER@#openmpi-'%{_arch}%{?_cc_name_suffix}'#g;s#@SUFFIX@#'%{?_cc_name_suffix}'_openmpi#g' < %SOURCE1 > %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{namearch} +cp %{buildroot}%{_sysconfdir}/modulefiles/mpi/* %{buildroot}%{_sysconfdir}/modulefiles/ # make the rpm config file mkdir -p %{buildroot}/%{_sysconfdir}/rpm cp %SOURCE2 %{buildroot}/%{_sysconfdir}/rpm/macros.%{namearch} @@ -205,6 +206,8 @@ rm -rf %{buildroot} %{_mandir}/%{namearch}/man7/ompi* %{_mandir}/%{namearch}/man7/orte* %{_libdir}/%{name}/lib/openmpi/* +%dir %{_sysconfdir}/modulefiles/mpi +%{_sysconfdir}/modulefiles/mpi/%{namearch} %{_sysconfdir}/modulefiles/%{namearch} #%files common %dir %{_libdir}/%{name}/share @@ -236,6 +239,10 @@ rm -rf %{buildroot} %{_sysconfdir}/rpm/macros.%{namearch} %changelog +* Fri Jan 20 2012 Doug Ledford - 1.5.4-3 +- Move modules file to mpi directory and make it conflict with any other + mpi module (bug #651074) + * Sun Jan 8 2012 Orion Poplawski 1.5.4-2 - Rebuild with gcc 4.7 (bug #772443)