%define _pkgname mvapich %define _approot /opt/mvapich1/gnu %define _modroot /usr/share/Modules/modulefiles/mpi Summary: MPI Implementation over Infiniband RDMA-enabled interconnect Name: mvapich1-infiniband-gnu Version: 1.0.1 Release: 1.1 License: BSD Group: Development/Libraries URL: http://nowlab.cse.ohio-state.edu/projects/mpi-iba/index.html Source0: %{_pkgname}-%{version}.tar.gz Source1: mvapich1-infiniband-gnu-module Buildroot: %{_builddir}/%{name}-buildroot BuildRequires: gcc-gfortran libsysfs-devel libibverbs-devel libibumad-devel libibcommon-devel Requires: libibverbs libibverbs-devel libibumad libibumad-devel libibcommon libibcommon-devel %description This is high performance and scalable MPI-1 implementation over Infiniband and RDMA-enabled interconnect. This implementation is based on MPICH and MVICH. MVAPICH is pronounced as `em-vah-pich''. %prep %setup -q -n %{_pkgname}-%{version} %build export CC=gcc export CXX=g++ export F77=gfortran export F90=gfortran # Set this to override automatic optimization setting (-03). export ARCH="_X86_64_" export RPM_OPT_FLAGS="-fPIC -O3" export LIBS=${LIBS:--libverbs -libumad -lpthread} export FFLAGS=${FFLAGS:-} export CFLAGS=${CFLAGS:--D${ARCH} -DEARLY_SEND_COMPLETION -DMEMORY_SCALE -DVIADEV_RPUT_SUPPORT -D_SMP_ -D_SMP_RNDV_ -DCH_GEN2 -D_GNU_SOURCE $OPT_FLAG} export MPIRUN_CFLAGS="${MPIRUN_CFLAGS} -DLD_LIBRARY_PATH_MPI=\\\"%{_approot}/lib/shared\\\" -DMPI_PREFIX=\\\"%{_approot}/\\\" -DPARAM_GLOBAL=\\\"%{_approot}/etc/mvapich.conf\\\"" export F77_GETARGDECL=" " ./configure --enable-sharedlib --with-device=ch_gen2 --with-arch=LINUX --prefix=%{_approot} \ --with-romio --without-mpe -lib="$LIBS" make %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_approot} %{__make} DESTDIR=%{buildroot} install # Post install fixes # Remove bad links rm -f %{buildroot}%{_approot}/share/examples/mpirun # Creating environment scripts for sh/csh # Script for sh cat < %{buildroot}%{_approot}/bin/mpivars.sh if ! echo \${PATH} | grep -q %{_approot}/bin ; then PATH=\${PATH}:%{_approot}/bin fi EOF # Script for csh cat < %{buildroot}%{_approot}/bin/mpivars.csh if (?$path) then if ( "\${path}" !~ *%{_approot}/bin* ) then setenv path = \$path:%{_approot}/bin endif else setenv path = %{_approot}/bin: endif EOF install -D -m 0644 %{SOURCE1} %{buildroot}%{_modroot}/%{name} %post for file in `grep -r -l -I %{buildroot} %{_approot}/*|grep -v :0|grep -v \\\.a|awk -F : '{print $1}'`;do perl -pi -e "s,%{buildroot},,g" $file done # Change and enable some defaults in mvapich.conf perl -pi -e "s,^# MPIR_ALLTOALL_SHORT_MSG=256,MPIR_ALLTOALL_SHORT_MSG=8192,g" %{_approot}/etc/mvapich.conf perl -pi -e "s,^# MPIR_ALLTOALL_MEDIUM_MSG=32768,MPIR_ALLTOALL_MEDIUM_MSG=8192,g" %{_approot}/etc/mvapich.conf perl -pi -e "s,^# VIADEV_DEFAULT_MIN_RNR_TIMER=12,VIADEV_DEFAULT_MIN_RNR_TIMER=25,g" %{_approot}/etc/mvapich.conf ############################################################################# %preun %files %defattr(755,root,root) %{_approot} %{_modroot}/%{name} %changelog * Mon Sep 29 2008 Nils Philippsen 1.0.1-1.1 - use -fPIC to ensure execshield capability * Mon Sep 8 2008 Mehdi Bozzo-Rey 1.0.1-1 - upgrade * Wed Jun 25 2008 Mike Frisch 0.9.9-4.svn1458 - Use gfortran; sync'd with Platform HPC kit * Thu Apr 20 2008 Mike Frisch 0.9.9-2.svn1458.1 - Initial release * Fri Feb 29 2008 George Goh - Enabled F90. * Wed Oct 31 2007 George Goh - Initial spec file.