Compare commits

...

9 Commits

Author SHA1 Message Date
Orion Poplawski 1d6d0b22e5 Add osh/shmem manpages; Drop gfotran linkage 2015-11-09 11:01:32 -07:00
Orion Poplawski 12c21d6dc3 Merge branch 'master' into altcc-1.10.1
Conflicts:
	macros.openmpi
	openmpi.spec
2015-11-05 16:29:32 -07:00
Orion Poplawski b2cccbb8af Use module hierarchy
Use compiler settings from build environment
2015-10-26 15:05:35 -06:00
Orion Poplawski f25b134a7a Update to 1.10.0 2015-10-07 14:39:44 -06:00
Orion Poplawski 63d5cff7c0 Set enable-opal-multi-threads for IB support 2012-11-02 12:18:58 -06:00
Orion Poplawski e01703e681 Install into /opt/%{shortname}-%{_cc_name}/%{version} 2012-09-14 15:39:01 -06:00
Orion Poplawski 809e536dab Fixup merge - drop XFLAGS 2012-09-13 15:27:43 -06:00
Orion Poplawski c63d1f977a Drop opt_?flags from wrapper flags 2012-09-13 14:53:14 -06:00
Orion Poplawski 97f177126d Initial AltCCRPMs version - Intel compiler 2012-09-12 16:58:57 -06:00
3 changed files with 164 additions and 122 deletions

View File

@ -1,6 +1,6 @@
%_openmpi_load \
. /etc/profile.d/modules.sh; \
module load mpi/openmpi-%{_arch};
module load openmpi
%_openmpi_unload \
. /etc/profile.d/modules.sh; \
module unload mpi/openmpi-%{_arch};
module unload openmpi

View File

@ -3,19 +3,26 @@
# OpenMPI module for use with 'environment-modules' package:
#
conflict mpi
prepend-path PATH @LIBDIR@/bin
prepend-path LD_LIBRARY_PATH @LIBDIR@/lib
prepend-path PATH @PREFIX@/bin
prepend-path LD_LIBRARY_PATH @LIBDIR@
prepend-path PKG_CONFIG_PATH @LIBDIR@/lib/pkgconfig
prepend-path MANPATH @MANDIR@
setenv MPI_BIN @LIBDIR@/bin
setenv MPI_BIN @PREFIX@/bin
setenv MPI_SYSCONFIG @ETCDIR@
setenv MPI_FORTRAN_MOD_DIR @FMODDIR@
setenv MPI_INCLUDE @INCDIR@
setenv MPI_LIB @LIBDIR@/lib
setenv MPI_LIB @LIBDIR@
setenv MPI_MAN @MANDIR@
setenv MPI_PYTHON_SITEARCH @PY2SITEARCH@
setenv MPI_PYTHON2_SITEARCH @PY2SITEARCH@
setenv MPI_PYTHON3_SITEARCH @PY3SITEARCH@
setenv MPI_COMPILER @COMPILER@
setenv MPI_SUFFIX @SUFFIX@
setenv MPI_HOME @LIBDIR@
setenv MPI_HOME @PREFIX@
set name [lrange [split [ module-info name ] / ] 0 0 ]
set ver [lrange [split [ module-info name ] / ] 1 1 ]
prepend-path MODULEPATH @MODULEPATH@
setenv MPI_NAME $name
setenv MPI_VERSION $ver

View File

@ -1,18 +1,30 @@
%global _hardened_build 1
# We only compile with gcc, but other people may want other compilers.
# Set the compiler here.
%global opt_cc gcc
# Optional CFLAGS to use with the specific compiler...gcc doesn't need any,
# so uncomment and define to use
#global opt_cflags
%global opt_cxx g++
#global opt_cxxflags
%global opt_f77 gfortran
#global opt_fflags
%global opt_fc gfortran
#global opt_fcflags
# AltCCRPMS
%global shortname openmpi
%global _cc_name %{getenv:COMPILER_NAME}
%global _cc_name_suffix -%{_cc_name}
%global _cc_version %{getenv:COMPILER_VERSION}
%global _cc_name_ver %{_cc_name}-%{_cc_version}
%global _prefix /opt/%{_cc_name_ver}/%{shortname}-%{version}
%global _sysconfdir %{_prefix}/etc
%global _defaultdocdir %{_prefix}/share/doc
%global _infodir %{_prefix}/share/info
%global _mandir %{_prefix}/share/man
#We don't want to be beholden to the proprietary libraries
%global _use_internal_dependency_generator 0
%global __find_requires %{nil}
# Non gcc compilers don't generate build ids
%undefine _missing_build_ids_terminate_build
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")}
%endif
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# Optional name suffix to use...we leave it off when compiling with gcc, but
# for other compiled versions to install side by side, it will need a
# suffix in order to keep the names from conflicting.
@ -20,7 +32,7 @@
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: openmpi%{?_cc_name_suffix}
Name: openmpi-1.10.1-%{_cc_name_ver}
Version: 1.10.1
Release: 1%{?dist}
Summary: Open Message Passing Interface
@ -35,7 +47,6 @@ Source2: openmpi.pth.py2
Source3: openmpi.pth.py3
Source4: macros.openmpi
BuildRequires: gcc-gfortran
%ifnarch s390
BuildRequires: valgrind-devel
%endif
@ -45,21 +56,30 @@ BuildRequires: librdmacm-devel libibcm-devel
# vt_dyn.cc:958:28: error: 'class BPatch_basicBlockLoop' has no member named 'getLoopHead'
# loop->getLoopHead()->getStartAddress(), loop_stmts );
#BuildRequires: dyninst-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: hwloc-devel
# So configure can find lstopo
BuildRequires: hwloc-gui
%endif
BuildRequires: java-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
# Not compiled with thread support on EL6
BuildRequires: libevent-devel
%endif
BuildRequires: libfabric-devel
BuildRequires: papi-devel
BuildRequires: perl(Getopt::Long)
BuildRequires: python
BuildRequires: python2-devel
%if 0%{?fedora}
BuildRequires: python3-devel
%endif
BuildRequires: libtool-ltdl-devel
BuildRequires: torque-devel
BuildRequires: zlib-devel
%if 0%{?fedora} >= 23
BuildRequires: rpm-mpi-hooks
%endif
Provides: mpi
Requires: environment(modules)
@ -69,6 +89,18 @@ Requires: openssh-clients
# otf appears to be bundled
Provides: bundled(otf) = 1.12.3
# AltCCRPMS
Provides: %{shortname}-%{_cc_name} = %{version}-%{release}
Provides: %{shortname}-%{_cc_name}%{?_isa} = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: hwloc-libs
Requires: libevent
%endif
Requires: libfabric
Requires: libibverbs
Requires: opensm-libs
Requires: torque-libs
# s390 is unlikely to have the hardware we want, and some of the -devel
# packages we require aren't available there.
ExcludeArch: s390 s390x
@ -89,9 +121,14 @@ researchers. For more information, see http://www.open-mpi.org/ .
%package devel
Summary: Development files for openmpi
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}, gcc-gfortran
Requires: %{name} = %{version}-%{release}
Provides: mpi-devel
%if 0%{?fedora} >= 23
Requires: rpm-mpi-hooks
%endif
# AltCCRPMS
Provides: %{shortname}-%{_cc_name}-devel = %{version}-%{release}
Provides: %{shortname}-%{_cc_name}-devel%{?_isa} = %{version}-%{release}
%description devel
Contains development headers and libraries for openmpi.
@ -120,159 +157,157 @@ Contains development wrapper for compiling Java with openmpi.
# We set this to for convenience, since this is the unique dir we use for this
# particular package, version, compiler
%global namearch openmpi-%{_arch}%{?_cc_name_suffix}
%global namearch openmpi%{?_cc_name_suffix}
%prep
%setup -q -n openmpi-%{version}
%build
./configure --prefix=%{_libdir}/%{name} \
--mandir=%{_mandir}/%{namearch} \
--includedir=%{_includedir}/%{namearch} \
--sysconfdir=%{_sysconfdir}/%{namearch} \
[ "${FC/pgf/}" != "$FC" ] && export FC="$FC -noswitcherror"
./configure --prefix=%{_prefix} \
--libdir=%{_prefix}/%{_lib} \
--disable-silent-rules \
--enable-mpi-java \
%if 0%{?fedora} || 0%{?rhel} >= 7
--with-hwloc=/usr \
--with-libevent=/usr \
%endif
--with-sge \
%ifnarch s390
--with-valgrind \
--enable-memchecker \
%endif
--with-hwloc=/usr \
--with-libltdl=/usr \
CC=%{opt_cc} CXX=%{opt_cxx} \
LDFLAGS='%{__global_ldflags}' \
CFLAGS="%{?opt_cflags} %{!?opt_cflags:$RPM_OPT_FLAGS}" \
CXXFLAGS="%{?opt_cxxflags} %{!?opt_cxxflags:$RPM_OPT_FLAGS}" \
FC=%{opt_fc} FCFLAGS="%{?opt_fcflags} %{!?opt_fcflags:$RPM_OPT_FLAGS}"
LDFLAGS='%{?__global_ldflags}'
# --with-contrib-vt-flags='CXXFLAGS="-I%{_includedir}/dyninst -L%{_libdir}/dyninst"' \
make %{?_smp_mflags} V=1
%install
make install DESTDIR=%{buildroot}
find %{buildroot}%{_libdir}/%{name}/lib -name \*.la | xargs rm
find %{buildroot}%{_mandir}/%{namearch} -type f | xargs gzip -9
ln -s mpicc.1.gz %{buildroot}%{_mandir}/%{namearch}/man1/mpiCC.1.gz
rm -f %{buildroot}%{_mandir}/%{namearch}/man1/mpiCC.1
rm -f %{buildroot}%{_mandir}/%{namearch}/man1/orteCC.1*
find %{buildroot}%{_libdir} -name \*.la | xargs rm
find %{buildroot}%{_mandir} -type f | xargs gzip -9
ln -s mpicc.1.gz %{buildroot}%{_mandir}/man1/mpiCC.1.gz
rm -f %{buildroot}%{_mandir}/man1/mpiCC.1
rm -f %{buildroot}%{_mandir}/man1/orteCC.1*
rm -f %{buildroot}%{_libdir}/%{name}/share/vampirtrace/doc/opari/lacsi01.ps.gz
mkdir %{buildroot}%{_mandir}/%{namearch}/man{2,4,5,6,8,9,n}
mkdir %{buildroot}%{_mandir}/man{2,4,5,6,8,9,n}
# Make the environment-modules file
mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi
mkdir -p %{buildroot}/opt/modulefiles/Compiler/%{_cc_name}/%{_cc_version}/%{shortname}
# Since we're doing our own substitution here, use our own definitions.
sed 's#@LIBDIR@#%{_libdir}/%{name}#;
s#@ETCDIR@#%{_sysconfdir}/%{namearch}#;
s#@FMODDIR@#%{_fmoddir}/%{name}#;
s#@INCDIR@#%{_includedir}/%{namearch}#;
s#@MANDIR@#%{_mandir}/%{namearch}#;
s#@PY2SITEARCH@#%{python2_sitearch}/%{name}#;
s#@PY3SITEARCH@#%{python3_sitearch}/%{name}#;
s#@COMPILER@#openmpi-%{_arch}%{?_cc_name_suffix}#;
sed 's#@PREFIX@#%{_prefix}#;
s#@MODULEPATH@#/opt/modulefiles/MPI/%{_cc_name}/%{_cc_version}/%{shortname}/%{version}#;
s#@LIBDIR@#%{_libdir}#g;
s#@ETCDIR@#%{_sysconfdir}#g;
s#@FMODDIR@#%{_libdir}#g;
s#@INCDIR@#%{_includedir}#g;
s#@MANDIR@#%{_mandir}#g;
s#@PY2SITEARCH@#%{_libdir}/python%{python2_version}/site-packages#;
%if 0%{?fedora}
s#@PY3SITEARCH@#%{_libdir}/python%{python3_version}/site-packages#;
%endif
s#@COMPILER@#openmpi%{?_cc_name_suffix}#g
s#@SUFFIX@#%{?_cc_name_suffix}_openmpi#' \
<%{SOURCE1} \
>%{buildroot}%{_sysconfdir}/modulefiles/mpi/%{namearch}
>%{buildroot}/opt/modulefiles/Compiler/%{_cc_name}/%{_cc_version}/%{shortname}/%{version}
mkdir -p %{buildroot}/opt/modulefiles/MPI/%{_cc_name}/%{_cc_version}/%{shortname}/%{version}
# make the rpm config file
install -Dpm 644 %{SOURCE4} %{buildroot}/%{macrosdir}/macros.%{namearch}
# Link the fortran module to proper location
mkdir -p %{buildroot}/%{_fmoddir}/%{name}
for mod in %{buildroot}%{_libdir}/%{name}/lib/*.mod
do
modname=$(basename $mod)
ln -s ../../../%{name}/lib/${modname} %{buildroot}/%{_fmoddir}/%{name}/
done
# Remove extraneous wrapper link libraries (bug 814798)
sed -i -e s/-ldl// -e s/-lhwloc// \
%{buildroot}%{_libdir}/%{name}/share/openmpi/*-wrapper-data.txt
%{buildroot}%{_datadir}/openmpi/*-wrapper-data.txt
# install .pth files
mkdir -p %{buildroot}/%{python2_sitearch}/%{name}
install -pDm0644 %{SOURCE2} %{buildroot}/%{python2_sitearch}/openmpi.pth
%if 0%{?fedora}
mkdir -p %{buildroot}/%{python3_sitearch}/%{name}
install -pDm0644 %{SOURCE3} %{buildroot}/%{python3_sitearch}/openmpi.pth
%endif
%check
make check
%files
%dir %{_libdir}/%{name}
%dir %{_sysconfdir}/%{namearch}
%dir %{_libdir}/%{name}/bin
%dir %{_libdir}/%{name}/lib
%dir %{_libdir}/%{name}/lib/openmpi
%dir %{_mandir}/%{namearch}
%dir %{_mandir}/%{namearch}/man*
%dir %{_prefix}
%dir %{_bindir}
%dir %{_libdir}
%dir %{_sysconfdir}
%dir %{_mandir}
%dir %{_mandir}/man*
%dir %{python2_sitearch}/%{name}
%{python2_sitearch}/openmpi.pth
%if 0%{?fedora}
%dir %{python3_sitearch}/%{name}
%{python3_sitearch}/openmpi.pth
%config(noreplace) %{_sysconfdir}/%{namearch}/*
%{_libdir}/%{name}/bin/mpi[er]*
%{_libdir}/%{name}/bin/ompi*
%{_libdir}/%{name}/bin/opari
%{_libdir}/%{name}/bin/orte[-dr_]*
%{_libdir}/%{name}/bin/oshmem_info
%{_libdir}/%{name}/bin/oshrun
%{_libdir}/%{name}/bin/otf*
%{_libdir}/%{name}/bin/shmemrun
%{_libdir}/%{name}/lib/*.so.*
%{_mandir}/%{namearch}/man1/mpi[er]*
%{_mandir}/%{namearch}/man1/ompi*
%{_mandir}/%{namearch}/man1/orte[-dr_]*
%{_mandir}/%{namearch}/man1/oshmem_info*
%{_mandir}/%{namearch}/man1/oshrun*
%{_mandir}/%{namearch}/man1/shmemrun*
%{_mandir}/%{namearch}/man7/ompi*
%{_mandir}/%{namearch}/man7/orte*
%{_libdir}/%{name}/lib/openmpi/*
%{_sysconfdir}/modulefiles/mpi/
%dir %{_libdir}/%{name}/share
%dir %{_libdir}/%{name}/share/openmpi
%{_libdir}/%{name}/share/openmpi/doc
%{_libdir}/%{name}/share/openmpi/amca-param-sets
%{_libdir}/%{name}/share/openmpi/help*.txt
%{_libdir}/%{name}/share/openmpi/mca-btl-openib-device-params.ini
%{_libdir}/%{name}/share/openmpi/mca-coll-ml.config
%endif
%config(noreplace) %{_sysconfdir}/*
%{_bindir}/mpi[er]*
%{_bindir}/ompi*
%{_bindir}/opari
%{_bindir}/orte[-dr_]*
%{_bindir}/oshmem_info
%{_bindir}/oshrun
%{_bindir}/otf*
%{_bindir}/shmemrun
%{_libdir}/*.so.*
%{_mandir}/man1/mpi[er]*
%{_mandir}/man1/ompi*
%{_mandir}/man1/orte[-dr_]*
%{_mandir}/man1/oshmem_info*
%{_mandir}/man1/oshrun*
%{_mandir}/man1/shmemrun*
%{_mandir}/man7/ompi*
%{_mandir}/man7/orte*
%dir %{_libdir}/openmpi
%{_libdir}/openmpi/*
/opt/modulefiles/Compiler/
/opt/modulefiles/MPI/%{_cc_name}/%{_cc_version}
%dir %{_datadir}
%dir %{_datadir}/openmpi
%{_datadir}/openmpi/doc
%{_datadir}/openmpi/amca-param-sets
%{_datadir}/openmpi/help*.txt
%{_datadir}/openmpi/mca-btl-openib-device-params.ini
%{_datadir}/openmpi/mca-coll-ml.config
%files devel
%dir %{_includedir}/%{namearch}
%dir %{_libdir}/%{name}/share/vampirtrace
%{_libdir}/%{name}/bin/mpi[cCf]*
%{_libdir}/%{name}/bin/opal_*
%{_libdir}/%{name}/bin/orte[cCf]*
%{_libdir}/%{name}/bin/osh[cf]*
%{_libdir}/%{name}/bin/shmem[cf]*
%{_libdir}/%{name}/bin/vt*
%{_includedir}/%{namearch}/*
%{_fmoddir}/%{name}/
%{_libdir}/%{name}/lib/*.so
%{_libdir}/%{name}/lib/lib*.a
%{_libdir}/%{name}/lib/*.mod
%{_libdir}/%{name}/lib/pkgconfig/
%{_mandir}/%{namearch}/man1/mpi[cCf]*
%{_mandir}/%{namearch}/man1/osh[cCf]*
%{_mandir}/%{namearch}/man1/shmem[cCf]*
%{_mandir}/%{namearch}/man1/opal_*
%{_mandir}/%{namearch}/man3/*
%{_mandir}/%{namearch}/man7/opal*
%{_libdir}/%{name}/share/openmpi/openmpi-valgrind.supp
%{_libdir}/%{name}/share/openmpi/*-wrapper-data.txt
%{_libdir}/%{name}/share/vampirtrace/*
%dir %{_includedir}
%dir %{_datadir}/vampirtrace
%{_bindir}/mpi[cCf]*
%{_bindir}/opal_*
%{_bindir}/orte[cCf]*
%{_bindir}/osh[cf]*
%{_bindir}/shmem[cf]*
%{_bindir}/vt*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/lib*.a
%{_libdir}/*.mod
%{_libdir}/pkgconfig/
%{_mandir}/man1/mpi[cCf]*
%{_mandir}/man1/opal_*
%{_mandir}/man1/osh[cCf]*
%{_mandir}/man1/shmem[cCf]*
%{_mandir}/man3/*
%{_mandir}/man7/opal*
%{_datadir}/openmpi/openmpi-valgrind.supp
%{_datadir}/openmpi/*-wrapper-data.txt
%{_datadir}/vampirtrace/*
%{macrosdir}/macros.%{namearch}
%files java
%{_libdir}/%{name}/lib/mpi.jar
%{_libdir}/mpi.jar
%files java-devel
%{_libdir}/%{name}/bin/mpijavac
%{_libdir}/%{name}/bin/mpijavac.pl
%{_bindir}/mpijavac
%{_bindir}/mpijavac.pl
# Currently this only contaings openmpi/javadoc
%{_libdir}/%{name}/share/doc/
%{_mandir}/%{namearch}/man1/mpijavac.1.gz
%{_datadir}/doc/
%{_mandir}/man1/mpijavac.1.gz
%changelog