diff --git a/.cvsignore b/.cvsignore index e69de29..aa0bc6d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +openmpi-1.0.1.tar.bz2 diff --git a/openmpi.module.in b/openmpi.module.in new file mode 100644 index 0000000..edb2c93 --- /dev/null +++ b/openmpi.module.in @@ -0,0 +1,9 @@ +#%Module 1.0 +# +# OpenMPI module for use with 'environment-modules' package: +# +prepend-path PATH @DATADIR@/@NAME@/bin +prepend-path LD_LIBRARY_PATH @DATADIR@/@NAME@/lib +prepend-path MANPATH @DATADIR@/@NAME@/man +setenv CFLAGS -I@DATADIR@/@NAME@/include +setenv LDFLAGS -L@DATADIR@/@NAME@/lib diff --git a/openmpi.pc.in b/openmpi.pc.in new file mode 100644 index 0000000..ea4537c --- /dev/null +++ b/openmpi.pc.in @@ -0,0 +1,7 @@ +# pkg-config file for openmpi +Name: openmpi +Description: Open Message Passing Interface headers and libraries +URL: http://www.open-mpi.org/ +Version: @VERSION@ +Libs: -L@LIBDIR@ -lmpi +Cflags: -I@INCLUDEDIR@ diff --git a/openmpi.spec b/openmpi.spec new file mode 100644 index 0000000..1843fe8 --- /dev/null +++ b/openmpi.spec @@ -0,0 +1,179 @@ +Name: openmpi +Version: 1.0.1 +Release: 1%{?dist} +Summary: Open Message Passing Interface + +Group: Development/Libraries +License: BSD +URL: http://www.open-mpi.org/ +Source0: http://www.open-mpi.org/software/ompi/v1.0/downloads/%{name}-%{version}.tar.bz2 +Source1: relpath.sh +Source2: openmpi.pc.in +Source3: mpi_alternatives.in +Source4: openmpi.module.in +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: gcc-gfortran +Requires(post): /sbin/ldconfig + +%package devel +Summary: Development files for openmpi +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description +Open MPI provides a programming and runtime environment for +parallel and/or distributed networked multi-computer systems . +MPI stands for the Message Passing Interface. Written by the MPI Forum, +MPI is a standardized API typically used for parallel and/or distributed +computing - see http://www.mpi-forum.org/ . +Open MPI is an open source, freely available implementation of both the +MPI-1 and MPI-2 standards, combining technologies and resources from +several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in +order to build the best MPI library available. A completely new MPI-2 +compliant implementation, Open MPI offers advantages for system and +software vendors, application developers, and computer science +researchers. For more information, see http://www.open-mpi.org/ . + +%description devel +Contains development headers and libraries for openmpi + +%prep +%setup -q + +%build +%ifarch x86_64 +XCFLAGS="$RPM_OPT_FLAGS -fPIC" +XCXXFLAGS="$RPM_OPT_FLAGS -fPIC" +XFFLAGS="$RPM_OPT_FLAGS -fPIC" +%endif +%configure --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name} \ + LDFLAGS='-Wl,-z,noexecstack' \ + CFLAGS="$CFLAGS $XCFLAGS" \ + CXXFLAGS="$CFLAGS $XCFLAGS" \ + FFLAGS="$FFLAGS $XFLAGS"; +make %{?_smp_mflags} + +%{?!OMbinpfx: %define OMbinpfx 'om-'} # prefix for OpenMPI binaries that clash with LAM +%{?!LAMbinpfx: %define LAMbinpfx 'lam-'} # prefix for LAM binaries that clash with OpenMPI + +%install +rm -rf ${RPM_BUILD_ROOT} +make install DESTDIR=$RPM_BUILD_ROOT +# +# Make the help*.txt get picked up by %doc: +mkdir -p doc +mv -f ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/*.txt doc +# +# Resolve LAM clashes and create %{_datadir}/openmpi/{bin,lib,include} : +. %SOURCE1 +# ^- provides "relpath" function +rpath=`relpath ${RPM_BUILD_ROOT}/%{_bindir} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin`; +mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin; +mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/man; +ln -s `relpath ${RPM_BUILD_ROOT}/%{_libdir}/%{name} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}` ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/lib; +ln -s `relpath ${RPM_BUILD_ROOT}/%{_includedir}/%{name} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}` ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/include; +# Links: (mpiCC,mpicxx)->mpicc, (mpiexec,mpirun)->orterun +# Clashes with LAM: mpic++ mpicc mpif77 mpif90 mpiexec mpirun +rm -f ${RPM_BUILD_ROOT}/%{_bindir}/{mpiCC,mpicxx,mpiexec,mpirun} +(cd ${RPM_BUILD_ROOT}/%{_bindir}; ls) | egrep -v '^(mpic\+\+|mpicc|mpif77|mpif90)$' | +while read b; do + ln -s ${rpath}/${b} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin/${b}; +done; +for b in mpic++ mpicc mpif77 mpif90; do + mv ${RPM_BUILD_ROOT}/%{_bindir}/$b ${RPM_BUILD_ROOT}/%{_bindir}/%{OMbinpfx}$b; + ln -s ${rpath}/%{OMbinpfx}$b ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin/$b; +done +ln -s ${rpath}/%{OMbinpfx}mpic++ ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin/mpiCC +ln -s ./%{OMbinpfx}mpic++ ${RPM_BUILD_ROOT}/%{_bindir}/%{OMbinpfx}mpiCC +ln -s ${rpath}/%{OMbinpfx}mpic++ ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin/mpicxx +ln -s ./%{OMbinpfx}mpic++ ${RPM_BUILD_ROOT}/%{_bindir}/%{OMbinpfx}mpicxx +ln -s ${rpath}/orterun ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin/mpirun +ln -s ./orterun ${RPM_BUILD_ROOT}/%{_bindir}/%{OMbinpfx}mpirun +ln -s ${rpath}/orterun ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/bin/mpiexec +ln -s ./orterun ${RPM_BUILD_ROOT}/%{_bindir}/%{OMbinpfx}mpiexec +# Point the dynamic linker to the library dir +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/ld.so.conf.d +echo %{_libdir}/%{name} > ${RPM_BUILD_ROOT}/%{_sysconfdir}/ld.so.conf.d/%{name}.conf +# We don't like .la files +find ${RPM_BUILD_ROOT}%{_libdir} -name \*.la | xargs rm +# Make the pkgconfig files +mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig; +sed 's#@VERSION@#'%{version}'#;s#@LIBDIR@#'%{_libdir}/%{name}'#;s#@INCLUDEDIR@#'%{_includedir}/%{name}'#' < %SOURCE2 > ${RPM_BUILD_ROOT}/%{_libdir}/pkgconfig/%{name}.pc; +# Make the alternatives utility script: +mkdir -p ${RPM_BUILD_ROOT}/%{_sbindir} +sed 's#@BINDIR@#'%{_bindir}'#;s#@OMBINPFX@#'%{OMbinpfx}'#;s#@LAMBINPFX@#'%{LAMbinpfx}'#' < %SOURCE3 > ${RPM_BUILD_ROOT}/%{_sbindir}/mpi_alternatives; +chmod +x ${RPM_BUILD_ROOT}/%{_sbindir}/mpi_alternatives; +sed 's#@DATADIR@#'%{_datadir}/%{name}'#;s#@NAME@#'%{name}'#' < %SOURCE4 > ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/%{name}.module +:; + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%post +/sbin/ldconfig + +%preun + +%postun -p /sbin/ldconfig + +%post devel -p /sbin/ldconfig + +%preun devel + +%postun devel -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc LICENSE README doc/* +%config %{_sysconfdir}/ld.so.conf.d/%{name}.conf +%config %{_sysconfdir}/openmpi-* +%{_bindir}/orte* +%{_bindir}/*run +%{_bindir}/*exec +%{_bindir}/*info +%{_sbindir}/mpi_alternatives +%dir %{_libdir}/%{name} +%dir %{_libdir}/%{name}/%{name} +%{_libdir}/%{name}/*.so.* +%{_libdir}/%{name}/%{name}/*.so +%{_libdir}/%{name}/*.mod +%{_datadir}/%{name}/bin +%{_datadir}/%{name}/lib +%{_datadir}/%{name}/man +%{_datadir}/%{name}/%{name}.module + +%files devel +%defattr(-,root,root,-) +%{_bindir}/* +%exclude %{_bindir}/orte* +%exclude %{_bindir}/*run +%exclude %{_bindir}/*exec +%exclude %{_bindir}/*info +%{_includedir}/* +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/*.so +%{_libdir}/%{name}/*.a +%{_libdir}/pkgconfig/%{name}.pc +%{_datadir}/%{name}/include + + +%changelog +* Wed Feb 15 2006 Jason Vas Dias - 1.0.1-1 +- Import into Fedora Core +- Resolve LAM clashes + +* Wed Jan 25 2006 Orion Poplawski - 1.0.1-2 +- Use configure options to install includes and libraries +- Add ld.so.conf.d file to find libraries +- Add -fPIC for x86_64 + +* Tue Jan 24 2006 Orion Poplawski - 1.0.1-1 +- 1.0.1 +- Use alternatives + +* Sat Nov 19 2005 Ed Hill - 1.0-2 +- fix lam conflicts + +* Fri Nov 18 2005 Ed Hill - 1.0-1 +- initial specfile created + diff --git a/sources b/sources index e69de29..1e57aa5 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8abccca5cdddc81a6d9d9e22b3bb6db9 openmpi-1.0.1.tar.bz2